:root {
  --ink: #343139;
  --muted: #716d76;
  --paper: #f8f7f9;
  --line: #e7e3e9;
  --accent: #b5108c;
  --accent-hover: #971075;
  --accent-soft: #f8edf5;
  --white: #fff;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: var(--paper); color: var(--ink); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input { outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--accent); }
.skip { position: absolute; left: 16px; top: -80px; background: white; padding: 10px; z-index: 5; }
.skip:focus { top: 10px; }
.brand { font-size: 29px; letter-spacing: -1.5px; font-weight: 750; color: var(--ink); }
.brand span { font-weight: 400; }
.brand .brand-dot { color: var(--accent); font-weight: 800; }
.eyebrow { font-size: 10px; letter-spacing: 1.9px; font-weight: 650; margin: 0 0 16px; color: var(--muted); }
.muted { color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.18; letter-spacing: -1.6px; font-weight: 450; margin-bottom: 20px; }
h2 { font-size: 23px; line-height: 1.3; letter-spacing: -.6px; font-weight: 550; }
h3 { font-size: 18px; line-height: 1.4; font-weight: 550; }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 245px; flex-shrink: 0; padding: 34px 25px; background: var(--white); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.sidebar > .eyebrow { margin: 60px 0 20px; font-size: 10px; }
.nav-item { display: block; padding: 12px 16px; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 400; margin-bottom: 9px; font-size: 14px; }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item:hover { background: #f4f0f5; }
.sidebar-bottom { margin-top: auto; padding-top: 45px; }
.account { font-size: 12px; overflow-wrap: anywhere; margin-bottom: 10px; }
.logout { border: 0; background: transparent; color: var(--muted); font-size: 13px; padding: 0; }
.logout:hover, .back:hover { color: var(--accent); }
.workspace { flex: 1; min-width: 0; }
.topbar { height: 80px; padding: 0 46px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); background: #ffffff80; }
.pill { display: inline-block; white-space: nowrap; font-size: 11px; font-weight: 500; padding: 5px 11px; border: 1px solid var(--line); border-radius: 30px; background: #fff; color: var(--muted); }
.workspace main { max-width: 1250px; padding: 48px 46px 65px; min-height: calc(100vh - 145px); }
.heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 36px; }
.heading .muted { font-size: 14px; }
.stats { display: flex; gap: 16px; margin-bottom: 40px; }
.stats article { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 25px; min-width: 190px; }
.stats span { display: block; color: var(--muted); font-size: 12px; }
.stats strong { font-size: 34px; font-weight: 450; }
.section { margin-top: 35px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; }
.section-heading > span { font-size: 12px; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 18px; }
.client-card { background: white; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.client-card:hover { border-color: #c8b4c5; box-shadow: 0 5px 20px #34313906; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 30px; }
.initial { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 11px; background: #f3f0f4; color: var(--muted); font-size: 21px; }
.client-card p { color: var(--muted); font-size: 13px; }
.card-link { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; margin-top: 25px; }
.card-link > span { color: var(--accent); }
.empty, .panel { padding: 30px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.empty p { color: var(--muted); margin-bottom: 0; font-size: 14px; }
.welcome-panel { background: white; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 38px 40px; position: relative; }
.welcome-panel::before { content: ""; display: block; width: 30px; height: 3px; background: var(--accent); margin-bottom: 25px; border-radius: 2px; }
.welcome-panel h2 { font-size: 34px; font-weight: 450; }
.welcome-panel p:last-child { color: var(--muted); max-width: 500px; margin-bottom: 0; font-size: 14px; }
.update { background: white; padding: 26px 28px; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.update time { font-size: 12px; color: var(--muted); }
.update h3 { margin-top: 14px; }
.update p { margin-bottom: 0; overflow-wrap: anywhere; }
.back { display: inline-block; color: var(--muted); margin-bottom: 24px; font-size: 13px; }
footer { padding: 16px 46px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }
.login-layout { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.login-story { background: #f4f2f5; color: var(--ink); padding: 48px clamp(35px,5vw,80px); display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; border-right: 1px solid var(--line); }
.login-story > .brand { margin-bottom: 65px; }
.login-story > div:not(.brand) { max-width: 560px; padding: 30px 0; }
.login-story > div:not(.brand)::before { content: ""; display: block; width: 36px; height: 3px; border-radius: 2px; background: var(--accent); margin-bottom: 34px; }
.login-story h1 { font-size: clamp(45px,4.8vw,70px); font-weight: 400; letter-spacing: -2.8px; line-height: 1.13; margin-bottom: 25px; }
.login-story h1 em { font-family: Georgia,serif; font-weight: 400; color: var(--ink); }
.story-copy { color: var(--muted); max-width: 350px; font-size: 15px; margin-top: 28px; }
.login-story small { color: var(--muted); font-size: 11px; margin-top: 65px; }
.login-panel { padding: 55px; display: grid; place-items: center; background: white; }
.login-card { width: 100%; max-width: 360px; }
.login-card h2 { font-size: 31px; font-weight: 450; letter-spacing: -1px; }
.login-card > .muted { font-size: 14px; margin-bottom: 36px; }
.field { margin: 22px 0; }
.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 9px; }
.field input { display: block; width: 100%; min-height: 49px; background: #fff; color: var(--ink); border: 1px solid #d6d0d9; border-radius: 7px; padding: 11px 13px; }
.field input:hover { border-color: #afa5b3; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 25px; border: 1px solid transparent; border-radius: 7px; background: var(--accent); color: white; padding: 13px 18px; font-size: 13px; font-weight: 600; }
.button:hover { background: var(--accent-hover); }
.full { width: 100%; margin-top: 10px; }
.help { font-size: 12px; color: var(--muted); margin: 24px 0 0; line-height: 1.7; }
.help ul { padding-left: 18px; }
.alert, .errorlist { color: #942d28; background: #fff0ed; padding: 12px 16px; border-radius: 8px; font-size: 13px; list-style: none; }
.alert .errorlist { padding: 0; margin: 0; }
.narrow { max-width: 560px; }
.error-card { max-width: 560px; margin: 10vh auto; padding: 35px; }
.error-card .brand { margin-bottom: 55px; }
@media (max-width: 800px) {
  .sidebar { width: 195px; padding: 25px 18px; }
  .topbar { padding: 0 25px; }
  .workspace main { padding: 30px 25px; }
  .login-story { padding: 35px; }
  .login-panel { padding: 35px; }
  .login-story h1 { font-size: 47px; }
}
@media (max-width: 600px) {
  .shell { display: block; }
  .sidebar { width: auto; padding: 18px 22px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar > .eyebrow { display: none; }
  .sidebar .brand { font-size: 25px; }
  .sidebar nav { display: flex; gap: 8px; margin-top: 17px; }
  .nav-item { margin: 0; padding: 8px 13px; }
  .sidebar-bottom { margin: 0; padding-top: 12px; display: flex; justify-content: space-between; gap: 15px; }
  .account { margin: 0; }
  .topbar { height: 57px; padding: 0 22px; }
  .workspace main { padding: 30px 22px; }
  .heading { display: block; }
  .stats article { min-width: 0; flex: 1; padding: 18px; }
  .heading > .pill { margin-top: 10px; }
  .login-layout { display: block; }
  .login-story { min-height: auto; padding: 26px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-story > .brand { margin-bottom: 20px; font-size: 26px; }
  .login-story > div:not(.brand) { padding: 12px 0 0; }
  .login-story > div:not(.brand)::before { margin-bottom: 18px; width: 25px; height: 2px; }
  .login-story .eyebrow { margin-bottom: 12px; font-size: 9px; }
  .login-story h1 { font-size: 36px; letter-spacing: -1.4px; margin-bottom: 4px; }
  .login-story small, .story-copy { display: none; }
  .login-panel { padding: 38px 26px 45px; }
  .login-card h2 { font-size: 27px; }
  .welcome-panel { padding: 27px; }
  .welcome-panel h2 { font-size: 29px; }
  footer { padding: 16px 22px; }
}
@media (prefers-reduced-motion: reduce) { .client-card { transition: none; } }

/* Shared account entrypoint; native disclosure works without JavaScript. */
.account-menu { position: relative; }
.account-menu > summary { cursor: pointer; display: flex; align-items: center; gap: 12px; list-style: none; user-select: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:hover, .account-menu[open] > summary { border-color: #c8b4c5; color: var(--ink); background: var(--accent-soft); }
.account-chevron { display: block; width: 14px; height: 14px; flex: 0 0 14px; transform-origin: center; }
.account-menu[open] .account-chevron { transform: rotate(180deg); }
.account-dropdown { position: absolute; top: calc(100% + 12px); right: 0; z-index: 20; width: min(290px, calc(100vw - 44px)); padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 35px #34313914; }
.account-dropdown .eyebrow { margin-bottom: 6px; }
.account-identity { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; margin-bottom: 16px; }
.account-dropdown nav a { display: block; padding: 11px 10px; margin: 0 -10px 12px; border-radius: 7px; color: var(--ink); font-size: 14px; }
.account-dropdown nav a:hover { background: var(--paper); }
.account-dropdown nav a span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.account-dropdown form { border-top: 1px solid var(--line); padding-top: 14px; }
.account-dropdown button { border: 0; background: transparent; padding: 7px 0; color: var(--muted); font-size: 13px; }
.account-dropdown button:hover { color: var(--accent); }

.creative-form { max-width: 780px; }
.creative-form textarea, .creative-form select { width: 100%; font: inherit; color: var(--ink); background: white; border: 1px solid #d6d0d9; border-radius: 7px; padding: 12px; }

.creative-form select {
  display: block;
  width: 25%;
  min-width: 180px;
  max-width: 100%;
  height: 50px;
  padding: 0 12px;
  font-size: 14px;
  line-height: normal;
}
/* The native input remains focusable/clickable; its browser caption is invisible. */
.creative-file-picker {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 25%; min-width: 180px; max-width: 100%; height: 50px;
  border: 1px solid #d6d0d9; border-radius: 7px;
  background: var(--white); color: var(--ink); font-size: 13px; font-weight: 500;
}
.creative-file-picker > span { pointer-events: none; }
.creative-form .creative-file-picker input[type=file] {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0;
  margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer;
}
.creative-file-picker:hover { background: var(--accent-soft); border-color: #c8b4c5; }
.creative-file-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 600px) {
  .creative-form select { width: 100%; min-width: 0; }
}

.creative-form .button { margin-top: 20px; }
.button:disabled { background: #e4dfe6; color: #645d69; cursor: not-allowed; }
.creative-delivery { display: block; }
.creative-delivery .pill { float: right; }
.creative-notes, .creative-delivery h3 { overflow-wrap: anywhere; }

.creative-form input[type=text] { height: 50px; }

.account-menu > summary { min-height: 34px; line-height: 20px; gap: 9px; padding: 6px 12px; }

.creative-upload-help { padding-left: 18px; }
.creative-upload-help li { margin: 0; padding: 0; }

.creative-preview-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.creative-preview-card { flex: 0 0 clamp(110px, 10vw, 180px); min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); }
.creative-preview-media { height: 100px; background: var(--paper); display: grid; place-items: center; }
.creative-preview-media img, .creative-preview-media video { display: block; width: 100%; height: 100px; object-fit: contain; }
.creative-preview-media p { padding: 14px; margin: 0; font-size: 12px; color: var(--muted); }
.creative-preview-card figcaption { padding: 12px; font-size: 12px; overflow-wrap: anywhere; }
.creative-preview-card strong, .creative-preview-card span { display: block; }
.creative-preview-card span { color: var(--muted); margin-top: 4px; }

.creative-preview-remove { margin-top: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); cursor: pointer; font: inherit; }
.creative-preview-remove:hover { background: var(--accent-soft); }

/* First module in the agency client detail: read-only campaign inventory. */
.meta-panel > .section-heading { align-items: center; flex-wrap: wrap; }
.meta-panel h2 { margin-bottom: 0; }
.meta-panel > .muted { margin-top: 12px; }
.meta-account { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 24px; }
.meta-account h3 { margin-bottom: 4px; overflow-wrap: anywhere; }
.meta-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.meta-summary strong { color: var(--accent); font-size: 30px; font-weight: 550; }
.meta-campaigns { list-style: none; margin: 0; padding: 0; }
.meta-campaigns li { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.meta-campaigns li > div { min-width: 0; }
.meta-campaigns h4 { margin: 0 0 8px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.meta-campaigns p { margin-bottom: 0; overflow-wrap: anywhere; }
.meta-campaign-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; font-size: 13px; }
.meta-campaign-actions a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.meta-active { color: #256347; border-color: #c7e0d0; background: #f2faf5; }
.meta-notice { padding: 12px 16px; background: #fff8e9; color: #72551c; border-left: 3px solid #c5902d; border-radius: 4px; font-size: 13px; }
.meta-empty { background: var(--paper); padding: 22px; border-radius: 8px; }
.meta-empty h3 { margin-bottom: 8px; }
.meta-empty p { margin-bottom: 0; font-size: 14px; }
.meta-footnote { margin: 20px 0 0; }
.meta-search label { display: block; font-size: 13px; margin-bottom: 8px; }
.meta-search > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.meta-search input { min-width: 0; width: min(100%, 360px); padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.meta-search .button { width: auto; margin: 0; padding: 10px 18px; }
.meta-search a, .meta-pagination { font-size: 13px; }
.meta-pagination { display: flex; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }
.meta-pagination a { color: var(--accent); text-decoration: underline; }
@media (max-width: 600px) {
  .meta-campaigns li { flex-direction: column; gap: 12px; }
  .meta-campaign-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
}
