:root {
  --bg: #f3f1ec;
  --panel: #fffdf9;
  --ink: #1c1915;
  --muted: #6d655c;
  --line: #e6dfd4;
  --accent: #0f6b5c;
  --accent-2: #c45c26;
  --sidebar: #14231f;
  --sidebar-ink: #e8f2ef;
  --danger: #b42318;
  --ok: #067647;
  --warn: #b54708;
  --shadow: 0 10px 30px rgba(28, 25, 21, 0.06);
  --radius: 16px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(15,107,92,.12), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(196,92,38,.10), transparent 55%),
    var(--bg);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 12px; }
.row { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .row { grid-template-columns: 1fr; } }

.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #18302b 0%, var(--sidebar) 100%);
  color: var(--sidebar-ink);
  padding: 22px 16px;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; padding: 0 8px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, #1f8f7a, #0f6b5c);
}
.brand-title { font-weight: 700; }
.brand-sub { font-size: 12px; opacity: .7; }
.nav { display: grid; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 12px; opacity: .86;
}
.nav-item:hover, .nav-item.is-active { background: rgba(255,255,255,.08); opacity: 1; }
.nav-item .badge {
  margin-left: auto; font-style: normal; font-size: 11px;
  background: rgba(196,92,38,.25); color: #ffd7c2; padding: 2px 7px; border-radius: 999px;
}

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; border-bottom: 1px solid rgba(230,223,212,.8);
  backdrop-filter: blur(8px); background: rgba(255,253,249,.7);
}
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.user-chip {
  background: var(--panel); border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 999px; font-size: 13px;
}
.content { padding: 24px 28px 48px; }
.page-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.page-head h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.02em; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
}
.stat-card { display: flex; justify-content: space-between; align-items: center; }
.stat-card h4 { margin: 0; font-size: 28px; }
.stat-card p { margin: 0 0 8px; color: var(--muted); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; font-size: 22px;
}
.stat-icon.primary { background: var(--accent); }
.stat-icon.success { background: #12805c; }
.stat-icon.warning { background: var(--accent-2); }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 600; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 12px; padding: 10px 14px; cursor: pointer; font-weight: 600;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-danger { background: #fff5f5; border-color: #f3c1c1; color: var(--danger); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 10px; font-size: 13px; }

input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; background: #fff; font: inherit;
}
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 800px) { .form-grid { grid-template-columns: 1fr; } }

.badge-pill {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: #eef6f3; color: var(--accent);
}
.badge-pill.warn { background: #fff4e8; color: var(--warn); }
.badge-pill.danger { background: #fef3f2; color: var(--danger); }
.badge-pill.ok { background: #ecfdf3; color: var(--ok); }

.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.alert-success, .alert-ok { background: #ecfdf3; color: var(--ok); }
.alert-error { background: #fef3f2; color: var(--danger); }

.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    linear-gradient(160deg, rgba(15,107,92,.18), transparent 40%),
    linear-gradient(320deg, rgba(196,92,38,.16), transparent 35%),
    #efe8dc;
}
.auth-card {
  width: min(420px, 100%); background: rgba(255,253,249,.95);
  border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--shadow);
}
.auth-brand { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.auth-card h1 { margin: 8px 0 6px; font-size: 26px; }

.section-title { margin: 0 0 12px; font-size: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1.4fr .8fr; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 10; }
  .grid-2 { grid-template-columns: 1fr; }
}
