/* Clipnexus piece 1. Plain, readable, no outside files. */
:root {
  --ink: #1c2330; --muted: #667085; --line: #e3e7ee; --bg: #f5f7fa; --card: #ffffff;
  --brand: #1f4fd8; --brand-dark: #173ca6; --ok: #0f7b4f; --warn: #a15c00; --bad: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
h1 { font-size: 24px; margin: 0 0 18px; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 18px 0 8px; }

.shell { display: flex; min-height: 100vh; }
.side { width: 230px; flex: none; background: #111a2e; color: #dfe5f1; display: flex; flex-direction: column; padding: 20px 0; }
.brand { font-weight: 700; font-size: 20px; letter-spacing: .3px; padding: 0 20px 18px; color: #fff; }
.brand.big { padding: 0 0 6px; color: var(--brand); font-size: 22px; }
.side nav { display: flex; flex-direction: column; }
.side nav a { color: #c9d2e3; text-decoration: none; padding: 10px 20px; border-left: 3px solid transparent; }
.side nav a:hover { background: #18233c; color: #fff; }
.side nav a.on { background: #18233c; color: #fff; border-left-color: #6d95ff; }
.who { margin-top: auto; padding: 16px 20px 0; border-top: 1px solid #25314d; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.who strong { color: #fff; font-size: 14px; }
.who span { color: #9aa6bd; }
.who form { margin-top: 8px; }

.main { flex: 1; padding: 28px 32px; max-width: 1180px; }
.solo { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin-bottom: 18px; }
.card.narrow { width: 100%; max-width: 400px; }
.card.narrow.wide { max-width: 520px; }
.card.narrow-left { max-width: 460px; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=time], input[type=number], input[type=date], select {
  display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit; color: var(--ink);
  border: 1px solid #cfd6e2; border-radius: 7px; background: #fff;
}
input:disabled, select:disabled { background: #f1f3f7; color: var(--muted); }
input:focus, select:focus { outline: 2px solid #b9cbff; border-color: var(--brand); }
label.tick { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: 14px; margin: 0 16px 8px 0; }
.roles { margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.row label { margin-bottom: 0; min-width: 220px; }

button, .btn { display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: 9px 16px; border-radius: 7px; border: 1px solid var(--brand); background: var(--brand); color: #fff; }
button:hover, .btn:hover { background: var(--brand-dark); }
button.quiet, .btn.quiet { background: #fff; color: var(--ink); border-color: #cfd6e2; }
button.quiet:hover, .btn.quiet:hover { background: #f1f3f7; }
button.danger { background: #fff; color: var(--bad); border-color: #e7b3ae; }
button.danger:hover { background: #fdf0ee; }
button.link { background: none; border: 0; padding: 0; color: #9db7ff; font-weight: 400; }
button.link:hover { background: none; text-decoration: underline; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
td.num, th.num { text-align: center; }
.nowrap { white-space: nowrap; }

.muted { color: var(--muted); font-size: 13px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tag.ok { background: #e3f5ec; color: var(--ok); }
.tag.gone { background: #fde8e6; color: var(--bad); }
.tag.warn { background: #fff1d6; color: var(--warn); }

.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: #e9f7f0; border-color: #b6e2cb; color: #0b5c3b; }
.flash.error { background: #fdecea; border-color: #f2b8b2; color: #8f1d14; }
.flash.info { background: #eaf0ff; border-color: #c2d1fb; color: #1b3a94; }

details.person { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; }
details.person.off { background: #fafbfc; }
details.person summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
details.person[open] summary { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pname { font-weight: 600; min-width: 160px; }
.checks { list-style: none; padding: 0; }
.checks li { margin-bottom: 6px; }
.pager { text-align: center; color: var(--muted); }
.pager a { margin: 0 10px; }

@media (max-width: 760px) {
  /* Narrow windows: the menu becomes one short strip so the page content shows at once. */
  .shell { flex-direction: column; }
  .side { width: auto; padding: 10px 0 0; }
  .brand { padding: 0 14px 8px; font-size: 17px; }
  .side nav { flex-direction: row; flex-wrap: wrap; padding: 0 8px; }
  .side nav a { padding: 6px 10px; border-left: 0; border-bottom: 3px solid transparent; font-size: 14px; }
  .side nav a.on { border-bottom-color: #6d95ff; }
  .who { margin-top: 6px; padding: 6px 14px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .who form { margin: 0 0 0 auto; }
  .main { padding: 16px; }
}

/* Piece 2a: inventory */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.stat:hover { border-color: var(--brand); }
.stat strong { font-size: 24px; }
.stat span { color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }
button.small { padding: 5px 10px; font-size: 13px; font-weight: 500; }
h2 .tag { vertical-align: middle; margin-left: 6px; }

/* Piece 2b */
.hidden-default { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
label.unit { max-width: 200px; }
.upload-steps { padding-left: 20px; }
.upload-steps li { margin-bottom: 6px; }
input[type=file] { display: block; margin-top: 4px; }

/* A problem explained next to the field it belongs to. */
.field-error { color: #c0271b; font-size: 13px; font-weight: 600; margin: -4px 0 12px; }
input.bad { border-color: #c0271b; background: #fdf3f2; }
input[readonly] { background: #f1f3f7; }
.section-save { margin: 2px 0 20px; }
.part { border-top: 3px solid #2f55d4; margin: 30px 0 6px; padding-top: 16px; }
.part h2 { font-size: 20px; margin: 0 0 4px; }
.part + h3 { margin-top: 10px; }
/* Screens lists: tabs, sortable headings and sites that open to show their screens. */
.tabs { display: flex; gap: 6px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 16px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: #2f55d4; }
th a.sort { color: inherit; text-decoration: none; }
th a.sort:hover { text-decoration: underline; }
details.site { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 0 14px; background: #fff; }
details.site[open] { padding-bottom: 12px; }
details.site summary { cursor: pointer; padding: 13px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
details.site summary .site-no { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--muted); }
details.site summary .site-count { margin-left: auto; font-weight: 600; white-space: nowrap; }
.fixbox { border: 1px solid #b6e2cb; background: #e9f7f0; border-radius: 10px; padding: 14px 16px 4px; margin: 12px 0 16px; }
.good-news { color: #0b5c3b; background: #e9f7f0; border: 1px solid #b6e2cb; border-radius: 8px; padding: 10px 14px; font-weight: 600; }
.heads-up { color: #6b4a00; background: #fff6e0; border: 1px solid #f0d998; border-radius: 8px; padding: 10px 14px; }
label.careful { flex-basis: 100%; background: #fff6e0; border: 1px solid #f0d998; border-radius: 8px; padding: 10px 14px; color: #6b4a00; }
.deletebar { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 6px; }
.deletebar label.tick { margin-bottom: 6px; }
/* Photos of a screen, and the gallery of screens. */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.photos figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.photos img { display: block; width: 100%; height: 110px; object-fit: cover; }
.photos figcaption { padding: 6px 8px; font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 34px; }
.photos figcaption form { display: flex; gap: 10px; margin: 0; }
.photos button.link, .shot button.link { color: #2f55d4; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shot { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.shot-photo { position: relative; display: block; height: 140px; background: #eef1f6; text-decoration: none; }
.shot-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.shot-state { position: absolute; top: 8px; left: 8px; }
.shot-count { position: absolute; bottom: 8px; right: 8px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.shot-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.shot-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); }
.shot-body .muted { font-size: 13px; }
.shot-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.shot-actions .btn, .shot-actions button { padding: 6px 12px; font-size: 13px; }
.video-box { border: 0; border-radius: 12px; padding: 14px; width: min(860px, 94vw); }
.video-box::backdrop { background: rgba(15, 20, 35, .6); }
.video-box form { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.video-frame { position: relative; padding-top: 56.25%; background: #000; border-radius: 8px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Screen page: what is filled and what is left. */
.meter { height: 8px; background: #edf0f5; border-radius: 999px; overflow: hidden; margin: 4px 0 12px; }
.meter span { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.check-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; border-top: 3px solid #e0a23a; }
.check-group.all { border-top-color: var(--ok); }
.check-group.extra { border-top-color: #cfd6e2; }
.check-group h3 { margin: 0 0 6px; font-size: 14px; }
.check-group h3 a { color: var(--ink); text-decoration: none; }
.check-group ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.check-group li { padding: 2px 0 2px 20px; position: relative; }
.check-group li::before { position: absolute; left: 0; font-weight: 700; }
.check-group li.yes { color: var(--muted); }
.check-group li.yes::before { content: "\2713"; color: var(--ok); }
.check-group li.no::before { content: "\2717"; color: var(--bad); }
.check-group li.opt::before { content: "\2013"; color: var(--muted); }
.check-group li .tag { font-size: 11px; padding: 0 6px; }
h3[id], .card[id] { scroll-margin-top: 12px; }

/* Map with a pin for latitude and longitude. */
.pinmap { height: 340px; border: 1px solid var(--line); border-radius: 8px; margin: 4px 0 8px; background: #edf0f5; z-index: 0; }
.pinmap.off { height: auto; padding: 12px 14px; color: var(--muted); font-size: 13px; }
.pin-changed { color: var(--warn); font-size: 13px; font-weight: 600; }
.pin-out { font-size: 13px; margin: 0 0 6px; }
.fixlist { margin: 0; padding-left: 16px; font-size: 13px; color: var(--muted); }
.fixlist li { padding: 1px 0; }

/* Bulk upload check: fixed columns, a count that opens into the list, and a row editor. */
.checktable { table-layout: fixed; width: 100%; }
.checktable td, .checktable th { overflow-wrap: anywhere; }
.checktable tr:target > td { background: #f3f7ff; }
details.left summary { cursor: pointer; list-style: none; }
details.left summary::-webkit-details-marker { display: none; }
details.left summary .tag::after { content: " \25BE"; }
details.left[open] summary .tag::after { content: " \25B4"; }
details.left .fixlist { margin-top: 6px; }
.btn.small, button.small { padding: 4px 10px; font-size: 13px; }
tr.rowedit > td { background: #f8fafc; border-left: 3px solid var(--brand); padding: 14px 16px; }
tr.rowedit h3 { margin: 0 0 6px; }
tr.rowedit h4 { margin: 10px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
details.other-way { margin-top: 10px; }
details.other-way summary { cursor: pointer; color: var(--muted); font-size: 13px; }
select.locked { pointer-events: none; background: #f1f3f7; color: var(--muted); }

/* An attention note that is not an error (rule 9: amber, not red). */
.note-amber { color: var(--warn); background: #fff7e6; border-left: 3px solid var(--warn); padding: 6px 10px; margin: 8px 0; font-size: 14px; }
.tag.info { background: #e8eefc; color: var(--brand-dark); }

/* Time bands: four short rows, fixed columns. */
table.bands { width: 100%; max-width: 860px; table-layout: fixed; margin: 6px 0 10px; }
table.bands th:nth-child(1), table.bands td:nth-child(1) { width: 28%; }
table.bands th:nth-child(2), table.bands td:nth-child(2), table.bands th:nth-child(3), table.bands td:nth-child(3) { width: 25%; }
table.bands select { min-width: 9.5em; }
table.bands input, table.bands select { width: 100%; }
table.bands td.num { text-align: center; }
table.bands th:nth-child(n+3) { text-align: center; }
ul.plain { list-style: none; padding: 0; margin: 6px 0; }
ul.plain li { padding: 2px 0; }
table.bands.bands-wide { max-width: 980px; }
table.bands.bands-wide th:nth-child(1), table.bands.bands-wide td:nth-child(1) { width: 20%; }
table.bands.bands-wide th:nth-child(2), table.bands.bands-wide td:nth-child(2) { width: 34%; }
table.bands.bands-wide th:nth-child(3), table.bands.bands-wide td:nth-child(3),
table.bands.bands-wide th:nth-child(4), table.bands.bands-wide td:nth-child(4) { width: 23%; }

/* Revenue potential. */
table.pot { width: 100%; max-width: 720px; table-layout: fixed; margin: 6px 0 8px; }
table.pot td.num, table.pot th:nth-child(n+2) { text-align: center; }
.note-green { color: var(--ok); background: #eaf7f0; border-left: 3px solid var(--ok); padding: 6px 10px; margin: 8px 0; font-size: 14px; }
details.pot-box summary { cursor: pointer; padding: 2px 0; }
table.bands.bands-edit-wide { max-width: 980px; }
table.bands.bands-edit-wide th:nth-child(1), table.bands.bands-edit-wide td:nth-child(1) { width: 24%; }
table.bands.bands-edit-wide th:nth-child(2), table.bands.bands-edit-wide td:nth-child(2),
table.bands.bands-edit-wide th:nth-child(3), table.bands.bands-edit-wide td:nth-child(3) { width: 20%; }

/* Sites as a table; a row opens to show its screens. */
table.sites-table { width: 100%; }
table.sites-table > thead th { vertical-align: bottom; }
table.sites-table > thead th.num { text-align: center; }
table.sites-table > thead th:nth-child(1) { width: 32%; }
.table-scroll { overflow-x: auto; }
tr.site-row td.site-cell .sc { display: flex; gap: 6px; }
tr.site-row td.site-cell .mono { font-size: 12px; }
tr.site-row td.nowrap { white-space: nowrap; }
tr.site-row > td { vertical-align: top; }
tr.site-row > td.nowrap, tr.site-row > td.city { white-space: nowrap; }
tr.site-row .tag { white-space: nowrap; display: inline-block; margin: 0 4px 4px 0; }
tr.site-row .addr { font-size: 13px; }
table.sites-table > tbody > tr.site-row > td.num { text-align: center; }
tr.site-row { cursor: pointer; }
tr.site-row:hover, tr.site-row:focus { background: #f6f8fc; outline: none; }
tr.site-row .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--muted); }
tr.site-row .caret { display: inline-block; width: 1em; color: var(--brand); }
tr.site-screens > td { background: #fafbfd; padding: 8px 12px 12px; }
tr.site-screens table { margin: 0; }

/* Buyers and discounts */
input.pct { display: inline-block; width: 70px; margin: 0 4px 0 0; text-align: center; }
input.pct::placeholder { color: #a7b0bf; }
table.terms th.num, table.terms td.num { text-align: center; }
table.terms td { vertical-align: middle; }
table.terms td.num { white-space: nowrap; }
table.levels { margin-bottom: 16px; }
table.preview td { vertical-align: top; }
div.pv-band { margin-bottom: 6px; }
table.terms .tag { white-space: nowrap; }
.cpm-guide { background: #f4f7ff; border-left: 3px solid var(--brand); padding: 10px 12px; border-radius: 6px; font-size: 14px; }

/* Media plan picker */
.plan-map { height: 380px; border-radius: 10px; border: 1px solid var(--line); margin: 6px 0 8px; background: #eef2f7; }
.plan-map.off { height: auto; padding: 14px; color: var(--muted); }
.map-key .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin: 0 4px 0 10px; vertical-align: -1px; border: 2px solid #fff; box-shadow: 0 0 0 1px #c9d2e0; }
.map-key .dot:first-child { margin-left: 0; }
.dot-free { background: #2f5bea; } .dot-in { background: #1e8e5a; } .dot-ticked { background: #e67e22; }
table.plan-list td { vertical-align: top; }
table.plan-list tr.in-plan { background: #f3faf6; }
.filters label { min-width: 150px; }
.plan-head .stats { margin: 12px 0 6px; }
.plan-head .stat strong { font-size: 20px; }

/* Media plan: brief and summary pane */
.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.plan-side { position: sticky; top: 12px; }
.plan-side .summary h2 { margin-top: 0; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.sum-row strong { text-align: right; }
.sum-row.big strong { font-size: 20px; }
.sum-row.left strong { color: #1e8e5a; }
.sum-row.over strong { color: #c0271b; }
.sum-row .muted, .small { font-size: 12px; }
.summary hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.brief h3 { margin: 18px 0 8px; }
.brief .ticks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-bottom: 10px; }
.brief .ticks > strong { min-width: 140px; font-size: 14px; }
.brief .pair { display: flex; gap: 6px; margin-top: 4px; }
.brief .pair input { margin-top: 0; }
.brief .pair select { width: auto; margin-top: 0; }
dl.brief-sum { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 14px; }
dl.brief-sum dt { color: var(--muted); }
dl.brief-sum dd { margin: 0; }
@media (max-width: 1000px) {
  .plan-layout { grid-template-columns: minmax(0, 1fr); }
  .plan-side { position: static; order: -1; }
}

/* Media plan brief, DV360-style rows */
.brief h3.dv-head { margin: 22px 0 8px; font-size: 15px; }
.dv-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dv-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; padding: 14px 16px; border-top: 1px solid var(--line); }
.dv-row:first-child { border-top: 0; }
.dv-label strong { display: block; font-size: 14px; color: var(--ink); }
.dv-label .muted { display: block; font-size: 12px; margin-top: 3px; line-height: 1.4; }
.dv-body > label, .dv-body .grid label { margin-bottom: 4px; }
.dv-body input.short, .dv-body input[name=t_min_viewers] { max-width: 160px; }
.dv-body select[name=ad_seconds] { max-width: 160px; margin-top: 0; }
.dv-body .pair { max-width: 260px; }
.pick-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
label.pick-card { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border: 1px solid #cfd6e2; border-radius: 8px; cursor: pointer; color: var(--ink); }
label.pick-card input { margin-top: 3px; }
label.pick-card strong { display: block; font-size: 14px; }
label.pick-card .muted { display: block; font-size: 12px; line-height: 1.4; margin-top: 2px; }
label.pick-card:has(input:checked) { border-color: var(--brand); background: #f1f5ff; }
.seg { display: inline-flex; border: 1px solid #cfd6e2; border-radius: 7px; overflow: hidden; }
.seg label { margin: 0; padding: 8px 14px; color: var(--ink); font-size: 14px; cursor: pointer; border-left: 1px solid #cfd6e2; display: flex; gap: 6px; align-items: center; }
.seg label:first-child { border-left: 0; }
.seg label:has(input:checked) { background: #f1f5ff; color: var(--brand); font-weight: 600; }
@media (max-width: 700px) {
  .dv-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* Media plan brief, round 3 */
.pick-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row.tight { gap: 12px; margin-bottom: 0; align-items: flex-end; }
.row.tight label { min-width: 160px; margin-bottom: 0; }
label.inline { display: flex; align-items: center; gap: 8px; color: var(--ink); max-width: 320px; }
label.inline select { margin-top: 0; }
.bad { color: var(--bad); }
/* Targeting picker, Ad Manager style */
.tp { display: grid; grid-template-columns: 170px minmax(0, 1fr) 230px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-height: 320px; }
.tp-dims { border-right: 1px solid var(--line); padding: 6px 0; }
button.tp-dim { display: flex; justify-content: space-between; width: 100%; text-align: left; background: none; border: 0; border-radius: 0; color: var(--ink); font-weight: 400; font-size: 14px; padding: 10px 14px; }
button.tp-dim::after { content: "›"; color: var(--muted); }
button.tp-dim:hover { background: #f5f7fa; }
button.tp-dim.on { background: #eef3ff; color: var(--brand); font-weight: 600; }
.tp-panes { min-width: 0; }
.tp-pane { display: none; }
.tp-pane.on { display: block; }
.tp-pane > p, .tp-pane > label { margin: 12px 14px; }
.tp-tools { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tp-tools input { flex: 1; margin: 0; padding: 7px 9px; font: inherit; border: 1px solid #cfd6e2; border-radius: 6px; min-width: 0; }
.tp-tools button.link, .tp-sum button.link, .split button.link, .period-add button.link { color: var(--brand); white-space: nowrap; font-size: 13px; }
.tp-list { max-height: 300px; overflow-y: auto; padding: 4px 0; }
.tp-list label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 14px; color: var(--ink); font-size: 14px; cursor: pointer; }
.tp-list label:hover { background: #f5f7fa; }
.tp-list label em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }
.tp-list label.zero span, .tp-list label.zero em { color: #9aa3b2; }
.tp-sum { border-left: 1px solid var(--line); background: #fafbfd; border-radius: 0 8px 8px 0; display: flex; flex-direction: column; }
.tp-sum-head { padding: 10px 14px; font-weight: 600; color: var(--brand); border-bottom: 1px solid var(--line); font-size: 14px; }
.tp-sum [data-tp-sum] { padding: 6px 14px; flex: 1; overflow-y: auto; max-height: 300px; }
.tp-sum-dim { font-size: 13px; padding: 6px 0; border-bottom: 1px solid #eef0f4; }
.tp-sum-dim:last-child { border-bottom: 0; }
.tp-sum-dim ul { list-style: none; margin: 4px 0 0; padding: 0; }
.tp-sum-dim li { display: flex; justify-content: space-between; gap: 6px; color: #1e8e5a; padding: 2px 0; }
.tp-sum-dim li button.link { color: var(--muted); font-size: 15px; line-height: 1; }
.tp-fit { padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.tp-fit strong { font-size: 18px; color: var(--ink); }
/* Day and time periods, Ad Manager style */
.when .seg { margin-bottom: 12px; }
.periods { margin-bottom: 6px; }
.period { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; background: #f5f7fa; border-radius: 8px; padding: 12px; margin-bottom: 8px; }
.period label { margin: 0; }
.period select { margin-top: 4px; width: 150px; }
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
label.day { margin: 0; cursor: pointer; }
label.day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.day span { display: inline-block; padding: 7px 11px; border: 1px solid #cfd6e2; border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; }
label.day input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
label.day input:focus-visible + span { outline: 2px solid #b9cbff; }
.period button.remove { margin-left: auto; font-size: 22px; line-height: 1; color: var(--muted); align-self: center; }
.period-add { align-items: center; gap: 8px; margin: 4px 0 6px; }
.when-text { font-weight: 600; margin: 6px 0 0; font-size: 14px; }
/* Budget split */
table.split-table { width: auto; min-width: 360px; margin-top: 10px; }
table.split-table td, table.split-table th { padding: 6px 10px; }
table.split-table input { margin: 0; width: 160px; padding: 7px 9px; text-align: right; }
/* Summary pane sections */
.sum-sec { margin: 14px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; border-top: 1px solid var(--line); padding-top: 10px; }
.summary h2 + .sum-sec { border-top: 0; padding-top: 0; margin-top: 0; }
dl.sum-dl { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 5px 10px; margin: 4px 0 8px; font-size: 13px; }
dl.sum-dl dt { color: var(--muted); }
dl.sum-dl dd { margin: 0; overflow-wrap: anywhere; }
table.sum-table { font-size: 12px; margin: 4px 0 6px; }
table.sum-table th, table.sum-table td { padding: 4px 4px; }
table.sum-table th { font-size: 10px; }
table.sum-table td.num, table.sum-table th.num { text-align: right; }
.sum-row.fit { border-top: 1px solid var(--line); padding-top: 8px; }
.plan-main { container-type: inline-size; }
@container (max-width: 640px) {
  .tp { grid-template-columns: minmax(0, 1fr); }
  .tp-dims { display: flex; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  button.tp-dim { width: auto; }
  button.tp-dim::after { content: ""; }
  .tp-sum { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
  .pick-cards.three, .grid.three { grid-template-columns: minmax(0, 1fr); }
}

/* Hide or show the side menu */
.brand { display: flex; justify-content: space-between; align-items: center; }
button.side-hide { background: none; border: 0; color: #9aa6bd; font-size: 18px; padding: 0 4px; font-weight: 400; line-height: 1; }
button.side-hide:hover { background: none; color: #fff; }
button.side-show { display: none; position: fixed; top: 10px; left: 10px; z-index: 40; background: #111a2e; border-color: #111a2e; font-size: 13px; padding: 6px 10px; }
html.side-off .side { display: none; }
html.side-off button.side-show { display: inline-block; }
html.side-off .main { padding-top: 52px; }
.main.wide { max-width: none; }
@media (max-width: 760px) { button.side-hide, button.side-show { display: none !important; } html.side-off .side { display: flex; } html.side-off .main { padding-top: 20px; } }

/* Plan workspace (DV360 / Ad Manager style) */
.pw-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.pw-title h1 { margin: 2px 0 0; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.pw-title .tag { font-size: 12px; }
.pw-title > .muted { font-size: 14px; padding-bottom: 10px; }
.pw-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.pw-tabs a, .pw-tabs span.off { padding: 10px 14px; font-size: 14px; text-decoration: none; color: var(--ink); border-bottom: 3px solid transparent; }
.pw-tabs a:hover { background: #eef3ff; }
.pw-tabs a.on { border-bottom-color: var(--brand); color: var(--brand); font-weight: 600; }
.pw-tabs span.off { color: #9aa3b2; }
.pw-tabs .count { background: #e8eefc; color: var(--brand); border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
.pw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; align-items: center; }
a.chip-l { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border: 1px solid var(--line); background: #fff; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 13px; }
a.chip-l i { font-style: normal; font-size: 12px; }
a.chip-l:hover { border-color: var(--brand); }
a.chip-edit { font-size: 13px; padding: 5px 8px; }
.pw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; min-width: 0; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi strong { font-size: 22px; line-height: 1.3; }
.kpi em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.bad strong { color: #c0271b; }
.kpi.good strong { color: #1e8e5a; }
.pw-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.pw-body .card { margin-bottom: 0; }
.inv { padding: 0; overflow: hidden; }
.inv-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.inv-head h2 { margin: 0 0 8px; font-size: 17px; }
.inv-head h2 .muted { font-weight: 400; font-size: 14px; }
.funnel { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fchip { display: inline-flex; gap: 6px; align-items: center; background: #f1f4f9; border-radius: 6px; padding: 3px 8px; font-size: 12px; }
.fchip b { color: #c0271b; font-weight: 600; }
.fchip.none b { color: var(--muted); font-weight: 400; }
.fchip.ignored { background: #fff6e5; }
.fchip a { color: var(--brand); }
.inv-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inv-tools input[type=search] { flex: 1 1 240px; min-width: 0; padding: 8px 10px; font: inherit; border: 1px solid #cfd6e2; border-radius: 7px; }
.inv-tools input, .inv-tools select { margin: 0; width: auto; }
.inv-tools .w-sm { width: 130px; }
.map-box { border-bottom: 1px solid var(--line); }
.map-box summary { padding: 8px 16px; cursor: pointer; font-size: 14px; font-weight: 600; }
.map-box .plan-map { height: 260px; margin: 0; border-radius: 0; }
.map-box .map-key { padding: 4px 16px 8px; margin: 0; }
.inv-scroll { overflow-x: auto; }
table.inv-table { table-layout: fixed; width: 100%; min-width: 640px; font-size: 14px; }
table.inv-table col.c-cb { width: 34px; }
table.inv-table col.c-site { width: auto; }
table.inv-table col.c-owner { width: 130px; }
table.inv-table col.c-type { width: 130px; }
table.inv-table col.c-num { width: 82px; }
table.inv-table col.c-add { width: 44px; }
table.inv-table th { font-size: 11px; padding: 8px 8px; background: #fafbfd; position: sticky; top: 0; }
table.inv-table td { padding: 6px 8px; vertical-align: middle; }
table.inv-table td.num, table.inv-table th.num { text-align: right; }
td.ell, div.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.ell .site, div.ell .site { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
td.ell .sub, div.ell .sub { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--muted); }
table.inv-table tr:hover td { background: #f7f9fc; }
table.inv-table tr.in-plan td { background: #f1faf5; }
td.add { text-align: center; }
button.plus { width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 18px; line-height: 1; background: #fff; color: var(--brand); border: 1px solid #b9cbff; }
button.plus:hover { background: var(--brand); color: #fff; }
td.add .in { color: #1e8e5a; font-weight: 700; }
.inv-foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; position: sticky; bottom: 0; background: #fff; }
.inv-note { padding: 0 16px 12px; margin: 8px 0 0; }
.empty { padding: 24px 16px; color: var(--muted); }
.sel { position: sticky; top: 12px; padding: 14px 16px; max-height: calc(100vh - 24px); overflow-y: auto; }
.sel h2 { margin: 0 0 8px; font-size: 17px; }
ul.sel-list { list-style: none; margin: 0 0 10px; padding: 0; }
ul.sel-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef0f4; }
ul.sel-list li .ell { flex: 1; min-width: 0; }
ul.sel-list .price { font-size: 13px; color: var(--muted); }
button.x { background: none; border: 0; color: var(--muted); font-size: 20px; padding: 0 4px; line-height: 1; font-weight: 400; }
button.x:hover { background: none; color: var(--bad); }
.warn-t { color: var(--warn); font-weight: 600; }
.sel-break { display: grid; gap: 6px; font-size: 13px; margin-bottom: 10px; }
.sel-break strong { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.sel-break span { display: inline-block; margin: 2px 10px 0 0; }
.sel-split strong { font-size: 12px; color: var(--muted); }
.pw-body .plan-map { height: 260px; }
.inv { container-type: inline-size; }
@container (max-width: 720px) {
  table.inv-table { min-width: 0; table-layout: auto; }
  table.inv-table col { width: auto !important; }
  table.inv-table .h-owner, table.inv-table .h-type, table.inv-table .h-cpm { display: none; }
  table.inv-table td:nth-child(2) { width: 100%; max-width: 0; }
  table.inv-table td.num, table.inv-table th.num { white-space: nowrap; }
}
@media (max-width: 1100px) {
  .pw-body { grid-template-columns: minmax(0, 1fr); }
  .sel { position: static; max-height: none; }
}

/* Compact figures bar (click for the cards) */
details.kpi-box { margin-bottom: 12px; }
summary.kpi-bar { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 14px; font-weight: 600; }
summary.kpi-bar::-webkit-details-marker { display: none; }
summary.kpi-bar em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; margin-right: 2px; }
summary.kpi-bar .bad { color: #c0271b; }
summary.kpi-bar .good { color: #1e8e5a; }
summary.kpi-bar b.more { margin-left: auto; font-weight: 400; color: var(--brand); font-size: 12px; }
summary.kpi-bar b.more::after { content: "Show details ▾"; }
details.kpi-box[open] summary.kpi-bar b.more::after { content: "Hide details ▴"; }
details.kpi-box[open] summary.kpi-bar { border-radius: 10px 10px 0 0; }
details.kpi-box .pw-kpis { margin: 8px 0 0; }

/* Screen picker, DV360 "Placements" style */
.pk { padding: 0; overflow: hidden; }
.pk-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 460px; }
.pk-left { border-right: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; }
.pk-right { min-width: 0; display: flex; flex-direction: column; }
.pk-top { padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.pk-title { margin-bottom: 8px; font-size: 15px; }
.pk-title .muted { font-size: 13px; margin-left: 6px; }
.pk-sub { padding: 12px 16px 6px; color: var(--muted); font-size: 14px; }
ul.pk-cats { list-style: none; margin: 0; padding: 0; }
ul.pk-cats li a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
ul.pk-cats li a:hover { background: #f5f7fa; }
ul.pk-cats li a span { flex: 1; min-width: 0; }
ul.pk-cats li a strong { display: block; font-weight: 500; font-size: 15px; }
ul.pk-cats li a em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
ul.pk-cats li a b { color: var(--muted); font-weight: 400; font-size: 18px; }
.sel-n { color: #1e8e5a; font-weight: 600; }
.pk-crumb { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fafbfd; font-size: 14px; flex-wrap: wrap; }
.pk-crumb > a:first-child { font-size: 18px; text-decoration: none; line-height: 1; }
.pk-crumb .pk-sort { margin: 0 0 0 auto; width: auto; padding: 5px 8px; font-size: 13px; }
.pk-map { height: 260px; margin: 0; border-radius: 0; border-width: 0 0 1px; }
.pk-left .map-key { padding: 4px 16px; margin: 0; }
.pk-listhead { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.pk-listhead label.tick { margin: 0; font-size: 13px; }
ul.pk-list { list-style: none; margin: 0; padding: 0; }
ul.pk-list li { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid #eef0f4; }
ul.pk-list li:hover { background: #f7f9fc; }
ul.pk-list li.in { background: #f1faf5; }
ul.pk-list .cb { width: 18px; flex: none; }
ul.pk-list .ell { flex: 1; min-width: 0; }
img.thumb, span.thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; background: #eef1f6; }
span.thumb.none { display: inline-flex; align-items: center; justify-content: center; color: #b5bdcb; font-size: 18px; }
ul.pk-list .fig { text-align: right; flex: none; width: 70px; }
ul.pk-list .fig b { display: block; font-size: 14px; }
ul.pk-list .fig em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
ul.pk-list .act { width: 30px; flex: none; text-align: center; }
.ok-t { color: #1e8e5a; font-weight: 700; }
.pk-selhead { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
details.clear-all summary { list-style: none; color: var(--brand); cursor: pointer; font-size: 14px; }
details.clear-all summary::-webkit-details-marker { display: none; }
details.clear-all[open] { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
details.clear-all form { display: flex; gap: 8px; align-items: center; }
button.small-btn { padding: 4px 10px; font-size: 13px; }
.pk-include { padding: 9px 16px; background: #f1f3f6; font-size: 13px; font-weight: 600; color: #1e8e5a; border-bottom: 1px solid var(--line); }
details.pk-group > summary { padding: 10px 16px; cursor: pointer; font-size: 14px; border-bottom: 1px solid #eef0f4; }
ul.pk-list.sel li { padding-left: 28px; }
ul.pk-list.sel button.x { font-size: 22px; }
.pk-right .sel-split { padding: 10px 16px; }
.pk-right .sel-split strong { font-size: 12px; color: var(--muted); }
.pk-right .note-amber { margin: 10px 16px; }
.pk-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 10px 16px; border-top: 1px solid var(--line); background: #fafbfd; }
details.pk-multi summary { cursor: pointer; color: var(--ink); font-size: 14px; }
details.pk-multi[open] { flex-basis: 100%; }
details.pk-multi form { margin-top: 8px; }
details.pk-multi textarea { display: block; width: 100%; margin-top: 4px; padding: 8px; font: 13px/1.4 ui-monospace, Menlo, monospace; border: 1px solid #cfd6e2; border-radius: 7px; }
a.pk-dl { font-size: 14px; color: var(--ink); text-decoration: none; }
a.pk-dl:hover { color: var(--brand); }
.pk-foot .muted { margin-left: auto; }
.pk .empty { padding: 20px 16px; }
@media (max-width: 900px) {
  .pk-cols { grid-template-columns: minmax(0, 1fr); }
  .pk-left { border-right: 0; border-bottom: 1px solid var(--line); }
}
ul.pk-list span.ell { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
ul.pk-list span.ell .site { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
ul.pk-list span.ell .sub { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--muted); }

/* Forecast strip, DV360 style */
.fc { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.fc-head { padding: 12px 16px; font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; border-bottom: 1px solid var(--line); }
.fc-head b { font-weight: 700; }
.fc-tag { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--brand); background: #eef3ff; padding: 3px 8px; border-radius: 4px; }
.fc-types { display: inline-flex; gap: 6px; }
.fc-metrics { display: flex; overflow-x: auto; }
.fm { flex: 1 0 140px; padding: 12px 16px; border-right: 1px solid #eef0f4; min-width: 140px; }
.fm:last-child { border-right: 0; }
.fm span { display: inline-block; font-size: 12px; color: var(--muted); border-bottom: 1px dotted #b5bdcb; margin-bottom: 4px; }
.fm strong { display: block; font-size: 26px; line-height: 1.2; font-weight: 500; }
.fm em { display: block; font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.fm.bad strong { color: #c0271b; }
.fm.good strong { color: #1e8e5a; }
.bt { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.bt-slot { background: #e8eefc; color: #1f4fd8; }
.bt-spot { background: #fff1e0; color: #a15c00; }
.bt-cpm { background: #e7f6ee; color: #0f7b4f; }
.as-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; }
.seg.as-seg a { display: inline-block; padding: 6px 14px; color: var(--ink); text-decoration: none; font-size: 14px; border-left: 1px solid #cfd6e2; }
.seg.as-seg a:first-child { border-left: 0; }
.seg.as-seg a.on { background: var(--brand); color: #fff; font-weight: 600; }
li.pk-subhead { padding: 10px 16px 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; background: #fafbfd; border-bottom: 1px solid var(--line); }
ul.pk-cats li.out > div { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
ul.pk-cats li.out > div > span { flex: 1; min-width: 0; }
ul.pk-cats li.out strong { display: block; font-weight: 500; color: #6b7385; }
ul.pk-cats li.out em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
ul.pk-cats li.out .tag { font-size: 11px; }
details.pk-group > summary { display: flex; align-items: center; gap: 8px; }
details.pk-group .g-sum { margin-left: auto; font-size: 13px; color: var(--muted); }
ul.pk-list.sel .fig { width: 64px; }
button.sw { background: #fff; color: var(--brand); border: 1px solid #b9cbff; font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
button.sw:hover { background: #eef3ff; }
ul.pk-cats li.out a.small { display: inline; border: 0; padding: 0; color: var(--brand); white-space: nowrap; font-size: 13px; }
ul.pk-cats li.out a.small:hover { background: none; text-decoration: underline; }
.plan-busy [data-live=right], .plan-busy [data-live=fc] { opacity: .55; transition: opacity .15s; }
.plan-busy { cursor: progress; }
.pk-left ul.pk-list li { cursor: pointer; }
ul.pk-list .cb input { width: 18px; height: 18px; cursor: pointer; }
.fc-metrics { flex-wrap: wrap; }
.fm { flex: 1 0 150px; border-bottom: 1px solid #eef0f4; }

/* Plan: lines and prices (step 2b) */
.ln-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 1150px) { .ln-wrap { grid-template-columns: 1fr; } }
.ln-points ul.plain { margin: 0; padding: 0; list-style: none; }
.ln-points ul.plain li { padding: 4px 0; }
table.lines-table { width: 100%; min-width: 880px; table-layout: fixed; }
table.lines-table.no-mk { min-width: 640px; }
table.lines-table th, table.lines-table td { vertical-align: top; padding: 8px; }
table.lines-table td.num, table.lines-table th.num { text-align: center; }
table.lines-table th:nth-child(1) { width: 19%; }
table.lines-table th:nth-child(2) { width: 13%; }
table.lines-table th:last-child { width: 62px; }
table.lines-table .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; }
table.lines-table span.small { padding: 0; font-size: 12.5px; }
tr.ln-site > td { background: #f1f4f9; border-top: 2px solid var(--line); }
tr.ln-row:target > td { background: #fff9e6; }
table.lines-table tfoot td { border-top: 2px solid var(--line); background: #fafbfd; }
details.ln-sm { display: inline-block; margin-left: 10px; font-size: 13px; }
details.ln-sm summary { cursor: pointer; color: var(--brand); }
details.ln-sm[open] { display: block; margin: 8px 0 2px; }
.ln-mk { align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ln-mk label { margin: 0; }
.ln-mk select { width: auto; }
input.pct.wide { width: 140px; }
.ln-edit { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
@media (max-width: 950px) { .ln-edit { grid-template-columns: 1fr; } }
.ln-edit span.small { padding: 0; }
.ln-chain { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.ln-chain ul.plain, .ln-money ul.plain { margin: 6px 0; padding: 0; list-style: none; }
.ln-chain ul.plain li, .ln-money ul.plain li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ln-chain ul.plain li b, .ln-money ul.plain li b { white-space: nowrap; font-weight: 500; }
.ln-chain ul.plain li.tot, .ln-money ul.plain li.tot, .ln-chain ul.plain li.tot b, .ln-money ul.plain li.tot b { font-weight: 700; }
.ln-money em { font-style: normal; padding: 0; }
table.lines-table td.num { white-space: nowrap; }
.ln-edit .grid label span.small { display: block; }
.ln-chain [hidden] { display: none !important; }
.ln-chain i { font-style: normal; }
.ln-chain.live { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(31,79,216,.12); }
.ln-chain .note-amber { margin: 8px 0; }
.ln-livenote { margin: 8px 0 0; padding: 0; color: var(--warn); }
table.lines-table th:nth-child(1) { width: 34px; }
table.lines-table th:nth-child(2) { width: 19%; }
table.lines-table th:nth-child(3) { width: 13%; }
table.lines-table td.ln-cb, table.lines-table th.ln-cb { text-align: center; padding-left: 4px; padding-right: 4px; }
table.lines-table input[type=checkbox], tr.ln-site input[type=checkbox] { width: 16px; height: 16px; margin: 0; vertical-align: middle; }
tr.ln-row.ticked > td { background: #f2f6ff; }
.ln-tip { margin: 0 0 8px; padding: 0; }
.ln-bulk { border: 1px solid var(--brand); background: #f5f8ff; border-radius: 8px; padding: 12px 14px; margin: 0 0 12px; position: sticky; top: 0; z-index: 5; }
.ln-bulk[hidden] { display: none; }
.ln-bulk .row { margin-top: 8px; }
.ln-bulk p.small { padding: 0; margin: 8px 0 0; }
.ln-bulk-prev { margin-top: 10px; font-weight: 600; }
.ln-bulk-prev.changed { color: var(--brand-dark); }
tr.ln-row.pending > td { background: #fffbe8; }
.ln-money.live, .fc.live { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(31,79,216,.12); }
.ln-money[data-money].live::after, .fc.live::after { content: "Not saved yet. These are the figures after your change."; display: block; color: var(--warn); font-size: 12.5px; margin-top: 6px; }
.fc.live::after { padding: 0 16px 10px; }
/* Screen picker: one buy type at a time */
.seg.as-seg a b { font-weight: 600; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #eef1f6; font-size: 12px; }
.seg.as-seg a.on b { background: rgba(255,255,255,.28); }
.seg.as-seg a.as-slot.on { background: #1f4fd8; }
.seg.as-seg a.as-spot.on { background: #c26a00; }
.seg.as-seg a.as-cpm.on { background: #0f7b4f; }
ul.pk-list .fig.wide { width: 140px; }
ul.pk-list .fig small { font-weight: 400; font-size: 11px; color: var(--muted); }
.pk-other { font-style: normal; margin-left: 6px; }
.pk-other[hidden] { display: none; }
details.pk-group-slot > summary { border-left: 4px solid #1f4fd8; }
details.pk-group-spot > summary { border-left: 4px solid #e08a1e; }
details.pk-group-cpm > summary { border-left: 4px solid #0f7b4f; }
ul.pk-list li.none { padding: 10px 16px; font-size: 13px; }
.pk-include { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pk-save { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; bottom: 0; background: #fff; }
.pk-save .small { padding: 0; flex: 1 1 200px; }
dialog.pk-confirm { border: 0; border-radius: 12px; padding: 22px 24px; width: min(460px, 92vw); box-shadow: 0 20px 60px rgba(16,24,40,.3); color: var(--ink); }
dialog.pk-confirm::backdrop { background: rgba(16,24,40,.45); }
dialog.pk-confirm ul.plain { list-style: none; margin: 10px 0; padding: 0; }
dialog.pk-confirm ul.plain li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
dialog.pk-confirm ul.plain li.tot { font-weight: 700; }
dialog.pk-confirm ul.pk-confirm-notes li { display: block; border: 0; padding: 3px 0; font-size: 14px; }
dialog.pk-confirm .small { padding: 0; }
.pk-confirm-act { display: flex; gap: 10px; margin: 16px 0 0; }
.pk-save { position: static; border-top: 0; }
.pk-savetop { border-bottom: 1px solid var(--line); }
.pk-savetop:empty, .pk-savebot:empty { display: none; }
.pk-savebot { border-top: 1px solid var(--line); }
.ln-mk label.ln-all { flex: 1 1 100%; margin-top: 6px; font-size: 13.5px; }
#markup .note-green { margin: 10px 0 0; }
.fm strong { white-space: nowrap; font-size: clamp(20px, 2vw, 30px); }
.fm em { display: block; white-space: normal; }
.fm em.pt::before { content: "\2022  "; }
.ln-filter { align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.ln-filter label { margin: 0; }
.ln-filter select { width: auto; }
.ln-filter input[type=search] { width: 260px; padding: 8px 10px; font: inherit; border: 1px solid #cfd6e2; border-radius: 7px; }
.ln-filter .small { padding: 0 0 8px; }
.ln-sum { margin: 10px 0 0; font-weight: 600; color: var(--brand-dark); }
/* Screen lines: one card per buy type, DV360 style */
.ln-card { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.ln-card[hidden] { display: none; }
.ln-card-slot { border-left: 4px solid #1f4fd8; }
.ln-card-spot { border-left: 4px solid #e08a1e; }
.ln-card-cpm { border-left: 4px solid #0f7b4f; }
.ln-card > .dv-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 16px; border: 0; }
@media (max-width: 1100px) { .ln-card > .dv-row { grid-template-columns: 1fr; } }
.ln-card .dv-label > * { display: block; margin: 0 0 6px; }
.ln-card .dv-label .muted { font-size: 13px; }
.ln-card .dv-label .bt { font-size: 14px; padding: 3px 12px; }
.ln-card .dv-body { min-width: 0; }
.ln-card .empty { margin: 0; }
.ln-scroll { max-height: 720px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.ln-scroll table.lines-table { margin: 0; border-collapse: separate; border-spacing: 0; }
.ln-scroll table.lines-table thead th { position: sticky; top: 0; z-index: 2; background: #f7f9fc; box-shadow: 0 1px 0 var(--line); }
.ln-scroll table.lines-table tfoot td { position: sticky; bottom: 0; z-index: 2; background: #f1f4f9; border-top: 0; box-shadow: 0 -2px 0 var(--line); }
.ln-scroll table.lines-table td.ln-screen strong { font-weight: 600; }
/* Screen lines cards: heading row on top, folds, own Find and Sort */
details.ln-card { display: block; padding: 0; }
summary.ln-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 12px 16px; cursor: pointer; list-style: none; font-size: 14.5px; background: #fafbfd; }
summary.ln-card-head::-webkit-details-marker { display: none; }
summary.ln-card-head .bt { font-size: 14px; padding: 3px 12px; }
summary.ln-card-head .muted { font-size: 13px; }
.ln-card-sum { margin-left: auto; font-size: 14px; }
.ln-card-fold::after { content: "Open \25BE"; font-size: 13px; color: var(--brand); font-weight: 600; }
details.ln-card[open] .ln-card-fold::after { content: "Fold \25B4"; }
details.ln-card[open] > summary.ln-card-head { border-bottom: 1px solid var(--line); }
.ln-card-body { padding: 12px 16px 16px; }
.ln-card-tools { align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.ln-card-tools label { margin: 0; }
.ln-card-tools select { width: auto; }
.ln-card-tools input[type=search] { width: 300px; max-width: 100%; padding: 8px 10px; font: inherit; border: 1px solid #cfd6e2; border-radius: 7px; }
.ln-card-tools .small { padding: 0 0 8px; }
.ln-scroll table.lines-table { table-layout: auto; min-width: 1040px; }
.ln-scroll table.lines-table td.ln-screen { min-width: 230px; white-space: normal; }
.ln-scroll table.lines-table th { white-space: nowrap; }
.ln-scroll table.lines-table td.num { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.ln-scroll table.lines-table .mono { word-break: normal; white-space: nowrap; }
.ln-scroll { overscroll-behavior: contain; }
.ln-scroll table.lines-table thead th { top: 0; z-index: 3; }
.ln-scroll table.lines-table { min-width: 1120px; }
/* Screen lines: compact, so every column and Edit fit; Edit stays in view */
.ln-scroll table.lines-table { min-width: 0; width: 100%; font-size: 13px; }
.ln-scroll table.lines-table th { font-size: 11px; letter-spacing: .03em; padding: 8px 6px; white-space: normal; line-height: 1.25; }
.ln-scroll table.lines-table td { padding: 7px 6px; }
.ln-scroll table.lines-table td.num { padding-left: 6px; padding-right: 6px; }
.ln-scroll table.lines-table td.ln-screen { min-width: 170px; }
.ln-scroll table.lines-table td.ln-screen strong { font-size: 13.5px; }
.ln-scroll table.lines-table .small, .ln-scroll table.lines-table span.small { font-size: 11.5px; }
.ln-scroll table.lines-table .mono { font-size: 11px; white-space: normal; word-break: break-all; }
.ln-scroll table.lines-table .bt { font-size: 11px; padding: 1px 7px; }
.ln-scroll table.lines-table .tag { font-size: 10.5px; padding: 1px 6px; }
.ln-scroll table.lines-table th:last-child, .ln-scroll table.lines-table td.ln-act, .ln-scroll table.lines-table tfoot td:last-child { position: sticky; right: 0; width: 54px; }
.ln-scroll table.lines-table td.ln-act { background: #fff; box-shadow: -1px 0 0 var(--line); z-index: 1; text-align: center; }
.ln-scroll table.lines-table tr.ticked td.ln-act { background: #f2f6ff; }
.ln-scroll table.lines-table tr.pending td.ln-act { background: #fffbe8; }
.ln-scroll table.lines-table thead th:last-child { z-index: 4; }
.ln-scroll table.lines-table tfoot td:last-child { z-index: 3; }
.ln-scroll table.lines-table td.ln-act .btn { padding: 3px 9px; font-size: 12px; }
.ln-warn { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; border: 1px solid #f0c36d; background: #fff8e6; color: #7a4a00; font-size: 14px; position: sticky; top: 0; z-index: 6; }
.ln-warn[hidden] { display: none; }
.ln-warn.bad-box { border-color: #f1a9a0; background: #fdecea; color: #8a1c13; font-weight: 600; }
.ln-livenote.bad { color: var(--bad); font-weight: 600; }
/* Find and Sort in the card's heading row */
summary.ln-card-head .ln-card-tools { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; flex-wrap: nowrap; cursor: default; }
summary.ln-card-head .ln-card-tools input[type=search] { width: 270px; padding: 6px 10px; font-size: 13.5px; margin: 0; }
summary.ln-card-head .ln-card-tools select { width: auto; padding: 6px 8px; font-size: 13.5px; margin: 0; }
summary.ln-card-head .ln-card-sum { margin-left: 6px; }
details.ln-card:not([open]) .ln-card-tools { display: none; }
details.ln-card:not([open]) .ln-card-sum { margin-left: auto; }
.ln-shown { margin: 0 0 8px; padding: 0; }
.ln-shown:empty { display: none; }
@media (max-width: 1250px) { summary.ln-card-head .muted { display: none; } }
summary.ln-card-head a.ln-add { margin-left: 6px; white-space: nowrap; }
details.ln-card:not([open]) a.ln-add { margin-left: 6px; }
.ln-edit-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ln-edit-act .ln-rm-one { margin-left: auto; }
.ln-bulk button.danger { margin-left: 8px; }
dialog.pk-confirm .note-amber { margin: 8px 0; }

/* Media plan, step 4: the proposal as the client sees it */
.prop-wrap { max-width: 1040px; }
.prop-tools ul.points { margin: 0 0 10px; padding-left: 20px; }
.prop-tools .note-amber { background: #fff7e6; border: 1px solid #f3d9a4; border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.prop-seller { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.prop-seller summary { cursor: pointer; font-weight: 600; }
.prop-seller-form { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; align-items: flex-start; }
.prop-seller-logo { width: 180px; min-height: 90px; border: 1px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 10px; background: #fff; }
.prop-seller-logo img { max-width: 100%; max-height: 110px; }
.prop-nologo { color: var(--muted); font-size: 13px; }
.prop-seller-fields { flex: 1 1 320px; display: flex; flex-direction: column; gap: 10px; }
.prop-seller-fields textarea { width: 100%; }
.prop-seller-fields button { align-self: flex-start; }
.prop { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgba(16,24,40,.08); padding: 34px 38px; margin-top: 16px; }
.prop-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 18px; }
.prop-brand { flex: 1 1 320px; max-width: 560px; }
.prop-brand img { max-height: 70px; max-width: 240px; display: block; }
.prop-name { font-size: 26px; }
.prop-brand p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.prop-meta { text-align: right; }
.prop-kind { font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.prop-meta dl { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 8px 0 0; font-size: 14px; justify-content: end; }
.prop-meta dt { color: var(--muted); }
.prop-meta dd { margin: 0; font-weight: 600; }
.prop-title { margin: 22px 0 4px; }
.prop-title h2 { font-size: 24px; margin: 0; }
.prop-title p { margin: 2px 0 0; color: var(--muted); }
.prop-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 16px 0; }
.prop-facts div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.prop-facts span { display: block; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
.prop-facts b { display: block; margin-top: 2px; }
.prop-facts em { color: var(--muted); font-style: normal; font-size: 13px; }
.prop-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 8px; }
.prop-tiles div { background: #f5f7fa; border-radius: 10px; padding: 14px 16px; text-align: center; }
.prop-tiles b { display: block; font-size: 24px; white-space: nowrap; }
.prop-tiles span { color: var(--muted); font-size: 13px; }
.prop-tiles .prop-tile-total { background: #eaf0ff; }
.prop-tiles .prop-tile-total b { color: var(--brand-dark); }
.prop-sec { margin-top: 24px; }
.prop-sec h3 { margin: 0 0 10px; font-size: 16px; }
.prop-map { height: 340px; border-radius: 10px; border: 1px solid var(--line); }
.prop-scroll { overflow-x: auto; }
.prop-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prop-table th, .prop-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: top; }
.prop-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); border-bottom: 2px solid var(--line); white-space: nowrap; }
.prop-table .l { text-align: left; }
.prop-table td:last-child, .prop-table th:last-child { text-align: right; white-space: nowrap; }
.prop-table tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--line); background: #fafbfd; }
.prop-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 18px; margin-top: 22px; padding: 16px 18px; background: var(--ink); color: #fff; border-radius: 10px; }
.prop-total b { font-size: 24px; white-space: nowrap; }
.prop-foot { margin-top: 14px; color: var(--muted); font-size: 13px; }
.prop-foot p { margin: 0; }
@media (max-width: 700px) { .prop { padding: 20px 16px; } .prop-meta { text-align: left; } .prop-meta dl { justify-content: start; } }

/* Plan steps: a white bar with the current step filled in, so the steps stand out from the page */
.pw-tabs { background: #fff; border: 1px solid #cfd6e4; border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.pw-tabs a, .pw-tabs span.off { border-bottom: 0; border-radius: 7px; padding: 9px 16px; font-size: 14.5px; font-weight: 600; }
.pw-tabs a { color: var(--ink); }
.pw-tabs a:hover { background: #eef3ff; }
.pw-tabs a.on { background: var(--brand); color: #fff; }
.pw-tabs a.on .count { background: rgba(255,255,255,.25); color: #fff; }
.pw-tabs span.off { color: #8a94a6; font-weight: 500; }
.ln-save-top { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }

.prop-tiles div { text-align: left; }
.prop-tiles .pt-h { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.prop-tiles em { display: block; font-style: normal; color: var(--muted); font-size: 13px; }
.prop-tiles em.pt::before { content: "\2022  "; }

.prop-pin { background: none; border: 0; filter: drop-shadow(0 2px 3px rgba(16,24,40,.35)); cursor: pointer; }
.prop-pop { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.prop-pop img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; margin-bottom: 4px; }
.prop-pop strong { font-size: 14.5px; }
.prop-pop-ad { color: var(--muted); }
.prop-pop ul { margin: 4px 0; padding-left: 16px; }
.prop-sec h3 .small { font-weight: 400; margin-left: 6px; }

.prop-cities { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }

.prop-opts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.prop-opts label.tick { margin: 0; font-weight: 600; }
.prop-media-open { font-size: 13px; padding: 0; margin-top: 3px; text-align: left; }
dialog.prop-media { border: 0; border-radius: 12px; padding: 16px 18px; width: min(860px, 94vw); box-shadow: 0 20px 60px rgba(16,24,40,.35); color: var(--ink); }
dialog.prop-media::backdrop { background: rgba(16,24,40,.6); }
dialog.prop-media > form { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.pm-seg { margin-bottom: 10px; }
.pm-seg button { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 5px 14px; }
.pm-seg button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pm-stage { display: flex; align-items: center; gap: 8px; background: #0f1524; border-radius: 10px; padding: 6px; }
.pm-stage img { flex: 1; min-width: 0; max-height: 62vh; object-fit: contain; border-radius: 6px; }
.pm-nav { flex: none; background: rgba(255,255,255,.14); color: #fff; border: 0; font-size: 26px; line-height: 1; padding: 10px 12px; border-radius: 8px; }
.pm-nav:hover { background: rgba(255,255,255,.3); }
.pm-count { margin: 6px 0; padding: 0; text-align: center; }
.pm-thumbs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.pm-thumbs img { height: 58px; width: 86px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: .6; border: 2px solid transparent; flex: none; }
.pm-thumbs img.on { opacity: 1; border-color: var(--brand); }
dialog.prop-media .video-frame { position: relative; padding-top: 56.25%; background: #000; border-radius: 10px; overflow: hidden; }
dialog.prop-media .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

dialog.prop-media [hidden] { display: none !important; }

/* Reach: overall and by buy type, with the cost for each person reached */
.ln-reach ul.plain li > span em, .ln-reach ul.plain li > b em { display: block; font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.ln-reach ul.plain li > b { text-align: right; white-space: nowrap; }
.ln-reach h2 .tag { font-size: 11px; vertical-align: middle; }
.prop-reach tr.prop-reach-all td { background: #f5f7fa; }
.prop-reach td:last-child { text-align: center; }
.prop-reach th:last-child { text-align: center; }
.prop-reach-note { margin: 8px 0 0; }

.fc-reach { border-top: 1px solid var(--line); background: #fafbfd; }
.fc-reach .fm { flex: 1 0 150px; }

.prop-seller-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); margin: 12px 0 0; padding-top: 10px; }
.prop-seller-line img { max-height: 34px; max-width: 120px; }
.prop-seller-line > span { flex: 1 1 260px; }

/* Proposal as a PDF: only the document, on A4 */
.prop-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.prop-print-photo { display: none; }
@page { size: A4; margin: 13mm 12mm; }
@media print {
  html, body { background: #fff !important; }
  body { font-size: 12px; }
  .side, .side-show, .flash, .pw-head, .pw-chips, .fc, .prop-tools, .prop-send, .prop-bar, .prop-staff, .prop-cities, .prop-media-open, dialog, .leaflet-control-container { display: none !important; }
  .shell { display: block; min-height: 0; }
  .main, .main.wide { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .pw, .prop-wrap { max-width: none; margin: 0; padding: 0; }
  .prop { border: 0; box-shadow: none; border-radius: 0; padding: 0; margin: 0; }
  .prop, .prop * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .prop-head { padding-bottom: 12px; }
  .prop-brand img { max-height: 56px; }
  .prop-title { margin-top: 14px; }
  .prop-title h2 { font-size: 20px; }
  .prop-facts, .prop-tiles { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .prop-facts div, .prop-tiles div { padding: 8px 10px; break-inside: avoid; }
  .prop-tiles b { font-size: 17px; }
  .prop-sec { margin-top: 16px; }
  .prop-sec h3 { break-after: avoid; font-size: 14px; }
  .prop-sec h3 .small { display: none; }
  .prop-map { break-inside: avoid; }
  .prop-scroll { overflow: visible; }
  .prop-table { font-size: 11px; }
  .prop-table th { font-size: 9.5px; }
  .prop-table th, .prop-table td { padding: 5px 6px; }
  .prop-table tr { break-inside: avoid; }
  .prop-table thead { display: table-header-group; }
  .prop-table tfoot { display: table-row-group; }
  .prop-print-photo { display: block; float: left; width: 46px; height: 32px; object-fit: cover; border-radius: 3px; margin: 0 7px 2px 0; }
  .prop-total { break-inside: avoid; margin-top: 14px; padding: 10px 14px; }
  .prop-total b { font-size: 18px; }
  .prop-foot { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

.prop-reach td, .prop-reach th { white-space: nowrap; }
.prop-reach td.l { white-space: normal; }

/* Proposal: client links (planner) and the client's own page */
.prop-send h2 .small { font-weight: 400; margin-left: 6px; }
.prop-make { border-top: 0; margin-top: 0; padding-top: 0; }
.prop-make label { margin: 0; display: flex; gap: 8px; align-items: center; }
.prop-make select { width: auto; }
.prop-link { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.prop-link-active { border-left: 4px solid var(--brand); }
.prop-link-accepted { border-left: 4px solid var(--ok); }
.prop-link-expired, .prop-link-stopped { background: #fafbfd; }
.prop-link-head { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.prop-link-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.prop-link-row > span { width: 96px; color: var(--muted); font-size: 13px; }
.prop-link-row input[type=text] { flex: 1 1 280px; min-width: 0; font-size: 13px; }
.prop-code { font: 700 18px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 3px; background: #f1f4f9; padding: 7px 10px; border-radius: 6px; }
.prop-link-facts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 6px 28px; flex-wrap: wrap; }
.prop-link-facts li { display: flex; gap: 8px; }
.prop-link-facts li span { color: var(--muted); }
.prop-link .note-amber, .prop-link .note-green { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; }
.prop-link .note-amber { background: #fff7e6; border: 1px solid #f3d9a4; }
.prop-link-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.prop-link-act form { margin: 0; }
body.prop-public { background: var(--bg); }
.prop-gate { max-width: 440px; margin: 8vh auto; padding: 0 16px; }
.prop-gate h1 { font-size: 22px; margin: 0 0 8px; }
.prop-gate form { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 10px; }
.prop-code-in { font: 700 22px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 6px; text-transform: uppercase; text-align: center; }
.prop-bar { position: sticky; top: 0; z-index: 1100; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px; display: flex; gap: 10px 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; box-shadow: 0 1px 4px rgba(16,24,40,.06); }
.prop-bar-l { display: flex; flex-direction: column; }
.prop-bar-r { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.prop-accepted { font-size: 13px; padding: 6px 10px; }
.prop-public-wrap { margin: 0 auto; padding: 16px; }
.prop-staff { background: #eef3ff; border-radius: 8px; padding: 8px 12px; margin: 0 0 4px; }

/* The map on paper: a picture of the map as it is on screen, as wide as the page */
canvas.prop-map-print { display: none; }
@media print {
  .prop-map:has(+ canvas.prop-map-print) { display: none !important; }
  canvas.prop-map-print { display: block; width: 100%; height: auto; border-radius: 8px; break-inside: avoid; }
  .prop { padding: 0 3mm; }
}

.prop-row-links { display: flex; gap: 4px 14px; flex-wrap: wrap; margin-top: 3px; font-size: 13px; }
.prop-row-links a { text-decoration: none; }
.prop-row-links a:hover { text-decoration: underline; }
.prop-row-links .prop-media-open { margin-top: 0; }
.prop-print-link { display: none; }
@media print {
  .prop-row-links { font-size: 10px; gap: 2px 10px; clear: none; }
  .prop-row-links a { color: #1f4fd8 !important; text-decoration: underline !important; }
  .prop-print-link { display: inline; }
}

.prop-older { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.prop-older summary { cursor: pointer; color: var(--muted); }
.prop-older ul.plain { list-style: none; margin: 8px 0 0; padding: 0; }
.prop-older li { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.prop-older li form { margin: 0; }

.prop-bar { padding-left: max(16px, calc((100% - 1040px) / 2 + 16px)); padding-right: max(16px, calc((100% - 1040px) / 2 + 16px)); }

/* Bookings */
.bk-wrap { max-width: 1240px; }
.bk-wrap ul.points { margin: 0 0 10px; padding-left: 20px; }
.bk-wrap .note-amber, .bk-wrap .note-green { border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.bk-wrap .note-amber { background: #fff7e6; border: 1px solid #f3d9a4; }
.bk-wrap .note-green { background: #eaf7f0; border: 1px solid #bfe3cf; color: #0f5f3e; }
.bk-save { position: static; border-top: 0; padding-left: 0; }
.bk-wrap h2 .tag { font-size: 12px; margin-left: 8px; vertical-align: middle; }
.bk-table td:last-child, .bk-table th:last-child { text-align: left; white-space: normal; }
.bk-table td { vertical-align: top; }
dialog.bk-confirm { width: min(520px, 94vw); }

.bk-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.bk-actions:empty { display: none; }
.bk-switch select { width: auto; max-width: 100%; }
dialog.pk-confirm label { display: block; margin: 10px 0; }
dialog.pk-confirm input[type=text] { width: 100%; }

/* Screen picker: what is still free on the plan's dates and hours */
.fig em.av { font-weight: 600; font-style: normal; }
.fig em.av-ok { color: var(--ok); }
.fig em.av-low { color: var(--warn); }
.fig em.av-full { color: var(--bad); }
.fig em.av-sub { font-size: 12px; }
.pk-hidefull { display: flex; gap: 6px 14px; align-items: center; flex-wrap: wrap; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.pk-hidefull label.tick { margin: 0; }

/* Screen picker columns: total inventory, available (left list), planned (selected pane) */
ul.pk-list .inv-col, .pk-colhead .inv-col { flex: none; width: 92px; text-align: right; }
ul.pk-list .inv-col b { display: block; font-size: 14px; }
ul.pk-list .inv-col b small { font-weight: 400; font-size: 11px; color: var(--muted); }
ul.pk-list .inv-col em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
ul.pk-list .inv-col.av-ok b { color: var(--ok); }
ul.pk-list .inv-col.av-low b { color: var(--warn); }
ul.pk-list .inv-col.av-full b { color: var(--bad); }
ul.pk-list .inv-col em.mine { color: var(--brand); }
.pk-colhead { gap: 10px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.pk-colhead label.tick { flex: 1; min-width: 0; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 400; }
.pk-colhead .fig.wide { flex: none; width: 140px; text-align: right; text-transform: none; letter-spacing: 0; font-weight: 400; }
ul.pk-list.sel .inv-col { width: 96px; }
ul.pk-list li.sel-head { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; padding-top: 6px; padding-bottom: 6px; background: #fafbfd; cursor: default; }
ul.pk-list li.sel-head .ell { padding-left: 52px; }
ul.pk-list li.sel-head .fig { text-align: right; }
ul.pk-list.sel li.sel-head::after { content: ""; width: 66px; flex: none; }

/* Spots: free spots an hour per time band (peak, off-peak ...) */
ul.pk-list .inv-col .bands-av { display: block; margin-top: 3px; }
ul.pk-list .inv-col em.band { display: flex; justify-content: flex-end; gap: 4px; font-size: 11.5px; white-space: nowrap; }
ul.pk-list .inv-col em.band span { overflow: hidden; text-overflow: ellipsis; max-width: 62px; color: var(--muted); }
ul.pk-list .inv-col em.band b { display: inline; font-size: 11.5px; }
ul.pk-list .inv-col em.band.av-ok b { color: var(--ok); }
ul.pk-list .inv-col em.band.av-low b { color: var(--warn); }
ul.pk-list .inv-col em.band.av-full b { color: var(--bad); }
ul.pk-list .inv-col.av-ok em.band b { color: inherit; }
/* Screen picker: the two panes can be resized, and either can be folded away */
.pk-cols.pk-resizable { grid-template-columns: minmax(0, var(--pk-left, 50%)) 12px minmax(0, 1fr); }
.pk-split { position: relative; background: #f1f3f6; border-left: 1px solid var(--line); border-right: 1px solid var(--line); cursor: col-resize; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 10px; user-select: none; touch-action: none; }
.pk-split:hover, .pk-split.drag { background: #e3e9f6; }
.pk-split::before { content: ""; position: absolute; top: 50%; left: 4px; width: 2px; height: 34px; margin-top: -17px; border-left: 1px solid #9aa6bd; border-right: 1px solid #9aa6bd; }
.pk-split button { width: 22px; height: 26px; padding: 0; border-radius: 6px; font-size: 13px; line-height: 1; background: #fff; color: var(--ink); border: 1px solid #cfd6e4; position: relative; z-index: 1; cursor: pointer; margin-left: -6px; margin-right: -6px; }
.pk-split button:hover { background: #eef3ff; color: var(--brand); }
.pk-cols.pk-resizable .pk-left { border-right: 0; }
.pk-cols.pk-fold-left .pk-left, .pk-cols.pk-fold-right .pk-right { display: none; }
.pk-cols.pk-fold-left { grid-template-columns: 0 12px minmax(0, 1fr); }
.pk-cols.pk-fold-right { grid-template-columns: minmax(0, 1fr) 12px 0; }
.pk-fold-tab { display: none; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; font-weight: 600; color: var(--brand); background: #fff; border: 1px solid #cfd6e4; border-radius: 6px; padding: 8px 2px; margin: 6px -8px 0; cursor: pointer; position: relative; z-index: 1; }
.pk-cols.pk-fold-left .pk-fold-tab.l, .pk-cols.pk-fold-right .pk-fold-tab.r { display: block; }
body.pk-dragging { cursor: col-resize; user-select: none; }
@media (max-width: 900px) { .pk-split { display: none; } .pk-cols.pk-resizable, .pk-cols.pk-fold-left, .pk-cols.pk-fold-right { grid-template-columns: minmax(0, 1fr); } .pk-cols.pk-fold-left .pk-left, .pk-cols.pk-fold-right .pk-right { display: flex; } }

/* Fold buttons always in sight: they ride down the bar as the page scrolls */
.pk-cols.pk-resizable { grid-template-columns: minmax(0, var(--pk-left, 50%)) 20px minmax(0, 1fr); }
.pk-cols.pk-fold-left { grid-template-columns: 0 20px minmax(0, 1fr); }
.pk-cols.pk-fold-right { grid-template-columns: minmax(0, 1fr) 20px 0; }
.pk-split { padding-top: 0; }
.pk-split::before { display: none; }
.pk-split-btns { position: sticky; top: 38vh; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; }
.pk-split button { width: 30px; height: 34px; margin: 0 -6px; font-size: 14px; color: #fff; background: var(--brand); border: 0; box-shadow: 0 2px 6px rgba(16,24,40,.25); }
.pk-split button:hover { background: var(--brand-dark); color: #fff; }
.pk-cols.pk-fold-left .pk-split button, .pk-cols.pk-fold-right .pk-split button { display: none; }
.pk-fold-tab { margin: 0 -10px; padding: 10px 4px; color: #fff; background: var(--brand); border: 0; box-shadow: 0 2px 6px rgba(16,24,40,.25); }

/* clip, not hidden: hidden would stop the fold buttons riding down the bar */
.pk { overflow: clip; }

/* A folded pane keeps its place in the grid (display: none would let the other pane slide into
   the narrow column); it is only emptied and hidden */
.pk-cols.pk-fold-left .pk-left, .pk-cols.pk-fold-right .pk-right { display: flex; visibility: hidden; overflow: hidden; height: 0; min-height: 0; border: 0; padding: 0; }
@media (max-width: 900px) { .pk-cols.pk-fold-left .pk-left, .pk-cols.pk-fold-right .pk-right { visibility: visible; overflow: visible; height: auto; } }

/* Screen picker: ready-made filters */
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff; }
a.pk-chip { display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; border: 1px solid #cfd6e4; border-radius: 999px; font-size: 13px; color: var(--ink); text-decoration: none; background: #fff; white-space: nowrap; }
a.pk-chip b { font-weight: 600; font-size: 12px; color: var(--muted); }
a.pk-chip:hover { border-color: var(--brand); color: var(--brand); }
a.pk-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
a.pk-chip.on b { color: #dfe7ff; }
a.pk-chip.none { opacity: .5; }
.chip-gap { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
a.pk-chip-clear { font-size: 13px; margin-left: 6px; }

/* Figures strip: both rows on the same 7-column grid, one-line labels, so every number lines up */
.fc-metrics { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: visible; }
.fc-metrics .fm { min-width: 0; border-right: 1px solid #eef0f4; padding: 12px 14px; }
.fc-metrics .fm:nth-child(7n) { border-right: 0; }
.fc-metrics .fm[hidden] { display: none; }
.fm span { display: block; width: max-content; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm strong { font-size: clamp(18px, 1.75vw, 28px); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1150px) { .fc-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } .fc-metrics .fm:nth-child(7n) { border-right: 1px solid #eef0f4; } }
@media (max-width: 640px) { .fc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Quick filters sit under the search box */
.pk-top .pk-chips { padding: 8px 0 10px; border-bottom: 0; background: none; }
.chips-lead { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; margin-right: 4px; }

/* Ready-made searches: a list beside the Search button */
.inv-tools select.pk-quick { width: auto; max-width: 260px; flex: none; }
.pk-quick-none { margin: 8px 0 0; padding: 8px 12px; background: #fff7e6; border: 1px solid #f3d9a4; border-radius: 8px; }

/* Agency and client rates */
.rate-grid tr.rate-all td { background: #f1f4fb; }
details.card > summary { cursor: pointer; font-size: 1.05rem; }
details.card[open] > summary { margin-bottom: .75rem; }

.rt-agency { border-left: 4px solid #1f4fd8; }
.rt-client { border-left: 4px solid #e08a1e; }
.rt-platform { border-left: 4px solid #7a3fd1; }
.rt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 12px; }
.rt-top p { margin: 0; max-width: 820px; }
.rt-top button { flex: none; }
@media (max-width: 760px) { .rt-top { flex-direction: column; } }
.rt-scroll { max-height: 560px; }
.rt-scroll table.rt-table { min-width: 0; width: 100%; }
.rt-scroll table.rt-table td, .rt-scroll table.rt-table th { padding: 8px 10px; }
.rt-scroll table.rt-table td.num { padding-left: 10px; padding-right: 10px; }
.rt-table input.pct { width: 70px; }
.rt-limits { margin: 12px 0 0; }
summary.ln-card-head input[type=search] { width: 240px; max-width: 100%; padding: 6px 10px; font: inherit; font-size: 13px; border: 1px solid #cfd6e2; border-radius: 7px; }
summary.ln-card-head select { width: auto; padding: 6px 8px; font-size: 13px; }
.rt-card .bk-rm { display: inline-block; margin-left: 6px; }
details#add.card:not([open]) { display: none; }
.rt-table .tag { white-space: nowrap; }
.rt-owner { border-left: 4px solid #0f7b4f; }
.rt-all { border-left: 4px solid #5b6474; }
.rt-tags .tag { white-space: nowrap; margin: 0 4px 4px 0; display: inline-block; }
.rt-acts { white-space: nowrap; text-align: right; }
.rt-acts .btn { margin: 2px 0 2px 4px; }
@media (max-width: 900px) { .rt-acts { white-space: normal; } }
.rt-scroll { max-height: calc(100vh - 230px); min-height: 240px; }
.rt-table td:first-child { min-width: 240px; }
.rt-ptabs { display: inline-flex; gap: 2px; background: #eef1f7; border-radius: 8px; padding: 3px; }
.rt-ptab { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; font: inherit; font-size: 13.5px; font-weight: 600; color: #4a5568; cursor: pointer; }
.rt-ptab.on { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.rt-panel[hidden] { display: none; }
.rt-mx th.rt-who, .rt-mx td.rt-who { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 220px; }
.rt-mx thead th.rt-who { z-index: 4; background: #f7f9fc; }
.rt-mx tr.rate-all td { background: #f1f4fb; }
.rt-mx tr.rate-all td.rt-who { background: #f1f4fb; }
.rt-mx tr[data-rt-row] td.rt-who { padding-left: 22px; }
.rt-mx input[data-role="fill"] { border-style: dashed; }
.rt-mx td.num { white-space: nowrap; }
.sr-table td.sr-cell { vertical-align: top; min-width: 150px; }
.sr-in { display: inline-flex; align-items: center; gap: 3px; }
.sr-in input.sr-v { width: 82px; }
.sr-in select.sr-u { width: auto; padding: 4px 2px; font-size: 12px; }
.sr-pay { display: block; margin-top: 3px; text-align: right; }
.sr-table td.sr-def, .sr-table th.sr-def { background: #f1f4fb; }
.sr-table td.sr-cell.own input.sr-v { border-color: var(--brand); font-weight: 600; }
.sr-table tr.sr-city td { background: #e9edf5; font-size: 12.5px; padding: 6px 10px; }
.sr-table tr.sr-city td.rt-who { background: #e9edf5; }
.sr-pay.sr-bad { color: #c62828; font-weight: 600; }
.one-table td.sr-cell { vertical-align: top; min-width: 190px; }
.one-rate { display: block; margin-bottom: 3px; }
.rt-switch { display: flex; gap: 8px; margin: 0 0 14px; }
.rt-switch .btn.on { background: var(--brand); color: #fff; border-color: var(--brand); cursor: default; }
.rt-onlyown { display: inline-flex; margin: 0 0 10px; }
.rt-table .rt-acts, .rt-table td.nowrap .btn { white-space: nowrap; }
.one-table td.one-act, .one-table th.one-act { position: sticky; right: 0; background: #fff; width: 90px; text-align: center; vertical-align: middle; box-shadow: -1px 0 0 var(--line); }
.one-table thead th.one-act { background: #f7f9fc; z-index: 3; }
.one-msg { display: block; margin-top: 4px; }
.one-ok { color: #0f7b4f; font-weight: 600; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.pr-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.pr-chip span { color: #6b7280; margin-left: 3px; }
.pr-chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pr-chip.on span { color: #dbe4ff; }
.pr-chip-soon { border-color: #e0a32e; }
.pr-table tr.pr-soon td { background: #fff8e8; }
.pr-earlier { margin-top: 4px; }
.pr-earlier ul { margin: 4px 0 0; }
.bk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 10px 14px; margin: 0 0 10px; background: #eef3ff; border: 1px solid #c9d7fb; border-radius: 8px; position: sticky; top: 0; z-index: 5; }
.bk-bar .tick { margin: 0; }
.bk-table th.bk-tick, .bk-table td.bk-tick { width: 34px; text-align: center; }
.bk-table tr.bk-on td { background: #f3f7ff; }
.bk-table tr.bk-l-declined td, .bk-table tr.bk-l-expired td { color: #8a93a3; }
.bk-table tr.bk-l-declined td .tag, .bk-table tr.bk-l-declined td strong { color: inherit; }
.bk-more { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.bk-more > summary { cursor: pointer; color: #6b7280; font-size: 13px; }
.bk-more[open] > summary { margin-right: 6px; }
.bk-more button.danger-t { color: #b42318; border-color: #f0c5c0; }
.bk-bar button { min-width: 110px; }
.bk-bar .bk-cancel-btn { background: #fff; color: #b42318; border: 1px solid #e8a39b; }
.bk-bar .bk-cancel-btn:not(:disabled):hover { background: #fdecea; }
.bk-bar button:disabled { opacity: .45; cursor: not-allowed; }
.bk-table tr.bk-act-row td { background: #f3f7ff; padding: 6px 12px 12px 54px; text-align: left; border-top: 0; }
.bk-table tr.bk-act-row button { margin-right: 8px; min-width: 110px; }
.bk-table tr.bk-act-row .bk-cancel-btn { background: #fff; color: #b42318; border: 1px solid #e8a39b; }
.bk-table tr.bk-on td { border-bottom-color: transparent; }
.bk-bar [hidden] { display: none !important; }

/* Emails (19 Nov 2026) */
.em-form { max-width: 560px; }
.em-form input[type=email], .em-form input[type=text], .em-form input[type=password], .em-form select { width: 100%; }
.prop-mail { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; }
.prop-mail input[type=email] { min-width: 220px; }
.prop-mail input[type=text] { min-width: 160px; }
.prop-mail .muted { flex-basis: 100%; }


/* Plan Booking tab: tick and submit some lines (20 Nov 2026) */
.bk-tick { width: 32px; text-align: center; }
.bkp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; padding: 8px 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; }
.bkp-bar [hidden] { display: none !important; }
tr.bkp-row td { text-align: left; }
tr.bkp-row td > * { margin-right: 8px; }


/* Creatives (Stage 3, 20 Nov 2026) */
.cr-form { max-width: 560px; }
.cr-form input[type=text] { width: 100%; }
.cr-progress { height: 8px; background: #eef2f7; border-radius: 4px; overflow: hidden; margin: 6px 0; }
.cr-progress span { display: block; height: 100%; width: 0; background: #1f4fd1; transition: width .2s; }
.cr-bad { color: #b42318; }
.cr-good { color: #067647; }
.cr-adv { margin: 18px 0 8px; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cr-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.cr-thumb { background: #0f172a; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.cr-thumb img, .cr-thumb video { max-width: 100%; max-height: 100%; object-fit: contain; }
.cr-meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

.cr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.cr-chips button.on { background: #1f4fd1; color: #fff; border-color: #1f4fd1; }

/* Delivery and Creatives in Ad Manager style (Stage 3 piece 1b, 20 Nov 2026) */
.dl-nav { margin-top: 2px; }
table.dl-table { width: 100%; border-collapse: collapse; }
table.dl-table th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.dl-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.dl-table td.num, table.dl-table th.num { text-align: right; white-space: nowrap; }
table.dl-table .tag { margin: 0 2px 2px 0; }
.dl-cr { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; }
.dl-thumb { flex: 0 0 72px; width: 72px; height: 44px; background: #101828; border-radius: 6px; overflow: hidden; display: block; }
.dl-thumb img, .dl-thumb video { width: 100%; height: 100%; object-fit: contain; display: block; }
.dl-crs { min-width: 260px; }
.dl-inline { display: inline; margin: 4px 4px 0 0; }
.dl-find { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.dl-find input[type=search] { max-width: 320px; margin: 0; }
.dl-find select { max-width: 240px; margin: 0; }
.dl-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.dl-chips a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 13px; }
.dl-chips a.on { background: #2f55d4; border-color: #2f55d4; color: #fff; }
.dl-link { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.dl-link label { flex: 1 1 320px; max-width: 520px; margin: 0; }
.cr-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 0 0 16px; }
.cr-type { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; color: var(--ink); }
.cr-type span { font-size: 13px; color: var(--muted); }
a.cr-type:hover { border-color: #2f55d4; }
.cr-type.on { border-color: #2f55d4; box-shadow: 0 0 0 2px rgba(47, 85, 212, .18); }
.cr-type.off { opacity: .6; }