/* Ad Review Console — ported from the claude-design spec (ad_review_console.dc.html).
   English chrome (Inter, LTR) wrapping Hebrew content islands (Heebo, RTL).
   Theme tokens live on :root and flip via [data-theme]. */

:root,
:root[data-theme="light"] {
  --bg: oklch(0.98 0.008 75);
  --surface: #ffffff;
  --surfaceAlt: oklch(0.965 0.008 75);
  --border: oklch(0.9 0.01 75);
  --text: oklch(0.24 0.01 75);
  --text2: oklch(0.5 0.01 75);
  --text3: oklch(0.65 0.01 75);
  --accent: oklch(0.55 0.16 145);
  --accentHover: oklch(0.49 0.17 145);
  --accentSoft: oklch(0.94 0.05 145);
  --danger: oklch(0.55 0.18 25);
  --shadow: 0 1px 2px oklch(0.2 0.02 75 / 0.06), 0 10px 28px oklch(0.2 0.02 75 / 0.08);
}
:root[data-theme="dark"] {
  --bg: oklch(0.2 0.012 75);
  --surface: oklch(0.25 0.012 75);
  --surfaceAlt: oklch(0.29 0.012 75);
  --border: oklch(0.36 0.012 75);
  --text: oklch(0.95 0.008 75);
  --text2: oklch(0.72 0.01 75);
  --text3: oklch(0.56 0.01 75);
  --accent: oklch(0.68 0.16 145);
  --accentHover: oklch(0.73 0.16 145);
  --accentSoft: oklch(0.32 0.06 145);
  --danger: oklch(0.62 0.18 25);
  --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 10px 28px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: oklch(0.55 0.16 145 / 0.25); }
::placeholder { color: var(--text3); }
input:focus, textarea:focus, [contenteditable]:focus { outline: none; }
[v-cloak] { display: none; }

.rtl { direction: rtl; text-align: right; }
.he { font-family: 'Heebo', 'Inter', sans-serif; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--text2); }
.faint { color: var(--text3); }

/* ---- buttons ---- */
.btn {
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: 13.5px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn:hover { background: var(--surfaceAlt); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary {
  font-weight: 600; border: none; background: var(--accent); color: #fff;
  padding: 10px 22px; box-shadow: 0 1px 2px oklch(0.4 0.1 145 / 0.3);
}
.btn-primary:hover { background: var(--accentHover); }
.btn-icon {
  width: 32px; height: 32px; padding: 0; border-radius: 9px;
  color: var(--text2); font-size: 14px; display: inline-flex;
  align-items: center; justify-content: center;
}
.btn-ghost { border: none; background: transparent; color: var(--text2); }
.btn-ghost:hover { background: var(--surfaceAlt); color: var(--text); }

/* ---- login ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 40px 36px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accentSoft); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.brand-mark::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--accent); }
.input {
  width: 100%; font-family: 'Inter', sans-serif; font-size: 14px; padding: 12px 14px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.label { font-size: 12px; font-weight: 500; color: var(--text2); display: block; margin-bottom: 6px; }
.err { font-size: 12px; color: var(--danger); }

/* ---- app shell ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px; flex-shrink: 0; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 24px 16px; gap: 4px;
}
.nav-item {
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--text);
}
.nav-item:hover { background: var(--surfaceAlt); }
.nav-item.active { background: var(--accentSoft); color: var(--accent); }
.pill {
  font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accentSoft);
  border-radius: 999px; padding: 2px 8px; min-width: 18px; text-align: center;
}
.nav-item.active .pill { background: var(--accent); color: #fff; }
.main { flex: 1; min-width: 0; }

/* theme toggle */
.switch { cursor: pointer; width: 36px; height: 20px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; }
.switch.on { background: var(--accent); }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.switch.on::after { left: 18px; }

/* ---- review: queue column ---- */
.review { display: flex; min-height: 100vh; }
.queue { width: 296px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.queue-head { padding: 22px 20px 16px; border-bottom: 1px solid var(--border); }
.queue-list { overflow-y: auto; padding: 8px; }
.queue-item { cursor: pointer; padding: 12px; border-radius: 12px; border: 1px solid transparent; }
.queue-item:hover { background: var(--surfaceAlt); }
.queue-item.active { background: var(--surfaceAlt); border-color: var(--border); }
.queue-item-top { display: flex; align-items: center; justify-content: space-between; }
.eyebrow { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .03em; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- review: focus pane ---- */
.focus { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.focus-bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; border-bottom: 1px solid var(--border); gap: 12px; }
.focus-body { padding: 28px; overflow-y: auto; }
.shortcuts { font-size: 11.5px; color: var(--text3); margin-bottom: 20px; }
.shortcuts kbd { color: var(--text2); font-family: inherit; }
.approved-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--accent); background: var(--accentSoft); padding: 8px 16px; border-radius: 999px;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }
.section-label { font-size: 11.5px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }

/* FB-style preview card */
.post { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.post-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surfaceAlt); border: 1px solid var(--border); flex-shrink: 0; }
.post-body { padding: 18px; }
.post-title { font-family: 'Heebo', sans-serif; font-weight: 700; font-size: 19px; line-height: 1.45; color: var(--text); margin-bottom: 12px; }
.post-text { font-family: 'Heebo', sans-serif; font-size: 15px; line-height: 1.75; color: var(--text2); white-space: pre-wrap; }
.tag { font-family: 'Heebo', sans-serif; font-size: 13.5px; font-weight: 600; color: var(--accent); }

/* source tender card */
.source { background: var(--surfaceAlt); border: 1px solid var(--border); border-radius: 20px; padding: 22px; }
.source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-label { font-size: 11px; color: var(--text3); margin-bottom: 3px; }
.field-val { font-family: 'Heebo', sans-serif; font-size: 13.5px; color: var(--text); }
.source-html { font-family: 'Heebo', sans-serif; font-size: 13.5px; line-height: 1.7; color: var(--text2); }
.source-html :is(ul,ol) { margin: 4px 0; padding-inline-start: 20px; }

/* ---- editor ---- */
.editor-toolbar { display: flex; align-items: center; gap: 4px; padding: 8px; border: 1px solid var(--border); border-bottom: none; border-radius: 12px 12px 0 0; background: var(--surfaceAlt); }
.tool { width: 30px; height: 28px; border-radius: 7px; border: none; background: transparent; color: var(--text2); cursor: pointer; font-size: 13px; }
.tool:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.tool:disabled { opacity: .4; cursor: default; }
.editor-area { font-family: 'Heebo', sans-serif; width: 100%; border: 1px solid var(--border); border-radius: 0 0 12px 12px; background: var(--bg); color: var(--text); padding: 14px 16px; font-size: 15px; line-height: 1.7; resize: vertical; }
.count { font-size: 11.5px; color: var(--text3); }
.count.over { color: var(--danger); }

/* ---- dashboard ---- */
.page { padding: 32px 40px; max-width: 1100px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; }
.stat-num { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.stat-label { font-size: 12.5px; color: var(--text2); margin-top: 4px; }
.stub { border: 1px dashed var(--border); border-radius: 16px; padding: 40px; text-align: center; color: var(--text3); font-size: 13px; }
.h1 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow); }
