:root {
  --ink: #17212b;
  --muted: #667085;
  --line: #dbe2e8;
  --paper: #f3f6f8;
  --white: #fff;
  --orange: #f26722;
  --orange-dark: #c9440d;
  --navy: #172a3a;
  --green: #137a55;
  --red: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: var(--orange-dark); }
.topbar { min-height: 68px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: #fff; }
.brand { color: #fff; text-decoration: none; font-weight: 850; letter-spacing: -.04em; font-size: 1.3rem; }
.brand span { color: #ff9b6a; font-weight: 650; }
.topbar nav { display: flex; gap: 1rem; }
.topbar nav a { color: #fff; text-decoration: none; font-weight: 700; }
.shell { width: min(1180px, 92vw); margin: 0 auto; padding: 4rem 0 6rem; }
.hero { max-width: 800px; padding: 3rem 0; }
.hero h1, .page-heading h1 { font-size: clamp(2.4rem, 6vw, 5.4rem); line-height: .96; letter-spacing: -.06em; margin: .25rem 0 1.25rem; }
.hero p:not(.eyebrow), .page-heading p:not(.eyebrow) { font-size: 1.2rem; line-height: 1.65; color: var(--muted); max-width: 760px; }
.eyebrow { color: var(--orange-dark); text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 850; margin: 0 0 .5rem; }
.actions { display: flex; gap: .75rem; margin-top: 2rem; flex-wrap: wrap; }
.button { appearance: none; border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 8px; padding: .78rem 1rem; text-decoration: none; font-weight: 800; cursor: pointer; }
.button.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.button.danger { border-color: #efb5ae; color: var(--red); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.metrics article { background: var(--white); border: 1px solid var(--line); padding: 1.4rem; border-radius: 12px; }
.metrics strong { display: block; font-size: 2rem; }
.metrics span { color: var(--muted); }
.page-heading { margin-bottom: 2rem; }
.page-heading h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); }
.preview-grid { display: grid; grid-template-columns: minmax(230px, 320px) 1fr; gap: 1.5rem; align-items: start; }
.panel, .client-frame, .admin-section { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1.35rem; box-shadow: 0 8px 24px rgba(23,33,43,.05); }
label { display: grid; gap: .35rem; color: var(--muted); font-size: .86rem; font-weight: 750; margin-bottom: .9rem; }
input, select { width: 100%; padding: .75rem; border: 1px solid #cbd5dd; border-radius: 7px; background: #fff; color: var(--ink); font: inherit; }
dl { font-size: .82rem; display: grid; grid-template-columns: 1fr; margin-top: 1.5rem; }
dt { color: var(--muted); font-weight: 750; }
dd { margin: .15rem 0 .8rem; overflow-wrap: anywhere; }
code { background: #eef2f5; padding: .15rem .35rem; border-radius: 4px; }
.client-frame { padding: 0; overflow: hidden; }
.preview-settings { position: sticky; top: 1rem; }
.viewport-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: 1.5rem 0 0; padding: 0; border: 0; }
.viewport-picker legend { grid-column: 1 / -1; margin-bottom: .45rem; color: var(--muted); font-size: .86rem; font-weight: 750; }
.viewport-button { border: 1px solid var(--line); border-radius: 7px; padding: .6rem .4rem; background: #fff; color: var(--ink); font-weight: 750; cursor: pointer; }
.viewport-button.active { border-color: var(--orange); background: #fff4ed; color: var(--orange-dark); }
.preview-stage { min-width: 0; }
.preview-toolbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.preview-toolbar div { display: grid; gap: .15rem; }
.preview-toolbar span { color: var(--muted); font-size: .82rem; }
.preview-mode { padding: .35rem .55rem; border-radius: 99px; background: #e9f7f1; color: var(--green) !important; font-weight: 800; }
.preview-canvas-wrap { overflow-x: auto; padding: 0 0 1rem; }
.preview-canvas { width: var(--preview-width, 1280px); max-width: 100%; margin: 0 auto; transition: width .2s ease; }
.fake-site-header { background: #121820; color: #fff; padding: 1.2rem 1.5rem; display: flex; justify-content: space-between; align-items: baseline; }
.fake-site-header span { font-weight: 900; letter-spacing: -.03em; }
.fake-site-header small { color: #9ca7b2; }
.fake-content { padding: 2.5rem 6%; min-height: 500px; }
.fake-page-intro, .fake-page-outro { padding: 1rem 0 2rem; }
.preview-placement { margin: 1rem 0 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.placement-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; }
.placement-heading h2 { margin: .15rem 0 0; font-size: 1.3rem; }
.preview-slot { margin-top: 1.25rem; padding: .9rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.slot-diagnostics { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.slot-diagnostics > div { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.slot-type { padding: .25rem .45rem; border-radius: 5px; background: #e9eef2; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .06em; }
.slot-state { margin-top: .65rem; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.slot-state.filled { color: var(--green); }
.slot-state.empty { color: var(--red); }
.empty-state { margin-top: 1rem; padding: 1rem; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
.skeleton { display: block; height: 14px; width: 60%; background: #e5e9ed; border-radius: 20px; margin-bottom: .8rem; }
.skeleton.wide { width: 92%; }
.skeleton.medium { width: 76%; }
.ad-slot { position: relative; display: grid; place-items: center; width: 100%; margin: 1rem auto 0; min-height: 84px; background: #f5f7f8; border: 1px dashed #aab5be; overflow: hidden; color: var(--muted); }
.ad-slot a, .ad-slot img, .ad-slot iframe { display: block; width: 100%; height: 100%; }
.ad-slot img { object-fit: cover; }
.ad-slot iframe { border: 0; pointer-events: none; }
.textlink-creative { width: auto !important; height: auto !important; padding: .9rem 1.2rem; border-radius: 8px; background: #fff; font-weight: 800; }
.ad-label { position: absolute; z-index: 2; top: .45rem; right: .45rem; background: rgba(10,15,20,.76); color: #fff; padding: .25rem .45rem; border-radius: 4px; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.ad-slot.measured { outline: 2px solid #31a875; }
.ad-slot.empty { border-color: #dba5a0; background: #fff4f2; color: var(--red); }
.tabs { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .4rem; padding: .75rem; background: rgba(243,246,248,.94); backdrop-filter: blur(10px); margin-bottom: 1rem; }
.tabs a { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: .55rem .8rem; text-decoration: none; font-weight: 750; }
.tabs a.active { border-color: var(--orange); background: #fff4ed; color: var(--orange-dark); }
.admin-section { display: none; margin: 1rem 0; scroll-margin-top: 80px; }
.admin-section.active { display: block; }
.section-title { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.section-title h2 { margin: 0; font-size: 1.8rem; }
.section-title > span { color: var(--muted); }
.subsection-heading { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.forecast-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.forecast-form label { margin: 0; }
.booking-detail { display: block; margin-top: .4rem; color: var(--muted); white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.status { display: inline-block; padding: .3rem .5rem; border-radius: 99px; font-size: .75rem; font-weight: 800; }
.status.free { background: #e7f6ef; color: var(--green); }
.status.busy { background: #fff0ea; color: var(--orange-dark); }
.forms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.inventory-forms { grid-template-columns: repeat(3, 1fr); align-items: start; }
.forms-grid .panel, .wide-form { box-shadow: none; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.creative-card { border: 1px solid var(--line); border-radius: 9px; padding: 1rem; }
.creative-card.inactive { opacity: .62; }
.creative-card h3 { margin: .8rem 0 .25rem; }
.creative-card p { margin: 0; color: var(--muted); font-size: .85rem; }
.creative-card form { margin-top: .8rem; }
.creative-thumb { aspect-ratio: 5/1; background: #eef1f3; overflow: hidden; border-radius: 5px; }
.creative-thumb img { width: 100%; height: 100%; object-fit: cover; }
.creative-thumb iframe { width: 100%; height: 100%; border: 0; pointer-events: none; }
.textlink-preview { display: grid; place-items: center; min-height: 100%; padding: 1rem; color: var(--orange-dark); font-weight: 850; text-decoration: underline; }
.wide-form { margin-top: 1rem; max-width: 720px; }
.inline-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(240px, 2fr) auto auto; gap: .65rem; align-items: end; }
.inline-form label { margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 1rem; }
.check { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; }
.check input { width: auto; }
.notice { padding: .8rem 1rem; border-radius: 8px; font-weight: 700; }
.notice.success { background: #e7f6ef; color: var(--green); }
.notice.error { background: #fff0f0; color: var(--red); }
.hint { color: var(--muted); font-size: .82rem; line-height: 1.5; }
footer { text-align: center; color: var(--muted); padding: 2rem; font-size: .8rem; }
@media (max-width: 760px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .preview-grid, .forms-grid, .inventory-forms { grid-template-columns: 1fr; }
  .forecast-form { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .section-title { align-items: start; flex-direction: column; }
  .topbar { padding: 0 4vw; }
  .shell { padding-top: 2.5rem; }
}
