:root {
  --bg: #020407;
  --panel: rgba(8, 11, 18, 0.94);
  --panel-2: rgba(12, 16, 25, 0.96);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: #a9b0bd;
  --key: #141922;
  --key-hover: #1b2330;
  --blue: #4462d8;
  --blue-2: #2f57e8;
  --orange: #f49a12;
  --danger: #ff5b5b;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 158, 18, 0.10), transparent 32%),
    radial-gradient(circle at 78% 15%, rgba(67, 98, 216, 0.08), transparent 32%),
    linear-gradient(135deg, #020407, #060914 58%, #020407);
  color: var(--text);
  overflow: auto;
}

.login-shell {
  width: min(1180px, calc(100vw - 32px));
  min-height: min(680px, calc(100vh - 32px));
  margin: 16px auto;
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.brand-card,
.pin-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 15, 24, 0.98), rgba(4, 6, 10, 0.98));
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 42px);
  text-align: center;
}

.brand-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(244, 154, 18, 0.20);
  mask: linear-gradient(#000, transparent 75%);
}

.brand-glow {
  position: absolute;
  width: 270px;
  height: 270px;
  left: -120px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(244, 154, 18, 0.22), transparent 70%);
}

.app-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 7px 14px;
  border: 1px solid rgba(244, 154, 18, 0.25);
  border-radius: 999px;
  background: rgba(244, 154, 18, 0.07);
  color: #ffd18a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.app-badge.compact {
  min-height: 26px;
  padding: 6px 12px;
  border-color: rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--muted);
}

.brand-logo {
  position: relative;
  width: min(285px, 72%);
  max-height: 260px;
  margin-top: 22px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
}

.brand-divider {
  width: 285px;
  max-width: 72%;
  height: 1px;
  margin: 26px 0 30px;
  background: linear-gradient(90deg, transparent, rgba(244, 154, 18, 0.70), transparent);
}

.brand-card h1 {
  position: relative;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  font-weight: 900;
}

.brand-card p {
  position: relative;
  margin: 12px 0 0;
  font-size: clamp(16px, 1.8vw, 21px);
  color: var(--muted);
  letter-spacing: 0.03em;
}

.pin-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(22px, 3.3vw, 38px);
}

.pin-content {
  width: min(560px, 100%);
}

.pin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.pin-content h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: 0.02em;
  line-height: 1;
}

.pin-dots {
  min-height: 50px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  background: rgba(3, 6, 12, 0.70);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.015);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 18px;
}

.pin-dots span {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.22);
  transition: 0.15s ease;
}

.pin-dots span.filled {
  background: #dfe5ef;
  border-color: #dfe5ef;
  box-shadow: 0 0 18px rgba(68, 98, 216, 0.35);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 14px;
}

.keypad button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
  height: clamp(68px, 9.6vh, 86px);
  border-radius: 18px;
  background: linear-gradient(180deg, #181e29, #111720);
  color: var(--text);
  font-size: clamp(28px, 3.8vw, 36px);
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 18px rgba(0,0,0,0.22);
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}

.keypad button:hover { background: linear-gradient(180deg, #202838, #131a25); }
.keypad button:active { transform: scale(0.985); }

.enter-btn {
  width: 100%;
  margin-top: 18px;
  height: clamp(62px, 8.5vh, 74px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--blue), var(--blue-2));
  color: #fff;
  font-size: clamp(23px, 2.6vw, 29px);
  font-weight: 900;
  letter-spacing: .03em;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(47, 87, 232, 0.22), inset 0 1px 0 rgba(255,255,255,0.20);
}

.enter-btn:active { transform: translateY(1px); }
.enter-btn:disabled { opacity: .72; cursor: wait; }
.lock-icon { margin-right: 12px; font-size: 20px; opacity: .92; }

.login-message {
  min-height: 22px;
  margin: 12px 0 0;
  text-align: center;
  color: var(--danger);
  font-size: 15px;
  font-weight: 800;
}

@media (max-height: 720px) and (min-width: 981px) {
  .login-shell {
    min-height: calc(100vh - 20px);
    margin: 10px auto;
  }
  .brand-card { padding: 22px 34px; }
  .brand-logo { width: min(225px, 62%); max-height: 210px; margin-top: 16px; }
  .brand-divider { margin: 18px 0 22px; }
  .pin-card { padding: 22px 32px; }
  .pin-heading { margin-bottom: 12px; }
  .pin-dots { min-height: 44px; margin-bottom: 14px; }
  .keypad { gap: 10px 12px; }
  .keypad button { height: 62px; border-radius: 16px; }
  .enter-btn { height: 58px; margin-top: 14px; }
  .login-message { margin-top: 8px; }
}

@media (max-width: 980px) {
  .login-shell {
    width: min(640px, calc(100vw - 24px));
    min-height: auto;
    grid-template-columns: 1fr;
    margin: 12px auto;
  }
  .brand-card { min-height: 260px; }
  .brand-logo { width: min(230px, 58%); }
  .app-badge.compact { display: none; }
  .pin-heading { justify-content: center; text-align: center; }
  .keypad button { height: 70px; }
}
