:root {
  --canvas: #f4f4f4;
  --tile: #e9e9e9;
  --tile-hover: #e2e2e2;
  --pill: #e6e6e6;
  --pill-active: #f3f3f3;
  --ink: #0b0b0c;
  --muted: #555557;
  --hint: #8a8a8d;
  --focus: #1d5fff;
  font-family: Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 84% 15%, rgba(255, 255, 255, 0.72), transparent 21rem),
    radial-gradient(circle at 14% 78%, rgba(255, 255, 255, 0.52), transparent 22rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-auth-gate:not(.is-authenticated) .app-shell,
body.has-auth-gate:not(.is-authenticated) .toast {
  display: none;
}

body.is-authenticated .identity-gate {
  display: none;
}

.identity-gate {
  width: min(100%, 1440px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 30px 42px 28px;
  display: flex;
  flex-direction: column;
}

.identity-gate__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font-size: 19px;
  font-weight: 750;
}

.identity-gate__step {
  color: #7b7b7e;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.identity-gate__content {
  width: min(100%, 1110px);
  margin: auto auto 32px;
  padding-top: 24px;
}

.identity-gate__eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #6d6d70;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
}

.identity-gate__eyebrow span,
.identity-option__status i,
.reader-dock__ready i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #71a65d;
  box-shadow: 0 0 0 4px rgba(113, 166, 93, .12);
}

.identity-gate h1 {
  margin: 18px 0 12px;
  font-size: clamp(54px, 6vw, 84px);
  font-weight: 520;
  line-height: .94;
  letter-spacing: -.07em;
}

.identity-gate__lead {
  margin: 0;
  color: #656568;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -.026em;
}

.identity-options {
  display: grid;
  grid-template-columns: 1fr 76px 1fr;
  gap: 22px;
  align-items: stretch;
  margin-top: 47px;
}

.identity-option {
  position: relative;
  min-height: 345px;
  padding: 31px 34px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .04);
  border-radius: 28px;
  background: #e8e8e8;
}

.identity-option--qr {
  display: grid;
  grid-template-columns: 142px 1fr;
  grid-template-rows: auto 1fr auto;
  column-gap: 25px;
  background: #111112;
  color: #fff;
}

.identity-option__number {
  position: absolute;
  top: 23px;
  right: 27px;
  color: #929295;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
}

.identity-option--qr .identity-option__number { color: #747477; }

.identity-option__icon {
  width: 77px;
  height: 77px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #f6f6f6;
}

.identity-option__icon svg {
  width: 47px;
  height: 47px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.identity-option h2 {
  margin: 25px 0 10px;
  font-size: 29px;
  font-weight: 540;
  line-height: 1.02;
  letter-spacing: -.05em;
}

.identity-option p {
  margin: 0;
  color: #606063;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -.02em;
}

.identity-option--qr h2 { margin: 3px 0 11px; }
.identity-option--qr p { color: #a9a9ab; }

.identity-option__status {
  position: absolute;
  bottom: 31px;
  left: 34px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #58585b;
  font-size: 13px;
}

.identity-option__status b { font-weight: 600; }
.identity-option__status--qr { left: auto; right: 34px; color: #a1a1a5; }
.identity-option__status--qr i { background: #737376; box-shadow: none; }

.identity-option__divider {
  display: grid;
  place-items: center;
  color: #8d8d90;
  font-size: 13px;
  font-weight: 600;
}

.identity-option__divider span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 50%;
  background: #eeeeee;
}

.qr-code {
  width: 132px;
  height: 132px;
  grid-row: 1 / span 2;
  color: #111112;
}

.qr-code svg { width: 100%; height: 100%; }

.scanner-button {
  align-self: end;
  grid-column: 1 / -1;
  width: max-content;
  padding: 11px 15px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #3a3a3c;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease;
}

.scanner-button:hover { background: #252527; border-color: #555559; }
.scanner-button__dot { width: 7px; height: 7px; border-radius: 50%; background: #8abf70; }

.identity-option--qr.is-scanning .scanner-button { border-color: #8abf70; }
.identity-option--qr.is-scanning .scanner-button__dot { animation: scanner-pulse 1.2s infinite; }
.identity-option--qr.is-scanning .identity-option__status--qr i { background: #8abf70; box-shadow: 0 0 0 4px rgba(138, 191, 112, .14); }

.reader-dock {
  width: min(100%, 1110px);
  margin: 0 auto;
  padding: 17px 24px 15px;
  border: 1px solid rgba(0, 0, 0, .055);
  border-radius: 24px;
  background: #dfdfdf;
  box-shadow: inset 0 1px rgba(255, 255, 255, .72);
}

.reader-dock__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #5d5d60;
  font-size: 12px;
  font-weight: 600;
}

.reader-dock__ready { display: inline-flex; align-items: center; gap: 8px; color: #6b9760; }
.reader-dock__ready i { width: 6px; height: 6px; box-shadow: none; }

.reader-slot {
  height: 43px;
  margin-top: 11px;
  display: grid;
  grid-template-columns: 18px 1fr 18px;
  align-items: center;
  gap: 11px;
  padding: 0 17px;
  border-radius: 13px;
  background: #232324;
  cursor: pointer;
}

.reader-slot__line { height: 5px; border-radius: 99px; background: #080809; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .1); }
.reader-slot__light { width: 6px; height: 6px; border-radius: 50%; background: #75aa62; box-shadow: 0 0 10px rgba(117, 170, 98, .8); }
.reader-dock p { margin: 8px 0 0; color: #858588; font-size: 12px; text-align: center; }

.scanner-video { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.auth-status { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.auth-status.is-error {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 36px;
  width: min(620px, calc(100vw - 64px));
  height: auto;
  padding: 18px 24px;
  overflow: visible;
  clip-path: none;
  transform: translateX(-50%);
  border-radius: 24px;
  background: #f2dfdc;
  color: #9d3e32;
  text-align: center;
  white-space: normal;
}
.kmid-login { width: min(430px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 28px; background: #ededed; box-shadow: 0 24px 80px rgba(0,0,0,.18); }
.kmid-login::backdrop { background: rgba(244,244,244,.82); backdrop-filter: blur(9px); }
.kmid-login form { padding: 32px; }
.kmid-login h2 { margin: 9px 0 5px; font-size: 34px; line-height: 1.05; letter-spacing: -.04em; }
.kmid-login form > p:not(.kmid-login__error) { margin: 0 0 25px; color: var(--muted); line-height: 1.4; }
.kmid-login label { display: block; margin-top: 15px; font-size: 13px; font-weight: 600; }
.kmid-login label span { display: block; margin-bottom: 7px; }
.kmid-login input { width: 100%; height: 58px; padding: 0 18px; border: 1px solid transparent; border-radius: 17px; background: #fafafa; font: inherit; font-size: 20px; outline: none; }
.kmid-login input:focus { border-color: #111; }
.kmid-login__error { min-height: 20px; margin: 10px 0 0; color: #a64b43; font-size: 13px; }
.kmid-login__actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 12px; }
.kmid-login__actions button { min-height: 51px; }

@keyframes scanner-pulse { 50% { opacity: .25; transform: scale(.72); } }

/* Стартовый экран авторизации: та же спокойная система плиток, что и у главной. */
.auth-shell {
  width: min(100%, 1280px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 40px 40px;
}

.auth-intro {
  margin: 53px 0 52px 104px;
}

.auth-intro h1,
.auth-intro p {
  margin: 0;
  font-weight: 500;
  letter-spacing: -.045em;
}

.auth-intro h1 {
  font-size: clamp(38px, 3.3vw, 49px);
  line-height: 1.05;
}

.auth-intro p {
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(21px, 1.8vw, 27px);
  line-height: 1.15;
}

.auth-grid {
  width: min(100%, 1004px);
  margin-left: 104px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 21px;
}

.auth-tile {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  padding: 27px 29px;
  border: 0;
  border-radius: 25px;
  background: var(--tile);
  transition: opacity 220ms ease, transform 220ms ease, background 220ms ease;
}

.auth-tile::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 0, 0, .012);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.auth-tile__title {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 16rem;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.04em;
}

.auth-tile__text {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.38;
  letter-spacing: -.015em;
}

.auth-tile__asset {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.auth-tile__asset--idcard {
  width: 245px;
  right: 34px;
  bottom: 24px;
}

.auth-tile__asset--mgov {
  width: 245px;
  right: 18px;
  bottom: 18px;
}

.auth-page.is-reading .auth-tile:not(.is-reading) {
  opacity: .42;
}

.auth-tile.is-reading {
  background: #e0e0e0;
  transform: translateY(-3px);
}

.auth-tile--idcard.is-reading .auth-tile__asset--idcard {
  animation: document-reading 1.1s ease-in-out infinite;
}

.auth-tile--qr.is-reading .auth-tile__asset--mgov {
  animation: mobile-reading 1.1s ease-in-out infinite;
}

@keyframes document-reading {
  50% { transform: translateY(-14px); }
}

@keyframes mobile-reading {
  50% { transform: scale(1.055); }
}

@media (max-width: 1180px) {
  .auth-intro,
  .auth-grid { margin-left: 0; }
  .auth-grid { width: 100%; }
}

@media (max-width: 560px) {
  .auth-shell { padding: 18px 18px 28px; }
  .auth-intro { margin: 37px 0 33px; }
  .auth-intro h1 { font-size: 32px; }
  .auth-intro p { font-size: 19px; }
  .auth-grid { grid-template-columns: 1fr; gap: 12px; }
  .auth-tile { min-height: 230px; padding: 24px; }
  .auth-tile__title { font-size: 27px; }
  .auth-tile__asset--idcard { width: 178px; right: 24px; bottom: 18px; }
  .auth-tile__asset--mgov { width: 178px; right: 16px; bottom: 16px; }
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 1280px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 40px 40px;
}

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

.app-logo {
  display: block;
  width: 149px;
  height: 53px;
  object-fit: contain;
  object-position: left center;
}

.product-switcher {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 6px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--ink);
  font-size: 21px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.product-name,
.product-page {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 21px;
  white-space: nowrap;
}

.product-name {
  border-radius: 999px;
  background: var(--pill-active);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.035);
}

.product-name--logo {
  padding: 0 15px;
}

.product-name--logo img {
  display: block;
  width: 126px;
  height: 34px;
  object-fit: contain;
}

.profile-button {
  display: grid;
  width: 59px;
  height: 59px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--pill);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.profile-button svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.profile-button:hover {
  background: #dedede;
  transform: translateY(-1px);
}

.intro {
  margin: 53px 0 56px 104px;
}

.intro h1,
.intro p {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.intro h1 {
  font-size: clamp(36px, 3.1vw, 46px);
  line-height: 1.05;
}

.intro p {
  margin-top: 2px;
  font-size: clamp(36px, 3.1vw, 46px);
  line-height: 1.05;
}

.issuance-grid {
  display: grid;
  width: min(100%, 1004px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 261px;
  grid-template-rows: 171px 171px;
  gap: 21px;
  margin-left: 104px;
}

.intro[hidden],
.issuance-grid[hidden],
.hint[hidden] {
  display: none !important;
}

.issuance-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(363px, auto);
}

.issuance-grid--two .issuance-tile--large {
  grid-row: auto;
}

.kiosk-issuance-page {
  width: min(100%, 1440px);
  padding: 54px 64px 60px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.assisted-page {
  width: min(100%, 1280px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 40px 40px;
}

.assisted-page .intro {
  max-width: none;
  margin: 53px 0 56px 104px;
}

.assisted-page .issuance-grid {
  width: min(100%, 760px);
  grid-template-columns: minmax(0, 1fr) 220px;
  grid-template-rows: 320px;
}

.assisted-page .issuance-tile--large,
.assisted-page .issuance-tile--compact {
  grid-row: auto;
  min-height: 320px;
}

.assisted-launch {
  width: min(100%, 720px);
  margin-top: 48px;
}

.assisted-launch__card {
  position: relative;
  width: 100%;
  min-height: 350px;
  padding: 32px;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: var(--tile);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.assisted-launch__title {
  display: block;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.02;
}

.assisted-launch__text {
  display: block;
  max-width: 360px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -.025em;
}

.assisted-launch__icon {
  position: absolute;
  right: 32px;
  bottom: 30px;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(255, 255, 255, .58);
}

.assisted-launch__icon svg {
  width: 43px;
  height: 43px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.assisted-lookup {
  width: min(100%, 720px);
  margin-top: 48px;
  padding: 38px 42px;
  border-radius: 28px;
  background: var(--tile);
}

.assisted-lookup[hidden] { display: none; }

.assisted-lookup h2 {
  margin: 14px 0 8px;
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -.05em;
}

.assisted-lookup > p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.assisted-lookup label {
  display: block;
  margin-top: 28px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.assisted-lookup input {
  width: 100%;
  height: 66px;
  margin-top: 9px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, .65);
  color: var(--ink);
  font: inherit;
  font-size: 26px;
  letter-spacing: .08em;
}

.kiosk-issuance-page .intro,
.kiosk-issuance-page .issuance-grid,
.kiosk-issuance-page .hint,
.kiosk-issuance-page .issuance-progress,
.kiosk-issuance-page .issuance-result {
  margin-left: 0;
}

.kiosk-issuance-page .issuance-progress:not([hidden]),
.kiosk-issuance-page .issuance-result:not([hidden]) {
  position: relative;
  top: auto;
  left: auto;
  width: min(100%, 1004px);
  height: auto;
  margin: auto;
  transform: none;
}

.issuance-step {
  width: min(100%, 1004px);
  margin: 44px auto;
  padding: 38px 42px;
  border-radius: 28px;
  background: var(--tile);
}

.issuance-step[hidden] {
  display: none;
}

.step-counter {
  display: block;
  color: var(--hint);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.issuance-step h2 {
  margin: 14px 0 8px;
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -.05em;
}

.step-lead {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.35;
}

.offer-document {
  max-height: 280px;
  margin-top: 28px;
  padding: 24px 26px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, .44);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.48;
}

.offer-document h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 550;
}

.offer-document p { margin: 0 0 14px; }
.offer-document p:last-child { margin-bottom: 0; }

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

.primary-action {
  border: 0;
  background: var(--ink);
  color: #fff;
}

.primary-action:disabled { opacity: .32; cursor: default; }

.secondary-action {
  border: 1px solid rgba(0, 0, 0, .12);
  background: transparent;
  color: var(--ink);
}

.signature-pad {
  position: relative;
  height: 238px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, .44);
}

.signature-pad canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.signature-pad span {
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: var(--hint);
  font-size: 14px;
  pointer-events: none;
}

.pin-indicators {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 28px 0 22px;
}

.pin-indicators i {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #dedede;
}

.pin-indicators i.is-filled { background: #39393a; }
.pin-indicators i.is-filled::after {
  content: "•";
  color: #fff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-2px);
}

.pin-message {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: #5f9e42;
  font-size: 16px;
  font-weight: 550;
}

.pin-message.is-error { color: #b15a4b; }

.pin-keypad {
  width: min(100%, 340px);
  margin: 42px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 28px;
}

.pin-keypad button {
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 26px;
  font-weight: 500;
  transition: background 140ms ease, transform 140ms ease;
}

.pin-keypad button:not(:disabled):active { transform: scale(.94); }
.pin-keypad button:not(:disabled):hover { background: rgba(0, 0, 0, .045); }

.issuance-step[data-step="pin"] {
  width: min(100%, 560px);
  margin-top: 72px;
  padding: 0;
  background: transparent;
}

.issuance-step[data-step="pin"] h2 {
  margin-top: 12px;
  font-size: 32px;
  letter-spacing: -.04em;
}

.issuance-step[data-step="pin"] .step-lead {
  font-size: 17px;
}

.issuance-step[data-step="pin"] .step-actions {
  margin-top: 34px;
}

.pin-keypad .pin-keypad__empty { visibility: hidden; }


.issuance-tile:disabled {
  cursor: wait;
  opacity: .55;
}

.issuance-progress,
.issuance-result {
  width: min(100%, 1004px);
  min-height: 380px;
  margin-left: 104px;
  padding: 42px;
  border-radius: 28px;
  background: var(--tile);
}

.issuance-progress[hidden],
.issuance-result[hidden] {
  display: none;
}

.issuance-progress {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.issuance-progress__eyebrow {
  color: var(--hint);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.issuance-progress__loader {
  width: 62px;
  height: 62px;
  margin: 26px 0 22px;
  border: 5px solid #d0d0d0;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: issuance-spin .9s linear infinite;
}

.issuance-progress h2,
.issuance-result h2 {
  margin: 0;
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -.05em;
}

.issuance-progress p,
.issuance-result p {
  max-width: 31rem;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.issuance-result {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.issuance-result__check {
  width: 62px;
  height: 62px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dff2be;
  color: #5f9e42;
  font-size: 34px;
  font-weight: 700;
}

.issuance-result__finish {
  min-height: 52px;
  margin-top: 30px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

.physical-card-preview {
  display: block;
  width: min(100%, 720px);
  height: auto;
  margin: 26px auto 0;
  border: 1px solid rgba(0, 0, 0, .14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

.physical-card-preview[hidden] { display: none; }

@keyframes issuance-spin {
  to { transform: rotate(360deg); }
}

.issuance-tile {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: 24px 29px;
  flex-direction: column;
  border: 0;
  border-radius: 25px;
  background: var(--tile);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 170ms ease, transform 170ms ease, box-shadow 170ms ease;
}

.issuance-tile::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 0, 0, 0.012);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.issuance-tile:hover {
  background: var(--tile-hover);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.045);
  transform: translateY(-2px);
}

.issuance-tile:active {
  transform: translateY(0);
}

.issuance-tile--large {
  grid-row: 1 / span 2;
  min-height: 363px;
}

.issuance-tile--compact {
  min-height: 171px;
}

.tile-title {
  max-width: 16rem;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.issuance-tile--compact .tile-title {
  font-size: 29px;
}

.tile-description {
  margin-top: 6px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 450;
  letter-spacing: -0.015em;
}

.issuance-tile--compact .tile-description {
  font-size: 16px;
}

.tile-icon {
  position: absolute;
  display: grid;
  place-items: center;
}

.tile-icon svg {
  width: 45px;
  height: 45px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.tile-icon--arrow-up,
.tile-icon--arrow-down {
  bottom: 34px;
  left: 42px;
}

.tile-icon--kiosk,
.tile-icon--grid {
  bottom: 21px;
  left: 29px;
}

.tile-icon--kiosk svg,
.tile-icon--grid svg {
  width: 36px;
  height: 36px;
  stroke-width: 2;
}

.hint {
  width: min(100%, 1004px);
  margin: 24px 0 0 104px;
  color: var(--hint);
  font-size: 16px;
  letter-spacing: -0.015em;
}

.assisted-workspace {
  width: min(100%, 720px);
  margin: 53px 0 0 104px;
}

.assisted-workspace[hidden] { display: none; }

.assisted-workspace__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.assisted-workspace__head h2 {
  margin: 12px 0 0;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -.055em;
}

.assisted-workspace__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.assisted-workspace[data-mode="register"] .assisted-workspace__grid {
  grid-template-columns: minmax(0, 1fr);
}

.employee-search,
.print-queue {
  min-height: 0;
  padding: 24px;
  border-radius: 25px;
  background: var(--tile);
}

.employee-search > label {
  display: block;
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.employee-search input {
  width: 100%;
  height: 62px;
  padding: 0 19px;
  border: 0;
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, .62);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
}

.employee-suggestions { margin-top: 13px; }

.assistant-pin {
  margin-top: 14px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .52);
}

.assistant-pin[hidden] { display: none; }

.assistant-pin h3 {
  margin: 10px 0 5px;
  font-size: 26px;
  font-weight: 550;
  letter-spacing: -.045em;
}

.assistant-pin > p:not(.assistant-pin__message) {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.assistant-pin__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 17px;
}

.assistant-pin__fields label { margin: 0; font-size: 13px; }
.assistant-pin__fields label span { display: block; margin-bottom: 6px; color: var(--muted); }

.assistant-pin__fields input {
  height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  letter-spacing: .2em;
}

.assistant-pin__message { min-height: 18px; margin: 11px 0 0; color: #a64b43; font-size: 13px; }

.assistant-pin__actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.assistant-pin__actions .primary-action,
.assistant-pin__actions .secondary-action { min-height: 46px; padding: 0 18px; font-size: 14px; }

.employee-suggestions__empty,
.print-queue__items > p {
  margin: 18px 0;
  color: var(--hint);
  font-size: 15px;
}

.employee-suggestion {
  width: 100%;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
  padding: 13px 15px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .55);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.employee-suggestion:hover { background: rgba(255, 255, 255, .82); }

.employee-suggestion span,
.print-queue__item span {
  display: grid;
  gap: 3px;
}

.employee-suggestion b,
.print-queue__item b { font-size: 16px; }
.employee-suggestion small,
.print-queue__item small { color: var(--muted); font-size: 13px; }
.employee-suggestion em { color: var(--hint); font-size: 13px; font-style: normal; }

.print-queue {
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.print-queue[hidden] { display: none; }

.print-queue__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.print-queue__head h3 { margin: 0; font-size: 23px; font-weight: 550; letter-spacing: -.04em; }
.print-queue__head span { color: var(--hint); font-size: 14px; }
.print-queue__items { flex: 1; }

.print-queue__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .09);
}

.print-queue__item button {
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .58);
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.print-queue .primary-action { width: 100%; margin-top: 22px; }

.assisted-print-sheet { display: none; }

@media print {
  @page { size: A4; margin: 5mm; }
  body { background: #fff; }
  .app-shell, .toast { display: none !important; }
  .assisted-print-sheet { display: block; }
  .print-page {
    width: 190mm;
    display: grid;
    grid-template-columns: 180mm;
    grid-template-rows: repeat(3, 61mm);
    place-content: start center;
    gap: 5mm;
    margin: 0 auto;
    page-break-after: always;
  }
  .print-page:last-child { page-break-after: auto; }
  .print-card {
    position: relative;
    width: 180mm;
    height: 61mm;
    overflow: hidden;
    break-inside: avoid;
  }
  .print-card > img:first-child { width: 100%; height: 100%; }
  .print-card__photo { position: absolute; left: 6.7mm; top: 11.6mm; width: 27mm; height: 36.7mm; object-fit: cover; }
  .print-card strong { position: absolute; left: 37.3mm; top: 17.4mm; max-width: 32mm; color: #356eaa; font: 700 10pt Arial, sans-serif; line-height: 1.1; }
  .print-card strong span { display: block; }
  .print-card__qr { position: absolute; left: 96.4mm; top: 10.3mm; width: 34.8mm; height: 34.8mm; }
  .print-card__organization { position: absolute; top: 4.5mm; width: 90mm; color: #356eaa; font: 700 8pt Arial, sans-serif; text-align: center; }
  .print-card__organization--front { left: 0; }
  .print-card__organization--back { left: 90mm; }
  .print-card__issued { position: absolute; right: 5.8mm; bottom: 4.5mm; color: #356eaa; font: 700 7.5pt Arial, sans-serif; }
  .print-card--km .print-card__organization { display: none; }
  .print-card--km .print-card__photo { left: 5.8mm; top: 21.1mm; }
  .print-card--km strong { top: 25mm; color: #111; }
  .print-card--km .print-card__qr { top: 14.2mm; }
  .print-card--km .print-card__issued { right: 24.5mm; color: #222; font-weight: 500; }
}

.toast {
  position: fixed;
  z-index: 2;
  right: 24px;
  bottom: 24px;
  max-width: min(340px, calc(100vw - 48px));
  padding: 13px 16px;
  border-radius: 14px;
  background: #171718;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .intro,
  .issuance-grid,
  .hint,
  .issuance-progress,
  .issuance-result {
    margin-left: 0;
  }

  .issuance-grid {
    width: 100%;
  }

  .issuance-progress,
  .issuance-result { width: 100%; }

}

@media (max-width: 830px) {
  .issuance-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

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

  .issuance-tile--large,
  .issuance-tile--compact {
    grid-row: auto;
  }

  .issuance-tile--large {
    min-height: 300px;
  }
}


@media (max-width: 560px) {
  .app-shell {
    padding: 18px 18px 28px;
  }

  .product-switcher {
    min-height: 43px;
    padding: 5px;
    font-size: 14px;
  }

  .app-logo {
    width: 116px;
    height: 42px;
  }

  .product-name,
  .product-page {
    min-height: 33px;
    padding: 0 12px;
  }

  .product-name--logo { padding: 0 10px; }
  .product-name--logo img { width: 94px; height: 27px; }

  .profile-button {
    width: 43px;
    height: 43px;
  }

  .intro {
    margin: 37px 0 33px;
  }

  .intro h1,
  .intro p {
    font-size: 29px;
  }

  .issuance-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(148px, auto));
    gap: 12px;
  }

  .issuance-grid--two {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(148px, auto));
  }

  .issuance-tile--large,
  .issuance-tile--compact {
    grid-row: auto;
    min-height: 148px;
  }

  .tile-title,
  .issuance-tile--compact .tile-title {
    font-size: 24px;
  }

  .tile-icon--arrow-up,
  .tile-icon--arrow-down,
  .tile-icon--kiosk,
  .tile-icon--grid {
    right: 24px;
    bottom: 23px;
    left: auto;
  }

  .hint {
    margin-top: 15px;
  }

  .issuance-progress,
  .issuance-result {
    min-height: 310px;
    padding: 28px 20px;
  }

  .issuance-progress h2,
  .issuance-result h2 { font-size: 31px; }
}

@media (min-width: 700px) and (max-height: 800px) {
  .identity-gate {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .identity-gate__content {
    margin: 21px auto 16px;
    padding-top: 0;
  }

  .identity-gate h1 {
    margin-top: 13px;
    margin-bottom: 9px;
    font-size: clamp(52px, 5.2vw, 66px);
  }

  .identity-gate__lead {
    font-size: 17px;
    line-height: 1.33;
  }

  .identity-options {
    margin-top: 27px;
  }

  .identity-option {
    min-height: 262px;
    padding: 24px 28px;
    border-radius: 24px;
  }

  .identity-option__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .identity-option__icon svg {
    width: 39px;
    height: 39px;
  }

  .identity-option h2 {
    margin-top: 17px;
    margin-bottom: 6px;
    font-size: 25px;
  }

  .identity-option--qr h2 { margin-top: 2px; }
  .identity-option p { font-size: 13px; }
  .identity-option__status { bottom: 24px; left: 28px; }
  .identity-option__status--qr { right: 28px; left: auto; }
  .identity-option__number { top: 18px; right: 22px; }
  .qr-code { width: 108px; height: 108px; }
  .identity-option--qr { grid-template-columns: 108px 1fr; column-gap: 21px; }
  .scanner-button { padding: 9px 13px; font-size: 12px; }
  .reader-dock { padding: 13px 20px 11px; border-radius: 20px; }
  .reader-slot { height: 36px; margin-top: 8px; }
  .reader-dock p { margin-top: 5px; }
}

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