/* =============================================================
   Customer Studio
   Palette: slate ink + marigold (admin). Customer page: neutral + blue, Inter.
   ============================================================= */
:root {
  --ink: #1E2A3A;
  --ink-2: #4A5668;
  --ink-3: #7B8698;
  --line: #DCE1E8;
  --paper: #F2F4F7;
  --card: #FFFFFF;
  --marigold: #E9A21B;
  --marigold-soft: #FDF3DC;
  --approve: #2F7D53;
  --approve-soft: #E3F2E9;
  --changes: #C2462E;
  --changes-soft: #FBE8E3;
  --pending: #6B7688;
  --pending-soft: #EBEEF2;
  --note: #3A54C4;
  --note-soft: #E7EBFB;
  --radius-lg: 14px;
  --radius: 9px;
  --radius-sm: 6px;
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--font-body);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 500; }
p { margin: 0 0 .6em; }
a { color: var(--ink); text-underline-offset: 3px; }
img, video, iframe { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 4px; }
.sub { color: var(--ink-3); font-size: .9rem; }
.strong { font-weight: 600; text-decoration: none; }
.right { text-align: right; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
section { margin-top: 36px; }

/* ---------- Brand + top bar ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.05rem var(--font-display); text-decoration: none; color: var(--ink); }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background:
  linear-gradient(var(--marigold), var(--marigold)) 0 0 / 100% 34% no-repeat, var(--ink); }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line);
}
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { padding: 7px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-2); font-weight: 500; }
.topnav a:hover { background: var(--paper); color: var(--ink); }
.topnav a[aria-current="page"] { background: var(--ink); color: #fff; }
.topnav .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--marigold); color: var(--ink); font-size: .78rem; font-weight: 600; text-align: center; }
.topbar-user { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: .9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius); border: 1px solid transparent;
  font: 600 .92rem var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-sm { padding: 6px 11px; font-size: .84rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2C3B50; }
.btn-quiet { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink-3); }
.btn-link { background: none; border: 0; padding-left: 0; padding-right: 0; color: var(--ink-2); text-decoration: underline; }
.btn-danger { background: var(--card); color: var(--changes); border-color: #EBC3BA; }
.btn-danger:hover { background: var(--changes); color: #fff; }
.btn-approve { background: var(--approve); color: #fff; }
.btn-approve:hover { background: #256743; }
.btn-changes { background: var(--card); color: var(--changes); border-color: #EBC3BA; }
.btn-changes:hover { background: var(--changes-soft); }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Forms ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: .9rem; margin-bottom: 14px; }
label small { color: var(--ink-3); font-weight: 400; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: 400 .95rem var(--font-body);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--marigold-soft); }
textarea.needs-text { border-color: var(--changes); box-shadow: 0 0 0 3px var(--changes-soft); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
label.check input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 4px; margin: 0 0 14px; }
legend { font-weight: 600; padding: 0 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.span-2 { grid-column: 1 / -1; }
.actions { display: flex; gap: 10px; }
.form-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.form-inline label { flex: 1 1 220px; margin: 0; }
form.inline { display: inline; }
.searchbar { display: flex; gap: 10px; margin: 0 0 18px; max-width: 620px; }

/* ---------- Panels, tables, flashes ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 18px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin-bottom: .15em; }
.back { display: inline-block; margin-bottom: 6px; color: var(--ink-3); font-size: .88rem; text-decoration: none; }
.back::before { content: '‹ '; }
.back:hover { color: var(--ink); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.is-muted { opacity: .6; }
.flash { padding: 11px 14px; border-radius: var(--radius); margin-bottom: 14px; font-weight: 500; transition: opacity .4s; }
.flash-success { background: var(--approve-soft); color: var(--approve); }
.flash-error { background: var(--changes-soft); color: var(--changes); }
.flash.is-leaving { opacity: 0; }
.empty { border: 1.5px dashed var(--line); border-radius: var(--radius-lg); padding: 28px; text-align: center; color: var(--ink-2); background: rgba(255,255,255,.5); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .78rem; font-weight: 600; background: var(--pending-soft); color: var(--pending); white-space: nowrap; text-decoration: none; }
.pill-approved { background: var(--approve-soft); color: var(--approve); }
.pill-changes { background: var(--changes-soft); color: var(--changes); }
.pill-pending { background: var(--pending-soft); color: var(--pending); }
.pill-note { background: var(--note-soft); color: var(--note); }

.center-card { max-width: 400px; margin: 12vh auto; padding: 32px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.center-card .brand { margin-bottom: 26px; }
.login-page h1 { font-size: 1.5rem; }

/* ---------- Customer detail ---------- */
.share .copy-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 6px; }
.share .copy-row input { flex: 1 1 320px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.cal-list { display: grid; gap: 12px; margin-bottom: 14px; }
.cal-card { display: flex; justify-content: space-between; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--marigold); border-radius: var(--radius-lg); padding: 16px 18px; }
.cal-card h3 a { text-decoration: none; }
.cal-card-actions { display: flex; gap: 8px; align-items: center; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); margin: 0; }
.stats .ok { color: var(--approve); } .stats .warn { color: var(--changes); } .stats .note { color: var(--note); }

details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 290px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: 0 10px 30px rgba(30,42,58,.14); display: grid; gap: 12px; text-align: left; }
.menu-body form + form { border-top: 1px solid var(--line); padding-top: 12px; }
.danger-zone { margin-top: 48px; color: var(--ink-3); }
.danger-zone summary { cursor: pointer; }
.danger-zone form { margin-top: 12px; }

/* ---------- Admin month grid ---------- */
.month-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.month-nav h2 { margin: 0; min-width: 170px; text-align: center; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month-dow { font-size: .8rem; font-weight: 600; color: var(--ink-3); padding: 0 8px 4px; }
.month-day {
  position: relative; min-height: 112px; padding: 8px 9px; display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
}
.month-day:hover { border-color: var(--ink); }
.month-day.is-other { background: transparent; color: var(--ink-3); }
.month-day.in-window { background: var(--marigold-soft); border-color: #F1D79C; }
.month-day.is-today { box-shadow: inset 0 0 0 2px var(--marigold); }
.md-num { font: 700 1.15rem var(--font-display); }
.md-count { font-size: .78rem; color: var(--ink-2); line-height: 1.3; }
.md-add { margin-top: auto; color: var(--ink-3); font-size: 1.2rem; opacity: 0; transition: opacity .15s; }
.month-day:hover .md-add { opacity: 1; }
.md-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.md-note { margin-top: auto; font-size: .72rem; font-weight: 600; color: var(--note); }
.md-note.is-open::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--note); margin-right: 5px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.dot-approved { background: var(--approve); } .dot-changes { background: var(--changes); } .dot-pending { background: #B5BDCA; }
.legend { font-size: .85rem; color: var(--ink-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.legend .dot { margin-left: 8px; }

/* ---------- Admin day page ---------- */
.day-nav { display: flex; gap: 8px; }
.upload-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 130px; padding: 18px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--paper);
  text-align: center; cursor: pointer;
}
.dropzone.is-drag, .dropzone:hover { border-color: var(--marigold); background: var(--marigold-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-text { font-weight: 600; }
.dz-hint { font-weight: 400; font-size: .8rem; color: var(--ink-3); max-width: 420px; }
.dz-files { font-weight: 500; font-size: .84rem; color: var(--ink); }
.edit-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; align-items: start; }

/* ---------- Post cards (shared) ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 80px; }
.post-card.status-approved { border-color: #B9DCC7; }
.post-card.status-changes { border-color: #EBC3BA; }
.media { display: block; background: #E7EAEF; }
.media-image img { width: 100%; max-height: 460px; object-fit: contain; background: #E7EAEF; }
.media-video video { width: 100%; max-height: 520px; background: #000; }
.media-embed { position: relative; aspect-ratio: 16 / 9; }
.media-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-insta { position: relative; overflow: hidden; padding: 10px; background: var(--paper); }
.media-insta .instagram-media { margin: 0 auto !important; min-width: 0 !important; width: 100% !important; }
.media-link { display: flex; flex-direction: column; gap: 4px; padding: 26px 18px; text-decoration: none; background: var(--ink); color: #fff; }
.media-link .link-platform { font: 700 1.3rem var(--font-display); }
.media-link .link-url { font-size: .82rem; opacity: .75; overflow-wrap: anywhere; }
.media-link.platform-instagram { background: linear-gradient(135deg, #833AB4, #E1306C 60%, #F77737); }
.media-link.platform-youtube { background: #C4302B; }
.media-link.platform-linkedin { background: #0A66C2; }
.media-link.platform-facebook { background: #1877F2; }
.post-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.post-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.post-body h3 { margin: 0; }
.desc { white-space: normal; color: var(--ink-2); font-size: .92rem; margin: 0; overflow-wrap: anywhere; }
.post-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }

.thread { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.thread li { padding: 8px 11px; border-radius: var(--radius); font-size: .9rem; background: var(--paper); }
.thread li.from-admin { background: var(--marigold-soft); }
.thread p { margin: 4px 0 0; overflow-wrap: anywhere; }
.thread-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-3); }
.thread-meta strong { color: var(--ink); }
.reply-form, .respond { display: grid; gap: 8px; }
.reply-form > button { justify-self: start; }
.post-body > .btn-link { align-self: flex-start; }
.day-status .req { color: var(--note); }
.reply-form label, .respond label { margin: 0; }
.respond-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.note-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.note-list > li { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--note); border-radius: var(--radius); padding: 12px 14px; }
.note-list > li.is-done { border-left-color: var(--approve); opacity: .8; }
.note-list p { margin: 6px 0 0; overflow-wrap: anywhere; }
.note-list .reply-form { margin-top: 10px; }
.note-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-3); }
.note-meta strong, .note-meta .strong { color: var(--ink); }
.studio-reply { background: var(--marigold-soft); padding: 8px 10px; border-radius: var(--radius-sm); font-size: .9rem; }
.note-list.compact > li { padding: 10px 12px; }


/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .upload-grid, .edit-grid { grid-template-columns: 1fr; }
  .month { gap: 3px; }
  .month-day { min-height: 74px; padding: 5px; }
  .md-count { display: none; }
  .md-note { font-size: 0; }
  .md-note.is-open::before { width: 8px; height: 8px; }
}
@media (max-width: 640px) {
  .wrap { padding: 18px 14px 50px; }
  .topbar { gap: 10px; padding: 10px 14px; }
  .topnav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .cal-card { flex-direction: column; align-items: stretch; }
  .menu-body { right: auto; left: 0; }
  .month-dow { padding: 0 2px; font-size: .7rem; }
  .post-grid { grid-template-columns: 1fr; }
  /* 16px stops iOS zooming on focus; 44px tap targets */
  input, select, textarea { font-size: 16px; }
  .btn, .btn-sm { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* =============================================================
   Customer page — compact, neutral, enterprise
   Everything is scoped to body.customer so admin screens keep their look.
   ============================================================= */
body.customer {
  --c-bg: #F6F7F9;
  --c-surface: #FFFFFF;
  --c-subtle: #F9FAFB;
  --c-border: #E4E7EC;
  --c-border-strong: #D0D5DD;
  --c-text: #101828;
  --c-text-2: #475467;
  --c-text-3: #667085;
  --c-accent: #2E5BDA;
  --c-accent-hover: #2449B5;
  --c-accent-soft: #EEF2FD;
  --c-ok: #067647;      --c-ok-bg: #ECFDF3;   --c-ok-line: #ABEFC6;
  --c-warn: #B42318;    --c-warn-bg: #FEF3F2; --c-warn-line: #FECDCA;
  --c-wait: #475467;    --c-wait-bg: #F2F4F7; --c-wait-line: #E4E7EC;
  --c-radius: 6px;
  --c-radius-lg: 8px;
  background: var(--c-bg);
  color: var(--c-text);
  font: 400 14px/1.5 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
}
body.customer h1, body.customer h2, body.customer h3 { font-family: inherit; letter-spacing: -0.01em; color: var(--c-text); }
body.customer a { color: var(--c-accent); text-decoration: none; }
body.customer a:hover { text-decoration: underline; }
body.customer :focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
body.customer .sub { color: var(--c-text-3); font-size: 13px; margin: 0; }

/* ---------- Controls ---------- */
body.customer .btn {
  height: 32px; padding: 0 12px; border-radius: var(--c-radius); border: 1px solid transparent;
  font: 500 13px/1 inherit; font-family: inherit; gap: 6px; box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
body.customer .btn-primary { background: var(--c-accent); color: #fff; }
body.customer .btn-primary:hover { background: var(--c-accent-hover); }
body.customer .btn-outline { background: var(--c-surface); color: var(--c-text); border-color: var(--c-border-strong); }
body.customer .btn-outline:hover { background: var(--c-subtle); }
body.customer .btn-ghost { background: transparent; color: var(--c-text-2); box-shadow: none; }
body.customer .btn-ghost:hover { background: var(--c-wait-bg); color: var(--c-text); }
body.customer input, body.customer select, body.customer textarea {
  padding: 7px 10px; border: 1px solid var(--c-border-strong); border-radius: var(--c-radius);
  font: 400 13px/1.45 inherit; font-family: inherit; color: var(--c-text); background: var(--c-surface);
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
body.customer input { height: 32px; }
body.customer textarea { min-height: 32px; field-sizing: content; max-height: 220px; resize: none; }
body.customer textarea:focus { min-height: 64px; }
body.customer input:focus, body.customer select:focus, body.customer textarea:focus {
  border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft);
}
body.customer textarea.needs-text { border-color: var(--c-warn); box-shadow: 0 0 0 3px var(--c-warn-bg); }
body.customer ::placeholder { color: #98A2B3; }

body.customer .badge {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px;
  border: 1px solid var(--c-wait-line); border-radius: 4px; background: var(--c-wait-bg); color: var(--c-wait);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
body.customer .badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
body.customer .badge-approved { background: var(--c-ok-bg); border-color: var(--c-ok-line); color: var(--c-ok); }
body.customer .badge-changes { background: var(--c-warn-bg); border-color: var(--c-warn-line); color: var(--c-warn); }
body.customer .pill { border-radius: 4px; font-size: 11px; font-weight: 500; padding: 1px 6px; }

body.customer .flash { max-width: 1040px; margin: 0 auto 12px; padding: 9px 12px; border-radius: var(--c-radius); font-size: 13px; border: 1px solid; }
body.customer .flash-success { background: var(--c-ok-bg); border-color: var(--c-ok-line); color: var(--c-ok); }
body.customer .flash-error { background: var(--c-warn-bg); border-color: var(--c-warn-line); color: var(--c-warn); }
body.customer .empty { max-width: 1040px; margin: 0 auto; border: 1px dashed var(--c-border-strong); border-radius: var(--c-radius-lg); background: var(--c-surface); color: var(--c-text-3); }

/* ---------- Top bar ---------- */
.c-bar { position: sticky; top: 0; z-index: 20; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.c-bar-in { max-width: 1040px; margin: 0 auto; height: 52px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.c-id { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.c-org { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-sep { color: var(--c-border-strong); }
.c-cal { color: var(--c-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-week { font-size: 13px; font-weight: 500; color: var(--c-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-tz { color: var(--c-text-3); font-weight: 400; }
body.customer .cal-tabs { max-width: 1040px; margin: 0 auto; padding: 0 20px; display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; }
body.customer .cal-tabs a { padding: 10px 0 11px; border-bottom: 2px solid transparent; color: var(--c-text-3); font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; }
body.customer .cal-tabs a:hover { color: var(--c-text); }
body.customer .cal-tabs a[aria-current="page"] { color: var(--c-accent); border-bottom-color: var(--c-accent); }

.c-main { max-width: 1040px; margin: 0 auto; padding: 20px 20px 56px; }

/* ---------- Week summary ---------- */
.c-summary { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 0 0 14px; }
.c-summary h1 { font-size: 18px; font-weight: 600; margin: 0 0 2px; }
.c-stats { display: flex; margin: 0; border: 1px solid var(--c-border); border-radius: var(--c-radius-lg); background: var(--c-surface); overflow: hidden; }
.c-stats > div { padding: 6px 14px; min-width: 84px; border-left: 1px solid var(--c-border); }
.c-stats > div:first-child { border-left: 0; }
.c-stats dt { font-size: 11px; font-weight: 500; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .04em; }
.c-stats dd { margin: 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-stats .is-approved dd { color: var(--c-ok); }
.c-stats .is-changes dd { color: var(--c-warn); }

/* ---------- Day list ---------- */
body.customer .week { display: block; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius-lg); overflow: hidden; }
body.customer details.day { border-top: 1px solid var(--c-border); scroll-margin-top: 64px; }
body.customer details.day:first-child { border-top: 0; }
body.customer details.day > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px;
  min-height: 48px; padding: 8px 16px; user-select: none;
}
body.customer details.day > summary::-webkit-details-marker { display: none; }
body.customer details.day > summary:hover { background: var(--c-subtle); }
.d-date { display: flex; align-items: baseline; gap: 6px; width: 92px; flex: none; font-variant-numeric: tabular-nums; }
.d-dow { width: 30px; font-size: 12px; font-weight: 500; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .03em; }
.d-num { font-size: 16px; font-weight: 600; min-width: 2ch; }
.d-mon { font-size: 13px; color: var(--c-text-3); }
.d-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.d-count { font-size: 13px; color: var(--c-text); }
.d-word { height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 4px; background: var(--c-wait-bg); color: var(--c-text-2); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.d-req { font-size: 12px; color: var(--c-accent); }
.d-stats { display: flex; gap: 10px; flex: none; }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--c-text-2); font-variant-numeric: tabular-nums; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #98A2B3; }
.st-approved::before { background: #17B26A; }
.st-changes::before { background: #F04438; }
.d-chevron { flex: none; width: 7px; height: 7px; margin: 0 2px 3px 0; border-right: 1.5px solid var(--c-text-3); border-bottom: 1.5px solid var(--c-text-3); transform: rotate(45deg); transition: transform .15s; }
body.customer details.day[open] > summary .d-chevron { transform: rotate(-135deg); margin-bottom: -3px; }
body.customer details.day[open] > summary { border-bottom: 1px solid var(--c-border); }

body.customer details.day.is-today > summary { box-shadow: inset 3px 0 0 var(--c-accent); }
body.customer details.day.is-today .d-word { background: var(--c-accent-soft); color: var(--c-accent); }
body.customer details.day.is-today .d-num { color: var(--c-accent); }
body.customer details.day.is-past .d-num,
body.customer details.day.is-past .d-count { color: var(--c-text-3); }
body.customer details.day.is-empty .d-count { color: var(--c-text-3); }

body.customer .day-body { display: grid; gap: 12px; padding: 14px 16px 16px; background: var(--c-subtle); }
.d-empty { margin: 0; font-size: 13px; color: var(--c-text-3); }

/* ---------- Design card ---------- */
body.customer .post-card {
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius-lg);
  overflow: hidden; scroll-margin-top: 64px;
}
body.customer .post-card.status-approved,
body.customer .post-card.status-changes { border-color: var(--c-border); }
body.customer .post-media { border-right: 1px solid var(--c-border); background: #F2F4F7; min-width: 0; }
body.customer .post-media .media { background: transparent; }
body.customer .media-image img { max-height: 340px; background: transparent; }
body.customer .media-video video { max-height: 380px; }
body.customer .media-insta { padding: 8px; background: transparent; }
body.customer .media-link { min-height: 120px; justify-content: flex-end; padding: 16px; }
body.customer .media-link .link-platform { font: 600 15px/1.2 inherit; font-family: inherit; }
body.customer .media-link .link-url { font-size: 12px; }

body.customer .post-body { padding: 14px 16px; gap: 10px; min-width: 0; }
body.customer .post-top { align-items: flex-start; gap: 12px; }
.post-title { min-width: 0; }
body.customer .post-title h3 { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.post-type { font-size: 12px; color: var(--c-text-3); }
body.customer .desc { font-size: 13px; line-height: 1.55; color: var(--c-text-2); }

body.customer .thread { gap: 0; margin: 0; border-top: 1px solid var(--c-border); }
body.customer .thread li { padding: 8px 0; border-bottom: 1px solid var(--c-border); border-radius: 0; background: none; font-size: 13px; }
body.customer .thread li.from-admin { background: none; box-shadow: inset 2px 0 0 var(--c-accent); padding-left: 10px; }
body.customer .thread-meta { font-size: 12px; gap: 6px; }
body.customer .thread-meta strong { font-weight: 600; }
body.customer .thread p { margin: 2px 0 0; color: var(--c-text-2); }

body.customer .respond { gap: 8px; margin-top: auto; }
body.customer .respond-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }

/* ---------- Requests ---------- */
body.customer .day-note { display: flex; gap: 8px; }
body.customer .day-note input { flex: 1; min-width: 0; }

body.customer .requests { margin-top: 28px; }
.sec-head { margin-bottom: 10px; }
.sec-head h2 { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
body.customer .request-form {
  display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; align-items: end; gap: 10px;
  padding: 12px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius-lg);
}
body.customer .request-form label { margin: 0; gap: 4px; font-size: 12px; font-weight: 500; color: var(--c-text-2); }
body.customer .request-form label small { color: var(--c-text-3); font-weight: 400; font-size: 12px; }

body.customer .req-list { list-style: none; margin: 10px 0 0; padding: 0; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius-lg); overflow: hidden; }
body.customer .day-body .req-list { margin: 0; }
body.customer .req-list > li { padding: 10px 14px; border-top: 1px solid var(--c-border); }
body.customer .req-list > li:first-child { border-top: 0; }
body.customer .req-list > li.is-done p { color: var(--c-text-3); }
.req-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--c-text-3); }
body.customer .req-list p { margin: 4px 0 0; font-size: 13px; overflow-wrap: anywhere; }
body.customer .studio-reply { margin-top: 6px; padding: 6px 10px; background: var(--c-accent-soft); border-radius: var(--c-radius); font-size: 13px; color: var(--c-text); }

/* ---------- Customer: small screens ---------- */
@media (max-width: 760px) {
  body.customer .post-card { grid-template-columns: 1fr; }
  body.customer .post-media { border-right: 0; border-bottom: 1px solid var(--c-border); }
  body.customer .media-image img { max-height: 300px; }
  body.customer .request-form { grid-template-columns: 1fr; }
  body.customer .request-form .btn { justify-self: stretch; }
}
@media (max-width: 640px) {
  .c-bar-in { height: auto; min-height: 48px; padding: 8px 14px; flex-wrap: wrap; row-gap: 2px; }
  .c-tz { display: none; }
  body.customer .cal-tabs { padding: 0 14px; }
  .c-main { padding: 14px 12px 48px; }
  .c-summary { flex-direction: column; align-items: stretch; gap: 10px; }
  .c-stats > div { flex: 1; min-width: 0; padding: 6px 10px; }
  body.customer details.day > summary { gap: 10px; padding: 8px 12px; }
  .d-date { width: 52px; }
  .d-mon { display: none; }
  .c-stats dt { font-size: 10px; letter-spacing: .02em; white-space: nowrap; }
  .d-dow { width: 26px; }
  body.customer .day-body { padding: 10px; }
  body.customer .post-body { padding: 12px; }
  body.customer .respond-actions { display: grid; grid-template-columns: 1fr 1fr; }
  body.customer .respond-actions .btn { padding: 0 8px; }
  body.customer .respond-actions .btn-primary { grid-column: 1 / -1; }
  body.customer .day-note { flex-direction: column; }
  /* 16px stops iOS zooming on focus; taller targets for fingers */
  body.customer input, body.customer textarea, body.customer select { font-size: 16px; }
  body.customer .btn { min-height: 0; height: 40px; }
  body.customer input { height: 40px; }
  body.customer textarea { min-height: 40px; }
}
