:root {
  --sidebar-width: 276px;
  --admin-primary: #e52a35;
  --admin-primary-dark: #bd1724;
  --admin-success: #13845b;
  --admin-warning: #d49719;
  --admin-danger: #d6333f;
  --admin-sidebar: #061521;
  --admin-sidebar-soft: #102a3b;
  --admin-sidebar-border: rgba(255,255,255,.09);
  --admin-sidebar-text-strong: #fff;
  --admin-sidebar-muted: #8ca2b3;
}

body { font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif; }
.admin-sidebar { background: linear-gradient(180deg,#04121e 0%,#071a29 58%,#03101a 100%); }
.brand-icon { background: linear-gradient(135deg,#e52a35,#a8101d); box-shadow: 0 8px 22px rgba(229,42,53,.28); }
.brand-title { letter-spacing: .035em; }
.brand-subtitle { color: #7690a2; }
.sidebar-nav { gap: .28rem; }
.sidebar-nav .nav-link { position: relative; min-height: 45px; }
.sidebar-nav .nav-link.active { background: linear-gradient(90deg,rgba(229,42,53,.2),rgba(229,42,53,.06)); box-shadow: inset 3px 0 #e52a35; }
.sidebar-nav .nav-link.active .nav-icon { color: #fff; background: #e52a35; }
.nav-section-label { padding: 1rem .9rem .3rem; color: #5f788a; font-size: .61rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.nav-count { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 99px; color: #fff; background: #e52a35; font-size: .6rem; font-weight: 800; text-align: center; }
.admin-avatar { width: 48px; height: 48px; display: inline-grid; place-items: center; border: 3px solid rgba(233,184,75,.5); border-radius: 50%; color: #091622; background: linear-gradient(145deg,#f5d582,#e9b84b); font-weight: 900; }
.avatar-small { width: 34px; height: 34px; border-width: 2px; font-size: .67rem; }
.sidebar-user { padding: .95rem; }
.admin-navbar { min-height: 68px; }
.admin-search { max-width: 540px; position: relative; align-items: center; }
.admin-search i { position: absolute; left: 13px; color: #8a96a1; }
.admin-search input { width: 100%; height: 41px; padding: 8px 14px 8px 38px; border: 1px solid var(--admin-border); border-radius: 9px; color: var(--admin-text); background: var(--admin-surface-soft); outline: none; font-size: .82rem; }
.admin-search input:focus { border-color: rgba(229,42,53,.5); box-shadow: 0 0 0 3px rgba(229,42,53,.08); }
.page-heading { gap: 18px; }
.page-icon { color: #fff; background: linear-gradient(135deg,#e52a35,#b31320); box-shadow: 0 10px 24px rgba(229,42,53,.22); }
.eyebrow { color: #c82935; }
.heading-actions { flex-wrap: wrap; }
.btn-primary { --bs-btn-bg:#e52a35; --bs-btn-border-color:#e52a35; --bs-btn-hover-bg:#bd1724; --bs-btn-hover-border-color:#bd1724; --bs-btn-active-bg:#a9101b; --bs-btn-active-border-color:#a9101b; }
.metric-card { min-height: 168px; display: block; color: inherit; }
.metric-card:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--admin-shadow); }
.metric-primary .metric-icon { color: #2563eb; background:#e8f0ff; }
.metric-success .metric-icon { color:#12815a; background:#e4f6ef; }
.metric-warning .metric-icon { color:#b77c0a; background:#fff3d4; }
.metric-danger .metric-icon { color:#d12c39; background:#ffe7e9; }
.metric-value { font-size: 2.25rem; }
.panel { border-radius: 13px; }
.section-title i { color:#e52a35; }
.activity-feed { display: grid; }
.activity-feed > a { min-height: 68px; padding: 12px 4px; display:flex; align-items:center; gap:13px; color:var(--admin-text); border-bottom:1px solid var(--admin-border); }
.activity-feed > a:last-child { border-bottom:0; }
.activity-feed > a:hover { color:#e52a35; }
.activity-feed > a > span:nth-child(2) { display:grid; gap:2px; }
.activity-feed strong { font-size:.82rem; }
.activity-feed small { color:var(--admin-muted); font-size:.68rem; }
.activity-icon,.record-avatar,.revision-icon { width:40px; height:40px; flex:0 0 auto; display:grid; place-items:center; border-radius:10px; color:#2563eb; background:#eaf1ff; }
.quick-actions { display:grid; gap:9px; }
.quick-actions a { min-height:62px; padding:11px; display:flex; align-items:center; gap:12px; border:1px solid var(--admin-border); border-radius:10px; color:var(--admin-text); background:var(--admin-surface-soft); }
.quick-actions > a > i { width:37px; height:37px; display:grid; place-items:center; flex:0 0 auto; border-radius:9px; color:#fff; background:#0f2b3f; }
.quick-actions a:hover { border-color:#e52a35; transform:translateX(2px); }
.quick-actions span { display:grid; }.quick-actions strong { font-size:.76rem; }.quick-actions small { color:var(--admin-muted); font-size:.65rem; }
.readiness-score { padding:5px 9px; border-radius:99px; color:#775309; background:#fff2c9; font-size:.65rem; font-weight:800; }
.readiness-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:11px; }
.readiness-grid a { padding:14px; display:flex; gap:11px; align-items:flex-start; border:1px solid var(--admin-border); border-radius:10px; color:var(--admin-text); }
.readiness-grid a > i { color:#adb5bd; }.readiness-grid a.complete > i { color:#18a566; }
.readiness-grid span { display:grid; }.readiness-grid strong { font-size:.76rem; }.readiness-grid small { color:var(--admin-muted); font-size:.65rem; }
.empty-state { min-height:190px; display:grid; place-items:center; align-content:center; gap:7px; color:var(--admin-muted); text-align:center; }
.empty-state > i { font-size:2rem; color:#b7c1c9; }.empty-state strong { color:var(--admin-text); font-size:.86rem; }.empty-state span { font-size:.72rem; }

/* Live visual editor */
.save-indicator { padding:7px 11px; display:inline-flex; align-items:center; gap:6px; border-radius:99px; color:#176a47; background:#ddf5e9; font-size:.68rem; font-weight:800; }
.save-indicator.is-saving { color:#7a5608; background:#fff1c9; }.save-indicator.is-error { color:#9e2630; background:#ffe0e3; }
.live-editor-shell { height:calc(100vh - 175px); min-height:660px; display:grid; grid-template-columns:390px minmax(500px,1fr); overflow:hidden; border:1px solid var(--admin-border); border-radius:15px; background:var(--admin-surface); box-shadow:var(--admin-shadow); }
.editor-controls { min-height:0; overflow:hidden; display:flex; flex-direction:column; border-right:1px solid var(--admin-border); background:var(--admin-surface); }
.editor-tabs { padding:9px; display:grid; grid-template-columns:repeat(4,1fr); gap:5px; border-bottom:1px solid var(--admin-border); }
.editor-tabs li { min-width:0; }
.editor-tabs button { width:100%; min-height:52px; padding:7px 3px; display:grid; place-items:center; align-content:center; gap:3px; border:0; border-radius:8px; color:var(--admin-muted); background:transparent; font-size:.58rem; font-weight:800; }
.editor-tabs button i { font-size:.98rem; }.editor-tabs button:hover,.editor-tabs button.active { color:#e52a35; background:rgba(229,42,53,.08); }
.editor-tab-content { flex:1; min-height:0; overflow-y:auto; scrollbar-width:thin; }
.editor-group { padding:18px; border-bottom:1px solid var(--admin-border); }
.editor-group-title { margin-bottom:16px; display:flex; justify-content:space-between; gap:12px; align-items:center; }
.editor-group-title span { font-size:.75rem; font-weight:800; }.editor-group-title small { color:var(--admin-muted); font-size:.6rem; text-align:right; }
.editor-field { margin-bottom:13px; display:grid; gap:6px; color:var(--admin-text); font-size:.66rem; font-weight:700; }
.editor-field:last-child { margin-bottom:0; }
.editor-field .form-control { min-height:39px; padding:.55rem .68rem; font-size:.75rem; }
.editor-field textarea.form-control { resize:vertical; }
.editor-field > small { min-height:12px; color:#18a566; font-size:.56rem; font-weight:600; }
.editor-field.has-error > small { color:#d6333f; }
.colour-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.colour-grid .editor-field { margin:0; }
.colour-grid input[type=color] { min-height:48px; padding:4px; cursor:pointer; }
.current-hero { margin-bottom:13px; position:relative; overflow:hidden; border-radius:10px; background:#061521; }
.current-hero img { width:100%; height:145px; object-fit:cover; opacity:.72; }
.current-hero span { position:absolute; left:12px; bottom:10px; padding:4px 7px; border-radius:4px; color:#fff; background:rgba(4,16,28,.75); font-size:.58rem; font-weight:700; }
.upload-form { display:grid; gap:10px; }
.upload-drop { min-height:90px; padding:14px; display:flex; align-items:center; gap:12px; border:1px dashed #afbbc4; border-radius:10px; color:var(--admin-text); background:var(--admin-surface-soft); cursor:pointer; }
.upload-drop > i { font-size:1.45rem; color:#e52a35; }.upload-drop span { display:grid; }.upload-drop strong { font-size:.7rem; }.upload-drop small { color:var(--admin-muted); font-size:.58rem; }.upload-drop input { position:absolute; opacity:0; pointer-events:none; }
.visibility-row { min-height:63px; margin:0; display:flex; justify-content:space-between; align-items:center; gap:18px; border-bottom:1px solid var(--admin-border); cursor:pointer; }
.visibility-row:last-child { border-bottom:0; }
.visibility-row > span { display:grid; }.visibility-row strong { font-size:.72rem; }.visibility-row small { color:var(--admin-muted); font-size:.59rem; }
.visibility-row .form-check-input { width:2.35rem; height:1.22rem; margin:0; cursor:pointer; }.visibility-row .form-check-input:checked { border-color:#e52a35; background-color:#e52a35; }
.editor-preview-panel { min-width:0; min-height:0; display:flex; flex-direction:column; background:#e9eef3; }
.preview-toolbar { min-height:56px; padding:9px 14px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #d3dbe2; background:#fff; }
.preview-status { display:flex; align-items:center; gap:7px; color:#53616d; font-size:.66rem; font-weight:800; text-transform:uppercase; letter-spacing:.07em; }
.preview-status span { width:8px; height:8px; border-radius:50%; background:#20b36d; box-shadow:0 0 0 4px rgba(32,179,109,.13); }
.preview-devices { padding:4px; display:flex; gap:3px; border-radius:8px; background:#f0f3f6; }
.preview-devices button,.preview-refresh { width:34px; height:31px; display:grid; place-items:center; border:0; border-radius:6px; color:#71808c; background:transparent; }
.preview-devices button:hover,.preview-devices button.active,.preview-refresh:hover { color:#e52a35; background:#fff; box-shadow:0 2px 8px rgba(15,23,42,.1); }
.preview-stage { flex:1; min-height:0; padding:16px; overflow:auto; display:flex; justify-content:center; align-items:flex-start; transition:.2s; }
.preview-stage iframe { width:100%; height:100%; min-height:590px; border:0; border-radius:9px; background:#fff; box-shadow:0 12px 35px rgba(15,23,42,.14); transition:width .25s ease; }
.preview-stage[data-size=tablet] iframe { width:768px; }.preview-stage[data-size=mobile] iframe { width:390px; }

/* Inbox and data views */
.panel-search { position:relative; min-width:230px; }.panel-search i { position:absolute; left:11px; top:9px; color:#8c98a1; }.panel-search input { width:100%; min-height:37px; padding:7px 10px 7px 33px; border:1px solid var(--admin-border); border-radius:8px; color:var(--admin-text); background:var(--admin-surface-soft); outline:none; font-size:.7rem; }
.record-list { display:grid; }
.record-card { min-height:104px; padding:17px 2px; display:grid; grid-template-columns:auto minmax(240px,1fr) auto; gap:14px; align-items:center; border-bottom:1px solid var(--admin-border); }
.record-card:last-child { border-bottom:0; }.record-card[hidden],.headline-list a[hidden],tr[hidden],.activity-feed a[hidden] { display:none !important; }
.record-avatar.voice { color:#e52a35; background:#ffe5e7; }.record-avatar.immigration { color:#ad7610; background:#fff0ca; }
.record-main h3 { margin:6px 0 4px; font-size:.9rem; }.record-main h3 span { color:var(--admin-muted); font-weight:500; }.record-main p { margin:0; max-width:760px; color:var(--admin-muted); font-size:.7rem; }
.record-meta { display:flex; align-items:center; flex-wrap:wrap; gap:8px; color:var(--admin-muted); font-size:.58rem; }
.record-status { padding:3px 7px; border-radius:99px; color:#81580a; background:#fff0c6; font-size:.55rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }.status-reviewed { color:#185d87; background:#dceef9; }.status-approved { color:#176844; background:#dff5e9; }.status-archived { color:#626d74; background:#e8ecee; }
.record-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }.record-actions form { display:flex; align-items:center; gap:6px; }.record-actions select { width:106px; }
.privacy-banner { margin-bottom:16px; padding:13px 15px; display:flex; align-items:center; gap:11px; border:1px solid #f1d791; border-radius:10px; color:#75520a; background:#fff6dc; font-size:.7rem; }.privacy-banner i { font-size:1.2rem; }
.pro-table th { color:var(--admin-muted); font-size:.62rem; letter-spacing:.05em; text-transform:uppercase; }.pro-table td { font-size:.71rem; }.pro-table form { display:inline; }
.source-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:13px; }
.source-card { min-height:170px; padding:18px; display:flex; flex-direction:column; border:1px solid var(--admin-border); border-radius:12px; background:var(--admin-surface); box-shadow:var(--admin-shadow-sm); }
.source-top { display:flex; align-items:start; justify-content:space-between; margin-bottom:18px; }.source-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:10px; color:#e52a35; background:#ffe8ea; }.feed-health { display:flex; align-items:center; gap:5px; color:#8a949c; font-size:.57rem; font-weight:700; }.feed-health i { width:7px; height:7px; border-radius:50%; background:#aeb6bc; }.feed-health.online { color:#178153; }.feed-health.online i { background:#20b36d; box-shadow:0 0 0 3px rgba(32,179,109,.12); }
.source-card > strong { font-size:.87rem; }.source-card > span { color:var(--admin-muted); font-size:.65rem; }.source-card > a { margin-top:auto; color:#e52a35; font-size:.63rem; font-weight:700; }
.headline-list { display:grid; }.headline-list > a { min-height:74px; padding:10px 2px; display:flex; align-items:center; gap:12px; color:var(--admin-text); border-bottom:1px solid var(--admin-border); }.headline-list > a:last-child { border-bottom:0; }.headline-list img,.headline-fallback { width:74px; height:50px; flex:0 0 auto; object-fit:contain; border-radius:7px; background:#e8eef2; }.headline-fallback { display:grid; place-items:center; color:#8ca0b0; }.headline-list > a > span:nth-child(2) { display:grid; }.headline-list small { color:#e52a35; font-size:.56rem; font-weight:700; }.headline-list strong { font-size:.73rem; }
.settings-form { display:grid; gap:13px; }.settings-form label { display:grid; gap:6px; color:var(--admin-text); font-size:.67rem; font-weight:700; }
.health-list { display:grid; }.health-list > div { min-height:61px; display:flex; align-items:center; gap:11px; border-bottom:1px solid var(--admin-border); }.health-list > div:last-child { border-bottom:0; }.health-list > div > span:nth-child(2) { display:grid; }.health-list strong { font-size:.72rem; }.health-list small { color:var(--admin-muted); font-size:.6rem; }.health-dot { width:10px; height:10px; border-radius:50%; background:#d6333f; box-shadow:0 0 0 4px rgba(214,51,63,.1); }.health-dot.good { background:#20b36d; box-shadow:0 0 0 4px rgba(32,179,109,.12); }
.revision-list { display:grid; }.revision-list article { min-height:62px; display:flex; align-items:center; gap:11px; border-bottom:1px solid var(--admin-border); }.revision-list article:last-child { border-bottom:0; }.revision-icon { width:34px; height:34px; color:#e52a35; background:#ffe8ea; }.revision-list article > span:nth-child(2) { display:grid; }.revision-list strong { font-size:.71rem; }.revision-list small { color:var(--admin-muted); font-size:.59rem; }
.system-table { display:grid; }.system-table > div { min-height:48px; display:flex; justify-content:space-between; align-items:center; gap:15px; border-bottom:1px solid var(--admin-border); font-size:.68rem; }.system-table > div:last-child { border-bottom:0; }.system-table span { color:var(--admin-muted); }.system-table strong { text-align:right; }

[data-theme=dark] .metric-primary .metric-icon,[data-theme=dark] .activity-icon { background:rgba(37,99,235,.18); }
[data-theme=dark] .metric-success .metric-icon { background:rgba(18,129,90,.18); }
[data-theme=dark] .metric-warning .metric-icon { background:rgba(183,124,10,.18); }
[data-theme=dark] .metric-danger .metric-icon,[data-theme=dark] .record-avatar.voice,[data-theme=dark] .source-icon,[data-theme=dark] .revision-icon { background:rgba(229,42,53,.17); }
[data-theme=dark] .editor-preview-panel { background:#06111a; }
[data-theme=dark] .preview-toolbar { background:var(--admin-surface); border-color:var(--admin-border); }
[data-theme=dark] .preview-devices { background:#111e29; }
[data-theme=dark] .upload-drop,[data-theme=dark] .quick-actions a { background:var(--admin-surface-soft); }

@media (min-width: 992px) {
  body.sidebar-mini .nav-section-label,
  body.sidebar-mini .nav-count,
  body.sidebar-mini .sidebar-user strong,
  body.sidebar-mini .sidebar-user small { display:none; }
  body.sidebar-mini .sidebar-user { margin-inline:.65rem; padding:.55rem; }
  body.sidebar-mini .sidebar-user .admin-avatar { width:40px; height:40px; font-size:.68rem; }
}

@media (max-width: 1199px) {
  .live-editor-shell { grid-template-columns:340px minmax(420px,1fr); }
  .readiness-grid { grid-template-columns:1fr; }
  .source-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 991px) {
  .live-editor-shell { height:auto; min-height:0; grid-template-columns:1fr; overflow:visible; }
  .editor-controls { max-height:none; overflow:visible; border-right:0; border-bottom:1px solid var(--admin-border); }
  .editor-tab-content { max-height:620px; }
  .editor-preview-panel { min-height:680px; }
  .record-card { grid-template-columns:auto 1fr; }.record-actions { grid-column:1/-1; padding-left:54px; justify-content:flex-start; }
}
@media (max-width: 767px) {
  .page-heading { align-items:flex-start; }.page-heading-copy { align-items:flex-start; }.heading-actions { width:100%; }
  .heading-actions .btn { flex:1; }.save-indicator { width:100%; justify-content:center; }
  .source-grid { grid-template-columns:1fr; }
  .panel-header { align-items:flex-start; flex-direction:column; }.panel-search { width:100%; }
  .record-card { grid-template-columns:1fr; }.record-avatar { display:none; }.record-actions { padding-left:0; flex-wrap:wrap; }.record-actions form { flex:1; }.record-actions form select { flex:1; }
  .live-editor-shell { border-radius:10px; }.editor-preview-panel { min-height:590px; }.preview-stage { padding:8px; }.preview-stage iframe { min-height:520px; }
  .colour-grid { grid-template-columns:1fr; }
}

.nv-auth-body { position:relative; overflow-x:hidden; background:radial-gradient(circle at 15% 20%,rgba(31,142,234,.24),transparent 30%),radial-gradient(circle at 85% 80%,rgba(229,42,53,.2),transparent 34%),linear-gradient(135deg,#03101a,#0b2a40) !important; }
.nv-auth-body::before { content:""; position:fixed; inset:0; pointer-events:none; opacity:.2; background:repeating-linear-gradient(90deg,transparent 0 99px,rgba(255,255,255,.05) 100px); }
.nv-auth-card { border-color:rgba(255,255,255,.13); border-radius:16px; }
.nv-auth-visual { height:126px; position:relative; border-radius:10px; }
.nv-auth-visual img { filter:saturate(.75) contrast(1.08); }
.nv-auth-visual::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(3,16,26,.82),transparent); }
.nv-auth-visual span { position:absolute; z-index:1; left:14px; bottom:12px; color:#fff; font-size:.6rem; font-weight:800; letter-spacing:.12em; }
.input-icon { position:relative; }.input-icon > i { position:absolute; z-index:1; left:12px; top:11px; color:#8a98a3; }.input-icon .form-control { padding-left:36px; min-height:44px; }.input-icon button { width:40px; position:absolute; right:1px; top:1px; bottom:1px; border:0; color:#75838e; background:transparent; }
.radio-admin-hero { display:grid; grid-template-columns:160px minmax(0,1fr); gap:22px; align-items:center; }.radio-admin-hero > img { width:160px; height:160px; object-fit:cover; border-radius:13px; }.radio-admin-hero h2 { margin:4px 0; }.radio-admin-hero audio { width:100%; margin-top:12px; }.radio-admin-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }.radio-admin-stats div { padding:13px; display:grid; border-radius:9px; background:var(--admin-surface-soft); }.radio-admin-stats strong { font-size:1.15rem; }.radio-admin-stats span { color:var(--admin-muted); font-size:.58rem; text-transform:uppercase; }.radio-history-admin { display:grid; gap:8px; }.radio-history-admin article { padding:8px; display:grid; grid-template-columns:48px 1fr; gap:9px; align-items:center; border-bottom:1px solid var(--admin-border); }.radio-history-admin img { width:48px; height:48px; object-fit:cover; border-radius:7px; }.radio-history-admin span { display:grid; }.radio-history-admin small { color:var(--admin-muted); }.admin-podcast-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }.admin-podcast-grid article { padding:13px; border:1px solid var(--admin-border); border-radius:10px; background:var(--admin-surface-soft); }.admin-podcast-grid audio { width:100%; margin-top:8px; }
