:root {
  --bg: #250042;
  --panel: #35105c;
  --panel-2: #4a1c76;
  --line: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --disabled: rgba(255, 255, 255, 0.18);
  --primary: #5f218e;
  --primary-strong: #6f31a1;
  --primary-soft: #7440a2;
  --warning: #ffdc0e;
  --success: #64e3b2;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  --radius: 24px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  overflow: hidden;
}

body {
  min-height: 100vh;
}

.app {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  background:
    radial-gradient(circle at top, rgba(111, 49, 161, 0.28), transparent 28%),
    linear-gradient(180deg, #2a004d 0%, #1f0037 100%);
}

.screen {
  width: 100%;
  max-width: 1080px;
  min-height: 1920px;
  padding: 96px 92px 72px;
  display: flex;
  flex-direction: column;
}

.brand-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.brand {
  font-size: 108px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
  color: #fff;
}

.input-area {
  margin-top: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.document-input {
  width: 100%;
  max-width: 720px;
  height: 106px;
  border-radius: 28px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  padding: 0 24px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.document-input::placeholder {
  color: rgba(255,255,255,0.38);
  font-weight: 700;
}

.input-hint {
  min-height: 28px;
  font-size: 24px;
  color: var(--muted);
}

.keypad {
  margin-top: auto;
  margin-bottom: 280px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.key {
  height: 92px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.key:active {
  transform: scale(0.985);
}

.key-action {
  font-size: 38px;
}

.key-primary {
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--primary) 100%);
}

.key-primary:disabled {
  background: var(--disabled);
  color: rgba(255, 255, 255, 0.35);
  cursor: not-allowed;
  box-shadow: none;
}

.status-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 82px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.status {
  min-width: 420px;
  max-width: 840px;
  min-height: 56px;
  padding: 16px 28px;
  text-align: center;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 600;
  color: rgba(255,255,255,0.84);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status.warning {
  color: #2d2300;
  background: var(--warning);
}

.status.success {
  color: #083326;
  background: var(--success);
}

.print-frame {
  position: fixed;
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .screen {
    min-height: 100vh;
    padding: 72px 42px 48px;
    position: relative;
  }

  .brand {
    font-size: clamp(72px, 10vw, 108px);
  }

  .document-input {
    height: 92px;
    font-size: clamp(24px, 3vw, 34px);
  }

  .input-hint,
  .status {
    font-size: clamp(18px, 2vw, 24px);
  }

  .keypad {
    gap: 18px;
    margin-bottom: 220px;
  }

  .key {
    min-height: 100px;
    font-size: clamp(30px, 4vw, 42px);
  }
}
