/* =========================================================================
   FlooringID — Redesign ("Material" direction)
   Warm, architectural identity rooted in the flooring business.
   Instrument Serif (display) · Schibsted Grotesk (UI) · Space Mono (technical)
   ========================================================================= */

:root {
  /* --- Warm neutral canvas --- */
  --paper:        #f3eee5;   /* bone canvas */
  --paper-2:      #ece5d8;   /* deeper inset */
  --surface:      #fffdf9;   /* card */
  --surface-2:    #faf6ef;   /* subtle raised */

  /* --- Warm ink --- */
  --ink:          #241f18;
  --ink-soft:     #6c6356;
  --ink-faint:    #9c9385;

  /* --- Lines --- */
  --line:         #e4dccd;
  --line-strong:  #d4c9b5;

  /* --- Brand: clay / terracotta --- */
  --clay:         #c2602f;
  --clay-deep:    #a44d23;
  --clay-bright:  #d9763f;
  --clay-tint:    rgba(194, 96, 47, .10);
  --clay-tint-2:  rgba(194, 96, 47, .18);

  /* --- Espresso dark brand surface --- */
  --espresso:     #231d16;
  --espresso-2:   #2d261d;
  --espresso-3:   #3a3225;
  --on-dark:      #f0e9dc;
  --on-dark-soft: #b6ab98;

  /* --- Functional (kept warm) --- */
  --success:      #2f7d54;
  --success-tint: rgba(47, 125, 84, .12);
  --warn:         #b07d18;
  --warn-tint:    rgba(176, 125, 24, .14);
  --danger:       #c0392b;
  --danger-tint:  rgba(192, 57, 43, .10);

  /* --- Accent hue knob (set by tweaks) --- */
  --accent:       var(--clay);

  --r-card: 14px;
  --r-ctl:  9px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(45, 35, 20, .05), 0 1px 3px rgba(45, 35, 20, .04);
  --shadow:    0 1px 3px rgba(45, 35, 20, .06), 0 10px 30px -12px rgba(45, 35, 20, .14);
  --shadow-lg: 0 4px 12px rgba(45, 35, 20, .08), 0 24px 60px -20px rgba(45, 35, 20, .26);

  --font-ui:      "Schibsted Grotesk", -apple-system, system-ui, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-mono:    "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(.32, .72, 0, 1);
}

* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { height: 100%; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0; }
button { font-family: inherit; }

/* Editorial serif display */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.0;
}

/* Mono micro-label */
.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

/* =========================================================================
   Texture: faint plank / parquet signature
   ========================================================================= */
.tex-planks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--tex-opacity, 1);
  background-image:
    repeating-linear-gradient(90deg,
      rgba(255,255,255,.018) 0 1px, transparent 1px 132px),
    repeating-linear-gradient(0deg,
      rgba(0,0,0,.10) 0 1px, transparent 1px 44px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.35));
          mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.35));
}
.tex-herringbone {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--tex-opacity, 1);
  background-image:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,.05) 0 2px, transparent 2px 18px),
    repeating-linear-gradient(-45deg,
      rgba(0,0,0,.06) 0 2px, transparent 2px 18px);
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  --bg: var(--surface);
  --bd: var(--line-strong);
  --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  font-size: .92rem; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.1;
  padding: .62rem 1.05rem;
  border-radius: var(--r-ctl);
  border: 1px solid var(--bd);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform .12s var(--ease), background .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--clay-tint-2); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  --bg: var(--accent); --bd: var(--accent); --fg: #fff;
  box-shadow: 0 1px 2px rgba(45,35,20,.12), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { --bg: var(--clay-deep); --bd: var(--clay-deep); }

.btn-dark { --bg: var(--espresso); --bd: var(--espresso); --fg: var(--on-dark); }
.btn-dark:hover { --bg: var(--espresso-2); }

.btn-ghost { --bg: transparent; --bd: transparent; --fg: var(--ink-soft); }
.btn-ghost:hover { background: rgba(45,35,20,.05); color: var(--ink); }

.btn-danger { --bg: transparent; --bd: var(--line-strong); --fg: var(--danger); }
.btn-danger:hover { background: var(--danger-tint); border-color: rgba(192,57,43,.4); }

.btn-block { display: flex; width: 100%; }
.btn-sm { padding: .4rem .72rem; font-size: .82rem; }
.btn-lg { padding: .8rem 1.3rem; font-size: 1rem; }

/* =========================================================================
   Fields
   ========================================================================= */
.field { margin-bottom: 1.05rem; }
.field > label {
  display: block; font-size: .8rem; font-weight: 600; color: var(--ink);
  margin-bottom: .4rem; letter-spacing: -0.01em;
}
.input {
  width: 100%; font-family: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl); padding: .7rem .8rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input::placeholder { color: var(--ink-faint); }
.input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--clay-tint);
}
.input:disabled { background: var(--paper-2); color: var(--ink-soft); cursor: not-allowed; }
.field.has-error .input { border-color: var(--danger); }
.field.has-error .input:focus { box-shadow: 0 0 0 3px var(--danger-tint); }
.field-error { display: block; color: var(--danger); font-size: .78rem; margin-top: .35rem; min-height: 1em; }
.field-hint { display: block; color: var(--ink-soft); font-size: .78rem; margin-top: .35rem; }

/* code input (2FA) */
.code-input {
  font-family: var(--font-mono); font-size: 1.7rem; letter-spacing: .5em;
  text-align: center; padding-left: .5em;
  caret-color: var(--accent);
}

/* =========================================================================
   Pills / tags
   ========================================================================= */
.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .7rem; font-weight: 700; line-height: 1; letter-spacing: .01em;
  padding: .32rem .56rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-soft);
}
.pill-admin   { background: var(--clay-tint); border-color: var(--clay-tint-2); color: var(--clay-deep); }
.pill-member  { background: var(--paper-2); border-color: var(--line); color: var(--ink-soft); }
.pill-active  { background: var(--success-tint); border-color: rgba(47,125,84,.28); color: var(--success); }
.pill-invited { background: var(--warn-tint); border-color: rgba(176,125,24,.3); color: var(--warn); }
.pill-disabled{ background: var(--danger-tint); border-color: rgba(192,57,43,.25); color: var(--danger); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tag {
  font-family: var(--font-mono);
  font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .16rem .4rem; border-radius: 5px; white-space: nowrap;
}
.tag-master   { background: var(--warn-tint); color: var(--warn); }
.tag-platform { background: var(--clay-tint); color: var(--clay-deep); }

/* =========================================================================
   Avatar
   ========================================================================= */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  font-family: var(--font-ui); font-size: .85rem; font-weight: 700; color: #fff;
  flex: none; user-select: none; letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 1px rgba(0,0,0,.06);
}
.avatar-sm { width: 32px; height: 32px; border-radius: 9px; font-size: .72rem; }
.avatar-lg { width: 64px; height: 64px; border-radius: 16px; font-size: 1.3rem; }
.avatar-xl { width: 88px; height: 88px; border-radius: 20px; font-size: 1.9rem; }

/* =========================================================================
   Cards
   ========================================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.4rem; }

/* =========================================================================
   Toasts
   ========================================================================= */
.toast-wrap {
  position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: .5rem; z-index: 4000;
  width: min(420px, calc(100vw - 2rem));
}
.toast {
  display: flex; align-items: center; gap: .65rem;
  background: var(--espresso); color: var(--on-dark);
  border-radius: var(--r-ctl); padding: .7rem .9rem;
  font-size: .88rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in .32s var(--ease);
}
.toast .tdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.toast.success .tdot { background: #5cc98b; }
.toast.error   .tdot { background: #e07a6d; }
.toast.info    .tdot { background: var(--clay-bright); }
.toast.out { animation: toast-out .25s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px); } }

/* =========================================================================
   Modal
   ========================================================================= */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(35, 29, 22, .42);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 3000; animation: fade-in .18s ease;
}
.modal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 440px; overflow: hidden;
  animation: modal-pop .28s var(--ease);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.3rem .4rem;
}
.modal-body { padding: .6rem 1.3rem 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: 1.2rem 1.3rem; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* =========================================================================
   Spinner
   ========================================================================= */
.spinner {
  display: inline-block; width: 1em; height: 1em;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .6s linear infinite; vertical-align: -.15em;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================================
   Topbar (app shell)
   ========================================================================= */
.app-shell { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; width: 100%;
  padding: .7rem 1.4rem;
  display: flex; align-items: center; gap: 1rem;
}
.topbar-nav { display: flex; align-items: center; gap: .15rem; margin-left: .5rem; }
.topbar-nav a {
  padding: .42rem .8rem; border-radius: 8px;
  color: var(--ink-soft); font-size: .9rem; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background .12s, color .12s;
}
.topbar-nav a:hover { background: rgba(45,35,20,.05); color: var(--ink); }
.topbar-nav a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.userchip {
  display: flex; align-items: center; gap: .6rem; cursor: pointer;
  padding: .25rem .25rem .25rem .7rem; border-radius: var(--r-pill);
  border: 1px solid transparent; transition: border-color .12s, background .12s;
}
.userchip:hover { border-color: var(--line); background: var(--surface); }
.userchip .ue { font-size: .85rem; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 2rem 1.4rem 6rem; flex: 1; }

.route-fade { animation: route-fade .34s var(--ease); }
@keyframes route-fade { from { transform: translateY(8px); } to { transform: none; } }

/* logo lockup */
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: inherit; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--accent); position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.logo-mark::before, .logo-mark::after {
  content: ""; position: absolute; background: rgba(255,255,255,.34);
}
.logo-mark::before { left: 0; right: 0; top: 50%; height: 1.5px; }
.logo-mark::after  { top: 0; bottom: 0; left: 33.33%; width: 1.5px;
  box-shadow: 9px 0 0 rgba(255,255,255,.34); }
.logo-word { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.03em; }
.logo-word b { color: var(--accent); font-weight: 700; }
.logo-lg .logo-mark { width: 40px; height: 40px; border-radius: 11px; }
.logo-lg .logo-word { font-size: 1.4rem; }

/* on dark */
.on-dark .logo-word { color: var(--on-dark); }
.on-dark .logo-word b { color: var(--clay-bright); }

/* =========================================================================
   Utility
   ========================================================================= */
.hidden { display: none !important; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; align-items: center; gap: .5rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); border: 0; margin: 1.25rem 0; }

/* =========================================================================
   Segmented control
   ========================================================================= */
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-ctl);
}
.seg-btn {
  border: 0; background: transparent; cursor: pointer;
  padding: .42rem .85rem; border-radius: 7px;
  font-size: .85rem; font-weight: 600; color: var(--ink-soft);
  transition: background .15s var(--ease), color .15s ease, box-shadow .15s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* =========================================================================
   Toggle switch
   ========================================================================= */
.toggle {
  width: 44px; height: 26px; border-radius: 999px; border: 0; padding: 0;
  background: var(--line-strong); cursor: pointer; position: relative;
  transition: background .2s var(--ease); flex: none;
}
.toggle.on { background: var(--accent); }
.toggle-knob {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .22s var(--ease);
}
.toggle.on .toggle-knob { transform: translateX(18px); }

/* =========================================================================
   Auth split layout
   ========================================================================= */
.auth-split { min-height: 100%; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand {
  position: relative; overflow: hidden;
  background: var(--espresso); color: var(--on-dark);
  padding: 2.4rem 2.6rem; display: flex; flex-direction: column;
}
.auth-brand-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(217,118,63,.30), transparent 55%),
    radial-gradient(80% 70% at 100% 100%, rgba(217,118,63,.14), transparent 60%);
}
.auth-brand-body { position: relative; margin-top: auto; max-width: 30ch; }
.auth-brand-eyebrow { color: var(--clay-bright); }
.auth-brand h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.12; margin: .8rem 0 0; color: var(--on-dark); }
.auth-brand p { color: var(--on-dark-soft); margin-top: 1.5rem; font-size: .98rem; line-height: 1.55; }
.auth-stat-row { position: relative; display: flex; gap: 2rem; margin-top: 1.8rem; }
.auth-stat .n { font-family: var(--font-display); font-size: 2rem; color: var(--on-dark); line-height: 1; }
.auth-stat .l { font-size: .8rem; color: var(--on-dark-soft); margin-top: .3rem; }

.auth-pane {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.4rem; background: var(--paper);
}
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 1.6rem; letter-spacing: -0.03em; }
.auth-card .sub { color: var(--ink-soft); margin: .4rem 0 1.6rem; }
.auth-foot { margin-top: 1.4rem; font-size: .88rem; color: var(--ink-soft); }
.auth-mini-brand { display: none; }

.demo-hint {
  margin-top: 1.4rem; padding: .7rem .85rem; border: 1px dashed var(--line-strong);
  border-radius: var(--r-ctl); background: var(--surface-2);
  font-size: .8rem; color: var(--ink-soft); line-height: 1.5;
}
.demo-hint code { font-family: var(--font-mono); color: var(--clay-deep); font-size: .82em; }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mini-brand { display: flex; justify-content: center; margin-bottom: 1.6rem; }
}

/* =========================================================================
   Launcher
   ========================================================================= */
.launch-hero { margin-bottom: 1.8rem; }
.launch-hero .eyebrow { margin-bottom: .5rem; }
.launch-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -0.01em; }
.launch-hero h1 .name { color: var(--accent); }
.launch-hero p { color: var(--ink-soft); margin-top: .5rem; font-size: 1.02rem; }

.launch-toolbar { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 200px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl); padding: .5rem .8rem;
}
.search input { border: 0; background: transparent; outline: none; flex: 1; font-family: inherit; font-size: .95rem; color: var(--ink); }
.search .ico { color: var(--ink-faint); }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 1.1rem; }

.tile {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.tile-swatch {
  height: 78px; position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: .7rem .9rem;
}
.tile-swatch .swatch-ico {
  font-size: 1.5rem; color: rgba(255,255,255,.92);
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.tile-body { padding: .95rem 1rem 1.05rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.tile-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.tile-desc { font-size: .85rem; color: var(--ink-soft); line-height: 1.45; }
.tile-host { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-faint); margin-top: .15rem; word-break: break-all; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; margin-top: .7rem; }
.tile-go { font-size: .82rem; font-weight: 700; color: var(--accent); opacity: 0; transform: translateX(-5px); transition: opacity .16s, transform .16s var(--ease); }
.tile:hover .tile-go { opacity: 1; transform: none; }

/* =========================================================================
   Admin console
   ========================================================================= */
.admin-grid { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.admin-grid > section { min-width: 0; }
.app-rail {
  position: sticky; top: 84px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: .5rem; box-shadow: var(--shadow-sm);
}
.rail-label { padding: .65rem .7rem .4rem; }
.rail-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .65rem; border-radius: 9px; cursor: pointer;
  transition: background .12s; margin-bottom: 2px;
}
.rail-item:hover { background: var(--surface-2); }
.rail-item.active { background: var(--clay-tint); }
.rail-swatch { width: 26px; height: 26px; border-radius: 7px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.92); font-size: .8rem; }
.rail-name { flex: 1; font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-item.active .rail-name { color: var(--clay-deep); }
.rail-count { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-faint); background: var(--paper-2); border-radius: 999px; padding: .1rem .45rem; }

.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.admin-head h2 { font-size: 1.5rem; letter-spacing: -0.02em; }
.admin-head .sub { color: var(--ink-soft); margin-top: .25rem; font-size: .92rem; }

.lanes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.lane {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-card); display: flex; flex-direction: column; min-height: 220px; min-width: 0;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.lane-head { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.lane-title { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: .45rem; letter-spacing: -0.01em; }
.lane-title .star { color: var(--clay); }
.lane-count { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .12rem .5rem; }
.lane-body { padding: .6rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.lane.is-over { border-color: var(--accent); background: var(--clay-tint); box-shadow: inset 0 0 0 2px var(--clay-tint-2); }
.lane-hint { color: var(--ink-faint); font-size: .82rem; text-align: center; padding: 1.4rem .5rem; border: 1.5px dashed var(--line-strong); border-radius: 10px; margin: auto .2rem; }

.member-card {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .65rem; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); cursor: grab;
  transition: box-shadow .12s ease, transform .1s ease, border-color .12s ease, opacity .12s ease;
}
.member-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.member-card:active { cursor: grabbing; }
.member-card.is-dragging { opacity: .4; }
.member-card.not-draggable { cursor: default; }
.member-card.not-draggable:hover { border-color: var(--line); box-shadow: none; }
.mc-main { min-width: 0; flex: 1 1 0; }
.mc-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.mc-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.mc-email { font-family: var(--font-mono); font-size: .73rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .12rem; }
.mc-actions { display: flex; align-items: center; gap: .25rem; opacity: 0; transition: opacity .12s; }
.member-card:hover .mc-actions { opacity: 1; }
.mc-grip { color: var(--ink-faint); font-size: 1rem; cursor: grab; user-select: none; line-height: 1; }
.icon-btn {
  border: 0; background: transparent; color: var(--ink-faint); cursor: pointer;
  width: 28px; height: 28px; border-radius: 7px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1rem; line-height: 1;
  transition: background .12s, color .12s;
}
.icon-btn:hover { background: var(--danger-tint); color: var(--danger); }

.section-title { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin: 1.8rem 0 .7rem; }
.invite-card {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .7rem; border: 1px dashed var(--line-strong);
  border-radius: 11px; background: var(--surface-2);
}

/* =========================================================================
   Account settings
   ========================================================================= */
.acct-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.acct-grid > div { min-width: 0; }
.acct-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.acct-nav-item {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem;
  border-radius: 9px; cursor: pointer; color: var(--ink-soft);
  font-size: .92rem; font-weight: 600; transition: background .12s, color .12s;
}
.acct-nav-item:hover { background: rgba(45,35,20,.05); color: var(--ink); }
.acct-nav-item.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.acct-section + .acct-section { margin-top: 1.2rem; }
.acct-section-head { padding: 1.3rem 1.4rem; border-bottom: 1px solid var(--line); }
.acct-section-head h3 { font-size: 1.15rem; letter-spacing: -0.02em; }
.acct-section-head p { color: var(--ink-soft); font-size: .88rem; margin-top: .25rem; }
.acct-row { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); }
.acct-row:last-child { border-bottom: 0; }
.acct-row .rk { font-weight: 600; font-size: .9rem; }
.acct-row .rv { color: var(--ink-soft); font-size: .9rem; margin-top: .15rem; }
.acct-profile { display: flex; align-items: center; gap: 1.2rem; padding: 1.4rem; }
.list-row { display: flex; align-items: center; gap: .9rem; padding: .95rem 1.4rem; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--paper-2); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); flex: none; font-family: var(--font-mono); font-size: .9rem; }

/* =========================================================================
   Prototype screen jumper
   ========================================================================= */
.jumper {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  z-index: 2500; display: flex; align-items: center; gap: 2px;
  background: var(--espresso); color: var(--on-dark);
  border-radius: 999px; padding: 4px; box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 1.5rem); overflow-x: auto;
}
.jumper button {
  border: 0; background: transparent; color: var(--on-dark-soft); cursor: pointer;
  font-family: var(--font-ui); font-size: .78rem; font-weight: 600;
  padding: .4rem .7rem; border-radius: 999px; white-space: nowrap;
  transition: background .12s, color .12s;
}
.jumper button:hover { color: var(--on-dark); }
.jumper button.active { background: var(--clay); color: #fff; }
.jumper .jlabel { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-soft); padding: 0 .55rem 0 .65rem; }

@media (max-width: 760px) {
  .admin-grid, .acct-grid { grid-template-columns: 1fr; }
  .app-rail, .acct-nav { position: static; }
  .acct-nav { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .lanes { grid-template-columns: 1fr; }
  .topbar-nav a { padding: .42rem .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* shared topbar user-menu item */
.menu-item { padding: .55rem .65rem; border-radius: 8px; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--ink); }
.menu-item:hover { background: var(--surface-2); }
