/* Back office on top of the portal's base styles: same black chrome and red accent, denser tables and forms. */
body { font-size: 14px; }
main { max-width: 1400px; }
.who { color: var(--chrome-muted); font-size: .8rem; align-self: center; padding: 0 8px; }
@media (max-width: 899px) { .who { display: none; } }
.logout { border: 1px solid #555; background: none; color: var(--on-chrome); font: inherit; font-size: .8rem; padding: 6px 12px; cursor: pointer; min-height: 36px; }
.logout:hover { border-color: #ff3340; }
.catnav a .num-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px;
  background: #e3141f; color: #fff; font-size: .65rem; letter-spacing: 0; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.tabs { display: flex; gap: 20px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a, .tabs button { flex: none; padding: 10px 0; border: 0; background: none; font: inherit; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; cursor: pointer; }
.tabs .active { color: var(--text); border-bottom-color: var(--accent); }
.filters-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters-row .field { margin: 0; min-width: 160px; flex: 1; }
.filters-row .field.narrow { flex: 0 0 auto; min-width: 140px; }

table.data { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.data th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600;
  padding: 10px 8px; border-bottom: 1px solid var(--strong); white-space: nowrap; }
table.data td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data td.r, table.data th.r { text-align: right; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: var(--surface-2); }
table.data tfoot td { font-weight: 700; border-top: 1px solid var(--strong); }
.table-wrap { overflow-x: auto; }

.grid-2 { display: grid; gap: 24px; }
@media (min-width: 1000px) { .grid-2 { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.section { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis .kpi a { text-decoration: none; }
.kpi .value.red { color: var(--accent); }
.status { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.danger, .status.red { color: var(--accent); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.inline-input { width: 90px; min-height: 36px; padding: 4px 8px; }
.thumbs-admin { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs-admin figure { margin: 0; position: relative; width: 96px; }
.thumbs-admin img { width: 96px; aspect-ratio: 3 / 4; object-fit: cover; background: var(--surface-2); }
.thumbs-admin button { position: absolute; top: 4px; right: 4px; }
.banner-admin img { width: 100%; max-width: 360px; aspect-ratio: 16 / 7; object-fit: cover; background: var(--surface-2); }
.stop { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: start; }
.stop .n { width: 28px; height: 28px; border-radius: 50%; background: var(--strong); color: var(--on-strong); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.stop.done .n { background: var(--ok); }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; margin: 0; border: 1px solid var(--border); padding: 6px 10px; cursor: pointer; }
.days input { width: auto; min-height: auto; }
.bar-chart { display: grid; gap: 6px; }
.bar-chart .row-bar { display: grid; grid-template-columns: minmax(90px, 200px) 1fr auto; gap: 10px; align-items: center; font-size: .8rem; }
.bar-chart .track { height: 10px; background: var(--surface-2); }
.bar-chart .fill { height: 100%; background: var(--strong); }
.bar-chart .row-bar:first-child .fill { background: var(--accent); }

dialog { border: 0; padding: 0; width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); background: var(--bg); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, .55); }
dialog form { padding: 24px; }
dialog h2 { margin-bottom: 16px; }
dialog .actions { justify-content: flex-end; margin-top: 8px; }

@media print {
  .site-header, .no-print, .toast { display: none !important; }
  main { padding: 0; max-width: none; }
  body { font-size: 12px; color: #000; background: #fff; }
}
