:root {
  color-scheme: dark;
  --bg: #07110f;
  --panel: #0d1b18;
  --line: rgba(199, 232, 221, .14);
  --text: #eef8f4;
  --muted: #9cb4ac;
  --accent: #79e2bd;
  --accent-soft: rgba(121, 226, 189, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 12%, rgba(52, 139, 111, .22), transparent 28rem),
    linear-gradient(145deg, #07110f 0%, #091713 58%, #06100e 100%);
  color: var(--text);
  font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: auto;
  display: flex;
  flex-direction: column;
}

header, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header {
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: .12em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
}

.badge {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

main { flex: 1; }

.hero {
  max-width: 880px;
  padding: clamp(76px, 11vw, 146px) 0 90px;
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 7.2vw, 88px);
  font-weight: 640;
  letter-spacing: -.055em;
  line-height: 1.08;
}

h1 em {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.lead {
  max-width: 650px;
  margin: 36px 0 28px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.notice {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent-soft);
  color: #cde9df;
  font-size: 14px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(121, 226, 189, .12);
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

article {
  min-height: 230px;
  padding: 32px 34px;
}

article + article { border-left: 1px solid var(--line); }
article > span { color: var(--accent); font-size: 12px; }
h2 { margin: 44px 0 12px; font-size: 20px; }
article p { margin: 0; color: var(--muted); line-height: 1.7; }

footer {
  min-height: 92px;
  color: #708b82;
  font-size: 12px;
}

@media (max-width: 720px) {
  .principles { grid-template-columns: 1fr; }
  article { min-height: auto; }
  article + article { border-left: 0; border-top: 1px solid var(--line); }
  h2 { margin-top: 24px; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
}

.app-body { background: #f4f7f6; color: #16231f; }
.app-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid #dfe8e4;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}
.app-header .brand { color: #10251e; }
.app-header .brand-mark { background: #10251e; color: #8be3c3; }
.app-header nav { display: flex; align-self: stretch; gap: 30px; }
.app-header nav a {
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: #52655e;
  text-decoration: none;
}
.app-header nav a:hover { border-color: #16835d; color: #10251e; }
.user-menu { display: flex; justify-self: end; gap: 18px; align-items: center; font-size: 14px; }
.user-menu a { color: #60736c; }
.app-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 80px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 38px; }
.page-heading.compact { margin-bottom: 26px; }
.page-heading h1 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.045em; }
.page-heading p:not(.eyebrow) { margin: 10px 0 0; color: #667972; }
.app-body .eyebrow { margin-bottom: 10px; color: #16835d; }
.button {
  display: inline-flex;
  min-height: 42px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd9d4;
  border-radius: 9px;
  background: white;
  color: #20352e;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { border-color: #0f6d4c; background: #0f6d4c; color: white; }
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20, 57, 44, .09); }
.button.full { width: 100%; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.metric-grid article {
  min-height: 140px;
  padding: 24px;
  border: 1px solid #dfe8e4;
  border-radius: 14px;
  background: white;
}
.metric-grid article + article { border-left: 1px solid #dfe8e4; }
.metric-grid span { color: #6b7e77; font-size: 14px; }
.metric-grid strong { display: block; margin-top: 24px; font-size: 34px; }
.panel, .form-card {
  overflow: hidden;
  border: 1px solid #dfe8e4;
  border-radius: 14px;
  background: white;
  box-shadow: 0 12px 32px rgba(36, 68, 57, .04);
}
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid #e6eeeb; }
.panel-heading h2 { margin: 0; font-size: 18px; }
.panel-heading a { color: #147553; font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 24px; border-bottom: 1px solid #edf2f0; text-align: left; white-space: nowrap; }
th { color: #71827c; font-size: 12px; letter-spacing: .04em; }
td { font-size: 14px; }
td a { color: #0e6b4a; font-weight: 700; }
td small { display: block; margin-top: 4px; color: #84958f; font-weight: 400; }
.status { padding: 6px 9px; border-radius: 999px; background: #e9f6f1; color: #146a4c; font-size: 12px; }
.empty { padding: 62px 24px; text-align: center; color: #72847d; }
.empty .button { margin-top: 10px; }
.filters { display: grid; grid-template-columns: minmax(240px, 1fr) 190px auto; gap: 10px; margin-bottom: 16px; }
input, select, textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cbd9d4;
  border-radius: 8px;
  background: white;
  color: #172721;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(35, 152, 110, .14); border-color: #238c65; }
label { display: grid; gap: 8px; color: #445851; font-size: 14px; font-weight: 650; }
.form-card { padding: 28px; }
.form-card.narrow { display: grid; width: min(580px, 100%); gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.alert { margin: 0 0 18px; padding: 13px 15px; border-radius: 9px; }
.alert.error { border: 1px solid #f0c8c2; background: #fff1ef; color: #9b3428; }
.alert.success { border: 1px solid #bde2d4; background: #edf9f4; color: #176447; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; }
.case-layout aside { display: grid; align-content: start; gap: 18px; }
.detail-panel dl { margin: 0; padding: 12px 24px; }
.detail-panel dl div { display: grid; grid-template-columns: 130px 1fr; padding: 14px 0; border-bottom: 1px solid #edf2f0; }
dt { color: #768780; } dd { margin: 0; font-weight: 650; }
.notes { padding: 8px 24px 28px; }.notes h3 { font-size: 14px; }.notes p { color: #596c65; line-height: 1.75; }
.status-form, .next-step { padding: 22px; }
.status-form .button { margin-top: 16px; }
.next-step span { color: #18805c; font-size: 12px; font-weight: 750; }.next-step h3 { margin: 12px 0 8px; }.next-step p { margin: 0; color: #687a73; line-height: 1.6; }
.login-shell { display: grid; min-height: calc(100vh - 160px); place-items: center; }
.login-brand { display: flex; position: absolute; top: 32px; left: 40px; gap: 12px; align-items: center; color: #10251e; font-weight: 800; letter-spacing: .12em; }
.login-brand .brand-mark { background: #10251e; color: #8be3c3; }
.login-card { width: min(430px, 100%); padding: 38px; border: 1px solid #dce7e3; border-radius: 18px; background: white; box-shadow: 0 20px 60px rgba(28, 65, 52, .09); }
.login-card h1 { font-size: 32px; }.login-card .muted { color: #70817b; }.login-card form { display: grid; gap: 18px; margin-top: 30px; }

@media (max-width: 760px) {
  .app-header { grid-template-columns: 1fr auto; padding: 0 20px; }
  .app-header nav { display: none; }
  .user-menu span { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .filters, .form-grid, .case-layout { grid-template-columns: 1fr; }
  .login-brand { left: 20px; }
}
