:root {
  color-scheme: dark;
  --bg: #0c0d0f;
  --panel: #141518;
  --line: #292a2f;
  --text: #f0f0f2;
  --accent: #ed394a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.role-hidden { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.dash-topbar { height: 62px; padding: 0 25px; display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); background: #101113; }
.dash-brand { display: flex; align-items: center; gap: 9px; color: #eee; font-size: 14px; font-weight: 800; letter-spacing: .04em; text-decoration: none; white-space: nowrap; }
.dash-brand b { color: #f05a67; }
.brand-mark { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: var(--accent); font-size: 10px; }
.preview-label { padding: 6px 8px; border: 1px solid #52373b; border-radius: 4px; color: #ec8b93; background: #301b1e; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; color: #999ba1; font-size: 11px; }
.topbar-right select { height: 33px; padding: 0 28px 0 10px; border: 1px solid #393a40; border-radius: 5px; outline: none; background: #17181b; font-size: 11px; }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg,#d65c68,#6d2e58); font-size: 12px; font-weight: 700; }
.dashboard { min-height: calc(100vh - 62px); display: grid; grid-template-columns: 205px minmax(0,1fr); }
.sidebar { position: relative; padding: 22px 12px; border-right: 1px solid var(--line); background: #101113; }
.workspace-label { margin: 0 9px 12px; color: #696b71; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.side-link { width: 100%; height: 38px; margin: 2px 0; padding: 0 10px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 5px; color: #a9abb0; background: transparent; text-align: left; font-size: 11px; }
.side-link span { width: 16px; color: #8f9197; text-align: center; }
.side-link.selected { color: white; background: #292024; }
.side-link.selected span { color: #f26472; }
.sidebar-bottom { position: absolute; right: 12px; bottom: 18px; left: 18px; display: flex; align-items: center; gap: 7px; color: #73757b; font-size: 9px; }
.preview-dot { width: 6px; height: 6px; border-radius: 50%; background: #e0af59; box-shadow: 0 0 8px #e0af5966; }
.dash-main { width: min(1100px,100%); padding: 24px 28px 42px; }
.preview-notice { min-height: 34px; padding: 8px 11px; display: flex; align-items: center; gap: 8px; border: 1px solid #433b25; border-radius: 5px; color: #d6c28d; background: #211e16; font-size: 10px; }
.preview-notice span { width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid #ba9c5d; border-radius: 50%; font-size: 9px; }
.page-heading { margin: 24px 0 18px; display: flex; justify-content: space-between; align-items: end; gap: 14px; }
.eyebrow { margin: 0 0 7px; color: #dd6670; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.page-heading h1 { margin: 0; font-size: 21px; }
.heading-subtitle { margin: 6px 0 0; color: #91939a; font-size: 11px; }
.primary-button, .secondary-button { height: 35px; padding: 0 12px; border: 0; border-radius: 5px; color: white; background: #d83245; font-size: 10px; font-weight: 700; }
.secondary-button { border: 1px solid #3a3b41; background: #1b1c20; }
.stat-grid { margin-bottom: 17px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.stat-card { min-height: 91px; padding: 14px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.stat-label { color: #a4a6ab; font-size: 10px; }
.stat-card strong { margin-top: 7px; font-size: 23px; }
.stat-card small { margin-top: 2px; color: #71737a; font-size: 9px; }
.content-panel { margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.panel-heading { min-height: 68px; padding: 14px 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-heading h2 { margin: 0; font-size: 13px; }
.panel-heading p { margin: 5px 0 0; color: #82848a; font-size: 9px; }
.text-button { border: 0; color: #e7858d; background: transparent; font-size: 10px; }
.text-button span { margin-left: 6px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { height: 32px; padding: 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #74767c; background: #111214; text-align: left; font-size: 8px; letter-spacing: .08em; }
td { height: 47px; padding: 0 14px; border-bottom: 1px solid #222328; color: #a9abb0; font-size: 10px; }
tr:last-child td { border-bottom: 0; }
td:first-child { min-width: 180px; display: flex; align-items: center; gap: 8px; color: #ededee; font-weight: 600; }
.row-poster { width: 39px; height: 25px; display: inline-block; flex: 0 0 auto; border-radius: 3px; background: linear-gradient(135deg,#a95e58,#633c46,#1a1b25); }
.poster-b { background: linear-gradient(135deg,#728783,#35454b,#16191f); }
.poster-c { background: linear-gradient(135deg,#d28a55,#964e48,#272333); }
.poster-d { background: linear-gradient(135deg,#bd9b7d,#79645a,#27272c); }
.link-state { font-size: 9px; }
.link-state.linked { color: #8ed9a6; }
.link-state.pending { color: #d6b16e; }
.status { padding: 4px 7px; border-radius: 10px; font-size: 8px; }
.status.live { color: #9cddb0; background: #183022; }
.status.draft { color: #d8bd7d; background: #332b19; }
.more-button { width: 26px; height: 25px; border: 0; border-radius: 4px; color: #9da0a5; background: transparent; letter-spacing: 1px; }
.admin-list { padding: 0 15px 5px; }
.admin-row { min-height: 52px; display: flex; align-items: center; gap: 10px; border-top: 1px solid #242529; }
.avatar.small { width: 28px; height: 28px; font-size: 10px; }
.admin-details { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.admin-details strong { font-size: 10px; }
.admin-details span { color: #81838a; font-size: 9px; }
.role-pill { padding: 4px 7px; border: 1px solid #373840; border-radius: 10px; color: #aaaab0; font-size: 8px; }
.permission-note { margin: 13px 0 0; color: #85878d; font-size: 10px; }
.config-panel { scroll-margin-top: 18px; }
.config-content { padding: 0 15px 15px; }
.config-section { padding: 14px 0; border-top: 1px solid #292a2f; }
.config-section h3 { margin: 0 0 12px; display: flex; align-items: center; gap: 8px; font-size: 11px; }
.subtle-label { padding: 4px 7px; border: 1px solid #373840; border-radius: 10px; color: #aaaab0; font-size: 8px; font-weight: 400; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.field-grid label { display: flex; flex-direction: column; gap: 6px; color: #a4a6ab; font-size: 9px; }
.field-grid input, .field-grid textarea, .field-grid select { width: 100%; min-height: 34px; padding: 8px 9px; border: 1px solid #34353b; border-radius: 5px; outline: none; color: #e8e8eb; background: #101113; font: inherit; font-size: 10px; }
.field-grid textarea { resize: vertical; font-family: Consolas, monospace; line-height: 1.5; }
.field-grid input:focus, .field-grid textarea:focus, .field-grid select:focus { border-color: #a83e4a; }
.wide-field { grid-column: 1 / -1; }
.field-help { margin: 8px 0 0; color: #74767d; font-size: 9px; line-height: 1.5; }
.config-actions { padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #292a2f; color: #82848a; font-size: 9px; }
.smartlink-settings { margin-top: 12px; padding: 12px; border: 1px solid #34353b; border-radius: 5px; background: #111214; }
.smartlink-settings .field-grid { margin-bottom: 9px; }
.smartlink-settings .secondary-button { margin-top: 10px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 18px; background: #000b; }
.sponsor-modal { position: relative; width: min(390px,100%); padding: 28px 23px 20px; border: 1px solid #383940; border-radius: 12px; background: #17181b; box-shadow: 0 20px 70px #000b; text-align: center; }
.modal-close { position: absolute; top: 8px; right: 10px; border: 0; color: #aeb0b5; background: transparent; font-size: 23px; }
.sponsor-icon { width: 38px; height: 38px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--accent); font-size: 15px; }
.sponsor-modal h2 { margin: 0; font-size: 17px; }
.sponsor-modal p { margin: 9px 0 17px; color: #a2a4aa; font-size: 11px; line-height: 1.5; }
.sponsor-modal .primary-button { width: 100%; height: 40px; font-size: 11px; }
.sponsor-dismiss { margin-top: 12px; border: 0; color: #8d9096; background: transparent; font-size: 10px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 5; max-width: calc(100% - 40px); padding: 11px 14px; transform: translateY(16px); opacity: 0; pointer-events: none; border: 1px solid #41353a; border-radius: 6px; color: #f0d9dc; background: #211719; box-shadow: 0 10px 28px #0008; font-size: 10px; transition: .2s; }
.toast.visible { transform: translateY(0); opacity: 1; }
@media (max-width: 800px) {
  .dashboard { grid-template-columns: 56px minmax(0,1fr); }
  .sidebar { padding: 16px 7px; }
  .workspace-label, .side-link { font-size: 0; justify-content: center; padding: 0; }
  .side-link { height: 38px; }
  .side-link span { font-size: 14px; }
  .sidebar-bottom { right: 0; left: 0; justify-content: center; font-size: 0; }
  .dash-main { padding: 20px 17px 35px; }
}
@media (max-width: 560px) {
  .dash-topbar { height: 55px; padding: 0 12px; gap: 9px; }
  .dash-brand { font-size: 11px; }
  .preview-label { padding: 5px; font-size: 7px; }
  .topbar-right { gap: 6px; font-size: 9px; }
  .topbar-right select { width: 80px; height: 30px; padding: 0 4px; font-size: 9px; }
  .topbar-right .avatar { width: 26px; height: 26px; }
  .dashboard { min-height: calc(100vh - 55px); grid-template-columns: 42px minmax(0,1fr); }
  .sidebar { padding: 12px 4px; }
  .side-link { height: 34px; }
  .side-link span { font-size: 12px; }
  .dash-main { padding: 14px 10px 28px; }
  .preview-notice { font-size: 8px; }
  .page-heading { margin: 18px 0 13px; align-items: center; }
  .page-heading h1 { font-size: 16px; }
  .heading-subtitle { max-width: 230px; font-size: 9px; }
  .primary-button, .secondary-button { height: 31px; padding: 0 8px; font-size: 8px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .stat-card { min-height: 75px; padding: 10px; }
  .stat-label { font-size: 9px; }
  .stat-card strong { margin-top: 5px; font-size: 19px; }
  .panel-heading { min-height: 57px; padding: 11px; }
  .panel-heading h2 { font-size: 11px; }
  .panel-heading p { font-size: 8px; }
  th { padding: 0 8px; font-size: 7px; }
  td { height: 43px; padding: 0 8px; font-size: 8px; }
  td:first-child { min-width: 144px; gap: 6px; }
  .row-poster { width: 30px; height: 21px; }
  .admin-list { padding: 0 10px 4px; }
  .admin-row { gap: 7px; }
  .admin-details strong { font-size: 8px; }
  .admin-details span { font-size: 7px; }
  .role-pill, .admin-row .status { padding: 3px 5px; font-size: 7px; }
  .admin-row .status { display: none; }
  .permission-note { font-size: 8px; }
  .config-content { padding: 0 10px 11px; }
  .config-section { padding: 11px 0; }
  .field-grid { grid-template-columns: 1fr; gap: 8px; }
  .wide-field { grid-column: auto; }
  .config-actions { align-items: flex-start; flex-direction: column; }
}
