/* PRODUCT — Synthetic White design language, matched to commercial.syntheticwhite.com:
   Helvetica Neue, ink #101010, frosted white cards (radius 20, soft deep shadows),
   black 11px-radius buttons, full-bleed photography with a navy gradient overlay.
   Light default, dark via [data-theme]. */

:root {
  --bg: #f2f2f4;
  --panel: #ffffff;
  --ink: #101010;
  --ink-2: #8a8a8a;
  --ink-3: #c0c0c0;
  --line: #ececee;
  --line-2: #f4f4f6;
  --accent: #101010;
  --accent-ink: #ffffff;
  --green: #16a34a;
  --green-bg: #e9f9ef;
  --amber: #b45309;
  --amber-bg: #fdf3e3;
  --blue: #2563eb;
  --blue-bg: #e8effd;
  --red: #dc2626;
  --red-bg: #fdecec;
  --violet: #7c3aed;
  --violet-bg: #f1eafd;
  --radius: 20px;
  --radius-s: 11px;
  --shadow: 0 1px 3px rgba(8,12,20,.05), 0 10px 30px -14px rgba(8,12,20,.12);
  --shadow-lift: 0 2px 6px rgba(8,12,20,.18), 0 28px 80px -20px rgba(8,12,20,.35);
  --overlay: linear-gradient(rgba(12,17,26,.18), rgba(12,17,26,.42));
  --font: 'Helvetica Neue', Helvetica, 'Inter var', Arial, sans-serif;
  --mono: 'SF Mono', ui-monospace, Menlo, monospace;
}
[data-theme="dark"] {
  --bg: #0e0e10;
  --panel: #17171a;
  --ink: #f4f4f5;
  --ink-2: #9c9ca4;
  --ink-3: #5c5c64;
  --line: #26262b;
  --line-2: #1d1d21;
  --accent: #f4f4f5;
  --accent-ink: #101010;
  --green-bg: #12291a;
  --amber-bg: #2b2113;
  --blue-bg: #14203a;
  --red-bg: #321616;
  --violet-bg: #241a38;
  --shadow: 0 1px 3px rgba(0,0,0,.35), 0 10px 30px -14px rgba(0,0,0,.55);
  --shadow-lift: 0 2px 6px rgba(0,0,0,.45), 0 28px 80px -20px rgba(0,0,0,.7);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
::placeholder { color: var(--ink-3); }

/* ---------------- layout ---------------- */
.app { display: flex; height: 100vh; overflow: hidden; padding: 12px; gap: 12px; }
.main { flex: 1; overflow-y: auto; padding: 14px 26px 60px; }
.container { max-width: 1180px; margin: 0 auto; }

/* ---------------- sidebar: floating white card, like the studio ---------------- */
.sidebar {
  width: 248px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 12px 12px; overflow-y: auto;
}
.ws { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; position: relative; }
.ws-logo {
  width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--panel);
  display: grid; place-items: center; font-weight: 700; font-size: 11.5px; letter-spacing: -.5px;
}
.ws-name { font-weight: 700; font-size: 14px; flex: 1; letter-spacing: -.2px; }
.ws-caret { color: var(--ink-3); font-size: 11px; }
.ws:hover { cursor: pointer; }
.ws-menu {
  position: absolute; top: 44px; left: 4px; right: 4px; z-index: 50;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lift); padding: 6px; display: none;
}
.ws-menu.open { display: block; }
.ws-menu a {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; font-size: 13px;
}
.ws-menu a:hover { background: var(--line-2); }
.ws-menu .dot { width: 7px; height: 7px; border-radius: 50%; }
.ws-menu small { margin-left: auto; color: var(--ink-3); font-size: 11px; }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  padding: 16px 10px 6px; font-weight: 600;
}
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-radius: 9px; color: var(--ink-2); font-weight: 500; font-size: 13.5px;
}
.nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a.active { background: var(--line-2); color: var(--ink); font-weight: 600; }
.nav .count { margin-left: auto; font-size: 11px; color: var(--ink-3); font-family: var(--mono); }

.side-foot { margin-top: auto; padding-top: 12px; }
.online-strip { padding: 10px; border-top: 1px solid var(--line); }
.online-strip .lbl { font-size: 10px; color: var(--ink-3); margin-bottom: 8px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.avatars { display: flex; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--panel);
  margin-left: -6px; background: var(--line); object-fit: cover;
  display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--ink-2);
  position: relative;
}
.avatar:first-child { margin-left: 0; }
.avatar.on::after {
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--green); border: 2px solid var(--panel);
}
.theme-row { display: flex; align-items: center; justify-content: space-between; padding: 10px; font-size: 12.5px; color: var(--ink-2); }
.theme-toggle { display: flex; gap: 2px; background: var(--line-2); border-radius: 99px; padding: 2px; }
.theme-toggle button { width: 28px; height: 24px; border-radius: 99px; display: grid; place-items: center; color: var(--ink-3); }
.theme-toggle button.active { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.me-row { display: flex; align-items: center; gap: 9px; padding: 10px; border-top: 1px solid var(--line); font-size: 12.5px; }
.me-row img { width: 26px; height: 26px; border-radius: 50%; }
.me-row .mail { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.me-row a { color: var(--ink-3); font-size: 12px; }
.me-row a:hover { color: var(--ink); }

/* ---------------- hero banner: real photography + the commercial overlay ---------------- */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden; color: #fff;
  padding: 46px 40px 38px; margin-bottom: 24px; min-height: 172px;
  background-color: #1a2230;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: url('/banner.jpg') center 38% / cover no-repeat;
  filter: var(--hero-filter, none);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgba(12,17,26,.30), rgba(12,17,26,.55)),
              linear-gradient(100deg, rgba(12,17,26,.55) 0%, rgba(12,17,26,.05) 60%);
}
.hero .eyebrow { font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.66); font-weight: 600; }
.hero h1 { font-size: 32px; font-weight: 700; letter-spacing: -.02em; margin: 7px 0 5px; }
.hero p { color: rgba(255,255,255,.72); font-size: 14px; max-width: 560px; }
.hero .hero-side { position: absolute; right: 34px; bottom: 36px; text-align: right; z-index: 1; }
.hero .bell {
  position: absolute; top: 18px; right: 18px; z-index: 1;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.14); backdrop-filter: blur(8px);
  display: grid; place-items: center; color: #fff;
  transition: background .15s;
}
.hero .bell:hover { background: rgba(255,255,255,.24); }
.hero .bell .rd {
  position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; border: 2px solid rgba(20,26,36,.8); display: none;
}
.hero .bell .rd.show { display: block; }

/* ---------------- cards & grids ---------------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.pad { padding: 22px 24px; }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px)  { .g4, .g3, .g2 { grid-template-columns: 1fr; } .sidebar { display: none; } .app { padding: 8px; } .main { padding: 10px; } }

.stat { padding: 18px 20px; }
.stat .n { font-size: 28px; font-weight: 700; letter-spacing: -.03em; font-family: var(--mono); }
.stat .l { color: var(--ink); font-size: 13px; margin-top: 2px; font-weight: 600; }
.stat .sub { color: var(--ink-2); font-size: 12px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; gap: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.section-head .hint { color: var(--ink-2); font-size: 12.5px; }

/* search field, like the studio's top-right search */
.search {
  display: flex; align-items: center; gap: 8px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px;
  min-width: 220px; color: var(--ink-3);
}
.search input { border: 0; outline: none; background: none; flex: 1; font-size: 13px; color: var(--ink); }

/* ---------------- buttons, pills, chips ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-s);
  font-weight: 600; font-size: 13.5px; background: var(--accent); color: var(--accent-ink);
  transition: transform .12s ease, opacity .12s;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--line-2); opacity: 1; }
.btn.sm { padding: 6px 13px; font-size: 12.5px; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid var(--line); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.chip.inbox     { background: var(--line-2); color: var(--ink-2); }
.chip.analyzing { background: var(--violet-bg); color: var(--violet); }
.chip.brief     { background: var(--blue-bg); color: var(--blue); }
.chip.approved  { background: var(--amber-bg); color: var(--amber); }
.chip.sent      { background: var(--green-bg); color: var(--green); }
.chip.live      { background: var(--green-bg); color: var(--green); }
.chip.beta      { background: var(--blue-bg); color: var(--blue); }
.chip.planned   { background: var(--line-2); color: var(--ink-2); }
.chip.src       { background: var(--line-2); color: var(--ink-2); font-family: var(--mono); font-weight: 500; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------------- lists / tables ---------------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 13px 22px;
  border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .1s;
}
.row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.row:only-child { border-radius: var(--radius); }
.row:hover { background: var(--line-2); }
.row .t { font-weight: 600; font-size: 13.5px; }
.row .s { color: var(--ink-2); font-size: 12.5px; margin-top: 1px; }
.row .grow { flex: 1; min-width: 0; }
.row .t, .row .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row time { color: var(--ink-3); font-size: 11.5px; flex-shrink: 0; font-family: var(--mono); }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 600; padding: 13px 22px; border-bottom: 1px solid var(--line);
}
.tbl td { padding: 12px 22px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.tbl tr:last-child td { border-bottom: 0; }

/* ---------------- tabs (plain text, active ink — like "All · Recents") -------- */
.tabs { display: flex; gap: 18px; margin-bottom: 16px; }
.tabs button { font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 2px 0; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); }

/* ---------------- forms & modal ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--bg); outline: none; transition: border-color .12s;
}
.field input:focus, .field textarea:focus { border-color: var(--ink-3); }
.field textarea { min-height: 96px; resize: vertical; }

.overlay {
  position: fixed; inset: 0; background: rgba(12,17,26,.45); z-index: 100;
  display: none; align-items: flex-start; justify-content: center; padding: 8vh 20px;
  backdrop-filter: blur(4px);
}
.overlay.open { display: flex; }
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  width: 100%; max-width: 560px; padding: 28px 30px; max-height: 82vh; overflow-y: auto;
  animation: pop .18s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } }
.modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 16px; letter-spacing: -.01em; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------------- brief view ---------------- */
.brief-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .brief-grid { grid-template-columns: 1fr; } }
.brief-block { margin-bottom: 18px; }
.brief-block h4 {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  font-weight: 700; margin-bottom: 6px;
}
.brief-block p, .brief-block li { font-size: 13.5px; color: var(--ink); }
.brief-block ul { padding-left: 18px; }
.task-item {
  display: flex; gap: 12px; padding: 13px 15px; border: 1px solid var(--line);
  border-radius: var(--radius-s); margin-bottom: 8px; background: var(--panel);
}
.task-item .ta { font-family: var(--mono); font-size: 10px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; padding-top: 3px; flex-shrink: 0; width: 66px; }
.task-item .tt { font-weight: 600; font-size: 13px; }
.task-item .td { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.task-item .te { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); flex-shrink: 0; }
.provider-card {
  padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-s);
  margin-bottom: 8px;
}
.provider-card .pn { font-weight: 700; font-size: 13px; }
.provider-card .pw { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.provider-card .pc { color: var(--ink-3); font-size: 11px; font-family: var(--mono); margin-top: 4px; }

.meter { display: inline-flex; gap: 3px; }
.meter i { width: 14px; height: 5px; border-radius: 3px; background: var(--line); }
.meter i.f { background: var(--ink); }

/* ---------------- misc ---------------- */
.empty { text-align: center; padding: 54px 20px; color: var(--ink-2); }
.empty .big { font-size: 32px; margin-bottom: 8px; color: var(--ink-3); }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: var(--panel); padding: 11px 22px; border-radius: var(--radius-s);
  font-size: 13px; font-weight: 600; z-index: 200; opacity: 0; transition: all .25s cubic-bezier(.2,.9,.3,1.2);
  box-shadow: var(--shadow-lift); max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.spin {
  width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--ink-2); }
.mono { font-family: var(--mono); }

/* ---------------- login: exact clone of commercial.syntheticwhite.com -------- */
.login-bg {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: var(--overlay), url('/banner.jpg') center / cover no-repeat fixed;
}
.login-card {
  width: 400px; max-width: 100%;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(8,12,20,.18), 0 28px 80px rgba(8,12,20,.35);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 52px 48px 40px; text-align: center; color: #101010;
}
.login-card .wordmark { font-size: 13px; font-weight: 700; letter-spacing: .14em; }
.login-card .wordmark sup { font-size: 7.5px; font-weight: 400; letter-spacing: 0; }
.login-card .divider { width: 28px; height: 1px; background: #ccc; margin: 26px auto; }
.login-card h1 { font-size: 20px; font-weight: 600; letter-spacing: -.5px; margin-bottom: 6px; }
.login-card .sub { font-size: 13px; color: #8a8a8a; margin-bottom: 30px; }
.gbtn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 13px 22px; border-radius: 11px; background: #101010; color: #fff;
  font-weight: 600; font-size: 14px; transition: transform .12s, opacity .12s;
}
.gbtn:hover { opacity: .88; }
.gbtn:active { transform: scale(.98); }
.gbtn .g {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  display: inline-grid; place-items: center; flex-shrink: 0;
}
.login-note { margin-top: 26px; font-size: 11px; color: #c0c0c0; }
.login-err {
  margin-top: 18px; padding: 10px 14px; border-radius: 11px; background: #fdecec; color: #dc2626;
  font-size: 12.5px; display: none; text-align: left;
}
