:root {
  --ink: #173b3b;
  --ink-2: #245251;
  --paper: #f6f3ec;
  --card: #fff;
  --line: #dcd8cf;
  --muted: #6d746f;
  --copper: #b66b3d;
  --green: #3a6b5c;
  --danger: #a83d3d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #262b29;
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, textarea { font: inherit; }
.hidden { display: none !important; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, var(--ink), #0f2424); }
.login-card { width: min(440px, 100%); background: #fff; border-radius: 20px; padding: 36px; box-shadow: 0 24px 80px #0005; }
.brand { font-family: Georgia, serif; font-size: 25px; font-weight: 700; color: var(--copper); }
h1, h2 { font-family: Georgia, serif; color: var(--ink); margin: 0 0 12px; }
h1 { font-size: clamp(31px, 4vw, 44px); }
p { line-height: 1.55; }
label { display: block; font-size: 14px; font-weight: 650; margin: 14px 0; }
input, textarea, select { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; }
textarea { min-height: 180px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus { outline: 2px solid #b66b3d55; border-color: var(--copper); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 750; cursor: pointer; text-decoration: none; }
.button.primary { background: var(--ink); color: #fff; }
.button.accent { background: var(--copper); color: #fff; }
.button.outline { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { background: var(--ink); color: #fff; padding: 28px 20px; display: flex; flex-direction: column; gap: 24px; }
.sidebar nav { display: grid; gap: 6px; }
.nav { border: 0; background: transparent; color: #dce7e3; text-align: left; padding: 11px 12px; border-radius: 9px; cursor: pointer; }
.nav:hover, .nav.active { background: #ffffff17; color: #fff; }
.nav.danger { margin-top: auto; color: #f1b1a9; }
.content { width: min(1160px, 100%); padding: 44px; margin: 0 auto; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.metric { font-family: Georgia, serif; font-size: 38px; color: var(--ink); }
.muted { color: var(--muted); font-size: 14px; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 22px 0; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 750; background: #e9e7e1; }
.status.in_review { background: #f5e5b5; color: #76580c; }
.status.approved, .status.published { background: #d9eee3; color: #185a40; }
.status.error, .status.partial_error { background: #f4d6d4; color: #8a2f2a; }
.editor-grid { display: grid; grid-template-columns: 1fr 290px; gap: 22px; align-items: start; }
.stack { display: grid; gap: 16px; }
.actions { position: sticky; top: 24px; display: grid; gap: 9px; }
.channels { display: flex; gap: 18px; flex-wrap: wrap; }
.channels label { display: flex; gap: 7px; align-items: center; margin: 0; }
.channels input { width: auto; margin: 0; }
.preview { max-width: 100%; max-height: 320px; border: 1px solid var(--line); border-radius: 12px; display: block; margin: 10px 0; }
.media-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.media-item:last-child { border-bottom: 0; }
.notice { border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; background: #dceee5; color: #185a40; }
.notice.error { background: #f4d6d4; color: #8a2f2a; }
.notice.warn { background: #f5e5b5; color: #76580c; }
.switch-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .nav.danger { margin: 0 0 0 auto; }
  .content { padding: 24px 16px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .editor-grid { grid-template-columns: 1fr; }
  .actions { position: static; }
}
