/* eVeyra on the phone: an app shell in the manner of the eGov app (shell rules apply at max-width 860px; the
   screen components also serve the desktop QR and profile pages). */
:root { --g: 16px; --app-bg: #F3F5F9; --chip: #F1F3F7; --blue-ic: #2F5BEA; }
@media (min-width: 861px) { .appbar, .m-only { display: none !important; } .menu-page { max-width: 680px; padding-top: 32px; padding-bottom: 48px; } .appqr, .apppres { max-width: 560px; } .dock { display: none; } }
@media (max-width: 860px) {
  html { -webkit-tap-highlight-color: transparent; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); overscroll-behavior-y: contain; }
  body.signed { background: var(--app-bg); }
  body.pushed { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .util, .hdr { display: none !important; }
  body.signed .ftr { display: none; }
  .wrap { padding: 0 var(--g); }
  .m-only { display: block; }
  .d-only { display: none !important; }

  /* ---------- App bar ---------- */
  .appbar { position: sticky; top: 0; z-index: 30; display: grid; align-items: center; gap: 10px; min-height: 60px; padding: calc(8px + env(safe-area-inset-top)) var(--g) 8px; background: rgba(255,255,255,.96); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); }
  body.signed .appbar { background: rgba(243,245,249,.94); }
  .ab-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; background: #fff; color: var(--ink); border: 0; padding: 0; cursor: pointer; text-decoration: none; box-shadow: 0 1px 2px rgba(17,34,53,.06); }
  body:not(.signed) .ab-btn { background: var(--chip); box-shadow: none; }
  .ab-btn .ic { width: 22px; height: 22px; }
  .ab-sp { visibility: hidden; }
  .ab-home { grid-template-columns: minmax(0, 1fr) 44px; }
  .ab-search { position: relative; margin: 0; }
  .ab-search .ic { position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; color: #8492A6; pointer-events: none; }
  .ab-search input { width: 100%; height: 48px; border: 0; border-radius: 15px; background: #fff; padding: 0 14px 0 46px; font: inherit; font-size: 17px; color: var(--ink); box-shadow: 0 1px 2px rgba(17,34,53,.06); -webkit-appearance: none; }
  .ab-search input::placeholder { color: #8E9AAB; }
  .ab-search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(25,91,235,.22); }
  .ab-inner { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .ab-title { text-align: center; font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ab-root { grid-template-columns: minmax(0, 1fr) auto; padding-top: calc(14px + env(safe-area-inset-top)); }
  .ab-root h1 { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -.02em; }
  .ab-brand { grid-template-columns: auto 1fr auto auto; }
  .ab-logo img { display: block; height: 36px; width: auto; }
  .ab-pill { grid-column: 3; display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--chip); color: var(--ink); font-weight: 700; font-size: 13px; text-decoration: none; }
  .ab-signin { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 12px; background: var(--lapis); color: #fff; font-weight: 700; font-size: 14.5px; text-decoration: none; }
  .ab-ava .ava { width: 38px; height: 38px; }

  /* ---------- Tab bar ---------- */
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); box-shadow: 0 -1px 0 rgba(17,34,53,.08); }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 4px; padding: 4px 2px; color: #8A96A8; text-decoration: none; font-size: 11.5px; font-weight: 600; }
  .tabbar .ic { width: 28px; height: 28px; padding: 0; border-radius: 0; background: none !important; stroke-width: 1.7; }
  .tabbar a.on { color: var(--lapis); }
  .tabbar a.on .ic { stroke-width: 2.1; }
  .tabbar em { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--err); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; }
  body.pushed .tabbar { display: none; }

  /* ---------- Cabinet shell on the phone ---------- */
  .cab-shell { padding-top: 4px; padding-bottom: 24px; }
  .cab-main, .m-only { min-width: 0; }
  .cab-head h1 { display: none; }
  .cab-head { margin-bottom: 10px; justify-content: flex-end; }
  .cab-head:empty { display: none; }
  body.appown .cab-head { display: none; }
  body.signed .pagehead .crumbs { display: none; }
  body.signed .pagehead { padding-top: 6px; background: none; }
  body.signed .cat-head h1, body.signed .cat-head .lead { display: none; }
  body.signed .pagehead h1 { font-size: 26px; }
  .panel { border-radius: 22px; }

}

/* Horizontal scrollers */
.hs { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; align-items: start; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 calc(-1 * var(--g)); padding: 2px var(--g) 6px; scroll-padding: 0 var(--g); }
.hs::-webkit-scrollbar { display: none; }
.hs-snap { scroll-snap-type: x mandatory; grid-auto-columns: 86%; }
.hs-snap > * { scroll-snap-align: start; }
.pill-link { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 38px; padding: 0 12px 0 16px; border-radius: 999px; background: #E8EFFD; color: var(--lapis); font-weight: 700; font-size: 15px; text-decoration: none; }
.pill-link .ic { width: 18px; height: 18px; }
.pill-link.wide { display: flex; width: 100%; height: 48px; margin-top: 12px; border-radius: 15px; }

/* ---------- Home ---------- */
.apphome { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 4px; }
.apphome > *, .appdocs > *, .ad-group > * { min-width: 0; }
.ah-h { margin: 0 0 12px; font-size: 22px; line-height: 1.15; }
.bn { position: relative; display: flex; align-items: stretch; gap: 10px; height: 156px; padding: 20px; border-radius: 22px; color: #fff; text-decoration: none; overflow: hidden; }
.bn::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 0 0 22px rgba(255,255,255,.04), 0 0 0 44px rgba(255,255,255,.03); pointer-events: none; }
.bn:hover { color: #fff; }
.bn-tx { flex: 1; display: grid; align-content: start; gap: 6px; position: relative; z-index: 1; }
.bn-tx b { font-family: var(--display); font-size: 22px; line-height: 1.12; letter-spacing: -.01em; }
.bn-tx span { font-size: 14px; line-height: 1.35; opacity: .9; }
.bn-navy { background: linear-gradient(135deg, #14223D, #2C3F78); }
.bn-blue { background: linear-gradient(135deg, #2A6BFF, #1340B8); }
.bn-green { background: linear-gradient(135deg, #14896A, #0B5A44); }
.bn-coral { background: linear-gradient(135deg, #F27455, #CF4329); }
.bn-pass { align-self: center; width: 76px; height: auto; border-radius: 6px; transform: rotate(-8deg); box-shadow: 0 10px 24px rgba(0,0,0,.35); position: relative; z-index: 1; }
.bn-qr { align-self: center; width: 84px; height: 84px; border-radius: 26px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.bn-qr .ic { width: 46px; height: 46px; stroke-width: 1.5; }
.bn-app { align-self: center; border-radius: 18px; box-shadow: 0 8px 20px rgba(0,0,0,.25); position: relative; z-index: 1; }
.ah-banners .rail-dots { margin-top: 10px; }

.ah-docs-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ah-docs-h h2 { margin: 0; font-size: 24px; line-height: 1.12; }
.pk { position: relative; display: block; width: 158px; height: 164px; border-radius: 22px; background: #E9EEF8; overflow: hidden; color: var(--ink); text-decoration: none; }
.pk-art { position: absolute; left: 16px; right: 16px; top: 14px; height: 96px; border-radius: 9px 9px 0 0; overflow: hidden; box-shadow: 0 2px 8px rgba(17,34,53,.18); background: #fff; }
.pk-art img { display: block; width: 100%; height: auto; }
.pk-paper .pk-art { left: 26px; right: 26px; height: 80px; border-radius: 4px 4px 0 0; }
.pk-sleeve { position: absolute; left: 0; right: 0; top: 78px; height: 90px; border-radius: 20px 20px 0 0; background: #F4F7FC; box-shadow: 0 -6px 14px rgba(17,34,53,.08); }
.pk-sleeve::before { content: ''; position: absolute; left: 10px; right: 10px; top: 0; height: 6px; border-radius: 0 0 6px 6px; background: var(--sb); }
.pk b { position: absolute; left: 14px; right: 12px; bottom: 14px; font-size: 15px; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pk-empty .pk-art { display: flex; align-items: center; justify-content: center; color: var(--lapis); box-shadow: none; background: #fff; }

.alist { display: grid; gap: 10px; }
.arow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: #fff; color: var(--ink); text-decoration: none; }
.arow > .ic:last-child { width: 20px; height: 20px; color: #A3AEBD; }
.arow-ic { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--lapis-50); color: var(--lapis); }
.arow-warn .arow-ic { background: #FFF1D9; color: #9A5B00; }
.arow-t { display: grid; gap: 2px; min-width: 0; }
.arow-t b { font-size: 15.5px; line-height: 1.3; }
.arow-t span { color: var(--muted); font-size: 13.5px; }
.arow-th { width: 64px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--sb); display: block; }
.arow:has(.arow-th) { grid-template-columns: 64px minmax(0, 1fr) 22px; }
.arow-th img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

.mapps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 6px; padding: 18px 6px; border-radius: 24px; background: #fff; }
.mapp { display: grid; justify-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 600; line-height: 1.25; text-align: center; }
.mapp-ic { position: relative; width: 58px; height: 58px; border-radius: 19px; display: flex; align-items: center; justify-content: center; background: var(--t, #EEF2FA); color: var(--c, var(--lapis)); }
.mapp-ic .ic { width: 28px; height: 28px; stroke-width: 1.7; }
.mapp-ic em { position: absolute; top: -3px; right: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--err); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; }
.ma-main { --t: #E8EFFD; }
.ma-amber { --t: #FFF1D6; --c: #B97A00; } .ma-red { --t: #FDE6E3; --c: #C43B2E; } .ma-green { --t: #E1F3EA; --c: #0F7A5A; } .ma-teal { --t: #DCF1F3; --c: #0E7C86; }
.ma-pink { --t: #FBE5EE; --c: #B03E73; } .ma-navy { --t: #E3E8F3; --c: #24365E; } .ma-gold { --t: #F5EDDA; --c: #8A6A2C; }

.sitc { position: relative; display: grid; align-content: start; gap: 6px; height: 176px; padding: 18px 18px 18px; border-radius: 22px; background: var(--c); color: var(--ink); text-decoration: none; overflow: hidden; }
.sitc-pill { justify-self: start; padding: 4px 10px; border-radius: 8px; background: rgba(255,255,255,.6); font-size: 12.5px; font-weight: 700; color: #3D4A5C; }
.sitc b { font-family: var(--display); font-size: 21px; line-height: 1.15; max-width: 70%; margin-top: 4px; }
.sitc-p { font-size: 13.5px; color: #4A5668; max-width: 66%; }
.sitc-ic { position: absolute; right: 16px; bottom: 18px; width: 86px; height: 86px; border-radius: 50%; background: rgba(255,255,255,.55); display: flex; align-items: center; justify-content: center; color: #34465E; }
.sitc-ic .ic { width: 44px; height: 44px; stroke-width: 1.4; }
.sitc > .ic:last-child { position: absolute; right: 14px; top: 16px; width: 20px; height: 20px; color: #5B6B7D; }
.ah-sit .rail-dots { margin-top: 10px; }

.plist-m { display: grid; background: #fff; border-radius: 22px; overflow: hidden; }
.prow { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.prow + .prow { box-shadow: inset 60px 1px 0 #fff, inset 0 1px 0 var(--line-2); }
.prow-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--blue-ic); color: #fff; display: flex; align-items: center; justify-content: center; }
.prow-ic .ic { width: 23px; height: 23px; }
.prow-t { font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.prow > .ic:last-child { width: 18px; height: 18px; color: #A3AEBD; }
.badge-new { padding: 4px 10px; border-radius: 999px; background: #E5383B; color: #fff; font-size: 12.5px; font-weight: 800; }

/* ---------- Documents ---------- */
.appdocs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 4px; }
.hs-cards { grid-auto-columns: 84%; }
.adw { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 4px rgba(17,34,53,.08), 0 10px 24px rgba(17,34,53,.12); }
.hs-cards { align-items: center; }
.adw-passport { border-radius: 4px; }
.adw img { display: block; width: 100%; height: auto; }
.ad-wallet .rail-dots { margin-top: 10px; }
.ad-group { display: grid; gap: 12px; }
.ad-group h2 { margin: 0; font-family: var(--body); font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tk { border-radius: 22px; background: var(--sb); overflow: hidden; box-shadow: 0 1px 2px rgba(17,34,53,.06); }
.tk-h { display: grid; grid-template-columns: 1fr 34px 1fr; gap: 10px; align-items: center; padding: 12px 14px 28px; color: var(--sf); font-size: 10.5px; font-weight: 800; line-height: 1.25; letter-spacing: .02em; text-align: center; }
.tk-b { position: relative; margin-top: -18px; padding: 16px 18px 14px; border-radius: 22px 22px 0 0; background: #F7F9FC; }
.tk-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tk dl { margin: 0; display: grid; gap: 12px; }
.tk dt { font-size: 13px; color: var(--muted); }
.tk dd { margin: 2px 0 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.tk-up { text-transform: uppercase; }
.tk-num { display: flex; align-items: center; gap: 8px; }
.tk-num .mono { font-size: 18px; }
.cp { position: relative; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: #6C7A8C; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.cp:active { background: rgba(25,91,235,.1); }
.cp .ic { width: 21px; height: 21px; }
.cp.done { color: var(--mal); }
.vb { margin: 16px 0 12px; }
.vb-track { position: relative; height: 6px; border-radius: 3px; background: #DCE3EC; }
.vb-track i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--f); border-radius: 3px; background: linear-gradient(90deg, #7CC79E, #E7B85B); }
.vb-open .vb-track i { background: #9AD0B2; }
.vb-now { position: absolute; top: 50%; left: clamp(30px, var(--f), calc(100% - 30px)); transform: translate(-50%, -50%); padding: 3px 9px; border-radius: 9px; background: #D7E7DF; color: #1D3B36; font-size: 12px; font-weight: 700; white-space: nowrap; }
.vb-soon .vb-now { background: #F7E3B8; color: #7A4B00; }
.vb-dates { display: flex; justify-content: space-between; margin-top: 10px; font-size: 16px; font-weight: 700; }
.vb-dates .ok { color: #2E9F5B; } .vb-dates .end { color: #E1A23B; }
.tk-foot { grid-template-columns: 1fr auto; align-items: end; }
.tk-upd { font-size: 13px; color: #9AA6B5; text-align: right; }
.tk-off { filter: grayscale(.6); opacity: .85; }

/* ---------- One document ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 15px; background: #E9EDF3; margin-bottom: 16px; }
.seg button { height: 40px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 15.5px; font-weight: 600; color: #6C7A8C; cursor: pointer; }
.seg button[aria-selected="true"] { background: #fff; color: var(--lapis); box-shadow: 0 1px 3px rgba(17,34,53,.12); }
.js .seg-panel:not(.on) { display: none; }
.appdoc { padding-top: 4px; }
.ad-stage .dv-stage, .ad-stage .stage { padding: 0; background: none; }
.ad-stack { display: grid; gap: 14px; padding: 6px 2px; }
.ad-stage .paper-big { max-width: none; }
.ad-void { text-align: center; }
.rq { display: grid; gap: 0; margin: 0; background: #fff; border-radius: 20px; overflow: hidden; }
.rq > div { padding: 12px 16px; }
.rq > div + div { box-shadow: inset 0 1px 0 var(--line-2); }
.rq dt { font-size: 13px; color: var(--muted); }
.rq dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rq-h { font-size: 16px; margin: 18px 4px 8px; }
.rq-tbl { display: grid; gap: 8px; }
.rq-tbl > div { display: grid; gap: 4px; padding: 12px 16px; border-radius: 16px; background: #fff; }
.rq-tbl span { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.rq-tbl em { font-style: normal; color: var(--muted); }
.rq-st { margin: 14px 4px 0; padding: 14px 16px; border-radius: 16px; background: #fff; font-size: 14.5px; }
.rq-qr { display: grid; justify-items: center; gap: 8px; margin-top: 14px; padding: 18px; border-radius: 20px; background: #fff; text-align: center; color: var(--muted); font-size: 13.5px; }
.rq-qr .qr { width: 160px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 10px; padding: 10px var(--g) calc(10px + env(safe-area-inset-bottom)); background: rgba(243,245,249,.96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.dock .btn { height: 56px; border-radius: 16px; font-size: 16.5px; }
.dock-main .ic { width: 22px; height: 22px; }
.dock-more { background: #E3EAF8; color: var(--lapis); padding: 0; }
.dock-more .ic { width: 26px; height: 26px; }

/* Action sheet */
.sheet { position: fixed; inset: 0; z-index: 70; }
.sheet-bg { position: absolute; inset: 0; background: rgba(12,20,33,.42); animation: fadeIn .18s ease; }
.sheet-card { position: absolute; left: 0; right: 0; bottom: 0; display: grid; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #fff; animation: sheetUp .22s cubic-bezier(.2,.8,.2,1); }
.sheet-grip { justify-self: center; width: 40px; height: 5px; border-radius: 3px; background: #D5DBE4; margin: 2px 0 8px; }
.sheet-card > a, .sheet-card > button:not(.btn) { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 10px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; border-radius: 14px; }
.sheet-card > a .ic, .sheet-card > button .ic { color: var(--lapis); }
.sheet-card > a:active, .sheet-card > button:active { background: var(--chip); }
.sheet-card .sheet-cancel { justify-content: center; margin-top: 6px; background: var(--chip); color: var(--ink); }
.sheet-text { justify-items: center; text-align: center; gap: 10px; padding-top: 8px; }
.sheet-text img { border-radius: 16px; }
.sheet-text b { font-size: 19px; }
.sheet-text p { margin: 0 8px; color: #3D4A5C; }
.sheet-text .btn { width: 100%; height: 52px; }
.sheet-text .sheet-cancel { width: 100%; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; padding: 10px 16px; border-radius: 12px; background: rgba(20,39,58,.92); color: #fff; font-size: 14.5px; font-weight: 600; animation: fadeIn .15s ease; }

/* ---------- eVeyra QR ---------- */
.appqr { padding-top: 4px; }
.aq-lead { margin: 0 4px 14px; color: #3D4A5C; font-size: 15px; }
.scan { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 24px; background: radial-gradient(circle at 50% 40%, #22324B, #0E1828); overflow: hidden; }
.scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; border-radius: 22px; background:
  linear-gradient(#fff, #fff) left top / 34px 4px no-repeat, linear-gradient(#fff, #fff) left top / 4px 34px no-repeat,
  linear-gradient(#fff, #fff) right top / 34px 4px no-repeat, linear-gradient(#fff, #fff) right top / 4px 34px no-repeat,
  linear-gradient(#fff, #fff) left bottom / 34px 4px no-repeat, linear-gradient(#fff, #fff) left bottom / 4px 34px no-repeat,
  linear-gradient(#fff, #fff) right bottom / 34px 4px no-repeat, linear-gradient(#fff, #fff) right bottom / 4px 34px no-repeat; opacity: .9; }
.scan-start { position: relative; z-index: 1; height: 52px; border-radius: 16px; }
.scan.live .scan-start { display: none; }
.scan-msg { position: absolute; left: 16px; right: 16px; bottom: 14px; margin: 0; text-align: center; color: #D6DEEA; font-size: 13.5px; z-index: 1; }
.aq-code { margin-top: 16px; padding: 16px; border-radius: 20px; background: #fff; display: grid; gap: 10px; }
.aq-code label { font-size: 14.5px; color: var(--muted); }
.aq-code div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.aq-code input { height: 50px; border: 0; border-radius: 14px; background: var(--chip); padding: 0 14px; font-size: 18px; letter-spacing: .08em; min-width: 0; }
.aq-code .btn { height: 50px; }

.apppres { display: grid; justify-items: center; gap: 14px; padding-top: 6px; text-align: center; }
.ap-card { width: 64%; max-width: 280px; }
.ap-qr { position: relative; width: 268px; height: 268px; display: grid; place-items: center; }
.ap-code { width: 236px; height: 236px; border-radius: 22px; background: #fff; display: grid; place-items: center; padding: 10px; box-shadow: 0 2px 6px rgba(17,34,53,.1); }
.ap-code svg { width: 100%; height: 100%; }
.ap-code.dim svg { opacity: .15; }
.ap-load { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--lapis-100); border-top-color: var(--lapis); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ap-ring { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; }
.ap-ring circle { stroke: #DCE4F2; stroke-width: 5; }
.ap-ring rect { stroke: #DCE4F2; stroke-width: 5; }
.ap-ring .ap-ring-v { stroke: var(--lapis); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.ap-who { display: grid; gap: 2px; margin: 0; }
.ap-who b { font-size: 19px; }
.ap-who span { color: var(--muted); font-size: 14.5px; }
.ap-timer { margin: 0; font-weight: 700; color: var(--lapis); }
.ap-refresh { height: 46px; }
.ap-note { margin: 0 12px; font-size: 13px; color: var(--muted); }

/* ---------- Messages ---------- */
.appmsg { padding-top: 4px; }
.mlist { display: grid; background: #fff; border-radius: 22px; overflow: hidden; }
.mrow { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.mrow + .mrow { box-shadow: inset 0 1px 0 var(--line-2); }
.mrow-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--lapis-50); color: var(--lapis); display: flex; align-items: center; justify-content: center; }
.mrow-t { display: grid; gap: 3px; min-width: 0; }
.mrow-t b { font-size: 15.5px; line-height: 1.3; }
.mrow-t span { color: #3D4A5C; font-size: 14px; line-height: 1.4; }
.mrow-t time { color: #9AA6B5; font-size: 12.5px; }
.mrow.unread::after { content: ''; position: absolute; right: 16px; top: 18px; width: 9px; height: 9px; border-radius: 50%; background: var(--lapis); }
.mrow .pill { align-self: center; }
.empty-m { display: grid; justify-items: center; gap: 10px; padding: 48px 16px; margin: 0; color: var(--muted); text-align: center; }
.empty-m .ic { width: 40px; height: 40px; color: #B5C0CE; }
.appmsg .ah-h { font-size: 17px; margin: 4px 4px 10px; }
.appmsg .mlist + .ah-h, .appmsg .mlist + .mlist { margin-top: 16px; }

/* ---------- Profile ---------- */
@media (max-width: 860px) { .menu-page { padding-top: 4px; padding-bottom: 24px; display: block; } }
.appprof { display: grid; gap: 16px; }
.pf-me { display: grid; grid-template-columns: 64px minmax(0, 1fr) 20px; gap: 14px; align-items: center; padding: 16px; border-radius: 22px; background: #fff; color: var(--ink); text-decoration: none; }
.pf-me .ava-xl { width: 64px; height: 64px; }
.pf-me b { display: block; font-size: 17px; line-height: 1.25; }
.pf-me span span { color: var(--muted); font-size: 14px; }
.pf-me > .ic { color: #A3AEBD; width: 20px; height: 20px; }
.pf-list { display: grid; background: #fff; border-radius: 22px; overflow: hidden; }
.pf-list a, .pf-list button { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 18px; gap: 14px; align-items: center; padding: 10px 16px; min-height: 64px; color: var(--ink); text-decoration: none; font: inherit; font-size: 16.5px; font-weight: 600; background: none; border: 0; text-align: left; cursor: pointer; width: 100%; }
.pf-list a > span:nth-child(2), .pf-list button > span:nth-child(2) { grid-column: 2 / 4; }
.pf-list a:has(em) > span:nth-child(2) { grid-column: 2; }
.pf-list em { font-style: normal; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.pf-list > * + * { box-shadow: inset 74px 1px 0 #fff, inset 0 1px 0 var(--line-2); }
.pf-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--blue-ic); color: #fff; display: flex; align-items: center; justify-content: center; }
.pf-ic .ic { width: 22px; height: 22px; }
.pf-list a > .ic:last-child, .pf-list button > .ic:last-child { width: 18px; height: 18px; color: #A3AEBD; }
.pf-out { margin: 0; }
.pf-out button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border: 0; border-radius: 18px; background: #fff; color: var(--err); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }

/* Other cabinet pages on the phone keep their panels, with app spacing */
@media (max-width: 860px) { .cab-main > .panel, .cab-main section.panel { margin-bottom: 14px; } }


@media (prefers-reduced-motion: reduce) { .sheet-card, .sheet-bg, .toast { animation: none; } .ap-ring .ap-ring-v { transition: none; } }

/* ---------- Services (the eGov "Госуслуги" screen) ---------- */
.appsvc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 4px; padding-bottom: 8px; }
.appsvc > * { min-width: 0; }
.sv-search { position: relative; margin: 0; }
.sv-search .ic { position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; color: #8492A6; pointer-events: none; }
.sv-search input { width: 100%; height: 48px; border: 0; border-radius: 15px; background: #fff; padding: 0 14px 0 46px; font: inherit; font-size: 17px; box-shadow: 0 1px 2px rgba(17,34,53,.06); -webkit-appearance: none; }
.sv-search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(25,91,235,.22); }
.sv-cats { margin: 0 calc(-1 * var(--g)); padding: 14px 0 12px; border-radius: 0 0 26px 26px; background: #fff; }
.appsvc .sv-search + .sv-cats, .appsvc > .sv-cats:first-of-type { margin-top: -4px; }
.sv-cats .hs { margin: 0; padding: 0 var(--g); scroll-padding: 0 var(--g); }
.hs-pages { grid-auto-columns: 100%; gap: 24px; }
.sv-page { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 74px; gap: 10px; align-content: start; }
.sv-cat { display: grid; grid-template-columns: 40px minmax(0, 1fr) 12px; gap: 9px; align-items: center; padding: 0 8px 0 10px; border-radius: 18px; background: #F6F7F9; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.2; }
.sv-cat .prow-ic { width: 40px; height: 40px; }
.sv-cat .prow-ic .ic { width: 21px; height: 21px; }
.sv-cat > span:nth-child(2) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; hyphens: auto; }
.sv-cat > .ic:last-child { width: 12px; height: 12px; color: #9AA6B5; }
.sv-cat:active { background: #ECEFF4; }
.sv-cats .rail-dots { margin-top: 12px; }
.bn-teal { background: linear-gradient(135deg, #14A3A8, #0B6E7A); }
.sv-lists { display: grid; gap: 12px; }
.chips.sv-chips { display: flex; flex-wrap: nowrap; gap: 8px; margin: 0 calc(-1 * var(--g)); padding: 0 var(--g); overflow-x: auto; scrollbar-width: none; }
.sv-chips::-webkit-scrollbar { display: none; }
.sv-chips button { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: #E9ECF1; color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.sv-chips button .ic { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.sv-chips button[aria-selected="true"] { background: #E3ECFD; color: var(--lapis); }
.sv-found { margin: 14px 4px 10px; }
.sv-lead { margin: 4px 4px 14px; color: #3D4A5C; font-size: 15px; }
.ma-indigo { --t: #E6E8FB; --c: #3A3FB3; } .ma-violet { --t: #EFE5F7; --c: #6D3A9C; } .ma-olive { --t: #ECF0DC; --c: #56651B; }
.arow-err .arow-ic { background: #FDE6E3; color: #B3322B; }
.ma-slate { --t: #E7ECF1; --c: #3D5166; }
.arow-info .arow-ic { background: #E4ECFD; color: #1B4FD1; }

@media (max-width: 860px) {
  /* Page actions: a row of pills under the app bar instead of a lone button floating to the right */
  .cab-head { justify-content: flex-start; margin-bottom: 12px; }
  .cab-acts { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--g)); padding: 2px var(--g) 4px; width: calc(100% + 2 * var(--g)); }
  .cab-acts::-webkit-scrollbar { display: none; }
  .cab-acts > * { flex: none; }
  .cab-acts .btn { height: 40px; padding: 0 16px 0 12px; border-radius: 999px; font-size: 14.5px; font-weight: 700; }
  .cab-acts .btn .ic { width: 18px; height: 18px; }
  .cab-acts .btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
  .cab-acts .btn:has(svg[data-i="back"]) { display: none; }
  .cab-acts.only-back, .cab-head:has(.cab-acts.only-back) { display: none; }
  /* the empty state below already offers the same action */
  .cab-main:has(.panel.calm .btn) .cab-head { display: none; }
  .panel.calm { padding: 32px 20px 24px; }
  .panel.calm .btn-row { width: 100%; flex-direction: column; gap: 8px; }
  .panel.calm .btn-row .btn, .panel.calm > .btn { width: 100%; justify-content: center; }
  .app-head .ah-top { margin-bottom: 0; }
  .app-two { gap: 12px; }
  .drow { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 8px 12px 8px 8px; }
  .drow-th { width: 48px; height: 62px; }
  .drow.is-card .drow-th { height: 31px; }
}
@media (max-width: 860px) {
  body.signed .pagehead { padding-bottom: 4px; }
  body.signed .pagehead + .wrap.sec, body.signed .pagehead + .sec { padding-top: 16px; }
}

/* Promo banners with soft 3D art */
.bn-img { background: #E3EBFE; color: var(--ink); }
.bn-img:hover { color: var(--ink); }
.bn-img::after { display: none; }
.bn-img .bn-tx { max-width: 52%; align-content: center; }
.bn-img .bn-tx b { font-size: 20px; }
.bn-art { position: absolute; right: 0; top: 0; bottom: 0; width: 60%; }
.bn-art img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%); mask-image: linear-gradient(90deg, transparent 0, #000 30%); display: block; }
.sitc-ic { overflow: hidden; }
.sitc-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
