/* ============================================================
   The Indian Reporter — Admin Theme
   ============================================================ */
:root {
  --navy: #061a40;
  --navy-2: #0a2456;
  --maroon: #a32626;
  --gold: #c0871f;
  --teal: #275752;
  --bg: #eef1f7;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: 8px;
  transition: background .15s, color .15s, box-shadow .2s, transform .15s;
}
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); }
.btn--maroon { background: var(--maroon); color: #fff; box-shadow: 0 6px 16px rgba(163,38,38,.28); }
.btn--maroon:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(163,38,38,.36); }
.btn--gold { background: linear-gradient(135deg,#dcab4e,var(--gold)); color: #1b1450; }
.btn--ghost { border: 1px solid var(--border); color: var(--navy); background: #fff; }
.btn--ghost:hover { border-color: var(--navy); }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--block { width: 100%; justify-content: center; }

/* ============================================================
   App shell
   ============================================================ */
.admin { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px; flex: none;
  background: var(--navy);
  color: rgba(255,255,255,.78);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar__logo { width: 40px; height: 40px; border-radius: 10px; flex: none; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.sidebar__title { font-family: var(--serif); font-size: 21px; color: #fff; line-height: 1.1; }
.sidebar__title .the { color: #e0857f; }
.sidebar__sub {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-top: 4px; font-weight: 600;
}
.sidebar__nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.sidebar__nav::-webkit-scrollbar { width: 8px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 8px; }
.sidebar__nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
.sidebar__nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,.78);
  transition: background .15s, color .15s;
}
.sidebar__nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar__nav a.is-active { background: var(--maroon); color: #fff; }
.sidebar__nav a .ico { width: 20px; text-align: center; font-size: 15px; }
.sidebar__foot {
  padding: 16px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px; line-height: 1.6; color: rgba(255,255,255,.55);
}
.sidebar__foot-rights {
  font-size: 11px; letter-spacing: .04em; color: rgba(255,255,255,.4);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---- Topbar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  position: sticky; top: 0; z-index: 10;
}
.topbar__title h1 { font-size: 24px; color: var(--ink); }
.topbar__title p { font-size: 13px; color: var(--muted); }
.topbar__right { display: flex; align-items: center; gap: 16px; }
.topbar__user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--maroon), #7e1f1f);
  color: #fff; font-family: var(--serif); font-size: 17px;
}
.topbar__user b { font-size: 14px; display: block; }
.topbar__user span { font-size: 12px; color: var(--muted); }

.content { padding: 28px; }

/* ============================================================
   Stat cards
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 14px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--navy);
}
.stat-card--maroon::before { background: var(--maroon); }
.stat-card--gold::before { background: var(--gold); }
.stat-card--teal::before { background: var(--teal); }
.stat-icon {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px; font-size: 20px;
  background: var(--bg);
}
.stat-value { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--ink); }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 6px; }
.stat-delta { font-size: 12px; color: var(--teal); margin-top: 6px; font-weight: 600; }

/* ============================================================
   Panels / tables / chart
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; }

.panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.panel + .panel { margin-top: 18px; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.panel__head h3 { font-size: 19px; }
.panel__head a { font-size: 13px; font-weight: 600; color: var(--maroon); }
/* Buttons inside a panel head keep their own colours (override link colour) */
.panel__head a.btn--maroon, .panel__head a.btn--navy { color: #fff; }
.panel__head a.btn--ghost { color: var(--navy); }
.panel__body { padding: 6px 8px 10px; }

.adm-table { width: 100%; border-collapse: collapse; }
.adm-table th {
  text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: 12px;
  border-bottom: 1px solid var(--border);
}
.adm-table td { padding: 13px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: #fafbfe; }
.adm-table .t-strong { font-weight: 600; color: var(--ink); }
.adm-table .t-muted { color: var(--muted); font-size: 13px; }

.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .02em;
}
.badge--published, .badge--active { background: #e7f5ec; color: #1f7a45; }
.badge--review { background: #fdf0e3; color: #b5701a; }
.badge--draft { background: #eef0f4; color: #555f6e; }
.badge--scheduled { background: #e8eefb; color: #2a4ba8; }
.badge--unsubscribed { background: #fdeaea; color: #b5302f; }

/* Chart */
.chart { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding: 16px 20px 8px; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart__bar {
  width: 100%; max-width: 38px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: filter .15s;
}
.chart__col:hover .chart__bar { filter: brightness(1.25); }
.chart__bar span {
  position: absolute; top: -20px; left: 0; right: 0; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--navy);
}
.chart__day { font-size: 12px; color: var(--muted); }

/* Quick actions */
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 20px; }
.qa {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--navy);
  transition: border-color .15s, background .15s, transform .15s;
}
.qa:hover { border-color: var(--maroon); background: #fffafa; transform: translateY(-2px); }
.qa .ico { font-size: 18px; }

/* Activity list */
.activity { padding: 6px 20px 14px; }
.activity li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.activity li:last-child { border-bottom: 0; }
.activity__tag {
  flex: none; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--navy); padding: 3px 9px; border-radius: 6px; min-width: 78px; text-align: center;
}
.activity__detail { font-size: 14px; color: var(--ink); }
.activity__meta { font-size: 12px; color: var(--muted); }
.activity__time { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ============================================================
   Login
   ============================================================ */
.login {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.login__aside {
  background:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.5px 1.5px at 70% 60%, rgba(255,255,255,.4), transparent),
    radial-gradient(2px 2px at 40% 80%, rgba(255,240,210,.5), transparent),
    linear-gradient(160deg, var(--navy-2), var(--navy) 60%, #1b1450);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center;
}
/* Brand wordmark on the dark aside (frontend masthead, light on navy) */
.login-brand__title { font-family: var(--serif); font-size: 46px; line-height: 1; color: #fff; letter-spacing: .01em; }
.login-brand__title .the { color: #e0857f; }
.login-brand__sub { font-family: var(--serif); font-size: 17px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.9); margin-top: 8px; }
.login-brand__tagline { color: var(--gold); font-size: 13px; font-weight: 600; margin-top: 16px; max-width: 40ch; }
.login__aside p { color: rgba(255,255,255,.78); margin-top: 18px; max-width: 42ch; line-height: 1.6; }
.login__aside .pts { margin-top: 24px; display: grid; gap: 10px; }
.login__aside .pts li { display: flex; gap: 10px; color: rgba(255,255,255,.85); font-size: 14px; }
.login__aside .pts li::before { content: "✦"; color: var(--gold); }

.login__main { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 400px; }
/* Frontend wordmark logo on the card (matches the public masthead exactly) */
.login-logo { display: block; text-align: center; margin-bottom: 26px; }
.login-logo__title { display: block; font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--ink); letter-spacing: .01em; }
.login-logo__title .ink-red { color: var(--maroon); }
.login-logo__sub { display: block; font-family: var(--serif); font-size: 13px; line-height: 1; letter-spacing: .22em; text-transform: uppercase; color: var(--ink); margin-top: 7px; }
.login-card h2 { font-size: 28px; color: var(--ink); }
.login-card .sub { color: var(--muted); margin: 6px 0 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1px solid var(--border); border-radius: 9px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(6,26,64,.1); }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.field-row label { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 0; font-weight: 500; color: var(--muted); white-space: nowrap; }
.field-row input[type="checkbox"] { width: 16px; height: 16px; flex: none; padding: 0; margin: 0; }
.field-row a { color: var(--maroon); font-weight: 600; white-space: nowrap; }

.demo-box {
  margin-top: 22px; padding: 16px;
  background: #fbf7ee; border: 1px dashed var(--gold); border-radius: 10px;
}
.demo-box .h { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.demo-box .row { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.demo-box .row b { font-family: var(--sans); }
.demo-box code { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; font-size: 13px; }
.demo-fill { margin-top: 10px; font-size: 13px; color: var(--navy); font-weight: 600; }

.alert {
  background: #fdeaea; border: 1px solid #f3c0c0; color: #9b2424;
  padding: 11px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 16px;
}

.empty-hint { padding: 18px 20px; color: var(--muted); font-size: 13px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login__aside { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .admin { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; flex-direction: row; flex-wrap: wrap; }
  .sidebar__brand { width: 100%; }
  .sidebar__nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .sidebar__nav a { padding: 8px 12px; }
  .sidebar__nav a .label { display: none; }
  .sidebar__foot { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
  .qa-grid { grid-template-columns: 1fr; }
  .content { padding: 18px; }
  .topbar { padding: 12px 18px; }
}

/* ============================================================
   Sidebar dropdown group (CMS Management)
   ============================================================ */
.sidebar__group { margin-top: 4px; }
.sidebar__group-label {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,.78);
  cursor: pointer; list-style: none; user-select: none;
  transition: background .15s, color .15s;
}
.sidebar__group-label::-webkit-details-marker { display: none; }
.sidebar__group-label:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar__group-label .ico { width: 20px; text-align: center; font-size: 15px; }
.sidebar__group-label .caret { margin-left: auto; color: rgba(255,255,255,.55); transition: transform .2s ease; }
.sidebar__group[open] > .sidebar__group-label { color: #fff; background: rgba(255,255,255,.05); }
.sidebar__group[open] > .sidebar__group-label .caret { transform: rotate(180deg); color: #fff; }

/* Submenu with a connecting guide line */
.sidebar__submenu {
  display: flex; flex-direction: column;
  margin: 4px 0 4px 23px;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,.12);
}
.sidebar__submenu a {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 7px;
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,.62);
  transition: color .15s, background .15s;
}
.sidebar__submenu a .dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: rgba(255,255,255,.32); transition: background .15s, box-shadow .15s;
}
.sidebar__submenu a:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar__submenu a:hover .dot { background: rgba(255,255,255,.7); }
.sidebar__submenu a.is-active {
  color: #fff; font-weight: 600;
  background: linear-gradient(90deg, rgba(192,135,31,.22), rgba(192,135,31,.05));
}
.sidebar__submenu a.is-active .dot {
  background: var(--gold); box-shadow: 0 0 0 3px rgba(192,135,31,.22);
}
.sidebar__submenu a.is-disabled { color: rgba(255,255,255,.34); pointer-events: none; }
.sidebar__submenu a .soon {
  margin-left: auto; font-size: 9px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  padding: 1px 6px; border-radius: 999px;
}

/* ============================================================
   CMS — Home Page layout manager
   ============================================================ */
.flash {
  background: #e7f5ec; border: 1px solid #b6e0c4; color: #1f7a45;
  padding: 12px 16px; border-radius: 9px; margin-bottom: 18px; font-weight: 600;
}
.cms-section { margin-bottom: 18px; }
.cms-section__desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cms-current { font-size: 13px; color: var(--muted); white-space: nowrap; }
.cms-current b { color: var(--navy); }
.cms-options {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 18px 20px;
}
.lyt {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border: 1.5px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: border-color .15s, box-shadow .2s, background .15s;
}
.lyt:hover { border-color: var(--navy); }
.lyt input { position: absolute; opacity: 0; pointer-events: none; }
.lyt__check {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff; transition: .15s;
}
.lyt.is-selected { border-color: var(--maroon); background: #fffafa; box-shadow: 0 8px 20px rgba(163,38,38,.12); }
.lyt.is-selected .lyt__check { border-color: var(--maroon); background: var(--maroon); box-shadow: inset 0 0 0 3px #fff; }
.lyt__name { font-size: 14px; font-weight: 600; color: var(--ink); }
.lyt__desc { font-size: 12px; color: var(--muted); line-height: 1.4; }

.cms-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 20px; margin-top: 8px; box-shadow: 0 -6px 20px rgba(0,0,0,.05);
}
.cms-bar__hint { font-size: 13px; color: var(--muted); }
.cms-bar > div { display: flex; gap: 10px; }

/* ---- Wireframe previews ---- */
.wf {
  height: 74px; background: #eef1f7; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px; display: flex; gap: 6px; overflow: hidden;
}
.lyt.is-selected .wf { background: #fdeeee; border-color: #f0c9c9; }
.wf-c { display: flex; flex-direction: column; gap: 4px; }
.wf-c.grow { flex: 1; }
.wf-c.narrow { width: 24%; }
.wf-c.side { width: 34%; }
.wf .b { background: rgba(6,26,64,.2); border-radius: 3px; height: 26px; }
.wf .b.tall { height: 34px; }
.wf .b.xl { height: 46px; }
.wf .b.sm { height: 18px; }
.wf .l { height: 5px; background: rgba(6,26,64,.16); border-radius: 2px; }
.wf .l.s { width: 60%; }
.lyt.is-selected .wf .b { background: rgba(163,38,38,.25); }
.lyt.is-selected .wf .l { background: rgba(163,38,38,.2); }
.wf .btn { width: 32px; height: 14px; background: var(--maroon); border-radius: 3px; flex: none; }

.wf--magazine .wf-quad {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 4px; width: 44%;
}
.wf-quad i { background: rgba(6,26,64,.2); border-radius: 3px; }
.lyt.is-selected .wf-quad i { background: rgba(163,38,38,.25); }

.wf-rows { display: flex; flex-direction: column; gap: 6px; width: 100%; justify-content: center; }
.wf-rows.tight { gap: 7px; }
.wf-li { display: flex; gap: 6px; align-items: center; }
.wf-li .th { width: 30px; height: 16px; background: rgba(6,26,64,.2); border-radius: 3px; flex: none; }
.lyt.is-selected .wf-li .th { background: rgba(163,38,38,.25); }
.wf-li span { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.wf--carousel { flex-direction: column; }
.dots { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(6,26,64,.25); }
.dots i.on { background: var(--maroon); }

.wf-tiles { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; gap: 5px; width: 100%; }
.wf-tiles i { background: rgba(6,26,64,.2); border-radius: 3px; }
.lyt.is-selected .wf-tiles i { background: rgba(163,38,38,.25); }

.chips { display: flex; gap: 4px; }
.chips i { height: 9px; width: 22px; border-radius: 5px; background: rgba(6,26,64,.22); }
.wf-mini { display: flex; gap: 5px; margin-top: 6px; }
.wf-mini .b { flex: 1; height: 30px; }

.wf--banner { align-items: center; }
.wf-banner {
  width: 100%; height: 42px; background: rgba(6,26,64,.18); border-radius: 6px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 10px;
}
.wf-banner .l { width: 46%; }
.wf--boxed { align-items: center; justify-content: center; }
.wf-boxed {
  width: 56%; height: 50px; background: #fff; border: 1px solid var(--border);
  border-radius: 6px; display: flex; flex-direction: column; gap: 6px;
  align-items: center; justify-content: center; padding: 8px;
}
.wf-boxed .b.sm { width: 70%; }
.wf--bar { align-items: center; }
.wf-bar {
  width: 100%; height: 22px; background: rgba(6,26,64,.14); border-radius: 6px;
  display: flex; align-items: center; gap: 6px; padding: 0 7px;
}
.wf-bar .l { flex: 1; }

@media (max-width: 1100px) {
  .cms-options { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cms-options { grid-template-columns: 1fr; }
  .cms-bar { flex-direction: column; align-items: stretch; }
}

/* ============================================================
   RBAC — roles & users forms
   ============================================================ */
.flash--error { background: #fdeaea; border-color: #f3c0c0; color: #9b2424; }

.form-body { padding: 20px 24px; }
.form-body .field { margin-bottom: 16px; max-width: 520px; }
.field-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.field select {
  width: 100%; padding: 11px 14px; font-size: 15px;
  border: 1px solid var(--border); border-radius: 9px; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(6,26,64,.1); }

.mod-group { margin-bottom: 18px; }
.mod-group__head {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mod-check {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 9px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.mod-check:hover { border-color: var(--navy); }
.mod-check input { position: absolute; opacity: 0; pointer-events: none; }
.mod-check__box {
  width: 18px; height: 18px; flex: none; border: 2px solid var(--border-strong);
  border-radius: 5px; display: grid; place-items: center; transition: .15s;
}
.mod-check__box::after { content: "✓"; font-size: 12px; line-height: 1; color: #fff; opacity: 0; }
.mod-check__name { font-size: 14px; font-weight: 500; }
.mod-check:has(input:checked) { border-color: var(--maroon); background: #fffafa; }
.mod-check:has(input:checked) .mod-check__box { background: var(--maroon); border-color: var(--maroon); }
.mod-check:has(input:checked) .mod-check__box::after { opacity: 1; }

@media (max-width: 900px) { .mod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mod-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Articles + Media Library
   ============================================================ */
.field textarea, .art-textarea {
  width: 100%; padding: 11px 14px; font-size: 15px; font-family: var(--sans);
  border: 1px solid var(--border); border-radius: 9px; background: #fff; outline: none;
  resize: vertical; line-height: 1.5;
}
.field textarea:focus, .art-textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(6,26,64,.1); }

/* Status filter tabs */
.filter-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-tab {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  color: var(--muted); background: var(--paper); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 999px;
}
.filter-tab:hover { border-color: var(--navy); color: var(--navy); }
.filter-tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-tab__count { font-size: 12px; background: rgba(0,0,0,.08); padding: 1px 8px; border-radius: 999px; }
.filter-tab.is-active .filter-tab__count { background: rgba(255,255,255,.2); }

.art-thumb {
  width: 48px; height: 48px; border-radius: 8px; background: var(--bg) center/cover no-repeat;
  border: 1px solid var(--border);
}

/* Article editor 2-column layout */
.art-editor { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.art-editor__side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 80px; }
.art-editor__main > .panel { margin-top: 18px; }
.art-editor__main > .panel:first-of-type { margin-top: 0; }

.art-title {
  width: 100%; font-family: var(--serif); font-size: 30px; color: var(--ink);
  border: none; border-bottom: 2px solid var(--border); background: transparent;
  padding: 6px 2px; outline: none; margin-bottom: 10px;
}
.art-title:focus { border-bottom-color: var(--maroon); }
.art-slug { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.art-slug input { flex: 1; border: 1px solid var(--border); border-radius: 7px; padding: 7px 10px; font-size: 13px; outline: none; }
.art-slug input:focus { border-color: var(--navy); }

/* Image picker (OG) */
.img-picker { display: flex; gap: 14px; align-items: flex-start; }
.img-picker__preview { width: 120px; height: 70px; border-radius: 8px; background: var(--bg) center/cover no-repeat; border: 1px solid var(--border); flex: none; }
.img-picker__btns { display: flex; flex-direction: column; gap: 8px; }

/* Featured preview */
.feat-preview {
  width: 100%; aspect-ratio: 16/9; border-radius: 8px; border: 1px dashed var(--border);
  background: var(--bg) center/cover no-repeat; display: grid; place-items: center;
}
.feat-preview__empty { font-size: 13px; color: var(--muted); }
.feat-preview[style*="url"] .feat-preview__empty { display: none; }

/* Media drop zone (library page) */
.media-drop {
  border: 2px dashed var(--border-strong); border-radius: 12px; padding: 30px; text-align: center;
  color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.media-drop:hover, .media-drop.is-drop { border-color: var(--maroon); background: #fffafa; }
.media-drop__icon { font-size: 30px; margin-bottom: 8px; }

/* Media library grid (page) */
.media-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; padding: 6px; }
.media-card { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.media-card__img { aspect-ratio: 4/3; background: var(--bg) center/cover no-repeat; display: grid; place-items: center; }
.media-card__type { font-size: 12px; font-weight: 700; color: var(--muted); }
.media-card__meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.media-card__name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-card__sub { font-size: 12px; color: var(--muted); }
.media-card__actions { display: flex; gap: 6px; margin-top: 8px; }
.media-card__actions form { display: inline; }

/* Media modal (picker) */
.media-modal { position: fixed; inset: 0; z-index: 100; background: rgba(6,20,40,.55); display: none; padding: 40px; }
.media-modal.is-open { display: grid; place-items: center; }
.media-modal__panel { width: min(900px, 96vw); max-height: 86vh; background: #fff; border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.media-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.media-modal__close { font-size: 18px; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; }
.media-modal__close:hover { background: var(--bg); color: var(--ink); }
.media-modal__bar { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.media-modal__hint { font-size: 13px; color: var(--muted); }
.media-modal__body { padding: 16px 20px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.media-modal__body.is-drop { background: #fffafa; outline: 2px dashed var(--maroon); outline-offset: -8px; }
.media-tile { display: flex; flex-direction: column; gap: 6px; text-align: left; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; padding: 0 0 6px; transition: border-color .15s, transform .15s; }
.media-tile:hover { border-color: var(--maroon); transform: translateY(-2px); }
.media-tile__img { aspect-ratio: 1/1; background: var(--bg) center/cover no-repeat; }
.media-tile__name { font-size: 11px; color: var(--muted); padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pager */
.pager { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 18px; }
.pager__btn { font-size: 13px; font-weight: 600; color: var(--navy); background: var(--paper); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; }
.pager__btn:hover { border-color: var(--navy); }
.pager__btn.is-disabled { color: var(--border-strong); pointer-events: none; }
.pager__info { font-size: 13px; color: var(--muted); }

@media (max-width: 1024px) {
  .art-editor { grid-template-columns: 1fr; }
  .art-editor__side { position: static; }
}

/* ============================================================
   Title input + Tom Select (searchable dropdowns)
   ============================================================ */
.art-title-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.art-title {
  width: 100%; font-family: var(--serif); font-size: 28px; color: var(--ink);
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  padding: 10px 14px; outline: none; margin-bottom: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.art-title:hover { border-color: var(--border-strong); }
.art-title:focus { border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(163,38,38,.12); }

.ts-wrapper { font-family: var(--sans); }
.ts-control {
  border: 1px solid var(--border) !important; border-radius: 9px !important;
  padding: 6px 10px !important; min-height: 42px; box-shadow: none !important;
}
.ts-wrapper.focus .ts-control { border-color: var(--navy) !important; box-shadow: 0 0 0 3px rgba(6,26,64,.1) !important; }
.ts-control .item { background: var(--navy) !important; color: #fff !important; border-radius: 6px !important; font-size: 13px; padding: 3px 8px !important; }
.ts-control .item .remove { border-left-color: rgba(255,255,255,.3) !important; color: #fff !important; }
/* Dropdown is rendered at <body> (dropdownParent) and floats above modals/sticky bars */
.ts-dropdown { z-index: 4000 !important; border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 14px 34px rgba(6,26,64,.18); }
.ts-dropdown .active { background: var(--highlight); color: var(--ink); }
.ts-dropdown .create { color: var(--maroon); }

/* ============================================================
   Trix editor + upload spinner
   ============================================================ */
trix-editor.trix-content {
  min-height: 340px; border: 1px solid var(--border); border-radius: 0 0 9px 9px;
  padding: 14px 16px; font-size: 15px; line-height: 1.65; background: #fff;
}
trix-editor.trix-content:empty:not(:focus)::before { color: var(--muted); }
trix-editor.trix-content:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(6,26,64,.1); }
trix-editor.trix-content h1 { font-family: var(--serif); font-size: 24px; margin: 8px 0; }
trix-toolbar { margin-bottom: 0; }
trix-toolbar .trix-button-group { border-color: var(--border); border-radius: 7px; }
trix-toolbar .trix-button--icon { height: 1.8rem; }
.trix-content img { max-width: 100%; height: auto; border-radius: 6px; }

.spinner {
  display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px;
  border: 2px solid rgba(0,0,0,.15); border-top-color: var(--maroon); border-radius: 50%;
  animation: ir-spin .7s linear infinite;
}
@keyframes ir-spin { to { transform: rotate(360deg); } }
.media-drop.is-uploading { border-color: var(--maroon); background: #fffafa; pointer-events: none; }
.media-modal__body.is-loading { opacity: .55; transition: opacity .15s; }

/* ============================================================
   Profile + clickable topbar user
   ============================================================ */
.avatar--img { background-size: cover; background-position: center; }
.topbar__user { border-radius: 10px; padding: 4px 10px 4px 4px; transition: background .15s; }
.topbar__user:hover { background: var(--bg); }
.profile-avatar { display: flex; align-items: center; gap: 22px; }
.profile-avatar__img {
  width: 96px; height: 96px; border-radius: 50%; flex: none;
  background: var(--navy) center/cover no-repeat; display: grid; place-items: center;
  color: #fff; font-family: var(--serif); font-size: 40px;
  box-shadow: 0 4px 14px rgba(6,26,64,.2);
}
.field input:disabled { background: var(--bg); color: var(--muted); }

/* Featured toggle row (category form) */
.toggle-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; cursor: pointer; }
.toggle-row input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.toggle-row b { color: var(--ink); }

/* Page subtitle + content-section repeater */
.art-subtitle { width: 100%; font-size: 16px; color: var(--ink); border: 1px solid var(--border); border-radius: 8px; padding: 9px 13px; outline: none; margin-bottom: 14px; }
.art-subtitle::placeholder { color: var(--muted); }
.art-subtitle:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(6,26,64,.08); }
.sec-block { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 14px; background: #fcfcfe; }
.sec-block__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sec-block__num { font-size: 12px; font-weight: 700; color: var(--navy); letter-spacing: .04em; text-transform: uppercase; }
.sec-block__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sec-block__preview { width: 90px; height: 54px; flex: none; }

/* Navigation menu builder */
.nav-item { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; background: #fcfcfe; }
.nav-item__grip { color: var(--muted); font-size: 14px; flex: none; padding: 0 2px; }
.nav-item__label { flex: 0 0 190px; }
.nav-item__url { flex: 1; min-width: 0; }
.nav-item input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; outline: none; font-family: var(--sans); }
.nav-item input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(6,26,64,.08); }
.nav-item__btn { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--muted); flex: none; font-size: 13px; }
.nav-item__btn:hover { border-color: var(--navy); color: var(--navy); }
.nav-item__btn--del:hover { border-color: var(--maroon); color: var(--maroon); }
.nav-add-select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 14px; font-family: var(--sans); background: #fff; outline: none; }
.nav-add-select:focus { border-color: var(--navy); }

/* Nav drag states */
.nav-item__grip { cursor: grab; }
.nav-item__grip:active { cursor: grabbing; }
.nav-item.is-dragging { opacity: .5; border-style: dashed; border-color: var(--navy); }

/* ---- Article home-page placement checkboxes ---- */
.placement-list { display: flex; flex-direction: column; gap: 2px; }
.placement-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--navy);
  transition: background .12s ease;
}
.placement-item:hover { background: #fffafa; }
.placement-item input[type="checkbox"] {
  width: 17px; height: 17px; accent-color: var(--maroon); flex: none; cursor: pointer;
}
.placement-item input:checked + span { color: var(--maroon); font-weight: 600; }

/* ============================================================
   Editorial workflow — badges, workflow bar, timeline, versions
   ============================================================ */

/* Status badge tones (full lifecycle) */
.badge--changes   { background: #fdf0e3; color: #b5701a; }
.badge--approved  { background: #e8eefb; color: #2a4ba8; }
.badge--archived  { background: #eceff3; color: #6b7280; }

/* Extra button tones used by transitions */
.btn--amber { background: #b5701a; color: #fff; }
.btn--amber:hover { background: #9c5f12; }
.btn--green { background: #1f7a45; color: #fff; }
.btn--green:hover { background: #186537; }

/* Workflow bar (top of the article editor) */
.ewf-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px 28px; margin-bottom: 20px; padding: 18px 22px;
  background: linear-gradient(180deg, #ffffff, #fbf9f4);
  border: 1px solid var(--border); border-left: 4px solid var(--maroon);
  border-radius: 14px; box-shadow: 0 6px 18px rgba(17,17,17,.05);
}
.ewf-bar--archived { border-left-color: #9aa1ab; opacity: .92; }
.ewf-bar__main { flex: 1 1 360px; min-width: 280px; }
.ewf-bar__heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ewf-bar__label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted, #8a8f98); }

/* Lifecycle stepper */
.wf-steps { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.wf-step { display: flex; align-items: center; gap: 8px; color: #9aa1ab; }
.wf-step__dot {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff;
  background: #fff; border: 2px solid #d7dae0; box-sizing: border-box;
}
.wf-step__name { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.wf-step.is-done { color: #1f7a45; }
.wf-step.is-done .wf-step__dot { background: #1f7a45; border-color: #1f7a45; }
.wf-step.is-current { color: var(--ink); }
.wf-step.is-current .wf-step__dot { background: var(--maroon); border-color: var(--maroon); box-shadow: 0 0 0 4px rgba(163,38,38,.16); }
.wf-step__bar { flex: 1; min-width: 16px; height: 2px; background: #e2e2e2; margin: 0 8px; border-radius: 2px; }
.wf-step__bar.is-done { background: #1f7a45; }

.ewf-bar__note {
  margin-top: 12px; font-size: 13px; color: #8a5a13;
  background: #fdf3e4; border: 1px solid #f4dcb4; padding: 8px 12px; border-radius: 8px;
}
.ewf-bar__note strong { color: #8a5a13; }

.ewf-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ewf-bar__actions form { display: flex; margin: 0; }
.ewf-bar__empty { font-size: 13px; color: var(--muted, #8a8f98); font-style: italic; }
.ewf-bar__history { font-size: 13px; font-weight: 600; color: var(--maroon); white-space: nowrap; margin-left: 4px; }
.ewf-bar__history:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .ewf-bar { flex-direction: column; align-items: stretch; }
  .ewf-bar__actions { justify-content: flex-start; }
}

/* Request-changes popover (note required) */
.wf-rc { position: relative; }
.wf-rc > summary { list-style: none; cursor: pointer; }
.wf-rc > summary::-webkit-details-marker { display: none; }
/* Reject / request-changes shown as a centred modal so it's never clipped. */
.wf-rc[open]::before {
  content: ""; position: fixed; inset: 0; background: rgba(10,16,30,.55); z-index: 999;
  animation: wfFade .12s ease;
}
@keyframes wfFade { from { opacity: 0 } to { opacity: 1 } }
.wf-rc__pop {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1000;
  width: min(540px, 94vw); background: #fff; overflow: hidden;
  border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.wf-rc__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--border); }
.wf-rc__head h4 { font-family: var(--serif); font-size: 18px; margin: 0; }
.wf-rc__close { width: 30px; height: 30px; border-radius: 8px; color: var(--muted); font-size: 15px; }
.wf-rc__close:hover { background: #ece6da; color: var(--ink); }
.wf-rc__body { padding: 18px 20px; }
.wf-rc__body label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.wf-rc__hint { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.wf-rc__body textarea { width: 100%; min-height: 150px; border: 1px solid var(--border); border-radius: 8px; padding: 11px; font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; }
.wf-rc__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: #fafafa; }
.wf-rc__pop .req { color: var(--maroon); }

/* Reject listing/event — native <dialog> modal (classifieds + events) */
.rejbtn { color: var(--maroon); }
.rejdlg {
  margin: auto; /* restores native modal centering killed by the global `* { margin: 0 }` reset */
  width: min(540px, 94vw); max-width: 94vw; padding: 0; border: none; border-radius: 16px;
  background: #fff; color: var(--ink); overflow: hidden;
  box-shadow: 0 30px 80px rgba(10, 16, 30, .45);
}
.rejdlg::backdrop { background: rgba(10, 16, 30, .55); backdrop-filter: blur(2px); }
.rejdlg[open] { animation: rejPop .17s cubic-bezier(.2, .8, .3, 1); }
@keyframes rejPop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.rejdlg__card { display: flex; flex-direction: column; }
.rejdlg__head { display: flex; align-items: flex-start; gap: 13px; padding: 22px 22px 14px; }
.rejdlg__icon {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font: 800 21px/1 var(--serif);
  background: #fbeaea; color: var(--maroon);
}
.rejdlg__titles { flex: 1; min-width: 0; }
.rejdlg__head h4 { font-family: var(--serif); font-size: 20px; margin: 0 0 4px; line-height: 1.2; }
.rejdlg__head p { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.5; }
.rejdlg__close { flex: none; width: 32px; height: 32px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; transition: background .12s, color .12s; }
.rejdlg__close:hover { background: #f0ece4; color: var(--ink); }
.rejdlg__body { padding: 4px 22px 2px; }
.rejdlg__body label { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.rejdlg__req { font: 700 10px/1 var(--sans, inherit); letter-spacing: .05em; text-transform: uppercase; color: var(--maroon); background: #fbeaea; padding: 3px 8px; border-radius: 999px; }
.rejdlg__body textarea {
  width: 100%; min-height: 130px; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 13px; font: inherit; font-size: 14px; line-height: 1.55; resize: vertical;
  transition: border-color .12s, box-shadow .12s;
}
.rejdlg__body textarea:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(163, 38, 38, .13); }
.rejdlg__hint { font-size: 12px; color: var(--muted); margin: 9px 0 0; }
.rejdlg__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px 20px; }

/* Matrimonial dynamic-field "Choices" repeater */
.choices { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: #fcfbf9; }
.choices__head { display: grid; grid-template-columns: 30px 1fr 1fr 36px; gap: 10px; padding: 0 2px 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.choice-row { display: grid; grid-template-columns: 30px 1fr 1fr 36px; gap: 10px; align-items: center; margin-bottom: 8px; }
.choice-row__num { display: grid; place-items: center; width: 28px; height: 30px; border-radius: 8px; background: #efe9df; color: var(--muted); font-size: 12px; font-weight: 700; }
.choice-row input { margin: 0 !important; width: 100%; }
.choice-row__value { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: #555; background: #fff; }
.choice-row__rm { width: 34px; height: 34px; flex: none; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--muted); font-size: 13px; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.choice-row__rm:hover { background: #fbeaea; border-color: #e7c4c4; color: var(--maroon); }
.choices__add { margin-top: 4px; width: 100%; padding: 11px; border: 1.5px dashed #d8cfc0; border-radius: 10px; background: #fff; color: var(--maroon); font-weight: 600; font-size: 13px; cursor: pointer; transition: background .12s, border-color .12s; }
.choices__add:hover { border-color: var(--maroon); background: #fdf6f6; }
.choices__empty { padding: 10px 2px; font-size: 13px; color: var(--muted); }

/* Sidebar review-queue badge */
.sidebar__badge {
  display: inline-block; margin-left: auto; min-width: 18px; text-align: center;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--maroon);
  padding: 1px 6px; border-radius: 999px;
}

/* History page layout */
.hist-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 980px) { .hist-grid { grid-template-columns: 1fr; } }

/* Audit timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__item { position: relative; display: flex; gap: 14px; padding: 0 0 18px 4px; }
.timeline__item::before { content: ""; position: absolute; left: 9px; top: 16px; bottom: -2px; width: 2px; background: var(--border); }
.timeline__item:last-child::before { display: none; }
.timeline__dot { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--maroon); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--border); z-index: 1; }
.timeline__content { flex: 1; }
.timeline__head { display: flex; align-items: baseline; gap: 8px; }
.timeline__by { font-size: 13px; margin-top: 2px; }
.timeline__note { margin: 6px 0 4px; padding: 8px 12px; background: #fbfaf7; border-left: 3px solid #b5701a; border-radius: 4px; font-size: 13px; font-style: italic; color: #555; }

/* Version history */
.rev { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.rev__summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; font-size: 13px; }
.rev__summary::-webkit-details-marker { display: none; }
.rev[open] .rev__summary { background: #fbfaf7; border-bottom: 1px solid var(--border); }
.rev__id { font-weight: 700; color: var(--maroon); }
.rev__note { font-weight: 600; }
.rev__meta { margin-left: auto; font-size: 12px; }
.rev__body { padding: 14px; }
.rev__title { margin: 0 0 6px; }
.rev__preview { max-height: 260px; overflow: auto; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: 8px; margin: 10px 0; font-size: 14px; }

/* ---- User list avatar cell ---- */
.usr-cell { display: flex; align-items: center; gap: 11px; }
.usr-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--maroon), #7e1f1f);
  color: #fff; font-family: var(--serif); font-size: 16px; font-weight: 600;
}
.usr-avatar--img { background-size: cover; background-position: center; }

/* ---- Audit log search bar ---- */
.audit-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px; margin-bottom: 16px;
}
.audit-search__icon { font-size: 15px; opacity: .6; }
.audit-search input[type="search"] {
  flex: 1; border: none; outline: none; background: transparent;
  font: inherit; font-size: 14px; color: var(--ink); padding: 4px 2px;
}
.audit-search input[type="search"]::placeholder { color: var(--muted); }
.audit-search select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-alt, #fbfaf7);
  font: inherit; font-size: 13px; font-weight: 500; color: var(--ink);
  padding: 8px 30px 8px 12px; cursor: pointer; height: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.audit-search select:hover { border-color: var(--maroon); }
.audit-search select:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(163,38,38,.12); }

/* ---- Featured video picker (article editor) ---- */
.feat-video-preview {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: #0c0f14; min-height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.feat-video-preview video { width: 100%; max-height: 200px; display: block; background: #000; }
.feat-video-preview .feat-preview__empty { color: var(--muted); font-size: 13px; }

/* Non-image tiles in the media picker show a type badge instead of a thumbnail */
.media-tile--file .media-tile__img {
  background: linear-gradient(135deg, var(--navy), #0a2456);
  display: flex; align-items: center; justify-content: center;
}
.media-tile__badge {
  font-style: normal; font-weight: 700; font-size: 12px; letter-spacing: .08em;
  color: #fff; background: rgba(255,255,255,.16); padding: 3px 9px; border-radius: 6px;
}

/* ---- Email configuration / auth extras ---- */
.alert--ok { background:#e7f5ec; color:#1f7a45; border-color:#bfe6cd; }
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:600px){ .field-grid { grid-template-columns:1fr; } }
.ph-chips { display:flex; flex-wrap:wrap; gap:6px; }
.ph-chip {
  font-size:12px; background:#f1f5fb; border:1px solid var(--border); border-radius:6px;
  padding:4px 8px; color:var(--navy); cursor:pointer;
}
.ph-chip:hover { background:#e6edf8; border-color:var(--navy); }

/* ---- Listing responses (inquiries) ---- */
.resp { border:1px solid var(--border); border-radius:10px; padding:12px 14px; margin-bottom:10px; }
.resp--unread { border-left:3px solid var(--maroon); background:#fffafa; }
.resp__head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.resp form { display:inline; }

/* ---- Compact plan form (subscriptions popover) ---- */
.lf-mini { display:flex; flex-direction:column; gap:4px; font-size:12px; font-weight:600; color:var(--muted); }
.lf-mini input, .lf-mini select, .lf-mini textarea { padding:7px 9px; border:1px solid var(--border); border-radius:6px; font:inherit; font-size:13px; font-weight:400; color:var(--ink); }

/* Events module helpers */
.art-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); cursor: pointer; }
.check input { width: 16px; height: 16px; }
.input { padding: 8px 11px; border: 1px solid var(--border, #e2ded4); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; }
.input--sm { padding: 7px 10px; font-size: 13px; }
@media (max-width: 720px) { .art-grid-2 { grid-template-columns: 1fr; } }

/* Locations (geo) drill-down editor */
.geo-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: start; }
.geo-add { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.geo-add input { flex: 1; min-width: 60px; }
.geo-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.geo-row { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--border, #e2ded4); }
.geo-row.is-active { background: #f7f3ea; }
.geo-row__pick { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 8px; color: var(--ink, #111); font-size: 14px; }
.geo-row__pick:hover { color: var(--maroon, #a32626); }
.geo-row.is-active .geo-row__pick { font-weight: 700; color: var(--maroon, #a32626); }
.geo-row__pick em { font-style: normal; font-size: 12px; }
.geo-row__count { background: #ece6da; color: #6b6256; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.geo-edit { position: relative; }
.geo-edit > summary { list-style: none; cursor: pointer; padding: 6px 9px; border-radius: 7px; color: var(--text-muted, #777); font-size: 13px; }
.geo-edit > summary::-webkit-details-marker { display: none; }
.geo-edit > summary:hover { background: #f0ece2; color: var(--ink, #111); }
.geo-edit__body { position: absolute; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--border, #e2ded4); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.14); padding: 10px; width: 240px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 860px) { .geo-cols { grid-template-columns: 1fr; } }

/* Activity log timeline */
.activity-log { list-style: none; margin: 0; padding: 0; }
.activity-log li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border, #e2ded4); }
.activity-log li:last-child { border-bottom: none; }
.activity-log__dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: #9aa0a6; }
.activity-log__dot--admin { background: #1f7a45; }
.activity-log__dot--member { background: var(--maroon, #a32626); }

/* Inactivity auto-logout warning */
.idle-warning { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; background: rgba(10, 16, 30, .5); }
.idle-warning[hidden] { display: none; }
.idle-warning__box { background: #fff; border-radius: 14px; padding: 24px 26px; width: min(420px, 92vw); box-shadow: 0 30px 80px rgba(10, 16, 30, .45); text-align: center; }
.idle-warning__box h4 { font-family: var(--serif); font-size: 20px; margin: 0 0 8px; }
.idle-warning__box p { color: var(--muted); font-size: 14px; margin: 0 0 16px; line-height: 1.5; }
.idle-warning__box strong { color: var(--maroon); font-variant-numeric: tabular-nums; }

/* Status filter buttons (segmented pills with counts) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg__btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; transition: background .12s, border-color .12s, color .12s; white-space: nowrap; }
.seg__btn:hover { border-color: var(--maroon); color: var(--maroon); }
.seg__btn.is-active { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.seg__c { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #f0ece4; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1; }
.seg__btn:hover .seg__c { background: #fbeaea; color: var(--maroon); }
.seg__btn.is-active .seg__c { background: rgba(255,255,255,.24); color: #fff; }

/* Recommended ad size hint on the ad form */
.ad-recsize { background: #eef4ff; border: 1px solid #d4e2f7; border-radius: 8px; padding: 8px 11px; font-size: 13px; color: #1f4e79; margin-bottom: 10px; }
.ad-recsize strong { color: #0b2e57; }
.ad-recsize span { color: #6b7280; }

/* ===== Dynamic dashboard: review queue + charts ===== */
.dash-queue { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.dash-queue__item { display: flex; align-items: center; gap: 10px; background: #fff7f7; border: 1px solid #f0d4d4; border-radius: 10px; padding: 10px 14px; text-decoration: none; color: var(--ink); transition: border-color .12s, box-shadow .12s; }
.dash-queue__item:hover { border-color: var(--maroon); box-shadow: 0 4px 14px rgba(163, 38, 38, .12); }
.dash-queue__ico { font-size: 18px; }
.dash-queue__count { font-weight: 800; font-size: 18px; color: var(--maroon); }
.dash-queue__label { font-size: 13px; color: var(--muted); }
.dash-queue__arrow { color: var(--maroon); font-weight: 700; margin-left: 2px; }

/* All charts 50% wide, two side-by-side, with clear spacing between sections. */
.dash-charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 0 0 28px; align-items: start; }
.dash-chart { margin: 0; }
.dash-chart__canvas { padding: 14px 16px 16px; height: 250px; position: relative; }
.dash-chart__canvas canvas { max-height: 100%; }
.dash-chart__controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-chart__controls input[type="date"] { padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 12px; color: var(--ink); }
.dash-chart__dash { color: var(--muted); }
@media (max-width: 720px) { .dash-charts { grid-template-columns: 1fr; } }

/* Clickable KPI cards + section spacing */
.stat-grid { margin-bottom: 24px; }
.dash-queue { margin-bottom: 24px; }
.stat-card--link { position: relative; cursor: pointer; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
.stat-card--link:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(10, 16, 30, .14); }
.stat-card__go { position: absolute; top: 12px; right: 14px; font-weight: 700; opacity: 0; transform: translateX(-4px); transition: opacity .12s, transform .12s; }
.stat-card--link:hover .stat-card__go { opacity: .75; transform: translateX(0); }

/* Editorial workflow: assignment row */
.ewf-bar__assign { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.ewf-bar__assign select { padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 13px; }
