/* ============================================================================
   Square Orange Media — Super Admin design system
   Faithfully derived from the UI team's `export/` mockups.
   Fonts: Hanken Grotesk (body) + Schibsted Grotesk (display).
   No build step — this file is served as-is.
   ========================================================================== */

:root {
  /* Ink / charcoal */
  --ink: #1c1916;
  --ink-2: #26221d;
  --ink-3: #33302a;
  --ink-line: #2e2a24;
  --ink-border: #3a352e;

  /* Orange (primary) */
  --orange: #ec6a11;
  --orange-light: #f4861f;
  --orange-dark: #d85f0c;
  --orange-deep: #dd5c09;
  --orange-text: #c2570b;
  --orange-wash: #fbead9;

  /* Sage (secondary) */
  --sage: #7c8a57;
  --sage-dark: #5e6b3d;
  --sage-deep: #3a4226;
  --sage-bg: #e8ecda;
  --sage-bar: #c3cda6;

  /* Lime accent */
  --lime: #c7f046;

  /* Surfaces */
  --paper: #faf9f5;
  --surface: #ffffff;
  --surface-2: #fbfaf8;
  --surface-3: #f4f0e8;

  /* Borders */
  --border: #ece5d8;
  --border-2: #e4dccd;
  --border-soft: #f0eeea;
  --border-input: #eae7e1;
  --border-row: #f2ede3;

  /* Text */
  --muted: #a39c8e;
  --muted-2: #8c857a;
  --muted-3: #b4aea2;
  --text-2: #6b655b;
  --text-3: #57534b;

  /* Status */
  --gold-text: #9a7414;
  --gold-bg: #fbf0d8;
  --gold-dot: #d6a21c;
  --danger-text: #b4543a;
  --danger-bg: #fbe6df;
  --danger-dot: #c0573f;

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-xs: 12px;

  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Schibsted Grotesk", "Hanken Grotesk", sans-serif;

  --shadow-card: 0 18px 40px -34px rgba(28, 25, 22, 0.4);
  --shadow-pop: 0 26px 50px -28px rgba(28, 25, 22, 0.7);
  --shadow-orange: 0 8px 18px -8px rgba(236, 106, 17, 0.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
input, button, textarea, select { font-family: inherit; }
a { color: inherit; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #e0d8c9; border-radius: 9px; border: 3px solid var(--surface-3); }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }
.font-display { font-family: var(--font-display); }

/* ------------------------------------------------------------------ keyframes */
@keyframes leafSway { 0%, 100% { transform: rotate(21deg); } 50% { transform: rotate(33deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes growBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ------------------------------------------------------------------ brand mark */
.brand-mark { position: relative; flex: none; }
.brand-mark .tile {
  position: absolute; inset: 0; border-radius: 13px;
  background: linear-gradient(155deg, #f4861f 0%, #ec6a11 58%, #dd5c09 100%);
  box-shadow: 0 6px 14px -3px rgba(221, 92, 9, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}
.brand-mark .leaf {
  position: absolute; background: var(--sage); border-radius: 0 90% 0 90%;
  transform-origin: bottom left; animation: leafSway 5s ease-in-out infinite;
}
.brand-mark .stem { position: absolute; background: var(--sage); border-radius: 2px; transform: rotate(15deg); }

.brand-word { line-height: 1; }
.brand-word .name { font-weight: 800; letter-spacing: -0.025em; }
.brand-word .name em { font-style: normal; color: var(--orange-light); }
.brand-word .sub { font-weight: 700; letter-spacing: 0.46em; color: var(--muted-2); }

/* ============================================================ LOGIN ========= */
#login-view {
  display: flex; min-height: 100vh; width: 100%; background: var(--surface); color: var(--ink);
}
.login-brand {
  position: relative; flex: 1.05; background: var(--ink); color: #fff; overflow: hidden;
  display: flex; flex-direction: column; padding: 46px 52px; min-width: 0;
}
.login-brand .glow-a {
  position: absolute; top: -120px; right: -100px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 106, 17, 0.4), transparent 66%);
}
.login-brand .glow-b {
  position: absolute; bottom: -140px; left: -90px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 138, 87, 0.32), transparent 68%);
}
.login-brand .brand-row { display: flex; align-items: center; gap: 12px; position: relative; }
.login-brand .brand-mark { width: 42px; height: 42px; }
.login-brand .brand-mark .leaf { top: -3px; left: 17px; width: 13px; height: 9px; }
.login-brand .brand-mark .stem { top: -8px; left: 25px; width: 3px; height: 11px; }
.login-brand .brand-word .name { font-size: 18px; }
.login-brand .brand-word .sub { font-size: 8.5px; margin-top: 4px; }

.login-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; max-width: 460px; }
.login-pill {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 12.5px; font-weight: 700; color: var(--lime);
  background: rgba(199, 240, 70, 0.1); border: 1px solid rgba(199, 240, 70, 0.22);
  padding: 7px 13px; border-radius: 20px; margin-bottom: 26px;
}
.login-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.login-hero h1 {
  font-family: var(--font-display); font-size: 48px; font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.04; margin: 0 0 18px;
}
.login-hero p { font-size: 16.5px; line-height: 1.55; color: #a8a199; margin: 0 0 40px; }

.login-stat {
  background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius-md);
  padding: 20px 22px; max-width: 340px;
}
.login-stat .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.login-stat .label { font-size: 12.5px; color: var(--muted-2); font-weight: 600; }
.login-stat .delta {
  display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700;
  color: var(--ink); background: var(--lime); padding: 3px 8px; border-radius: 7px;
}
.login-stat .figure { display: flex; align-items: baseline; gap: 10px; }
.login-stat .figure .num { font-family: var(--font-display); font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }

.login-trust { display: flex; align-items: center; gap: 11px; position: relative; font-size: 13px; color: var(--muted-2); }
.avatar-stack { display: flex; }
.avatar-stack .av { border: 2px solid var(--ink); }
.avatar-stack .av + .av { margin-left: -9px; }

.login-form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 32px; min-width: 0; }
.login-form { width: 100%; max-width: 392px; }
.login-form .head { margin-bottom: 30px; }
.login-form .head h2 { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 8px; }
.login-form .head p { font-size: 14.5px; color: var(--muted); margin: 0; }

.oauth-row { display: flex; gap: 11px; margin-bottom: 22px; }
.oauth-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px; border-radius: 13px; border: 1px solid var(--border-2); background: #fff;
  color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 700; transition: background 0.15s, border-color 0.15s;
}
.oauth-btn:hover { background: var(--surface-2); border-color: #d8cfbe; }

.divider { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.divider .line { flex: 1; height: 1px; background: #ede8de; }
.divider span { font-size: 12px; font-weight: 600; color: var(--muted-3); }

.float-field { position: relative; margin-bottom: 14px; }
.float-field label {
  position: absolute; left: 16px; pointer-events: none; font-family: inherit; transition: all 0.15s ease;
  top: 50%; transform: translateY(-50%); font-size: 15px; font-weight: 500; color: var(--muted);
}
.float-field.active label { top: 9px; transform: none; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; color: var(--muted); }
.float-field.focused label { color: var(--orange-text); }
.float-field input {
  width: 100%; padding: 23px 16px 9px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-2);
  background: var(--surface-2); font-size: 15px; font-weight: 600; color: var(--ink); outline: none;
  font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.float-field.has-toggle input { padding-right: 46px; }
.float-field input:focus { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(236, 106, 17, 0.12); }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: transparent;
  color: var(--muted); cursor: pointer; padding: 8px; display: flex; border-radius: 9px; transition: color 0.15s, background 0.15s;
}
.pw-toggle:hover { color: var(--text-3); background: var(--surface-3); }

.login-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.remember { display: inline-flex; align-items: center; gap: 9px; border: none; background: transparent; cursor: pointer; padding: 0; font-size: 13.5px; font-weight: 600; color: var(--text-3); }
.remember .box {
  width: 20px; height: 20px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #d8d1c3; background: #fff; transition: all 0.15s; color: #fff;
}
.remember.on .box { border-color: var(--orange); background: var(--orange); }
.remember.on .box svg { opacity: 1; }
.remember .box svg { opacity: 0; transition: opacity 0.15s; }
.link-strong { font-size: 13.5px; font-weight: 700; color: var(--orange-text); text-decoration: none; cursor: pointer; }

.submit-btn {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: 15px;
  font-weight: 700; color: #fff; background: var(--orange); box-shadow: 0 12px 26px -10px rgba(236, 106, 17, 0.6);
  transition: background 0.18s, transform 0.1s;
}
.submit-btn:hover { background: var(--orange-dark); }
.submit-btn:active { transform: translateY(1px); }
.submit-btn.done { background: var(--sage-dark); }
.submit-btn .spin { width: 19px; height: 19px; border-radius: 50%; border: 2.4px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; display: inline-block; animation: spin 0.7s linear infinite; }

.login-foot { text-align: center; font-size: 14px; color: var(--muted); margin: 26px 0 0; }
.login-foot a { font-weight: 700; color: var(--ink); text-decoration: none; }

.login-alert {
  border-radius: var(--radius-xs); padding: 11px 14px; font-size: 13.5px; font-weight: 600;
  margin-bottom: 16px; line-height: 1.4;
}
.login-alert.error { background: var(--danger-bg); color: #8e3a26; border: 1px solid #f0d8cf; }
.login-alert.info { background: var(--sage-bg); color: var(--sage-dark); border: 1px solid #d6dec0; }

/* ============================================================ APP SHELL ===== */
#app-view { display: flex; height: 100vh; width: 100%; overflow: hidden; }

.sidebar {
  width: 254px; flex: none; display: flex; flex-direction: column; padding: 18px 16px;
  background: var(--surface); border-right: 1px solid var(--border-soft); transition: width 0.2s; overflow: hidden;
}
.sidebar.collapsed { width: 82px; }
.sidebar-head { display: flex; align-items: center; gap: 11px; padding: 4px 6px; margin-bottom: 26px; min-height: 38px; }
.sidebar-head .brand-mark { width: 38px; height: 38px; }
.sidebar-head .brand-mark .tile { border-radius: 12px; box-shadow: 0 4px 10px -2px rgba(221, 92, 9, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.34); }
.sidebar-head .brand-mark .leaf { top: -3px; left: 15px; width: 12px; height: 8px; }
.sidebar-head .brand-mark .stem { top: -7px; left: 22px; width: 3px; height: 10px; }
.sidebar-head .brand-word { flex: 1; min-width: 0; }
.sidebar-head .brand-word .name { font-size: 17px; color: var(--ink); white-space: nowrap; }
.sidebar-head .brand-word .name em { color: var(--orange); }
.sidebar-head .brand-word .sub { font-size: 8.5px; color: var(--muted); margin-top: 4px; padding-left: 1px; }
.collapse-btn { border: none; background: transparent; cursor: pointer; padding: 4px; display: flex; color: var(--muted-3); }
.collapse-btn.flip { transform: rotate(180deg); }

.nav-section { font-size: 10px; font-weight: 700; letter-spacing: 0.15em; color: var(--muted-3); padding: 0 8px; margin-bottom: 9px; }
/* Lifecycle groups (Growth/Clients/Tools/Business/System) stack in one rail;
   give each header air from the group above it. */
.nav-group + .nav-section { margin-top: 18px; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 13px; border: none;
  cursor: pointer; font-family: inherit; font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em;
  text-align: left; width: 100%; background: transparent; color: var(--text-2); transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--surface-3); }
.nav-item .ico { display: flex; width: 20px; height: 20px; flex: none; }
.nav-item.active { background: var(--ink); color: #fff; font-weight: 700; }
.nav-item.active:hover { background: var(--ink-3); }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px 0; }
.sidebar.collapsed .nav-item .label,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .sidebar-head .brand-word,
.sidebar.collapsed .sidebar-head .collapse-btn,
.sidebar.collapsed .user-card .meta { display: none; }
.sidebar.collapsed .user-card { justify-content: center; }

.sidebar-divider { height: 1px; background: #e7e0d3; margin: 18px 6px; }
.sidebar-spacer { flex: 1; }

.user-card { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 16px; background: #fff; border: 1px solid var(--border); }
.user-card .av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(150deg, #f4861f, #dd5c09); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; }
.user-card .meta { flex: 1; min-width: 0; line-height: 1.2; }
.user-card .meta .name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .meta .role { font-size: 11.5px; color: var(--muted); }
.expand-btn { margin-top: 12px; border: 1px solid var(--border); background: #fff; color: var(--muted); cursor: pointer; padding: 9px; border-radius: 12px; display: flex; justify-content: center; }

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-header {
  display: flex; align-items: center; gap: 14px; padding: 16px 34px; border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); flex: none; z-index: 5;
}
.app-header h1 { font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: -0.025em; margin: 0; }
.header-spacer { flex: 1; }
.header-search { position: relative; width: 280px; max-width: 30vw; }
.header-search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; color: var(--muted-3); width: 18px; height: 18px; }
.header-search input {
  width: 100%; padding: 11px 14px 11px 42px; border-radius: 13px; border: 1px solid var(--border-input);
  background: var(--surface-2); font-size: 13.5px; color: var(--ink); outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.header-search input:focus { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px rgba(236, 106, 17, 0.14); }
.icon-btn { position: relative; border: 1px solid var(--border-input); background: #fff; color: var(--text-3); cursor: pointer; padding: 10px; border-radius: 13px; display: flex; transition: border-color 0.15s; }
.icon-btn:hover { border-color: #dcd8d0; }
.icon-btn .ping { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; }
.header-av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(150deg, #f4861f, #dd5c09); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; cursor: pointer; flex: none; }

.app-scroll { flex: 1; overflow-y: auto; }
.page { padding: 34px 34px 56px; max-width: 1280px; margin: 0 auto; width: 100%; }
.page-narrow { max-width: 1100px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 19px;
  border-radius: var(--radius-xs); border: none; cursor: pointer; font-size: 14px; font-weight: 700;
  transition: background 0.15s, border-color 0.15s, transform 0.1s; white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 11px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-orange); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-charcoal { background: var(--ink); color: #fff; }
.btn-charcoal:hover { background: var(--ink-3); }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid #e0d8c9; }
.btn-secondary:hover { background: #faf7f1; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: #efe9de; }
.btn-danger { background: #fff; color: var(--danger-text); border: 1px solid #f0d8cf; }
.btn-danger:hover { background: #fbefea; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ------------------------------------------------------------------ badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 4px 11px; border-radius: 20px; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.badge.active { color: var(--sage-dark); background: var(--sage-bg); }
.badge.active .dot { background: var(--sage); }
.badge.pending { color: var(--gold-text); background: var(--gold-bg); }
.badge.pending .dot { background: var(--gold-dot); }
.badge.paused { color: var(--text-2); background: #efebe2; }
.badge.paused .dot { background: var(--muted); }
.badge.failed { color: var(--danger-text); background: var(--danger-bg); }
.badge.failed .dot { background: var(--danger-dot); }
.badge.neutral { color: var(--text-2); background: #efebe2; }
.badge.neutral .dot { background: var(--muted); }

.chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; display: inline-block; }
.chip.starter { color: var(--text-2); background: #f1ece2; }
.chip.growth { color: var(--orange-text); background: var(--orange-wash); }
.chip.enterprise { color: #fff; background: var(--orange); }

/* ------------------------------------------------------------------ avatars */
.av { display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; border-radius: 12px; }
.av.round { border-radius: 50%; }
.av.orange { background: var(--orange-wash); color: var(--orange-text); }
.av.blue { background: #e7eff6; color: #456a93; }
.av.gold { background: var(--gold-bg); color: var(--gold-text); }
.av.plum { background: #f4eaf1; color: #8a5d80; }
.av.sage { background: var(--sage-bg); color: var(--sage-dark); }

/* ------------------------------------------------------------------ cards / grid */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-card); }
.section { margin-bottom: 38px; }
.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.section-head .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.15em; color: var(--muted); }
.section-head .rule { flex: 1; height: 1px; background: #e7e0d3; }

.grid-2-1 { display: grid; grid-template-columns: 1.62fr 1fr; gap: 18px; align-items: stretch; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.daterow { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.daterow .day { font-size: 12.5px; color: #9a938a; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.daterow .sep { width: 4px; height: 4px; border-radius: 50%; background: #d8d2c6; }
.daterow .flag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.daterow .flag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.daterow .flag strong { color: var(--orange-text); font-weight: 700; }

/* hero chart card */
.hero-chart { position: relative; background: var(--ink); border-radius: var(--radius-lg); padding: 30px 32px 26px; color: #fff; overflow: hidden; box-shadow: var(--shadow-pop); }
.hero-chart .glow { position: absolute; top: -60px; right: -40px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(236, 106, 17, 0.32), transparent 68%); }
.hero-chart .top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; }
.hero-chart .cap { font-size: 13px; font-weight: 600; color: var(--muted-2); margin-bottom: 14px; }
.hero-chart .big { font-family: var(--font-display); font-size: 64px; font-weight: 800; letter-spacing: -0.04em; line-height: 0.9; }
.delta-lime { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--lime); padding: 5px 11px; border-radius: 9px; }
.ghost-select { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #cfc8bc; border: 1px solid var(--ink-border); border-radius: 11px; padding: 8px 13px; cursor: pointer; white-space: nowrap; }
.ghost-select:hover { background: var(--ink-2); }
.hero-chart .axis { display: flex; justify-content: space-between; margin-top: 12px; font-size: 11.5px; color: var(--text-2); font-weight: 600; }

/* metric cards */
.metric { position: relative; border-radius: var(--radius-lg); padding: 26px 28px; overflow: hidden; flex: 1; }
.metric .top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.metric .ico-box { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.metric .num { font-family: var(--font-display); font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 18px 0 12px; position: relative; }
.metric .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; position: relative; }
.metric.orange { background: linear-gradient(150deg, #f4861f 0%, #ec6a11 52%, #d85f0c 100%); color: #fff; box-shadow: 0 22px 42px -24px rgba(216, 95, 12, 0.85); }
.metric.orange .glow { position: absolute; top: -50px; right: -30px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.metric.orange .ico-box { background: rgba(255, 255, 255, 0.2); color: #fff; }
.metric.orange .cap { font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, 0.9); }
.metric.orange .sub { font-size: 13px; color: rgba(255, 255, 255, 0.85); font-weight: 600; }
.metric.sage { background: var(--sage-bg); color: var(--sage-deep); }
.metric.sage .num { color: #2f3720; }
.metric.sage .cap { font-size: 13.5px; font-weight: 600; color: var(--sage-dark); }
.metric.sage .ico-box { background: #d6dec0; color: #4f5a33; }
.metric.sage .sub { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: #4f5a33; }
.metric.ink { background: var(--ink); color: #fff; box-shadow: 0 22px 44px -28px rgba(28, 25, 22, 0.7); display: flex; flex-direction: column; }
.metric.ink .glow { position: absolute; bottom: -50px; left: -30px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 138, 87, 0.34), transparent 68%); }
.metric.ink .cap { font-size: 13.5px; font-weight: 600; color: var(--muted-2); }
.metric.ink .ico-box { background: var(--ink-2); color: var(--lime); }
.metric.ink .sub { font-size: 12.5px; color: var(--muted-2); }

.spark { display: flex; align-items: flex-end; gap: 4px; height: 34px; flex: 1; max-width: 130px; }
.spark .bar { flex: 1; border-radius: 3px; transform-origin: bottom; animation: growBar 0.6s ease both; }
.metric.orange .spark .bar { background: rgba(255, 255, 255, 0.4); }
.metric.orange .spark .bar.peak { background: #fff; }
.metric.sage .spark .bar { background: var(--sage-bar); }
.metric.sage .spark .bar.peak { background: var(--sage); }

/* recent accounts list */
.list-card { background: #fff; border: 1px solid #efede9; border-radius: var(--radius-lg); padding: 22px 16px 14px; box-shadow: var(--shadow-card); }
.list-card .head { display: flex; align-items: center; justify-content: space-between; margin: 0 8px 10px; }
.list-card .head .title { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; font-family: var(--font-display); display: inline-flex; align-items: center; gap: 9px; }
.count-pill { font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0; color: var(--orange-text); background: var(--orange-wash); border-radius: 999px; padding: 1px 9px; line-height: 1.5; }
.link-arrow { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--orange-text); cursor: pointer; }
.acct-row { display: flex; align-items: center; gap: 13px; padding: 12px 8px; border-radius: 14px; transition: background 0.15s; cursor: pointer; }
.acct-row:hover { background: #faf8f4; }
.acct-row + .acct-row { border-top: 1px solid #f4f1ec; }
.acct-row .av { width: 44px; height: 44px; font-size: 12.5px; }
.acct-row .body { flex: 1; min-width: 0; line-height: 1.35; }
.acct-row .body .name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.acct-row .body .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.acct-row .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.acct-row .right .mrr { font-size: 15px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.01em; }

/* ------------------------------------------------------------------ data table */
.table-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 24px 14px; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 16px 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th:first-child { padding-left: 0; }
table.data th.num, table.data td.num { text-align: right; }
table.data td { padding: 14px 8px; border-bottom: 1px solid var(--border-row); font-size: 14px; color: var(--text-3); vertical-align: middle; }
table.data td:first-child { padding-left: 0; }
table.data tr:last-child td { border-bottom: none; }
table.data tr.clickable { cursor: pointer; transition: background 0.12s; }
table.data tr.clickable:hover td { background: #faf8f4; }
.cell-id { display: flex; align-items: center; gap: 11px; }
.cell-id .av { width: 34px; height: 34px; font-size: 12.5px; }
.cell-id .name { font-size: 14px; font-weight: 700; color: var(--ink); }
.cell-id .sub { font-size: 11.5px; color: var(--muted); }

/* ------------------------------------------------------------------ forms / inputs */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-3); margin-bottom: 6px; letter-spacing: 0.01em; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="date"], .field input[type="search"],
.field select, .field textarea, .input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-xs); border: 1.5px solid var(--border-2);
  background: var(--surface-2); font-size: 14px; font-weight: 500; color: var(--ink); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px rgba(236, 106, 17, 0.12);
}
.field-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-3); }
.field-check input { width: 17px; height: 17px; accent-color: var(--orange); }
.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; }

.search-bar { position: relative; margin-bottom: 20px; max-width: 420px; }
.search-bar .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; color: var(--muted-3); width: 18px; height: 18px; }
.search-bar input { width: 100%; padding: 12px 14px 12px 42px; border-radius: 13px; border: 1px solid var(--border-input); background: var(--surface-2); font-size: 14px; color: var(--ink); outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.search-bar input:focus { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px rgba(236, 106, 17, 0.14); }

.inline-select { padding: 8px 12px; border-radius: 11px; border: 1.5px solid var(--border-2); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); outline: none; cursor: pointer; font-family: inherit; }
.inline-select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(236, 106, 17, 0.12); }

.flash { font-size: 12.5px; font-weight: 700; color: var(--sage-dark); transition: opacity 0.2s; }
.flash.err { color: var(--danger-text); }

/* page header bits */
.page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-h { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.page-sub { font-size: 14px; color: var(--text-2); margin: 4px 0 0; line-height: 1.5; }
.eyebrow { font-size: 12.5px; color: var(--muted); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 9px; }

.note-banner { display: flex; gap: 10px; align-items: flex-start; background: var(--gold-bg); border: 1px solid #f0e2bd; color: var(--gold-text); border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13px; font-weight: 600; margin-bottom: 20px; line-height: 1.45; }

/* detail view */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--orange-text); cursor: pointer; text-decoration: none; margin-bottom: 16px; }
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.detail-head .av { width: 52px; height: 52px; font-size: 16px; }
.detail-head h2 { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.sub-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 22px; margin-bottom: 16px; }
/* Radar "your site" vitals — compact stat grid (visitors/engagement/speed/search). */
.mi-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 10px; }
.mi-stat { background: var(--surface-2, #faf7f5); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; text-align: center; }
.mi-stat-num { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1; }
.mi-stat-lbl { font-size: 10.5px; color: var(--muted); margin-top: 5px; letter-spacing: 0.02em; }
.sub-card h4 { font-family: var(--font-display); font-size: 16px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.01em; }
.sub-card .type { font-size: 13px; color: var(--muted); font-weight: 600; }
.notes-list { margin: 12px 0 0; padding: 0; list-style: none; }
.notes-list li { font-size: 13px; color: var(--text-2); padding: 8px 0; border-top: 1px solid var(--border-row); line-height: 1.45; }
.notes-list li .when { color: var(--muted); font-size: 12px; }
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border-row); font-size: 14px; }
.list-rows li:first-child { border-top: none; }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 48px 24px; color: var(--muted);
}
.empty .ico-box { width: 66px; height: 66px; border-radius: 20px; background: var(--orange-wash); color: var(--orange-text); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.empty h3 { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.empty p { font-size: 14px; color: var(--muted); margin: 0 0 18px; max-width: 380px; line-height: 1.5; }

.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 22px; box-shadow: var(--shadow-card); }
.stat-tile .num { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat-tile .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 8px; }

.loading-strip { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; padding: 24px 8px; }
.loading-strip .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.4px solid var(--border-2); border-top-color: var(--orange); display: inline-block; animation: spin 0.7s linear infinite; }

/* integrations */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.int-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; }
.int-card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.int-card .top h3 { font-family: var(--font-display); font-size: 17px; font-weight: 800; text-transform: capitalize; margin: 0; }
.int-card .verified { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.secret-row { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; }
.secret-row .key { font-size: 12px; font-weight: 700; color: var(--text-3); min-width: 42%; display: flex; align-items: center; gap: 6px; }
.secret-row .key .mark { font-size: 12px; }
.secret-row .key .mark.yes { color: var(--sage); }
.secret-row .key .mark.no { color: var(--danger-dot); }
.secret-row input { flex: 1; padding: 8px 11px; border-radius: 10px; border: 1.5px solid var(--border-2); background: var(--surface-2); font-size: 12.5px; outline: none; font-family: inherit; }
.secret-row input:focus { border-color: var(--orange); background: #fff; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(28, 25, 22, 0.42); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px; opacity: 0; }
.modal-backdrop.show { opacity: 1; }
.modal { background: var(--paper); border-radius: var(--radius-md); width: 100%; max-width: 460px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 40px 80px -30px rgba(28, 25, 22, 0.6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-family: var(--font-display); font-size: 19px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.modal-close { border: none; background: transparent; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 9px; display: flex; }
.modal-close:hover { background: var(--surface-3); color: var(--text-2); }
.modal-body { padding: 22px 24px; overflow-y: auto; }

/* Due-date emphasis on the Projects board. Late has to be unmissable. */
.due { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.due.soon { color: var(--orange-text, #c2570b); }
.due.late { color: #fff; background: #c2410c; border-radius: 6px; padding: 2px 7px; }

/* ---- Project workspace (admin): tracker + every asset + the brief ---- */
.ws-track { display: flex; align-items: center; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.ws-step { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 92px; }
.ws-step .ws-dot { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; background: var(--surface-2, #f2ede3); color: var(--muted);
  border: 1.5px solid var(--border); }
.ws-step .ws-lab { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ws-step.done .ws-dot { background: var(--sage, #7c8a57); border-color: var(--sage, #7c8a57); color: #fff; }
.ws-step.done .ws-lab { color: var(--text-2); }
.ws-step.now .ws-dot { background: var(--orange); border-color: var(--orange); color: #fff;
  box-shadow: 0 0 0 4px rgba(236,106,17,0.16); }
.ws-step.now .ws-lab { color: var(--ink); font-weight: 800; }
.ws-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2, #faf8f4); }
.ws-facts span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); }
.ws-facts b { display: block; margin-top: 3px; font-size: 15px; font-weight: 800; }
.ws-h { margin: 22px 0 10px; font-family: var(--font-display); font-size: 15px; font-weight: 800; }
.ws-sec { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.ws-sec h5 { font-size: 13px; font-weight: 800; margin-bottom: 9px; }
.ws-row { display: flex; gap: 14px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.ws-row:first-of-type { border-top: none; }
.ws-k { flex: 0 0 40%; color: var(--muted); font-weight: 600; }
.ws-v { flex: 1; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.ws-files { display: flex; flex-direction: column; gap: 6px; }
.ws-file { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none;
  background: var(--surface); transition: border-color .15s ease, background .15s ease; }
.ws-file:hover { border-color: var(--orange); background: rgba(236,106,17,0.05); }
.ws-fn { font-size: 13px; font-weight: 600; color: var(--text-2); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ws-dl { flex: none; font-size: 11.5px; font-weight: 800; color: var(--orange-text, #c2570b);
  letter-spacing: .04em; text-transform: uppercase; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); background: #fff; }

/* ---- Long-run progress overlay + minimized job pill (Site Analysis) ---- */
.run-overlay { position: fixed; inset: 0; background: rgba(28, 25, 22, 0.5); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 120; padding: 24px; animation: floatUp 0.25s ease both; }
.run-card { background: var(--paper); border-radius: var(--radius-md); width: 100%; max-width: 440px; padding: 30px 30px 26px; box-shadow: 0 40px 80px -30px rgba(28, 25, 22, 0.6); text-align: center; }
.run-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0 18px; color: var(--ink); }
.run-bar { position: relative; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 0 0 16px; }
.run-bar span { position: absolute; top: 0; left: 0; height: 100%; width: 40%; border-radius: 999px; background: linear-gradient(90deg, var(--orange-light), var(--orange)); animation: runSlide 1.35s ease-in-out infinite; }
@keyframes runSlide { 0% { left: -42%; } 100% { left: 102%; } }
.run-stage { font-size: 14.5px; font-weight: 600; color: var(--ink-2); min-height: 20px; transition: color 0.2s; }
.run-meta { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.run-note { font-size: 13px; line-height: 1.55; color: var(--text-2); margin: 16px 0 20px; }
.run-actions { display: flex; justify-content: center; gap: 10px; }

.run-pill { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; padding: 12px 15px; box-shadow: 0 18px 40px -18px rgba(28, 25, 22, 0.45); max-width: 340px; animation: floatUp 0.25s ease both; }
.run-pill[role="button"] { cursor: pointer; }
.run-pill[role="button"]:hover { border-color: var(--border-input); box-shadow: 0 22px 48px -18px rgba(28, 25, 22, 0.55); }
.run-pill .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.4px solid var(--border-2); border-top-color: var(--orange); flex: none; animation: spin 0.7s linear infinite; }
.run-pill-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.run-pill-txt strong { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-pill-txt span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-pill-check { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; background: var(--sage-dark); }
.run-pill-err .run-pill-check { background: var(--danger-dot); }
.run-pill-x { border: none; background: transparent; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 4px; border-radius: 8px; flex: none; }
.run-pill-x:hover { background: var(--surface-3); color: var(--text-2); }

/* responsive */
@media (max-width: 1024px) {
  .grid-2-1 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-chart .big { font-size: 52px; }
}
@media (max-width: 860px) {
  .login-brand { display: none; }
  .header-search { display: none; }
}
@media (max-width: 640px) {
  .page { padding: 22px 18px 48px; }
  .sidebar { position: fixed; z-index: 50; height: 100vh; box-shadow: 0 20px 60px -20px rgba(0,0,0,0.4); }
}

/* ===== Cost & Margin dashboard ===== */
.cost-range { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cost-seg-wrap { display: inline-flex; background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.cost-seg { border: none; background: transparent; color: var(--text-2); font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 9px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.cost-seg:hover { color: var(--ink); }
.cost-seg.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-card); }
.cost-custom { display: flex; align-items: center; gap: 8px; }
.cost-custom input[type="date"] { padding: 7px 10px; border-radius: 10px; border: 1.5px solid var(--border-2); background: #fff; font-family: inherit; font-size: 13px; color: var(--ink); }
.cost-kpis .num { font-size: 27px; }
.cost-kpis .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.cost-section { margin-bottom: 18px; }
.cost-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 0 6px; }
.cost-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin: 0; display: flex; align-items: center; gap: 9px; }
.cost-head p { font-size: 13px; color: var(--muted); margin: 5px 0 0; line-height: 1.45; }
.cost-tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sage-dark); background: var(--sage-bg); border: 1px solid #d6dec0; padding: 3px 8px; border-radius: 999px; }
.cost-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; padding: 6px 0 14px; }
.cost-subhead { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.cost-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border-row); font-size: 13.5px; color: var(--text-2); }
.cost-line .num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.cost-line.muted { color: var(--muted); }
.cost-head code, .note-banner code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; background: var(--surface); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--border-2); }
@media (max-width: 640px) {
  .cost-range { align-items: stretch; }
  .cost-two { grid-template-columns: 1fr; }
}

/* ============================================================================
   PROJECTS: Kanban board, project page, team. The board columns are the same
   five stages the client sees, so the board and the portal never disagree.
   ========================================================================== */
.page.wide { max-width: none; }
.kboard { display: grid; grid-template-columns: repeat(6, minmax(178px, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1440px) { .kboard { grid-template-columns: repeat(3, minmax(200px, 1fr)); } }
@media (max-width: 1180px) { .kboard { grid-template-columns: repeat(2, minmax(210px, 1fr)); } }
@media (max-width: 720px)  { .kboard { grid-template-columns: 1fr; } }

.kcol { background: var(--surface-2, #f7f4ee); border: 1px solid var(--border); border-radius: 16px; padding: 12px; }
.kcol-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 2px 4px 12px; }
.kcol-title { display: block; font-family: var(--font-display); font-size: 13.5px; font-weight: 800; }
.kcol-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.kcol-count { font-size: 12px; font-weight: 800; color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; min-width: 22px; text-align: center; padding: 1px 7px; }
.kcol-body { display: flex; flex-direction: column; gap: 9px; min-height: 90px; border-radius: 12px; transition: background .15s ease, box-shadow .15s ease; }
.kcol-body.over { background: rgba(236,106,17,0.08); box-shadow: inset 0 0 0 2px var(--orange); }
.kcol-empty { margin: 0; padding: 18px 6px; text-align: center; font-size: 12.5px; color: var(--muted); }

.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 12px;
  cursor: grab; transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease; }
.kcard:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: 0 14px 26px -20px rgba(28,25,22,.55); }
.kcard:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.kcard.dragging { opacity: .45; cursor: grabbing; }
.kc-top { display: flex; align-items: center; justify-content: space-between; }
.kc-type { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; padding: 2px 7px; border-radius: 5px; }
.kc-type.reel { background: rgba(236,106,17,.12); color: var(--orange-text, #c2570b); }
.kc-type.site { background: rgba(124,138,87,.15); color: #5e6b3d; }
.kc-health { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.kc-health.ok { background: #7c8a57; }
.kc-health.risk { background: #ec6a11; box-shadow: 0 0 0 3px rgba(236,106,17,.18); }
.kc-health.late { background: #c2410c; box-shadow: 0 0 0 3px rgba(194,65,12,.2); }
.kc-health.done { background: var(--border-2); }
.kc-client { font-family: var(--font-display); font-size: 15px; font-weight: 800; margin: 8px 0 2px; }
.kc-meta { font-size: 12.5px; color: var(--muted); }
.kc-money { font-weight: 700; color: var(--text-2); }
.kc-money i { font-style: normal; font-weight: 600; color: var(--muted); margin-left: 5px; font-size: 11.5px; }
.kc-foot { display: flex; align-items: center; gap: 8px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border); }
.kc-due { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.kc-due.risk { color: var(--orange-text, #c2570b); }
.kc-due.late { color: #c2410c; }
.kc-files { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.kc-files.zero { color: #c2410c; }

/* PM faces. Initials when there's no photo, never a broken image. */
.pm-face { border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex: none;
  background: var(--sage, #7c8a57); color: #fff; font-weight: 800; border: 1.5px solid var(--surface); }
.pm-face.initials { font-family: var(--font-display); letter-spacing: .02em; }
.pm-none { display: inline-grid; place-items: center; border-radius: 50%; flex: none; font-weight: 800; font-size: 11px;
  background: var(--surface-2, #f2ede3); color: var(--muted); border: 1.5px dashed var(--border-2); }

/* Undo bar. A drop changes what the client sees, so it stays reversible. */
.board-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 90;
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px;
  background: var(--ink, #1c1916); color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 20px 40px -22px rgba(0,0,0,.7); opacity: 0; pointer-events: none; transition: all .22s ease; }
.board-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.board-toast button { background: none; border: none; color: var(--lime, #c7f046); font-weight: 800; font-size: 13px; cursor: pointer; }

/* Everything the undo bar isn't: refusals, confirmations, plain news. */
.plain-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 91;
  max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px;
  background: var(--ink, #1c1916); color: #fff; font-size: 13.5px; font-weight: 600; line-height: 20px;
  box-shadow: 0 20px 40px -22px rgba(0,0,0,.7); opacity: 0; pointer-events: none; transition: all .22s ease; }
.plain-toast.show { opacity: 1; transform: translate(-50%, 0); }
.plain-toast.err { background: #8e3a26; }

/* ---- Gate modals: the questions a board move has to answer ---------------- */
.gate-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.gate-fact { background: var(--surface-2, #f7f4ee); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.gate-fact b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.1; }
.gate-fact span { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.gate-fact.bad { background: var(--danger-bg, #fdf1ec); border-color: #f0d8cf; }
.gate-fact.bad b { color: #b04321; }

.gate-warn { background: var(--danger-bg, #fdf1ec); border: 1px solid #f0d8cf; border-radius: 12px;
  padding: 11px 14px; font-size: 13.5px; line-height: 21px; color: #8e3a26; margin-bottom: 10px; }

.gate-choice { display: flex; flex-direction: column; gap: 9px; margin-bottom: 6px; }
.gate-opt { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; padding: 13px 15px;
  border: 1.5px solid var(--border); border-radius: 13px; background: var(--surface); transition: all .15s ease; }
.gate-opt:hover { border-color: var(--border-2, #ded5c4); }
.gate-opt input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--orange); flex: none; }
.gate-opt b { display: block; font-size: 14.5px; font-weight: 800; }
.gate-opt i { display: block; font-style: normal; font-size: 12.5px; line-height: 19px; color: var(--muted); margin-top: 2px; }
.gate-opt:has(input:checked) { border-color: var(--orange); background: rgba(236,106,17,0.05); }

.gate-detail { margin-top: 14px; padding-top: 15px; border-top: 1px solid var(--border); }
.gate-detail .field > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-3); margin-bottom: 6px; }
.gate-detail .field > span i { font-style: normal; font-weight: 600; color: var(--orange-text, #c2570b); }
.modal-body .field > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-3); margin-bottom: 6px; }
.modal-body .field > span i { font-style: normal; font-weight: 600; color: var(--muted); }

.gate-hint { margin: 4px 0 0; font-size: 12.5px; line-height: 19px; padding: 9px 12px; border-radius: 10px; }
.gate-hint.warm { background: rgba(236,106,17,0.08); color: var(--orange-text, #c2570b); }
.gate-hint.cool { background: var(--surface-2, #f7f4ee); color: var(--text-3); }

.gate-error { margin: 12px 0 0; font-size: 13px; font-weight: 700; color: #b04321; }
.gate-error.shake { animation: gate-shake .35s ease; }
@keyframes gate-shake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-5px) } 75% { transform: translateX(5px) } }

/* ---- Project page: what they're reviewing, and every date we promised ----- */
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.rv-ver { display: inline-block; font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: .04em;
  background: var(--ink, #1c1916); color: #fff; border-radius: 6px; padding: 3px 8px; }
.rv-when { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 8px; }
.rv-link { display: block; font-size: 13.5px; font-weight: 600; word-break: break-all; color: var(--orange-text, #c2570b); }
.rv-note { margin: 9px 0 0; font-size: 13.5px; line-height: 21px; color: var(--text-2); font-style: italic; }

.rv-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rv-hist li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 13.5px;
  padding-left: 12px; border-left: 3px solid var(--border-2, #ded5c4); }
.rv-hist li.moved { border-left-color: var(--orange); }
.rv-hist li.held { border-left-color: var(--sage, #7c8a57); }
.rv-hist b { font-weight: 800; }
.rv-hist s { color: var(--muted); font-weight: 600; }
.rv-hist .rv-why { font-size: 12px; font-weight: 700; color: var(--text-3); background: var(--surface-2, #f7f4ee);
  border-radius: 6px; padding: 2px 8px; }
.rv-hist .when { font-size: 12px; color: var(--muted); font-weight: 600; }
.rv-hist em { flex-basis: 100%; font-style: normal; font-size: 13px; line-height: 20px; color: var(--text-2); }

/* Project page */
.ptrack-wrap { margin-top: 22px; }
.ptrack { display: flex; gap: 6px; flex-wrap: wrap; }
.ptrack .pstep { flex: 1; min-width: 118px; display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; text-align: left;
  transition: border-color .15s ease, background .15s ease; }
.ptrack .pstep:hover { border-color: var(--orange); }
.ps-dot { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; background: var(--surface-2, #f2ede3); color: var(--muted); border: 1.5px solid var(--border); }
.ps-lab { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pstep.done .ps-dot { background: var(--sage, #7c8a57); border-color: var(--sage, #7c8a57); color: #fff; }
.pstep.done .ps-lab { color: var(--text-2); }
.pstep.now { border-color: var(--orange); background: rgba(236,106,17,.06); }
.pstep.now .ps-dot { background: var(--orange); border-color: var(--orange); color: #fff; }
.pstep.now .ps-lab { color: var(--ink); font-weight: 800; }

.pfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.pfact { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.pfact.warn { border-color: rgba(236,106,17,.45); background: rgba(236,106,17,.05); }
.pfact.bad { border-color: rgba(194,65,12,.5); background: rgba(194,65,12,.06); }
.pf-l { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pf-v { display: block; margin-top: 5px; font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.pf-s { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }

/* Point of contact, as a person rather than a select */
.poc-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.poc-who h4 { font-family: var(--font-display); font-size: 16px; font-weight: 800; }
.poc-who p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.poc-who a { font-size: 13px; color: var(--orange-text, #c2570b); }
.poc-pick { margin-left: auto; min-width: 220px; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.team-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px; }
.tm-body { flex: 1; min-width: 0; }
.tm-body h4 { font-family: var(--font-display); font-size: 16px; font-weight: 800; }
.tm-body p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tm-email { font-size: 12.5px !important; color: var(--text-2) !important; overflow: hidden; text-overflow: ellipsis; }
.tm-link { font-size: 12.5px; color: var(--orange-text, #c2570b); }
.tm-missing { font-size: 12px; color: var(--muted); font-style: italic; }
.tm-photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }

/* ============================================================================
   THE ORDER — what the client bought, at the top of the project page.
   Loud on purpose. It replaces a note buried below the entire brief, which is
   how a reel gets cut without the narration someone paid for.
   ========================================================================== */
.ord-total { font-size: 12px; font-weight: 800; color: var(--text-3); letter-spacing: .02em; }
.ord-card { background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius-md);
  padding: 18px 20px 16px; box-shadow: var(--shadow-card); }
.ord-card.is-rush { border-color: rgba(236,106,17,.5); box-shadow: 0 18px 40px -34px rgba(236,106,17,.7); }
.ord-card.ord-none { background: var(--surface-2); box-shadow: none; }
.ord-card.ord-none p { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }

.ord-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ord-track { font-family: var(--font-display); font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.ord-speed { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; padding: 4px 9px; border-radius: 999px; }
.ord-speed.std { background: var(--surface-3); color: var(--muted-2); }
.ord-speed.rush { background: var(--orange-wash); color: var(--orange-text); }

.ord-lines { list-style: none; margin: 0 0 14px; padding: 0; }
.ord-line { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0;
  border-top: 1px solid var(--border-row); font-size: 13.5px; color: var(--text-2); }
.ord-line:first-child { border-top: none; }
.ord-line b { font-variant-numeric: tabular-nums; color: var(--text-3); }
.ord-line.ord-plan span, .ord-line.ord-plan b { font-weight: 800; color: var(--ink); }
.ord-line.ord-rush span { color: var(--orange-text); font-weight: 700; }
.ord-line em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); border: 1px solid var(--border-2);
  border-radius: 999px; padding: 1px 6px; margin-left: 6px; cursor: help; }

.ord-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.ord-fact { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 11px 13px; }
.ord-fact.ord-warn { border-color: rgba(236,106,17,.45); background: rgba(236,106,17,.05); }
.ord-fact.ord-yes { border-color: rgba(124,138,87,.45); background: rgba(124,138,87,.07); }
.ord-fl { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.ord-fv { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.ord-fv.muted { color: var(--muted-2); }
.ord-fs { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.35; }

.ord-deliver { margin-top: 12px; }
.ord-deliver p { margin: 2px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.ord-deferred { margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--gold-bg); color: var(--gold-text); font-size: 12.5px; line-height: 1.45; }
.ord-deferred b { font-weight: 800; }

/* ---- Acting for the client: add assets, remove assets, fill in the brief ---- */
.ws-file .ws-fn { flex: 1; text-decoration: none; }
.ws-file .ws-fn:hover { color: var(--orange-text); }
.ws-rm { flex: none; border: none; background: transparent; cursor: pointer; font-size: 17px;
  line-height: 1; color: var(--muted-3); padding: 0 2px; border-radius: 6px; }
.ws-rm:hover { color: var(--danger-text); background: var(--danger-bg); }

.sa-drop { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
  padding: 22px; border: 1.5px dashed var(--border-2); border-radius: 14px; background: var(--surface-2);
  transition: border-color .15s ease, background .15s ease; }
.sa-drop:hover, .sa-drop.over { border-color: var(--orange); background: rgba(236,106,17,.05); }
.sa-drop b { font-size: 13.5px; font-weight: 800; }
.sa-drop span { font-size: 12px; color: var(--muted); }
.sa-queue { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.sa-item { display: flex; align-items: center; gap: 10px; padding: 7px 11px; font-size: 12.5px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.sa-item > span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600; color: var(--text-2); }
.sa-sz { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.sa-x { flex: none; border: none; background: transparent; cursor: pointer; font-size: 16px;
  line-height: 1; color: var(--muted-3); }
.sa-x:hover { color: var(--danger-text); }

.fb-form { max-height: 58vh; overflow-y: auto; padding-right: 4px; }
.fb-form .ws-sec { margin-bottom: 14px; }
.fb-form .field:last-child { margin-bottom: 0; }
.fb-multi { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.ord-line.ord-disc span, .ord-line.ord-disc b { color: var(--sage-dark); font-weight: 700; }
