:root {
  --bg: #f4f5f7;
  --ink: #121417;
  --muted: #5c6570;
  --line: #e2e5ea;
  --card: #ffffff;
  --side: #101114;
  --side-ink: #f4f5f7;
  --side-muted: #a3aab4;
  --accent: #111318;
  --accent-ink: #ffffff;
  --danger: #9f2d2d;
  --ok: #0f6b45;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 "Segoe UI", sans-serif; }
a { color: inherit; }
button, .btn {
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.ghost, a.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
button.warn { background: var(--danger); }
button:disabled { opacity: 0.55; cursor: default; }

.public-top, .public-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.public-foot { border-bottom: 0; border-top: 1px solid var(--line); color: var(--muted); margin-top: 28px; }
.brand { font-weight: 650; letter-spacing: 0.04em; }
.nav-row { display: flex; gap: 8px; align-items: center; }
.landing { max-width: 1040px; margin: 0 auto; padding: 48px 20px 12px; }
.hero h1 { font-size: 40px; line-height: 1.15; font-weight: 620; margin: 0 0 12px; letter-spacing: -0.03em; }
.hero p, .lead { color: var(--muted); max-width: 62ch; }
.section { margin-top: 36px; }
.section h2 { font-size: 18px; margin: 0 0 12px; }
.steps, .downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.card h3 { margin: 0 0 6px; font-size: 15px; }
.card p { margin: 0; color: var(--muted); }

.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  background: var(--side);
  color: var(--side-ink);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 8px;
}
.side .brand { padding: 4px 8px 12px; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side button, .side a.nav {
  background: transparent;
  color: var(--side-ink);
  border: 0;
  border-radius: 6px;
  text-align: left;
  justify-content: flex-start;
  padding: 8px 10px;
}
.side button[aria-current="page"] { background: #23262c; }
.side .spacer { flex: 1; }
.side .dock { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid #2a2d33; padding-top: 10px; }
.side .dock a, .side .dock button { color: var(--side-muted); }
.work { padding: 28px 28px 48px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
h1 { font-size: 26px; margin: 0; letter-spacing: -0.02em; font-weight: 620; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { font-size: 28px; font-weight: 620; letter-spacing: -0.03em; margin-top: 6px; }
.bar { height: 8px; background: #eceff3; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar span { display: block; height: 100%; background: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font: inherit;
}
textarea { min-height: 88px; resize: vertical; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.error { color: var(--danger); min-height: 1.2em; }
.ok { color: var(--ok); }
.narrow { max-width: 420px; }
.sso-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sso-title { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.sso { width: 100%; margin-top: 8px; }
.sso.diia { background: #111111; color: #ffffff; }
.sso.bank { background: #0b4ea2; color: #ffffff; }
.sso.kep { background: #ffffff; color: var(--ink); border: 1px solid var(--line); }
.spinner {
  width: 28px;
  height: 28px;
  margin: 28px 0 12px;
  border: 3px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(16, 17, 20, 0.46);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal { width: min(520px, 100%); background: white; border-radius: 8px; padding: 18px; }
@media (max-width: 860px) {
  .steps, .downloads, .grid { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .side { min-height: auto; }
}
