/* Dojo, after the design canvas v22 (Main, Clients, Nav): its colours, a system font stack. */
:root { --navy: #0d152e; --green: #00cc61; --muted: #5b6b7f; --line: #e3e8ee; --field: #d0d5dd; --soft: #f7f9fb; }
* { box-sizing: border-box; }
body { margin: 0; background: #f2f5f8; color: var(--navy); font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.015em; }
button { font: inherit; font-weight: 700; cursor: pointer; }
.muted { font-size: 13px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.brand { display: flex; align-items: center; gap: 12px; }
.brand b { display: block; font-size: 18px; line-height: 1.2; }
.brand small { font-size: 13px; color: var(--muted); }
.mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg, #2acbfe, #2f3be7); color: #fff; font-weight: 900; font-size: 19px; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 56px 16px;
  background: radial-gradient(640px 420px at 82% 18%, rgba(0, 204, 97, 0.16), transparent 70%),
    radial-gradient(520px 380px at 12% 92%, rgba(47, 59, 231, 0.18), transparent 70%), var(--navy); }
.card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; padding: 36px 32px 30px; border-radius: 18px; background: #fff; box-shadow: 0 24px 60px rgba(3, 8, 22, 0.45); }
.card h1 { font-size: 26px; line-height: 1.2; }
.card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: #183b56; }
.card input { height: 46px; padding: 0 14px; border: 1px solid var(--field); border-radius: 10px; background: var(--soft); font: inherit; color: var(--navy); }
.card button { height: 48px; border: 0; border-radius: 10px; background: var(--green); color: #03140a; }
.error { padding: 10px 14px; border: 1px solid #fecdca; border-radius: 10px; background: #fef3f2; color: #b42318; font-size: 14px; }

.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
/* [WHAT] under 808px (nav 248 + content 560) the nav wraps above the list: keep it its own height. */
@media (max-width: 807px) { .shell { align-content: flex-start; } }
.nav { flex: 1 1 248px; display: flex; flex-direction: column; gap: 24px; padding: 20px 14px 18px; background: var(--navy); color: #eef2f8; font-size: 14px; }
.nav .brand { padding: 0 6px; }
.nav .mark { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.nav .brand small { color: #9aa6b8; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: #eef2f8; text-decoration: none; }
.nav a.current { background: #1a2547; box-shadow: inset 3px 0 0 var(--green); font-weight: 700; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; font-weight: 700; }
.me button { margin-left: auto; min-height: 36px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 9px; background: none; color: #eef2f8; }

.content { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: 32px max(16px, 3vw) 64px; }
.list, .empty { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.list { overflow-x: auto; }
.empty { padding: 24px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 18px; background: var(--soft); color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; }
td { padding: 14px 18px; border-top: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.actions a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--field); border-radius: 9px; color: var(--navy); font-weight: 600; text-decoration: none; }
/* [WHY-HERE] at phone width 4 columns do not fit the card: the buttons wrapped and ran past its edge
   (M1-23, a 389 px table in a 356 px card). Below 480 px each client is a block instead of a row. */
@media (max-width: 480px) {
  .list table, .list tbody, .list tr, .list td { display: block; }
  .list thead { display: none; }
  .list tr { padding: 14px 18px; border-top: 1px solid var(--line); }
  .list tr:first-child { border-top: 0; }
  .list td { padding: 2px 0; border-top: 0; }
  .list td:nth-child(3):not(:empty)::before { content: "Media buyer: "; color: var(--muted); }
  .list .actions { justify-content: flex-start; margin-top: 10px; }
}

/* M1-10: the add-client form and the ad copy studio, after canvas v22 (Clients, Studio, StudioGoogle). */
h2, dl, dd { margin: 0; }
.head { display: flex; flex-direction: column; gap: 8px; }
.head a { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span, .chip { padding: 2px 10px; border-radius: 999px; background: #e7ebf0; color: #183b56; font-size: 12px; font-weight: 700; }
.chip.ok { background: #dcf7e8; color: #00662f; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--field); }
.tabs a { padding: 10px 16px; border-bottom: 3px solid transparent; color: #183b56; font-weight: 600; text-decoration: none; }
.tabs a[aria-selected="true"] { border-bottom-color: var(--green); color: var(--navy); font-weight: 700; }
.panel { padding: 14px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
summary { cursor: pointer; color: #007a39; font-weight: 700; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; margin-top: 14px; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: #183b56; }
.fields input, .fields select, .fields textarea { min-height: 44px; padding: 10px 12px; border: 1px solid var(--field); border-radius: 10px; background: #fff; font: inherit; font-weight: 400; color: var(--navy); }
.content button { min-height: 40px; padding: 0 14px; border: 1px solid var(--field); border-radius: 10px; background: #fff; color: var(--navy); }
.content button.go, .fields button { border: 0; background: var(--green); color: #03140a; }
.fields button { align-self: end; justify-self: start; }
.content button:disabled { opacity: 0.5; cursor: wait; }
.content button[aria-checked="true"] { border-color: var(--green); background: #dcf7e8; }
.group { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.group > * { align-self: stretch; }
.group > form { align-self: flex-start; }
.group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.group-head h2 { font-size: 18px; }
.tag { padding: 2px 10px; border-radius: 6px; background: #ffc928; color: #2b2100; font-size: 13px; font-weight: 700; }
.ad { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.kicker { padding: 14px 20px; background: var(--navy); color: #5ff0a0; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.copy { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.option { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.option span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.count { color: var(--muted); font: 12px ui-monospace, monospace; }
.wireframe { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 20px 20px; padding: 18px; border: 2px dashed #b6c0cc; border-radius: 12px; background: #f4f6f9; font-size: 14px; }
.wireframe dt { font-weight: 700; }
.image { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 20px 20px; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--soft); }
.status details[open] { flex-basis: 100%; }

/* M1-16: the studio's client-page panel, and a client's page and its password gate, after canvas v22
   (Studio, ClientGate, ClientPage). The page reuses the studio's ad classes above. */
.client-link { display: flex; flex-direction: column; gap: 8px; }
.client-link h2 { font-size: 16px; }
.client-link code { overflow-wrap: anywhere; }
.client-link a { color: #007a39; font-weight: 700; }
.gate { flex-direction: column; gap: 18px; background: var(--soft); }
.gate .card { border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(13, 21, 46, 0.08); }
.gate .card button { background: var(--navy); color: #fff; }
.gate > .muted { max-width: 420px; text-align: center; }
.eyebrow { color: #007a39; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; }
.client-head { background: var(--navy); color: #fff; }
.client-head > div, .client-main { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; padding: 44px max(16px, 4vw) 40px; }
.client-head h1 { font-size: 40px; overflow-wrap: anywhere; }
.client-head .eyebrow { color: #5ff0a0; }
.client-head .muted { color: #9aa6b8; }
.client-head .tabs { gap: 6px; border: 0; }
.client-head .tabs a { padding: 8px 14px; border: 1px solid #34405e; border-radius: 10px; color: #fff; }
.client-main { gap: 40px; padding: 40px max(16px, 4vw) 72px; }
.client-main h2 { font-size: 24px; }
