/* =====================================================================
   NEODRIFT Influencer CRM - design system

   House rules this file enforces:
     * No emoji anywhere in the UI. Icons are inline SVG, 1.6px stroke,
       stroke="currentColor", so they inherit text colour and weight.
     * Colour carries status, never decoration.
         green  present / confirmed / done
         red    missing / rejected / overdue
         amber  could not measure / needs attention
         blue   interaction (links, focus, selection)
       Nothing is coloured merely to look lively.
     * Explanatory text lives in an info popover, never sitting open on
       the page. The one exception is a conditional failure banner.
     * Anything pinned to a screen edge adds the safe-area inset, so a
       notched phone in standalone mode does not clip it.
   ===================================================================== */

:root {
  /* safe-area insets - 0 on desktop, real values on a notched phone */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);

  --bg:            #f6f7f9;
  --surface:       #ffffff;
  --surface-2:     #fbfcfd;
  --surface-sunken:#f1f3f6;
  --sidebar:       #10131a;
  --sidebar-2:     #171b24;

  --text:          #11151c;
  --text-2:        #5a6472;
  --text-3:        #8a94a4;
  --text-invert:   #eef1f6;

  --border:        #e3e7ed;
  --border-strong: #cdd4de;

  --blue:          #2563eb;
  --blue-weak:     #eef3ff;
  --blue-strong:   #1d4ed8;
  --green:         #12855a;
  --green-weak:    #e7f6ef;
  --red:           #c4341f;
  --red-weak:      #fdecea;
  --amber:         #a35c00;
  --amber-weak:    #fdf2e0;
  --violet:        #6d3bd1;
  --violet-weak:   #f1ebfd;
  --slate:         #4a5567;
  --slate-weak:    #eef1f5;

  --radius:    10px;
  --radius-sm: 7px;
  --radius-lg: 14px;

  --shadow-1: 0 1px 2px rgba(16, 19, 26, .06);
  --shadow-2: 0 2px 8px rgba(16, 19, 26, .08), 0 1px 2px rgba(16, 19, 26, .04);
  --shadow-3: 0 12px 32px rgba(16, 19, 26, .16), 0 2px 8px rgba(16, 19, 26, .08);

  --sidebar-w: 232px;
  --header-h:  56px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tabular figures everywhere a number is compared down a column. */
.num, td.num, .kpi-value, .metric-value { font-variant-numeric: tabular-nums; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.011em; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

svg { flex: none; }

::selection { background: #cfe0ff; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =====================================================================
   Layout
   ===================================================================== */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "sidebar header" "sidebar main";
  min-height: 100vh;
}

/* ---- sidebar ---- */
.sidebar {
  grid-area: sidebar;
  background: var(--sidebar);
  color: var(--text-invert);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding-top: var(--sat);
  padding-bottom: var(--sab);
  padding-left: var(--sal);
  overflow: hidden;
  z-index: 40;
}

.brand {
  display: flex; align-items: center; gap: 9px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex: none;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, #3b82f6, #6d3bd1);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px; letter-spacing: -.02em;
  flex: none;
}
.brand-text { min-width: 0; }
.brand-name {
  font-size: 13px; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; line-height: 1.2;
}
.brand-sub { font-size: 11px; color: #8792a6; line-height: 1.3; }

.nav { flex: 1; overflow-y: auto; padding: 10px 8px 16px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: #2b323f; border-radius: 3px; }

.nav-section {
  font-size: 10px; font-weight: 650; letter-spacing: .09em;
  text-transform: uppercase; color: #6b7689;
  padding: 14px 10px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin: 1px 0;
  border-radius: var(--radius-sm);
  color: #b7c0cf; font-size: 13px; font-weight: 500;
  cursor: pointer; border: none; background: none; width: 100%;
  text-align: left; font-family: inherit;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #e8ecf3; text-decoration: none; }
.nav-item.active { background: var(--blue); color: #fff; }
.nav-item.active:hover { background: var(--blue-strong); }
.nav-item svg { opacity: .9; }
.nav-item .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-sub { padding-left: 22px; }
.nav-sub .nav-item { font-size: 12.5px; padding: 6px 10px; }

/* A count badge. Amber/red only when it means "needs attention". */
.nav-badge {
  font-size: 11px; font-weight: 600; padding: 1px 6px;
  border-radius: 20px; background: rgba(255,255,255,.12); color: #d6dce6;
  font-variant-numeric: tabular-nums; flex: none;
}
.nav-badge.warn { background: var(--amber); color: #fff; }
.nav-badge.bad  { background: var(--red); color: #fff; }

.sidebar-foot {
  flex: none; border-top: 1px solid rgba(255,255,255,.07);
  padding: 10px 12px calc(10px + var(--sab));
}
.user-chip {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: none; border: none; padding: 6px; border-radius: var(--radius-sm);
  cursor: pointer; color: inherit; font-family: inherit; text-align: left;
}
.user-chip:hover { background: rgba(255,255,255,.06); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: #2f3745; color: #dfe5ee;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 650; letter-spacing: .02em;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.md { width: 36px; height: 36px; font-size: 13px; }
.user-meta { min-width: 0; flex: 1; }
.user-name {
  font-size: 12.5px; font-weight: 600; color: #e8ecf3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role { font-size: 11px; color: #8792a6; }

/* ---- header ---- */
.header {
  grid-area: header;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: calc(var(--header-h) + var(--sat));
  padding: var(--sat) 20px 0;
  padding-right: calc(20px + var(--sar));
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 30;
}

.menu-toggle { display: none; }

.search-wrap { position: relative; flex: 1; max-width: 520px; }
.search-input {
  width: 100%; height: 34px;
  padding: 0 34px 0 34px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  font-family: inherit; font-size: 13px; color: var(--text);
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus {
  outline: none; background: var(--surface);
  border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak);
}
.search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.search-kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 10.5px; color: var(--text-3); font-family: var(--mono);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 4px;
  background: var(--surface); pointer-events: none;
}

.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-3);
  max-height: 68vh; overflow-y: auto; z-index: 60; padding: 6px;
}
.search-group-label {
  font-size: 10px; font-weight: 650; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-3);
  padding: 8px 10px 4px;
}
.search-hit {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  font-family: inherit; color: inherit;
}
.search-hit:hover, .search-hit.cursor { background: var(--blue-weak); }
.search-hit-main { flex: 1; min-width: 0; }
.search-hit-title {
  font-size: 13px; font-weight: 550;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-hit-sub {
  font-size: 11.5px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ---- main ---- */
.main {
  grid-area: main;
  padding: 20px;
  padding-left: calc(20px + var(--sal));
  padding-right: calc(20px + var(--sar));
  padding-bottom: calc(28px + var(--sab));
  min-width: 0;
}

.page-head {
  display: flex; align-items: flex-start; gap: 14px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.page-title-block { flex: 1; min-width: 220px; }
.page-sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* =====================================================================
   Buttons
   ===================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 550;
  cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover:not(:disabled) { background: var(--surface-sunken); text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--blue-strong); border-color: var(--blue-strong); }

.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a72a18; border-color: #a72a18; }

.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-sunken); }

.btn-sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }
.btn-block { width: 100%; }

.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn.active { background: var(--blue-weak); border-color: var(--blue); color: var(--blue-strong); z-index: 1; }

/* =====================================================================
   Cards / KPIs
   ===================================================================== */

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }

.grid { display: grid; gap: 14px; }
.kpi-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}

.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 14px;
  box-shadow: var(--shadow-1);
  cursor: pointer; text-align: left; width: 100%;
  font-family: inherit; display: block;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.kpi:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.kpi:focus-visible { border-color: var(--blue); }
.kpi[disabled] { cursor: default; }
.kpi[disabled]:hover { border-color: var(--border); box-shadow: var(--shadow-1); }

.kpi-label {
  font-size: 11.5px; color: var(--text-2); font-weight: 550;
  display: flex; align-items: center; gap: 5px;
}
.kpi-value {
  font-size: 25px; font-weight: 650; letter-spacing: -.02em;
  margin-top: 5px; line-height: 1.1;
}
.kpi-foot { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

.kpi.tone-good  .kpi-value { color: var(--green); }
.kpi.tone-bad   .kpi-value { color: var(--red); }
.kpi.tone-warn  .kpi-value { color: var(--amber); }
.kpi.tone-info  .kpi-value { color: var(--blue); }

/* An unmeasured KPI is muted and reads "not measured", never 0. */
.kpi.unmeasured .kpi-value { color: var(--text-3); font-size: 15px; font-weight: 550; }

/* =====================================================================
   Badges, chips, pills
   ===================================================================== */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
  white-space: nowrap; border: 1px solid transparent;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }

.badge.neutral { background: var(--slate-weak);  color: var(--slate);  border-color: #dde2ea; }
.badge.info    { background: var(--blue-weak);   color: var(--blue-strong); border-color: #d6e2ff; }
.badge.good    { background: var(--green-weak);  color: var(--green);  border-color: #c8e9d9; }
.badge.warn    { background: var(--amber-weak);  color: var(--amber);  border-color: #f3dcb4; }
.badge.dead    { background: var(--red-weak);    color: var(--red);    border-color: #f6cfc9; }
.badge.done    { background: var(--violet-weak); color: var(--violet); border-color: #ddd0f8; }
.badge.muted   { background: var(--surface-sunken); color: var(--text-3); border-color: var(--border); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 6px 3px 10px; border-radius: 20px;
  background: var(--blue-weak); color: var(--blue-strong);
  border: 1px solid #d6e2ff;
  font-size: 12px; font-weight: 550; white-space: nowrap;
}
.chip button {
  border: none; background: none; cursor: pointer; padding: 2px;
  display: grid; place-items: center; color: inherit; border-radius: 50%;
  opacity: .65;
}
.chip button:hover { opacity: 1; background: rgba(37,99,235,.14); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* =====================================================================
   Tables
   ===================================================================== */

/* Every table is inside one of these, or a wide table drags the whole
   page sideways on a phone. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}
.table-scroll::-webkit-scrollbar { height: 9px; }
.table-scroll::-webkit-scrollbar-track { background: var(--surface-sunken); }
.table-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }

table.data th {
  text-align: left; font-size: 11px; font-weight: 650;
  letter-spacing: .05em; text-transform: uppercase; color: var(--text-2);
  padding: 9px 12px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--text); background: var(--surface-sunken); }
table.data th .th-inner { display: inline-flex; align-items: center; gap: 4px; }
table.data th .sort-arrow { opacity: .35; }
table.data th.sorted .sort-arrow { opacity: 1; color: var(--blue); }

table.data td {
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr.selected { background: var(--blue-weak); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.num { text-align: right; }
table.data .col-check { width: 36px; padding-right: 0; }

.cell-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cell-title {
  font-weight: 550; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 210px;
}
.cell-sub { font-size: 11.5px; color: var(--text-3); }

/* "Not measured" is muted and explicit. It is never rendered as 0. */
.unmeasured { color: var(--text-3); font-style: normal; }
.masked { color: var(--text-3); font-family: var(--mono); font-size: 12px; }

.row-link { cursor: pointer; }

.table-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2); background: var(--surface-2);
}

/* =====================================================================
   Forms
   ===================================================================== */

.field { margin-bottom: 14px; }
.field-row {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
label.lbl {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-2); margin-bottom: 5px;
}
label.lbl .req { color: var(--red); margin-left: 2px; }

.input, .select, .textarea {
  width: 100%; padding: 7px 10px; min-height: 34px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 13px;
}
.textarea { min-height: 76px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak);
}
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--surface-sunken); color: var(--text-3); cursor: not-allowed;
}
.input.invalid, .select.invalid, .textarea.invalid {
  border-color: var(--red); box-shadow: 0 0 0 3px var(--red-weak);
}
.field-error {
  font-size: 11.5px; color: var(--red); margin-top: 4px;
  display: flex; align-items: flex-start; gap: 4px;
}
.field-hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* A value that came from a platform API rather than a person. Marked
   so nobody mistakes a fetched figure for one somebody verified -
   the same reason "not measured" is never rendered as 0. */
.input.was-fetched, .textarea.was-fetched {
  border-color: #b9d4c6; background: #f6fbf8;
}
.input.was-fetched:focus, .textarea.was-fetched:focus {
  border-color: var(--blue); background: var(--surface);
}

.checkbox, .radio {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; cursor: pointer; user-select: none;
}
.checkbox input, .radio input { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border);
}
.switch-row:last-child { border-bottom: none; }

fieldset.group {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin: 0 0 14px;
}
fieldset.group > legend {
  font-size: 11px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-2); padding: 0 6px;
}

/* =====================================================================
   Info popover - explanatory text is never left open on the page
   ===================================================================== */

.info {
  position: relative; display: inline-flex; align-items: center;
  border: none; background: none; padding: 0; cursor: pointer;
  color: var(--text-3); vertical-align: middle;
}
.info:hover { color: var(--blue); }
.info-pop {
  position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 270px;
  background: var(--sidebar); color: #e6eaf1;
  padding: 9px 11px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 400; line-height: 1.45;
  box-shadow: var(--shadow-3); z-index: 90; text-align: left;
  white-space: normal;
}
.info-pop::before {
  content: ""; position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-bottom-color: var(--sidebar);
}
.info-pop.left { left: auto; right: 0; transform: none; }
.info-pop.left::before { left: auto; right: 10px; transform: none; }

/* =====================================================================
   Modal / drawer / dialog
   ===================================================================== */

.overlay {
  position: fixed; inset: 0; background: rgba(16,19,26,.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px; z-index: 100; overflow-y: auto;
  animation: fade .14s ease;
}
@keyframes fade { from { opacity: 0; } }

.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3); width: 100%; max-width: 560px;
  margin-bottom: 5vh; animation: pop .16s cubic-bezier(.2,.8,.3,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.99); } }
.modal.wide { max-width: 860px; }
.modal.xwide { max-width: 1080px; }
.modal.narrow { max-width: 420px; }

.modal-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15.5px; font-weight: 650; flex: 1; }
.modal-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.modal-body { padding: 18px; max-height: 66vh; overflow-y: auto; }
.modal-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 13px 18px; border-top: 1px solid var(--border);
  background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  flex-wrap: wrap;
}
.modal-foot .spacer { margin-right: auto; }

/* =====================================================================
   Toast
   ===================================================================== */

.toasts {
  position: fixed; z-index: 200;
  right: calc(16px + var(--sar));
  bottom: calc(16px + var(--sab));
  display: flex; flex-direction: column; gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
}
.toast {
  background: var(--sidebar); color: #e9edf3;
  border-radius: var(--radius); padding: 11px 13px;
  box-shadow: var(--shadow-3); font-size: 13px;
  display: flex; align-items: flex-start; gap: 9px;
  animation: slide .18s cubic-bezier(.2,.8,.3,1);
}
@keyframes slide { from { opacity: 0; transform: translateY(10px); } }
.toast.good { border-left: 3px solid var(--green); }
.toast.bad  { border-left: 3px solid var(--red); }
.toast.warn { border-left: 3px solid var(--amber); }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 600; }
.toast-text { color: #b9c2d0; font-size: 12.5px; margin-top: 1px; }
.toast button.close {
  background: none; border: none; color: #8792a6; cursor: pointer;
  padding: 2px; display: grid; place-items: center; border-radius: 4px;
}
.toast button.close:hover { color: #fff; background: rgba(255,255,255,.1); }

/* =====================================================================
   States: empty / loading / error
   ===================================================================== */

.state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 52px 24px; gap: 6px;
}
.state-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface-sunken); color: var(--text-3);
  display: grid; place-items: center; margin-bottom: 6px;
}
.state-title { font-size: 14.5px; font-weight: 600; }
.state-text { font-size: 13px; color: var(--text-2); max-width: 400px; }
.state-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.state.error .state-icon { background: var(--red-weak); color: var(--red); }
.state.error .state-title { color: var(--red); }

.skeleton {
  background: linear-gradient(90deg, var(--surface-sunken) 25%, #e9edf2 37%, var(--surface-sunken) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  border-radius: 5px;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel-line { height: 11px; margin: 8px 0; }
.skel-row { height: 38px; margin: 0 0 1px; border-radius: 0; }

.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--blue);
  animation: spin .7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* A failure banner is the one thing allowed to sit open on the page. */
.banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 14px; border: 1px solid;
}
.banner.bad  { background: var(--red-weak);   border-color: #f0c4bd; color: #8f2517; }
.banner.warn { background: var(--amber-weak); border-color: #edd3a7; color: #7d4700; }
.banner.info { background: var(--blue-weak);  border-color: #cfdeff; color: #1c4ed8; }
.banner.good { background: var(--green-weak); border-color: #bde3d1; color: #0e6b49; }
.banner-body { flex: 1; min-width: 0; }
.banner-title { font-weight: 650; }

/* =====================================================================
   Profile page
   ===================================================================== */

.profile-head {
  display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
  padding: 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.profile-id { flex: 1; min-width: 240px; }
.profile-name { font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
.profile-handle { font-size: 13px; color: var(--text-2); }
.profile-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 9px; font-size: 12.5px; color: var(--text-2);
}
.profile-meta span { display: inline-flex; align-items: center; gap: 5px; }

.metric-strip {
  display: grid; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}
.metric {
  background: var(--surface); padding: 10px 12px;
}
.metric-label { font-size: 11px; color: var(--text-2); font-weight: 550; }
.metric-value { font-size: 16px; font-weight: 650; margin-top: 2px; }
.metric-value.unmeasured { font-size: 12.5px; font-weight: 500; }

.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { height: 0; }
.tab {
  padding: 9px 13px; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 550; color: var(--text-2);
  border-bottom: 2px solid transparent; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab .count {
  font-size: 11px; background: var(--surface-sunken); color: var(--text-2);
  padding: 0 5px; border-radius: 20px; font-variant-numeric: tabular-nums;
}
.tab.active .count { background: var(--blue-weak); color: var(--blue-strong); }

/* ---- timeline ---- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -26px; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
  display: grid; place-items: center; color: var(--text-2);
}
.tl-dot.inbound  { border-color: var(--green); color: var(--green); }
.tl-dot.outbound { border-color: var(--blue);  color: var(--blue); }
.tl-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-2);
}
.tl-when { font-weight: 600; color: var(--text); }
.tl-card {
  margin-top: 6px; padding: 11px 13px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 13px;
}
.tl-message { white-space: pre-wrap; word-break: break-word; }
.tl-response {
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--border);
  color: var(--text-2); white-space: pre-wrap;
}
.tl-foot {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-top: 9px; font-size: 11.5px; color: var(--text-3);
}

/* =====================================================================
   Pipeline board
   ===================================================================== */

.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.board-col {
  flex: none; width: 268px;
  background: var(--surface-sunken); border-radius: var(--radius);
  border: 1px solid var(--border); display: flex; flex-direction: column;
  max-height: 72vh;
}
.board-col-head {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; flex: none;
}
.board-col-title { font-size: 12.5px; font-weight: 650; flex: 1; }
.board-items { padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.board-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 10px; cursor: pointer;
  box-shadow: var(--shadow-1); text-align: left; width: 100%;
  font-family: inherit; font-size: 12.5px;
}
.board-card:hover { border-color: var(--blue); box-shadow: var(--shadow-2); }
.board-card-name { font-weight: 600; font-size: 13px; }
.board-card-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-3); margin-top: 3px;
}

/* =====================================================================
   Charts (inline SVG, no library)
   ===================================================================== */

.chart { width: 100%; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { font-size: 10px; fill: var(--text-3); }
.bar { transition: opacity .12s; }
.bar:hover { opacity: .82; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.legend-swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }

/* Horizontal ranked bars - used for platform/category/city breakdowns */
.hbar-row {
  display: grid; grid-template-columns: 106px 1fr 46px;
  gap: 10px; align-items: center; padding: 5px 0; font-size: 12.5px;
}
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.hbar-track { background: var(--surface-sunken); border-radius: 20px; height: 8px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 20px; background: var(--blue); transition: width .3s; }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Funnel */
.funnel-step {
  display: grid; grid-template-columns: 128px 1fr 58px;
  gap: 10px; align-items: center; padding: 4px 0; font-size: 12.5px;
}
.funnel-track { background: var(--surface-sunken); border-radius: 5px; height: 22px; overflow: hidden; position: relative; }
.funnel-fill { height: 100%; border-radius: 5px; transition: width .3s; }

/* =====================================================================
   Filter panel
   ===================================================================== */

.filters {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow-1);
  /* the dropdown panels hang outside the card */
  overflow: visible; position: relative; z-index: 20;
}
.filters-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px;
}
.filters-body { padding: 4px 12px 12px; border-top: 1px solid var(--border); }
.filter-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
}

/* ---- compact filter dropdowns ----
   Twelve always-open checkbox lists cost ~500px of vertical space
   before a single row of data. Each one collapses to a 30px button
   that opens a panel only while it is being used. */

.filter-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding-top: 10px;
}

.fdrop { position: relative; }

.fdrop-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 9px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
}
.fdrop-btn:hover { background: var(--surface-sunken); }
.fdrop-btn .chev { color: var(--text-3); display: grid; place-items: center; }
.fdrop-btn.active {
  background: var(--blue-weak); border-color: var(--blue); color: var(--blue-strong);
  font-weight: 600;
}
.fdrop-btn.active .chev { color: var(--blue); }
.fdrop-btn.open { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak); }
.fdrop-count {
  font-size: 11px; font-weight: 650; min-width: 16px; text-align: center;
  background: var(--blue); color: #fff; border-radius: 20px; padding: 0 5px;
  font-variant-numeric: tabular-nums;
}

.fdrop-panel {
  position: absolute; top: calc(100% + 5px); left: 0; z-index: 70;
  width: 232px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-3); padding: 8px;
}
.fdrop-panel.align-right { left: auto; right: 0; }
.fdrop-panel.wide { width: 268px; }

.fdrop-search {
  width: 100%; height: 30px; padding: 0 8px; margin-bottom: 6px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 12.5px; background: var(--surface-sunken);
}
.fdrop-search:focus {
  outline: none; border-color: var(--blue); background: var(--surface);
}

.fdrop-list { max-height: 208px; overflow-y: auto; margin: 0 -2px; }
.fdrop-list label {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: var(--radius-sm);
  font-size: 12.5px; cursor: pointer;
}
.fdrop-list label:hover { background: var(--surface-sunken); }
.fdrop-list label.hidden { display: none; }
.fdrop-list input { accent-color: var(--blue); cursor: pointer; flex: none; }
.fdrop-list .none {
  padding: 10px 6px; font-size: 12px; color: var(--text-3); text-align: center;
}

.fdrop-actions {
  display: flex; gap: 6px; align-items: center;
  margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--border);
}
.fdrop-actions button {
  border: none; background: none; cursor: pointer; color: var(--blue);
  font-family: inherit; font-size: 12px; padding: 3px 6px;
  border-radius: 4px;
}
.fdrop-actions button:hover { background: var(--blue-weak); }
.fdrop-actions .count { margin-left: auto; font-size: 11.5px; color: var(--text-3); }

/* range variant - two inputs inside the panel */
.fdrop-range { display: flex; align-items: center; gap: 6px; }
.fdrop-range .input { height: 32px; font-size: 12.5px; min-width: 0; }
.fdrop-range .sep { color: var(--text-3); font-size: 12px; flex: none; }
.fdrop-hint { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

@media (max-width: 560px) {
  .fdrop-panel { width: min(268px, calc(100vw - 40px)); }
  .filter-row { gap: 5px; }
}
.range-pair { display: flex; align-items: center; gap: 6px; }
.range-pair .input { min-width: 0; }
.range-sep { color: var(--text-3); font-size: 12px; flex: none; }

.multi {
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  max-height: 128px; overflow-y: auto; padding: 5px; background: var(--surface);
}
.multi label {
  display: flex; align-items: center; gap: 7px; padding: 3px 5px;
  border-radius: 4px; font-size: 12.5px; cursor: pointer;
}
.multi label:hover { background: var(--surface-sunken); }

/* =====================================================================
   Duplicate warning
   ===================================================================== */

.dupe {
  border: 1px solid #f0c4bd; background: var(--red-weak);
  border-radius: var(--radius); padding: 13px; margin-bottom: 13px;
}
.dupe.possible { border-color: #edd3a7; background: var(--amber-weak); }
.dupe-head { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 10px; }
.dupe-title { font-weight: 650; font-size: 13.5px; color: #8f2517; }
.dupe.possible .dupe-title { color: #7d4700; }
.dupe-match {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 11px; margin-top: 8px;
  display: flex; gap: 11px; align-items: center; flex-wrap: wrap;
}
.dupe-reasons {
  font-size: 11.5px; color: var(--text-2); margin-top: 5px;
  display: flex; flex-direction: column; gap: 2px;
}

/* =====================================================================
   Login
   ===================================================================== */

.login-page {
  min-height: 100vh; display: grid; place-items: center;
  padding: calc(24px + var(--sat)) 16px calc(24px + var(--sab));
  background:
    radial-gradient(900px 480px at 12% -12%, #1d2432 0%, transparent 62%),
    radial-gradient(760px 420px at 108% 108%, #1b2b46 0%, transparent 58%),
    var(--sidebar);
}
.login-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,.34);
  width: 100%; max-width: 396px; padding: 30px;
}
.login-brand {
  display: flex; align-items: center; gap: 10px;
  justify-content: center; margin-bottom: 6px;
}
.login-title { font-size: 19px; font-weight: 650; text-align: center; }
.login-sub { font-size: 13px; color: var(--text-2); text-align: center; margin: 4px 0 22px; }
.login-demo {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-2);
}

/* ---- numpad PIN entry ----
   Used from a phone home-screen icon several times a day, so the keys
   are 56px minimum: comfortably above the ~44px touch-target floor. */

.pin-dots {
  display: flex; justify-content: center; gap: 14px;
  margin: 20px 0 22px;
}
.pin-dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.6px solid var(--border-strong); background: transparent;
  transition: background .12s, border-color .12s, transform .12s;
}
.pin-dot.filled {
  background: var(--blue); border-color: var(--blue);
  transform: scale(1.12);
}
.pin-dot.bad { border-color: var(--red); background: var(--red); }

.numpad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin: 0 auto; max-width: 288px;
}
.numpad-key {
  height: 56px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-family: var(--mono); font-size: 21px; font-weight: 500;
  color: var(--text); cursor: pointer; user-select: none;
  display: grid; place-items: center;
  transition: background .1s, transform .06s, border-color .1s;
  -webkit-tap-highlight-color: transparent;
}
.numpad-key:hover:not(:disabled) { background: var(--surface-sunken); }
.numpad-key:active:not(:disabled) {
  background: var(--blue-weak); border-color: var(--blue); transform: scale(.96);
}
.numpad-key:disabled { opacity: .4; cursor: not-allowed; }
.numpad-key.wide { font-family: var(--font); font-size: 13px; font-weight: 550; }
.numpad-key.ghost { border-color: transparent; background: transparent; }
.numpad-key.ghost:hover:not(:disabled) { background: var(--surface-sunken); }

/* The identity field sits above the pad. It is remembered per device,
   so the usual interaction is: glance, then four taps. */
.pin-who { position: relative; }
.pin-who .input { text-align: center; font-weight: 550; }
.pin-who .switch-user {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; color: var(--text-3);
  padding: 4px; border-radius: 4px; display: grid; place-items: center;
}
.pin-who .switch-user:hover { color: var(--blue); background: var(--blue-weak); }

.pin-busy { display: grid; place-items: center; height: 56px; }

.login-alt {
  margin-top: 16px; text-align: center; font-size: 12.5px;
}
.login-alt button {
  border: none; background: none; color: var(--blue); cursor: pointer;
  font-family: inherit; font-size: inherit; padding: 4px 6px; border-radius: 4px;
}
.login-alt button:hover { background: var(--blue-weak); text-decoration: underline; }

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}
.shake { animation: shake .4s cubic-bezier(.36,.07,.19,.97); }
.login-demo code {
  font-family: var(--mono); font-size: 11.5px;
  background: var(--surface-sunken); padding: 1px 5px; border-radius: 4px;
  color: var(--text);
}

/* =====================================================================
   Utilities
   ===================================================================== */

.muted    { color: var(--text-2); }
.dim      { color: var(--text-3); }
.small    { font-size: 12px; }
.xsmall   { font-size: 11.5px; }
.strong   { font-weight: 600; }
.mono     { font-family: var(--mono); font-size: 12px; }
.nowrap   { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right    { text-align: right; }
.center   { text-align: center; }

.row      { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col      { display: flex; flex-direction: column; gap: 8px; }
.spacer   { flex: 1; }

.mt-0 { margin-top: 0; }  .mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }

.hide { display: none !important; }

.text-good { color: var(--green); }
.text-bad  { color: var(--red); }
.text-warn { color: var(--amber); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.dl { display: grid; grid-template-columns: 152px 1fr; gap: 7px 14px; font-size: 13px; }
.dl dt { color: var(--text-2); font-size: 12.5px; }
.dl dd { margin: 0; word-break: break-word; }

/* =====================================================================
   Responsive
   ===================================================================== */

@media (max-width: 1024px) {
  .dl { grid-template-columns: 128px 1fr; }
}

@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; grid-template-areas: "header" "main"; }

  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0;
    width: 262px; transform: translateX(-100%);
    transition: transform .2s cubic-bezier(.2,.8,.3,1);
    box-shadow: var(--shadow-3);
  }
  .sidebar.open { transform: translateX(0); }

  .scrim {
    position: fixed; inset: 0; background: rgba(16,19,26,.45); z-index: 39;
  }

  .menu-toggle { display: inline-flex; }
  .main { padding: 14px; padding-bottom: calc(24px + var(--sab)); }
  .header { padding-left: calc(12px + var(--sal)); padding-right: calc(12px + var(--sar)); gap: 8px; }

  .kpi-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 9px; }
  .kpi-value { font-size: 21px; }

  .search-kbd { display: none; }
  .modal-body { max-height: 74vh; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dt { margin-top: 8px; }
  .profile-name { font-size: 18px; }
}

@media (max-width: 560px) {
  .page-head { gap: 10px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .overlay { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; max-width: none; margin: 0; }
  .modal-foot { border-radius: 0; position: sticky; bottom: 0; }
  .modal-body { max-height: none; }
  .hbar-row { grid-template-columns: 84px 1fr 40px; }
  .funnel-step { grid-template-columns: 96px 1fr 44px; }
}

@media print {
  .sidebar, .header, .page-actions, .filters { display: none !important; }
  .app { grid-template-columns: 1fr; grid-template-areas: "main"; }
  .card { box-shadow: none; border-color: #ccc; }
}

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

/* =====================================================================
   Influencers v2 - the simplified list, Add form and one-page profile
   (2026-10-03). Same tokens and house rules as everything above:
   colour is status only, edge-pinned things add the safe-area inset.
   ===================================================================== */

/* ---- header bell carries the follow-up count now ---- */
#followupBtn { position: relative; }
.bell-badge {
  position: absolute; top: 1px; right: 0;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  color: #fff; font-variant-numeric: tabular-nums; pointer-events: none;
}
.bell-badge.bad  { background: var(--red); }
.bell-badge.warn { background: var(--amber); }

.avatar.xl { width: 76px; height: 76px; font-size: 25px; }

/* ---- status as a dropdown that looks like its badge ---- */
.status-pick {
  appearance: none; -webkit-appearance: none;
  font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.4;
  padding: 3px 24px 3px 10px; border-radius: 20px; cursor: pointer;
  border: 1px solid transparent; max-width: 100%;
  background-repeat: no-repeat; background-position: right 8px center; background-size: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%235a6472%22 stroke-width=%222.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22m6 9 6 6 6-6%22/%3E%3C/svg%3E");
}
.status-pick:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.status-pick:disabled { opacity: .6; cursor: progress; }
.status-pick option, .status-pick optgroup { color: var(--text); background: var(--surface); font-weight: 500; }
.status-pick.tone-neutral { background-color: var(--slate-weak);  color: var(--slate);  border-color: #dde2ea; }
.status-pick.tone-info    { background-color: var(--blue-weak);   color: var(--blue-strong); border-color: #d6e2ff; }
.status-pick.tone-good    { background-color: var(--green-weak);  color: var(--green);  border-color: #c8e9d9; }
.status-pick.tone-warn    { background-color: var(--amber-weak);  color: var(--amber);  border-color: #f3dcb4; }
.status-pick.tone-dead    { background-color: var(--red-weak);    color: var(--red);    border-color: #f6cfc9; }
.status-pick.tone-done    { background-color: var(--violet-weak); color: var(--violet); border-color: #ddd0f8; }
.status-pick.tone-muted   { background-color: var(--surface-sunken); color: var(--text-3); border-color: var(--border); }
.status-pick.lg { font-size: 13px; padding: 6px 28px 6px 12px; min-width: 168px; }

/* ---- the list ---- */
.inf-table td { vertical-align: top; }
.inf-table td.col-check, .inf-table td.col-status { vertical-align: middle; }
.inf-table .col-influencer { min-width: 210px; }
.inf-table .col-plan { min-width: 200px; max-width: 260px; }
.inf-table .col-email { max-width: 200px; }
.inf-table .col-instagram, .inf-table .col-youtube { max-width: 170px; }
.inf-table .cell-title { max-width: 220px; }
.cell-link {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  color: var(--blue); min-width: 0;
}
.cell-link .truncate { min-width: 0; }
/* Instagram at a glance under the name (v1.3.0): the numbers the team
   shortlists on, visible without opening the profile. */
.inf-stats { display: flex; flex-wrap: wrap; gap: 4px 5px; margin-top: 6px; }
.inf-stat {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; line-height: 1.25; color: var(--text-2); white-space: nowrap;
  background: var(--surface-sunken); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 8px;
}
.inf-stat b { font-weight: 650; color: var(--text); }
.inf-stat svg { flex: none; color: var(--text-3); }
.inf-stat.muted { color: var(--text-3); background: none; border-style: dashed; }
.inf-stat.waiting { color: var(--amber); background: var(--amber-weak); border-color: #f3dcb4; }
.inf-stat.waiting b, .inf-stat.waiting svg { color: var(--amber); }
.sort-pick { width: auto; min-height: 28px; height: 28px; padding: 2px 8px; font-size: 12.5px; }

.plan-cell {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 12.5px; color: var(--text-2); line-height: 1.45;
  white-space: normal;
}

/* Eleven columns scroll sideways below ~1600px; the name stays pinned
   so a row never loses whose it is. */
@media (min-width: 721px) {
  .inf-table th.col-check, .inf-table td.col-check {
    position: sticky; left: 0; z-index: 1; width: 40px; min-width: 40px; background: var(--surface);
  }
  .inf-table th.col-influencer, .inf-table td.col-influencer {
    position: sticky; left: 0; z-index: 1; background: var(--surface);
    box-shadow: inset -1px 0 0 var(--border);
  }
  .inf-table.has-check th.col-influencer, .inf-table.has-check td.col-influencer { left: 40px; }
  .inf-table thead th.col-check, .inf-table thead th.col-influencer { z-index: 3; background: var(--surface-2); }
  .inf-table tbody tr:hover td.col-check, .inf-table tbody tr:hover td.col-influencer { background: var(--surface-2); }
  .inf-table tbody tr.selected td.col-check, .inf-table tbody tr.selected td.col-influencer { background: var(--blue-weak); }
}

.sub-list .lbl {
  font-size: 10.5px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 4px;
}

/* On a phone each row becomes a compact card: who, status, next step. */
@media (max-width: 720px) {
  .inf-table thead { display: none; }
  .inf-table, .inf-table tbody { display: block; }
  .inf-table tr.row-link {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px;
    padding: 12px 12px 12px 10px; border-bottom: 1px solid var(--border);
  }
  .inf-table td { display: block; border: none; padding: 0; min-width: 0; max-width: none; }
  .inf-table td.col-check { grid-column: 1; grid-row: 1; padding-top: 10px; }
  .inf-table td.col-influencer { grid-column: 2; grid-row: 1; min-width: 0; }
  .inf-table td.col-status { grid-column: 3; grid-row: 1; justify-self: end; }
  .inf-table td.col-plan, .inf-table td.col-next, .inf-table td.col-doneBy,
  .inf-table td.col-instagram, .inf-table td.col-phone { grid-column: 2 / 4; }
  .inf-table td.col-next .cell-sub { display: inline; margin-left: 6px; }
  .inf-table td.col-doneBy::before, .inf-table td.col-next::before {
    content: attr(data-label); display: inline-block; min-width: 92px;
    font-size: 11px; color: var(--text-3); font-weight: 600;
  }
  .inf-table td.col-doneBy .cell-main, .inf-table td.col-next .badge { display: inline-flex; }
  .inf-table td.col-email, .inf-table td.col-youtube,
  .inf-table td.col-created, .inf-table td.col-updated { display: none; }
  .inf-table .cell-title { max-width: none; white-space: normal; }
  .inf-table .status-pick { max-width: 150px; }
  /* 16px: iOS zooms the page into any smaller field on focus */
  .sort-pick { font-size: 16px; height: 34px; min-height: 34px; }

  /* v1.3.0 - the card gives the name its full width. With the status in a
     third column, a <select> sizes itself to its LONGEST option: measured at
     375px it took 174px and left the name 24px, so every name was cut to
     "B..." and the card stood 425px tall. The status now sits under the name. */
  .inf-table tr.row-link { grid-template-columns: auto minmax(0, 1fr); }
  .inf-table td.col-influencer { grid-column: 2 / -1; grid-row: 1; }
  .inf-table td.col-status { grid-column: 2 / -1; grid-row: 2; justify-self: start; }
  .inf-table td.col-plan, .inf-table td.col-next, .inf-table td.col-doneBy,
  .inf-table td.col-instagram, .inf-table td.col-phone { grid-column: 2 / -1; }
  .inf-table .cell-main { align-items: flex-start; }
  /* `table.data td` (0,1,2) outranks this block's `.inf-table td` (0,1,1),
     so the desktop padding + row borders were landing INSIDE every card. */
  table.data.inf-table td { border-bottom: none; padding: 0; }
  .inf-table td.col-phone:has(> .unmeasured:only-child) { display: none; }
  .inf-table .status-pick { font-size: 16px; max-width: 100%; }
  .search-input { font-size: 16px; }
}

/* ---- Add form ---- */
.add-form { display: grid; gap: 14px; }
.add-pair { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.add-sec .card-body { padding-bottom: 6px; }
.sec-letter {
  width: 22px; height: 22px; border-radius: 6px; flex: none;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--surface-sunken); color: var(--text-2);
}
.add-basic { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.photo-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 112px; }
.photo-pick .avatar { color: var(--text-3); background: var(--surface-sunken); border: 1px dashed var(--border-strong); }
.form-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px;
}
@media (max-width: 560px) {
  .photo-pick { width: 100%; flex-direction: row; justify-content: flex-start; }
  .form-actions {
    position: sticky; bottom: 0; z-index: 20; margin: 16px -14px 0;
    padding: 10px 14px calc(10px + var(--sab)); background: var(--surface);
    border-top: 1px solid var(--border);
  }
  .form-actions .btn { flex: 1; }
}

/* ---- profile: head ---- */
.pf-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px;
  padding: 18px; align-items: start; margin-bottom: 14px;
}
.pf-head.is-editing { display: block; padding: 0; }
.pf-photo-btn {
  position: relative; border: none; background: none; padding: 0; cursor: pointer;
  border-radius: 50%; display: block;
}
.pf-photo-edit {
  position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-1);
}
.pf-photo-btn:hover .pf-photo-edit { color: var(--blue); border-color: var(--blue); }
.pf-id { min-width: 0; }
.pf-name { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; word-break: break-word; }
.pf-sub {
  display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px;
  font-size: 13px; color: var(--text-2);
}
.pf-sub span { display: inline-flex; align-items: center; gap: 5px; }
.pf-reach { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.reach {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 5px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 550;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
}
a.reach:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.reach.masked { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.pf-side { display: flex; flex-direction: column; gap: 10px; min-width: 210px; }
.pf-side-row { display: flex; flex-direction: column; gap: 4px; }
.pf-side-label {
  font-size: 10.5px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
}
.pf-side .select { min-height: 32px; }
.pf-doneby { display: inline-flex; align-items: center; gap: 8px; font-weight: 550; }
.pf-stamp { line-height: 1.45; max-width: 240px; }

/* ---- profile: what matters today ---- */
.key-grid {
  display: grid; gap: 14px; margin-bottom: 14px;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}
.key-card { padding: 14px 16px; }
.key-money { grid-column: 1 / -1; }
.key-label {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-2);
}
.plan-input { min-height: 84px; font-size: 13.5px; }
.plan-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; min-height: 28px; }
.plan-read { white-space: pre-wrap; font-size: 13.5px; }
.key-next { border-left: 3px solid var(--border-strong); }
.key-next.tone-overdue  { border-left-color: var(--red); }
.key-next.tone-today    { border-left-color: var(--amber); }
.key-next.tone-upcoming { border-left-color: var(--blue); }
.next-date { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin-bottom: 4px; }
.next-none { font-size: 15px; color: var(--text-3); font-weight: 550; }
.next-note { margin-top: 8px; font-size: 13px; color: var(--text-2); white-space: pre-wrap; }

.trio { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.trio-cell {
  flex: 1 1 140px; text-align: left; font-family: inherit; color: inherit;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
button.trio-cell { cursor: pointer; }
button.trio-cell:hover { border-color: var(--blue); }
.trio-label { font-size: 11.5px; color: var(--text-2); font-weight: 550; }
.trio-value { font-size: 19px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.trio-value .unmeasured { font-size: 14px; font-weight: 500; }
.trio-arrow { display: grid; place-items: center; color: var(--text-3); }
.trio-gap { margin-top: 8px; font-size: 12px; color: var(--text-2); }

/* ---- profile: sections ---- */
.pf-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-grid .span-2 { grid-column: 1 / -1; }
.pf-grid > section:empty { display: none; }
.pf-sec .card-head .btn { flex: none; }
.pf-sec.is-editing, .pf-head.is-editing { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak); }
.edit-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border);
}

.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13px; }
.kv dt { color: var(--text-2); font-size: 12.5px; }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
.kv-grid { display: grid; gap: 8px 24px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.pre { white-space: pre-wrap; }
.ext-link { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; word-break: break-all; }

.sub-list { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.sub-item {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 0; font-size: 12.5px; min-width: 0;
}

.social-rows { display: flex; flex-direction: column; }
.social-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.social-row:last-child { border-bottom: none; }
.social-main { min-width: 0; font-size: 13px; }
.social-name { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.social-num { text-align: right; font-weight: 650; font-size: 14px; }

/* the three follow-ups */
.slots { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.slot {
  border: 1px solid var(--border); border-left: 3px solid var(--border-strong);
  border-radius: var(--radius); padding: 12px; background: var(--surface);
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.slot.tone-overdue     { border-left-color: var(--red); }
.slot.tone-today       { border-left-color: var(--amber); }
.slot.tone-upcoming    { border-left-color: var(--blue); }
.slot.tone-done        { border-left-color: var(--green); }
.slot.tone-no_response { border-left-color: var(--red); }
.slot.empty { border-style: dashed; border-left-width: 1px; background: var(--surface-2); align-items: flex-start; }
.slot.editing { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak); }
.slot-head { display: flex; align-items: center; gap: 6px; min-height: 28px; }
.slot-num {
  font-size: 10.5px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-2);
}
.slot-date { font-size: 16px; font-weight: 650; }
.slot-when { color: var(--text-2); min-height: 17px; }
.slot.tone-overdue .slot-when { color: var(--red); font-weight: 600; }
.slot.tone-today .slot-when { color: var(--amber); font-weight: 600; }
.slot-note { font-size: 12.5px; white-space: pre-wrap; word-break: break-word; flex: 1; }
.slot-empty-text { color: var(--text-3); font-size: 13px; margin-bottom: 4px; }
.slot-form .field { margin-bottom: 10px; }

/* segmented control: one tap to set a state */
.seg {
  display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface); max-width: 100%;
}
.seg-btn {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 550; color: var(--text-2);
  padding: 6px 10px; min-height: 32px; white-space: nowrap;
  border-left: 1px solid var(--border); flex: 1;
}
.seg-btn:first-child { border-left: none; }
.seg-btn:hover:not(:disabled):not(.on) { background: var(--surface-sunken); color: var(--text); }
.seg-btn:disabled { cursor: default; }
.seg-btn.on { font-weight: 650; }
.seg-btn.on.tone-neutral { background: var(--slate-weak); color: var(--slate); }
.seg-btn.on.tone-good    { background: var(--green-weak); color: var(--green); }
.seg-btn.on.tone-dead    { background: var(--red-weak);   color: var(--red); }
.slot .seg { width: 100%; }

/* files */
.file-list { display: flex; flex-direction: column; }
.file-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--border); font-size: 13px; min-width: 0; flex-wrap: wrap;
}
.file-item:last-child { border-bottom: none; }
.file-item > a { flex: 1 1 140px; min-width: 0; }
label.btn.busy { opacity: .6; pointer-events: none; }

/* approvals */
.appr-list { display: flex; flex-direction: column; }
.appr-row {
  display: grid; grid-template-columns: 170px auto minmax(0, 1fr) 150px;
  gap: 10px 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border);
}
.appr-row:last-child { border-bottom: none; }
.appr-name { font-weight: 600; font-size: 13px; }
.appr-note { font-size: 12.5px; color: var(--text-2); min-width: 0; }
.input-sm { min-height: 30px; padding: 4px 9px; font-size: 12.5px; }

/* more details, closed by default */
.pf-more > summary {
  list-style: none; cursor: pointer; padding: 12px 16px;
  display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px;
}
.pf-more > summary::-webkit-details-marker { display: none; }
.pf-more > summary svg { transition: transform .15s; color: var(--text-3); }
.pf-more[open] > summary svg { transform: rotate(90deg); }
.pf-more[open] > summary { border-bottom: 1px solid var(--border); }

/* activity */
.tl-simple { list-style: none; margin: 0; padding: 0; }
.tl-row {
  display: grid; grid-template-columns: 22px 92px minmax(0, 1fr) auto;
  gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.tl-row:last-child { border-bottom: none; }
.tl-ico { color: var(--text-3); align-self: center; display: grid; place-items: center; }
.tl-date { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12.5px; }
.tl-text { word-break: break-word; }
.tl-who { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.log-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.log-row { display: grid; grid-template-columns: 150px 130px minmax(0, 1fr) auto; gap: 8px; }

.pf-danger { display: flex; justify-content: flex-end; margin-top: 18px; }

/* the mobile dock - hidden on wider screens */
.pf-dock { display: none; }

@media (max-width: 1100px) {
  .pf-head { grid-template-columns: auto minmax(0, 1fr); }
  .pf-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; }
  .pf-stamp { max-width: none; }
  .appr-row { grid-template-columns: 150px auto minmax(0, 1fr); }
  .appr-by { grid-column: 2 / -1; }
}

@media (max-width: 880px) {
  .pf-grid, .key-grid { grid-template-columns: minmax(0, 1fr); }
  .slots { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: 112px minmax(0, 1fr); }
  .log-row { grid-template-columns: 1fr 1fr; }
  .log-row .input { grid-column: 1 / -1; }
  .log-row .btn { grid-column: 1 / -1; }
  .appr-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .appr-by { grid-column: auto; }
  .tl-row { grid-template-columns: 20px 78px minmax(0, 1fr); }
  .tl-who { grid-column: 3; }
}

@media (max-width: 720px) {
  .pf { padding-bottom: calc(64px + var(--sab)); }
  .pf-head { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 12px; }
  .pf-name { font-size: 19px; }
  .pf-side { flex-direction: column; align-items: stretch; }
  .status-pick.lg { width: 100%; }
  .trio-arrow { display: none; }
  .trio-cell { flex-basis: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .trio-value { font-size: 17px; margin: 0; }

  /* the most-used actions stay in reach of a thumb */
  .pf-dock {
    display: flex; align-items: center; gap: 6px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: 8px calc(10px + var(--sar)) calc(8px + var(--sab)) calc(10px + var(--sal));
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(16, 19, 26, .08);
  }
  .pf-dock .status-pick, .pf-dock > .badge { flex: 1 1 auto; min-width: 0; font-size: 13px; padding-top: 8px; padding-bottom: 8px; }
  .dock-btn {
    flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px;
    min-width: 58px; min-height: 44px; justify-content: center; padding: 2px 6px;
    border: none; background: none; color: var(--text-2); font-family: inherit;
    font-size: 10.5px; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer;
  }
  .dock-btn:hover, .dock-btn:active { background: var(--surface-sunken); color: var(--blue); text-decoration: none; }
  body:has(.pf-dock) .toasts { bottom: calc(76px + var(--sab)); }
}

/* =====================================================================
   Side panel on the Influencers list (2026-10-03): click a name, the
   profile opens on the right, the list stays usable behind it.
   ===================================================================== */

/* The name is a real link, so Ctrl/Cmd-click opens the full page. */
a.cell-title { display: block; color: var(--text); }
a.cell-title:hover { color: var(--blue); text-decoration: underline; }

/* The row whose profile is open. Blue = interaction / selection. */
.inf-table tbody tr.is-open td,
.inf-table tbody tr.is-open:hover td,
.inf-table tbody tr.is-open td.col-check,
.inf-table tbody tr.is-open td.col-influencer,
.inf-table tbody tr.is-open:hover td.col-influencer { background: var(--blue-weak); }
.inf-table tbody tr.is-open td.col-influencer { box-shadow: inset 3px 0 0 var(--blue), inset -1px 0 0 var(--border); }

/* Below the header, so search, the bell and Add stay reachable. */
.drawer {
  position: fixed; z-index: 50; right: 0; bottom: 0;
  top: calc(var(--header-h) + var(--sat));
  /* v3: sized like cs.neodrift.in's case drawer, so the table behind stays readable (owner, 2026-10-04) */
  width: min(620px, 46vw);
  display: flex; flex-direction: column;
  background: var(--bg); border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-3);
  transform: translateX(105%); visibility: hidden;
  transition: transform .2s cubic-bezier(.2,.8,.3,1), visibility 0s linear .2s;
}
.drawer.open {
  transform: none; visibility: visible;
  transition: transform .2s cubic-bezier(.2,.8,.3,1), visibility 0s;
}
.drawer-bar {
  flex: none; display: flex; align-items: center; gap: 6px;
  padding: 8px calc(12px + var(--sar)) 8px 12px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.drawer-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px calc(16px + var(--sar)) calc(24px + var(--sab)) 16px;
}

/* ~800px of panel is the width the profile has on an 1100px screen, so
   it takes that layout - but only on screens wide enough that the
   narrower rules further up are not already in force. */
@media (min-width: 881px) {
  .pf.in-drawer .pf-head { grid-template-columns: auto minmax(0, 1fr); }
  .pf.in-drawer .pf-side {
    grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap;
    align-items: flex-end; gap: 12px 18px;
  }
  .pf.in-drawer .pf-stamp { max-width: none; }
  .pf.in-drawer .appr-row { grid-template-columns: 150px auto minmax(0, 1fr); }
  .pf.in-drawer .appr-by { grid-column: 2 / -1; }
}

/* A phone or a narrow window: the panel is the whole screen, over the header
   (cs.neodrift.in's rule - a 46%-wide drawer below 900px is unusable). */
@media (max-width: 899px) {
  .drawer { top: 0; width: 100vw; border-left: none; padding-top: var(--sat); }
  .drawer-bar { padding-left: calc(12px + var(--sal)); }
  /* Thumb-sized: the close and arrow buttons are how you get around here. */
  .drawer-bar .btn { height: 44px; min-width: 44px; }
  .drawer-body { padding-left: calc(12px + var(--sal)); padding-right: calc(12px + var(--sar)); }
}

@media print { .drawer { display: none !important; } }


/* =====================================================================
   v3 (2026-10-04) - the profile inside the side panel is ONE column. The
   panel is ~620px whatever the screen, so the two-column profile rules
   (chosen by screen width) would cram two cards into it.
   ===================================================================== */
.pf.in-drawer .pf-grid, .pf.in-drawer .key-grid { grid-template-columns: minmax(0, 1fr); }
.pf.in-drawer .slots { grid-template-columns: minmax(0, 1fr); }
.pf.in-drawer .kv { grid-template-columns: 112px minmax(0, 1fr); }
.pf.in-drawer .appr-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.pf.in-drawer .appr-by { grid-column: auto; }

/* =====================================================================
   Instagram on the profile (v3, igcard.js): shortlist card, latest posts,
   the DM chat. Colour means status, never decoration - the card is neutral.
   ===================================================================== */
.pf-ig { margin-bottom: 14px; }
.pf-ig[hidden] { display: none; }
.ig-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ig-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--surface-sunken); }
.ig-avatar-blank { display: grid; place-items: center; color: var(--text-3); }
.ig-name { font-weight: 650; font-size: 15px; line-height: 1.25; }
.ig-handle { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); }
.ig-handle:hover { color: var(--blue); }
.ig-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.ig-tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--slate-weak); color: var(--slate); }
.ig-fresh { align-self: start; white-space: nowrap; }
.ig-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.ig-stat { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; }
.ig-stat-v { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-stat-v .unmeasured { font-size: 12px; font-weight: 500; }
.ig-stat-l { font-size: 11px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.ig-bio { margin-top: 12px; font-size: 13px; white-space: pre-wrap; color: var(--text); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ig-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.ig-links a, .ig-links span { display: inline-flex; align-items: center; gap: 4px; }
.ig-trend { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--blue); }
.ig-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; padding: 8px 10px; font-size: 12.5px;
  border-radius: var(--radius-sm); background: var(--amber-weak); color: var(--amber); }
.ig-grid-head { margin: 16px 0 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ig-post { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: var(--surface-sunken); }
.ig-post img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ig-post:hover img { transform: scale(1.03); }
.ig-post:hover { text-decoration: none; }
.ig-post-blank { display: grid; place-items: center; height: 100%; color: var(--text-3); }
.ig-post-kind { position: absolute; top: 6px; right: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.ig-post-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.62)); }
.ig-post-meta svg { vertical-align: -1px; }
.ig-chat { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.ig-chat > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; list-style: none; }
.ig-chat > summary::-webkit-details-marker { display: none; }
.ig-thread { margin-top: 10px; max-height: 460px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 2px;
  display: flex; flex-direction: column; gap: 6px; background: var(--surface-sunken); border-radius: var(--radius-sm); padding: 10px; }
.ig-day { align-self: center; font-size: 11px; color: var(--text-3); margin: 6px 0 2px; }
.ig-msg { display: flex; flex-direction: column; max-width: 82%; }
.ig-msg.in { align-self: flex-start; }
.ig-msg.out { align-self: flex-end; align-items: flex-end; }
.ig-bubble { padding: 7px 11px; border-radius: 14px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
  background: var(--surface); border: 1px solid var(--border); }
.ig-msg.out .ig-bubble { background: var(--blue-weak); border-color: #d5e2ff; }
.ig-who { font-size: 10.5px; color: var(--text-3); margin: 0 4px 1px; }
.ig-time { font-size: 10.5px; color: var(--text-3); margin: 1px 4px 0; font-variant-numeric: tabular-nums; }
/* ---- Chat: Instagram + 767 WhatsApp in one thread, with a reply box (v1.4.0) ---- */
.pf-chat { margin-bottom: 14px; }
.pf-chat[hidden] { display: none; }
.chat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.chat-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.chat-title .dim { font-weight: 500; font-size: 12px; }
.chat-chans { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 1.3; padding: 2px 8px;
  border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); background: var(--surface-sunken);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-pill.open { color: var(--green); background: var(--green-weak); border-color: #bfe5d2; }
.chat-thread { margin-top: 10px; max-height: 420px; min-height: 96px; }
.chat-empty { align-self: center; margin: auto; font-size: 12.5px; }
.ig-time svg { vertical-align: -1px; opacity: .75; }
.ig-msg.failed .ig-bubble { background: var(--red-weak); border-color: #f6cfc9; }
.chat-err { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 2px 4px 0; font-size: 11.5px; color: var(--red); }
.chat-retry { border: 0; background: none; padding: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; }
.chat-compose { margin-top: 10px; }
.chat-tabs { margin-bottom: 6px; }
.chat-tabs .btn { gap: 5px; }
.chat-tabs .btn.active { background: var(--blue-weak); color: var(--blue); border-color: #c9d8fb; position: relative; z-index: 1; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; }
.chat-text { flex: 1; min-height: 44px; }
.chat-send { flex: none; height: 44px; }
.chat-note { margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--text-2); }
.chat-note svg { vertical-align: -2px; }
.chat-note.closed { color: var(--amber); }
.chat-note a { white-space: nowrap; }
/* v1.6.0: starting a chat outside the 24 hours - an Instagram opener, a paid WhatsApp template */
.chat-opener { width: 100%; min-height: 96px; }
.chat-start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.chat-after { font-size: 12px; line-height: 1.45; color: var(--text-2); }
.chat-after svg { vertical-align: -2px; }
.chat-tpl { display: flex; flex-direction: column; gap: 8px; }
.chat-tpl:empty { display: none; }
.chat-tpl-pick { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.chat-tpl-pick .select { width: 100%; }
.chat-tpl-vars { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.chat-tpl-vars:empty { display: none; }
.chat-tpl-var { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--text-2); min-width: 0; }
.chat-tpl-var .input { height: 36px; font-size: 13px; }
.chat-tpl-preview { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 10px;
  background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 10px; }
.chat-tpl-preview .ig-bubble { max-width: 92%; background: var(--blue-weak); border-color: #d5e2ff; }
.chat-tpl-head { display: inline; }
.chat-tpl-hole { color: var(--amber); background: var(--amber-weak); border-radius: 4px; padding: 0 3px; }
.chat-tpl-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 92%; }
.chat-tpl-btn { font-size: 12px; color: var(--blue); background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px; }
.chat-tpl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.chat-cost { flex: 1 1 220px; font-size: 12px; line-height: 1.45; color: var(--amber); }
.chat-cost svg { vertical-align: -2px; }
/* the armed state must stay amber under the mouse: .btn-primary:hover:not(:disabled) is (0,3,0) and won otherwise */
.chat-send.confirm, .chat-send.confirm:hover:not(:disabled) { background: var(--amber); border-color: var(--amber); }
.chat-tag { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-3); margin: 1px 4px 0; }
@media (max-width: 720px) {
  .chat-text { font-size: 16px; }          /* iOS zooms into any smaller field on focus */
  .chat-tpl-var .input, .chat-tpl-pick .select { font-size: 16px; }
  .chat-thread { max-height: 55vh; }
}

@media (max-width: 520px) {
  .ig-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig-head { grid-template-columns: 48px minmax(0, 1fr); }
  .ig-fresh { grid-column: 1 / -1; }
  .ig-avatar { width: 48px; height: 48px; }
}


/* =====================================================================
   Creators (v5, 2026-10-05) - people who CREATE content for Neodrift.
   Same tokens and house rules: colour is status only, every table sits
   in .table-scroll, edge-pinned things add the safe-area inset.
   ===================================================================== */

.pf-danger { gap: 8px; flex-wrap: wrap; }

/* ---- the list ---- */
.cr-table td { vertical-align: top; }
.cr-table td.col-status { vertical-align: middle; }
.cr-table .col-creator { min-width: 220px; }
.cr-table .col-next, .cr-table .col-last { min-width: 150px; max-width: 220px; }
.cr-table .col-email { max-width: 200px; }
@media (min-width: 721px) {
  .cr-table th.col-creator, .cr-table td.col-creator {
    position: sticky; left: 0; z-index: 1; background: var(--surface);
    box-shadow: inset -1px 0 0 var(--border);
  }
  .cr-table thead th.col-creator { z-index: 3; background: var(--surface-2); }
  .cr-table tbody tr:hover td.col-creator { background: var(--surface-2); }
}
.cr-table tbody tr.is-open td,
.cr-table tbody tr.is-open:hover td,
.cr-table tbody tr.is-open td.col-creator,
.cr-table tbody tr.is-open:hover td.col-creator { background: var(--blue-weak); }
.cr-table tbody tr.is-open td.col-creator { box-shadow: inset 3px 0 0 var(--blue), inset -1px 0 0 var(--border); }

/* On a phone each row is a card: who, status, what is next. */
@media (max-width: 720px) {
  .cr-table thead { display: none; }
  .cr-table, .cr-table tbody { display: block; }
  .cr-table tr.row-link {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px;
    padding: 12px; border-bottom: 1px solid var(--border);
  }
  table.data.cr-table td { display: block; border-bottom: none; padding: 0; min-width: 0; max-width: none; }
  .cr-table td.col-next::before, .cr-table td.col-doneBy::before, .cr-table td.col-rate::before {
    content: attr(data-label); display: inline-block; min-width: 118px;
    font-size: 11px; color: var(--text-3); font-weight: 600;
  }
  .cr-table td.col-next > div { display: inline; margin-right: 6px; }
  .cr-table td.col-doneBy .cell-main { display: inline-flex; }
  /* table.data.cr-table, not .cr-table: the display:block above is (0,2,2)
     and would otherwise win, leaving every hidden column on the card. */
  table.data.cr-table td.col-type, table.data.cr-table td.col-content,
  table.data.cr-table td.col-last, table.data.cr-table td.col-contract,
  table.data.cr-table td.col-platform, table.data.cr-table td.col-city,
  table.data.cr-table td.col-phone, table.data.cr-table td.col-email { display: none; }
  .cr-table .status-pick { font-size: 16px; max-width: 100%; }
}

/* ---- profile: summary ---- */
.cr-sum { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cr-sum-cell {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); min-width: 0;
}
.cr-sum-value { margin-top: 3px; font-size: 14px; font-weight: 600; }

/* ---- content created ---- */
.cc-list { display: flex; flex-direction: column; gap: 10px; }
.cc-card {
  border: 1px solid var(--border); border-left: 3px solid var(--border-strong);
  border-radius: var(--radius); padding: 12px 14px; background: var(--surface);
}
.cc-card.tone-info    { border-left-color: var(--blue); }
.cc-card.tone-warn    { border-left-color: var(--amber); }
.cc-card.tone-good    { border-left-color: var(--green); }
.cc-card.tone-done    { border-left-color: var(--violet); }
.cc-card.tone-muted   { border-left-color: var(--border); opacity: .8; }
.cc-head { display: flex; gap: 10px; align-items: flex-start; }
.cc-title { font-weight: 650; font-size: 14px; word-break: break-word; }
.cc-head .status-pick { flex: none; max-width: 180px; }
.cc-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.cc-more { margin-top: 8px; }
.cc-more > summary {
  list-style: none; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--blue);
  display: inline-flex; align-items: center; gap: 4px;
}
.cc-more > summary::-webkit-details-marker { display: none; }
.cc-more > summary svg { transition: transform .15s; }
.cc-more[open] > summary svg { transform: rotate(90deg); }
.cc-more-body { margin-top: 10px; }

.usage-grid { display: grid; gap: 6px 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* ---- files ---- */
.cr-files { display: flex; flex-direction: column; gap: 12px; }
.cr-file-group .lbl {
  font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2); margin-bottom: 2px;
}

@media (max-width: 720px) {
  .cc-head { flex-wrap: wrap; }
  .cc-head .status-pick { max-width: 100%; width: 100%; font-size: 16px; }
}


/* nd-nozoom-2 — owner 2026-11-19 (voice): "whenever I type something or I double click somewhere … accidentally it zooms in.
   Especially … on the numpad login … make sure that zoom in doesn't happen". Two causes, both closed here:
   1. double-tap zoom — two quick taps on a numpad key / button / row read as a double-tap. touch-action:manipulation keeps
      pan + scroll but removes double-tap-to-zoom (iOS 13+, Android Chrome) without delaying or swallowing the 2nd tap.
   2. focus zoom — iOS zooms into any field whose text is under 16px. On touch screens every field is 16px. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
*, *::before, *::after { touch-action: manipulation; }
.numpad-key, button, .btn, a, [role="button"] { -webkit-tap-highlight-color: transparent; }
.numpad, .numpad-key, .pin-dots { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (hover: none), (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select, textarea, .input, .select, .textarea, .input-sm, .search-input, .plan-input,
  .fdrop-range .input, .chat-tpl-var .input { font-size: 16px !important; }
}


/* nd-incoming-v7 (2026-11-19) - the Incoming requests list: one card per conversation, newest first. */
.inc-bar { flex-wrap: wrap; gap: 8px; }
.inc-sel .select { min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
.inc-list { display: flex; flex-direction: column; gap: 10px; }
.inc-card { padding: 12px 14px; border-left: 3px solid transparent; }
.inc-card.is-new { border-left-color: var(--blue); }
.inc-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.inc-ch { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--slate-weak); color: var(--text-2); }
.inc-who { flex: 1 1 220px; min-width: 0; }
.inc-name { font-weight: 620; font-size: 14px; overflow-wrap: anywhere; }
.inc-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.inc-subj { margin-top: 8px; font-weight: 580; font-size: 13px; }
.inc-text { margin-top: 8px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  background: var(--slate-weak); border-radius: var(--radius-sm); padding: 8px 10px; }
.inc-text.open { display: block; -webkit-line-clamp: unset; }
.inc-words { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.inc-words .chip { font-size: 11px; padding: 1px 7px; }
.inc-links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inc-foot { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  border-top: 1px solid var(--border); padding-top: 10px; }
.inc-foot .select { min-height: 32px; max-width: 220px; }
.inc-status.tone-info { color: var(--blue-strong); }
.inc-status.tone-good { color: var(--green); }
.inc-status.tone-warn { color: var(--amber); }
.inc-status.tone-dead { color: var(--red); }
.inc-note { flex-basis: 100%; color: var(--text-2); white-space: pre-wrap; }
.inc-note-edit { margin-top: 8px; }
@media (max-width: 720px) {
  .inc-bar .search-wrap { max-width: 100% !important; flex-basis: 100% !important; }
  .inc-bar .btn-group { flex-wrap: wrap; }
  .inc-sel { flex: 1 1 45%; }
  .inc-sel .select, .inc-foot .select { width: 100%; max-width: 100%; }
  .inc-tags { flex-basis: 100%; }
}


/* =====================================================================
   v1.8.0 (owner 2026-11-20) - Neodrift branding + the three login doors.
   "set all the favicon icons and the necessary logo for branding … on the
   home page and inside the web app" · "three options … Owner, Admin, Executive".
   ===================================================================== */
.login-brand { flex-direction: column; gap: 6px; margin-bottom: 14px; }
.login-logo { display: block; width: 190px; height: auto; }
.login-brand-sub {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3);
}

.door-list, .door-people { display: grid; gap: 10px; }
.door-list[hidden], .door-people[hidden], #pinView[hidden], #pwView[hidden] { display: none !important; }
.login-demo:empty { display: none; }
.door-btn, .door-person {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 56px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-lg, 12px);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 15.5px; font-weight: 600; text-align: left;
  cursor: pointer; transition: border-color .12s, background .12s, transform .06s;
}
.door-btn:hover:not(:disabled), .door-person:hover { border-color: var(--blue); background: var(--blue-weak); }
.door-btn:active:not(:disabled), .door-person:active { transform: scale(.985); }
.door-btn:disabled { opacity: .45; cursor: not-allowed; }
.door-btn .door-label { flex: 1; }
.door-btn > svg:last-child { color: var(--text-3); }
.door-ic {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: #10131a; color: #fff;
}
.door-av {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: #10131a; color: #fff; font-size: 14px; font-weight: 700;
}
.door-back {
  justify-self: center; display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  border: none; background: none; color: var(--text-2); font-family: inherit; font-size: 13px;
  cursor: pointer; padding: 6px 10px; border-radius: 6px;
}
.door-back:hover { color: var(--blue); background: var(--blue-weak); }
.door-chosen {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.door-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: var(--surface-sunken); color: var(--text-2); font-size: 13px; font-weight: 550;
}
.door-chip b { color: var(--text); font-weight: 650; }
.door-switch {
  border: none; background: none; color: var(--blue); font-family: inherit; font-size: 13px;
  cursor: pointer; padding: 6px 8px; border-radius: 6px; min-height: 36px;
}
.door-switch:hover { background: var(--blue-weak); text-decoration: underline; }

/* sidebar: the real ND mark + the NEODRIFT wordmark instead of the CSS "ND" box */
.brand-mark.brand-img { background: none; padding: 0; overflow: hidden; }
.brand-mark.brand-img img { width: 100%; height: 100%; display: block; border-radius: 7px; }
.brand-logo { display: block; height: 19px; width: auto; margin: 1px 0 3px; }

/* =====================================================================
   LinkDM (v1.9.0) - comment keyword -> DM -> follow -> link
   ===================================================================== */
.ld-warn { display:flex; gap:8px; align-items:flex-start; padding:10px 12px; margin-bottom:12px;
  background:var(--amber-weak); color:var(--text); border-radius:var(--radius); font-size:14px; }
.ld-hero .card-body { display:flex; flex-direction:column; gap:4px; }
.ld-hero p { margin:0; font-size:13px; }
.ld-pill { display:inline-block; padding:2px 9px; border-radius:99px; font-size:12px; font-weight:600; }
.ld-ok { background:var(--green-weak); color:var(--green); }
.ld-amber { background:var(--amber-weak); color:var(--amber); }
.ld-off { background:var(--slate-weak); color:var(--slate); }
.ld-bad { color:var(--red); }
.ld-set { margin:12px 0; }
.ld-set > summary { cursor:pointer; padding:12px 14px; font-weight:600; min-height:44px; }
.ld-grid { display:grid; gap:12px; padding:0 14px 14px; }
.ld-chk { display:flex; gap:8px; align-items:center; font-size:14px; min-height:36px; }
.ld-chk input { width:18px; height:18px; }
.ld-field { display:flex; flex-direction:column; gap:5px; font-size:13px; color:var(--text-2); margin:8px 0; }
.ld-field .input, .ld-field .textarea, .ld-field .select { font-size:16px; color:var(--text); }
.ld-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:12px 0; }
.ld-try { padding:12px 14px; background:var(--surface-2); border-radius:var(--radius); margin-bottom:12px; }
.ld-bubble { background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:9px 12px; margin:6px 0; font-size:14px; }
.ld-bubble i { display:block; font-style:normal; font-size:11px; color:var(--text-3); text-transform:uppercase; margin-bottom:3px; }
.ld-btn { display:block; margin-top:6px; padding:6px 10px; border-radius:9px; background:var(--blue-weak); color:var(--blue-strong); text-align:center; font-weight:600; }
.ld-list { display:grid; gap:10px; }
.ld-card.is-off { opacity:.7; }
.ld-card-h { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.ld-sub { display:block; font-size:12px; color:var(--text-2); margin-top:3px; }
.ld-kw { background:var(--violet-weak); color:var(--violet); border-radius:6px; padding:0 6px; }
.ld-funnel { display:grid; grid-template-columns:repeat(6,1fr); gap:6px; margin-top:10px; }
.ld-funnel span { background:var(--surface-2); border-radius:var(--radius-sm); padding:6px 4px; text-align:center; }
.ld-funnel b { display:block; font-size:17px; }
.ld-funnel i { font-style:normal; font-size:10.5px; color:var(--text-2); line-height:1.2; display:block; }
.ld-card-f { margin-top:8px; display:flex; justify-content:flex-end; }
.ld-tog { position:relative; width:46px; height:28px; flex:none; }
.ld-tog input { position:absolute; inset:0; opacity:0; margin:0; cursor:pointer; z-index:1; }
.ld-tog span { position:absolute; inset:0; border-radius:99px; background:var(--border-strong); transition:background .15s; }
.ld-tog span::after { content:""; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:#fff; transition:transform .15s; }
.ld-tog input:checked + span { background:var(--green); }
.ld-tog input:checked + span::after { transform:translateX(18px); }
.ld-h { margin:20px 0 8px; font-size:15px; }
.ld-log { max-height:420px; overflow:auto; }
.ld-ev { display:grid; grid-template-columns:22px 1fr auto; gap:8px; padding:8px 12px; border-bottom:1px solid var(--border); font-size:13px; }
.ld-ev time { color:var(--text-3); font-size:12px; white-space:nowrap; }
.ld-ev.is-err { background:var(--red-weak); }
.ld-empty { padding:12px; margin:0; }
.ld-ed h3 { font-size:14px; margin:20px 0 6px; }
.ld-seg { display:inline-flex; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; }
.ld-seg button { padding:8px 12px; min-height:40px; background:var(--surface); border:0; font:inherit; color:var(--text); cursor:pointer; }
.ld-seg button.is-active { background:var(--blue); color:#fff; }
.ld-media { display:grid; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:6px; margin:8px 0; }
.ld-m { position:relative; aspect-ratio:1; border:2px solid transparent; border-radius:8px; overflow:hidden; padding:0; background:var(--surface-2); cursor:pointer; }
.ld-m img { width:100%; height:100%; object-fit:cover; display:block; }
.ld-m i { position:absolute; left:4px; bottom:3px; font-style:normal; font-size:11px; color:#fff; text-shadow:0 1px 2px #000; }
.ld-m.is-on { border-color:var(--blue); box-shadow:0 0 0 2px var(--blue-weak); }
.ld-link { display:grid; grid-template-columns:1fr 2fr auto; gap:6px; margin:6px 0; }
.ld-2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.ld-save { position:sticky; bottom:calc(8px + var(--sab)); background:var(--surface); padding:8px 0; }
@media (max-width:600px) {
  .ld-funnel { grid-template-columns:repeat(3,1fr); }
  .ld-link, .ld-2 { grid-template-columns:1fr; }
}

/* v1.10.0: four doors - Guest list filter, "Create new user", the request form */
#joinView[hidden], .join-form[hidden], .join-done[hidden] { display: none !important; }
.door-people-list { display: grid; gap: 10px; max-height: min(52vh, calc(var(--lvh, 100dvh) * .52)); overflow-y: auto; }
.door-people .door-filter { font-size: 16px; min-height: 44px; }
.door-person[hidden] { display: none !important; }
.door-empty { margin: 4px 0; text-align: center; color: var(--text-2); font-size: 13.5px; }
.door-empty[hidden] { display: none; }
.door-new { border-style: dashed; }
.door-new .door-ic { background: var(--blue); }
.join-form { display: grid; gap: 12px; }
.join-form .input { font-size: 16px; min-height: 44px; }
.join-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.join-row .field { min-width: 0; }
.join-done { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 8px 0; }
.join-done-ic { color: var(--green, #1a7f4b); }
.join-done-msg { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); font-weight: 550; }
/* v1.10.0: an intern the owner has not opened any tab for yet */
.no-tabs { max-width: 460px; margin: 10vh auto 0; padding: 28px 22px; text-align: center;
  display: grid; justify-items: center; gap: 12px; }
.no-tabs-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--surface-sunken); color: var(--text-2); }
.no-tabs-title { margin: 0; font-size: 19px; line-height: 1.35; font-weight: 700; color: var(--text); }
.no-tabs-text { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.no-tabs .btn { min-height: 44px; }
/* v1.10.0: Settings - sign-up requests + intern tabs */
.tier-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface-sunken);
  font-size: 12px; font-weight: 600; text-transform: capitalize; }
.acc-list { display: grid; gap: 8px; margin-bottom: 12px; }
.acc-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.acc-row:has(.acc-tick:checked) { border-color: var(--blue); background: var(--blue-weak); }
.acc-tick { width: 22px; height: 22px; flex: none; accent-color: var(--blue); }
.acc-av { width: 34px; height: 34px; font-size: 12px; }
.acc-main { display: grid; gap: 1px; min-width: 0; }
.acc-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-actions .btn { min-height: 44px; }
.tab-toggles { display: grid; }
.tab-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; border-bottom: 1px solid var(--border); font-size: 14.5px; font-weight: 550; cursor: pointer; }
.tab-toggle:last-child { border-bottom: none; }
.tab-toggle .switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px;
  background: var(--border); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.tab-toggle .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.tab-toggle .switch:checked { background: var(--green); }
.tab-toggle .switch:checked::after { transform: translateX(18px); }
.tab-toggle .switch:disabled { opacity: .6; }

/* v1.10.0: Incoming cards open a side panel on click; the request-only panel. */
.inc-card { cursor: pointer; }
.inc-card .inf-stats { margin-top: 8px; }
.inc-pane { padding: 14px; }
.inc-pane-rows { margin-top: 10px; display: grid; gap: 6px; }
.inc-pane-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.inc-pane .inc-text { cursor: default; }
.drawer [data-full][hidden] { display: none; }
/* =================================================================
   List columns added 2026-11-20: collaboration type, demand, and the
   follow-up note edited in the row.
   ================================================================= */

/* Collaboration type on the list (v1.6.0). Neutral on purpose: colour
   in this app means status, and a deal being barter rather than paid
   is a fact about the deal, not a state anyone has to act on. */
.type-chip {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}

/* The follow-up note, edited in the row. Flat until it is touched, so a
   column of them does not read as a wall of input boxes, and taller on
   focus so a real update is not typed through a two-line slot. */
.plan-edit {
  width: 100%; min-width: 150px; resize: vertical;
  font: inherit; font-size: 12.5px; line-height: 1.45; color: var(--text-2);
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  padding: 4px 6px; min-height: 42px;
}
.plan-edit:hover { border-color: var(--border); }
.plan-edit:focus {
  outline: none; background: var(--surface); color: var(--text);
  border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak);
  min-height: 72px;
}
.plan-edit::placeholder { color: var(--text-3); }
.plan-edit:disabled { opacity: .6; }
/* Green means done - shown briefly, then it goes back to normal. */
.plan-edit.just-saved { border-color: var(--green); background: var(--green-weak); }

.inf-table td.col-demand, .inf-table td.col-collabType { white-space: nowrap; }

   The three list columns added 2026-11-20, on a phone.
   Appended last so these win over the base rules above on equal
   specificity without having to reach into the block that sets the
   card grid.
   ------------------------------------------------------------------ */
@media (max-width: 720px) {
  .inf-table td.col-collabType, .inf-table td.col-demand { grid-column: 2 / 4; }
  .inf-table td.col-collabType::before, .inf-table td.col-demand::before {
    content: attr(data-label); display: inline-block; min-width: 92px;
    font-size: 11px; color: var(--text-3); font-weight: 600;
  }
  /* 16px or iOS zooms the whole page in when the box takes focus. */
  .plan-edit { font-size: 16px; min-height: 48px; }
  .plan-edit:focus { min-height: 88px; }
}

/* ---- Dashboard date range + boxes (v1.13.0) ---------------------- */
.dash-range { display: flex; flex-direction: column; gap: 8px; }
.range-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; justify-content: space-between; }
.range-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.range-presets .btn.active { background: var(--blue-weak); border-color: var(--blue); color: var(--blue-strong); }
.range-step { display: flex; align-items: center; gap: 6px; }
.range-arrow { min-width: 36px; font-size: 18px; line-height: 1; justify-content: center; }
.range-label { min-width: 150px; text-align: center; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.range-custom { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; }
.range-custom[hidden] { display: none; }
.range-custom label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text-3); }
.range-custom .input { width: 160px; }
.dash-box { background: var(--surface, transparent); border: 1px solid var(--border); border-radius: var(--radius, 10px); padding: 14px; }
.dash-box-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.dash-box-head h2 { font-size: 15px; font-weight: 650; margin: 0; }
.dash-box-open { margin-left: auto; }
.dash-box-sub { margin-top: 14px; max-width: 640px; }
.dash-moves { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--text-2); }
.dash-moves-title { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text-3); }
.dash-move b { color: var(--text); font-size: 14px; }
@media (pointer: coarse) {
  .range-presets .btn, .range-step .btn { min-height: 44px; }
  .range-arrow { min-width: 44px; }
  .range-custom .input { font-size: 16px; min-height: 44px; }
}
@media (max-width: 640px) {
  .range-presets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .range-presets .btn { flex: none; }
  .range-step { width: 100%; }
  .range-label { flex: 1; min-width: 0; }
  .dash-box { padding: 12px 10px; }
}
