/* RCA Living CMS · Enterprise design system */
:root {
  --font-body: "Be Vietnam Pro", Arial, sans-serif;
  --ink: #191b20;
  --muted: #5c616b;
  --text-secondary: #626873;
  --text-subtle: #7b8089;
  --paper: #f4f5f7;
  --surface: #ffffff;
  --surface-subtle: #f8f9fb;
  --line: #e5e7eb;
  --red: #c9152c;
  --redp: #fff0f2;
  --green: #176b45;
  --greenp: #eaf5ee;
  --amber: #805000;
  --amberp: #fff5df;
  --blue: #31558a;
  --bluep: #edf2fc;
  --type-caption: 12.5px;
  --type-label: 13.5px;
  --type-body: 15px;
  --type-card: 16px;
  --type-section: 20px;
  --type-page-title: 30px;
  --type-page-mobile: 26px;
  --type-stat: 32px;
  --type-stat-mobile: 26px;
  --line-compact: 1.45;
  --line-body: 1.6;
  --line-heading: 1.2;
  --tracking-tight: -.025em;
  --tracking-label: .035em;
  --tracking-wide: .075em;
  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 13px;
  --radius-pill: 999px;
  --button-height: 40px;
  --button-height-sm: 34px;
  --control-height: 40px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --sidebar-width: 264px;
  --topbar-height: 68px;
  --content-max: 1600px;
  --shadow-1: 0 1px 2px rgba(20, 24, 32, .035), 0 3px 9px rgba(20, 24, 32, .025);
  --shadow-2: 0 14px 32px rgba(20, 24, 32, .12);
  --focus-ring: 0 0 0 3px rgba(201, 21, 44, .14);
  --duration-fast: 140ms;
  --duration: 180ms;
}

* { -webkit-tap-highlight-color: transparent; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--type-body);
  line-height: var(--line-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
button { color: inherit; }
img { max-width: 100%; }
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
button:disabled, [aria-disabled="true"] { cursor: not-allowed; opacity: .56; transform: none !important; }

/* Application shell */
.sidebar {
  width: var(--sidebar-width);
  padding: 17px 13px 14px;
  background: #17181b;
  border-right: 1px solid #2a2c30;
  transition: transform 220ms ease;
}
.brand {
  min-height: 68px;
  padding: 0 9px 15px;
  margin-bottom: 8px;
  border-color: #303238;
}
.brand-logo { max-width: 212px; height: 48px; }
.nav-scroll { padding: 0 2px 4px 0; }
.nav-section {
  padding: 17px 11px 6px;
  color: #969aa3;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .085em;
  line-height: 1.4;
}
.nav-link {
  min-height: 43px;
  margin: 2px 0;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #c6c8ce;
  font-size: var(--type-label);
  font-weight: 500;
  line-height: 1.4;
  transition: background-color var(--duration) ease, color var(--duration) ease, border-color var(--duration) ease;
}
.nav-link svg { width: 17px; height: 17px; color: #969aa3; }
.nav-link:hover { background: #24262a; color: #fff; }
.nav-link.active {
  background: #2a1e21;
  box-shadow: inset 2px 0 var(--red);
  color: #fff;
}
.nav-link.active svg { color: #fb8795; }
.nav-count {
  padding: 1px 7px;
  border: 1px solid #503037;
  border-radius: var(--radius-pill);
  background: #332126;
  color: #ffb1ba;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.side-bottom { padding: 12px 3px 0; border-color: #303238; }
.profile { gap: 10px; padding: 10px 7px 3px; }
.avatar { width: 34px; height: 34px; font-size: 13px; }
.profile-name { font-size: var(--type-label); font-weight: 600; }
.profile-role { margin-top: 1px; color: #a9acb4; font-size: var(--type-caption); }

.main-shell { min-width: 0; margin-left: var(--sidebar-width); }
.topbar {
  height: var(--topbar-height);
  padding: 0 32px;
  background: rgba(255, 255, 255, .96);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(20, 24, 32, .015);
}
.crumbs { gap: 10px; color: var(--text-subtle); font-size: var(--type-label); }
.crumbs strong { font-weight: 600; }
.top-actions { gap: 9px; }
.site-link, .btn {
  min-height: var(--button-height);
  height: var(--button-height);
  padding: 0 14px;
  border-color: #dfe2e7;
  border-radius: 9px;
  background: #fff;
  color: #30343b;
  font-size: var(--type-label);
  font-weight: 600;
  transition: color var(--duration-fast) ease, background-color var(--duration-fast) ease, border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.site-link:hover, .btn:hover {
  border-color: #c6cad2;
  background: #fbfbfc;
  box-shadow: 0 2px 5px rgba(20, 24, 32, .06);
  transform: translateY(-1px);
}
.btn-primary { border-color: var(--red); background: var(--red); color: #fff; box-shadow: 0 2px 5px rgba(201, 21, 44, .14); }
.btn-primary:hover { border-color: #a91025; background: #a91025; color: #fff; }
.btn-dark { border-color: #202126; background: #202126; color: #fff; }
.btn-sm { min-height: var(--button-height-sm); height: var(--button-height-sm); padding: 0 11px; font-size: var(--type-caption); }
.locale-button, .icon-button { cursor: pointer; color: #5e636d; }
.locale-button { min-height: 38px; padding: 0 9px; border-radius: 8px; font-size: var(--type-label); font-weight: 600; }
.locale-button:hover { background: #f3f4f6; color: var(--ink); }
.locale-dot { width: 7px; height: 7px; background: #248353; box-shadow: 0 0 0 3px #eaf5ee; }
.icon-button { width: 40px; height: 40px; border-radius: 9px; }
.icon-button:hover { background: #f2f3f5; color: var(--ink); }
.icon-button svg { width: 17px; height: 17px; }
.topbar svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.top-avatar { width: 34px; height: 34px; font-size: var(--type-caption); }
.mobile-menu { display: none; }

/* Page framing and reusable surfaces */
main {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 32px 36px 52px;
}
.page-heading { align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.eyebrow {
  margin-bottom: 7px;
  color: var(--red);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.4;
}
.page-heading h1 {
  margin: 0;
  color: #17191e;
  font-family: var(--font-body);
  font-size: var(--type-page-title);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: var(--tracking-tight);
}
.page-desc { margin: 8px 0 0; color: var(--muted); font-size: var(--type-body); line-height: 1.55; }
.heading-actions { gap: 8px; }
.demo-banner {
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 15px;
  border: 1px solid #ead9ad;
  border-radius: 9px;
  background: #fffaf0;
  color: #6b501b;
  font-size: var(--type-label);
  line-height: 1.5;
}
.demo-banner svg { width: 16px; color: #9b6a0a; }
.card {
  min-width: 0;
  border: 1px solid #e6e8ec;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.pad, .chart-card { padding: 20px; }
.card-head { gap: 14px; margin-bottom: 16px; }
.card-title { color: #24272d; font-size: var(--type-card); font-weight: 600; line-height: 1.4; }
.card-sub { margin-top: 4px; color: var(--text-secondary); font-size: var(--type-caption); line-height: 1.5; }
.text-link { min-height: 36px; color: var(--red); font-size: var(--type-label); font-weight: 600; }
.text-link:hover { color: #a91025; }

/* Executive overview */
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { min-width: 0; padding: 18px 19px; }
.stat-top { gap: 10px; color: var(--text-secondary); font-size: var(--type-label); line-height: 1.4; }
.stat-icon { width: 32px; height: 32px; border: 1px solid #f1dce0; border-radius: 9px; background: #fff6f7; color: var(--red); }
.stat-icon svg { width: 16px; }
.stat-num { margin-top: 13px; color: #191b20; font-size: var(--type-stat); font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.stat-foot { margin-top: 6px; color: var(--text-secondary); font-size: var(--type-caption); line-height: 1.45; }
.stat-foot b { color: var(--green); font-weight: 600; }
.dash-grid { grid-template-columns: minmax(0, 1.65fr) minmax(300px, .95fr); gap: 16px; margin-bottom: 16px; }
.bottom-grid { grid-template-columns: minmax(0, 1.8fr) minmax(290px, .9fr); gap: 16px; margin-bottom: 16px; }
.chart-card { min-height: 274px; }
.chart { height: 166px; overflow: visible; }
.chart-labels, .legend { gap: 13px; color: var(--text-secondary); font-size: var(--type-caption); }
.legend i { width: 8px; height: 8px; }
.review-item { gap: 12px; padding: 12px 0; border-color: #eceef1; }
.review-thumb { width: 46px; height: 40px; border-radius: 7px; }
.review-name { color: #25282e; font-size: var(--type-label); font-weight: 600; line-height: 1.45; }
.review-meta { margin-top: 3px; color: var(--text-secondary); font-size: var(--type-caption); }
.review-action { min-height: 34px; padding: 5px 10px; border-color: #e3e5e9; border-radius: 7px; background: #fff; color: #444952; font-size: var(--type-caption); font-weight: 600; }
.review-action:hover { background: #f7f8fa; }
.activity { gap: 11px; padding: 11px 0; border-color: #eceef1; }
.activity-mark { width: 27px; height: 27px; background: #fdf2f4; color: var(--red); }
.activity-text { color: #515660; font-size: var(--type-caption); line-height: 1.5; }
.activity-text strong { color: #272a30; font-weight: 600; }
.activity-time { margin-top: 4px; color: var(--text-subtle); font-size: var(--type-caption); }

/* Tables, filters and data states */
.toolbar { gap: 12px; margin-bottom: 14px; }
.filters { gap: 8px; }
.search {
  min-width: 230px;
  height: var(--control-height);
  padding: 0 12px;
  border-color: #dfe2e7;
  border-radius: 9px;
  color: #7a808a;
  box-shadow: 0 1px 1px rgba(20, 24, 32, .02);
}
.search:focus-within { border-color: #d4818c; box-shadow: var(--focus-ring); }
.search input { min-width: 0; min-height: 38px; color: var(--ink); font-size: var(--type-body); }
.search input::placeholder { color: #8b9099; }
.select, .control {
  min-width: 0;
  height: var(--control-height);
  padding: 0 12px;
  border-color: #dfe2e7;
  border-radius: 9px;
  background-color: #fff;
  color: #292c32;
  font-size: var(--type-label);
  line-height: normal;
}
.select:hover, .control:hover { border-color: #c8ccd3; }
.control { width: 100%; }
.textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border-color: #dfe2e7;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.55;
  resize: vertical;
}
.count, .pagination { color: var(--text-secondary); font-size: var(--type-caption); }
.count { font-variant-numeric: tabular-nums; }
.table-card { overflow: hidden; border-radius: var(--radius-lg); }
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; min-width: 100%; border-collapse: separate; border-spacing: 0; }
th {
  padding: 12px 14px;
  border-bottom: 1px solid #e8eaee;
  background: #f8f9fb;
  color: #656b75;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .055em;
  line-height: 1.4;
  text-transform: uppercase;
  vertical-align: middle;
}
td {
  padding: 13px 14px;
  border-bottom: 1px solid #eef0f2;
  color: #41464f;
  font-size: var(--type-label);
  line-height: 1.5;
  vertical-align: middle;
}
tbody tr { transition: background-color var(--duration-fast) ease; }
tbody tr:hover { background: #f8f9fb; }
tbody tr:last-child td { border-bottom: 0; }
.entity { min-width: 185px; gap: 10px; }
.thumb { width: 40px; height: 36px; border-radius: 7px; }
.entity-name { color: #25282e; font-size: var(--type-label); font-weight: 600; line-height: 1.45; }
.entity-sub { margin-top: 3px; color: var(--text-secondary); font-size: var(--type-caption); line-height: 1.4; }
.pill {
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.pill:before { width: 6px; height: 6px; }
.green { border-color: #d5eadc; background: var(--greenp); color: #176b45; }
.red { border-color: #f2d5da; background: #fff1f3; color: #a7192c; }
.amber { border-color: #f0e0bb; background: var(--amberp); color: #765000; }
.blue { border-color: #dbe4f4; background: var(--bluep); color: #315387; }
.gray { border-color: #e6e8eb; background: #f4f5f6; color: #565b64; }
.pagination { gap: 12px; padding: 13px 16px; border-color: #eceef1; }

/* Page cards and editorial workspace */
.pages-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.page-card { border-radius: var(--radius-lg); transition: border-color var(--duration) ease, box-shadow var(--duration) ease, transform var(--duration) ease; }
.page-card:hover { border-color: #d8dbe1; box-shadow: 0 8px 22px rgba(20, 24, 32, .08); transform: translateY(-2px); }
.cover { height: 138px; background: #e9ebee; }
.cover img { transition: transform 260ms ease; }
.page-card:hover .cover img { transform: scale(1.025); }
.cover:after { background: linear-gradient(180deg, transparent 20%, rgba(10, 12, 16, .64)); }
.cover strong { left: 15px; bottom: 13px; font-size: 18px; line-height: 1.3; }
.page-card-body { padding: 15px; }
.page-card-top { gap: 10px; }
.page-card-desc { min-height: 40px; margin: 7px 0 12px; color: var(--text-secondary); font-size: var(--type-caption); line-height: 1.5; }
.page-card-foot { gap: 8px; padding-top: 12px; border-color: #eceef1; }
.locale-chips { gap: 5px; }
.locale-chip { min-width: 30px; padding: 5px 7px; border-radius: 5px; font-size: 11.5px; font-weight: 700; }
.locale-chip.done { background: var(--greenp); color: var(--green); }
.locale-chip.wait { background: var(--amberp); color: var(--amber); }
.locale-chip.missing { background: var(--redp); color: #a7192c; }
.editor-layout, .lead-layout { grid-template-columns: minmax(0, 1.55fr) minmax(320px, .9fr); gap: 18px; align-items: start; }
.editor-main { padding: 22px; }
.editor-section { margin-bottom: 12px; overflow: hidden; border-color: #e5e7eb; border-radius: 10px; }
.section-head { gap: 11px; padding: 13px 15px; border-color: #e9ebef; background: #f8f9fb; }
.section-head strong { color: #292c32; font-size: var(--type-label); font-weight: 600; }
.section-no { font-size: var(--type-label); font-weight: 700; }
.section-type { padding: 4px 8px; border-radius: 5px; background: #eef0f3; color: #626873; font-size: 11.5px; }
.section-body { padding: 16px; }
.field { min-width: 0; margin-bottom: 14px; }
.field label { margin-bottom: 6px; color: #484d56; font-size: var(--type-label); font-weight: 600; line-height: 1.4; }
.field-grid { gap: 14px; }
.toggle { width: 38px; height: 22px; border: 1px solid #cfd3da; border-radius: 20px; background: #dfe2e7; transition: background-color var(--duration) ease; }
.toggle:after { top: 2px; left: 2px; width: 16px; height: 16px; box-shadow: 0 1px 2px #0002; }
.toggle:checked { border-color: var(--red); background: var(--red); }
.toggle:checked:after { left: 18px; }
.preview-hero { height: 164px; background: #e9ebee; }
.preview-hero span { font-size: 18px; line-height: 1.3; }
.preview-info { padding: 16px; }
.url { overflow-wrap: anywhere; padding: 9px 11px; border-color: var(--line); border-radius: 7px; background: #f8f9fb; color: var(--text-secondary); font-size: var(--type-caption); }

/* Translations, assets, leads and governance */
.translations { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.trans-card { min-width: 0; gap: 11px; padding: 15px; border-radius: 11px; }
.flag { font-size: 20px; }
.trans-num { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.trans-label { color: var(--text-secondary); font-size: var(--type-caption); line-height: 1.45; }
.media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.media-card { overflow: hidden; border-radius: 11px; }
.media-img { height: auto; aspect-ratio: 16 / 10; overflow: hidden; background: #eef0f2; }
.media-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 240ms ease; }
.media-card:hover .media-img img { transform: scale(1.025); }
.media-details { padding: 13px; }
.media-name { overflow: hidden; color: #282b31; font-size: var(--type-label); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.media-meta { align-items: center; gap: 8px; margin-top: 6px; color: var(--text-secondary); font-size: var(--type-caption); }
.lead-row { cursor: pointer; transition: background-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
.lead-row:hover { background: #f8f9fb; }
.lead-row.selected { background: #fff6f7; box-shadow: inset 3px 0 var(--red); }
.lead-avatar { width: 34px; height: 34px; background: #f2e6e3; color: #75463f; font-size: var(--type-caption); }
.lead-name { color: #282b31; font-size: var(--type-label); font-weight: 600; }
.lead-email { color: var(--text-secondary); font-size: var(--type-caption); overflow-wrap: anywhere; }
.lead-detail { padding: 20px; }
.lead-profile { gap: 12px; padding-bottom: 16px; border-color: var(--line); }
.lead-profile .lead-avatar { width: 44px; height: 44px; font-size: var(--type-label); }
.detail-label { margin: 16px 0 6px; color: var(--text-secondary); font-size: 11.5px; font-weight: 700; letter-spacing: .055em; }
.detail-value { color: #343840; font-size: var(--type-label); line-height: 1.5; overflow-wrap: anywhere; }
.note-line { gap: 8px; }
.timeline { margin: 13px 0 0 5px; padding-left: 14px; color: #565c65; font-size: var(--type-caption); line-height: 1.5; }
.timeline span { margin-top: 4px; color: var(--text-subtle); font-size: var(--type-caption); }
.setting-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.setting-card { padding: 19px; transition: border-color var(--duration) ease, box-shadow var(--duration) ease, transform var(--duration) ease; }
.setting-card:hover { border-color: #d7dbe1; box-shadow: var(--shadow-1); transform: translateY(-1px); }
.setting-icon { width: 36px; height: 36px; margin-bottom: 12px; border: 1px solid #f1dce0; border-radius: 9px; background: #fff6f7; color: var(--red); }
.setting-title { color: #25282e; font-size: var(--type-card); font-weight: 600; }
.setting-desc { min-height: 42px; margin: 5px 0 14px; color: var(--text-secondary); font-size: var(--type-caption); line-height: 1.5; }

/* Dialogs, feedback and secondary controls */
.modal-backdrop { padding: 20px; background: rgba(17, 19, 23, .56); backdrop-filter: blur(4px); }
.modal { width: min(560px, 100%); max-height: min(92vh, 900px); border: 1px solid rgba(255,255,255,.7); border-radius: 14px; box-shadow: var(--shadow-2); }
.modal-head { gap: 18px; padding: 19px 22px 15px; border-color: #e9ebef; }
.modal-title { color: #202329; font-size: 20px; font-weight: 600; }
.modal-desc { margin-top: 4px; color: var(--text-secondary); font-size: var(--type-caption); line-height: 1.5; }
.modal-body { padding: 20px 22px; }
.modal-foot { gap: 8px; padding: 14px 22px; border-color: #e9ebef; background: #f8f9fb; }
.toast-stack { right: 24px; bottom: 24px; gap: 9px; }
.toast { max-width: min(440px, calc(100vw - 40px)); padding: 13px 16px; border: 1px solid #35383e; border-radius: 10px; background: #202227; color: #fff; font-size: var(--type-label); line-height: 1.5; box-shadow: var(--shadow-2); }
.empty { padding: 36px 20px; color: var(--text-secondary); font-size: var(--type-body); line-height: 1.55; }
.upload { padding: 28px 20px; border-color: #cfd3da; border-radius: 10px; color: var(--text-secondary); font-size: var(--type-body); line-height: 1.55; transition: background-color var(--duration) ease, border-color var(--duration) ease; }
.upload:hover { border-color: #d4818c; background: #fff8f9; }
.upload svg { color: var(--red); }

/* Responsive layouts */
@media (min-width: 1600px) {
  main { padding-right: 42px; padding-left: 42px; }
}
@media (max-width: 1200px) {
  main { padding-right: 26px; padding-left: 26px; }
  .topbar { padding-right: 26px; padding-left: 26px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pages-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .setting-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .sidebar { width: 252px; }
  .main-shell { margin-left: 252px; }
  main { padding-right: 22px; padding-left: 22px; }
  .topbar { padding-right: 22px; padding-left: 22px; }
  .bottom-grid { grid-template-columns: minmax(0, 1.45fr) minmax(260px, .9fr); }
}
@media (max-width: 900px) {
  .sidebar { width: min(280px, calc(100vw - 44px)); transform: translateX(-105%); box-shadow: 12px 0 32px rgba(10, 12, 16, .22); }
  .sidebar.open { transform: translateX(0); }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { padding-right: 22px; padding-left: 22px; }
  .crumbs { display: none; }
  main { padding: 26px 22px 42px; }
  .dash-grid, .bottom-grid, .editor-layout, .lead-layout { grid-template-columns: minmax(0, 1fr); }
  .dash-grid, .bottom-grid { gap: 14px; }
  .editor-layout, .lead-layout { gap: 14px; }
  .setting-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .topbar { height: 62px; padding-right: 15px; padding-left: 15px; }
  .top-actions { gap: 4px; }
  .site-link { min-width: 40px; padding: 0 10px; }
  .site-link span { display: none; }
  .top-actions > span[style] { display: none; }
  main { padding: 22px 16px 36px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 20px; }
  .page-heading h1 { font-size: var(--type-page-mobile); }
  .page-desc { max-width: 48ch; font-size: var(--type-label); }
  .heading-actions { width: 100%; flex-wrap: wrap; gap: 7px; }
  .heading-actions .btn { flex: 1 1 auto; min-width: 120px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filters { width: 100%; }
  .search { min-width: 0; flex: 1; }
  .filters .select { max-width: 48%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat-num { font-size: var(--type-stat-mobile); }
  .pages-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .setting-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .translations { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .field-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .editor-main, .lead-detail { padding: 16px; }
  .chart-card { min-height: 0; padding: 16px; }
  .chart { height: 150px; }
  .chart-card .card-head { align-items: flex-start; flex-wrap: wrap; }
  .chart-card .legend { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .card-head { align-items: flex-start; }
  .table-card { border-radius: 10px; }
  .table-wrap { overflow-x: auto; }
  .modal-backdrop { align-items: flex-end; padding: 8px; }
  .modal { width: 100%; max-height: calc(100dvh - 16px); border-radius: 14px 14px 0 0; }
  .modal-head, .modal-body { padding-right: 16px; padding-left: 16px; }
  .modal-foot { flex-wrap: wrap; padding: 12px 16px; }
  .modal-foot .btn { flex: 1; }
  .toast-stack { right: 12px; bottom: 12px; left: 12px; }
  .toast { max-width: 100%; }
}
@media (max-width: 480px) {
  :root { --type-page-mobile: 24px; --type-stat-mobile: 24px; }
  .topbar { padding-right: 10px; padding-left: 10px; }
  .top-actions { gap: 2px; }
  .icon-button, .mobile-menu { width: 36px; height: 36px; }
  .locale-button { min-height: 36px; padding-right: 6px; padding-left: 6px; font-size: var(--type-caption); }
  .top-avatar { width: 30px; height: 30px; }
  main { padding-right: 13px; padding-left: 13px; }
  .heading-actions .btn { min-width: 0; padding-right: 9px; padding-left: 9px; font-size: var(--type-caption); }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
  .stat-top { align-items: flex-start; gap: 6px; font-size: var(--type-caption); }
  .stat-icon { width: 27px; height: 27px; flex: none; }
  .stat-foot { font-size: 11.5px; }
  .pages-grid, .media-grid, .setting-grid { grid-template-columns: minmax(0, 1fr); }
  .cover { height: 150px; }
  .media-img { aspect-ratio: 16 / 9; }
  .setting-desc { min-height: 0; }
  .section-head { flex-wrap: wrap; padding: 11px; }
  .section-head strong { min-width: 60%; }
  .section-body { padding: 12px; }
  .pagination { align-items: flex-start; flex-direction: column; }
  th, td { padding-right: 11px; padding-left: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Desktop sidebar collapse */
.desktop-sidebar-toggle { display: inline-flex; flex: none; }
.main-shell { transition: margin-left 220ms ease; }
@media (min-width: 901px) {
  body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
  body.sidebar-collapsed .main-shell { margin-left: 0; }
}
@media (max-width: 900px) {
  .desktop-sidebar-toggle { display: none; }
  .mobile-menu { display: inline-flex; }
}
/* Keep the dashboard's compact table legible without hiding status values. */
@media (min-width: 1001px) {
  .bottom-grid .table-wrap table { table-layout: fixed; }
  .bottom-grid .table-wrap th:nth-child(1), .bottom-grid .table-wrap td:nth-child(1) { width: 48%; }
  .bottom-grid .table-wrap th:nth-child(2), .bottom-grid .table-wrap td:nth-child(2) { width: 15%; }
  .bottom-grid .table-wrap th:nth-child(3), .bottom-grid .table-wrap td:nth-child(3) { width: 19%; }
  .bottom-grid .table-wrap th:nth-child(4), .bottom-grid .table-wrap td:nth-child(4) { width: 18%; }
  .bottom-grid .table-wrap td:first-child .entity { min-width: 0; }
  .bottom-grid .table-wrap td:first-child .entity > div { min-width: 0; }
  .bottom-grid .table-wrap td:first-child .entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}


/* Administrator profile */
.profile-trigger {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--duration-fast) ease;
}
.profile-trigger:hover { background: rgba(255,255,255,.055); }
.top-avatar {
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  transition: box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.top-avatar:hover { box-shadow: 0 0 0 4px rgba(201,21,44,.1); transform: translateY(-1px); }
.profile-trigger .avatar img,
.top-avatar img,
.admin-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.admin-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr);
  gap: 18px;
  align-items: start;
}
.admin-profile-main, .admin-profile-aside { display: grid; gap: 16px; min-width: 0; }
.admin-profile-form, .admin-security-card { padding: 20px; }
.admin-profile-form .field-grid { margin-top: 18px; }
.admin-profile-form .field { min-width: 0; }
.admin-profile-overview { padding: 20px; }
.profile-overview-main { display: flex; align-items: center; gap: 15px; min-width: 0; }
.admin-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #eee8e6;
  color: #713e38;
  box-shadow: 0 0 0 1px var(--line);
  font-size: 22px;
  font-weight: 700;
}
.profile-overview-copy { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.profile-overview-name { overflow-wrap: anywhere; font-size: 17px; font-weight: 700; line-height: 1.3; }
.profile-overview-email { overflow-wrap: anywhere; color: var(--text-secondary); font-size: var(--type-caption); }
.avatar-upload { margin-top: 16px; cursor: pointer; }
.profile-avatar-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.avatar-upload:focus-within, .profile-avatar-input:focus-visible + .profile-avatar-help { outline: 3px solid var(--red); }
.profile-avatar-help { margin-top: 7px; color: var(--text-subtle); font-size: var(--type-caption); }
.profile-security-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.profile-setting-title { color: var(--ink); font-size: var(--type-label); font-weight: 650; }
.profile-setting-desc { margin: 3px 0 0; color: var(--text-secondary); font-size: var(--type-caption); }
.profile-action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-meta-list { display: grid; gap: 0; }
.profile-meta-list > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 11px 0; border-top: 1px solid var(--line); }
.profile-meta-list > div:first-child { border-top: 0; }
.profile-meta-list span { color: var(--text-secondary); font-size: var(--type-caption); }
.profile-meta-list strong { max-width: 58%; color: var(--ink); font-size: var(--type-caption); font-weight: 600; text-align: right; }
.profile-meta-list .profile-status { color: var(--green); }
.session-indicator { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #1d9c62; box-shadow: 0 0 0 4px #e9f7ef; }
.profile-session { display: flex; align-items: center; gap: 11px; padding-top: 14px; border-top: 1px solid var(--line); }
.session-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 9px; background: var(--surface-subtle); color: var(--muted); }
.profile-session > div { display: grid; gap: 2px; min-width: 0; }
.profile-session strong { font-size: var(--type-label); font-weight: 600; }
.profile-session span:not(.session-icon) { color: var(--text-secondary); font-size: var(--type-caption); }
@media (max-width: 900px) {
  .admin-profile-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-profile-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-profile-overview { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .admin-profile-aside { grid-template-columns: minmax(0, 1fr); }
  .admin-profile-form, .admin-security-card, .admin-profile-overview { padding: 15px; }
  .profile-overview-main { align-items: flex-start; }
  .admin-avatar { flex-basis: 62px; width: 62px; height: 62px; font-size: 19px; }
  .profile-security-row { align-items: flex-start; flex-wrap: wrap; }
  .profile-action-row .btn { flex: 1 1 auto; }
}


/* Table sequence and user controls */
.row-number {
  width: 52px;
  min-width: 52px;
  color: var(--text-subtle);
  text-align: center !important;
  font-size: var(--type-caption);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.user-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.user-actions .btn { min-height: 31px; padding: 5px 9px; }
.btn-danger { color: var(--red); border-color: #f0cbd1; background: #fff; }
.btn-danger:hover { border-color: var(--red); background: var(--redp); }
