:root {
  --navy-950: #071d2b;
  --navy-900: #0b2738;
  --navy-800: #12384d;
  --teal-700: #007c72;
  --teal-600: #008f83;
  --teal-500: #00a496;
  --teal-100: #dff5f1;
  --teal-50: #effaf8;
  --blue-600: #1769aa;
  --blue-50: #eef6fc;
  --ink-900: #14232d;
  --ink-700: #405461;
  --ink-500: #6b7c86;
  --line: #dce5e9;
  --surface: #ffffff;
  --canvas: #f3f7f8;
  --danger: #c43d4b;
  --danger-bg: #fff0f1;
  --success: #087b54;
  --success-bg: #eaf8f1;
  --warning: #98620b;
  --warning-bg: #fff6df;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(7, 29, 43, .05), 0 5px 18px rgba(7, 29, 43, .04);
  --shadow-lg: 0 20px 55px rgba(7, 29, 43, .14);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--ink-900);
  background: var(--canvas);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 10px 16px; color: #fff; background: var(--navy-950); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.public-bar { height: 34px; display: flex; align-items: center; padding: 0 32px; color: #d8e7ed; background: var(--navy-950); font-size: 12px; }
.public-bar span { display: flex; align-items: center; gap: 7px; max-width: 1440px; width: 100%; margin: auto; }
.organization-logo { display: block; width: auto; max-width: 72px; height: 20px; object-fit: contain; }
.app-header { height: 72px; display: flex; align-items: center; padding: 0 32px; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { width: 100%; max-width: 1440px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-symbol { width: 39px; height: 39px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--teal-500), var(--teal-700)); border-radius: 12px; box-shadow: 0 6px 16px rgba(0, 143, 131, .22); }
.brand-symbol .icon { width: 23px; height: 23px; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { color: var(--navy-900); font-size: 18px; letter-spacing: -.02em; }
.brand-copy small { color: var(--ink-500); font-size: 11px; letter-spacing: .08em; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 12px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; color: var(--teal-700); background: var(--teal-100); border-radius: 10px; font-weight: 800; }
.user-meta { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-500); }
.user-meta strong { color: var(--ink-900); font-size: 13px; }

.app-shell { min-height: calc(100vh - 106px); display: grid; grid-template-columns: 244px minmax(0, 1fr); max-width: 1440px; margin: auto; }
.main-column { min-width: 0; display: flex; flex-direction: column; }
.sidebar { padding: 28px 18px; background: #fff; border-right: 1px solid var(--line); }
.nav-label { margin: 0 12px 10px; color: var(--ink-500); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 13px; color: var(--ink-700); border-radius: 10px; font-size: 14px; font-weight: 650; }
.nav-item:hover { color: var(--teal-700); background: var(--teal-50); }
.nav-item.active { color: #fff; background: var(--navy-900); box-shadow: 0 8px 20px rgba(11, 39, 56, .16); }
.nav-item.disabled { color: #9aa8af; cursor: default; }
.nav-pill { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: #edf1f3; color: var(--ink-500); font-size: 10px; }
.sidebar-help { margin-top: 30px; padding: 16px; color: #c9e1e7; background: linear-gradient(150deg, var(--navy-900), var(--navy-800)); border-radius: 14px; font-size: 12px; }
.sidebar-help strong { display: block; color: #fff; margin-bottom: 5px; font-size: 13px; }
.content { min-width: 0; padding: 34px 38px 50px; }
.app-footer { margin-top: auto; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 38px; color: var(--ink-500); border-top: 1px solid var(--line); font-size: 12px; }
.app-footer nav { display: flex; gap: 20px; }
.app-footer a { color: var(--ink-700); font-weight: 650; }
.app-footer a:hover { color: var(--teal-700); text-decoration: underline; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 5px; color: var(--teal-700); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; color: var(--navy-900); font-size: clamp(26px, 3vw, 34px); line-height: 1.25; letter-spacing: -.035em; }
.page-description { margin: 0; color: var(--ink-500); font-size: 14px; }

.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; font-size: 14px; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(0, 164, 150, .25); outline-offset: 2px; }
.btn-primary { color: #fff; background: var(--teal-700); box-shadow: 0 7px 16px rgba(0, 124, 114, .18); }
.btn-primary:hover { background: #006d65; }
.btn-secondary { color: var(--navy-900); background: #fff; border-color: var(--line); }
.btn-secondary:hover { border-color: #b8c8ce; background: #f9fbfb; }
.btn-danger { color: var(--danger); background: #fff; border-color: #efcfd2; }
.btn-ghost { color: var(--ink-700); background: transparent; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.alert-list { position: fixed; top: 118px; right: 24px; z-index: 50; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); margin: 0; padding: 0; list-style: none; }
.alert { padding: 13px 16px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal-600); border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; }
.alert.error { border-left-color: var(--danger); }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.metric-card { position: relative; min-height: 152px; padding: 22px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.metric-card::after { content: ""; position: absolute; right: -26px; bottom: -42px; width: 110px; height: 110px; background: var(--teal-50); border-radius: 50%; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--ink-500); font-size: 13px; font-weight: 650; }
.metric-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--teal-700); background: var(--teal-50); border-radius: 10px; }
.metric-value { margin: 16px 0 4px; color: var(--navy-900); font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.metric-note { color: var(--ink-500); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.card-header { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 22px; border-bottom: 1px solid #e9eff1; }
.card-header h2 { margin: 0; color: var(--navy-900); font-size: 17px; letter-spacing: -.02em; }
.card-body { padding: 22px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; color: var(--success); background: var(--success-bg); border-radius: 999px; font-size: 11px; font-weight: 800; }
.status-dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.empty-state { min-height: 285px; display: grid; place-items: center; padding: 35px 24px; text-align: center; }
.empty-visual { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 16px; color: var(--teal-700); background: var(--teal-50); border: 1px solid var(--teal-100); border-radius: 22px; }
.empty-visual .icon { width: 32px; height: 32px; }
.empty-state h3 { margin-bottom: 7px; font-size: 16px; }
.empty-state p { max-width: 380px; margin: 0 auto 18px; color: var(--ink-500); font-size: 13px; }
.quick-list { display: grid; gap: 9px; }
.quick-item { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.quick-item:hover { border-color: #a9cec9; background: var(--teal-50); }
.quick-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--teal-700); background: var(--teal-50); border-radius: 9px; }
.quick-copy { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-500); }
.quick-copy strong { color: var(--ink-900); font-size: 13px; }
.quick-arrow { margin-left: auto; color: #91a1a9; }
.system-note { display: flex; align-items: flex-start; gap: 11px; margin-top: 16px; padding: 14px; color: var(--ink-700); background: var(--blue-50); border-radius: 10px; font-size: 12px; }
.system-note .icon { color: var(--blue-600); }

.auth-page { min-height: calc(100vh - 34px); display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); background: #fff; }
.auth-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 52px clamp(38px, 6vw, 90px); color: #fff; background: var(--navy-950); }
.auth-brand-panel::before { content: ""; position: absolute; width: 430px; height: 430px; right: -210px; top: 15%; border: 1px solid rgba(95, 220, 206, .22); border-radius: 50%; box-shadow: 0 0 0 80px rgba(0, 164, 150, .04), 0 0 0 160px rgba(0, 164, 150, .025); }
.auth-brand-panel .brand-copy strong { color: #fff; }
.auth-brand-panel .brand-copy small { color: #a9c5ce; }
.auth-intro { position: relative; z-index: 1; max-width: 500px; }
.auth-intro .eyebrow { color: #63d2c7; }
.auth-intro h1 { color: #fff; font-size: clamp(32px, 4vw, 48px); line-height: 1.22; }
.auth-intro p { color: #b8ced5; font-size: 15px; }
.auth-feature-list { display: grid; gap: 13px; margin-top: 32px; }
.auth-feature { display: flex; align-items: center; gap: 11px; color: #d9e8ec; font-size: 13px; }
.auth-feature .icon { color: #63d2c7; }
.auth-foot { color: #7897a2; font-size: 11px; }
.auth-main { display: grid; place-items: center; padding: 48px 28px; background: linear-gradient(145deg, #fff 30%, #f2f8f8); }
.auth-card { width: min(100%, 440px); }
.auth-card.wide { width: min(100%, 520px); }
.auth-heading { margin-bottom: 28px; }
.auth-heading h2 { margin-bottom: 8px; color: var(--navy-900); font-size: 28px; letter-spacing: -.03em; }
.auth-heading p { margin: 0; color: var(--ink-500); font-size: 14px; }
.form-stack { display: grid; gap: 18px; }
.form-field label { display: block; margin-bottom: 7px; color: var(--ink-700); font-size: 13px; font-weight: 750; }
.form-field input { width: 100%; height: 48px; padding: 0 14px; color: var(--ink-900); background: #fff; border: 1px solid #cfdcdf; border-radius: 9px; transition: border .15s, box-shadow .15s; }
.form-field input:hover { border-color: #9db2ba; }
.form-field input:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(0, 164, 150, .1); outline: none; }
.helptext { display: block; margin-top: 6px; color: var(--ink-500); font-size: 11px; }
.helptext ul { margin: 5px 0 0; padding-left: 18px; }
.errorlist { margin: 6px 0 0; padding: 0; color: var(--danger); list-style: none; font-size: 12px; }
.form-stack > .errorlist { padding: 11px 13px; background: var(--danger-bg); border-radius: 8px; }
.form-meta { display: flex; justify-content: flex-end; margin-top: -5px; }
.text-link { color: var(--teal-700); font-size: 13px; font-weight: 750; }
.text-link:hover { text-decoration: underline; }
.auth-divider { display: flex; align-items: center; gap: 13px; margin: 22px 0; color: #96a6ad; font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-bottom { text-align: center; color: var(--ink-500); font-size: 13px; }
.security-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 20px; padding: 12px 14px; color: var(--ink-500); background: #f5f8f9; border-radius: 9px; font-size: 11px; }
.security-note .icon { width: 16px; height: 16px; color: var(--teal-700); }

.settings-layout { display: grid; grid-template-columns: minmax(0, 720px); }
.settings-card { padding: 26px; }
.profile-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.profile-summary .avatar { width: 52px; height: 52px; font-size: 19px; border-radius: 14px; }
.profile-summary strong, .profile-summary span { display: block; }
.profile-summary span { color: var(--ink-500); font-size: 12px; }
.role-badge { display: inline-flex; margin-top: 4px; padding: 3px 8px; color: var(--blue-600); background: var(--blue-50); border-radius: 999px; font-size: 10px; font-weight: 800; }
.completion-state { text-align: center; }
.completion-icon { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 22px; color: var(--success); background: var(--success-bg); border-radius: 50%; }
.completion-icon .icon { width: 36px; height: 36px; }
.management-grid { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.settings-card h2 { margin-bottom: 6px; font-size: 18px; }
.section-description { margin-bottom: 22px; color: var(--ink-500); font-size: 13px; }
.count-badge { padding: 4px 9px; color: var(--ink-700); background: #edf2f4; border-radius: 999px; font-size: 11px; font-weight: 800; }
.list-body { padding: 0 20px; }
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 2px; border-bottom: 1px solid #e9eff1; }
.rule-row:last-child { border-bottom: 0; }.rule-main { min-width: 0; }.rule-title { display: flex; align-items: center; gap: 9px; }.rule-main p { margin: 8px 0 5px; }.rule-main small { color: var(--ink-500); }.term-chip { display: inline-flex; margin: 2px 4px 2px 0; padding: 3px 8px; color: var(--teal-700); background: var(--teal-50); border-radius: 999px; font-size: 11px; font-weight: 750; }.status-badge.inactive { color: var(--ink-500); background: #edf2f4; }.row-actions { display: flex; gap: 7px; }.empty-state.compact { min-height: 260px; }
.approval-list { padding: 0 22px; }.approval-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; border-bottom: 1px solid #e9eff1; }.approval-row:last-child { border-bottom: 0; }.approval-user { min-width: 0; display: flex; align-items: center; gap: 13px; }.approval-user div { min-width: 0; display: grid; }.approval-user strong { color: var(--ink-900); font-size: 14px; }.approval-user span, .approval-user small { overflow-wrap: anywhere; color: var(--ink-500); font-size: 12px; }
.filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) 240px auto; align-items: end; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }.form-field select { width: 100%; height: 48px; padding: 0 38px 0 14px; color: var(--ink-900); background: #fff; border: 1px solid #cfdcdf; border-radius: 9px; }.news-list { padding: 0 22px; }.news-row { padding: 22px 2px; border-bottom: 1px solid #e9eff1; }.news-row h2 { margin: 9px 0 6px; font-size: 17px; }.news-row h2 a:hover { color: var(--teal-700); text-decoration: underline; }.news-row p { margin: 0; color: var(--ink-500); font-size: 13px; }.news-meta { display: flex; align-items: center; gap: 9px; color: var(--ink-500); font-size: 11px; }.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px; }
.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }.channel-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 15px; align-items: start; padding: 22px; }.channel-card > form, .channel-actions { grid-column: 1 / -1; }.channel-card .btn { width: 100%; }.channel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.channel-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--teal-700); background: var(--teal-50); border-radius: 12px; }.channel-card h2 { margin: 1px 0 3px; font-size: 17px; }.channel-card p { margin-bottom: 10px; color: var(--ink-500); font-size: 12px; }.connect-card { border-style: dashed; }
.legal-card { max-width: 860px; margin: 0 auto; padding: clamp(26px, 5vw, 52px); }.legal-lead { padding-bottom: 24px; color: var(--ink-500); border-bottom: 1px solid var(--line); }.legal-card section { padding: 18px 0; border-bottom: 1px solid #e9eff1; }.legal-card section h2 { margin-bottom: 7px; font-size: 16px; }.legal-card section p { margin: 0; color: var(--ink-700); font-size: 13px; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .nav-label, .nav-item span, .nav-pill, .sidebar-help { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .content { padding: 28px 24px 44px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card:last-child { grid-column: 1 / -1; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .management-grid, .channel-grid { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 300px; padding: 38px; }
  .auth-feature-list, .auth-foot { display: none; }
}
@media (max-width: 640px) {
  .public-bar { padding: 0 18px; }
  .app-header { height: 64px; padding: 0 18px; }
  .brand-copy small, .user-meta { display: none; }
  .app-shell { display: block; min-height: calc(100vh - 98px); }
  .sidebar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: 66px; padding: 8px 12px; border: 0; border-top: 1px solid var(--line); }
  .side-nav { grid-template-columns: repeat(4, 1fr); }
  .nav-item { min-height: 49px; }
  .nav-item:nth-child(n+5), .nav-label { display: none; }
  .content { padding: 24px 16px 92px; }
  .app-footer { padding: 18px 16px 84px; align-items: flex-start; flex-direction: column; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card:last-child { grid-column: auto; }
  .card-header { padding-inline: 17px; }
  .card-body { padding: 17px; }
  .auth-brand-panel { min-height: 220px; padding: 28px 22px; }
  .auth-intro h1 { font-size: 28px; }
  .auth-intro p { margin: 0; }
  .auth-main { padding: 34px 20px; place-items: start center; }
  .button-row .btn { flex: 1; }
  .filter-bar { grid-template-columns: 1fr; }.rule-row { align-items: flex-start; flex-direction: column; }.row-actions { width: 100%; }.row-actions form, .row-actions .btn { flex: 1; width: 100%; }
  .approval-row { align-items: flex-start; flex-direction: column; }.approval-row form, .approval-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
