.hidden{display:none !important}
.eyebrow{font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.24em;font-size:.72rem;color:var(--accent)}
.brand{display:inline-flex;align-items:center;gap:.6rem}
.brand-mark{width:30px;height:26px;flex:none;display:inline-block;background:url("../assets/feather.png") center/contain no-repeat}
.brand-name{font-family:var(--font-display);font-weight:600;font-size:1.02rem;color:var(--text-strong)}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;border-radius:999px;
  padding:.7rem 1.2rem;font-weight:500;font-size:.98rem;transition:transform .14s ease,box-shadow .2s ease,opacity .2s}
.btn:hover{transform:translateY(-1px)}
@media (prefers-reduced-motion:no-preference){
  .btn:active{transform:scale(0.95);transition-duration:80ms}
}
.btn-solid{background:var(--btn-bg);color:var(--btn-fg);box-shadow:var(--shadow-sm)}
.btn-line{border:1px solid var(--line-2);color:var(--text-strong)}
.btn-line:hover{border-color:var(--accent);color:var(--accent)}
.btn-text{background:none;color:var(--text-soft);font-size:.9rem;margin-top:.4rem}
.btn-text:hover{color:var(--text-strong)}
.btn-block{width:100%;margin-top:.4rem}

/* auth */
.auth{position:relative;overflow:hidden;min-height:100vh;display:grid;place-items:center;padding:2rem 1.2rem}
.auth::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(50vw 40vh at 80% -6%,var(--glow-1),transparent 70%),
            radial-gradient(46vw 38vh at 10% 10%,var(--glow-2),transparent 72%)}
.auth-card{position:relative;z-index:2;width:100%;max-width:28rem;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius-lg);padding:2.2rem 1.8rem;box-shadow:var(--shadow);text-align:center}
.auth-card .brand-mark{width:40px;height:34px;margin:0 auto .8rem}
.auth-title{font-family:var(--font-display);font-weight:300;font-size:1.9rem;color:var(--text-strong)}
.auth-sub{color:var(--text-soft);font-size:.95rem;margin:.3rem 0 1.4rem}
.field{display:flex;flex-direction:column;gap:.4rem;text-align:left;margin-bottom:.8rem;
  font-family:var(--font-mono);font-size:.7rem;text-transform:uppercase;letter-spacing:.12em;color:var(--text-soft)}
.field input{border:1px solid var(--line-2);border-radius:12px;padding:.72rem .85rem;font-size:1rem;
  font-family:var(--font-body);background:var(--surface-2);color:var(--text)}
.field input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent)}
.auth-err{margin-top:.8rem;color:var(--danger);font-family:var(--font-mono);font-size:.78rem}
.auth-feathers{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}

/* ---- app nav (sticky web top-nav, cohesive with marketing site) ---- */
.app-nav{
  position:sticky;top:0;z-index:50;
  background:color-mix(in srgb,var(--bg) 78%,transparent);
  backdrop-filter:blur(16px) saturate(1.1);-webkit-backdrop-filter:blur(16px) saturate(1.1);
  border-bottom:1px solid var(--line)
}
.app-nav .nav-in{
  max-width:var(--maxw,1160px);margin:0 auto;
  padding:.85rem 1.5rem;display:flex;align-items:center;gap:1.2rem
}
.app-nav .nav-links{display:flex;gap:1.6rem;margin-left:1.2rem;flex:1}
.app-nav .nav-links a{
  font-family:var(--font-mono);font-size:.76rem;text-transform:uppercase;letter-spacing:.14em;
  color:var(--text-soft);transition:color .2s
}
.app-nav .nav-links a:hover{color:var(--text-strong)}
.nav-cta{display:flex;align-items:center;gap:.6rem}
/* prevent nav labels from wrapping to two lines at 1024–1280px */
.app-nav .nav-links a,.app-nav .nav-cta .btn,.app-nav .nav-cta button{white-space:nowrap}

/* hamburger — shown <640px only */
.nav-hamburger{
  display:none;flex-direction:column;justify-content:center;gap:5px;
  width:38px;height:38px;border-radius:999px;border:1px solid var(--line-2);
  padding:0 10px;cursor:pointer;margin-left:auto;flex-shrink:0
}
.nav-hamburger span{display:block;height:2px;width:100%;background:var(--text);border-radius:2px;transition:opacity .2s}

/* mobile drawer */
.nav-drawer{
  display:none;position:fixed;inset:0;z-index:100;
  background:color-mix(in srgb,var(--text-strong) 50%,transparent);
  backdrop-filter:blur(4px)
}
.nav-drawer.open{display:block}
.nav-drawer-inner{
  position:absolute;right:0;top:0;bottom:0;width:min(320px,85vw);
  background:var(--bg);border-left:1px solid var(--line);
  display:flex;flex-direction:column;gap:.75rem;padding:1.4rem 1.4rem 2rem;
  overflow-y:auto
}
.nav-drawer-close{
  align-self:flex-end;font-size:1.6rem;line-height:1;
  width:36px;height:36px;border-radius:999px;border:1px solid var(--line-2);
  display:grid;place-items:center;margin-bottom:.4rem
}

/* shell main content container */
.shell-main{max-width:var(--maxw,1160px);margin:0 auto;padding:3.5rem 1.5rem}
.shell-main h2{font-family:var(--font-display);font-weight:300;font-size:clamp(2rem,5vw,3rem);color:var(--text-strong);margin:.6rem 0}
.shell-main .lede{color:var(--text-soft);max-width:34rem;font-size:1.1rem;line-height:1.55}

/* floating #themeToggle — used on auth/wizard screens (outside #appShell) */
#themeToggle{
  width:38px;height:38px;border-radius:999px;border:1px solid var(--line-2);
  display:grid;place-items:center;color:var(--text);
  position:fixed;top:.9rem;right:1rem;z-index:60;background:var(--surface)
}
/* Hide the floating toggle whenever the authenticated shell is visible — the nav has #navThemeToggle */
body:has(#appShell:not(.hidden)) #themeToggle{display:none}
/* theme-toggle shared styles (used floating + in nav) */
.theme-toggle{
  width:38px;height:38px;border-radius:999px;border:1px solid var(--line-2);
  display:grid;place-items:center;font-size:1rem;color:var(--text);
  transition:border-color .2s,color .2s;flex-shrink:0
}
.theme-toggle:hover{border-color:var(--accent);color:var(--accent)}
.theme-toggle .ic-sun{display:none}
[data-theme="dark"] .theme-toggle .ic-moon{display:none}
[data-theme="dark"] .theme-toggle .ic-sun{display:inline}

/* responsive: ≥640px → desktop nav; <640px → hamburger + drawer */
@media (max-width:639px){
  .app-nav .nav-links{display:none}
  .app-nav .nav-cta{display:none}
  .nav-hamburger{display:flex}
}
@media (min-width:640px){
  .nav-hamburger{display:none}
  .nav-drawer{display:none !important}
}

/* feathers (shared with the marketing site) */
.feather{position:absolute;top:-16vh;width:44px;height:44px;opacity:.42;
  background:url("../assets/feather.png") center/contain no-repeat;animation:fall linear infinite,drift ease-in-out infinite}
@keyframes fall{0%{translate:0 -16vh;rotate:-6deg;opacity:0}12%{opacity:.42}88%{opacity:.42}100%{translate:0 122vh;rotate:12deg;opacity:0}}
@keyframes drift{0%,100%{margin-left:0}50%{margin-left:38px}}
.feather:nth-child(1){left:12%;animation-duration:26s,9s;animation-delay:0s,0s}
.feather:nth-child(2){left:50%;width:34px;height:34px;animation-duration:32s,11s;animation-delay:-10s,-2s}
.feather:nth-child(3){left:82%;width:54px;height:54px;opacity:.3;animation-duration:36s,13s;animation-delay:-18s,-4s}

/* intro (shared with the marketing site) */
#intro{display:none}
[data-intro="play"] #intro{display:grid;place-items:center;position:fixed;inset:0;z-index:200;background:var(--bg);animation:introOut 3.5s ease forwards}
.intro-stack{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;gap:1.1rem}
/* A-01: S-curve fall — feather drifts from above with three easeInOut sway passes */
.intro-mark{position:relative;width:92px;height:92px;background:url("../assets/feather.png") center/contain no-repeat;animation:introFall 2.1s cubic-bezier(0.18,0,0.22,1.0) both}
/* Color-fill reveal: white pseudo-element peels away from bottom to top after landing */
.intro-mark::after{content:"";position:absolute;inset:0;background:var(--bg);animation:introColorFill .9s ease-in-out 2.1s both}
.intro-word{font-family:var(--font-display);font-weight:300;font-size:1.6rem;color:var(--text-strong);opacity:0;animation:introWord .9s ease 2.0s both}
.intro-feathers{position:absolute;inset:0;overflow:hidden;z-index:1;pointer-events:none}
.intro-feather{position:absolute;top:-14vh;width:32px;height:32px;opacity:.36;background:url("../assets/feather.png") center/contain no-repeat;animation:fall linear infinite}
.intro-feather:nth-child(1){left:22%;animation-duration:6s;animation-delay:-1s}
.intro-feather:nth-child(2){left:48%;animation-duration:7s;animation-delay:-3s}
.intro-feather:nth-child(3){left:68%;animation-duration:8s;animation-delay:-2s}
.intro-feather:nth-child(4){left:84%;animation-duration:6.5s;animation-delay:-4s}
/* Phase 1: S-curve fall with multi-pass horizontal sway + rotation (replaces single-axis introMark) */
@keyframes introFall{
  0%  {transform:translateY(-380px) translateX(0)     rotate(-12deg);opacity:0}
  8%  {opacity:1}
  30% {transform:translateY(-160px) translateX(22px)  rotate(9deg)}
  55% {transform:translateY(-40px)  translateX(-14px) rotate(-6deg)}
  78% {transform:translateY(0)      translateX(0)     rotate(0deg)}
  100%{transform:translateY(0)      translateX(0)     rotate(0deg)}
}
/* Phase 2: clip-path shrinks the white overlay upward, revealing colored feather from bottom to top */
@keyframes introColorFill{
  0%  {clip-path:inset(0 0 0 0)}
  100%{clip-path:inset(100% 0 0 0)}
}
@keyframes introWord{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes introOut{0%,78%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}

@media (prefers-reduced-motion:reduce){
  .feather,.intro-feather{animation:none}
  [data-intro="play"] #intro{animation:introOut .5s ease forwards}
  .intro-mark{animation:introFallReduced .4s ease both}
  .intro-mark::after{animation:none;clip-path:inset(100% 0 0 0)}
  .intro-word{animation:none;opacity:1}
}
@keyframes introFallReduced{from{opacity:0}to{opacity:1}}

/* wizard */
.wiz{position:relative;overflow:hidden;min-height:100vh;display:flex;flex-direction:column;padding:2rem 1.2rem}
.wiz::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(55vw 42vh at 80% -6%,var(--glow-1),transparent 70%),radial-gradient(48vw 40vh at 10% 12%,var(--glow-2),transparent 72%)}
.wiz-feathers{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
.wiz-top{position:relative;z-index:3;width:100%;max-width:560px;margin:0 auto 1.4rem;display:flex;align-items:center;gap:1rem}
.wiz-back{width:36px;height:36px;border-radius:999px;border:1px solid var(--line-2);color:var(--text);font-size:1.1rem}
.wiz-back.hidden{visibility:hidden}
.wiz-progress{flex:1;height:4px;border-radius:999px;background:var(--line)}
.wiz-progress #wizBar{display:block;height:100%;width:0;border-radius:999px;background:var(--accent);transition:width .4s ease}
/* .wiz-spacer was removed — rule was unused */
.step-count{font-family:var(--font-mono);font-size:.72rem;text-transform:uppercase;letter-spacing:.1em;color:var(--text-soft);white-space:nowrap}
/* .wiz-stage is the clipping/positioning context for the step cross-fade.
   It must have a concrete height so absolutely-positioned steps fill it. */
.wiz-stage{position:relative;z-index:2;flex:1;overflow:hidden;
  width:100%;max-width:560px;margin:0 auto;min-height:320px}
/* Steps are absolutely positioned so outgoing and incoming can animate in parallel */
.wiz-step{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;will-change:transform,opacity}
/* Resting hidden state — applied after exit animation completes */
.wiz-step.is-hidden{display:none}
/* Enter from right (forward navigation) */
.wiz-step.is-entering-forward{animation:stepEnterRight 480ms cubic-bezier(0.22,0.68,0,1.2) both}
/* Enter from left (back navigation) */
.wiz-step.is-entering-back{animation:stepEnterLeft 480ms cubic-bezier(0.22,0.68,0,1.2) both}
/* Exit to left (forward navigation) */
.wiz-step.is-exiting-forward{animation:stepExitLeft 320ms cubic-bezier(0.4,0,1,1) both;pointer-events:none}
/* Exit to right (back navigation) */
.wiz-step.is-exiting-back{animation:stepExitRight 320ms cubic-bezier(0.4,0,1,1) both;pointer-events:none}
@keyframes stepEnterRight{from{transform:translateX(48px);opacity:0}to{transform:translateX(0);opacity:1}}
@keyframes stepEnterLeft{from{transform:translateX(-48px);opacity:0}to{transform:translateX(0);opacity:1}}
@keyframes stepExitLeft{from{transform:translateX(0);opacity:1}to{transform:translateX(-48px);opacity:0}}
@keyframes stepExitRight{from{transform:translateX(0);opacity:1}to{transform:translateX(48px);opacity:0}}
.wiz-step h1{font-family:var(--font-display);font-weight:300;font-size:clamp(1.7rem,4.5vw,2.4rem);color:var(--text-strong);letter-spacing:-.02em;margin-bottom:.5rem}
.wiz-sub{color:var(--text-soft);font-size:1.02rem;line-height:1.5;margin-bottom:1.4rem}
.wiz-note{color:var(--text-soft);font-family:var(--font-mono);font-size:.72rem;margin:.5rem 0}
.wiz-err{display:block;color:var(--danger);font-family:var(--font-mono);font-size:.72rem;min-height:1rem;margin:.3rem 0}
.wiz-mark{display:block;width:84px;height:84px;margin:0 auto 1rem;background:url("../assets/feather.png") center/contain no-repeat}
.wiz-how{list-style:none;text-align:left;display:flex;flex-direction:column;gap:1rem;margin:0 0 1.6rem}
.wiz-how li{display:flex;flex-direction:column}
.wiz-how b{color:var(--text-strong)}
.wiz-how span{color:var(--text-soft);font-size:.95rem}
.wiz-choices{display:flex;flex-direction:column;gap:.8rem}
.wiz-choice{display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;text-align:left;
  padding:1.2rem 1.3rem;border:1px solid var(--line-2);border-radius:var(--radius-lg);background:var(--surface);transition:border-color .2s,transform .12s,box-shadow .2s}
.wiz-choice:hover{border-color:var(--accent);transform:translateY(-1px)}
@media (prefers-reduced-motion:no-preference){
  .wiz-choice[aria-pressed="true"]{transform:scale(1.03);transition:transform 320ms cubic-bezier(0.34,1.26,0.64,1),border-color .2s,box-shadow .2s}
  .wiz-choice:active{transform:scale(0.975);transition-duration:80ms}
}
.wiz-choice b{color:var(--text-strong);font-size:1.1rem}
.wiz-choice span{color:var(--text-soft);font-size:.9rem}
.pw-meter{display:flex;gap:.4rem;margin:.7rem 0 .3rem}
.pw-meter span{flex:1;height:5px;border-radius:999px;background:var(--line)}
.pw-meter[data-score="1"] span:nth-child(-n+1),
.pw-meter[data-score="2"] span:nth-child(-n+2),
.pw-meter[data-score="3"] span:nth-child(-n+3),
.pw-meter[data-score="4"] span:nth-child(-n+4){background:var(--accent)}

/* finale — A-17: bob-then-fly; tagline holds legible for ~2s */
.finale{position:fixed;inset:0;z-index:300;display:grid;place-items:center;background:var(--bg);
  animation:finaleWash 4.2s ease forwards}
/* Phase 1 (0–2s): gentle bob. Phase 2 (2–4.2s): fly toward viewer. */
.finale-mark{width:96px;height:96px;background:url("../assets/feather.png") center/contain no-repeat;
  animation:finaleBob 2.0s ease-in-out 0.4s,finaleFeather 2.2s ease-in 2.0s both}
/* Tagline: fade in early, HOLD through bob, fade out with the fly */
.finale-text{position:absolute;bottom:34%;font-family:var(--font-display);font-weight:300;font-size:1.4rem;color:var(--text-strong);animation:finaleFadeHold 4.2s ease forwards}
/* Bob: feather breathes ±5° rotation, ±10px vertical drift */
@keyframes finaleBob{
  0%  {transform:scale(1) translateY(0)    rotate(0deg);  opacity:0}
  15% {opacity:1}
  40% {transform:scale(1) translateY(-10px) rotate(5deg)}
  70% {transform:scale(1) translateY(8px)  rotate(-5deg)}
  100%{transform:scale(1) translateY(-4px) rotate(3deg);  opacity:1}
}
/* Fly: rushes toward viewer and dissolves into white */
@keyframes finaleFeather{
  0%  {transform:scale(1)  translateY(-4px) rotate(3deg);opacity:1}
  100%{transform:scale(7)  translateY(0)    rotate(0deg);opacity:0;filter:blur(20px)}
}
/* Text: in by 1.2s, HOLDS through 2.8s bob, out as feather flies */
@keyframes finaleFadeHold{
  0%  {opacity:0}
  12% {opacity:0}
  28% {opacity:1}
  68% {opacity:1}
  90% {opacity:0}
  100%{opacity:0}
}
@keyframes finaleWash{0%{background:var(--bg)}65%{background:var(--bg)}100%{background:#fff}}
/* Reduced-motion: instant fade-only switch for wizard steps; no directional slide */
@media (prefers-reduced-motion:reduce){
  .wiz-step.is-entering-forward,.wiz-step.is-entering-back{animation:stepFadeIn 180ms ease both}
  .wiz-step.is-exiting-forward,.wiz-step.is-exiting-back{animation:stepFadeOut 120ms ease both}
  .finale{animation:finaleWash .5s ease forwards}
  .finale-mark,.finale-text{animation:none;opacity:1}
}
@keyframes stepFadeIn{from{opacity:0}to{opacity:1}}
@keyframes stepFadeOut{from{opacity:1}to{opacity:0}}

/* dashboard */
.dash-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:2.4rem;flex-wrap:wrap;padding-bottom:1.4rem;border-bottom:1px solid var(--line)}
.dash-head h2{font-family:var(--font-display);font-weight:300;font-size:clamp(1.8rem,4vw,2.6rem);color:var(--text-strong)}
.proj-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.2rem}
.proj{text-align:left;display:flex;flex-direction:column;gap:.7rem;padding:1.4rem 1.5rem;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius-lg);transition:transform .14s ease,box-shadow .2s ease,border-color .2s}
.proj:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:var(--line-2)}
.proj-head{display:flex;align-items:center;justify-content:space-between;gap:.6rem}
.proj-type{font-family:var(--font-display);font-weight:400;font-size:1.25rem;color:var(--text-strong)}
.tag{font-family:var(--font-mono);font-size:.64rem;text-transform:uppercase;letter-spacing:.1em;padding:.25rem .55rem;border-radius:999px;white-space:nowrap}
.tag-neutral{background:color-mix(in srgb,var(--accent-2) 22%,transparent);color:var(--accent-2)}
.tag-progress{background:color-mix(in srgb,var(--blush) 26%,transparent);color:var(--warm)}
.tag-good{background:color-mix(in srgb,var(--success) 20%,transparent);color:var(--success)}
.tag-bad{background:color-mix(in srgb,var(--danger) 16%,transparent);color:var(--danger)}
.proj-bar{height:4px;border-radius:999px;background:var(--line)}
.proj-bar span{display:block;height:100%;border-radius:999px;background:var(--accent);transition:width .4s ease}
.proj-step{font-family:var(--font-mono);font-size:.68rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft)}
.proj-meta{display:flex;align-items:baseline;justify-content:space-between;gap:.6rem}
.proj-price{font-family:var(--font-display);font-size:1.15rem;color:var(--text-strong)}
.proj-next{color:var(--text-soft);font-size:.88rem;text-align:right}
.proj-date{font-family:var(--font-mono);font-size:.66rem;color:var(--text-soft)}
/* empty / loading / error states span full grid width */
.proj-list > .empty,
.proj-list > .dash-msg,
.proj-list > .dash-error{grid-column:1/-1}
.empty{text-align:center;padding:4rem 1rem;max-width:32rem;margin:0 auto}
.empty-mark{display:block;width:64px;height:64px;margin:0 auto 1rem;opacity:.7;background:url("../assets/feather.png") center/contain no-repeat}
.empty h3{font-family:var(--font-display);font-weight:300;font-size:1.6rem;color:var(--text-strong);margin-bottom:.4rem}
.empty p{color:var(--text-soft);margin-bottom:1.4rem}
.dash-msg{color:var(--text-soft);font-family:var(--font-mono);font-size:.8rem;padding:2rem 0;text-align:center}
/* dashboard error banner */
.dash-error{padding:1.2rem 1.4rem;border-radius:var(--radius);border:1px solid color-mix(in srgb,var(--danger) 30%,transparent);background:color-mix(in srgb,var(--danger) 8%,transparent);color:var(--danger);font-family:var(--font-mono);font-size:.8rem;display:flex;align-items:center;gap:.8rem}
.dash-error a{color:var(--danger);text-decoration:underline;cursor:pointer}
/* skeleton shimmer for loading cards */
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.skeleton{border-radius:4px;background:linear-gradient(90deg,var(--line) 25%,var(--line-2) 50%,var(--line) 75%) 200% 0/200% 100%;animation:shimmer 1.4s ease infinite}
.proj-skeleton{text-align:left;display:flex;flex-direction:column;gap:.7rem;padding:1.4rem 1.5rem;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg)}
.proj-skeleton .sk-title{height:1.25rem;width:60%}
.proj-skeleton .sk-tag{height:.9rem;width:4.5rem;border-radius:999px}
.proj-skeleton .sk-bar{height:4px;border-radius:999px}
.proj-skeleton .sk-row{display:flex;justify-content:space-between;align-items:center;gap:.6rem}
.proj-skeleton .sk-price{height:1.1rem;width:3.5rem}
.proj-skeleton .sk-date{height:.8rem;width:5rem}

/* start-a-project brief */
#newProject{max-width:640px;margin:0 auto}
.brief-top{display:flex;align-items:center;gap:1rem;margin-bottom:1.6rem}
.brief-step{margin-bottom:1.4rem}
.brief-step.hidden{display:none}
.brief-step h2{font-family:var(--font-display);font-weight:300;font-size:clamp(1.6rem,3.6vw,2.2rem);color:var(--text-strong);margin-bottom:.4rem}
.brief-err{display:block;color:var(--danger);font-family:var(--font-mono);font-size:.72rem;min-height:1rem;margin:.3rem 0}
.svc-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.7rem}
.svc-pick button{padding:1rem;border:1px solid var(--line-2);border-radius:var(--radius);background:var(--surface);
  font-family:var(--font-display);font-size:1.05rem;color:var(--text-strong);transition:border-color .2s,transform .12s,box-shadow .2s}
.svc-pick button:hover{border-color:var(--accent);transform:translateY(-1px)}
.svc-pick button[aria-pressed="true"]{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 30%,transparent)}
@media (prefers-reduced-motion:no-preference){
  .svc-pick button[aria-pressed="true"]{transform:scale(1.04);transition:transform 300ms cubic-bezier(0.34,1.26,0.64,1),border-color .2s,box-shadow .2s}
}
.size-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:.7rem}
.size-grid button{padding:.9rem;border:1px solid var(--line-2);border-radius:var(--radius);background:var(--surface);text-align:left;transition:border-color .2s,transform .12s,box-shadow .2s}
.size-grid button[aria-pressed="true"]{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 30%,transparent)}
@media (prefers-reduced-motion:no-preference){
  .size-grid button[aria-pressed="true"]{transform:scale(1.04);transition:transform 300ms cubic-bezier(0.34,1.26,0.64,1),border-color .2s,box-shadow .2s}
}
.size-grid b{display:block;color:var(--text-strong)}
.size-grid span{font-family:var(--font-mono);font-size:.66rem;color:var(--text-soft)}
.style-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:.6rem}
.style-grid button{padding:.7rem .9rem;border:1px solid var(--line-2);border-radius:999px;background:var(--surface);
  font-size:.92rem;color:var(--text);transition:border-color .2s,background .2s,transform .12s}
.style-grid button[aria-pressed="true"]{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--accent)}
@media (prefers-reduced-motion:no-preference){
  .style-grid button[aria-pressed="true"]{transform:scale(1.04);transition:transform 300ms cubic-bezier(0.34,1.26,0.64,1),border-color .2s,background .2s}
}
.budget-box{display:flex;flex-direction:column;gap:.9rem;padding:1.2rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.brange{display:flex;align-items:center;justify-content:space-between;gap:1rem;font-family:var(--font-mono);font-size:.72rem;text-transform:uppercase;letter-spacing:.1em;color:var(--text-soft)}
.brange input[type="range"]{flex:1;accent-color:var(--accent)}
.brange b{font-family:var(--font-display);font-size:1.05rem;color:var(--text-strong);min-width:5rem;text-align:right}
.budget-text{font-family:var(--font-display);font-weight:300;font-size:1.4rem;color:var(--text-strong);text-align:center;margin-top:.4rem}

/* project detail — width governed by .shell-main container */
.detail-grid{display:grid;grid-template-columns:1fr 340px;gap:1.6rem;align-items:start}
.detail-main{display:flex;flex-direction:column;gap:1.2rem}
.detail-side{position:sticky;top:5rem;display:flex;flex-direction:column;gap:1.2rem}
@media (max-width:899px){
  .detail-grid{grid-template-columns:1fr}
  .detail-side{position:static;order:-1}
}
.detail-title{font-family:var(--font-display);font-weight:300;font-size:clamp(1.8rem,4vw,2.6rem);color:var(--text-strong);margin:.4rem 0 1rem}
.stages{list-style:none;display:flex;flex-wrap:wrap;gap:.4rem;padding:0;margin:0 0 1rem}
.stages li{flex:1;min-width:60px;text-align:center;font-family:var(--font-mono);font-size:.6rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft);padding:.5rem .2rem;border-top:3px solid var(--line-2)}
.stages li.done{color:var(--accent);border-top-color:var(--accent)}
.stages li.current{color:var(--text-strong);border-top-color:var(--accent);font-weight:700}
.detail-guide{color:var(--text-soft);margin-bottom:1.4rem}
#projectDetail .card{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:1.4rem;margin-bottom:0}
#projectDetail .card h2{font-family:var(--font-display);font-weight:300;font-size:1.3rem;color:var(--text-strong);margin-bottom:.6rem}
#adminSettings .card h2,#adminDetail .card h2{font-family:var(--font-display);font-weight:300;font-size:1.3rem;color:var(--text-strong);margin-bottom:.6rem}
#adminPanel .card{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:1.4rem;margin-bottom:1.2rem}
#adminPanel .settings-grid>.card{margin-bottom:0}
#adminPanel .card h2{font-family:var(--font-display);font-weight:300;font-size:1.3rem;color:var(--text-strong);margin-bottom:.6rem}
.quote-price{font-family:var(--font-display);font-size:2rem;color:var(--text-strong)}
.quote-price .was{font-size:1.1rem;color:var(--text-soft);text-decoration:line-through;margin-right:.5rem}
.quote-terms{color:var(--text-soft);font-size:.9rem;margin:.4rem 0 1rem}
#projectDetail .row{display:flex;gap:.8rem;align-items:center;flex-wrap:wrap}
.muted{color:var(--text-soft);font-size:.8rem;margin-top:.6rem}
.modal{position:fixed;inset:0;background:color-mix(in srgb,var(--text-strong) 45%,transparent);display:grid;place-items:center;padding:1.2rem;z-index:50}
.modal.hidden{display:none}
.modal-card{background:var(--bg);border:1px solid var(--line);border-radius:var(--radius);padding:1.6rem;max-width:32rem;width:100%;max-height:85vh;overflow:auto}
.agree-text{white-space:pre-wrap;color:var(--text);font-size:.9rem;line-height:1.5;border:1px solid var(--line);border-radius:var(--radius);padding:1rem;max-height:40vh;overflow:auto;margin:.6rem 0}
.agree-check{display:flex;gap:.5rem;align-items:center;margin:.8rem 0;color:var(--text)}
.status{font-family:var(--font-mono);font-size:.74rem;color:var(--text-soft);margin-top:.8rem;min-height:1rem}
.status.bad{color:var(--danger)}

/* icon system */
.icon{display:inline-flex;align-items:center;justify-content:center;vertical-align:-0.15em;line-height:0}
.icon svg{display:block}
.row-lead{color:var(--accent)}
.row-chev{color:var(--text-soft);margin-left:auto}
.stat-ico{color:var(--accent)}
.btn .icon{margin-right:.45rem}
@media (prefers-reduced-motion: no-preference){ .icon svg{transition:transform .15s ease} }

/* proofs + lightbox */
.proof-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:.6rem;margin-bottom:.8rem}
.proof-thumb{position:relative;aspect-ratio:1;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--surface);cursor:zoom-in}
.proof-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.proof-empty{display:grid;place-items:center;aspect-ratio:1;color:var(--text-soft)}
.lightbox{position:fixed;inset:0;background:color-mix(in srgb,var(--text-strong) 80%,transparent);display:grid;place-items:center;padding:2rem;z-index:60}
.lightbox.hidden{display:none}
.lightbox img{max-width:100%;max-height:90vh;border-radius:var(--radius);box-shadow:0 20px 60px rgba(0,0,0,.4)}
.lightbox-close{position:absolute;top:1rem;right:1.2rem;font-size:2rem;line-height:1;background:none;border:none;color:#fff;cursor:pointer}
#changeNote{width:100%;border:1px solid var(--line-2);border-radius:var(--radius);padding:.7rem;font:inherit;background:var(--bg);color:var(--text);resize:vertical}

/* milestones */
.mile-progress{height:6px;border-radius:3px;background:var(--line-2);overflow:hidden;margin:.2rem 0 .5rem}
.mile-progress span{display:block;height:100%;background:var(--accent);width:0;transition:width .4s ease}
.mile-list{list-style:none;padding:0;margin:.6rem 0 0;display:flex;flex-direction:column;gap:.5rem}
.mile-list li{display:flex;align-items:center;gap:.6rem;color:var(--text)}
.mile-list li .icon{color:var(--text-soft)}
.mile-list li.done{color:var(--text-soft)}
.mile-list li.done .label{text-decoration:line-through}
.mile-list li.done .icon{color:var(--accent)}
.mile-list .due{margin-left:auto;font-family:var(--font-mono);font-size:.66rem;color:var(--text-soft)}
/* messages */
.msg-thread{display:flex;flex-direction:column;gap:.5rem;max-height:340px;overflow-y:auto;padding:.4rem 0;margin-bottom:.7rem}
.msg{max-width:78%;padding:.55rem .8rem;border-radius:14px;font-size:.92rem;line-height:1.35}
.msg .who{display:block;font-family:var(--font-mono);font-size:.6rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft);margin-bottom:.15rem}
.msg.theirs{align-self:flex-start;background:var(--surface);border:1px solid var(--line);border-bottom-left-radius:4px}
.msg.mine{align-self:flex-end;background:color-mix(in srgb,var(--accent) 16%,transparent);border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);border-bottom-right-radius:4px}
.msg .time{display:block;font-size:.62rem;color:var(--text-soft);margin-top:.2rem;text-align:right}
.msg-empty{color:var(--text-soft);display:flex;align-items:center;gap:.5rem;padding:1rem 0;justify-content:center}
.msg-compose{display:flex;gap:.5rem;align-items:flex-end}
.msg-compose textarea{flex:1;border:1px solid var(--line-2);border-radius:var(--radius);padding:.6rem;font:inherit;background:var(--bg);color:var(--text);resize:none;max-height:120px}

/* admin — width governed by .shell-main container */
.admin-inbox{display:flex;flex-direction:column;gap:1.4rem;margin-top:1rem}
.admin-bucket > h3{font-family:var(--font-mono);font-size:.7rem;text-transform:uppercase;letter-spacing:.1em;color:var(--text-soft);margin-bottom:.5rem}
.admin-row{display:flex;align-items:center;gap:.8rem;padding:.9rem 1rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);cursor:pointer;transition:border-color .2s}
.admin-row:hover{border-color:var(--accent)}
.admin-row .who{font-family:var(--font-display);color:var(--text-strong)}
.admin-row .meta{font-family:var(--font-mono);font-size:.66rem;color:var(--text-soft)}
.admin-row .price{margin-left:auto;font-family:var(--font-display);color:var(--text-strong)}
.admin-row .icon{color:var(--text-soft)}
#adReqInfo dl{display:grid;grid-template-columns:auto 1fr;gap:.3rem .8rem;margin:0}
#adReqInfo dt{font-family:var(--font-mono);font-size:.66rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft)}
#adReqInfo dd{margin:0;color:var(--text)}
.qform{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
.qform .field:nth-last-child(1){grid-column:1 / -1}
.qform textarea{width:100%;border:1px solid var(--line-2);border-radius:var(--radius);padding:.6rem;font:inherit;background:var(--bg);color:var(--text);resize:vertical}
@media (max-width:560px){ .qform{grid-template-columns:1fr} }

/* admin actions */
#adminActions .act-row{display:flex;gap:.7rem;align-items:flex-end;flex-wrap:wrap;padding:.7rem 0;border-top:1px solid var(--line)}
#adminActions .act-row:first-of-type{border-top:none}
#adminActions .act-row.hidden{display:none}
#adminActions .field{flex:1;min-width:200px}
#adminActions input[type="file"]{font:inherit;color:var(--text);width:100%}
.act-label{font-family:var(--font-mono);font-size:.66rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft);width:100%}
#markPaidRow{gap:.6rem}

/* admin table inbox */
.admin-table{
  width:100%;border-collapse:collapse;margin-top:.4rem
}
.admin-table thead th{
  font-family:var(--font-mono);font-size:.66rem;text-transform:uppercase;letter-spacing:.1em;
  color:var(--text-soft);text-align:left;padding:.45rem .7rem;
  border-bottom:1px solid var(--line-2);white-space:nowrap
}
.admin-table thead th.col-price{text-align:right}
.admin-table tbody tr.admin-trow{
  cursor:pointer;transition:background .14s
}
.admin-table tbody tr.admin-trow:hover{background:color-mix(in srgb,var(--accent) 6%,transparent)}
.admin-table tbody tr.admin-trow td{
  padding:.75rem .7rem;border-bottom:1px solid var(--line);vertical-align:middle
}
.admin-table tbody tr.admin-trow:last-child td{border-bottom:none}
.admin-table td .who{font-family:var(--font-display);color:var(--text-strong);font-size:.96rem}
.admin-table td.col-price{text-align:right;font-family:var(--font-display);color:var(--text-strong)}
/* on tablet (640–899px): hide Type column to save space */
@media (max-width:899px) and (min-width:640px){
  .admin-table thead th:nth-child(2),
  .admin-table tbody td:nth-child(2){display:none}
}
/* on mobile (<640px): horizontal scroll container — no page overflow */
@media (max-width:639px){
  .admin-bucket{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .admin-table{min-width:480px}
}

/* admin detail two-column grid */
.admin-detail-grid{
  display:grid;
  grid-template-columns:1fr 400px;
  gap:1.6rem;
  align-items:start;
  margin-top:1rem
}
.admin-detail-left{display:flex;flex-direction:column;gap:1.2rem}
.admin-detail-right{
  position:sticky;top:calc(var(--nav-h,64px) + 1.4rem);
  display:flex;flex-direction:column;gap:1.2rem
}
/* stack to single column below 900px */
@media (max-width:899px){
  .admin-detail-grid{grid-template-columns:1fr}
  .admin-detail-right{position:static}
}

/* ==========================================================================
   Task 6: Cross-surface responsive polish
   Target: ≥390px no horizontal overflow; tap targets ≥40px; comfortable mobile
   padding; modals fit viewport; light + dark both verified.
   ========================================================================== */

/* --- global overflow guard ------------------------------------------------ */
/* Prevent any child from pushing the page wider than the viewport.
   Clamp on BOTH html and body: iOS Safari uses documentElement as the scroller
   and ignores a body-only horizontal clamp, so a body-only rule still lets the
   page pan sideways. Use `clip` (not `hidden`) — `hidden` on html breaks
   position:sticky; `clip` doesn't create a scroll container. */
html, body { overflow-x: clip; max-width: 100%; }

/* --- shell main: tighter horizontal padding on small viewports ------------ */
@media (max-width:639px){
  .shell-main{padding:2.4rem 1rem}
}

/* --- tap targets: ensure every interactive element is ≥40px tall ---------- */
/* Buttons are already ≥40px via .btn padding; reinforce btn-text on mobile */
@media (max-width:639px){
  .btn-text{min-height:40px;display:inline-flex;align-items:center;justify-content:center}
  .wiz-back,.nav-hamburger,.nav-drawer-close,.theme-toggle{min-height:40px;min-width:40px}
}

/* --- auth card: comfortable padding on very small screens ----------------- */
@media (max-width:479px){
  .auth-card{padding:1.8rem 1.2rem}
}

/* --- nav: ensure brand name doesn't wrap at 390px ------------------------- */
@media (max-width:639px){
  .brand-name{font-size:.9rem}
  .app-nav .nav-in{padding:.75rem 1rem}
}

/* --- dashboard head: stack vertically on mobile --------------------------- */
@media (max-width:639px){
  .dash-head{flex-direction:column;align-items:flex-start;gap:.8rem}
  /* full-width grid: 1-up on mobile */
  .proj-list{grid-template-columns:1fr}
}

/* --- project detail: ensure cards don't overflow -------------------------- */
@media (max-width:639px){
  #projectDetail .card{padding:1.1rem}
  .detail-title{font-size:clamp(1.5rem,5vw,2rem)}
  /* stages bar: allow items to shrink further on tiny screens */
  .stages li{min-width:44px;font-size:.56rem;padding:.4rem .15rem}
  /* message thread: reduce max-height on mobile */
  .msg-thread{max-height:240px}
  /* proof gallery: 2-up on mobile */
  .proof-gallery{grid-template-columns:repeat(auto-fill,minmax(88px,1fr))}
}

/* --- modals: always fit the viewport -------------------------------------- */
/* .modal already has padding:1.2rem; constrain card width + height */
@media (max-width:639px){
  .modal{padding:.75rem}
  .modal-card{padding:1.2rem;max-height:90vh}
  .agree-text{max-height:36vh;font-size:.86rem}
  /* lightbox: full-width on mobile */
  .lightbox{padding:.75rem}
  .lightbox img{max-height:82vh}
}

/* --- wizard: comfortable inner padding on small screens ------------------- */
@media (max-width:479px){
  .wiz{padding:1.6rem .9rem}
  .wiz-step h1{font-size:clamp(1.5rem,5.5vw,2.4rem)}
  .wiz-choice{padding:1rem 1.1rem}
}

/* --- brief (start-a-project): comfortable inner padding ------------------- */
@media (max-width:639px){
  #newProject{padding:0}
  .brief-step h2{font-size:clamp(1.4rem,4.5vw,2.2rem)}
  /* svc-pick, size-grid, style-grid: 2-up on mobile */
  .svc-pick{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
  .size-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}
  .style-grid{grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}
  /* budget: stack label + input on narrow widths */
  .brange{flex-wrap:wrap;gap:.4rem}
  .brange input[type="range"]{width:100%;flex:none}
  .brange b{min-width:auto}
  /* brief progress bar top: narrower gap */
  .brief-top{gap:.6rem}
}

/* --- admin inbox table: safe guard against container not having overflow --- */
/* The bucket wrapper gets overflow-x:auto from JS, but guard the whole inbox */
@media (max-width:639px){
  .admin-inbox{overflow-x:hidden}
  /* quote form: already 1-col at <560px; reinforce padding */
  #adminPanel .card{padding:1.1rem}
}

/* --- shared cards: ensure padding doesn't make them wider than viewport --- */
@media (max-width:479px){
  .proj{padding:1.1rem 1.2rem}
  .proj-skeleton{padding:1.1rem 1.2rem}
}

/* admin sub-nav + settings */
.settings-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.2rem;align-items:start;margin-bottom:1.4rem}
.settings-grid .span-2{grid-column:1/-1}
.settings-grid textarea{width:100%;border:1px solid var(--line-2);border-radius:var(--radius);padding:.6rem;font:inherit;background:var(--bg);color:var(--text);resize:vertical}
.settings-grid .check{display:flex;gap:.5rem;align-items:center;color:var(--text);margin:.3rem 0 .7rem}

/* admin crud sections */
.crud-form{display:flex;gap:.8rem;align-items:flex-end;flex-wrap:wrap}
.crud-form .field{flex:1;min-width:130px}
.crud-list{display:flex;flex-direction:column;gap:.5rem;margin:1.2rem 0}
.crud-row{display:flex;align-items:center;gap:.9rem;padding:.8rem 1rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.crud-row .name{font-family:var(--font-display);color:var(--text-strong)}
.crud-row .meta{font-family:var(--font-mono);font-size:.66rem;color:var(--text-soft)}
.crud-row .spacer{margin-left:auto}
.crud-row.off{opacity:.55}
.crud-row .chip{font-family:var(--font-mono);font-size:.6rem;text-transform:uppercase;letter-spacing:.08em;padding:.2rem .5rem;border-radius:999px;border:1px solid var(--line-2);color:var(--text-soft)}
.crud-row .chip.on{color:var(--accent);border-color:var(--accent)}
.btn-danger{color:var(--danger)}
.tint-dot{width:14px;height:14px;border-radius:50%;display:inline-block;border:1px solid var(--line-2)}

/* admin clients + earnings */
.stat-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1rem;margin-bottom:1.6rem}
#adminEarnings .card.stat{display:flex;flex-direction:column;gap:.3rem}
.stat-label{font-family:var(--font-mono);font-size:.66rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft)}
.stat-num{font-family:var(--font-display);font-weight:300;font-size:2rem;color:var(--text-strong)}
.sub-h{font-family:var(--font-display);font-weight:300;font-size:1.3rem;color:var(--text-strong);margin:.4rem 0 .8rem}
.crud-row .sub{font-family:var(--font-mono);font-size:.66rem;color:var(--text-soft)}
.crud-row .amt{margin-left:auto;font-family:var(--font-display);color:var(--text-strong)}

/* admin menu (grouped drill-down) */
/* iOS-faithful: one calm centered column of grouped rows, not a wide dashboard grid. */
.admin-menu{display:flex;flex-direction:column;gap:1.6rem;margin:1rem auto 0;max-width:620px}
.admin-menu-group > h3{font-family:var(--font-mono);font-size:.66rem;text-transform:uppercase;letter-spacing:.1em;color:var(--text-soft);margin-bottom:.5rem}
.admin-menu-list{display:flex;flex-direction:column;gap:.55rem}
.admin-menu-item{display:flex;align-items:center;gap:.9rem;padding:.9rem 1.1rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);cursor:pointer;text-align:left;transition:border-color .2s,transform .12s}
.admin-menu-item:hover{border-color:var(--accent);transform:translateY(-1px)}
.admin-menu-item .icon{width:38px;height:38px;border-radius:50%;flex:none;display:inline-flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--accent)}
.admin-menu-item .label{font-family:var(--font-display);font-size:1.02rem;color:var(--text-strong)}
.admin-menu-item .chev{margin-left:auto;color:var(--text-soft)}
#adminMenuBack{margin-bottom:.6rem}

/* admin reviews + alerts */
#adminReviews .crud-row{align-items:flex-start}
.review-main{display:flex;flex-direction:column;gap:.2rem}
.review-stars{color:var(--accent);font-size:.9rem;letter-spacing:1px}
.review-body{color:var(--text);font-size:.92rem}
.review-who{font-family:var(--font-mono);font-size:.66rem;color:var(--text-soft)}
#adminAlerts textarea{width:100%;border:1px solid var(--line-2);border-radius:var(--radius);padding:.6rem;font:inherit;background:var(--bg);color:var(--text);resize:vertical}

/* admin trash + emails */
#emailList .crud-row, #trashList .crud-row{align-items:flex-start}
.ops-main{display:flex;flex-direction:column;gap:.15rem}
.ops-sub{font-family:var(--font-mono);font-size:.66rem;color:var(--text-soft)}
.ops-status{font-family:var(--font-mono);font-size:.6rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-soft);margin-left:auto}

/* admin templates + ads */
.tmpl-card{margin-bottom:0}
.tmpl-head{display:flex;align-items:center;gap:.7rem;margin-bottom:.2rem}
.tmpl-head .name{font-family:var(--font-display);font-size:1.1rem;color:var(--text-strong)}
.tmpl-head .spacer{margin-left:auto}
.tmpl-ms{list-style:none;padding:0;margin:0 0 .6rem;display:flex;flex-direction:column;gap:.3rem}
.tmpl-ms li{display:flex;align-items:center;gap:.6rem;color:var(--text);font-size:.9rem}
.tmpl-ms li .x{margin-left:auto;color:var(--danger);cursor:pointer;background:none;border:none;font-size:.9rem}
.tmpl-add{display:flex;gap:.5rem;align-items:center}
.tmpl-add .ios-input{flex:1;margin:0}
#adminAds textarea{width:100%;border:1px solid var(--line-2);border-radius:var(--radius);padding:.6rem;font:inherit;background:var(--bg);color:var(--text);resize:vertical;margin:.4rem 0 .6rem}

/* admin users & access */
.perm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:.3rem .8rem;margin:.6rem 0}
.perm-grid label{display:flex;gap:.5rem;align-items:center;color:var(--text);font-size:.85rem}
.staff-card{margin-bottom:0}
.temp-pw{font-family:var(--font-mono);background:var(--surface);border:1px solid var(--accent);border-radius:var(--radius);padding:.6rem .8rem;margin:.6rem 0;color:var(--text-strong)}

/* admin calendar + calls */
#agendaList .crud-row, #slotList .crud-row{align-items:flex-start}
.agenda-when{font-family:var(--font-mono);font-size:.66rem;color:var(--accent);min-width:8.5rem}
.agenda-main{display:flex;flex-direction:column;gap:.15rem}
.agenda-kind{font-family:var(--font-mono);font-size:.6rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-soft)}

/* admin call scheduling — phone save row, availability days, booked-by detail */
#adminCalls .card .row{display:flex;gap:.7rem;align-items:flex-end;flex-wrap:wrap}
#adminCalls .field.grow,#adminUsers .field.grow{flex:1 1 12rem}
.day-chips{display:flex;flex-wrap:wrap;gap:.4rem;margin:.3rem 0}
.day-chip{display:inline-flex;align-items:center;gap:.35rem;border:1px solid var(--line-2);border-radius:999px;padding:.3rem .7rem;font-size:.78rem;color:var(--text);background:var(--bg);cursor:pointer}
.day-chip input{margin:0}
.day-chip:has(input:checked){border-color:var(--accent);color:var(--accent);background:color-mix(in srgb, var(--accent) 8%, transparent)}
.slot-detail{margin-top:.4rem;display:flex;flex-direction:column;gap:.45rem;width:100%}
.slot-who{font-size:.8rem;color:var(--text)}
.slot-who .who-name{font-family:var(--font-display);color:var(--text-strong)}
.slot-who .who-line{color:var(--text-soft);font-size:.74rem}
.slot-link-row{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.slot-link-row .ios-input{flex:1 1 12rem;margin:0}
.tel-link{color:var(--accent);text-decoration:none;font-family:var(--font-mono);font-size:.78rem}
.tel-link:hover{text-decoration:underline}

/* admin user trash */
#trashedUsers .crud-row{align-items:flex-start}

/* admin dashboard */
.card.stat.dash-stat{display:flex;flex-direction:row;align-items:center;gap:.9rem}
.dash-stat-icon{width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:color-mix(in srgb, var(--accent) 12%, transparent);color:var(--accent);flex:none}
.dash-stat-body{display:flex;flex-direction:column;gap:.2rem;min-width:0}
.dash-stat .stat-num{font-size:1.6rem}
.dash-pipeline{display:flex;flex-direction:column;gap:.55rem;margin-bottom:1.6rem}
.dash-pipe-row{display:flex;align-items:center;gap:.9rem}
.dash-pipe-label{flex:0 0 11rem;font-size:.85rem;color:var(--text)}
.dash-pipe-track{flex:1;height:10px;border-radius:999px;background:var(--line);overflow:hidden}
.dash-pipe-fill{display:block;height:100%;border-radius:999px;background:var(--accent);transition:width .3s ease}
.dash-pipe-count{flex:0 0 2rem;text-align:right;font-family:var(--font-mono);font-size:.8rem;color:var(--text-strong)}
@media (max-width:560px){.dash-pipe-label{flex-basis:7.5rem;font-size:.78rem}}

/* admin retainers */
#rtList .crud-row{align-items:flex-start}

/* admin alert center */
.alc-card{margin-bottom:0}
.alc-main{min-width:0;display:flex;flex-direction:column;gap:.15rem;margin-bottom:.3rem}

/* admin builders (ads / services editors, send-alert preview, template questions) */
.builder{margin-top:1rem}
.builder.hidden{display:none}
.builder-actions{display:flex;gap:.6rem;align-items:center;margin-top:1rem;flex-wrap:wrap}
.btn-ghost{background:none;border:1px solid var(--line-2);color:var(--text-soft)}
.btn-ghost:hover{border-color:var(--accent);color:var(--text-strong)}
.micro{font-size:.72rem;margin:.2rem 0}
.field-h{font-family:var(--font-mono);font-size:.66rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft);margin:1rem 0 .5rem}
.builder .field{display:flex;flex-direction:column;gap:.3rem;margin:.6rem 0}
.builder .field input,.builder .field textarea,.builder .field select{border:1px solid var(--line-2);border-radius:var(--radius);padding:.5rem .6rem;font:inherit;background:var(--bg);color:var(--text)}
.builder .field textarea{resize:vertical}
.builder .check{display:flex;gap:.5rem;align-items:center;color:var(--text);margin:.3rem 0}
.check-list{display:flex;flex-direction:column;gap:.3rem;margin:.3rem 0}
.check-list input[type=datetime-local]{border:1px solid var(--line-2);border-radius:var(--radius);padding:.4rem .55rem;font:inherit;background:var(--bg);color:var(--text);max-width:16rem}

/* swatch / icon grids */
.pick-grid{display:flex;flex-wrap:wrap;gap:.5rem;margin:.3rem 0}
.icon-grid .pick-ic{width:46px;height:46px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line-2);border-radius:12px;background:var(--bg);color:var(--text-soft);cursor:pointer;transition:border-color .15s,color .15s,background .15s}
.icon-grid .pick-ic:hover{border-color:var(--accent)}
.icon-grid .pick-ic.on{border-width:1.5px}
.tint-grid .pick-tint{width:34px;height:34px;border-radius:50%;border:1px solid rgba(255,255,255,.7);box-shadow:0 0 0 1px var(--line-2);cursor:pointer;padding:0}
.tint-grid .pick-tint.on{box-shadow:0 0 0 2.5px var(--text-strong)}
.pick-ic:focus-visible,.pick-tint:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* radio rows (ad layout / popup template / frequency) */
.radio-list{display:flex;flex-direction:column;gap:.2rem}
.radio-row{display:flex;align-items:flex-start;gap:.7rem;padding:.55rem .2rem;background:none;border:none;text-align:left;cursor:pointer;width:100%;color:var(--text)}
.radio-row .radio-dot{color:var(--text-soft);flex:none;margin-top:1px}
.radio-row.on .radio-dot{color:var(--accent)}
.radio-main{display:flex;flex-direction:column;gap:.1rem;min-width:0}
.radio-label{font-family:var(--font-display);color:var(--text-strong);font-size:.95rem}
.radio-help{color:var(--text-soft);font-size:.8rem}

/* service editor live preview */
.svc-ic{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;flex:none}
.svc-ic.lg{width:58px;height:58px;border-radius:50%}
.svc-preview{display:flex;flex-direction:column;align-items:center;gap:.4rem;margin:.6rem 0 1rem}
.svc-card{display:flex;flex-direction:column;align-items:center;gap:.7rem;padding:1.4rem 2rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);min-width:160px}
.svc-card-name{font-family:var(--font-display);color:var(--text-strong);font-size:1rem}

/* service list row icon chip + reorder buttons */
#svcList .svc-ic{margin-right:.1rem}
.btn-text.reorder{padding:.2rem;min-height:auto;color:var(--text-soft)}
.btn-text.reorder:disabled{opacity:.3;cursor:default}

/* ad list thumbnail + live preview */
.ad-thumb{width:48px;height:48px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;flex:none}
.ad-thumb img{width:100%;height:100%;object-fit:cover}
.ad-preview-wrap{margin:.4rem 0 1rem}
.ad-card{border-radius:var(--radius);overflow:hidden;border:1px solid var(--line);background:var(--surface);min-height:96px;display:flex;flex-direction:column;justify-content:flex-end;position:relative;max-width:420px}
.ad-card.ad-image,.ad-card.has-img{padding:0}
.ad-card-img{width:100%;height:160px;object-fit:cover;display:block}
.ad-card.has-img .ad-card-text,.ad-card.ad-popup-hero .ad-card-text{position:absolute;left:0;right:0;bottom:0;padding:1rem;background:linear-gradient(transparent,rgba(0,0,0,.55));color:#fff}
.ad-card-text{padding:1.1rem 1.2rem;display:flex;flex-direction:column;gap:.4rem}
.ad-card.ad-text .ad-card-text,.ad-card.ad-compact .ad-card-text,.ad-card.ad-popup-hero .ad-card-text,.ad-card.ad-popup-festive .ad-card-text{color:#fff}
.ad-card-title{font-family:var(--font-display);font-size:1.15rem;font-weight:500}
.ad-card-body{font-size:.9rem;opacity:.92}
.ad-card-cta{align-self:flex-start;background:rgba(255,255,255,.92);color:#222;font-size:.8rem;font-weight:600;padding:.35rem .8rem;border-radius:999px;margin-top:.2rem}
.ad-card.ad-text .ad-card-cta,.ad-card.ad-compact .ad-card-cta{background:rgba(255,255,255,.92)}
.ad-card.ad-compact{min-height:auto}
.ad-card.ad-compact .ad-card-text{flex-direction:row;align-items:center;justify-content:space-between}
.ad-card.ad-popup-minimal{background:var(--surface)!important;color:var(--text)}
.ad-card.ad-popup-minimal .ad-card-text{color:var(--text)}
.ad-card.ad-popup-minimal .ad-card-cta{background:var(--accent);color:#fff}

/* send-alert push-notification preview */
.push-preview{display:flex;gap:.8rem;align-items:flex-start;padding:.9rem 1rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);max-width:420px;margin-bottom:1rem}
.push-mark{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:color-mix(in srgb,var(--accent) 18%,transparent);color:var(--accent);flex:none}
.push-main{display:flex;flex-direction:column;gap:.15rem;min-width:0}
.push-title{font-family:var(--font-display);color:var(--text-strong);font-weight:600;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.push-body{color:var(--text-soft);font-size:.85rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* template editor sub-headings (milestones / intake questions) */
.tmpl-subhead{font-family:var(--font-mono);font-size:.64rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft);margin:.8rem 0 .4rem}
.tmpl-ms li .icon{flex:none;color:var(--text-soft);display:inline-flex}

/* notifications */
.nav-bell{position:relative;width:40px;height:40px;border-radius:50%;border:1px solid var(--line-2);background:var(--surface);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text)}
.nav-bell:hover{border-color:var(--accent)}
.notif-badge{position:absolute;top:-3px;right:-3px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--danger);color:#fff;font-family:var(--font-mono);font-size:.6rem;display:flex;align-items:center;justify-content:center}
.notif-badge.hidden{display:none}
.notif-panel{position:fixed;top:64px;right:1.5rem;width:min(360px,calc(100vw - 2rem));max-height:70vh;overflow:auto;background:var(--bg);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 16px 48px rgba(0,0,0,.18);z-index:55}
.notif-panel.hidden{display:none}
.notif-head{display:flex;align-items:center;justify-content:space-between;padding:.8rem 1rem;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--bg)}
.notif-list{display:flex;flex-direction:column}
.notif-item{display:flex;flex-direction:column;gap:.15rem;padding:.8rem 1rem;border-bottom:1px solid var(--line);cursor:pointer}
.notif-item:hover{background:var(--surface)}
.notif-item.unread{background:color-mix(in srgb,var(--accent) 7%,transparent)}
.notif-item .nt{font-family:var(--font-display);color:var(--text-strong);font-size:.95rem}
.notif-item .nb{color:var(--text-soft);font-size:.85rem}
.notif-item .nw{font-family:var(--font-mono);font-size:.62rem;color:var(--text-soft)}
.notif-empty{padding:1.4rem 1rem;text-align:center;color:var(--text-soft)}
@media (max-width:560px){ .notif-panel{right:1rem;left:1rem;width:auto} }

/* client code + review */
.code-box{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;margin:.6rem 0}
.code-box input{flex:1;min-width:140px;border:1px solid var(--line-2);border-radius:var(--radius);padding:.45rem .6rem;font:inherit;background:var(--bg);color:var(--text)}
.code-box .muted{flex-basis:100%}
.star-row{display:flex;gap:.2rem;margin:.2rem 0 .6rem}
.star-row button{background:none;border:none;font-size:1.6rem;line-height:1;cursor:pointer;color:var(--line-2);padding:0}
.star-row button.on{color:var(--accent)}
#reviewCard textarea{width:100%;border:1px solid var(--line-2);border-radius:var(--radius);padding:.6rem;font:inherit;background:var(--bg);color:var(--text);resize:vertical;margin-bottom:.6rem}

/* book a call */
.book-slots{display:flex;flex-direction:column;gap:.5rem;max-height:46vh;overflow:auto;margin:.6rem 0}
.book-slot{display:flex;align-items:center;gap:.8rem;padding:.7rem .9rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);cursor:pointer;text-align:left}
.book-slot:hover{border-color:var(--accent)}
.book-slot.sel{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 30%,transparent)}
.book-slot .when{font-family:var(--font-display);color:var(--text-strong)}
.book-slot .dur{margin-left:auto;font-family:var(--font-mono);font-size:.66rem;color:var(--text-soft)}
#bookModal select,#bookModal input{width:100%;border:1px solid var(--line-2);border-radius:var(--radius);padding:.5rem .6rem;font:inherit;background:var(--bg);color:var(--text)}

/* modal action row (book-a-call lives outside #projectDetail) */
.modal .row{display:flex;gap:.8rem;align-items:center;flex-wrap:wrap;margin-top:.6rem}

/* ===== Brand kit ===== */
.bk-screen, .bk-wizard { max-width: 860px; margin: 0 auto; }
.bk-head { display:flex; align-items:center; gap:1rem; margin-bottom:1.2rem; }
.bk-head h1 { margin:0; font-size:1.6rem; }
.bk-head .btn-solid { margin-left:auto; }
.bk-count { color:var(--text-soft); font-size:.85rem; margin:-.4rem 0 1rem; }
.bk-empty { padding:1.4rem 1rem; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); color:var(--text-soft); }

/* list rows */
.bk-row { display:flex; align-items:center; gap:.9rem; padding:.9rem 1rem; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); margin-bottom:.7rem; cursor:pointer; }
.bk-row:hover { border-color:var(--accent); }
.bk-row-thumb, .bk-logo-thumb, .bk-row-thumb img, .bk-logo-thumb img { width:46px; height:46px; border-radius:11px; object-fit:cover; }
.bk-row-thumb, .bk-logo-thumb { display:flex; align-items:center; justify-content:center; background:color-mix(in srgb,var(--accent) 14%,transparent); color:var(--accent); border:1px solid var(--line); overflow:hidden; }
.bk-row-mid { flex:1; min-width:0; display:flex; flex-direction:column; gap:.3rem; }
.bk-row-name { font-family:var(--font-display); color:var(--text-strong); font-size:1.02rem; }
.bk-row-sub { color:var(--text-soft); font-size:.82rem; }
.bk-del { background:none; border:none; cursor:pointer; color:var(--danger); display:inline-flex; padding:.3rem; }
.bk-swatches { display:flex; gap:.3rem; flex-wrap:wrap; }
.bk-sw { width:20px; height:20px; border-radius:6px; border:1px solid var(--line-2); display:inline-block; }

/* editor */
.bk-editor-card { display:flex; flex-direction:column; gap:1.3rem; }
.bk-field { display:flex; flex-direction:column; gap:.45rem; }
.bk-field > span:first-child, .bk-field-h { font-family:var(--font-display); color:var(--text-strong); font-size:1rem; }
.bk-hint { color:var(--text-soft); font-size:.82rem; margin:0; }
.bk-field input[type=text], .bk-field textarea { width:100%; border:1px solid var(--line-2); border-radius:var(--radius); padding:.6rem .7rem; font:inherit; background:var(--bg); color:var(--text); }
.bk-field textarea { resize:vertical; }
.bk-colors { display:flex; gap:.4rem; flex-wrap:wrap; }
.bk-color { display:inline-flex; align-items:center; gap:.35rem; border:1px solid var(--line); border-radius:999px; padding:.2rem .5rem; font-family:var(--font-mono); font-size:.72rem; }
.bk-color button { background:none; border:none; cursor:pointer; color:var(--text-soft); font-size:1rem; line-height:1; }
.bk-logo-row { display:flex; align-items:center; gap:1rem; }
.bk-logo-empty svg { width:22px; height:22px; }

/* style gallery */
.style-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:.7rem; }
.style-card { padding:0; border:2px solid transparent; border-radius:14px; overflow:hidden; background:var(--surface); cursor:pointer; text-align:left; }
.style-card.sel { border-color:var(--accent); }
.style-sw { height:78px; }
.style-sw svg { width:100%; height:100%; display:block; }
.style-foot { display:flex; align-items:center; gap:.4rem; padding:.5rem .6rem; }
.style-check { width:18px; height:18px; border-radius:50%; border:1px solid var(--line-2); color:#fff; font-size:.7rem; display:flex; align-items:center; justify-content:center; }
.style-card.sel .style-check { background:var(--accent); border-color:var(--accent); }
.style-name { font-size:.85rem; color:var(--text-strong); }

/* font browser */
.font-list { display:flex; flex-direction:column; gap:.7rem; max-height:60vh; overflow:auto; padding:.1rem; }
.font-card { text-align:left; background:var(--surface); border:2px solid transparent; border-radius:14px; padding:1rem; cursor:pointer; color:var(--text); }
.font-card.sel { border-color:var(--accent); }
.font-meta { display:flex; justify-content:space-between; align-items:center; margin-bottom:.4rem; font-family:var(--font-sans); }
.font-nm { font-weight:600; font-size:.82rem; }
.font-cat { font-size:.62rem; letter-spacing:.08em; color:var(--text-soft); }
.font-h { font-size:1.6rem; line-height:1.1; color:var(--text-strong); }
.font-s { font-size:.95rem; color:var(--text-soft); }
.font-b { font-size:.82rem; color:var(--text-soft); }

/* color picker */
.cp { display:flex; flex-direction:column; gap:.9rem; }
.cp-h { font-family:var(--font-display); color:var(--text-strong); font-size:.92rem; }
.cp-pop-row { display:flex; gap:.7rem; overflow-x:auto; padding:.2rem 0; }
.cp-pop-item { flex:0 0 auto; width:58px; background:none; border:none; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:.3rem; }
.cp-pop-dot { width:40px; height:40px; border-radius:50%; border:1px solid var(--line-2); }
.cp-pop-name { font-size:.62rem; color:var(--text-soft); text-align:center; }
.cp-field { position:relative; height:180px; border-radius:14px; overflow:hidden; border:1px solid var(--line-2); touch-action:none; cursor:crosshair; }
.cp-field-hue, .cp-field-white, .cp-field-black { position:absolute; inset:0; }
.cp-field-white { background:linear-gradient(to right,#fff,rgba(255,255,255,0)); }
.cp-field-black { background:linear-gradient(to top,#000,rgba(0,0,0,0)); }
.cp-hue { position:relative; height:26px; border-radius:999px; touch-action:none; cursor:pointer; background:linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00); }
.cp-thumb { position:absolute; width:22px; height:22px; border-radius:50%; border:2px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,.35); transform:translate(-50%,-50%); top:50%; pointer-events:none; }
.cp-hue .cp-thumb { top:50%; }
.cp-preview { display:flex; align-items:center; gap:.8rem; }
.cp-sw { width:52px; height:52px; border-radius:10px; border:1px solid var(--line-2); }
.cp-hex { font-family:var(--font-mono); color:var(--text-strong); }
.cp-add { margin-left:auto; }
.cp-tabs { display:inline-flex; border:1px solid var(--line-2); border-radius:999px; overflow:hidden; margin-bottom:.5rem; }
.cp-tab { background:none; border:none; padding:.3rem .9rem; cursor:pointer; color:var(--text-soft); font:inherit; }
.cp-tab.on { background:var(--accent); color:#fff; }
.cp-hexbox, .cp-rgbbox { display:flex; gap:.5rem; }
.cp-hexbox input, .cp-rgb input { width:100%; border:1px solid var(--line-2); border-radius:var(--radius); padding:.45rem .6rem; font:var(--font-mono); background:var(--bg); color:var(--text); }
.cp-rgb { display:flex; align-items:center; gap:.35rem; flex:1; }
.cp-rgb-l { font-size:.75rem; color:var(--text-soft); }
.cp-ideas { border:1px solid var(--line); border-radius:16px; padding:.9rem; background:var(--surface); }
.cp-ideas-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:.4rem; }
.cp-harmony { border:1px solid var(--line-2); border-radius:999px; padding:.25rem .5rem; font:inherit; background:var(--bg); color:var(--text); }
.cp-blurb { color:var(--text-soft); font-size:.8rem; margin:0 0 .5rem; }
.cp-idea-row { display:flex; gap:.5rem; }
.cp-idea { flex:1; height:48px; border-radius:10px; border:1px solid var(--line-2); cursor:pointer; }
.cp-hint { color:var(--text-soft); font-size:.7rem; margin:.4rem 0 0; }

/* wizard */
.bk-wizard { display:flex; flex-direction:column; align-items:stretch; padding-top:.5rem; }
.bk-wiz-feather { text-align:center; margin-bottom:.6rem; }
.bk-wiz-feather img { width:40px; height:40px; object-fit:contain; }
.bk-wiz-head { display:flex; align-items:center; gap:.8rem; margin-bottom:1.4rem; }
.bk-wiz-circle { width:38px; height:38px; border-radius:50%; border:1px solid var(--line-2); background:var(--surface); cursor:pointer; font-size:1rem; color:var(--text); flex:none; }
.bk-wiz-bar { flex:1; height:6px; border-radius:999px; background:var(--line); overflow:hidden; }
.bk-wiz-fill { height:100%; background:var(--accent); transition:width .4s ease; }
.bk-wiz-stage { position:relative; }
.bk-wiz-panel { display:flex; flex-direction:column; gap:1rem; }
.bk-wiz-panel.in-right { transform:translateX(40px); opacity:0; }
.bk-wiz-panel.in-left { transform:translateX(-40px); opacity:0; }
.bk-wiz-panel { transition:transform .35s cubic-bezier(.22,.68,0,1.2), opacity .35s ease; }
.bk-step { display:flex; flex-direction:column; gap:1rem; }
.bk-step-title { margin:0; font-size:1.5rem; color:var(--text-strong); }
.bk-step-sub { margin:0; color:var(--text-soft); }
.bk-wiz-primary { align-self:stretch; }

/* color toast */
.bk-toast { position:fixed; left:50%; bottom:30px; display:flex; align-items:center; gap:.6rem; padding:.6rem 1rem; border-radius:999px; background:var(--text-strong); color:var(--bg); box-shadow:0 12px 30px rgba(0,0,0,.25); opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; z-index:80; transform:translateX(-50%) translateY(20px); }
.bk-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.bk-toast-sw { width:20px; height:20px; border-radius:6px; border:1px solid rgba(255,255,255,.4); }
@media (max-width:560px){ .style-grid{ grid-template-columns:repeat(2,1fr); } }

/* admin milestones */
.am-list{display:flex;flex-direction:column;gap:.45rem;margin-bottom:.7rem}
.am-row{display:flex;align-items:center;gap:.5rem}
.am-row input[type="checkbox"]{width:18px;height:18px;flex:none}
.am-row .am-title{flex:1;min-width:0;border:1px solid var(--line-2);border-radius:var(--radius);padding:.4rem .55rem;font:inherit;background:var(--bg);color:var(--text)}
.am-row .am-due{flex:none;width:140px;border:1px solid var(--line-2);border-radius:var(--radius);padding:.35rem .45rem;font:inherit;background:var(--bg);color:var(--text)}
.am-row .am-title.done{text-decoration:line-through;color:var(--text-soft)}
.am-add{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.am-add #amTitle{flex:1;min-width:120px;border:1px solid var(--line-2);border-radius:var(--radius);padding:.45rem .6rem;font:inherit;background:var(--bg);color:var(--text)}
.am-add #amDue{border:1px solid var(--line-2);border-radius:var(--radius);padding:.4rem .45rem;font:inherit;background:var(--bg);color:var(--text)}

/* ===========================================================================
   ADMIN SECTIONS — single-column iOS-style (Services / Referrals / Discounts)
   Centered column matching the admin MENU (max-width 620px), frosted rows,
   tinted icon tiles, sliders with a value readout, pill segmented controls.
   =========================================================================== */
.admin-sec{max-width:620px;margin:0 auto}
.admin-sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem}
.admin-sec-head .detail-title{margin-bottom:.4rem}
.admin-sec .detail-title{text-align:left}
.admin-sec-intro{color:var(--text-soft);font-size:.9rem;line-height:1.45;margin:0 0 1.1rem}

/* an iOS "link" button (top-right Reorder / Done) */
.ios-link{background:none;border:none;color:var(--accent);font:inherit;font-weight:600;cursor:pointer;padding:.2rem .1rem}
.ios-link:disabled{color:var(--text-soft);opacity:.55;cursor:default}
.ios-link:hover:not(:disabled){text-decoration:underline}

/* single-column frosted rows (services, discount codes) */
.ios-list{display:flex;flex-direction:column;gap:.55rem;margin:0 0 1rem}
.ios-row{display:flex;align-items:center;gap:.9rem;padding:.8rem .9rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);transition:border-color .2s,transform .12s}
.ios-row.tappable{cursor:pointer}
.ios-row.tappable:hover{border-color:var(--accent);transform:translateY(-1px)}
.ios-row.tappable:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.ios-row.off{opacity:.6}
.ios-row-main{display:flex;flex-direction:column;gap:.12rem;min-width:0;flex:1}
.ios-row-title{font-family:var(--font-display);color:var(--text-strong);font-size:1rem;font-weight:500}
.ios-row-title.big{font-size:1.15rem;letter-spacing:.02em}
.ios-row-sub{font-size:.8rem;color:var(--text-soft)}
.ios-row-chev{color:var(--text-soft);flex:none;display:inline-flex}
.ios-row-ctl{display:flex;align-items:center;gap:.3rem;flex:none}

/* small round icon control (reorder up/down, trash) */
.ios-icon-btn{width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);background:var(--bg);color:var(--text-soft);cursor:pointer;padding:0;transition:border-color .15s,color .15s}
.ios-icon-btn:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}
.ios-icon-btn:disabled{opacity:.3;cursor:default}
.ios-icon-btn.danger{color:#B23A3A}
.ios-icon-btn.danger:hover:not(:disabled){border-color:#B23A3A;color:#B23A3A}
.ios-icon-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* services row icon = bigger tinted circle (matches admin-menu icon tile) */
#svcList .svc-ic{width:46px;height:46px;border-radius:50%}

/* "+ Add a service" full-width solid button at the bottom */
.ios-add-btn{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;padding:.9rem 1rem;border:none;border-radius:var(--radius);background:var(--accent);color:#fff;font-family:var(--font-display);font-size:1rem;font-weight:500;cursor:pointer;transition:filter .15s}
.ios-add-btn:hover{filter:brightness(1.05)}
.ios-add-btn .ic{display:inline-flex}

/* create cards (discount "New code", referral card) */
.ios-create-card{margin:0 0 1.2rem}
.ios-card-label{font-family:var(--font-mono);font-size:.66rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft);margin:0 0 .7rem}
.ios-input{width:100%;border:1px solid var(--line);border-radius:var(--radius-control,12px);padding:.7rem .8rem;font:inherit;background:var(--bg);color:var(--text-strong);margin:0 0 .8rem;text-transform:uppercase;letter-spacing:.04em}
.ios-input::placeholder{color:var(--text-soft);text-transform:none;letter-spacing:normal}
.ios-empty{color:var(--text-soft);font-size:.92rem}

/* slider row: label + right-aligned value readout, then the range */
.ios-slider-row{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin:.6rem 0 .35rem}
.ios-slider-label{font-size:.92rem;color:var(--text-strong)}
.ios-slider-value{font-size:.95rem;font-weight:600;color:var(--accent);font-variant-numeric:tabular-nums}
.ios-help{font-size:.78rem;color:var(--text-soft);line-height:1.4;margin:.35rem 0 .2rem}

/* range slider — clean track + readout (iOS Slider look) */
.ios-slider{-webkit-appearance:none;appearance:none;width:100%;height:5px;border-radius:999px;background:var(--line);outline:none;margin:.2rem 0 .9rem;cursor:pointer}
.ios-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:22px;height:22px;border-radius:50%;background:var(--surface);border:1px solid var(--line);box-shadow:0 1px 4px rgba(0,0,0,.22);cursor:pointer}
.ios-slider::-moz-range-thumb{width:22px;height:22px;border-radius:50%;background:var(--surface);border:1px solid var(--line);box-shadow:0 1px 4px rgba(0,0,0,.22);cursor:pointer}
.ios-slider:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.ios-slider::-webkit-slider-thumb:hover{border-color:var(--accent)}

/* full-width solid action button (Create code / Save) */
.ios-solid-btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;width:100%;padding:.8rem 1rem;border:none;border-radius:var(--radius-control,14px);background:var(--accent);color:#fff;font-family:var(--font-display);font-size:1rem;font-weight:500;cursor:pointer;transition:filter .15s}
.ios-solid-btn:hover:not(:disabled){filter:brightness(1.05)}
.ios-solid-btn:disabled{opacity:.5;cursor:default}

/* iOS toggle switch */
.ios-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:.1rem 0 .4rem}
.ios-toggle-label{font-size:.95rem;color:var(--text-strong)}
.ios-switch{position:relative;display:inline-flex;width:46px;height:28px;flex:none}
.ios-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;z-index:1}
.ios-switch-track{position:absolute;inset:0;border-radius:999px;background:var(--line);transition:background .2s}
.ios-switch-track::after{content:"";position:absolute;top:2px;left:2px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .2s}
.ios-switch input:checked + .ios-switch-track{background:#1D9E75}
.ios-switch input:checked + .ios-switch-track::after{transform:translateX(18px)}
.ios-switch input:focus-visible + .ios-switch-track{outline:2px solid var(--accent);outline-offset:2px}

/* referral card frosted block + dim-when-off */
.ios-ref-card{margin:0 0 1rem}
.ios-ref-card.ios-dim{opacity:.55;transition:opacity .2s}
.ios-ref-card.ios-dim .ios-toggle-row{opacity:1}
.ios-referrals-host > h2{margin-bottom:.7rem}

/* segmented control reuses designer.css .ds-seg; ensure spacing in admin */
#adminDiscounts .ds-seg{margin:0 0 .4rem}
.admin-sec .ds-seg{margin:0 0 .8rem}

/* --- admin batch-1 fidelity additions (extend the iOS-control system) --- */
/* Normal-case text/number/select input (the base .ios-input upcases for codes). */
.ios-input--text,select.ios-input{text-transform:none;letter-spacing:normal}
.ios-input--text::placeholder{text-transform:none;letter-spacing:normal}
textarea.ios-input{min-height:5.5em;resize:vertical;line-height:1.45}
select.ios-input{appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--text-soft) 50%),linear-gradient(135deg,var(--text-soft) 50%,transparent 50%);background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:2.2rem;cursor:pointer}
/* Stacked field: a caption above its own full-width input, inside a card. */
.ios-field{display:block;margin:0 0 .2rem}
.ios-field-label{display:block;font-size:.82rem;color:var(--text-soft);margin:0 0 .35rem;font-weight:500}
.ios-section-cap{font-family:var(--font-mono);font-size:.66rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft);margin:.2rem 0 .7rem}
/* Chip pill usable outside .crud-row (status pills inside .ios-row / cards). */
.admin-sec .chip,.ios-row .chip{font-family:var(--font-mono);font-size:.6rem;text-transform:uppercase;letter-spacing:.08em;padding:.2rem .5rem;border-radius:999px;border:1px solid var(--line-2);color:var(--text-soft);flex:none;white-space:nowrap}
.admin-sec .chip.on,.ios-row .chip.on{color:var(--accent);border-color:var(--accent)}
.admin-sec .chip.danger,.ios-row .chip.danger{color:#B23A3A;border-color:#B23A3A}
/* Row trailing controls cluster (chip + switch + icon button). */
.ios-row-trail{display:flex;align-items:center;gap:.55rem;flex:none}
/* A card that lays out as a stacked entity (name + sub lines + actions). */
.ios-card-row{display:flex;flex-direction:column;gap:.5rem}
.ios-card-row.off{opacity:.6}
.ios-card-row-head{display:flex;align-items:flex-start;gap:.7rem}
.ios-card-actions{display:flex;flex-wrap:wrap;gap:.9rem;align-items:center;margin-top:.2rem}
.ios-row-sub.with-ic{display:flex;align-items:center;gap:.4rem}
.ios-row-sub.with-ic svg{width:14px;height:14px;flex:none}
/* Tinted leading icon chip (reuses svc-ic sizing) for email/ad/list rows. */
.ios-lead-ic{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;flex:none}
/* Group caption above a sub-list (Upcoming/Past, audience groups). */
.ios-group-cap{font-family:var(--font-mono);font-size:.66rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft);margin:1rem 0 .55rem}
.ios-group-cap:first-child{margin-top:.2rem}
/* Toggle row used in lists (permissions, alert-center push/email). */
.ios-toggle-row.compact{margin:.35rem 0}
.ios-toggle-row .ios-toggle-sub{display:block;font-size:.76rem;color:var(--text-soft);margin-top:.15rem}
.ios-add-btn.slate{background:var(--surface);color:var(--text-strong);border:1px solid var(--line)}
.ios-add-btn.slate:hover{filter:none;border-color:var(--accent);color:var(--accent)}
.ios-link.danger{color:#B23A3A}
.ios-link.danger:hover:not(:disabled){color:#B23A3A}
/* Any remaining legitimate checkbox in the constrained admin column (the ad
   placement multi-select) is tinted to brand — never a raw red native box. */
.admin-sec input[type=checkbox],.builder input[type=checkbox]{accent-color:var(--accent)}
.builder .check-list .check{display:flex;align-items:center;gap:.5rem}
.builder .field-h{margin:.9rem 0 .4rem}
.alc-saved{font-size:.72rem;color:#1D9E75;font-weight:600;margin-left:.5rem}
.day-chips.admin-days{margin:.2rem 0 .8rem}

/* --- admin batch-2 (Dashboard / Earnings / Calendar / Trash → iOS parity) --- */
/* Dashboard: two big tinted stat tiles + two small stat rows. */
.dash-big-row{display:flex;gap:.75rem;margin-bottom:.75rem}
.dash-big{flex:1;display:flex;flex-direction:column;gap:.5rem;padding:1.1rem;border-radius:20px;background:color-mix(in srgb,var(--tint) 16%,transparent)}
.dash-big-ic{color:var(--tint);display:inline-flex}
.dash-big-ic svg{width:22px;height:22px}
.dash-big-num{font-family:var(--font-display);font-size:2rem;font-weight:600;color:var(--text-strong);line-height:1}
.dash-big-cap{font-size:.8rem;color:var(--text-soft)}
.dash-small-row{display:flex;gap:.75rem;margin-bottom:1rem}
.dash-small{flex:1;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.85rem 1rem}
.dash-small-lab{font-size:.88rem;color:var(--text-soft)}
.dash-small-val{font-family:var(--font-display);font-weight:600;color:var(--text-strong)}
.dash-rev-row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.dash-rev{display:flex;flex-direction:column;gap:.15rem}
.dash-rev--right{align-items:flex-end;text-align:right}
.dash-rev-cap{font-size:.74rem;color:var(--text-soft)}
.dash-rev-val{font-family:var(--font-display);font-size:1.35rem;font-weight:600;color:var(--text-strong)}
.dash-rev-val--green{color:#1D9E75}
.dash-avg{display:flex;align-items:center;gap:.85rem}
.dash-avg-ic{color:var(--text-soft);display:inline-flex;flex:none}
.dash-avg-body{display:flex;flex-direction:column;gap:.15rem;flex:1;min-width:0}
.dash-avg-lab{font-family:var(--font-display);font-weight:500;color:var(--text-strong)}
.dash-avg-val{font-family:var(--font-display);font-size:1.15rem;font-weight:600;color:var(--text-strong)}
.dash-avg-cap{font-size:.74rem;color:var(--text-soft);text-align:right;flex:0 0 7rem}

/* Earnings: hero + tinted stat cards + by-month rows. */
.earn-hero{display:flex;flex-direction:column;align-items:center;gap:.35rem;text-align:center;padding:1.8rem 1rem}
.earn-hero-cap{font-size:.9rem;color:var(--text-soft)}
.earn-hero-num{font-family:var(--font-display);font-size:2.5rem;font-weight:600;color:var(--text-strong);line-height:1}
.earn-hero-sub{font-size:.78rem;color:var(--text-soft)}
.earn-stat-row{display:flex;gap:.75rem;margin:.9rem 0 0}
.earn-stat{flex:1;display:flex;flex-direction:column;align-items:center;gap:.3rem;padding:1.1rem .8rem;border-radius:18px;text-align:center;background:color-mix(in srgb,var(--tint) 18%,transparent)}
.earn-stat--full{margin:.75rem 0 0}
.earn-stat-cap{font-size:.74rem;color:var(--text-soft)}
.earn-stat-val{font-family:var(--font-display);font-size:1.2rem;font-weight:600;color:var(--text-strong)}
#adminEarnings .ios-section-cap{margin-top:1.4rem}
.earn-month-wrap{display:flex;flex-direction:column}
.earn-month-total{font-family:var(--font-display);font-weight:600;color:#1D9E75;font-size:.92rem}
.ios-row-chev.open{transform:rotate(90deg)}
.ios-row-chev{transition:transform .15s}
.earn-month-detail{padding:.2rem .9rem .6rem;display:flex;flex-direction:column;gap:.5rem}
.earn-pay-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.45rem 0;border-top:1px solid var(--line)}

/* Calendar: grouped overdue/upcoming/no-date rows. */
.cal-trail{flex-direction:column;align-items:flex-end;gap:.3rem}
.cal-due{font-size:.8rem;font-weight:500;color:var(--text-strong)}
.ios-group-cap.cal-overdue-cap{color:#B23A3A;display:flex;align-items:center;gap:.3rem}
.ios-group-cap.cal-overdue-cap svg{width:13px;height:13px}
#calBody .ios-list{margin-bottom:.4rem}
.cal-empty,.frost--section.cal-empty{display:flex;flex-direction:column;align-items:center;gap:.5rem;text-align:center;padding:2rem 1rem}
.cal-empty-ic{color:var(--text-soft)}
.cal-empty-ic svg{width:34px;height:34px}

/* Trash: count row + per-item recover/delete buttons. */
.trash-count-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:.2rem 0 .9rem}
.trash-clock{color:#BA7517;font-weight:500}
.trash-clock svg{color:#BA7517}
.trash-actions{display:flex;gap:.6rem;margin-top:.3rem}
.trash-recover{flex:1}
.trash-delete-btn{flex:1;background:none;border:1px solid #B23A3A;color:#B23A3A;border-radius:var(--radius-control,14px);padding:.7rem 1rem;font-family:var(--font-display);font-size:.95rem;font-weight:500;cursor:pointer;transition:background .15s}
.trash-delete-btn:hover{background:rgba(178,58,58,.08)}

@media (max-width:560px){
  .admin-sec-head{flex-wrap:nowrap}
  .ios-row{padding:.75rem .8rem}
  .dash-big-row,.earn-stat-row{flex-wrap:nowrap}
  .dash-avg-cap{flex-basis:5.5rem;font-size:.7rem}
}

/* password reveal eye */
.pw-wrap { position:relative; display:block; }
.pw-wrap input { width:100%; padding-right:2.6rem; }
.pw-eye { position:absolute; top:50%; right:.5rem; transform:translateY(-50%); width:2rem; height:2rem; display:inline-flex; align-items:center; justify-content:center; border:none; background:none; cursor:pointer; color:var(--text-soft); border-radius:6px; }
.pw-eye:hover { color:var(--text); }
.pw-eye svg { width:18px; height:18px; }
