/* ============================================================
   Renneway Panel — "Loom"
   Industrial-luxe B2B for a yarn marketplace.
   Cream paper + deep ink + ember accent. Serif display,
   Inter UI, mono details. Selvage rules, kicker labels,
   tabular numerics, opinionated.
   ============================================================ */

:root {
  /* ── Surfaces (warm paper) ─────────────────────────────── */
  --rnw-paper:        #f6f1e7;          /* page bg, dyed-cream */
  --rnw-paper-2:      #efe7d6;          /* sunken / subtle bg */
  --rnw-card:         #fcfaf4;          /* card surface */
  --rnw-card-soft:    #f2ecde;          /* card footer / muted */
  --rnw-bg:           var(--rnw-paper);
  --rnw-bg-subtle:    var(--rnw-paper-2);
  --rnw-surface:      var(--rnw-card);
  --rnw-surface-muted:var(--rnw-card-soft);

  /* ── Ink (text) ────────────────────────────────────────── */
  --rnw-ink:          #181815;
  --rnw-ink-2:        #44423a;
  --rnw-ink-3:        #757166;
  --rnw-ink-4:        #a8a297;
  --rnw-text:         var(--rnw-ink);
  --rnw-text-secondary: var(--rnw-ink-2);
  --rnw-text-tertiary:  var(--rnw-ink-3);
  --rnw-text-quaternary:var(--rnw-ink-4);
  --rnw-text-inverse: #f6f1e7;

  /* ── Sidebar (dark) ────────────────────────────────────── */
  --rnw-side-bg:      #131310;
  --rnw-side-bg-2:    #1c1c18;
  --rnw-side-line:    rgba(255, 240, 210, 0.08);
  --rnw-side-line-2:  rgba(255, 240, 210, 0.04);
  --rnw-side-fg:      #d3c9b3;
  --rnw-side-fg-mute: #87806e;
  --rnw-side-fg-dim:  #5a554a;
  --rnw-side-active-bg: #232220;
  --rnw-side-active-fg: #f5ecd5;
  /* legacy aliases */
  --rnw-sidebar-bg: var(--rnw-side-bg);
  --rnw-sidebar-fg: var(--rnw-side-fg);
  --rnw-sidebar-fg-muted: var(--rnw-side-fg-mute);
  --rnw-sidebar-active: var(--rnw-side-active-bg);
  --rnw-sidebar-active-fg: var(--rnw-side-active-fg);

  /* ── Hairlines ─────────────────────────────────────────── */
  --rnw-rule:         rgba(24, 24, 21, 0.10);
  --rnw-rule-soft:    rgba(24, 24, 21, 0.06);
  --rnw-rule-strong:  rgba(24, 24, 21, 0.18);
  --rnw-border:       var(--rnw-rule);
  --rnw-border-subtle:var(--rnw-rule-soft);
  --rnw-border-strong:var(--rnw-rule-strong);

  /* ── Brand ─────────────────────────────────────────────── */
  --rnw-ember:        #b9501d;          /* copper / hot iron */
  --rnw-ember-2:      #9a3f15;
  --rnw-ember-soft:   rgba(185, 80, 29, 0.08);
  --rnw-ember-tint:   rgba(185, 80, 29, 0.14);
  --rnw-primary:      var(--rnw-ink);
  --rnw-primary-hover:#000000;
  --rnw-accent:       var(--rnw-ember);
  --rnw-accent-hover: var(--rnw-ember-2);
  --rnw-accent-soft:  var(--rnw-ember-soft);
  --rnw-accent-border:rgba(185, 80, 29, 0.22);

  /* ── Semantic (muted, paper-friendly) ──────────────────── */
  --rnw-success:      #4f6a3b;
  --rnw-success-bg:   rgba(79, 106, 59, 0.10);
  --rnw-success-border:rgba(79, 106, 59, 0.22);
  --rnw-warn:         #9b6b15;
  --rnw-warn-bg:      rgba(155, 107, 21, 0.10);
  --rnw-warn-border:  rgba(155, 107, 21, 0.22);
  --rnw-danger:       #9c2c19;
  --rnw-danger-bg:    rgba(156, 44, 25, 0.09);
  --rnw-danger-border:rgba(156, 44, 25, 0.22);
  --rnw-info:         #2e5c8a;
  --rnw-info-bg:      rgba(46, 92, 138, 0.09);
  --rnw-info-border:  rgba(46, 92, 138, 0.22);

  /* ── Radii (small, industrial) ─────────────────────────── */
  --rnw-radius-sm: 4px;
  --rnw-radius:    6px;
  --rnw-radius-lg: 8px;
  --rnw-radius-xl: 12px;

  /* ── Shadows (very restrained) ─────────────────────────── */
  --rnw-shadow-xs: 0 1px 0 rgba(24, 24, 21, 0.04);
  --rnw-shadow-sm: 0 1px 2px rgba(24, 24, 21, 0.05);
  --rnw-shadow-md: 0 6px 20px -10px rgba(24, 24, 21, 0.18);
  --rnw-shadow-lg: 0 14px 40px -16px rgba(24, 24, 21, 0.28);
  --rnw-focus-ring: 0 0 0 3px rgba(185, 80, 29, 0.18);

  /* ── Layout ────────────────────────────────────────────── */
  --rnw-sidebar-w:    232px;
  --rnw-topbar-h:     56px;

  /* ── Motion ────────────────────────────────────────────── */
  --rnw-ease:    cubic-bezier(0.32, 0.72, 0, 1);
  --rnw-ease-2:  cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Display fonts ─────────────────────────────────────── */
  --rnw-font-display: 'Fraunces', 'Cormorant Garamond', 'Georgia', serif;
  --rnw-font-ui:      'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rnw-font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── Reset & body ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { background: var(--rnw-paper); color: var(--rnw-ink); }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--rnw-font-ui);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03', 'ss07';
  letter-spacing: -0.005em;
  position: relative;
}

/* paper grain — barely visible */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(rgba(24,24,21,0.03) 1px, transparent 1px),
    radial-gradient(rgba(24,24,21,0.025) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1.5px 1.5px;
  opacity: 0.6;
  mix-blend-mode: multiply;
}

button, input, select, textarea { font-family: inherit; color: inherit; }

::selection { background: var(--rnw-ember-tint); color: var(--rnw-ink); }

/* ── Shell ───────────────────────────────────────────────── */
.rnw-shell { display: flex; min-height: 100vh; position: relative; z-index: 2; }

/* ── Sidebar (dark, dense, intentional) ─────────────────── */
.rnw-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--rnw-sidebar-w);
  background: var(--rnw-side-bg);
  color: var(--rnw-side-fg);
  display: flex; flex-direction: column;
  z-index: 40;
  border-right: 1px solid var(--rnw-side-line);
}
.rnw-sidebar::after {
  /* selvage accent — single ember filament */
  content: '';
  position: absolute; top: 0; right: -1px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--rnw-ember) 22%, var(--rnw-ember) 78%, transparent 100%);
  opacity: 0.32;
  pointer-events: none;
}

.rnw-sidebar__brand {
  display: flex; align-items: center; gap: 11px;
  padding: 0 18px;
  height: var(--rnw-topbar-h);
  border-bottom: 1px solid var(--rnw-side-line);
  flex-shrink: 0;
}
.rnw-sidebar__brand-logo {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--rnw-side-bg-2);
  border: 1px solid var(--rnw-side-line);
  border-radius: 6px;
  color: var(--rnw-ember);
  flex-shrink: 0;
  position: relative;
}
.rnw-sidebar__brand-logo::before,
.rnw-sidebar__brand-logo::after {
  /* warp + weft */
  content: '';
  position: absolute;
  background: var(--rnw-ember);
}
.rnw-sidebar__brand-logo::before {
  width: 1.5px; height: 14px;
  left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(20deg);
}
.rnw-sidebar__brand-logo::after {
  width: 14px; height: 1.5px;
  left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(20deg);
}
.rnw-sidebar__brand-name {
  font-family: var(--rnw-font-display);
  font-weight: 500;
  font-size: 17px;
  font-style: italic;
  letter-spacing: -0.015em;
  color: var(--rnw-side-active-fg);
  font-variation-settings: 'opsz' 36, 'SOFT' 80;
  line-height: 1;
}
.rnw-sidebar__brand-sub {
  font-size: 9.5px;
  color: var(--rnw-side-fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 500;
  margin-top: 4px;
}

.rnw-sidebar__nav {
  flex: 1; overflow-y: auto;
  padding: 16px 12px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--rnw-side-line) transparent;
}
.rnw-sidebar__nav::-webkit-scrollbar { width: 5px; }
.rnw-sidebar__nav::-webkit-scrollbar-thumb { background: var(--rnw-side-line); border-radius: 3px; }
.rnw-sidebar__nav::-webkit-scrollbar-track { background: transparent; }

.rnw-sidebar__group { margin-bottom: 18px; }
.rnw-sidebar__group-title {
  font-size: 9.5px; font-weight: 600;
  color: var(--rnw-side-fg-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0 10px 8px;
  display: flex; align-items: center; gap: 8px;
}
.rnw-sidebar__group-title::after {
  content: ''; flex: 1; height: 1px;
  background: var(--rnw-side-line-2);
}

.rnw-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  margin-bottom: 1px;
  border-radius: 5px;
  font-size: 13px; font-weight: 500;
  color: var(--rnw-side-fg);
  text-decoration: none;
  transition: background 0.14s var(--rnw-ease), color 0.14s var(--rnw-ease);
  letter-spacing: -0.005em;
}
.rnw-nav-item:hover {
  background: var(--rnw-side-bg-2);
  color: var(--rnw-side-active-fg);
}
.rnw-nav-item.is-active {
  background: var(--rnw-side-active-bg);
  color: var(--rnw-side-active-fg);
}
.rnw-nav-item.is-active::before {
  content: '';
  position: absolute; left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 16px;
  background: var(--rnw-ember);
  border-radius: 0 2px 2px 0;
}
.rnw-nav-item__icon {
  width: 15px; height: 15px;
  flex-shrink: 0;
  stroke-width: 1.6;
  color: var(--rnw-side-fg-mute);
  transition: color 0.14s var(--rnw-ease);
}
.rnw-nav-item:hover .rnw-nav-item__icon,
.rnw-nav-item.is-active .rnw-nav-item__icon { color: var(--rnw-side-active-fg); }
.rnw-nav-item__badge {
  margin-left: auto;
  font-size: 10px; font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--rnw-ember);
  color: var(--rnw-side-active-fg);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.rnw-nav-item__kbd {
  margin-left: auto;
  font-family: var(--rnw-font-mono);
  font-size: 10px;
  color: var(--rnw-side-fg-dim);
  background: var(--rnw-side-bg-2);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--rnw-side-line);
}

.rnw-sidebar__footer {
  border-top: 1px solid var(--rnw-side-line);
  padding: 10px;
  flex-shrink: 0;
}
.rnw-user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 9px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--rnw-side-fg);
  transition: background 0.14s var(--rnw-ease);
}
.rnw-user-card:hover { background: var(--rnw-side-bg-2); }
.rnw-user-card__avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rnw-ember) 0%, var(--rnw-ember-2) 100%);
  color: var(--rnw-side-active-fg);
  font-weight: 600; font-size: 11px;
  display: grid; place-items: center;
  flex-shrink: 0;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.rnw-user-card__name {
  font-size: 12.5px; font-weight: 500;
  color: var(--rnw-side-active-fg);
  letter-spacing: -0.005em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rnw-user-card__role {
  font-size: 10px;
  color: var(--rnw-side-fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 2px;
}

/* ── Main column ─────────────────────────────────────────── */
.rnw-main {
  flex: 1;
  margin-left: var(--rnw-sidebar-w);
  display: flex; flex-direction: column;
  min-width: 0;
}

.rnw-topbar {
  position: sticky; top: 0;
  height: var(--rnw-topbar-h);
  background: rgba(246, 241, 231, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rnw-rule-soft);
  z-index: 20;
  display: flex; align-items: center;
  padding: 0 32px;
  gap: 16px;
}
.rnw-topbar__menu-btn {
  display: none;
  background: transparent; border: 1px solid var(--rnw-rule);
  width: 34px; height: 34px;
  border-radius: 6px;
  cursor: pointer; color: var(--rnw-ink-2);
  align-items: center; justify-content: center;
}
.rnw-topbar__menu-btn:hover { background: var(--rnw-paper-2); }

.rnw-topbar__crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--rnw-ink-2);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.rnw-topbar__crumb-sep { color: var(--rnw-ink-4); }
.rnw-topbar__kicker {
  font-size: 9.5px; font-weight: 600;
  color: var(--rnw-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 3px 8px;
  border: 1px solid var(--rnw-rule);
  border-radius: 4px;
  background: var(--rnw-card);
}
.rnw-topbar__actions {
  margin-left: auto;
  display: flex; align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--rnw-ink-3);
}
.rnw-topbar__time {
  font-family: var(--rnw-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--rnw-ink-3);
  font-variant-numeric: tabular-nums;
}

.rnw-content {
  flex: 1;
  padding: 32px 40px 80px;
  max-width: 1280px;
  width: 100%;
}

/* ── Mobile ──────────────────────────────────────────────── */
.rnw-sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(19, 19, 16, 0.46);
  z-index: 39;
  backdrop-filter: blur(2px);
}
@media (max-width: 1024px) {
  .rnw-sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s var(--rnw-ease);
    border-right: none;
    box-shadow: var(--rnw-shadow-lg);
  }
  .rnw-sidebar.is-open { transform: translateX(0); }
  .rnw-sidebar.is-open ~ .rnw-sidebar-backdrop { display: block; }
  .rnw-main { margin-left: 0; }
  .rnw-topbar { padding: 0 18px; }
  .rnw-topbar__menu-btn { display: inline-flex; }
  .rnw-content { padding: 20px 18px 60px; }
}

/* ── Page header ─────────────────────────────────────────── */
.rnw-page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rnw-rule);
}
.rnw-page-header--plain {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 22px;
}
.rnw-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 600;
  color: var(--rnw-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 12px;
}
.rnw-kicker::before {
  content: ''; width: 18px; height: 1px;
  background: var(--rnw-ember);
}
.rnw-page-title {
  font-family: var(--rnw-font-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--rnw-ink);
  line-height: 1.04;
  font-variation-settings: 'opsz' 84, 'SOFT' 50;
}
.rnw-page-title em, .rnw-page-title__em {
  font-style: italic;
  color: var(--rnw-ember);
  font-variation-settings: 'opsz' 84, 'SOFT' 100;
}
.rnw-page-subtitle {
  font-size: 14px;
  color: var(--rnw-ink-2);
  margin-top: 8px;
  line-height: 1.55;
  max-width: 60ch;
}
.rnw-page-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: var(--rnw-ink-3);
}
.rnw-page-actions { display: flex; gap: 8px; align-items: center; }

.rnw-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--rnw-ink-3);
  text-decoration: none;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  transition: color 0.14s var(--rnw-ease);
}
.rnw-back-link:hover { color: var(--rnw-ember); }
.rnw-back-link svg { width: 12px; height: 12px; }

/* ── Cards ───────────────────────────────────────────────── */
.rnw-card {
  background: var(--rnw-card);
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius-lg);
  position: relative;
}
.rnw-card--padded { padding: 22px 24px; }
.rnw-card--soft { background: var(--rnw-card-soft); }
.rnw-card--quiet { background: transparent; border-color: var(--rnw-rule-soft); }

/* selvage: double rule signature on featured cards */
.rnw-card--selvage { padding-top: 26px; }
.rnw-card--selvage::before {
  content: '';
  position: absolute;
  top: 9px; left: 24px; right: 24px;
  height: 4px;
  border-top: 1px solid var(--rnw-ink);
  border-bottom: 1px solid var(--rnw-ink);
}

.rnw-card__header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--rnw-rule-soft);
  gap: 12px;
}
.rnw-card__title {
  font-family: var(--rnw-font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--rnw-ink);
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 30;
  line-height: 1.2;
}
.rnw-card__subtitle {
  font-size: 12px;
  color: var(--rnw-ink-3);
  margin-top: 4px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.rnw-card__body { padding: 18px 22px; }
.rnw-card__footer {
  padding: 14px 22px;
  border-top: 1px solid var(--rnw-rule-soft);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--rnw-card-soft);
  border-bottom-left-radius: var(--rnw-radius-lg);
  border-bottom-right-radius: var(--rnw-radius-lg);
  font-size: 12px;
  color: var(--rnw-ink-3);
}

/* ── Section heading (in-card) ───────────────────────────── */
.rnw-section-title {
  font-family: var(--rnw-font-display);
  font-size: 17px;
  font-weight: 400;
  color: var(--rnw-ink);
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 24;
}
.rnw-section-sub {
  font-size: 12.5px;
  color: var(--rnw-ink-2);
  margin-top: 4px;
  line-height: 1.55;
}

/* ── Hero (dashboard headline) ───────────────────────────── */
.rnw-hero {
  position: relative;
  background: var(--rnw-card);
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius-xl);
  padding: 28px 32px 24px;
  overflow: hidden;
}
.rnw-hero__rule {
  position: absolute;
  top: 0; left: 32px; right: 32px;
  height: 6px;
  display: flex; gap: 6px;
  pointer-events: none;
}
.rnw-hero__rule::before, .rnw-hero__rule::after {
  content: ''; flex: 1; background: var(--rnw-ink); height: 1px; align-self: flex-end;
}
.rnw-hero__rule::after { background: var(--rnw-ember); }
.rnw-hero__kicker {
  font-size: 10px; font-weight: 600;
  color: var(--rnw-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.rnw-hero__kicker .rnw-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rnw-success);
  position: relative;
}
.rnw-hero__kicker .rnw-pulse::after {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--rnw-success);
  animation: rnw-pulse 2.4s var(--rnw-ease) infinite;
}
@keyframes rnw-pulse {
  0%   { transform: scale(0.6); opacity: 0.8; }
  80%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
.rnw-hero__row {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) 1px 1fr;
  gap: 28px;
  align-items: stretch;
}
.rnw-hero__divider {
  background: linear-gradient(to bottom, transparent 0%, var(--rnw-rule) 18%, var(--rnw-rule) 82%, transparent 100%);
}
.rnw-hero__primary { display: flex; flex-direction: column; }
.rnw-hero__label {
  font-size: 12px;
  color: var(--rnw-ink-3);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.rnw-hero__value {
  font-family: var(--rnw-font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(56px, 8vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--rnw-ink);
  margin-top: 14px;
  font-variant-numeric: tabular-nums lining-nums;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  display: flex; align-items: baseline; gap: 8px;
}
.rnw-hero__value--ember { color: var(--rnw-ember); }
.rnw-hero__value-unit {
  font-family: var(--rnw-font-ui);
  font-style: normal;
  font-size: 0.28em;
  font-weight: 500;
  color: var(--rnw-ink-3);
  letter-spacing: 0;
  text-transform: uppercase;
  align-self: flex-start;
  padding-top: 0.6em;
  letter-spacing: 0.08em;
}
.rnw-hero__delta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--rnw-ink-2);
}
.rnw-hero__delta-mark {
  font-family: var(--rnw-font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--rnw-success-bg);
  color: var(--rnw-success);
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid var(--rnw-success-border);
}
.rnw-hero__delta-mark--neutral { background: var(--rnw-card-soft); color: var(--rnw-ink-3); border-color: var(--rnw-rule); }

.rnw-hero__secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
  align-content: center;
}
.rnw-hero__metric { display: flex; flex-direction: column; gap: 4px; }
.rnw-hero__metric-label {
  font-size: 10px; font-weight: 600;
  color: var(--rnw-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.rnw-hero__metric-value {
  font-family: var(--rnw-font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--rnw-ink);
  font-variant-numeric: tabular-nums lining-nums;
  font-variation-settings: 'opsz' 36;
  line-height: 1.1;
}
.rnw-hero__metric-foot {
  font-size: 11.5px;
  color: var(--rnw-ink-3);
  letter-spacing: -0.005em;
}
.rnw-hero__metric--alert .rnw-hero__metric-value { color: var(--rnw-ember); }
.rnw-hero__metric--info .rnw-hero__metric-value { color: var(--rnw-info); }

@media (max-width: 980px) {
  .rnw-hero__row { grid-template-columns: 1fr; }
  .rnw-hero__divider { width: 100%; height: 1px; background: var(--rnw-rule); }
}

/* ── KPI tiles (legacy + refined) ────────────────────────── */
.rnw-kpi {
  background: var(--rnw-card);
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius-lg);
  padding: 18px 20px 16px;
  position: relative;
  transition: border-color 0.16s var(--rnw-ease), transform 0.16s var(--rnw-ease);
}
.rnw-kpi:hover { border-color: var(--rnw-rule-strong); }
.rnw-kpi__label {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 600;
  color: var(--rnw-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.rnw-kpi__icon {
  width: 13px; height: 13px;
  color: var(--rnw-ink-4);
  stroke-width: 1.75;
}
.rnw-kpi__value {
  font-family: var(--rnw-font-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--rnw-ink);
  margin-top: 12px;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  font-variation-settings: 'opsz' 48, 'SOFT' 50;
}
.rnw-kpi__value--accent { color: var(--rnw-ember); font-style: italic; font-variation-settings: 'opsz' 48, 'SOFT' 100; }
.rnw-kpi__value--warn { color: var(--rnw-warn); }
.rnw-kpi__value--info { color: var(--rnw-info); }
.rnw-kpi__value--success { color: var(--rnw-success); }
.rnw-kpi__delta {
  font-size: 11.5px;
  color: var(--rnw-ink-3);
  margin-top: 8px;
  letter-spacing: -0.005em;
}
.rnw-kpi__delta--success { color: var(--rnw-success); }

.rnw-kpi-mini {
  display: flex; flex-direction: column;
  background: transparent;
  border: 1px solid var(--rnw-rule-soft);
  border-radius: var(--rnw-radius);
  padding: 11px 14px;
  transition: background 0.14s var(--rnw-ease);
}
.rnw-kpi-mini:hover { background: var(--rnw-card); }
.rnw-kpi-mini__label {
  font-size: 10px; font-weight: 600;
  color: var(--rnw-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.rnw-kpi-mini__value {
  font-family: var(--rnw-font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--rnw-ink);
  margin-top: 6px;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.025em;
  line-height: 1;
}

/* ── Buttons ─────────────────────────────────────────────── */
.rnw-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--rnw-radius);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 0.14s var(--rnw-ease),
              border-color 0.14s var(--rnw-ease),
              color 0.14s var(--rnw-ease),
              transform 0.14s var(--rnw-ease),
              box-shadow 0.14s var(--rnw-ease);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.rnw-btn:focus-visible { outline: none; box-shadow: var(--rnw-focus-ring); }
.rnw-btn:active { transform: translateY(1px); }
.rnw-btn:disabled, .rnw-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.rnw-btn svg { width: 13px; height: 13px; }

.rnw-btn--primary {
  background: var(--rnw-ink);
  color: var(--rnw-text-inverse);
  border-color: var(--rnw-ink);
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.06);
}
.rnw-btn--primary:hover { background: #000; border-color: #000; }

.rnw-btn--ember {
  background: var(--rnw-ember);
  color: #fff;
  border-color: var(--rnw-ember);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.rnw-btn--ember:hover { background: var(--rnw-ember-2); border-color: var(--rnw-ember-2); }

.rnw-btn--secondary {
  background: var(--rnw-card);
  color: var(--rnw-ink);
  border-color: var(--rnw-rule);
}
.rnw-btn--secondary:hover {
  background: var(--rnw-card-soft);
  border-color: var(--rnw-rule-strong);
}

.rnw-btn--ghost {
  background: transparent;
  color: var(--rnw-ink-2);
  border-color: transparent;
}
.rnw-btn--ghost:hover { background: var(--rnw-card-soft); color: var(--rnw-ink); }

.rnw-btn--success { background: var(--rnw-success); color: #fff; border-color: var(--rnw-success); }
.rnw-btn--success:hover { background: #3e552d; border-color: #3e552d; }
.rnw-btn--danger { background: var(--rnw-danger); color: #fff; border-color: var(--rnw-danger); }
.rnw-btn--danger:hover { background: #7e2113; border-color: #7e2113; }

.rnw-btn--sm { height: 28px; padding: 0 10px; font-size: 12px; gap: 5px; }
.rnw-btn--xs { height: 24px; padding: 0 8px; font-size: 11.5px; gap: 4px; }
.rnw-btn--xs svg, .rnw-btn--sm svg { width: 12px; height: 12px; }
.rnw-btn--block { width: 100%; }
.rnw-btn--lg { height: 42px; padding: 0 18px; font-size: 13.5px; }

/* ── Links ───────────────────────────────────────────────── */
.rnw-link {
  color: var(--rnw-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rnw-rule-strong);
  transition: border-color 0.14s var(--rnw-ease);
}
.rnw-link:hover { border-bottom-color: var(--rnw-ember); color: var(--rnw-ember); }
.rnw-link-muted {
  color: var(--rnw-ink-2);
  text-decoration: none;
  font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 4px;
  transition: color 0.14s var(--rnw-ease), gap 0.14s var(--rnw-ease);
}
.rnw-link-muted:hover { color: var(--rnw-ember); gap: 6px; }
.rnw-link-danger { color: var(--rnw-danger); text-decoration: none; font-size: 12.5px; }
.rnw-link-danger:hover { text-decoration: underline; }

/* ── Forms ───────────────────────────────────────────────── */
.rnw-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--rnw-ink);
  margin-bottom: 7px;
  letter-spacing: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rnw-label__sub {
  font-weight: 400;
  color: var(--rnw-ink-3);
  font-size: 11px;
  text-transform: none;
  letter-spacing: -0.005em;
  margin-left: 6px;
}
.rnw-label__req { color: var(--rnw-ember); margin-left: 3px; }

.rnw-help {
  font-size: 11.5px;
  color: var(--rnw-ink-3);
  margin-top: 6px;
  line-height: 1.55;
}

.rnw-input, .rnw-select, .rnw-textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: var(--rnw-card);
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius);
  font-size: 13px;
  color: var(--rnw-ink);
  font-family: inherit;
  transition: border-color 0.14s var(--rnw-ease), box-shadow 0.14s var(--rnw-ease), background 0.14s var(--rnw-ease);
}
.rnw-textarea { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.55; }
.rnw-input:hover, .rnw-select:hover, .rnw-textarea:hover { border-color: var(--rnw-rule-strong); }
.rnw-input:focus, .rnw-select:focus, .rnw-textarea:focus {
  outline: none;
  border-color: var(--rnw-ember);
  box-shadow: var(--rnw-focus-ring);
  background: var(--rnw-card);
}
.rnw-input::placeholder, .rnw-textarea::placeholder { color: var(--rnw-ink-4); }
.rnw-input:read-only, .rnw-input[disabled],
.rnw-select[disabled], .rnw-textarea[disabled] {
  background: var(--rnw-paper-2);
  color: var(--rnw-ink-3);
  cursor: not-allowed;
}
.rnw-input--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.rnw-input--mono { font-family: var(--rnw-font-mono); font-size: 12.5px; letter-spacing: 0; }

.rnw-input-static {
  display: flex; align-items: center;
  height: 36px; padding: 0 12px;
  background: var(--rnw-paper-2);
  border: 1px solid var(--rnw-rule-soft);
  border-radius: var(--rnw-radius);
  font-size: 13px;
  color: var(--rnw-ink-2);
}

.rnw-checkbox, .rnw-radio {
  width: 15px; height: 15px;
  accent-color: var(--rnw-ember);
  cursor: pointer;
}

.rnw-file { font-size: 12.5px; color: var(--rnw-ink-2); }
.rnw-file::file-selector-button {
  margin-right: 10px;
  padding: 5px 12px;
  background: var(--rnw-card);
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius);
  font-size: 12px; font-weight: 500;
  color: var(--rnw-ink);
  cursor: pointer;
  font-family: inherit;
}
.rnw-file::file-selector-button:hover { background: var(--rnw-card-soft); }

.rnw-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rnw-form-row--3 { grid-template-columns: repeat(3, 1fr); }
.rnw-form-row--full { grid-column: 1 / -1; }
.rnw-form-group { display: flex; flex-direction: column; gap: 0; }

.rnw-fieldset {
  background: var(--rnw-card);
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius-lg);
  padding: 22px 24px;
}
.rnw-fieldset__title {
  font-family: var(--rnw-font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--rnw-ink);
  margin-bottom: 4px;
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 30;
}
.rnw-fieldset__sub {
  font-size: 12.5px;
  color: var(--rnw-ink-3);
  margin-bottom: 18px;
  line-height: 1.55;
}
.rnw-fieldset__body { display: flex; flex-direction: column; gap: 16px; }

.rnw-form-actions {
  display: flex; align-items: center; gap: 8px;
  padding-top: 6px;
}

@media (max-width: 1024px) {
  .rnw-form-row, .rnw-form-row--3 { grid-template-columns: 1fr; }
}

/* ── Tables ──────────────────────────────────────────────── */
.rnw-table-wrap {
  background: var(--rnw-card);
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius-lg);
  overflow: hidden;
}
.rnw-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.rnw-table thead th {
  position: sticky; top: 0;
  background: var(--rnw-card-soft);
  border-bottom: 1px solid var(--rnw-rule);
  padding: 10px 16px;
  font-size: 10px;
  font-weight: 600;
  color: var(--rnw-ink-3);
  text-align: left;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.rnw-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--rnw-rule-soft);
  vertical-align: middle;
  position: relative;
}
.rnw-table tbody tr:last-child td { border-bottom: none; }
.rnw-table tbody tr {
  transition: background 0.12s var(--rnw-ease);
  position: relative;
}
.rnw-table tbody tr td:first-child {
  position: relative;
  border-left: 2px solid transparent;
  transition: border-color 0.16s var(--rnw-ease);
}
.rnw-table tbody tr:hover {
  background: var(--rnw-card-soft);
}
.rnw-table tbody tr:hover td:first-child {
  border-left-color: var(--rnw-ember);
}
.rnw-table tbody tr.is-clickable { cursor: pointer; }
.rnw-table .text-right { text-align: right; }
.rnw-table .text-center { text-align: center; }
.rnw-table .num {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum';
}
.rnw-table .mono {
  font-family: var(--rnw-font-mono);
  font-size: 12px;
  letter-spacing: 0;
}

/* ── Empty state ─────────────────────────────────────────── */
.rnw-empty {
  padding: 60px 28px;
  text-align: center;
  color: var(--rnw-ink-2);
  position: relative;
}
.rnw-empty__icon {
  width: 36px; height: 36px;
  margin: 0 auto 16px;
  color: var(--rnw-ink-4);
  stroke-width: 1.4;
}
.rnw-empty__ornament {
  font-family: var(--rnw-font-mono);
  color: var(--rnw-ink-4);
  font-size: 14px;
  margin: 0 auto 14px;
  letter-spacing: 0.18em;
  line-height: 1;
  user-select: none;
}
.rnw-empty__title {
  font-family: var(--rnw-font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--rnw-ink);
  margin-bottom: 6px;
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 28;
}
.rnw-empty__desc {
  font-size: 12.5px;
  color: var(--rnw-ink-3);
  max-width: 36ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Status badges (industrial stamp style) ─────────────── */
.rnw-badge {
  display: inline-flex; align-items: center;
  gap: 6px;
  padding: 2px 9px 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
  line-height: 1.55;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  position: relative;
  overflow: hidden;
}
.rnw-badge::before {
  content: '';
  width: 4px;
  align-self: stretch;
  margin: -2px 4px -2px -7px;
  background: currentColor;
  border-radius: 0;
  flex-shrink: 0;
  opacity: 1;
  height: auto;
}
.rnw-badge--solid { border: 1px solid var(--rnw-rule); background: var(--rnw-card); }
.rnw-badge--neutral { background: var(--rnw-card-soft); color: var(--rnw-ink-2); border-color: var(--rnw-rule); }
.rnw-badge--success { background: var(--rnw-success-bg); color: var(--rnw-success); border-color: var(--rnw-success-border); }
.rnw-badge--warn    { background: var(--rnw-warn-bg);    color: var(--rnw-warn);    border-color: var(--rnw-warn-border); }
.rnw-badge--danger  { background: var(--rnw-danger-bg);  color: var(--rnw-danger);  border-color: var(--rnw-danger-border); }
.rnw-badge--info    { background: var(--rnw-info-bg);    color: var(--rnw-info);    border-color: var(--rnw-info-border); }
.rnw-badge--accent  { background: var(--rnw-ember-soft); color: var(--rnw-ember);   border-color: var(--rnw-accent-border); }
.rnw-badge--muted   {
  background: transparent;
  color: var(--rnw-ink-3);
  border: 1px solid var(--rnw-rule);
}
.rnw-badge--shipped {
  background: rgba(72, 51, 122, 0.10);
  color: #4a3578;
  border-color: rgba(72, 51, 122, 0.22);
}
.rnw-badge--delivered { background: var(--rnw-success-bg); color: var(--rnw-success); border-color: var(--rnw-success-border); }
.rnw-badge--bare { padding: 2px 9px; }
.rnw-badge--bare::before { display: none; }

/* ── Alerts ─────────────────────────────────────────────── */
.rnw-alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--rnw-radius);
  border: 1px solid;
  font-size: 13px;
  line-height: 1.55;
  position: relative;
  background: var(--rnw-card);
}
.rnw-alert::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: currentColor;
  border-radius: 3px 0 0 3px;
  opacity: 1;
}
.rnw-alert__icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.rnw-alert__body { flex: 1; }
.rnw-alert__title { font-weight: 600; margin-bottom: 2px; }
.rnw-alert--success { background: var(--rnw-success-bg); color: var(--rnw-success); border-color: var(--rnw-success-border); }
.rnw-alert--warn    { background: var(--rnw-warn-bg);    color: var(--rnw-warn);    border-color: var(--rnw-warn-border); }
.rnw-alert--danger  { background: var(--rnw-danger-bg);  color: var(--rnw-danger);  border-color: var(--rnw-danger-border); }
.rnw-alert--info    { background: var(--rnw-info-bg);    color: var(--rnw-info);    border-color: var(--rnw-info-border); }
.rnw-alert--success .rnw-alert__body, .rnw-alert--warn .rnw-alert__body,
.rnw-alert--danger .rnw-alert__body, .rnw-alert--info .rnw-alert__body { color: var(--rnw-ink); }

/* ── Pills / Filter tabs ─────────────────────────────────── */
.rnw-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.rnw-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  background: transparent;
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--rnw-ink-2);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.14s var(--rnw-ease);
  letter-spacing: -0.005em;
}
.rnw-pill:hover {
  background: var(--rnw-card);
  border-color: var(--rnw-rule-strong);
  color: var(--rnw-ink);
}
.rnw-pill.is-active {
  background: var(--rnw-ink);
  color: var(--rnw-text-inverse);
  border-color: var(--rnw-ink);
}

/* ── Avatar / thumb ──────────────────────────────────────── */
.rnw-avatar {
  display: grid; place-items: center;
  background: var(--rnw-card-soft);
  color: var(--rnw-ink-2);
  border: 1px solid var(--rnw-rule);
  border-radius: 50%;
  font-weight: 600;
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: 0;
}
.rnw-thumb {
  background: var(--rnw-card-soft);
  border-radius: var(--rnw-radius);
  border: 1px solid var(--rnw-rule);
  object-fit: cover;
}
.rnw-thumb-empty {
  background: var(--rnw-card-soft);
  border: 1px dashed var(--rnw-rule);
  border-radius: var(--rnw-radius);
  display: grid; place-items: center;
  color: var(--rnw-ink-3);
  font-size: 10.5px;
}

/* ── Tailwind status color overrides (legacy) ───────────── */
.bg-amber-100   { background: var(--rnw-warn-bg)    !important; border: 1px solid var(--rnw-warn-border)    !important; }
.text-amber-700 { color: var(--rnw-warn)            !important; }
.bg-emerald-100 { background: var(--rnw-success-bg) !important; border: 1px solid var(--rnw-success-border) !important; }
.text-emerald-700 { color: var(--rnw-success)       !important; }
.bg-blue-100    { background: var(--rnw-info-bg)    !important; border: 1px solid var(--rnw-info-border)    !important; }
.text-blue-700  { color: var(--rnw-info)            !important; }
.bg-indigo-100  { background: rgba(72, 51, 122, 0.10) !important; border: 1px solid rgba(72, 51, 122, 0.22) !important; }
.text-indigo-700 { color: #4a3578                   !important; }
.bg-emerald-200 { background: var(--rnw-success-bg) !important; border: 1px solid var(--rnw-success-border) !important; }
.text-emerald-800 { color: var(--rnw-success)       !important; }
.bg-red-100     { background: var(--rnw-danger-bg)  !important; border: 1px solid var(--rnw-danger-border)  !important; }
.text-red-700   { color: var(--rnw-danger)          !important; }
.bg-slate-200, .bg-slate-100 {
  background: var(--rnw-card-soft) !important;
  border: 1px solid var(--rnw-rule) !important;
}
.text-slate-600 { color: var(--rnw-ink-2) !important; }

.bg-amber-100, .bg-emerald-100, .bg-blue-100, .bg-indigo-100, .bg-emerald-200,
.bg-red-100, .bg-slate-200, .bg-slate-100 {
  border-radius: 3px !important;
  font-weight: 600 !important;
  font-size: 10.5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 2px 8px !important;
  display: inline-block !important;
}

/* ── Chip system ─────────────────────────────────────────── */
.rnw-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px; font-weight: 500;
  background: var(--rnw-ink); color: var(--rnw-text-inverse);
  letter-spacing: -0.005em;
}
.rnw-chip__remove { cursor: pointer; opacity: 0.6; font-size: 13px; line-height: 1; }
.rnw-chip__remove:hover { opacity: 1; }
.rnw-preset {
  padding: 3px 10px;
  border-radius: 3px;
  background: transparent;
  border: 1px solid var(--rnw-rule);
  font-size: 11.5px; cursor: pointer;
  color: var(--rnw-ink-2);
  font-family: inherit;
  transition: all 0.12s var(--rnw-ease);
  letter-spacing: -0.005em;
}
.rnw-preset:hover { background: var(--rnw-card-soft); border-color: var(--rnw-rule-strong); color: var(--rnw-ink); }
.rnw-preset.is-selected { background: var(--rnw-ink); color: var(--rnw-text-inverse); border-color: var(--rnw-ink); opacity: 0.4; cursor: not-allowed; }

/* ── Dot ─────────────────────────────────────────────────── */
.rnw-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--rnw-ink-3); }
.rnw-dot--success { background: var(--rnw-success); }
.rnw-dot--warn    { background: var(--rnw-warn); }
.rnw-dot--danger  { background: var(--rnw-danger); }
.rnw-dot--info    { background: var(--rnw-info); }
.rnw-dot--ember   { background: var(--rnw-ember); }

/* ── Activity timeline ───────────────────────────────────── */
.rnw-timeline {
  position: relative;
  padding-left: 22px;
}
.rnw-timeline::before {
  content: ''; position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 1px; background: var(--rnw-rule);
}
.rnw-timeline__item {
  position: relative;
  padding-bottom: 14px;
}
.rnw-timeline__item::before {
  content: '';
  position: absolute;
  left: -22px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--rnw-card);
  border: 1.5px solid var(--rnw-ink-4);
}
.rnw-timeline__item--active::before {
  border-color: var(--rnw-ember);
  background: var(--rnw-ember);
  box-shadow: 0 0 0 3px var(--rnw-ember-soft);
}
.rnw-timeline__time {
  font-family: var(--rnw-font-mono);
  font-size: 10.5px;
  color: var(--rnw-ink-3);
  letter-spacing: 0;
}

/* ── Info list (definition pairs) ────────────────────────── */
.rnw-info-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
}
.rnw-info-list--3 { grid-template-columns: repeat(3, 1fr); }
.rnw-info-list dt {
  font-size: 10px;
  color: var(--rnw-ink-3);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.rnw-info-list dd {
  font-size: 13.5px;
  color: var(--rnw-ink);
  line-height: 1.45;
}

/* ── Search ──────────────────────────────────────────────── */
.rnw-search {
  position: relative;
  display: inline-flex; align-items: center;
  width: 320px; max-width: 100%;
}
.rnw-search__icon {
  position: absolute;
  left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--rnw-ink-3);
  width: 14px; height: 14px;
  pointer-events: none;
}
.rnw-search__input {
  height: 34px; width: 100%;
  padding: 0 12px 0 32px;
  background: var(--rnw-card);
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius);
  font-size: 13px;
  color: var(--rnw-ink);
}
.rnw-search__input:focus {
  outline: none;
  border-color: var(--rnw-ember);
  box-shadow: var(--rnw-focus-ring);
}
.rnw-search__kbd {
  position: absolute;
  right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--rnw-font-mono);
  font-size: 10px;
  color: var(--rnw-ink-3);
  background: var(--rnw-paper-2);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--rnw-rule);
  pointer-events: none;
}

/* ── Auth (login) ────────────────────────────────────────── */
.rnw-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--rnw-paper);
  position: relative;
  z-index: 2;
}
.rnw-auth-aside {
  background: var(--rnw-side-bg);
  color: var(--rnw-side-active-fg);
  padding: 56px 56px 40px;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.rnw-auth-aside::before {
  /* warp/weft pattern */
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(255,240,210,0.03) 31px 32px),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(255,240,210,0.03) 31px 32px);
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
  pointer-events: none;
}
.rnw-auth-aside::after {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--rnw-ember) 24%, var(--rnw-ember) 76%, transparent 100%);
  opacity: 0.5;
}
.rnw-auth-aside__brand {
  display: flex; align-items: center; gap: 14px;
  position: relative; z-index: 1;
}
.rnw-auth-aside__copy {
  margin-top: auto;
  position: relative; z-index: 1;
  max-width: 420px;
}
.rnw-auth-aside__kicker {
  font-size: 10px; font-weight: 600;
  color: var(--rnw-ember);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 10px;
}
.rnw-auth-aside__kicker::before {
  content: ''; width: 24px; height: 1px; background: var(--rnw-ember);
}
.rnw-auth-aside__headline {
  font-family: var(--rnw-font-display);
  font-size: clamp(36px, 4.4vw, 52px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--rnw-side-active-fg);
  font-variation-settings: 'opsz' 96, 'SOFT' 60;
}
.rnw-auth-aside__headline em {
  font-style: italic;
  color: var(--rnw-ember);
  font-variation-settings: 'opsz' 96, 'SOFT' 100;
}
.rnw-auth-aside__sub {
  margin-top: 18px;
  font-size: 14px;
  color: var(--rnw-side-fg);
  line-height: 1.65;
  max-width: 44ch;
}
.rnw-auth-aside__foot {
  margin-top: 32px;
  font-family: var(--rnw-font-mono);
  font-size: 10.5px;
  color: var(--rnw-side-fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  display: flex; align-items: center; gap: 10px;
}
.rnw-auth-aside__foot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--rnw-ember);
  box-shadow: 0 0 0 3px var(--rnw-ember-soft);
}

.rnw-auth-pane {
  display: grid; place-items: center;
  padding: 40px 32px;
}
.rnw-auth-card {
  width: 100%;
  max-width: 400px;
}
.rnw-auth-brand {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 32px;
}
.rnw-auth-brand__logo {
  width: 32px; height: 32px;
  background: var(--rnw-ink);
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--rnw-ember);
  position: relative;
  flex-shrink: 0;
}
.rnw-auth-brand__logo::before, .rnw-auth-brand__logo::after {
  content: ''; position: absolute; background: var(--rnw-ember);
}
.rnw-auth-brand__logo::before {
  width: 1.6px; height: 16px;
  left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(20deg);
}
.rnw-auth-brand__logo::after {
  width: 16px; height: 1.6px;
  left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(20deg);
}
.rnw-auth-title {
  font-family: var(--rnw-font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--rnw-ink);
  letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 60, 'SOFT' 50;
  line-height: 1.05;
}
.rnw-auth-sub {
  font-size: 14px;
  color: var(--rnw-ink-2);
  margin-top: 10px;
  margin-bottom: 28px;
  line-height: 1.55;
}
@media (max-width: 900px) {
  .rnw-auth-shell { grid-template-columns: 1fr; }
  .rnw-auth-aside { display: none; }
}

/* ── Util ────────────────────────────────────────────────── */
.rnw-divider { height: 1px; background: var(--rnw-rule-soft); margin: 16px 0; border: 0; }
.rnw-divider--strong { background: var(--rnw-rule); }
.rnw-text-mono { font-family: var(--rnw-font-mono); }
.rnw-text-display { font-family: var(--rnw-font-display); font-variation-settings: 'opsz' 30; letter-spacing: -0.015em; }
.rnw-text-secondary { color: var(--rnw-ink-2); }
.rnw-text-tertiary { color: var(--rnw-ink-3); }
.rnw-text-success { color: var(--rnw-success); }
.rnw-text-warn { color: var(--rnw-warn); }
.rnw-text-danger { color: var(--rnw-danger); }
.rnw-text-info { color: var(--rnw-info); }
.rnw-text-ember { color: var(--rnw-ember); }
.rnw-num { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'tnum'; }

/* ── Tabs ────────────────────────────────────────────────── */
.rnw-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--rnw-rule);
  margin-bottom: 22px;
}
.rnw-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--rnw-ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.14s var(--rnw-ease), border-color 0.14s var(--rnw-ease);
  letter-spacing: -0.005em;
}
.rnw-tab:hover { color: var(--rnw-ink); }
.rnw-tab.is-active {
  color: var(--rnw-ember);
  border-bottom-color: var(--rnw-ember);
}

/* ── Detail grid (split layout) ──────────────────────────── */
.rnw-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
.rnw-detail-aside {
  position: sticky;
  top: calc(var(--rnw-topbar-h) + 18px);
}
@media (max-width: 1024px) {
  .rnw-detail-grid { grid-template-columns: 1fr; gap: 18px; }
  .rnw-detail-aside { position: static; }
}

/* ── Matrix tables ───────────────────────────────────────── */
.rnw-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.rnw-matrix th, .rnw-matrix td {
  border: 1px solid var(--rnw-rule-soft);
  padding: 7px 10px;
  text-align: left;
}
.rnw-matrix thead th {
  background: var(--rnw-card-soft);
  font-weight: 600;
  color: var(--rnw-ink-3);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.rnw-matrix input, .rnw-matrix select {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--rnw-rule);
  border-radius: 3px;
  font-size: 12px;
  background: var(--rnw-card);
  font-family: inherit;
  color: var(--rnw-ink);
}
.rnw-matrix input:focus, .rnw-matrix select:focus {
  outline: none;
  border-color: var(--rnw-ember);
  box-shadow: 0 0 0 2px var(--rnw-ember-soft);
}

/* ── Origin row (shared) ─────────────────────────────────── */
.rnw-origin-row {
  background: var(--rnw-card-soft);
  border: 1px solid var(--rnw-rule-soft);
  padding: 12px 14px;
  border-radius: var(--rnw-radius);
}
.rnw-origin-row .rnw-input { background: var(--rnw-card); }

/* hide native number arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }

/* ── Sparkline (CSS-only bar pattern) ────────────────────── */
.rnw-spark {
  display: inline-flex; align-items: flex-end;
  gap: 2px;
  height: 18px;
}
.rnw-spark__bar {
  width: 3px;
  background: var(--rnw-ink-4);
  border-radius: 1px;
  opacity: 0.6;
}
.rnw-spark__bar--ember { background: var(--rnw-ember); opacity: 1; }

/* ── Page enter animation ────────────────────────────────── */
@keyframes rnw-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rnw-content > *,
.rnw-auth-card > * {
  animation: rnw-fade-in 0.36s var(--rnw-ease) backwards;
}
.rnw-content > *:nth-child(1) { animation-delay: 0.02s; }
.rnw-content > *:nth-child(2) { animation-delay: 0.06s; }
.rnw-content > *:nth-child(3) { animation-delay: 0.10s; }
.rnw-content > *:nth-child(4) { animation-delay: 0.14s; }
.rnw-content > *:nth-child(5) { animation-delay: 0.18s; }
.rnw-content > *:nth-child(6) { animation-delay: 0.22s; }
.rnw-content > *:nth-child(7) { animation-delay: 0.26s; }
@media (prefers-reduced-motion: reduce) {
  .rnw-content > *, .rnw-auth-card > * { animation: none; }
  .rnw-hero__kicker .rnw-pulse::after { animation: none; }
}

/* ── Order list (dashboard custom rows) ──────────────────── */
.rnw-orderline {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  padding: 14px 22px;
  border-top: 1px solid var(--rnw-rule-soft);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background 0.12s var(--rnw-ease);
}
.rnw-orderline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.16s var(--rnw-ease);
}
.rnw-orderline:hover { background: var(--rnw-card-soft); }
.rnw-orderline:hover::before { background: var(--rnw-ember); }
.rnw-orderline__num {
  font-family: var(--rnw-font-mono);
  font-size: 11px;
  color: var(--rnw-ink-3);
  letter-spacing: 0;
  align-self: start;
  padding-top: 1px;
}
.rnw-orderline__title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--rnw-ink);
  letter-spacing: -0.005em;
  display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap;
}
.rnw-orderline__meta {
  font-size: 11.5px;
  color: var(--rnw-ink-3);
  margin-top: 4px;
  display: flex; align-items: center; gap: 10px;
}
.rnw-orderline__meta span + span::before {
  content: '·';
  margin-right: 8px;
  color: var(--rnw-ink-4);
}
.rnw-orderline__amount {
  font-family: var(--rnw-font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--rnw-ink);
  font-variant-numeric: tabular-nums lining-nums;
  font-variation-settings: 'opsz' 24;
  letter-spacing: -0.02em;
  line-height: 1;
  align-self: center;
}

/* ── Quick-action card ───────────────────────────────────── */
.rnw-action-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--rnw-card);
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius-lg);
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s var(--rnw-ease), background 0.18s var(--rnw-ease);
}
.rnw-action-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--rnw-ember);
  transform: translateY(2px);
  transition: transform 0.18s var(--rnw-ease);
}
.rnw-action-card:hover {
  border-color: var(--rnw-rule-strong);
  background: var(--rnw-card);
}
.rnw-action-card:hover::after { transform: translateY(0); }
.rnw-action-card__icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--rnw-card-soft);
  border: 1px solid var(--rnw-rule);
  border-radius: var(--rnw-radius);
  color: var(--rnw-ink-2);
  margin-bottom: 14px;
}
.rnw-action-card__icon svg { width: 14px; height: 14px; }
.rnw-action-card__title {
  font-family: var(--rnw-font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--rnw-ink);
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 28;
  line-height: 1.2;
}
.rnw-action-card__sub {
  font-size: 12.5px;
  color: var(--rnw-ink-2);
  margin-top: 4px;
  line-height: 1.5;
}
.rnw-action-card__arrow {
  font-family: var(--rnw-font-mono);
  font-size: 12px;
  color: var(--rnw-ink-3);
  margin-top: 16px;
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap 0.16s var(--rnw-ease), color 0.16s var(--rnw-ease);
}
.rnw-action-card:hover .rnw-action-card__arrow { color: var(--rnw-ember); gap: 8px; }

/* ── Stat strip (system status sidebar block) ────────────── */
.rnw-stat-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--rnw-rule-soft);
  gap: 12px;
}
.rnw-stat-row:last-child { border-bottom: none; }
.rnw-stat-row__label {
  font-size: 10.5px; font-weight: 600;
  color: var(--rnw-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.rnw-stat-row__value {
  font-family: var(--rnw-font-mono);
  font-size: 12px;
  color: var(--rnw-ink);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ── Ornaments (textile motifs) ──────────────────────────── */
.rnw-ornament-rule {
  display: flex; align-items: center; gap: 12px;
  font-size: 10px; font-weight: 600;
  color: var(--rnw-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 24px 0 16px;
}
.rnw-ornament-rule::before, .rnw-ornament-rule::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--rnw-rule);
}
