:root {
  color-scheme: light;
  --ink: #17221e;
  --muted: #68736e;
  --subtle: #8d9692;
  --line: #dfe5e1;
  --line-strong: #cdd5d0;
  --surface: #ffffff;
  --canvas: #f3f5f3;
  --canvas-deep: #e9eeeb;
  --green-950: #08271d;
  --green-900: #0c3528;
  --green-800: #124b39;
  --green-700: #17624b;
  --green-600: #1f765b;
  --green-100: #dff1e9;
  --green-50: #edf8f3;
  --gold: #b28c4b;
  --gold-soft: #f7f0df;
  --red: #b4413d;
  --red-soft: #fbeae8;
  --blue: #3f6d91;
  --blue-soft: #eaf2f8;
  --amber: #9b6b13;
  --amber-soft: #fff5da;
  --shadow-sm: 0 1px 2px rgba(14, 42, 32, .05), 0 2px 8px rgba(14, 42, 32, .04);
  --shadow-lg: 0 20px 60px rgba(7, 31, 23, .2);
  --sidebar-width: 254px;
  --topbar-height: 72px;
  --radius: 10px;
  --radius-lg: 14px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; left: 1rem; top: -5rem; padding: .65rem 1rem; color: #fff; background: var(--green-900); border-radius: 6px; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid rgba(31, 118, 91, .35); outline-offset: 2px; }

.admin-app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar-width); display: flex; flex-direction: column; color: rgba(255,255,255,.83); background: linear-gradient(180deg, var(--green-950), #0a3024 58%, #08271d); border-right: 1px solid rgba(255,255,255,.07); }
.brand { min-height: var(--topbar-height); display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand img { width: 45px; height: 45px; object-fit: cover; border-radius: 50%; border: 1px solid rgba(255,255,255,.32); box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.brand span { display: grid; min-width: 0; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.15; letter-spacing: .01em; }
.brand small { margin-top: 3px; color: rgba(255,255,255,.55); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
#admin-nav { overflow-y: auto; padding: 18px 10px; scrollbar-width: thin; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-label { display: block; padding: 0 12px 6px; color: rgba(255,255,255,.35); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 8px 12px; margin: 2px 0; color: rgba(255,255,255,.66); text-decoration: none; border-radius: 7px; transition: color .15s, background .15s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-link.active { color: #fff; background: rgba(255,255,255,.11); box-shadow: inset 3px 0 var(--gold); }
.nav-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.nav-link b { margin-left: auto; min-width: 22px; padding: 1px 6px; color: #f5e9cd; background: rgba(178,140,75,.25); border-radius: 10px; font-size: 10px; text-align: center; }
.sidebar-foot { margin-top: auto; padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot > a { display: flex; justify-content: space-between; margin-top: 13px; padding: 8px 5px; color: rgba(255,255,255,.6); text-decoration: none; font-size: 12px; }
.system-status { display: flex; align-items: center; gap: 10px; padding: 10px; background: rgba(255,255,255,.05); border-radius: 8px; }
.system-status > span:last-child { display: grid; }
.system-status strong { color: rgba(255,255,255,.78); font-size: 11px; }
.system-status small { color: rgba(255,255,255,.42); font-size: 10px; }
.status-dot { width: 8px; height: 8px; background: #e3b85f; border-radius: 50%; box-shadow: 0 0 0 4px rgba(227,184,95,.12); }
.status-dot.online { background: #55bc88; box-shadow: 0 0 0 4px rgba(85,188,136,.12); }

.workspace { min-height: 100vh; padding-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-height); display: flex; align-items: center; gap: 20px; padding: 0 30px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.global-search { position: relative; flex: 0 1 470px; }
.global-search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.global-search input { width: 100%; height: 40px; padding: 0 54px 0 39px; color: var(--ink); background: var(--canvas); border: 1px solid transparent; border-radius: 8px; outline: 0; transition: .15s; }
.global-search input:focus { background: #fff; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(31,118,91,.1); }
.global-search kbd { position: absolute; right: 9px; top: 50%; padding: 2px 6px; transform: translateY(-50%); color: var(--subtle); background: #fff; border: 1px solid var(--line); border-radius: 4px; font-size: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-button { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; background: transparent; border: 0; border-radius: 7px; cursor: pointer; }
.icon-button:hover { background: var(--canvas); }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notification-dot { position: absolute; right: 8px; top: 8px; width: 6px; height: 6px; background: var(--red); border: 2px solid #fff; border-radius: 50%; }
.user-menu { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px 4px 4px; background: transparent; border: 0; border-radius: 8px; cursor: pointer; text-align: left; }
.user-menu:hover { background: var(--canvas); }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: var(--green-800); border-radius: 50%; font-size: 11px; font-weight: 800; }
.user-copy { display: grid; min-width: 120px; }
.user-copy strong { font-size: 12px; }
.user-copy small { color: var(--muted); font-size: 10px; text-transform: capitalize; }
.mobile-menu { display: none; }

#admin-main { min-height: calc(100vh - var(--topbar-height)); padding: 30px; }
.page-shell { max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 5px; color: var(--green-700); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.page-title { margin: 0; font-family: Georgia, "Times New Roman", serif; color: var(--green-950); font-size: clamp(27px, 2.4vw, 36px); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; }
.page-lead { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.page-actions, .button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 1px 1px rgba(0,0,0,.02); }
.button:hover { border-color: #aeb9b3; background: #fafbfa; }
.button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button.primary { color: #fff; background: var(--green-700); border-color: var(--green-700); }
.button.primary:hover { background: var(--green-800); }
.button.gold { color: #4c3914; background: var(--gold-soft); border-color: #dac596; }
.button.danger { color: var(--red); border-color: #e7c0bd; }
.button.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.button.small { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.button:disabled { opacity: .5; cursor: not-allowed; }

.notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 11px 14px; color: #624a19; background: var(--amber-soft); border: 1px solid #f0d995; border-radius: 8px; font-size: 12px; }
.notice.info { color: #2d5877; background: var(--blue-soft); border-color: #c5dceb; }
.notice strong { display: block; }
.notice p { margin: 1px 0 0; }
.demo-banner { position: relative; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric-card { position: relative; min-height: 132px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.metric-card::after { content: ""; position: absolute; inset: auto -22px -35px auto; width: 90px; height: 90px; background: var(--green-50); border-radius: 50%; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-icon { width: 31px; height: 31px; display: grid; place-items: center; color: var(--green-700); background: var(--green-50); border-radius: 7px; }
.metric-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.metric-card strong { display: block; margin-top: 11px; font-family: Georgia, serif; color: var(--green-950); font-size: 30px; font-weight: 600; line-height: 1; }
.metric-card small { display: block; margin-top: 8px; color: var(--subtle); font-size: 10px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr); gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-family: Georgia, serif; color: var(--green-950); font-size: 17px; font-weight: 600; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 18px; }
.activity-list { margin: 0; padding: 0; list-style: none; }
.activity-item { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 11px; align-items: start; padding: 12px 0; }
.activity-item + .activity-item { border-top: 1px solid var(--line); }
.activity-mark { width: 30px; height: 30px; display: grid; place-items: center; color: var(--green-700); background: var(--green-50); border-radius: 50%; font-size: 10px; font-weight: 800; }
.activity-item p { margin: 0; font-size: 12px; }
.activity-item p strong { font-weight: 700; }
.activity-item small { color: var(--subtle); font-size: 10px; }
.activity-item time { color: var(--subtle); font-size: 10px; white-space: nowrap; }
.task-list { display: grid; gap: 9px; }
.task-card { display: flex; align-items: center; gap: 11px; padding: 12px; color: var(--ink); background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.task-card:hover { border-color: #b9c7c0; }
.task-card > span:first-child { width: 8px; height: 8px; background: var(--gold); border-radius: 50%; }
.task-card div { display: grid; flex: 1; }
.task-card strong { font-size: 12px; }
.task-card small { color: var(--muted); font-size: 10px; }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.quick-action { min-height: 82px; display: flex; flex-direction: column; justify-content: space-between; padding: 13px; color: var(--green-900); background: var(--green-50); border: 1px solid #cfe4da; border-radius: 8px; text-decoration: none; font-size: 11px; font-weight: 700; }
.quick-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.toolbar .search-field { flex: 1 1 280px; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.8; }
.search-field input { width: 100%; min-height: 38px; padding: 8px 12px 8px 34px; background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; }
.field select, .toolbar select { min-height: 38px; padding: 7px 32px 7px 10px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 11px 14px; color: var(--muted); background: #fafbfa; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfb; }
.table-title { display: grid; min-width: 220px; }
.table-title strong { font-size: 12px; }
.table-title small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid; border-radius: 11px; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.status.published, .status.complete, .status.active, .status.approved { color: var(--green-700); background: var(--green-50); border-color: #cce2d8; }
.status.review, .status.pending, .status.in-review { color: var(--amber); background: var(--amber-soft); border-color: #ead69e; }
.status.draft, .status.disabled, .status.archived { color: var(--muted); background: #f3f5f4; border-color: var(--line); }
.status.failed, .status.rejected, .status.outdated { color: var(--red); background: var(--red-soft); border-color: #edc7c4; }
.status.ai { color: var(--blue); background: var(--blue-soft); border-color: #c9dce9; }
.lang-pills { display: flex; gap: 4px; }
.lang-pill { min-width: 25px; padding: 2px 4px; color: var(--muted); background: #f3f5f4; border: 1px solid var(--line); border-radius: 4px; font-size: 8px; font-weight: 800; text-align: center; }
.lang-pill.done { color: var(--green-700); background: var(--green-50); border-color: #cce2d8; }

.empty-state { display: grid; place-items: center; min-height: 310px; padding: 40px; text-align: center; }
.empty-state .empty-icon { width: 54px; height: 54px; display: grid; place-items: center; color: var(--green-700); background: var(--green-50); border-radius: 50%; }
.empty-state svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.empty-state h2 { margin: 14px 0 4px; font-family: Georgia, serif; color: var(--green-950); font-size: 20px; }
.empty-state p { max-width: 420px; margin: 0 0 18px; color: var(--muted); font-size: 12px; }

.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.editor-main, .editor-side { display: grid; gap: 14px; }
.editor-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.editor-card-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.editor-card-head h2, .editor-card-head h3 { margin: 0; font-family: Georgia, serif; color: var(--green-950); font-size: 16px; font-weight: 600; }
.editor-card-body { padding: 16px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field > label, .field-label { color: #4b5852; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.field small { color: var(--subtle); font-size: 10px; }
.field input, .field textarea, .field select { width: 100%; min-height: 39px; padding: 9px 11px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; outline: 0; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(31,118,91,.09); }
.language-tabs { display: flex; gap: 4px; padding: 6px; background: var(--canvas); border-radius: 8px; }
.language-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px; color: var(--muted); background: transparent; border: 0; border-radius: 6px; font-size: 11px; font-weight: 800; cursor: pointer; }
.language-tab.active { color: var(--green-900); background: #fff; box-shadow: 0 1px 4px rgba(12,53,40,.1); }
.language-tab .mini-dot { width: 6px; height: 6px; background: var(--amber); border-radius: 50%; }
.language-tab.complete .mini-dot { background: var(--green-600); }
.rich-editor { border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.rich-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-height: 42px; padding: 5px 7px; background: #fafbfa; border-bottom: 1px solid var(--line); }
.rich-toolbar button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; background: transparent; border: 0; border-radius: 5px; cursor: pointer; font-family: Georgia, serif; }
.rich-toolbar button:hover { background: var(--canvas-deep); }
.rich-toolbar .divider { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
.rich-body { min-height: 360px; padding: 22px 24px; outline: 0; font-family: Georgia, serif; font-size: 16px; line-height: 1.72; }
.rich-body:empty::before { content: attr(data-placeholder); color: var(--subtle); }
.rich-body h2 { color: var(--green-950); font-size: 24px; }
.rich-body blockquote { margin-left: 0; padding-left: 18px; color: #42514a; border-left: 3px solid var(--gold); }
.word-count { display: flex; justify-content: flex-end; padding: 7px 10px; color: var(--subtle); background: #fafbfa; border-top: 1px solid var(--line); font-size: 9px; }
.translation-state { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; }
.translation-state + .translation-state { border-top: 1px solid var(--line); }
.translation-state > div { display: grid; }
.translation-state strong { font-size: 11px; }
.translation-state small { color: var(--muted); font-size: 9px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.toggle-row label { display: grid; cursor: pointer; }
.toggle-row strong { font-size: 11px; }
.toggle-row small { color: var(--muted); font-size: 9px; }
.switch { width: 35px; height: 20px; position: relative; appearance: none; background: #cdd5d0; border-radius: 12px; cursor: pointer; transition: .15s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .15s; }
.switch:checked { background: var(--green-600); }
.switch:checked::after { transform: translateX(15px); }
.image-drop { min-height: 145px; display: grid; place-items: center; padding: 18px; color: var(--muted); background: #fafbfa; border: 1px dashed #b9c4be; border-radius: 8px; text-align: center; cursor: pointer; }
.image-drop:hover { color: var(--green-700); border-color: var(--green-600); background: var(--green-50); }
.image-drop svg { width: 25px; height: 25px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.6; }
.image-drop strong { display: block; margin-top: 8px; font-size: 11px; }
.image-drop small { font-size: 9px; }
.portrait-admin { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 16px; margin-top: 7px; }
.portrait-admin-preview { display: grid; width: 150px; aspect-ratio: 5 / 3.6; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: linear-gradient(145deg, #edf2ee, #cfdbd3); color: var(--muted); font-size: 10px; text-align: center; }
.portrait-admin-preview img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 620px) { .portrait-admin { grid-template-columns: 1fr; } .portrait-admin-preview { width: 100%; max-width: 240px; } }
.editor-sticky { position: sticky; bottom: 12px; z-index: 10; display: flex; align-items: center; gap: 8px; padding: 10px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(12,53,40,.12); backdrop-filter: blur(12px); }
.save-state { margin-right: auto; color: var(--muted); font-size: 10px; }

.source-grid, .card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.source-card, .content-card { padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.source-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.source-symbol { width: 37px; height: 37px; display: grid; place-items: center; color: var(--green-700); background: var(--green-50); border-radius: 8px; font-weight: 800; }
.source-card h3, .content-card h3 { margin: 11px 0 2px; color: var(--green-950); font-family: Georgia, serif; font-size: 17px; }
.source-card p, .content-card p { margin: 0; color: var(--muted); font-size: 11px; }
.source-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; padding: 11px 0; border-block: 1px solid var(--line); }
.source-meta span { display: grid; color: var(--muted); font-size: 9px; }
.source-meta strong { color: var(--ink); font-size: 11px; }
.source-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.inbox-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.inbox-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.inbox-item { display: grid; grid-template-columns: 19px minmax(0,1fr) auto; gap: 12px; padding: 15px; border-bottom: 1px solid var(--line); cursor: pointer; }
.inbox-item:hover, .inbox-item.selected { background: var(--green-50); }
.inbox-item:last-child { border-bottom: 0; }
.inbox-item input { margin-top: 3px; }
.inbox-item h3 { margin: 0; font-family: Georgia, serif; color: var(--green-950); font-size: 15px; }
.inbox-item p { margin: 4px 0; color: var(--muted); font-size: 11px; }
.inbox-item small { color: var(--subtle); font-size: 9px; }
.inbox-detail { position: sticky; top: calc(var(--topbar-height) + 20px); }
.source-preview { max-height: 420px; overflow: auto; padding: 16px; font-family: Georgia, serif; font-size: 13px; line-height: 1.65; }

.translation-review { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.translation-column { min-width: 0; background: #fff; }
.translation-column-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fafbfa; border-bottom: 1px solid var(--line); }
.translation-content { padding: 22px; font-family: Georgia, serif; font-size: 15px; line-height: 1.75; }
.translation-content h2 { color: var(--green-950); }
.diff-note { padding: 8px 10px; color: #704d0b; background: #fff4d2; border-radius: 6px; font-family: Inter, sans-serif; font-size: 10px; }

.settings-grid { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 18px; }
.settings-nav { align-self: start; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.settings-nav button { width: 100%; padding: 10px; color: var(--muted); background: transparent; border: 0; border-radius: 6px; cursor: pointer; text-align: left; font-size: 11px; font-weight: 700; }
.settings-nav button.active { color: var(--green-900); background: var(--green-50); }
.code-value { padding: 3px 6px; color: #315648; background: #edf5f1; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }

.route-loading { min-height: 60vh; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.loader { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--green-600); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(360px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; color: #fff; background: var(--green-950); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; font-size: 11px; }
.toast.error { background: #712a27; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.admin-dialog { width: min(720px, calc(100vw - 30px)); max-height: calc(100vh - 40px); padding: 0; color: var(--ink); background: #fff; border: 0; border-radius: 12px; box-shadow: var(--shadow-lg); }
.admin-dialog::backdrop { background: rgba(4,22,16,.58); backdrop-filter: blur(2px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-family: Georgia, serif; color: var(--green-950); font-size: 20px; }
.dialog-body { max-height: 70vh; overflow: auto; padding: 20px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; background: #fafbfa; border-top: 1px solid var(--line); }
.public-preview { background: #f6f4ef; }
.preview-mast { display: flex; align-items: center; gap: 13px; padding: 18px 24px; color: #fff; background: var(--green-950); }
.preview-mast img { width: 42px; height: 42px; border-radius: 50%; }
.preview-mast strong { font-family: Georgia, serif; font-size: 14px; }
.preview-mast small { display: block; color: rgba(255,255,255,.55); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.preview-article { max-width: 690px; margin: auto; padding: 46px 32px 60px; }
.preview-article .preview-kicker { color: var(--green-700); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.preview-article h1 { margin: 9px 0 12px; font-family: Georgia, serif; color: var(--green-950); font-size: clamp(30px, 5vw, 48px); font-weight: 500; line-height: 1.08; }
.preview-article .preview-excerpt { color: #506159; font-family: Georgia, serif; font-size: 18px; line-height: 1.5; }
.preview-article .preview-meta { margin: 22px 0; padding-block: 12px; color: var(--muted); border-block: 1px solid #d7d8d1; font-size: 10px; }
.preview-article .preview-body { font-family: Georgia, serif; font-size: 16px; line-height: 1.78; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .source-grid, .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .editor-layout { grid-template-columns: minmax(0,1fr) 280px; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .workspace { padding-left: 0; }
  .mobile-menu { display: inline-grid; }
  .topbar { padding: 0 16px; }
  #admin-main { padding: 22px 18px; }
  .dashboard-grid, .editor-layout, .inbox-layout, .settings-grid { grid-template-columns: 1fr; }
  .editor-side { grid-template-columns: repeat(2, 1fr); }
  .inbox-detail { position: static; }
}

@media (max-width: 640px) {
  :root { --topbar-height: 62px; }
  .topbar { gap: 8px; }
  .global-search { flex: 1; }
  .global-search input { padding-right: 10px; }
  .global-search kbd, .user-copy, .user-menu > span:last-child, #notifications-button { display: none; }
  .user-menu { padding: 3px; }
  #admin-main { padding: 18px 12px; }
  .page-head { display: grid; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .metric-grid, .source-grid, .card-grid, .field-grid, .field-grid.three, .editor-side, .translation-review { grid-template-columns: 1fr; }
  .metric-card { min-height: 112px; }
  .translation-review { gap: 14px; background: transparent; border: 0; }
  .translation-column { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .editor-sticky { flex-wrap: wrap; }
  .save-state { width: 100%; }
  .rich-body { min-height: 300px; padding: 18px; }
  .table-wrap { margin-inline: -12px; border-radius: 0; border-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
