@import url('https://fonts.googleapis.com/css2?family=Nunito:opsz,wght@6..12,200..1000&display=swap');
@font-face {
  font-family: 'Juache';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_one@1.0/BMJUA.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #eef5ff;
  --panel: rgba(255,255,255,0.9);
  --border: #d9e5fb;
  --text: #223654;
  --muted: #7188ab;
  --blue: #2f63d8;
  --blue-soft: #eaf1ff;
  --mint: #2ebdb0;
  --mint-soft: #e8fbf7;
  --orange: #f08a4b;
  --orange-soft: #fff3e7;
  --danger-soft: #fff0eb;
  --danger: #ff7a59;
  --shadow: 0 20px 60px rgba(34, 54, 84, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: linear-gradient(180deg, #f6fbff 0%, #edf4ff 100%); color: var(--text); font-family: var(--font-body); }
button, input, textarea, select { font: inherit; }
body { padding: 24px; }
.hidden { display: none !important; }
.pre-gate,
.auth-gate { min-height: calc(100vh - 48px); display: grid; place-items: center; }
.pre-gate-card,
.auth-card { width: min(560px, 100%); background: rgba(255,255,255,0.92); border: 1px solid var(--border); border-radius: 32px; padding: 28px; box-shadow: var(--shadow); }
.pre-gate-card h1,
.auth-card h1 { margin: 8px 0 12px; font-size: 2rem; }
.auth-copy, .auth-hint { color: var(--muted); line-height: 1.65; }
.auth-form { display: grid; gap: 14px; margin-top: 20px; }
.auth-form label, .form-grid label { display: grid; gap: 8px; }
.auth-form span, .form-grid span, .form-card > label > span { font-size: 0.88rem; font-weight: 700; color: var(--muted); }
.auth-form input, .form-card input, .form-card textarea, .form-card select { width: 100%; border: 1px solid #d6e5ff; border-radius: 14px; padding: 14px 16px; background: #fff; color: var(--text); }
.auth-row, .inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-status { margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; min-height: calc(100vh - 48px); }
.sidebar { background: #101726; color: #e6eefc; border-radius: 30px; padding: 24px 18px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 20px 60px rgba(16,23,38,0.2); }
.brand { display: flex; align-items: center; gap: 14px; padding: 8px 10px 0; }
.brand-mark { width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(135deg, #2f63d8, #2ebdb0); display: grid; place-items: center; font-weight: 800; }
.brand-name { font-size: 1.2rem; font-weight: 800; font-family: var(--font-logo); letter-spacing: 0.01em; }
.brand-sub, .footer-copy { color: #93a6c5; font-size: 0.92rem; line-height: 1.5; }
.menu { display: grid; gap: 8px; }
.menu-item { width: 100%; border: 0; background: transparent; color: #d6e2f8; text-align: left; padding: 14px 16px; border-radius: 16px; font-weight: 600; cursor: pointer; transition: 0.2s ease; }
.menu-item:hover, .menu-item.active { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-footer { margin-top: auto; }
.footer-card { border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); border-radius: 20px; padding: 16px; }
.footer-title { font-weight: 700; margin: 4px 0 8px; }
.main { background: rgba(255,255,255,0.72); border: 1px solid #dbe8ff; border-radius: 32px; box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 24px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.accent-blue { color: var(--blue); }
.accent-mint { color: var(--mint); }
.accent-orange { color: var(--orange); }
.topbar h1, .panel h2 { margin: 4px 0 8px; }
.topbar h1 { font-size: 2.1rem; font-family: var(--font-title); letter-spacing: -0.02em; }
.topbar p { margin: 0; max-width: 760px; color: var(--muted); line-height: 1.6; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.primary-button, .secondary-button, .ghost-button { border-radius: 16px; padding: 12px 18px; font-weight: 700; cursor: pointer; border: 0; }
.primary-button { background: linear-gradient(135deg, var(--blue), #5a88ef); color: #fff; }
.secondary-button { border: 1px solid #cfe0ff; background: #fff; color: var(--blue); }
.ghost-button { background: #f5f8ff; color: var(--muted); border: 1px solid #d8e4fb; }
.status-pill, .status-tag, .badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 700; }
.status-pill { padding: 10px 14px; background: var(--blue-soft); color: var(--blue); }
.status-tag { padding: 8px 12px; font-size: 0.88rem; }
.status-ok { background: #e7fbf6; color: #208d82; }
.status-info { background: var(--blue-soft); color: var(--blue); }
.status-warn { background: var(--orange-soft); color: var(--orange); }
.status-danger { background: var(--danger-soft); color: var(--danger); }
.section { display: none; }
.section.active { display: block; }
.stats-grid, .panel-grid { display: grid; gap: 18px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stats-grid.compact { grid-template-columns: repeat(3, minmax(0,1fr)); }
.panel-grid.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
.metric-card, .panel, .form-card { background: var(--panel); border: 1px solid var(--border); border-radius: 24px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.6); }
.metric-card { padding: 20px; }
.metric-label { color: var(--muted); font-weight: 700; }
.metric-value { font-size: 2rem; font-weight: 800; margin-top: 8px; }
.metric-copy { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.panel { padding: 22px; }
.form-card { padding: 18px; margin-bottom: 16px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); margin-bottom: 12px; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.list-grid, .timeline-list, .stack-list { display: grid; gap: 14px; }
.item-card { border: 1px solid #dfe8fb; background: #fbfdff; border-radius: 18px; padding: 16px; }
.item-card h3 { margin: 0 0 8px; font-size: 1rem; }
.item-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.note-box { background: #f7fbff; border: 1px solid #dfe8fb; border-radius: 18px; padding: 16px; color: var(--muted); line-height: 1.6; }
.mini-table { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 1.4fr 1.6fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: #fbfdff; border: 1px solid #dfe8fb; border-radius: 16px; }
.row.header { background: transparent; border-style: dashed; color: var(--muted); font-weight: 700; }
.badge { padding: 6px 10px; font-size: 0.8rem; }
.badge.ok { background: #e7fbf6; color: #208d82; }
.badge.warn { background: #fff1e5; color: #c16f24; }
.bullet-list, .ordered-list { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.stack-item, .timeline-item { border: 1px solid #dfe8fb; border-radius: 18px; padding: 14px 16px; background: #fbfdff; }
.stack-top, .timeline-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.stack-title, .timeline-title { font-weight: 700; }
.stack-copy, .timeline-copy { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.empty-state { color: var(--muted); padding: 18px; border: 1px dashed #d0def7; border-radius: 18px; background: rgba(255,255,255,0.6); }
.toast { position: fixed; right: 24px; bottom: 24px; background: #fff; border: 1px solid #dce8ff; box-shadow: var(--shadow); border-radius: 18px; padding: 14px 16px; color: var(--text); min-width: 280px; z-index: 50; }
.toast.success { border-color: #cfeee8; }
.toast.error { border-color: #ffd5c8; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow: auto; align-items: flex-start; }
  .menu { grid-auto-flow: column; grid-auto-columns: max-content; }
  .sidebar-footer { display: none; }
  .stats-grid, .stats-grid.compact, .panel-grid.two-col, .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { padding: 12px; }
  .main { padding: 18px; }
  .topbar { flex-direction: column; }
  .topbar h1 { font-size: 1.7rem; }
  .stats-grid { grid-template-columns: 1fr; }
}

.auth-section { display: grid; gap: 12px; padding: 14px; border: 1px solid #dfe8fb; border-radius: 18px; background: #fbfdff; }
.auth-section-title { font-size: 0.92rem; font-weight: 800; color: var(--text); }
.auth-divider { position: relative; text-align: center; color: var(--muted); font-weight: 700; margin: 2px 0; }
.auth-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #dbe6fb; }
.auth-divider span { position: relative; display: inline-block; padding: 0 12px; background: rgba(255,255,255,0.92); }

.font-title,
.title-font {
  font-family: 'Juache', 'Pretendard', sans-serif;
}

.font-body,
.body-font {
  font-family: 'Pretendard', sans-serif;
}

.font-logo,
.logo-font {
  font-family: 'Nunito', 'Pretendard', sans-serif;
  font-weight: 1000;
}

