:root {
  --bg: #f5f7fb;
  --surface: #fff;
  --text: #182230;
  --muted: #667085;
  --line: #e6eaf0;
  --primary: #eb5b35;
  --primary-dark: #d94723;
  --nav: #17202f;
  --nav-muted: #9aa5b5;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 12px; padding: 24px 22px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--primary); color: #fff; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -.3px; }
.brand small { margin-top: 3px; color: var(--nav-muted); font-size: 11px; }
.admin-layout { display: grid; min-height: 100vh; grid-template-columns: 252px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--nav); color: #fff; z-index: 20; }
.nav { padding: 8px 12px 28px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 43px; margin: 3px 0; padding: 0 12px; border-radius: 9px; color: #c6ced9; font-size: 14px; }
.nav-item > span:first-child { width: 20px; text-align: center; font-size: 16px; }
.nav-item.active { background: rgba(235,91,53,.16); color: #fff; }
.nav-item.disabled { cursor: not-allowed; color: #6f7b8d; }
.nav-item small { margin-left: auto; font-size: 9px; color: #778396; }
.main-column { min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; padding: 0 30px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-title { font-weight: 700; }
.account { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.account strong, .account small { display: block; }
.account strong { font-size: 13px; }
.account small { max-width: 220px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff1ed; color: var(--primary-dark); font-weight: 700; }
.logout { margin-left: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; background: #fff; cursor: pointer; color: #475467; font-size: 12px; }
.content { max-width: 1400px; margin: 0 auto; padding: 36px 34px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.page-heading h1 { margin: 3px 0 0; font-size: 27px; letter-spacing: -.8px; }
.page-heading > p { color: var(--muted); font-size: 14px; }
.eyebrow { margin: 0; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { display: flex; align-items: center; gap: 16px; min-height: 120px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 8px rgba(16,24,40,.025); }
.stat-card p { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.stat-card strong { font-size: 25px; }
.stat-icon { width: 10px; height: 44px; border-radius: 9px; background: #95a4ba; }
.stat-icon.cafe { background: #f59e0b; } .stat-icon.category { background: #7c3aed; }
.stat-icon.pending { background: #2563eb; } .stat-icon.review { background: #db6b20; }
.stat-icon.published { background: #169b62; } .stat-icon.error { background: #dc3545; }
.welcome-card { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-top: 22px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.welcome-card h2 { margin: 7px 0 8px; font-size: 18px; }
.welcome-card p:last-child { margin: 0; color: var(--muted); line-height: 1.7; font-size: 13px; }
.ready-badge { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: #e9f8f0; color: #168351; font-size: 12px; font-weight: 700; }
.panel { margin-top: 18px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.panel h2 { margin: 0 0 16px; font-size: 16px; }
.dashboard-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.section-title, .compact-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.section-title { margin-bottom: 10px; }.section-title h2 { margin: 0; }.section-title a, .text-link { color: var(--primary-dark); font-weight: 650; }
.compact-row { min-height: 42px; border-top: 1px solid var(--line); font-size: 13px; }.compact-row:first-of-type { border-top: 0; }
.empty, .muted { color: var(--muted); }.empty { padding: 18px; text-align: center; font-size: 13px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 12px; }
.data-table th { padding: 12px; background: #f8fafc; color: #5d6878; text-align: left; font-weight: 700; }
.data-table td { max-width: 260px; padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.data-table tr.inactive { opacity: .52; }
.clamp { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #edf1f6; color: #4b5565; font-size: 10px; font-weight: 750; }
.badge-active,.badge-ready,.badge-approved,.badge-success,.badge-published,.badge-manual { background:#e7f7ef;color:#11784a; }
.badge-inactive,.badge-paused,.badge-archived,.badge-rejected { background:#edf0f4;color:#667085; }
.badge-queued,.badge-scheduled,.badge-generating { background:#eaf2ff;color:#245eb6; }
.badge-review,.badge-partial { background:#fff4dc;color:#986000; }
.badge-failed,.badge-error { background:#ffebeb;color:#b42318; }
.risk-low { background:#e7f7ef;color:#11784a; }.risk-medium { background:#fff4dc;color:#8a5700; }.risk-high { background:#ffebeb;color:#b42318; }
.filter-bar, .bulk-bar, .button-row, .form-actions, .inline-form { display: flex; align-items: end; gap: 9px; margin: 0 0 14px; }
.filter-bar .input, .bulk-bar .input { width: auto; min-width: 130px; }
.filter-wrap { flex-wrap: wrap; }
.button-secondary { background:#fff;color:#344054;border:1px solid #d6dae1; }
.button-danger { background:#fff0f0;color:#b42318;border:1px solid #ffd0d0; }
.admin-form { max-width: 1000px; }.form-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px; }
.field-wide { grid-column: 1 / -1; }.field textarea.input { min-height: 120px; padding-top: 12px; resize: vertical; }
.switch-row { display:flex!important;align-items:center;gap:8px;min-height:42px; }
.switch-row input { width:18px;height:18px; }
.form-actions { justify-content:flex-end;margin:25px 0 0;padding-top:20px;border-top:1px solid var(--line); }
.detail-list { display:grid;grid-template-columns:120px 1fr;gap:12px;margin:0;font-size:13px; }.detail-list dt { color:var(--muted); }.detail-list dd { margin:0; }
.big-number { font-size:45px;font-weight:800; }.content-body { white-space:pre-wrap;line-height:1.8;font-size:14px; }
.pagination { display:flex;justify-content:center;align-items:center;gap:16px;padding:18px;font-size:13px; }.pagination a { color:var(--primary-dark);font-weight:700; }
.page-size { display:flex;gap:7px;color:var(--muted); }.page-size a.selected { text-decoration:underline; }
.week-grid { display:grid;grid-template-columns:repeat(7,minmax(160px,1fr));gap:10px;overflow-x:auto; }
.day-column { min-height:300px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:12px; }.day-column h2 { margin:0 0 12px;font-size:14px; }
.schedule-card { display:block;margin:8px 0;padding:11px;border-radius:9px;background:#f4f7fb;border-left:3px solid var(--primary); }
.schedule-card strong,.schedule-card span,.schedule-card small { display:block; }.schedule-card strong { font-size:11px; }.schedule-card span { margin:4px 0;font-size:12px; }.schedule-card small { color:var(--muted);line-height:1.4; }
.status-flow { display:flex;align-items:center;gap:8px;overflow-x:auto;margin-bottom:18px;padding:14px;background:#fff;border:1px solid var(--line);border-radius:12px; }
.status-flow span { padding:7px 10px;border-radius:999px;background:#edf1f6;font-size:11px; }.status-flow span.current { background:var(--primary);color:#fff;font-weight:750; }
.inline-form { align-items:flex-end;flex-wrap:wrap; }.inline-form .field { flex:1;min-width:180px;margin:0; }
.alert-info { background:#eaf2ff;color:#245eb6; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 22px; }
.sidebar-backdrop { display: none; }
.login-page { background: radial-gradient(circle at top right, #fff0eb, transparent 38%), var(--bg); }
.login-shell { min-height: 100vh; display: grid; place-content: center; padding: 30px 18px; }
.login-panel { width: min(420px, calc(100vw - 36px)); padding: 38px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 55px rgba(16,24,40,.10); }
.brand-login { padding: 0 0 35px; }
.brand-login small { color: var(--muted); }
.login-heading h1 { margin: 6px 0 9px; font-size: 26px; letter-spacing: -.8px; }
.login-heading > p:last-child { margin: 0 0 27px; color: var(--muted); font-size: 13px; }
.field { margin: 17px 0; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 650; }
.input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #d8dde6; border-radius: 9px; outline: none; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(235,91,53,.12); }
.field-help { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.field-error { display: block; margin-top: 5px; color: #c62828; }
.setup-alert { display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:18px;padding:18px 20px;background:#fff8e8;border:1px solid #f3d58c;border-radius:12px;color:#714b00; }
.setup-alert p { margin:5px 0 0;font-size:13px; }
.setup-alert .button-row { flex:0 0 auto;margin:0; }
.browser-next-step { border-color:#f1c8bc;background:#fffaf8; }
.browser-next-step h2 { margin-bottom:7px; }
.connection-status { margin-bottom:0;font-size:12px;font-weight:650; }
.connection-status-ready { color:#11784a; }
.connection-status-needed { color:#986000; }
.login-qr { margin-top:14px;padding:16px;background:#fff;border:1px solid var(--line);border-radius:10px;color:var(--text); }
.login-qr img { display:block;width:min(280px,100%);height:auto;image-rendering:pixelated; }
.login-qr p { margin:10px 0 0;font-size:13px; }
.checkbox { display: flex; align-items: center; gap: 6px; margin: 4px 0 20px; color: var(--muted); font-size: 12px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 43px; padding: 0 18px; border: 0; border-radius: 9px; cursor: pointer; font-weight: 700; }
.button-primary { background: var(--primary); color: #fff; }
.button-primary:hover { background: var(--primary-dark); }
.button-block { width: 100%; }
.button-small { min-height: 34px; padding: 0 11px; font-size: 11px; }
.quick-create-card { margin-bottom: 30px; padding: 25px; background: linear-gradient(135deg,#fff 0%,#fff7f3 100%); border: 1px solid #f1d8cf; border-radius: 16px; box-shadow: 0 8px 24px rgba(16,24,40,.04); }
.quick-create-grid { display: grid; grid-template-columns: minmax(260px,2fr) minmax(120px,.6fr) minmax(170px,1fr); gap: 16px; }
.quick-create-grid .field { margin: 0; }
.quick-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 19px; }
.quick-actions .muted { margin-left: 5px; font-size: 12px; }
.content-board-title { margin: 0 0 14px; }
.content-board-title .muted { font-size: 12px; }
.simple-content-table td:last-child { min-width: 480px; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.row-actions form { margin: 0; }
.schedule-inline { display: flex; align-items: center; gap: 6px; }
.schedule-inline .input { width: 172px; height: 34px; padding: 0 8px; font-size: 11px; }
.advanced-panel summary { cursor: pointer; font-weight: 750; }
.advanced-panel[open] summary { margin-bottom: 20px; }
.login-foot { text-align: center; color: #98a2b3; font-size: 11px; }
.alert { margin: 0 0 16px; padding: 11px 13px; border-radius: 8px; font-size: 13px; }
.alert-danger { background: #fff0f0; color: #a82424; } .alert-success { background: #ebf8f1; color: #146c43; }
.alert-warning { background: #fff6e5; color: #8a5700; }
.error-page { min-height: 100vh; display: grid; place-content: center; justify-items: center; padding: 30px; text-align: center; }
.error-code { margin: 0; color: var(--primary); font-size: 60px; font-weight: 850; }
.error-page h1 { margin: 4px 0; } .error-page > p:not(.error-code) { margin-bottom: 24px; color: var(--muted); }
.image-generation-notice, .image-generation-failed { display:flex;align-items:center;gap:13px;margin-bottom:16px;padding:14px 16px;border-radius:11px;background:#f2f7ff;color:#245eb6;font-size:13px; }
.image-generation-notice p, .image-generation-failed p { margin:4px 0 0;line-height:1.5; }
.image-generation-failed { display:block;background:#fff0f0;color:#a82424; }
.image-generation-spinner { flex:0 0 auto;width:20px;height:20px;border:3px solid #cfe0fa;border-top-color:#2867c7;border-radius:50%;animation:image-spin .8s linear infinite; }
.image-preview-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px; }
.image-preview-card { min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:13px;background:#fff; }
.image-preview-frame { display:grid;place-items:center;width:100%;aspect-ratio:4/3;overflow:hidden;background:#f4f6f9; }
.image-preview-frame img { display:block;width:100%;height:100%;object-fit:cover; }
.image-preview-placeholder { display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;color:var(--muted);font-size:13px; }
.image-preview-meta { padding:14px 15px; }
.image-preview-meta h3 { margin:0 0 9px;font-size:14px; }
.image-preview-meta p { margin:0; }
.image-generation-error { margin:0;padding:0 15px 14px;color:#a82424;font-size:12px;line-height:1.5; }
.publish-action-panel .section-title { align-items:flex-start; }
.publish-action-panel .section-title p { margin:6px 0 0; }
.publish-action-grid { display:flex;align-items:flex-end;flex-wrap:wrap;gap:14px; }
.publish-action-grid > form:first-child { margin:0; }
.schedule-publish-form { display:flex;align-items:flex-end;flex-wrap:wrap;gap:9px;margin:0; }
.schedule-publish-form label { width:100%;font-size:13px;font-weight:650; }
.schedule-publish-form .input { width:220px; }
@keyframes image-spin { to { transform:rotate(360deg); } }
@media (max-width: 900px) {
  .admin-layout { display: block; }
  .sidebar { position: fixed; left: -270px; width: 252px; transition: left .18s ease; }
  body.sidebar-open .sidebar { left: 0; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(15,23,42,.45); }
  .menu-toggle { display: block; margin-right: 12px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid,.detail-grid { grid-template-columns:1fr; }
  .week-grid { grid-template-columns:repeat(7,180px); }
}
@media (max-width: 580px) {
  .topbar { padding: 0 16px; } .topbar-title { display: none; }
  .account > div { display: none; } .logout { margin-left: 0; }
  .content { padding: 25px 16px; }
  .page-heading { display: block; } .page-heading > p { margin-top: 10px; }
  .stat-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns:1fr; }.field-wide { grid-column:auto; }
  .quick-create-grid { grid-template-columns:1fr; }
  .setup-alert { align-items:flex-start;flex-direction:column; }
  .simple-content-table td:last-child { min-width: 340px; }
  .stat-card { min-height: 94px; }
  .welcome-card { display: block; } .ready-badge { display: inline-block; margin-top: 16px; }
  .login-panel { padding: 28px 23px; }
}
