:root {
  color-scheme: light;
  --ink: #16231f;
  --muted: #61706a;
  --line: #dfe7e3;
  --surface: #ffffff;
  --canvas: #f3f6f4;
  --brand: #0c6b4f;
  --brand-dark: #07513c;
  --brand-soft: #dff3ea;
  --warning: #9a5b0a;
  --shadow: 0 24px 70px rgba(22, 35, 31, 0.12);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 14%, rgba(12, 107, 79, 0.11), transparent 31rem),
    linear-gradient(145deg, #f8faf9 0%, #edf2ef 100%);
  font-family: Inter, Pretendard, "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

button, input { font: inherit; }

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar,
.page-footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 780;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 8px 24px rgba(12, 107, 79, 0.24);
  font-size: 14px;
  letter-spacing: -0.06em;
}

.environment-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.main-grid {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: center;
  gap: clamp(42px, 7vw, 100px);
  padding-block: 64px 88px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(46px, 6.8vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero-copy {
  max-width: 610px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
  word-break: keep-all;
}

.system-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
}

.system-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 13px;
}

.system-item strong { color: var(--ink); font-weight: 750; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a7b2ad;
}

.status-dot.is-online { background: #18a66f; box-shadow: 0 0 0 4px rgba(24, 166, 111, 0.13); }
.status-dot.is-offline { background: #d48a24; box-shadow: 0 0 0 4px rgba(212, 138, 36, 0.13); }

.login-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--brand), #51a989);
  content: "";
}

.panel-kicker { margin: 0; color: var(--brand); font-size: 13px; font-weight: 800; }
.login-panel h2 { margin: 8px 0 10px; font-size: 30px; letter-spacing: -0.04em; }
.panel-copy { margin: 0 0 28px; color: var(--muted); line-height: 1.65; }

.login-actions { display: grid; gap: 12px; }
.login-entry-message { min-height: 20px; margin: 10px 0 0; color: #a63b28; font-size: 13px; line-height: 1.5; }

.login-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 780;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-button:hover { transform: translateY(-1px); }
.login-button:disabled { cursor: wait; opacity: 0.68; transform: none; }
.login-button:focus-visible { outline: 3px solid rgba(12, 107, 79, 0.28); outline-offset: 3px; }
.login-button.primary { color: #fff; background: var(--brand); box-shadow: 0 12px 24px rgba(12, 107, 79, 0.2); }
.login-button.primary:hover { background: var(--brand-dark); }
.login-button.secondary { color: var(--ink); border-color: var(--line); background: #f7faf8; }
.login-button .arrow { font-size: 20px; font-weight: 400; }

.security-note {
  display: flex;
  gap: 10px;
  margin: 24px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.lock-icon { color: var(--brand); font-weight: 900; }

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 22px 30px;
  border-top: 1px solid rgba(97, 112, 106, 0.16);
  color: var(--muted);
  font-size: 12px;
}

.login-dialog {
  width: min(430px, calc(100% - 32px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(11, 25, 19, 0.3);
}

.login-dialog::backdrop { background: rgba(9, 22, 17, 0.54); backdrop-filter: blur(4px); }
.dialog-inner { padding: 30px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-header h2 { margin: 5px 0 0; font-size: 25px; }
.dialog-close { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 25px; }
.login-form,
.approval-form { display: grid; gap: 17px; margin-top: 26px; }
.dialog-description { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.availability-message { min-height: 18px; margin: -10px 0 0; color: var(--muted); font-size: 12px; }
.availability-message.is-available { color: var(--brand); }
.availability-message.is-unavailable { color: #a63b28; }
.password-change-fields { display: grid; gap: 17px; }
.password-change-fields[hidden] { display: none; }
.field { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.field input { min-height: 48px; border: 1px solid #cfd9d4; border-radius: 11px; padding: 0 13px; color: var(--ink); background: #fff; }
.field input:focus { border-color: var(--brand); outline: 3px solid rgba(12, 107, 79, 0.12); }
.form-message { min-height: 20px; margin: 0; color: #a63b28; font-size: 13px; line-height: 1.5; }
.submit-button { min-height: 50px; border: 0; border-radius: 12px; color: #fff; background: var(--brand); cursor: pointer; font-weight: 800; }

@media (max-width: 840px) {
  .main-grid { grid-template-columns: 1fr; gap: 48px; padding-block: 34px 64px; }
  h1 { max-width: 650px; }
  .login-panel { max-width: 620px; }
}

@media (max-width: 540px) {
  .topbar, .main-grid, .page-footer { width: min(100% - 28px, 1180px); }
  .topbar { padding-block: 17px; }
  .environment-badge { display: none; }
  .main-grid { padding-top: 30px; }
  h1 { font-size: clamp(42px, 15vw, 62px); }
  .hero-copy { font-size: 17px; }
  .login-panel { border-radius: 22px; padding: 27px 21px; }
  .page-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.text-button { justify-self: center; border: 0; padding: 4px 8px; color: var(--brand); background: transparent; cursor: pointer; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
