:root {
  --navy: #0b1f3a;
  --navy-2: #12305a;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --grad: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --bg: #eef3fa;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --text: #0f1b2d;
  --muted: #6b7a90;
  --border: #e3e9f2;
  --ok: #16a34a;
  --warn: #f59e0b;
  --err: #e11d48;
  --info: #2563eb;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 35, 70, .08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 10% -10%, #dbe8ff 0%, transparent 60%),
              radial-gradient(900px 600px at 110% 110%, #d6f5fb 0%, transparent 60%),
              var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.bg-blob { position: fixed; border-radius: 50%; filter: blur(80px); opacity: .35; z-index: 0; pointer-events: none; }
.b1 { width: 420px; height: 420px; background: #93c5fd; top: -120px; right: 20%; }
.b2 { width: 380px; height: 380px; background: #67e8f9; bottom: -140px; left: 10%; }


/* ---------- КНОПКИ ---------- */
.btn { border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 600; background: var(--grad); color: #fff; transition: transform .1s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: #fff; color: var(--blue); border: 1px solid var(--border); margin-bottom: 10px; }
.btn.danger { background: #fff; color: var(--err); border: 1px solid #fecdd3; }
.btn.secondary { background: var(--surface-2); color: var(--navy); }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- ТЕЛЕФОН ---------- */
.phone {
  position: relative; width: 390px; height: 820px; border-radius: 54px;
  background: var(--surface); overflow: hidden;
  box-shadow: 0 0 0 11px #0b1220, 0 0 0 13px #2a3546, 0 40px 80px rgba(11, 31, 58, .35);
  display: flex; flex-direction: column;
}
@media (max-height: 880px) { .phone { height: calc(100vh - 48px); min-height: 640px; } }
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 120px; height: 34px; background: #0b1220; border-radius: 20px; z-index: 30; }
.statusbar { height: 50px; padding: 16px 30px 0; display: flex; justify-content: space-between; font-weight: 600; font-size: 15px; color: #fff; background: var(--navy); }
.sb-icons { display: flex; gap: 6px; align-items: center; }

.app-header { display: flex; align-items: center; gap: 12px; padding: 10px 16px 16px; background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; }
.avatar { width: 40px; height: 40px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(6, 182, 212, .35); }
.app-header-text { flex: 1; min-width: 0; }
.app-title { font-weight: 600; font-size: 16px; }
.app-sub { font-size: 12px; opacity: .75; display: flex; align-items: center; gap: 6px; }
.dot-online { width: 7px; height: 7px; border-radius: 50%; background: #34d399; display: inline-block; }
.icon-btn { width: 36px; height: 36px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, .2); }

.screens { flex: 1; position: relative; overflow: hidden; background: var(--surface-2); }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.active { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- ЧАТ ---------- */
.messages { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.messages::-webkit-scrollbar, .list::-webkit-scrollbar, .sheet-body::-webkit-scrollbar { width: 0; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; word-wrap: break-word; animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 6px 14px rgba(37, 99, 235, .22); }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: 12.5px; padding: 4px 10px; text-align: center; }
.msg.system.ok { color: var(--ok); font-weight: 500; }
.msg.error { align-self: center; background: #fff1f2; color: var(--err); font-size: 13px; border: 1px solid #fecdd3; }
.msg ul { margin: 4px 0; padding-left: 18px; }

.typing { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 18px; border-bottom-left-radius: 6px; padding: 12px 14px; display: flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.welcome { text-align: center; padding: 24px 18px 6px; color: var(--muted); font-size: 14px; }
.welcome .w-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 22px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 12px 26px rgba(37, 99, 235, .3); }
.welcome h3 { margin: 0 0 6px; color: var(--navy); font-size: 18px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 8px; }
.chips::-webkit-scrollbar { height: 0; }
.chip { white-space: nowrap; border: 1px solid #c7d7f5; background: #fff; color: var(--blue); padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; transition: .15s; }
.chip:hover { background: #eef4ff; }

.composer { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--surface); border-top: 1px solid var(--border); }
.composer input { flex: 1; border: 1px solid var(--border); background: var(--surface-2); border-radius: 22px; padding: 11px 16px; outline: none; font-size: 14.5px; }
.composer input:focus { border-color: var(--blue); background: #fff; }
.send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(37, 99, 235, .3); transition: transform .1s; }
.send:active { transform: scale(.92); }
.send:disabled { opacity: .5; }

/* карточка документа в чате */
.doc-card { align-self: flex-start; width: 86%; background: #fff; border: 1px solid #c7d7f5; border-radius: 18px; padding: 14px; box-shadow: 0 10px 24px rgba(37, 99, 235, .12); animation: pop .25s ease; }
.doc-card-top { display: flex; gap: 12px; align-items: center; }
.doc-ic { width: 42px; height: 42px; border-radius: 12px; background: #eef4ff; color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.doc-card-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.doc-card-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.doc-card .btn { width: 100%; margin-top: 12px; }

/* ---------- СПИСКИ ---------- */
.list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.item { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 13px 14px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.item:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.item-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.item-num { font-size: 12px; color: var(--muted); font-weight: 600; }
.item-title { font-weight: 600; font-size: 14px; }
.item-meta { font-size: 12.5px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 48px 20px; }
.empty .e-ic { font-size: 34px; margin-bottom: 8px; }

.pill { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.pill.pending_signature { background: #fff7e6; color: #b45309; }
.pill.on_approval { background: #eaf1ff; color: var(--blue); }
.pill.approved { background: #e8f8ee; color: var(--ok); }
.pill.rejected { background: #ffe9ee; color: var(--err); }
.pill.cancelled { background: #eef1f5; color: var(--muted); }

/* ---------- ТАББАР ---------- */
.tabbar { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-top: 1px solid var(--border); padding: 8px 8px 22px; }
.tab { position: relative; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; color: #94a3b8; font-weight: 500; padding: 4px; transition: color .2s; }
.tab.active { color: var(--blue); }
.badge { position: absolute; top: 0; right: calc(50% - 22px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 0 2px #fff; }

/* ---------- ШТОРКИ ---------- */
.sheet-backdrop { position: absolute; inset: 0; background: rgba(11, 31, 58, .45); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 40; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; background: #fff; border-radius: 28px 28px 0 0; transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); z-index: 41; display: flex; flex-direction: column; box-shadow: 0 -10px 40px rgba(11, 31, 58, .2); }
.sheet.open { transform: translateY(0); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: #d6dde8; margin: 10px auto 4px; flex-shrink: 0; }
.sheet-body { overflow-y: auto; padding: 8px 18px 26px; }

.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.doc-title { font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.doc-sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.kv div { background: var(--surface-2); border-radius: 12px; padding: 9px 11px; }
.kv small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.kv b { font-size: 13.5px; }

.lang-tabs { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; margin-bottom: 8px; }
.lang-tabs button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lang-tabs button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.doc-text { white-space: pre-wrap; font: 12.5px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; background: #fbfcfe; border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin: 0 0 16px; color: #1e293b; }

.section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 10px; }
.timeline { position: relative; margin: 0 0 16px; padding-left: 4px; }
.step { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.step.signed:not(:last-child)::before { background: #bbf7d0; }
.step-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 2px solid var(--border); }
.step.signed .step-ic { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.pending .step-ic { background: #fff; border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.step.rejected .step-ic { background: var(--err); border-color: var(--err); color: #fff; }
.step-body { font-size: 13px; }
.step-role { font-weight: 600; }
.step-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.step-comment { margin-top: 4px; background: var(--surface-2); padding: 6px 9px; border-radius: 8px; font-size: 12.5px; }

.actions { display: grid; gap: 8px; }
.actions .btn { width: 100%; padding: 13px; font-size: 15px; }
.reject-box { display: none; gap: 8px; flex-direction: column; }
.reject-box.open { display: flex; }
.reject-box textarea { border: 1px solid var(--border); border-radius: 12px; padding: 10px; font: inherit; font-size: 14px; resize: none; outline: none; }

/* PIN */
.pin-sheet { padding-bottom: 18px; }
.pin-head { text-align: center; padding: 6px 20px 0; }
.pin-icon { width: 54px; height: 54px; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; margin: 4px auto 10px; box-shadow: 0 10px 22px rgba(37, 99, 235, .3); }
.pin-title { font-weight: 700; font-size: 17px; color: var(--navy); }
.pin-sub { font-size: 13px; color: var(--muted); margin-top: 4px; padding: 0 10px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0 6px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #cbd5e1; transition: .15s; }
.pin-dots i.filled { background: var(--blue); border-color: var(--blue); transform: scale(1.1); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-error { text-align: center; color: var(--err); font-size: 13px; min-height: 18px; }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px 26px; justify-content: center; margin-top: 6px; }
.key { width: 72px; height: 58px; border-radius: 18px; border: 0; background: var(--surface-2); font-size: 22px; font-weight: 600; color: var(--navy); transition: background .1s, transform .08s; }
.key:active { background: #dfe7f3; transform: scale(.95); }
.key.ghost { background: transparent; font-size: 15px; color: var(--muted); }
.pin-note { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 14px; }
.pin-success { position: absolute; inset: 0; background: #fff; border-radius: 28px 28px 0 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-weight: 600; color: var(--navy); font-size: 17px; }
.pin-success.show { display: flex; }
.pin-success svg { width: 86px; height: 86px; }
.pin-success circle { fill: none; stroke: var(--ok); stroke-width: 3; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .6s ease forwards; }
.pin-success path { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s .45s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* TOAST */
.toast { position: absolute; left: 50%; bottom: 96px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 86%; text-align: center; box-shadow: 0 10px 24px rgba(11, 31, 58, .3); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--err); }

/* ЭЦП поверх карточки документа */
#pinBackdrop { z-index: 50; }
.pin-sheet { z-index: 51; }

/* ГОЛОС */
.composer { position: relative; }
.mic { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--blue); display: grid; place-items: center; flex-shrink: 0; transition: .15s; }
.mic:hover { background: #eef4ff; }
.mic .ic-stop { display: none; }
.mic.recording { background: var(--err); border-color: var(--err); color: #fff; animation: pulse 1.4s infinite; }
.mic.recording .ic-mic { display: none; }
.mic.recording .ic-stop { display: block; }
.mic:disabled { opacity: .5; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .45); } 70% { box-shadow: 0 0 0 12px rgba(225, 29, 72, 0); } 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); } }
.rec-bar { position: absolute; left: 12px; right: 116px; top: 10px; bottom: 12px; background: #fff1f2; border: 1px solid #fecdd3; border-radius: 22px; display: none; align-items: center; gap: 8px; padding: 0 12px; font-size: 13.5px; color: var(--err); z-index: 2; }
.rec-bar.show { display: flex; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--err); animation: blink 1s infinite; flex-shrink: 0; }
.rec-hint { color: #9f1239; opacity: .75; font-size: 12px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-cancel { border: 0; background: transparent; color: var(--err); font-weight: 600; font-size: 12.5px; }
.msg.user .voice-tag { display: block; font-size: 11px; opacity: .8; margin-bottom: 2px; }

/* «ЧТО УМЕЕТ» */
.help-btn { font-weight: 700; font-size: 17px; margin-right: 6px; }
#helpBackdrop { z-index: 44; }
.help-sheet { z-index: 45; padding: 0 22px 18px; min-height: 62%; }
.help-progress { display: flex; gap: 6px; justify-content: center; margin: 6px 0 10px; }
.help-progress i { height: 5px; width: 18px; border-radius: 3px; background: #dde5f0; transition: .3s; cursor: pointer; }
.help-progress i.on { width: 30px; background: var(--grad); }
.help-progress i.done { background: #a5c3f7; }
.help-slide { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 4px 4px; animation: slideIn .35s ease; overflow-y: auto; }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.help-slide.back { animation-name: slideBack; }
@keyframes slideBack { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.help-emoji { width: 96px; height: 96px; border-radius: 32px; background: var(--grad); display: grid; place-items: center; font-size: 46px; margin: 10px 0 18px; box-shadow: 0 16px 34px rgba(37, 99, 235, .3); }
.help-step { font-size: 12px; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.help-title { font-size: 21px; font-weight: 700; color: var(--navy); line-height: 1.25; margin-bottom: 10px; }
.help-text { font-size: 14.5px; color: #475569; line-height: 1.55; max-width: 310px; }
.help-try { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 18px; }
.help-try button { border: 1px dashed #9db8ef; background: #f5f8ff; color: var(--blue); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; font-weight: 500; text-align: left; transition: .15s; }
.help-try button:hover { background: #eaf1ff; border-style: solid; }
.help-try button b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.help-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.help-nav .btn { padding: 12px; }
.help-skip { border: 0; background: transparent; color: var(--muted); font-size: 13px; margin-top: 8px; }


/* ================= PWA ================= */
[hidden] { display: none !important; }
body { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px 0; }
.phone { z-index: 1; }
.view { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.screen { display: none; }
.btn.big { width: 100%; padding: 14px; font-size: 16px; border-radius: 14px; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }

/* Телефон на весь экран: смартфон или установленное приложение */
@media (max-width: 520px), (display-mode: standalone) {
  body { display: block; padding: 0; background: var(--navy); }
  .bg-blob, .island, .statusbar { display: none; }
  .phone { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; min-height: 0; }
  .app-header { padding-top: calc(env(safe-area-inset-top) + 10px); }
  .login-top { padding-top: calc(env(safe-area-inset-top) + 44px); }
  .tabbar { padding-bottom: calc(env(safe-area-inset-bottom) + 8px); }
  .tabbar.single { display: none; }
  .composer { padding-bottom: calc(env(safe-area-inset-bottom) + 12px); }
  .sheet-body, .help-sheet, .pin-sheet { padding-bottom: calc(env(safe-area-inset-bottom) + 18px); }
}

/* ---------- ВХОД ---------- */
.login { background: radial-gradient(500px 300px at 80% 0%, rgba(6, 182, 212, .35), transparent 70%), linear-gradient(180deg, var(--navy) 0%, #0e2a50 55%, var(--surface-2) 55%); overflow-y: auto; }
.login-top { text-align: center; color: #fff; padding: 36px 24px 26px; }
.login-logo { width: 78px; height: 78px; margin: 0 auto 14px; border-radius: 24px; overflow: hidden; box-shadow: 0 14px 30px rgba(6, 182, 212, .35); }
.login-logo img { width: 100%; height: 100%; display: block; }
.login-brand { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.login-brand span { background: linear-gradient(135deg, #60a5fa, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-role { font-size: 14px; opacity: .75; margin-top: 4px; }
.login-card { background: #fff; margin: 0 18px; border-radius: 24px; padding: 22px 20px; box-shadow: 0 20px 40px rgba(11, 31, 58, .18); animation: pop .3s ease; }
.login-card h2 { margin: 0 0 6px; font-size: 20px; color: var(--navy); }
.login-card p { margin: 0 0 18px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.login-field span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.login-field input { border: 1.5px solid var(--border); border-radius: 14px; padding: 14px 16px; font-size: 20px; letter-spacing: .08em; font-weight: 600; outline: none; transition: .15s; color: var(--navy); }
.login-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.login-error { min-height: 20px; color: var(--err); font-size: 13px; margin: 2px 0 10px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 8px; }
.otp input { width: 100%; height: 56px; text-align: center; font-size: 24px; font-weight: 700; border: 1.5px solid var(--border); border-radius: 14px; outline: none; color: var(--navy); transition: .15s; }
.otp input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.otp.shake { animation: shake .4s; }
.dev-code { font-size: 12.5px; background: #fff7e6; color: #92400e; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.login-links { display: flex; justify-content: space-between; margin-top: 14px; }
.link { border: 0; background: transparent; color: var(--blue); font-size: 13.5px; font-weight: 500; padding: 4px 0; }
.link:disabled { color: var(--muted); }
.login-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 28px 28px; line-height: 1.5; }

/* ---------- ШАПКА / ПРОФИЛЬ ---------- */
.avatar { border: 0; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.install-banner { display: flex; align-items: center; gap: 10px; background: #fff; border-bottom: 1px solid var(--border); padding: 10px 12px; animation: fade .3s; }
.install-banner img { width: 38px; height: 38px; border-radius: 10px; }
.install-banner div { flex: 1; display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.install-banner b { color: var(--navy); font-size: 13.5px; }
.install-banner .x { border: 0; background: transparent; font-size: 22px; color: var(--muted); padding: 0 4px; }
.profile-head { display: flex; gap: 14px; align-items: center; margin: 6px 0 18px; }
.profile-av { width: 56px; height: 56px; border-radius: 18px; background: var(--grad); color: #fff; font-weight: 700; font-size: 20px; display: grid; place-items: center; flex-shrink: 0; }
.profile-name { font-weight: 700; font-size: 17px; color: var(--navy); }
.profile-pos { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.profile-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 2px; border-top: 1px solid var(--border); font-size: 14.5px; }
.profile-row .lang-tabs { margin: 0; }
.profile-actions { display: grid; gap: 8px; margin-top: 16px; }
.ios-hint { font-size: 13px; color: #334155; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; line-height: 1.5; }

/* таббар на 2 вкладки */
.tabbar.two { grid-template-columns: repeat(2, 1fr); }

/* шторки не должны «вылезать» при программной прокрутке */
.phone { overflow: clip; }
