:root {
  --bg: #f1f5f9; --card: #ffffff; --text: #17253a; --muted: #718096; --line: #dce5ef;
  --accent: #f06b48; --accent-text: #fff; --ok: #13a58e; --bad: #a7b4c3; --danger: #c2414f; --warn: #d8892b;
  --navy: #102238; --navy-soft: #1b334e; --blue: #3478c5; --shadow: 0 12px 32px rgba(23, 37, 58, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 15px/1.5 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
header.top { display: flex; align-items: center; gap: 18px; min-height: 72px; padding: 12px max(22px, calc((100vw - 1180px) / 2));
             background: var(--navy); color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; margin-right: 18px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 800; font-size: 19px; box-shadow: 0 5px 14px rgba(240,107,72,.35); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; letter-spacing: .02em; }
.brand-copy strong { font-size: 16px; }
.brand-copy small { color: #9fb3c9; font-size: 10px; margin-top: 4px; letter-spacing: .08em; }
.who { color: var(--muted); }
main { max-width: 1180px; margin: 0 auto; padding: 28px 22px 64px; }
h1 { font-size: 22px; margin: 4px 0 16px; }
h2 { font-size: 17px; margin: 0 0 8px; }
a { color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card.narrow { max-width: 360px; margin: 40px auto; }
.muted { color: var(--muted); font-size: 13px; }
.warn { color: var(--warn); }
.flash { background: var(--card); border-left: 4px solid var(--accent); padding: 10px 14px; margin-bottom: 16px; border-radius: 6px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack label { display: flex; flex-direction: column; gap: 4px; }
.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.inline.wrap { flex-wrap: wrap; gap: 10px; }
input, select, button { font: inherit; color: inherit; }
input, select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); max-width: 100%; }
input[type=number] { width: 72px; }
button { padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; }
button:disabled { opacity: .35; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.danger { color: var(--danger); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }
label.check { flex-direction: row; align-items: center; display: inline-flex; gap: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); margin-right: 6px; }
.dot.on { background: var(--ok); }
.devices, .list { list-style: none; padding: 0; margin: 0 0 12px; }
.devices li, .list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.playlist { list-style: none; padding: 0; margin: 0 0 16px; }
.playlist li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.thumb { width: 128px; flex: none; aspect-ratio: 1024 / 600; background: #000; border-radius: 4px; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: contain; display: block; }
.meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.meta .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; flex-direction: column; gap: 4px; }
.upload { border-top: 1px solid var(--line); padding-top: 12px; }
#content > form.upload { display: none; }
.content-upload-launch { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin: 14px 0 0; padding: 15px 16px; border: 1px dashed var(--line); border-radius: 12px; background: #f8fbfd; }
.content-upload-launch p { margin: 4px 0 0; }
.content-modal { width: min(680px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 22px; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: var(--card); box-shadow: 0 24px 80px rgba(16,34,56,.28); }
.content-modal::backdrop { background: rgba(16,34,56,.48); }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.icon-button { padding: 4px 10px; border: 0; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.screen-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.screen-choice legend { padding: 0 5px; font-weight: 700; }
.screen-choice-card { display: flex; gap: 8px; align-items: flex-start; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdff; cursor: pointer; }
.screen-choice-card:has(input:checked) { border-color: var(--accent); background: #fff5f1; box-shadow: 0 0 0 2px rgba(242,102,72,.12); }
.screen-choice-card span { display: flex; flex-direction: column; gap: 3px; }
.screen-choice-card small { color: var(--muted); }
.content-preview-result { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.content-preview-result h3 { margin: 0 0 10px; }
.processed-preview { max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #101820; }
.processed-preview img { display: block; width: 100%; max-height: 330px; object-fit: contain; }
.processed-preview p { padding: 0 10px; }
.mutual-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mutual-profile-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.mutual-profile-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mutual-profile-head strong, .mutual-profile-head small { display: block; }
.mutual-profile-head small { margin-top: 3px; color: var(--muted); }
.reach-hero.compact { margin: 12px 0; }
.policy-device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.policy-device-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.policy-device-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.policy-device-head strong, .policy-device-head small { display: block; }
.policy-device-head small { margin-top: 3px; color: var(--muted); }
.readonly-policy-details { margin-top: 12px; }
.current-playlist-preview { margin-bottom: 18px; }
.playlist-preview-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.playlist-preview-item { min-width: 0; }
.playlist-preview-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #101820; }
.playlist-preview-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.playlist-preview-item strong, .playlist-preview-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-preview-item strong { margin-top: 5px; font-size: 12px; }
.playlist-preview-item small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.default-preview { width: min(320px, 100%); margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #101820; }
.default-preview img { display: block; width: 100%; max-height: 220px; object-fit: contain; }
.current-display-image { width: min(360px, 100%); margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #101820; }
.current-display-image img { display: block; width: 100%; max-height: 240px; object-fit: contain; }
@media (max-width: 620px) { .screen-choice, .mutual-profile-grid { grid-template-columns: 1fr; }.content-upload-launch { align-items: flex-start; flex-direction: column; } }
@media (max-width: 800px) { .playlist-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.badge { background: var(--ok); color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 12px; }
code.secret { word-break: break-all; }
button { white-space: nowrap; }

/* Admin: one card per screen */
.device { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; padding: 16px 0;
          border-top: 1px solid var(--line); }
.device:first-of-type { border-top: 0; padding-top: 4px; }
.device-main { min-width: 0; }
.device-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.device-name { font-size: 17px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.pill { display: inline-flex; align-items: center; padding: 2px 10px 2px 8px; border-radius: 999px;
        font-size: 13px; border: 1px solid var(--line); }
.pill .dot { margin-right: 6px; }
.pill.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 12px 0 0; }
.stats > div { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.stats dt { color: var(--muted); font-size: 12px; }
.stats dd { margin: 2px 0 0; font-weight: 600; }
.stats dd small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.stats dd small.warn { color: var(--warn); }
.now-playing { margin: 10px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-shot-wrap { margin: 0; width: 240px; align-self: start; }
.device-shot-wrap figcaption { font-size: 12px; margin-top: 4px; }
.device-shot { display: block; aspect-ratio: 1024 / 600; background: #000;
               border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.device-shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.device-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.action { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0;
          background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.action-label { font-size: 12px; color: var(--muted); }
/* Let grid/flex children shrink below their content width so nothing pushes the page sideways. */
.device > *, .action > * { min-width: 0; }
.action .inline { flex-wrap: wrap; }
.action input { min-width: 0; max-width: 100%; }
header.top { flex-wrap: wrap; }
@media (max-width: 720px) {
  .device { grid-template-columns: 1fr; }
  .device-shot-wrap { width: 100%; }
}
@media (max-width: 560px) {
  .thumb { width: 96px; }
  .playlist li { align-items: flex-start; }
}
.bad-text { color: var(--danger); }

/* Rolling delivery preview and event types */
.plan-preview { list-style: none; padding: 0; margin: 12px 0; display: grid;
         grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.event { border-radius: 8px; padding: 10px 8px; background: var(--bg); border-top: 4px solid var(--line);
        display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.event strong { font-size: 14px; }
.event small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-no { color: var(--muted); font-size: 12px; }
.event-own, .event-merchant { border-top-color: var(--accent); }
.event-ad, .event-commercial { border-top-color: #3b82f6; }
.event-mutual, .event-cross_promo { border-top-color: var(--ok); }
.event-filler, .event-promo { border-top-color: var(--bad); }
@media (max-width: 560px) { .plan-preview { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.thumb { position: relative; }
.thumb-badge { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.7); color: #fff;
               font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.ok-text { color: var(--ok); }
fieldset.blocks { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0;
                  display: flex; flex-wrap: wrap; gap: 6px 14px; }
fieldset.blocks legend { padding: 0 4px; }
fieldset.blocks p { flex-basis: 100%; margin: 4px 0 0; }

/* Ad network admin */
.admin-nav { display: flex; gap: 14px; margin-right: auto; margin-left: 18px; }
.admin-nav a { color: var(--muted); text-decoration: none; }
.admin-nav a.active, .admin-nav a:hover { color: var(--text); }
.shop-nav { display: flex; gap: 14px; margin-right: auto; margin-left: 18px; }
.shop-nav a { color: #c7d5e5; text-decoration: none; }
.shop-nav a:hover { color: #fff; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.zone { padding: 10px 0; border-bottom: 1px solid var(--line); }
.zone-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.meter { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin: 6px 0 4px; max-width: 420px; }
.meter span { display: block; height: 100%; background: var(--accent); }
.shop-row { margin-bottom: 8px; }
.shop-name { min-width: 120px; }
.campaign { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.campaign.paused { opacity: .55; }
.campaign .meta { flex: 1; min-width: 200px; }
.campaign-state { display: flex; gap: 8px; align-items: center; }
.thumb.small { width: 64px; }
.filler-row { display: flex; gap: 10px; align-items: center; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; align-items: end; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; }
.form-grid .wide { grid-column: 1 / -1; }
.brand:has(+ .admin-nav) { margin-right: 0; }

/* Read-only operations console */
.console-hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 8px 0 22px; }
.eyebrow, .section-kicker { margin: 0 0 5px; color: var(--muted); font-size: 11px; letter-spacing: .13em; font-weight: 700; }
.hero-copy { max-width: 660px; color: var(--muted); margin: 0; }
.hero-actions { display: flex; gap: 10px; align-items: center; }
.hero-link, .section-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.console-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.console-metric { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.console-metric:hover { border-color: var(--accent); transform: translateY(-1px); }
.console-metric span { color: var(--muted); font-size: 13px; }
.console-metric strong { font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.console-metric small { color: var(--muted); font-size: 12px; }
.metric-primary { border-top: 3px solid var(--accent); }
.metric-alert { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.console-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.queue-card { margin-bottom: 0; }
.queue-count { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--text); font-weight: 700; }
.queue-list { list-style: none; padding: 0; margin: 8px 0 14px; }
.queue-list li { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.queue-list li:last-child { border-bottom: 0; }
.queue-list p { margin: 2px 0 0; }
.empty-state { color: var(--muted); padding: 16px 0 !important; }
.status-pill { display: inline-flex; align-items: center; white-space: nowrap; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; }
.status-pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.status-pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.status-pill.bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.status-pill.muted { color: var(--muted); }
.console-page-head { margin-bottom: 16px; }
.filter-card { padding-bottom: 14px; }
.screen-filters { display: grid; grid-template-columns: minmax(180px, 1.6fr) repeat(3, minmax(130px, 1fr)) auto; gap: 10px; align-items: end; }
.screen-filters label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.screen-filters input, .screen-filters select { width: 100%; }
.filter-summary { margin: 12px 0 0; }
.screen-table-card { padding: 10px 16px 16px; }
.screen-table { overflow-x: auto; }
.screen-row { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr 1fr 1.25fr .7fr; gap: 12px; align-items: center; min-width: 900px; padding: 13px 6px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.screen-row:not(.screen-header):hover { background: var(--bg); }
.screen-row span { min-width: 0; }
.screen-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-header { color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 8px; }
.status-text.ok { color: var(--ok); }.status-text.warn { color: var(--warn); }.status-text.bad { color: var(--danger); }.status-text.muted { color: var(--muted); }
.pagination { display: flex; gap: 6px; margin-top: 16px; }
.pagination a { min-width: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; text-align: center; text-decoration: none; color: var(--muted); }
.pagination a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.breadcrumbs { color: var(--muted); font-size: 13px; margin: 0 0 12px; }.breadcrumbs span { padding: 0 6px; }
.detail-hero { padding: 18px 20px; }.detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }.detail-title strong { font-size: 18px; }.detail-reason { color: var(--muted); margin: 10px 0 0; }.detail-alert { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: var(--danger); font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }.detail-grid .card { margin-bottom: 0; }
.detail-list { margin: 8px 0 0; }.detail-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }.detail-list dt { color: var(--muted); }.detail-list dd { margin: 0; text-align: right; }.detail-list dd small { display: block; color: var(--muted); font-size: 12px; }.source-callout { padding: 14px; border-radius: 10px; background: var(--bg); }.source-callout p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }.report-number { display: flex; align-items: baseline; gap: 6px; margin-top: 16px; }.report-number strong { font-size: 38px; line-height: 1; }.report-number span { color: var(--muted); }
.detail-actions-note { margin-top: 16px; }.detail-actions-note p { color: var(--muted); margin: 5px 0 12px; }
@media (max-width: 900px) { .console-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }.screen-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }.screen-filters label:first-child { grid-column: 1 / -1; }.screen-filters button { width: 100%; }.detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .console-hero { align-items: start; flex-direction: column; }.console-grid { grid-template-columns: 1fr; }.console-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }.screen-filters { grid-template-columns: 1fr; }.screen-filters label:first-child { grid-column: auto; } }
@media (max-width: 460px) { .console-metrics { grid-template-columns: 1fr 1fr; }.console-metric { padding: 12px; }.console-metric strong { font-size: 25px; } }

/* Delivery workspace: the same information scales from wide monitors to
   narrow embedded browsers without making the operator scroll a table. */
.primary-link { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.help-text { margin-top: 12px; }
.split-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.split-cards .card { margin-bottom: 0; }
.compact-list { margin-top: 10px; }
.compact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.compact-row:hover { color: var(--accent); }
.compact-row strong, .compact-row small { display: block; }
.compact-row small { margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.next-actions { margin-top: 16px; }
.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.action-grid a { display: block; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; }
.action-grid a:hover { border-color: var(--accent); }
.action-grid strong, .action-grid span { display: block; }
.action-grid span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.plan-list-card { padding-top: 4px; }
.plan-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: 0; }
.plan-thumb { position: relative; width: 96px; flex: none; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #101820; }
.plan-thumb.large { width: 160px; }
.plan-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.plan-thumb > span { position: absolute; inset: auto 5px 5px auto; padding: 2px 5px; border-radius: 4px; background: rgba(0,0,0,.68); color: #fff; font-size: 11px; }
.plan-main { min-width: 0; flex: 1; }
.plan-title { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.plan-title a { display: flex; gap: 6px; min-width: 0; flex-wrap: wrap; align-items: baseline; color: var(--text); text-decoration: none; }
.plan-title a:hover { color: var(--accent); }
.plan-title a span { overflow: hidden; max-width: min(420px, 45vw); color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.plan-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.plan-tags span { padding: 3px 7px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; }
.plan-progress { display: flex; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.plan-open { flex: none; }
.form-card { max-width: 900px; }
.detail-form { display: flex; flex-direction: column; gap: 13px; }
.detail-form > label, .detail-form fieldset { display: flex; flex-direction: column; gap: 5px; }
.detail-form textarea { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: inherit; color: inherit; resize: vertical; }
.detail-form small, .form-card small { color: var(--muted); font-size: 12px; }
.capacity-panel { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.capacity-main { display: flex; align-items: baseline; gap: 6px; }
.capacity-main strong { color: var(--accent); font-size: 22px; font-variant-numeric: tabular-nums; }
.capacity-label, .capacity-meta { color: var(--muted); font-size: 12px; }
.capacity-warning { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.capacity-warning:not([hidden]) { margin-top: 2px; }
.capacity-panel.is-loading .capacity-main { opacity: .55; }
.capacity-panel.is-error { border-color: var(--line); }
.detail-form fieldset { padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.detail-form fieldset legend { padding: 0 4px; font-weight: 600; }
.radio-card { display: flex; gap: 9px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.radio-card:has(input:checked) { border-color: var(--accent); background: #fff5f1; }
.radio-card span { display: flex; flex-direction: column; gap: 3px; }
.form-actions, .detail-action-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-form-divider { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.plan-detail-media { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.readonly-field { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.readonly-field small { color: var(--muted); font-size: 12px; }
.inline-create { margin-bottom: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.inline-create summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.inline-create-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-top: 10px; }
.inline-create-form label { display: flex; min-width: 180px; flex: 1; flex-direction: column; gap: 4px; }
@media (max-width: 900px) { .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .split-cards { grid-template-columns: 1fr; }.plan-row { align-items: flex-start; flex-wrap: wrap; }.plan-open { margin-left: 110px; }.plan-title { align-items: flex-start; flex-direction: column; gap: 5px; }.plan-title a span { max-width: 70vw; }.plan-detail-media { align-items: flex-start; }.detail-form .form-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .action-grid { grid-template-columns: 1fr; }.plan-row { gap: 10px; }.plan-thumb { width: 76px; }.plan-thumb.large { width: 120px; }.plan-open { margin-left: 86px; }.plan-tags { display: block; }.plan-tags span { display: inline-block; margin: 2px 3px 2px 0; }.plan-progress { flex-wrap: wrap; gap: 5px 12px; }.compact-row { align-items: flex-start; flex-direction: column; gap: 6px; }.detail-form .form-grid { grid-template-columns: 1fr; }.form-actions { position: sticky; bottom: 0; padding: 10px 0; background: var(--card); } }
@media (max-width: 720px) { header.top { gap: 10px; padding: 10px 14px; }.admin-nav { order: 3; width: 100%; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }.admin-nav a { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 4px; padding: 7px 2px; font-size: 13px; text-align: center; }.admin-nav a span { font-size: 10px; } }
@media (max-width: 420px) { .admin-nav a { flex-direction: column; gap: 0; padding: 5px 2px; font-size: 12px; line-height: 1.25; }.who { margin-left: auto; } }

/* Stats */
.stats-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tabs a { padding: 6px 14px; color: var(--muted); text-decoration: none; }
.tabs a.active { background: var(--accent); color: var(--accent-text); }
.button-link { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.stats-table td.num, .stats-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.daybars { display: flex; align-items: flex-end; gap: 2px; height: 28px; min-width: 70px; }
.daybars span { flex: 1; min-width: 3px; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 1px; }
.stats-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.stats-split .card { margin-bottom: 16px; }

/* Ad network page layout */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head h1 { margin: 4px 0; }
.jump { display: flex; gap: 6px; flex-wrap: wrap; }
.jump a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
          text-decoration: none; font-size: 13px; background: var(--card); }
.jump a b { color: var(--text); margin-left: 2px; }
.jump a.attention { border-color: var(--warn); color: var(--warn); }
.jump a.attention b { color: var(--warn); }
.legend { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 16px; align-items: center; margin-bottom: 16px; }
.legend p { margin: 0; }
.plan-preview-mini { margin: 0; gap: 4px; }
.plan-preview-mini .event { padding: 6px; }
.plan-preview-mini .event strong { font-size: 12px; }
.plan-preview-mini .event small { font-size: 11px; }
.small-text { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
section.card { scroll-margin-top: 12px; }

.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.zone-card { background: var(--bg); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.zone-card header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.zone-add { border: 1px dashed var(--line); background: transparent; justify-content: center; }
.cap-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; gap: 2px; font-size: 11px; }
.cap-bar .seg { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 0 4px;
                overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; }
.seg-0 { background: #2563eb; } .seg-1 { background: #0891b2; } .seg-2 { background: #7c3aed; } .seg-3 { background: #be185d; }
.cap-bar .seg-free { background: repeating-linear-gradient(45deg, var(--line), var(--line) 4px, transparent 4px, transparent 8px);
                     color: var(--muted); }
.cap-text { font-size: 13px; }

.shop-table { display: flex; flex-direction: column; }
.shop-th, .shop-tr { display: grid; grid-template-columns: 1.3fr 1.4fr 1.2fr .9fr 1.6fr auto; gap: 10px; align-items: center; }
.shop-th { color: var(--muted); font-size: 12px; padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.shop-tr { padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; }
.shop-tr select { width: 100%; }
.shop-name { font-weight: 600; }
.cell-label { display: none; }

.campaign-list { margin-bottom: 8px; }
.campaign-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.chip-strong { border-color: #2563eb; color: #93c5fd; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.panel { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.panel h3 { margin-top: 0; }
.list.compact li { padding: 4px 0; }
.form-grid small { font-size: 11px; }
.cross-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cross-item.is-pending { border-left: 3px solid var(--warn); padding-left: 10px; }
.warn-pill { color: var(--warn); border-color: var(--warn); font-size: 12px; font-weight: 400; }

/* Delivery workflow and shop console */
.workflow-card { padding-bottom: 16px; }
.workflow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.workflow-steps > div { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; padding: 10px; border-radius: 10px; background: var(--bg); }
.workflow-steps b { grid-row: 1 / span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; }
.workflow-steps strong { align-self: end; }.workflow-steps span { color: var(--muted); font-size: 12px; }
.network-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.zone-scope-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.zone-scope-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfd; }
.zone-scope-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.zone-scope-head span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.zone-scope-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.zone-management-list { display: flex; flex-direction: column; gap: 16px; }
.zone-management-card { margin-bottom: 0; }
.zone-management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.zone-panel { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.zone-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.zone-panel-heading h3 { margin: 0; }
.zone-panel-heading > span { color: var(--muted); font-size: 12px; }
.zone-panel .compact-list { margin: 4px 0 0; }
.zone-panel .compact-row > a { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 12px; color: inherit; text-decoration: none; }
.zone-panel .compact-row > a:hover { color: var(--accent); }
.zone-mutual-row > a { align-items: center; }
.zone-mutual-row .plan-thumb { width: 72px; }
.zone-mutual-row .status-pill { flex: none; }
.shop-section-nav { position: sticky; top: 0; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0; margin: -4px 0 14px; background: var(--bg); }
.shop-section-nav a { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); text-decoration: none; font-size: 13px; }
.shop-section-nav a:hover { border-color: var(--accent); color: var(--accent); }
.shop-screen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.shop-screen-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.shop-screen-card > div { display: flex; flex-direction: column; gap: 4px; }.shop-screen-card > div .status-pill { align-self: start; }
.shop-screen-card strong { font-size: 16px; }.shop-screen-card p { margin: 0; }.shop-screen-card .now-playing { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }.mini-detail > div { padding-top: 8px; border-top: 1px solid var(--line); }.mini-detail dt { color: var(--muted); font-size: 11px; }.mini-detail dd { margin: 2px 0 0; font-size: 13px; }
.detail-actions { margin-top: 8px; padding: 10px; border-radius: 8px; background: var(--bg); }.detail-actions summary { cursor: pointer; font-weight: 600; }.detail-action-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 10px; }.detail-action-form label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
@media (max-width: 720px) { .workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }.shop-nav, .admin-nav { margin-left: 0; order: 3; width: 100%; overflow-x: auto; padding-top: 4px; }.mini-detail { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 480px) { .workflow-steps { grid-template-columns: 1fr; }.mini-detail { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .zone-management-grid { grid-template-columns: 1fr; }.zone-panel .compact-row > a { align-items: flex-start; flex-wrap: wrap; } }

/* Operator gadgets: compact decision shortcuts and visual delivery progress. */
.ops-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: -4px 0 18px; }
.ops-shortcuts a { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.72); color: var(--text); text-decoration: none; }
.ops-shortcuts a:hover { border-color: var(--accent); transform: translateY(-1px); }
.ops-shortcuts strong { font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; }
.ops-shortcuts small { color: var(--muted); font-size: 12px; }
.shortcut-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.shortcut-dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(19,165,142,.12); }
.shortcut-dot.warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(216,137,43,.12); }
.shortcut-dot.bad { background: var(--danger); box-shadow: 0 0 0 4px rgba(194,65,79,.12); }
.screen-quick-filters { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 12px; }
.screen-quick-filters a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font-size: 12px; text-decoration: none; }
.screen-quick-filters a:hover, .screen-quick-filters a.active { border-color: var(--accent); color: var(--accent); }
.screen-quick-filters b { color: var(--text); font-variant-numeric: tabular-nums; }
.plan-progress { display: block; max-width: 520px; }
.progress-copy { display: flex; justify-content: space-between; gap: 10px; }
.plan-meter { height: 6px; margin-top: 5px; overflow: hidden; border-radius: 999px; background: var(--line); }
.plan-meter span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #f5a15f); }
@media (max-width: 720px) { .ops-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .ops-shortcuts { grid-template-columns: 1fr; } }

@media (max-width: 720px) {
  .legend { grid-template-columns: 1fr; }
  .shop-th { display: none; }
  .shop-tr { grid-template-columns: 1fr 1fr; }
  .shop-tr .shop-name, .shop-tr > span { grid-column: 1 / -1; }
  .cell-label { display: block; font-size: 11px; color: var(--muted); }
}
.fallback { margin: 4px 0 12px; padding-left: 20px; font-size: 13px; color: var(--muted); } .fallback b { color: var(--text); }
.form-grid { align-items: start; }
@media (max-width: 720px) {
  /* thumbnail | text, with the pause button under the text */
  .campaign { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; }
  .campaign .thumb { width: 96px; }
  .campaign .meta { min-width: 0; }
  .campaign > form { grid-column: 2; }
  .shop-tr > button { grid-column: 1 / -1; }
}

/* Owner: cross-promo reach */
.reach-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.reach-hero > div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.reach-hero b { display: block; font-size: 26px; line-height: 1.1; color: var(--ok); font-variant-numeric: tabular-nums; }
.reach-hero span { color: var(--muted); font-size: 12px; }
.reach-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 70px; margin: 8px 0; }
.reach-day { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; min-width: 0; }
.reach-day span { width: 100%; max-width: 28px; background: var(--ok); border-radius: 3px 3px 0 0; min-height: 2px; }
.reach-day small { color: var(--muted); font-size: 10px; }
.campaign-actions { display: flex; gap: 6px; }
@media (max-width: 720px) { .campaign > .campaign-actions { grid-column: 2; } }

/* Abuse limits */
.registration { margin: 0 0 12px; }
.anomaly { margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px;
           border: 1px solid var(--warn); color: var(--warn); }
.bad-pill { color: var(--danger); border-color: var(--danger); }

/* Upload progress (static/upload.js) */
.progress { margin-top: 10px; }
.progress .bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress.working .bar span { background: repeating-linear-gradient(45deg, var(--accent) 0 10px, transparent 10px 20px);
  background-size: 28px 28px; animation: progress-stripes 1s linear infinite; opacity: .8; }
.progress.failed .bar span { background: var(--danger); animation: none; }
.progress.failed p { color: var(--danger); }
.progress p { margin: 6px 0 0; }
@keyframes progress-stripes { to { background-position: 28px 0; } }
@media (prefers-reduced-motion: reduce) { .progress.working .bar span { animation: none; } }

/* Per-zone ad grid editor (network.html) */
.grid-config { margin-top: 8px; }
.grid-config summary { cursor: pointer; font-size: 13px; }
.grid-config form { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }

/* Operations console redesign */
.top .who { display: inline-flex; align-items: center; gap: 7px; color: #c6d4e3; font-size: 13px; }
.top .who i { width: 7px; height: 7px; border-radius: 50%; background: #39d6ad; box-shadow: 0 0 0 4px rgba(57,214,173,.14); }
.top .link { color: #c6d4e3; border-color: transparent; background: transparent; }
.admin-nav { align-self: stretch; align-items: stretch; gap: 4px; margin: 0 auto 0 0; }
.admin-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; color: #9fb3c9; border-bottom: 2px solid transparent; font-size: 14px; }
.admin-nav a span { color: #7189a2; font: 10px ui-monospace, Consolas, monospace; }
.admin-nav a.active, .admin-nav a:hover { color: #fff; border-bottom-color: var(--accent); }
.admin-nav a.active span { color: #f6a48f; }
.flash { border-left: 4px solid var(--accent); box-shadow: var(--shadow); }
.dashboard-hero { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; padding: 28px 30px; margin-bottom: 18px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #102238 0%, #1c3a58 68%, #2e536d 100%); box-shadow: 0 18px 40px rgba(16,34,56,.18); }
.dashboard-hero h1 { margin: 2px 0 8px; font-size: 30px; letter-spacing: -.03em; }
.eyebrow, .section-kicker { margin: 0 0 7px; color: var(--accent); font: 700 10px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .16em; }
.dashboard-hero .eyebrow { color: #ffb09b; }
.hero-copy { max-width: 620px; margin: 0; color: #b8cadd; font-size: 14px; }
.hero-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: #9ee8d1; font-size: 13px; }
.live-indicator i { width: 8px; height: 8px; border-radius: 50%; background: #39d6ad; box-shadow: 0 0 0 5px rgba(57,214,173,.14); }
.hero-link, .section-link { color: #fff; text-decoration: none; font-size: 13px; }
.hero-link { padding: 9px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; background: rgba(255,255,255,.08); }
.hero-link:hover { background: rgba(255,255,255,.16); }
.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.overview-card { min-height: 122px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.overview-card.overview-primary { background: #e5f8f3; border-color: #c3eee4; }
.overview-card.overview-alert { background: #fff8ed; border-color: #f2d9ab; }
.overview-label { display: block; color: var(--muted); font-size: 12px; }
.overview-card strong { display: block; margin: 8px 0 5px; font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.overview-card strong small { margin-left: 4px; color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.overview-foot { color: var(--muted); font-size: 11px; }
.section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 4px; }
.section-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.section-kicker { color: #8ba0b6; }
.section-count { padding: 5px 10px; border-radius: 99px; color: var(--blue); background: #edf4fc; font-size: 12px; white-space: nowrap; }
.section-link { color: var(--accent); font-weight: 600; }
.enrollment-bar { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 13px 15px; margin: 18px 0 8px; border: 1px solid var(--line); border-radius: 12px; background: #f7fafc; }
.enrollment-status { display: flex; align-items: center; gap: 10px; }
.enrollment-status strong, .enrollment-status small { display: block; }
.enrollment-status strong { font-size: 13px; }
.enrollment-status small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #b7c1cc; }
.status-dot.active { background: var(--ok); box-shadow: 0 0 0 5px rgba(19,165,142,.12); }
.enroll-details { padding: 10px 0 2px; border-bottom: 1px solid var(--line); }
.enroll-details summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; }
.enroll-details summary span { float: right; font-size: 18px; font-weight: 400; }
.enroll-form { padding: 12px 0 6px; }
.screen-section > .muted { margin-top: 0; }
.device-card { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fbfdff; box-shadow: 0 5px 18px rgba(23,37,58,.045); }
.device-card:first-of-type { padding-top: 18px; border-top: 1px solid var(--line); }
.device-card .device-head { margin-bottom: 6px; }
.device-card .device-actions { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.device-card .action { border: 1px solid var(--line); background: #f5f8fb; }
.secondary-section { margin-top: 20px; }
.secondary-section .section-heading { margin-bottom: 12px; }
.secondary-section .section-heading h2 { font-size: 18px; }
@media (max-width: 800px) {
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .hero-actions { width: 100%; justify-content: space-between; }
}
@media (max-width: 560px) {
  header.top { padding: 10px 14px; }
  .brand { margin-right: auto; }
  .admin-nav { order: 3; width: 100%; min-height: 38px; }
  .admin-nav a { flex: 1; justify-content: center; padding: 0 5px; }
  main { padding: 18px 12px 44px; }
  .dashboard-hero { padding: 22px; }
  .dashboard-hero h1 { font-size: 25px; }
  .overview-card { min-height: 108px; padding: 14px; }
  .overview-card strong { font-size: 25px; }
  .enrollment-bar { align-items: flex-start; flex-direction: column; }
  .device-card { padding: 14px; }
}
.network-hero, .stats-hero { margin-bottom: 18px; }
.hero-jump { display: flex; flex-wrap: wrap; justify-content: flex-end; max-width: 470px; }
.hero-jump a { color: #dce8f4; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); }
.hero-jump a b { color: #fff; }
.hero-jump a:hover { color: #fff; background: rgba(255,255,255,.16); }
.hero-jump a.attention, .hero-jump a.attention b { color: #ffd09f; border-color: rgba(255,208,159,.65); }
/* Campaign creative replacement: processed previews and the job panel. */
.creative-preview { display: block; max-width: 100%; height: auto; border-radius: 8px; background: #101820; }
.creative-job { display: flex; flex-direction: column; gap: 6px; }
.creative-job button.link { min-height: 44px; }
