:root {
  color-scheme: light;
  --ink: #152033;
  --muted: #657083;
  --paper: #f4f2ed;
  --surface: #fff;
  --line: #ddd9d0;
  --navy: #182941;
  --blue: #245d86;
  --amber: #b46e2b;
  --green: #2e6a55;
  --red: #a6443f;
  --shadow: 0 18px 50px rgba(21, 32, 51, .08);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: linear-gradient(135deg, #19283d 0 45%, #e9e5dc 45% 100%); }
.login-card { width: min(100%, 470px); padding: 44px; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.96); box-shadow: 0 32px 90px rgba(8, 20, 37, .22); }
.login-card h1 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(32px, 7vw, 46px); letter-spacing: -.045em; }
.login-card > p:not(.eyebrow) { margin: 18px 0 32px; color: var(--muted); line-height: 1.7; }
.login-card label, .revision-box label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
.login-card input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); outline: 0; }
.login-card input { height: 50px; padding: 0 14px; }
.login-card input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,93,134,.12); }
.login-card button { width: 100%; height: 50px; margin-top: 12px; border: 0; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 800; }
.login-services { display: flex; gap: 8px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.login-services span { padding: 7px 10px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 800; }

.dashboard { width: min(1440px, 100%); margin: 0 auto; padding: 36px 42px 80px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.topbar h1 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 42px; letter-spacing: -.045em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.local-badge { padding: 8px 10px; border-radius: 999px; background: #e0ebe5; color: var(--green); font-size: 12px; font-weight: 800; }
.button-primary, .button-secondary, .button-quiet { min-height: 42px; padding: 0 16px; border-radius: 8px; font-weight: 800; }
.button-primary { border: 1px solid var(--navy); background: var(--navy); color: #fff; }
.button-primary:disabled { cursor: not-allowed; opacity: .38; }
.button-secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.button-quiet { border: 0; background: transparent; color: var(--muted); }

.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 34px 0 26px; }
.summary-card { min-height: 122px; padding: 22px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 8px 30px rgba(21,32,51,.04); }
.summary-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.summary-card strong { display: block; margin-top: 15px; font-family: Georgia, serif; font-size: 36px; }
.summary-card small { color: var(--muted); }

.service-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.service-tab { min-width: 150px; padding: 17px 24px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 16px; font-weight: 850; }
.service-tab.is-active { border-color: var(--navy); color: var(--ink); }
.content-layout { display: grid; grid-template-columns: 185px minmax(0,1fr); gap: 34px; padding-top: 30px; }
.status-filter { align-self: start; position: sticky; top: 20px; display: grid; gap: 4px; }
.status-filter h2 { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.filter-button { padding: 11px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); text-align: left; font-weight: 720; }
.filter-button.is-active { background: #e8e4db; color: var(--ink); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.list-count { margin: 0; color: var(--muted); font-size: 13px; }
.content-list { display: grid; gap: 12px; }
.content-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 22px; padding: 24px; border: 1px solid var(--line); background: var(--surface); transition: transform .18s ease, box-shadow .18s ease; }
.content-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.content-card-header { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 12px; }
.status, .channel { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.channel { background: #edf0f4; color: #4b596c; }
.status-ready_for_review { background: #fff0d9; color: #915a1e; }
.status-draft { background: #eceef1; color: #5d6570; }
.status-publishing { background: #e2edf6; color: #245d86; }
.status-published { background: #e0eee8; color: #2e6a55; }
.status-changes_requested, .status-failed { background: #f7e4e2; color: var(--red); }
.status-approved { background: #e9e3f5; color: #60488c; }
.content-card h3 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.content-card p { max-width: 820px; margin: 10px 0 0; color: var(--muted); line-height: 1.65; }
.content-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 17px; color: var(--muted); font-size: 12px; }
.content-card-actions { display: flex; align-items: center; }
.review-button { min-width: 110px; min-height: 44px; border: 1px solid var(--navy); border-radius: 8px; background: transparent; color: var(--navy); font-weight: 850; }
.empty-state { padding: 60px 24px; border: 1px dashed #cfc9bd; color: var(--muted); text-align: center; }

.review-dialog { width: min(1220px, calc(100% - 32px)); height: min(850px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 30px 100px rgba(8,20,37,.35); }
.review-dialog::backdrop { background: rgba(12,22,36,.67); backdrop-filter: blur(3px); }
.dialog-header { display: flex; justify-content: space-between; gap: 20px; padding: 23px 26px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { max-width: 850px; margin: 0; font-size: 24px; letter-spacing: -.03em; }
.dialog-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #ece9e2; color: var(--ink); font-size: 28px; line-height: 1; }
.dialog-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,.75fr); height: calc(100% - 89px); }
.preview-panel { min-width: 0; padding: 20px; background: #e9e7e2; }
.preview-toolbar { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.preview-toolbar a { color: var(--blue); }
.preview-panel iframe { width: 100%; height: calc(100% - 26px); border: 1px solid #d2cec5; border-radius: 8px; background: #fff; }
.preview-copy { height: calc(100% - 26px); overflow: auto; padding: 26px; border: 1px solid #d2cec5; border-radius: 8px; background: #fff; color: var(--ink); line-height: 1.8; white-space: pre-wrap; }
.decision-panel { overflow: auto; padding: 26px; }
.dialog-meta { display: grid; gap: 8px; padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.decision-panel h3 { margin: 24px 0 12px; font-size: 15px; }
.check-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 22px; color: #445064; font-size: 13px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.confirmation-check { display: flex; gap: 10px; align-items: flex-start; margin: 26px 0 12px; padding: 14px; border: 1px solid var(--line); background: #faf9f6; font-size: 13px; font-weight: 700; line-height: 1.5; }
.confirmation-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--navy); }
.decision-panel > .button-primary { width: 100%; }
.revision-box { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.revision-box textarea { resize: vertical; min-height: 90px; padding: 12px; line-height: 1.5; }
.revision-box .button-secondary { width: 100%; margin-top: 9px; }
.form-message { min-height: 20px; margin: 10px 0 0; color: var(--red); font-size: 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 440px; padding: 14px 18px; border-radius: 8px; background: var(--navy); color: #fff; box-shadow: var(--shadow); font-size: 13px; font-weight: 750; }

@media (max-width: 900px) {
  .dashboard { padding: 24px 18px 60px; }
  .topbar { align-items: flex-start; }
  .local-badge { display: none; }
  .summary-grid { grid-template-columns: repeat(2,1fr); }
  .content-layout { grid-template-columns: 1fr; gap: 22px; }
  .status-filter { position: static; display: flex; overflow-x: auto; }
  .status-filter h2 { display: none; }
  .filter-button { flex: 0 0 auto; }
  .dialog-grid { grid-template-columns: 1fr; overflow: auto; }
  .preview-panel { min-height: 520px; }
  .decision-panel { overflow: visible; }
}

@media (max-width: 620px) {
  .login-shell { padding: 14px; }
  .login-card { padding: 30px 22px; }
  .topbar { display: block; }
  .topbar-actions { margin-top: 16px; }
  .topbar h1 { font-size: 34px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card { min-height: 100px; padding: 16px; }
  .summary-card strong { font-size: 30px; }
  .service-tab { flex: 1; min-width: 0; }
  .content-card { grid-template-columns: 1fr; padding: 20px; }
  .content-card-actions { justify-content: stretch; }
  .review-button { width: 100%; }
  .review-dialog { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .dialog-header { padding: 18px; }
  .dialog-grid { height: calc(100% - 80px); }
  .preview-panel { min-height: 440px; padding: 12px; }
}
