/* Shared materials, navigation and interaction surfaces for the agency and client workspaces. */
:root {
  color-scheme: dark;
  --canvas: #09111e;
  --ink: #f2f6ff;
  --muted: #a8b7cf;
  --dim: #8599b7;
  --rule: rgb(158 187 226 / .16);
  --edge: rgb(189 211 242 / .25);
  --surface: #142035;
  --accent: #b6cbff;
  --action: #345de0;
  --focus: #9bcaff;
  --good: #91e3bd;
  --warn: #ffcf87;
  --bad: #ffb5b8;
  --radius: 20px;
  --rail-width: 244px;
  --font: 'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-family: var(--font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box }
html { min-height: 100%; background: var(--canvas); scroll-behavior: smooth }
body {
  min-height: 100vh; margin: 0; color: var(--ink);
  background:
    radial-gradient(ellipse at 71% -16%, rgb(58 88 149 / .28), transparent 47rem),
    radial-gradient(ellipse at 8% 50%, rgb(25 55 99 / .18), transparent 43rem),
    var(--canvas);
  font: 400 1rem/1.52 var(--font); -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit }
button, select, a { -webkit-tap-highlight-color: transparent }
button { cursor: pointer }
button:disabled { opacity: .48; cursor: not-allowed }
a { color: #afc9ff; text-decoration-thickness: 1px; text-underline-offset: .18em }
button, a, input, textarea, select, summary { touch-action: manipulation }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px }
::selection { color: white; background: #395db5 }
[hidden] { display: none !important }
h1,h2,h3,h4,p { margin: 0 }
h1,h2,h3,h4 { color: var(--ink); font-weight: 620; line-height: 1.18; text-wrap: balance }
h1 { font-size: clamp(2.1rem, 4vw, 3.8rem); letter-spacing: -.057em }
h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); letter-spacing: -.043em }
h3 { font-size: 1.13rem; letter-spacing: -.028em }
small { font-size: .82rem; color: var(--muted) }
button, .button { border: 1px solid var(--edge); border-radius: 10px; background: #192941; padding: .56rem .85rem }
button:hover:not(:disabled), .button:hover { border-color: rgb(189 211 242 / .45) }
button:active:not(:disabled) { transform: translateY(1px) }
button, a, input, select, textarea { transition: border-color .16s, background-color .16s, box-shadow .16s, color .16s }
svg { flex-shrink: 0 }
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--rail-width) minmax(0,1fr); align-items: start; }
.rail {
  position: sticky; top: 0; z-index: 4; display: flex; flex-direction: column; min-height: 100svh; max-height: 100svh;
  overflow-y: auto; overflow-x: hidden; padding: 1.65rem .95rem 1.05rem;
  scrollbar-width: thin; scrollbar-color: #283952 transparent;
  background: linear-gradient(160deg, rgb(27 42 66 / .78), rgb(12 22 37 / .91) 38%, rgb(11 19 32 / .98));
  border-right: 1px solid var(--rule); box-shadow: inset -1px 0 rgb(225 238 255 / .025);
}
.brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--ink); font-size: 1.2rem; font-weight: 670; letter-spacing: -.047em; text-decoration: none; margin: 0 .55rem 1.65rem; line-height: 1.15 }
.brand small,.brand .muted { display: block; margin-top: .22rem; font-size: .75rem; font-weight: 450; letter-spacing: .012em }
.brandmark {
  width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid rgb(184 213 255 / .49); border-radius: 11px;
  display: inline-grid; place-items: center; overflow: hidden; position: relative; isolation: isolate;
  background: linear-gradient(145deg,#38598f,#182c4c 67%,#264d78);
  box-shadow: inset 0 1px 1px rgb(243 251 255 / .63), inset -4px -4px 9px rgb(0 11 35 / .25),0 4px 14px rgb(4 9 22 / .3);
}
.brandmark:empty::before, .brandmark:empty::after {
  content:''; position:absolute; top: 8px; left:10px; width:8px; height:19px; border-radius:2px;
  background:linear-gradient(168deg,#fff,#b5ceff 50%,#6297ea); transform:skewX(-24deg);
}
.brandmark:empty::after { left:19px; top:14px; height:13px; width:6px; opacity:.89 }
.navgroup { display: flex; flex-direction: column; gap: .23rem; margin-bottom: 1.35rem }
.navgroup > small,.navgroup > .eyebrow,.rail .navlabel { margin: 0 .7rem .4rem; color: #92a5c3; font-size: .72rem; font-weight: 570; letter-spacing: .09em; text-transform: uppercase }
.navitem {
  display:flex; align-items:center; gap:.72rem; width:100%; min-height:41px; padding:.56rem .73rem; text-align:left;
  border:1px solid transparent; border-radius:10px; background:transparent; color:#b1c0d6;
  font-size:.91rem; line-height:1.3; font-weight:500; text-decoration:none;
}
.navitem svg { width:18px; height:18px; opacity:.9 }
.navitem:hover:not(:disabled) { color:#f3f7ff; background:#19283d; border-color:transparent }
.navitem.active,.navitem[aria-current="page"] {
  color:#e1eaff; border-color:rgb(129 166 249 / .32);
  background:linear-gradient(100deg,rgb(71 109 192 / .37),rgb(54 81 135 / .16));
  box-shadow:inset 0 1px 0 rgb(201 222 255 / .11),0 4px 12px rgb(4 13 28 / .1);
}
.navitem.active svg { color:#a7c5ff }
.main { min-width:0 }
.topbar {
  min-height:67px; display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:.75rem clamp(1.25rem,3vw,3.8rem); border-bottom:1px solid var(--rule);
  background:linear-gradient(100deg,rgb(14 25 43 / .88),rgb(22 36 58 / .69));
  -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px);
}
.topbar > * { min-width:0 }
.business-switch {
  display:inline-flex; align-items:center; gap:.58rem; max-width:100%; padding:.55rem .87rem; text-overflow:ellipsis;
  background:linear-gradient(155deg,rgb(68 93 131 / .54),rgb(32 49 73 / .76)); color:#e8f1ff;
  border:1px solid var(--edge); border-top-color:rgb(211 228 254 / .43); border-radius:10px;
  box-shadow:inset 0 1px rgb(255 255 255 / .055),0 3px 12px rgb(1 8 22 / .16);
  font-size:.9rem; font-weight:570;
}
.content { width:min(100%,1560px); margin:0 auto; padding:clamp(1.25rem,2.7vw,3rem) clamp(1.25rem,3vw,3.8rem) clamp(2.5rem,5vw,5rem) }
.content > * + * { margin-top:1.35rem }
.eyebrow {
  display:inline-block; color:#b4c9f5; font-size:.765rem; font-weight:610; line-height:1.35;
  text-transform:uppercase; letter-spacing:.11em;
}
.hero {
  position:relative; isolation:isolate; overflow:hidden; min-height:216px; border-radius:24px; border:1px solid rgb(159 189 238 / .28);
  padding:clamp(1.55rem,3.3vw,3.65rem); display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:.65rem;
  background:
    radial-gradient(ellipse at 84% 62%,rgb(67 110 200 / .36),transparent 44%),
    linear-gradient(108deg,#182840 0%,#182c4b 43%,#203d68 80%,#1e365c 100%);
  box-shadow:inset 0 1px 0 rgb(227 240 255 / .13),inset 0 -1px 0 rgb(155 185 233 / .06),0 14px 34px -24px #020814;
}
.hero::before {
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(112deg,rgb(212 229 255 / .09),transparent 23%,transparent 67%,rgb(158 191 254 / .035) 78%,transparent);
}
.hero::after { content:""; position:absolute; height:1px; top:0; left:7%; width:54%; background:linear-gradient(90deg,transparent,rgb(228 241 255 / .42),transparent);pointer-events:none }
.hero-art {
  pointer-events:none; position:absolute; z-index:-1; right:clamp(-1.35rem,1vw,2.5rem); top:-17%; bottom:-19%; width:44%;
  background:url('/art/sapphire-knot.webp') center / contain no-repeat; filter:drop-shadow(10px 17px 14px rgb(4 13 49 / .53));
}
.hero > :not(.hero-art) { position:relative; max-width:65% }
.hero-title,.hero h1 { font-size:clamp(2.4rem,4.3vw,4.7rem); letter-spacing:-.063em; font-weight:560; line-height:1.01 }
.hero p { color:#c2d2ed; max-width:min(56%,42rem); margin-top:.14rem }
.hero .eyebrow { color:#c3d5fa }
.grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.12rem; align-items:start }
.panel,.feature,.metric {
  position:relative; min-width:0; border:1px solid var(--rule); border-top-color:var(--edge); border-radius:var(--radius);
  background:linear-gradient(149deg,rgb(31 47 70 / .93),rgb(18 30 47 / .97) 74%);
  box-shadow:inset 0 1px rgb(233 244 255 / .045),0 7px 24px -19px #000c;
}
.panel { padding:clamp(1.1rem,1.9vw,1.75rem) }
.panel.wide { grid-column:1/-1 }
.panel > h2,.panel > h3 { margin-bottom:.74rem }
.panel > * + .stack,.panel > * + .table-wrap,.panel > * + form { margin-top:1rem }
.metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(155px,100%),1fr)); gap:.85rem }
.metric { display:flex; flex-direction:column; min-height:104px; padding:1rem 1.13rem; gap:.22rem; justify-content:center }
.metric > small,.metric > span:first-child,.metric > label { color:var(--muted); font-size:.88rem; font-weight:500 }
.metric > strong,.metric > b,.metric .value { font-size:clamp(1.7rem,3vw,2.55rem); font-weight:540; line-height:1.16; letter-spacing:-.055em; font-variant-numeric:tabular-nums }
.feature { padding:1.2rem 1.35rem; background:linear-gradient(119deg,rgb(42 66 106 / .7),rgb(24 38 61 / .95)) }
.row,.toolbar,.actions { display:flex; align-items:center; gap:.65rem }
.row,.toolbar { justify-content:space-between }
.row { min-width:0 }
.row > * { min-width:0 }
.stack { display:flex; flex-direction:column; gap:.65rem }
.actions,.toolbar { flex-wrap:wrap }
.toolbar { gap:1rem; margin-bottom:.8rem }
.primary,.secondary,.danger,button[type="submit"] {
  display:inline-flex; align-items:center; justify-content:center; gap:.52rem; min-height:41px; border-radius:10px;
  padding:.58rem .95rem; font-size:.91rem; line-height:1.35; font-weight:580; text-decoration:none;
}
.primary,button[type="submit"] {
  color:#fff; background:linear-gradient(169deg,#507afb 0%,#355fe3 48%,#3053c5 100%);
  border:1px solid #6989f4; border-top-color:#a6baff;
  box-shadow:inset 0 1px 0 rgb(221 230 255 / .19),0 3px 10px rgb(8 28 96 / .28);
}
.primary:hover:not(:disabled),button[type="submit"]:hover:not(:disabled) { background:linear-gradient(169deg,#6287ff,#416be9 52%,#395dce);border-color:#b0c0ff }
.secondary { color:#d9e5fa; background:linear-gradient(150deg,#263957,#1a293e); border:1px solid var(--edge) }
.danger { color:var(--bad); background:#392936; border-color:#664451 }
.badge {
  display:inline-flex; align-items:center; justify-content:center; gap:.4em; white-space:nowrap; max-width:100%; padding:.25rem .53rem;
  border-radius:7px; border:1px solid #465974; background:#283952; color:#c5d5f1; font-size:.76rem; line-height:1.3; font-weight:570;
}
.badge.good,.badge.success { background:#153b34; border-color:#386455; color:var(--good) }
.badge.warn,.badge.warning { background:#413526; border-color:#71583a; color:var(--warn) }
.badge.bad,.badge.error { background:#402b39; border-color:#754750; color:var(--bad) }
.muted { color:var(--muted) }
.empty { color:var(--muted); border:1px dashed var(--edge); border-radius:13px; padding:1.15rem 1.25rem; font-size:.94rem; line-height:1.55 }
.empty > :is(h2,h3,h4) { margin-bottom:.36rem }
.tabs { display:inline-flex; align-items:center; flex-wrap:wrap; gap:.22rem; padding:.25rem; background:#0d182a; border:1px solid var(--rule); border-radius:12px }
.tabs > :is(button,a) { color:var(--muted); background:transparent; border:1px solid transparent; border-radius:8px; padding:.42rem .8rem; text-decoration:none; font-size:.9rem }
.tabs .active,.tabs [aria-selected="true"] { color:var(--ink); background:#263951; border-color:var(--edge); box-shadow:inset 0 1px rgb(255 255 255 / .07) }
.auth { min-height:100svh; display:grid; place-content:center; align-items:center; padding:clamp(1rem,4vw,4.5rem); background:radial-gradient(ellipse at 78% 18%,#253e6950,transparent 49%),radial-gradient(ellipse at 26% 68%,#20396468,transparent 56%) }
.auth>section,.auth>.panel,.auth>form { width:min(480px,calc(100vw - 2.35rem)); padding:clamp(1.55rem,3.5vw,2.8rem); border-radius:24px }
.auth h1 { font-size:clamp(2rem,4.3vw,3.35rem) }
form { display:grid; gap:1rem }
label { display:grid; gap:.42rem; color:#d6e1f3; font-size:.9rem; font-weight:520 }
input,select,textarea {
  min-width:0; width:100%; min-height:43px; padding:.62rem .8rem; border-radius:10px; border:1px solid var(--edge);
  color:var(--ink); background:#0f1d30; font-size:1rem; line-height:1.4; box-shadow:inset 0 1px 3px rgb(1 6 15 / .18);
}
select {
  padding-right:2.22rem; appearance:none; cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,#b6c8de 50%),linear-gradient(135deg,#b6c8de 50%,transparent 50%);
  background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%; background-size:5px 5px; background-repeat:no-repeat;
}
select option { color:var(--ink); background:#15243a }
input[type="checkbox"],input[type="radio"] { width:1.12rem; height:1.12rem; min-height:0; accent-color:var(--action) }
input[type="color"] { width:3.2rem; padding:.2rem }
textarea { min-height:95px; resize:vertical }
input::placeholder,textarea::placeholder { color:#8b9cb5; opacity:1 }
input:focus,textarea:focus,select:focus { border-color:#83a2ed }
.table-wrap { max-width:100%; overflow-x:auto; scrollbar-width:thin }
table { width:100%; border-collapse:collapse; font-size:.94rem; text-align:left }
th,td { border-bottom:1px solid var(--rule); padding:.76rem .65rem; vertical-align:middle; overflow-wrap:anywhere }
th { color:#a5b6ce; font-size:.8rem; font-weight:550 }
th:first-child,td:first-child { padding-left:0 }
tr:last-child td { border-bottom:none }
tbody tr:hover { background:rgb(255 255 255 / .018) }
dialog {
  width:min(530px,calc(100% - 2rem)); max-height:86svh; overflow:auto; color:var(--ink);
  padding:clamp(1.25rem,2.5vw,2rem); border:1px solid var(--edge); border-top-color:#7088ab; border-radius:22px;
  background:linear-gradient(145deg,#223550,#16243a 67%); box-shadow:0 26px 95px #010710ab,inset 0 1px rgb(255 255 255 / .09);
}
dialog::backdrop { background:rgb(3 8 17 / .69); -webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px) }
dialog > * + *,dialog form { margin-top:1rem }
hr { border:0; border-top:1px solid var(--rule); margin:1rem 0 }
@media (min-width:1600px) { :root { --rail-width:264px } }
@media (max-width:1050px) {
  :root { --rail-width:205px }
  .content,.topbar { padding-left:1.25rem; padding-right:1.25rem }
  .rail { padding-left:.65rem; padding-right:.65rem }
  .grid { gap:.85rem }
  .hero-art { width:43%; right:0; top:0; bottom:0 }
}
@media (max-width:760px) {
  .shell { display:block }
  .rail { position:relative; min-height:0; max-height:none; padding:.65rem 1rem; border-right:0; border-bottom:1px solid var(--rule); }
  .brand { margin:.22rem .18rem .6rem }
  .rail nav,.rail .navgroup { display:flex; flex-direction:row; align-items:center; gap:.23rem; overflow-x:auto; scrollbar-width:thin }
  .rail .navgroup { margin:0 }
  .navgroup > small,.navgroup > .eyebrow,.rail .navlabel { display:none }
  .navitem { width:auto; min-height:38px; padding:.41rem .65rem; white-space:nowrap; flex-shrink:0 }
  .topbar { min-height:56px; padding:.6rem 1rem }
  .content { padding:1rem 1rem 2.5rem }
  .hero { min-height:190px; border-radius:19px; padding:1.4rem 1.25rem }
  .hero-art { width:41%; top:3%; bottom:3%; right:-2% }
  .grid { grid-template-columns:1fr }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .panel,.metric { border-radius:15px }
  .toolbar,.actions { gap:.5rem }
}
@media (max-width:460px) {
  .content { padding:.85rem .8rem 2rem }
  .hero-title,.hero h1 { font-size:2.24rem }
  .hero > :not(.hero-art) { max-width:75% }
  .hero-art { width:42%; right:-5%; top:3%; bottom:7%; opacity:.84 }
  .hero p { max-width:70%; font-size:.91rem }
  .badge { font-size:.75rem }
  .row { flex-wrap:wrap }
  .metric { padding:.82rem; min-height:90px }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; scroll-behavior:auto!important }
}
