:root{
  --gold:#c9a15a;
  --gold-light:#e6c78a;
  --dark:#0d0d0f;
}
*{ margin:0; padding:0; box-sizing:border-box; }
body{ font-family:'Noto Sans KR', sans-serif; background:#f4f3ef; color:#222; }
.hidden{ display:none !important; }
a{ text-decoration:none; color:inherit; }

.btn{ display:inline-flex; align-items:center; gap:8px; padding:10px 18px; border-radius:8px; font-weight:600; font-size:.9rem; cursor:pointer; border:1.5px solid transparent; transition:all .2s ease; }
.btn-gold{ background:linear-gradient(135deg,var(--gold-light),var(--gold)); color:#1a1a1a; }
.btn-gold:hover{ filter:brightness(1.08); }
.btn-outline{ border-color:rgba(255,255,255,.5); color:#fff; background:transparent; }
.btn-outline:hover{ background:rgba(255,255,255,.1); }
.btn-outline-dark{ border-color:#ccc; color:#333; background:#fff; }
.btn-outline-dark:hover{ border-color:var(--gold); color:var(--gold); }
.btn-block{ width:100%; justify-content:center; }

/* ============ 로그인 화면 ============ */
#login-screen{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background: radial-gradient(circle at 50% 30%, #1c1c22, #050506 85%);
  padding:20px;
}
.login-box{
  background:#fff; border-radius:16px; padding:44px 38px; max-width:400px; width:100%;
  text-align:center; box-shadow:0 30px 60px rgba(0,0,0,.4);
}
.login-logo{ width:72px; height:72px; margin:0 auto 16px; border-radius:14px; object-fit:cover; }
.login-box h1{ font-size:1.4rem; margin-bottom:8px; font-family:'Noto Serif KR',serif; }
.login-desc{ color:#888; font-size:.85rem; margin-bottom:28px; }
.form-row{ margin-bottom:16px; text-align:left; }
.form-row label{ display:block; font-size:.85rem; font-weight:600; margin-bottom:6px; color:#444; }
.form-row input{ width:100%; padding:12px 14px; border-radius:8px; border:1px solid #ddd; font-size:.95rem; }
.form-row input:focus{ outline:none; border-color:var(--gold); }
#login-error, #password-status{ margin-top:12px; font-size:.85rem; min-height:18px; }
#login-error{ color:#e03131; }
#password-status{ color:#2f9e44; }
.back-link{ display:inline-block; margin-top:22px; color:#999; font-size:.85rem; }
.back-link:hover{ color:var(--gold); }

/* ============ 대시보드 헤더 ============ */
#admin-header{ background:#101014; padding:14px 0; }
.admin-header-inner{ max-width:1300px; margin:0 auto; padding:0 24px; display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.admin-brand{ display:flex; align-items:center; gap:10px; color:#fff; font-weight:700; }
.admin-brand img{ width:36px; height:36px; border-radius:8px; }
.admin-nav{ display:flex; gap:10px; }
.nav-btn{
  background:transparent; border:1px solid rgba(255,255,255,.15); color:#ccc; padding:9px 18px; border-radius:8px;
  cursor:pointer; font-size:.88rem; font-weight:600; display:flex; align-items:center; gap:8px; transition:all .2s ease;
}
.nav-btn:hover{ border-color:var(--gold); color:var(--gold-light); }
.nav-btn.active{ background:linear-gradient(135deg,var(--gold-light),var(--gold)); color:#1a1a1a; border-color:transparent; }

/* ============ 메인 콘텐츠 ============ */
.admin-main{ max-width:1300px; margin:0 auto; padding:34px 24px 60px; }
.tab-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:26px; flex-wrap:wrap; gap:14px; }
.tab-head h2{ font-size:1.4rem; display:flex; align-items:center; gap:10px; }
.tab-actions{ display:flex; gap:10px; flex-wrap:wrap; }

.stat-cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-bottom:30px; }
.stat-card{ background:#fff; border-radius:12px; padding:24px; text-align:center; box-shadow:0 4px 16px rgba(0,0,0,.05); }
.stat-num{ display:block; font-size:2.2rem; font-weight:800; color:#222; }
.stat-label{ color:#888; font-size:.85rem; }
.stat-card.new .stat-num{ color:#e03131; }
.stat-card.checked .stat-num{ color:#2f9e44; }

.table-wrap{ background:#fff; border-radius:12px; overflow-x:auto; box-shadow:0 4px 16px rgba(0,0,0,.05); }
table{ width:100%; border-collapse:collapse; min-width:800px; }
thead{ background:#f7f5f0; }
th, td{ padding:14px 16px; text-align:left; font-size:.88rem; border-bottom:1px solid #eee; }
th{ color:#666; font-weight:700; white-space:nowrap; }
td{ color:#333; }
.empty-row{ text-align:center; color:#999; padding:40px; }
.badge{ display:inline-block; padding:4px 12px; border-radius:20px; font-size:.75rem; font-weight:700; }
.badge-new{ background:#ffe3e3; color:#e03131; }
.badge-checked{ background:#e6f7e6; color:#2f9e44; }
.msg-cell{ max-width:260px; white-space:normal; word-break:break-word; }
.action-btn{ border:none; background:#f1f1f1; padding:7px 12px; border-radius:6px; cursor:pointer; font-size:.78rem; font-weight:600; color:#444; margin-right:6px; }
.action-btn:hover{ background:var(--gold-light); }
.action-btn.delete:hover{ background:#ffb3b3; }

/* ============ 설정 탭 ============ */
.settings-card{ background:#fff; border-radius:12px; padding:30px; max-width:460px; box-shadow:0 4px 16px rgba(0,0,0,.05); }
.settings-card h3{ font-size:1.05rem; margin-bottom:20px; display:flex; align-items:center; gap:8px; }

@media (max-width:700px){
  .stat-cards{ grid-template-columns:1fr; }
}
