/* K3 1.0.0 color roles from the Conzenz Admin design baseline. */
:root {
  color-scheme: light;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --canvas: #eeefed;
  --surface: #fafafa;
  --kpi: linear-gradient(126deg, #fff 4%, #fbfbfb 39%, #e9eae7);
  --text: #18191d;
  --muted: #62656d;
  --heading: #243e65;
  --line: #dbdde1;
  --accent: #7600ef;
  --accent-soft: #ece0fb;
  --accent-text: #7200e8;
  --success-bg: #e0f2d9;
  --success-text: #215d24;
  --warning-bg: #fce9c8;
  --warning-text: #7e3909;
  --danger-bg: #fbe0dd;
  --danger-text: #9d251a;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #1c1c1b;
    --surface: #242423;
    --kpi: linear-gradient(125deg, #3d3d3a, #353533 42%, #2a2a28);
    --text: #f1f0ef;
    --muted: #b2b0b0;
    --heading: #c5b1d1;
    --line: #494946;
    --accent: #a94bfa;
    --accent-soft: #423449;
    --accent-text: #d39af4;
    --success-bg: #294b29;
    --success-text: #d0edc7;
    --warning-bg: #594421;
    --warning-text: #ffe2ae;
    --danger-bg: #5d302c;
    --danger-text: #ffdbd5;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--text); }
a { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; transform: translateY(-150%); }
.skip:focus { transform: none; z-index: 3; background: var(--surface); padding: 10px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 65px; padding: 8px clamp(12px, 3vw, 36px);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-size: 1.2rem; font-weight: 750; color: var(--heading); text-decoration: none; }
.identity { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.shell { display: grid; grid-template-columns: minmax(190px, 235px) minmax(0, 1fr); min-height: calc(100dvh - 65px); }
.sidebar { padding: 20px 10px; border-right: 1px solid var(--line); background: var(--surface); }
.sidebar nav { display: grid; gap: 4px; }
.sidebar a { padding: 10px 12px; min-height: 44px; color: var(--text); text-decoration: none; border-radius: 8px; }
.sidebar a:hover, .sidebar [aria-current=page] { background: var(--accent-soft); color: var(--accent-text); }
main { width: 100%; max-width: 1540px; padding: clamp(14px, 3vw, 38px); }
main.standalone { max-width: 520px; margin: 5vh auto; }
h1, h2, h3, p { margin: 0; }
h1 { margin-bottom: 20px; color: var(--heading); font-size: clamp(1.35rem, 3vw, 2rem); text-transform: uppercase; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px;
  padding: clamp(12px, 2vw, 22px); margin-bottom: 16px; min-width: 0;
}
.panel > :not(:first-child) { margin-top: 12px; }
.panel h2 + p { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.between { justify-content: space-between; }
.list-title { display: flex; align-items: baseline; gap: 16px; }
.muted, small { color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); gap: 12px; }
.metric {
  background: var(--kpi); border: 1px solid var(--line); border-radius: 12px;
  min-height: 112px; padding: 14px; color: var(--text); text-decoration: none;
}
a.metric:hover { border-color: var(--accent); }
.metric strong, .metric small { display: block; }
.metric strong { font-size: 1.2rem; margin-block: 4px; color: var(--heading); }
.metric strong.unavailable { font-size: .95rem; color: var(--muted); }
label { display: grid; gap: 4px; }
label.check { display: flex; min-height: 44px; align-items: flex-start; gap: 9px; padding-block: 10px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.field-grid .full { grid-column: 1 / -1; }
input, select, textarea, button, .button { font: inherit; }
input:not([type=checkbox]), select, textarea {
  min-height: 44px; max-width: 100%; min-width: 0; width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface);
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; margin: 3px 0 0; }
textarea { min-height: 100px; resize: vertical; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { border-color: var(--accent); }
button.primary, .button.primary { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); font-weight: 650; }
button.danger { background: var(--danger-bg); color: var(--danger-text); }
button:disabled, .button[aria-disabled=true] { opacity: .65; cursor: default; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 7px; color: var(--heading); background: var(--canvas); font-size: .85rem; }
.badge.success, .notice.success { background: var(--success-bg); color: var(--success-text); }
.badge.warning { background: var(--warning-bg); color: var(--warning-text); }
.badge.danger, .notice.danger { background: var(--danger-bg); color: var(--danger-text); }
.notice { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.filters { align-items: end; }
.filters label { flex: 1 1 145px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 9px 10px; border-block-end: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
th { color: var(--heading); }
th.fit, td.fit { width: 1%; }
tbody tr:has(input:checked) td:first-child { box-shadow: inset 3px 0 var(--accent); }
.empty { padding-block: 24px; color: var(--muted); }
.actions { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.bulk { background: var(--surface); color: var(--text); padding-block: 7px; }
.bulk.bottom { position: sticky; bottom: 0; border-top: 1px solid var(--line); }
.pagination { border-top: 1px solid var(--line); padding-top: 8px; }
.previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.preview { border-radius: 24px; padding: 16px; background: #fff; color: #251f26; border: 1px solid #e2dcd9; }
.preview.dark { background: #26232a; color: #f8f2ef; border-color: #403842; }
.preview > :not(:first-child) { margin-top: 5px; }
.preview img { width: 69px; height: 69px; object-fit: cover; border-radius: 10px; float: right; margin-left: 10px; }
.preview span.cta { display: inline-block; margin-top: 8px; border: 1px solid currentColor; border-radius: 999px; padding: 4px 12px; }
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { padding: 4px 12px; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { display: flex; overflow: auto; }
  .sidebar a { white-space: nowrap; }
  .filters label { flex-basis: 100%; }
  .identity { display: none; }
}
.preview.featured { border-radius: 26px; padding: 22px; }
.preview .campaign-label { font-weight: 700; font-size: 11px; color: #69616b; }
.preview.dark .campaign-label { color: #b9adb9; }
.preview h3 { font-size: 19px; line-height: 1.25; letter-spacing: -.5px; font-weight: 800; }
.preview.featured h3 { font-size: 24px; letter-spacing: -.75px; }
.preview p { font-size: 13px; overflow-wrap: anywhere; }
.preview.featured img { width: 86px; height: 86px; }
summary { cursor: pointer; min-height: 44px; padding-block: 9px; }
fieldset { margin: 12px 0; border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
fieldset > :not(:first-child) { margin-top: 6px; }
form > button:last-child { margin-block-start: 10px; }
