:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --text: #172033;
  --muted: #657084;
  --line: #dfe6f1;
  --primary: #176bff;
  --primary-dark: #0d4fc2;
  --accent: #14a67b;
  --warning: #f4a62a;
  --danger: #d94b4b;
  --shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 230, 241, 0.85);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-dark);
  background: var(--surface-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 4px 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.language-control select {
  min-height: 36px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 64px 0;
}

.section.compact {
  padding: 36px 0;
}

.hero {
  padding: 72px 0 52px;
  background:
    linear-gradient(120deg, rgba(23, 107, 255, 0.1), rgba(20, 166, 123, 0.08)),
    var(--surface);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: 40px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 24px;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  background: var(--surface);
  color: var(--text);
}

.btn.primary {
  color: #fff;
  background: var(--primary);
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  border-color: var(--line);
}

.btn.ghost {
  color: var(--primary-dark);
  background: var(--surface-soft);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-inner {
  padding: 24px;
}

.status-panel {
  min-height: 330px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.status-row:last-child {
  border-bottom: 0;
}

.label {
  color: var(--muted);
  font-size: 14px;
}

.value {
  font-weight: 850;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 800;
}

.badge.green {
  color: #087454;
  background: #dbf7ee;
}

.badge.yellow {
  color: #80520b;
  background: #fff1cf;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card.soft {
  background: var(--surface-soft);
}

.card strong {
  display: block;
  font-size: 28px;
  line-height: 1.2;
}

.muted {
  color: var(--muted);
}

.notice-band {
  padding: 20px 0;
  color: #4c5b70;
  background: #fff7e6;
  border-top: 1px solid #f1dfb7;
  border-bottom: 1px solid #f1dfb7;
}

.notice-list {
  margin: 0;
  padding-inline-start: 18px;
  display: grid;
  gap: 4px;
}

.steps {
  counter-reset: step;
}

.step {
  position: relative;
  padding-inline-start: 58px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 4px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 800;
  font-size: 14px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 32px 0 64px;
}

.side-nav {
  align-self: start;
  position: sticky;
  top: 92px;
  display: grid;
  gap: 6px;
}

.side-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 750;
}

.side-nav a:hover,
.side-nav a.active {
  color: var(--primary-dark);
  background: var(--surface-soft);
}

.page-title {
  padding: 36px 0 10px;
}

.metric {
  min-height: 126px;
}

.progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf8;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.qr {
  width: min(280px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 2px dashed #9cb5d8;
  background:
    linear-gradient(90deg, rgba(23, 107, 255, 0.12) 12px, transparent 12px) 0 0 / 36px 36px,
    linear-gradient(rgba(23, 107, 255, 0.12) 12px, transparent 12px) 0 0 / 36px 36px,
    #fff;
  color: var(--primary-dark);
  font-weight: 900;
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.footer {
  padding: 34px 0;
  color: var(--muted);
  background: #101828;
}

.footer .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.footer-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding-top: 4px;
  line-height: 1.4;
  align-items: center;
}

.footer-links a,
.footer-link-separator {
  color: inherit;
  font-size: 14px;
}

.footer-links a {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 2px 0;
  white-space: nowrap;
}

.footer-link-separator {
  opacity: 0.45;
}

.toast {
  position: fixed;
  inset-inline-start: 50%;
  bottom: 22px;
  z-index: 50;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: #172033;
  transition: 180ms ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

[dir="rtl"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Arabic", "Noto Sans KR", sans-serif;
}

[dir="rtl"] .toast {
  transform: translateX(50%) translateY(20px);
}

[dir="rtl"] .toast.show {
  transform: translateX(50%) translateY(0);
}

[dir="rtl"] .language-control {
  padding: 4px 8px 4px 0;
}

@media (max-width: 880px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-grid,
  .grid.two,
  .grid.three,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 46px;
  }

  .side-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .container,
  .nav {
    width: min(100% - 24px, 1120px);
  }

  .section {
    padding: 44px 0;
  }

  .nav-actions,
  .hero-actions,
  .actions {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .footer .container {
    grid-template-columns: 1fr;
  }

  .footer-links {
    gap: 8px 10px;
  }

  .status-row {
    flex-direction: column;
    gap: 4px;
  }
}
