:root {
  --brand-50: #f2f8fc;
  --brand-600: #1971be;
  --brand-700: #145d9c;
  --title: #1971be;
  --paragraph: #454545;
  --neutral-800: #3d3d3d;
  --neutral-50: #f6f6f6;
  --border: #e7e7e7;
  --placeholder: #888;
  --white: #fff;
  --shadow-chip: 2px 2px 6px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', system-ui, sans-serif;
  color: var(--paragraph);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  padding: 12px 24px; border-radius: 16px; border: 0;
  font: 700 16px/1.36 'Open Sans', sans-serif; white-space: nowrap;
  cursor: pointer; transition: background .2s, transform .2s;
}
.btn-primary { background: var(--brand-600); color: var(--white); }
.btn-primary:hover { background: var(--brand-700); }
.btn-primary:active { transform: scale(.98); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  min-height: 800px;
  padding: 16px 120px 0;
  display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 72%, #fff 100%),
    radial-gradient(ellipse 430px 350px at 76% 55%, rgba(255,255,255,.9), rgba(255,255,255,0)),
    #e3eefb;
}

.header {
  position: sticky; top: 16px; z-index: 20;
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-radius: 500px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(7.25px); -webkit-backdrop-filter: blur(7.25px);
}
.header-left { display: flex; align-items: center; gap: 24px; }
.logo img { width: 50px; height: 40px; }
.menu { display: flex; gap: 24px; align-items: center; }
.menu a { font-weight: 700; font-size: 14px; color: var(--paragraph); transition: color .2s; }
.menu a:hover { color: var(--title); }
.menu a.active { color: var(--title); text-decoration: underline; text-underline-position: from-font; }

.header-right { display: flex; align-items: center; gap: 16px; }
.login { display: flex; align-items: center; gap: 16px; font-weight: 700; font-size: 16px; color: var(--title); }
.login img { width: 32px; height: 32px; }

.lang {
  display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden;
}
.lang button {
  border: 0; background: transparent; padding: 6px 10px; cursor: pointer;
  font: 700 12px 'Open Sans', sans-serif; color: var(--paragraph);
}
.lang button.on { background: var(--brand-600); color: #fff; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 4px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--brand-600); margin: 5px 0; border-radius: 2px; }

.mobile-menu { display: none; }

.hero-body {
  flex: 1; width: 100%; max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding: 40px 0;
}
.hero-text { width: 632px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.eyebrow { font-weight: 800; font-size: 28px; color: var(--paragraph); }
.hero h1 { font-weight: 700; font-size: 48px; line-height: 1.36; color: var(--title); }
.hero-text .lead { font-size: 16px; line-height: 1.36; margin-top: 8px; }
.hero-heading { display: flex; flex-direction: column; gap: 8px; }
.hero-phones { position: relative; width: 438px; aspect-ratio: 438 / 574; flex-shrink: 0; }
.hero-phones img { position: absolute; width: 60.4%; }
.hero-phones .p1 { left: 2.2%; top: 0; }
.hero-phones .p2 { left: 39.5%; top: 12.27%; }
.hero-phones .shadow {
  position: absolute; width: 59.1%; height: 4.56%; border-radius: 50%;
  background: rgba(0, 0, 0, .28); filter: blur(10px);
}
.hero-phones .s1 { left: 0; top: 82.9%; }
.hero-phones .s2 { left: 41%; top: 95.4%; }

/* ---------- Features ---------- */
.section { padding: 40px 120px; display: flex; flex-direction: column; align-items: center; gap: 40px; }
.section-head { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.section-head h2 { font-weight: 700; font-size: 32px; color: var(--title); }
.section-head p { font-size: 16px; }

.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  width: 100%; max-width: 1200px;
}
.card {
  background: var(--brand-50); border-radius: 16px; padding: 40px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center; color: var(--neutral-800);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(25,113,190,.12); }
.card .emoji { font-size: 50px; line-height: 1; }
.card h3 { font-weight: 700; font-size: 20px; }
.card p { font-size: 14px; line-height: 1.36; }

/* ---------- App block ---------- */
.app-wrap { padding: 40px 120px; }
.app {
  max-width: 1200px; margin: 0 auto;
  background: var(--brand-50); border-radius: 40px; padding: 40px;
  display: flex; gap: 40px; overflow: hidden;
}
.app-text { flex: 1; display: flex; flex-direction: column; gap: 40px; }
.app-text h2 { font-weight: 700; font-size: 40px; line-height: 1.36; color: var(--title); }
.app-text .lead { font-size: 16px; margin-top: 8px; }
.app-download { display: flex; flex-direction: column; gap: 24px; }
.qr-row { display: flex; align-items: center; gap: 24px; }
.qr { width: 148px; height: 148px; border-radius: 16px; }
.qr-note { position: relative; width: 217px; height: 94px; }
.qr-note p {
  font-family: 'Shadows Into Light', cursive; font-size: 22px; line-height: 1.1;
  text-align: center; transform: rotate(1.8deg); color: var(--paragraph);
}
.qr-note img { position: absolute; left: 10px; top: 40px; width: 41px; height: 48px; transform: rotate(-143.44deg); }
.stores p { font-size: 14px; line-height: 20px; margin-bottom: 8px; }
.badges { display: flex; gap: 8px; }
.badge {
  height: 40px; display: inline-flex; align-items: center; gap: 6px;
  background: #000; color: #fff; border-radius: 7px; padding: 0 10px 0 8px;
  border: 1px solid #a6a6a6;
}
.badge svg { flex-shrink: 0; }
.badge small { display: block; font-size: 8px; line-height: 1; letter-spacing: .2px; }
.badge strong { display: block; font-size: 15px; line-height: 1.1; font-weight: 600; }

.app-visual { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 458px; }
.stage { position: relative; width: 540px; height: 458px; flex-shrink: 0; }
.glow {
  position: absolute; left: 50%; top: 50%; width: 333px; height: 333px; transform: translate(-50%,-50%);
  border-radius: 50%; background: #4da2e2; filter: blur(150px); opacity: .55;
}
.stage .phone { position: absolute; left: 145px; top: 0; width: 249px; height: 458px; }
.chip {
  position: absolute; background: #fff; box-shadow: var(--shadow-chip);
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 1000px;
  animation: float 4s ease-in-out infinite;
}
.chip.blue { background: var(--brand-600); }
.chip img { width: 24px; height: 24px; }
.chip.logo-chip img { width: 30px; height: 24px; }
.chip-user { left: 137px; top: 63px; }
.chip-apt { left: 83px; top: 242px; animation-delay: -1s; }
.chip-box { left: 363px; top: 320px; animation-delay: -2s; }
.chip-logo { left: 416px; top: 161px; animation-delay: -3s; }
.notif {
  position: absolute; left: -26px; top: 385px; background: #fff; border-radius: 8px;
  box-shadow: var(--shadow-chip); padding: 8px; display: flex; gap: 10px; align-items: center;
  animation: float 4s ease-in-out infinite; animation-delay: -1.5s; white-space: nowrap;
}
.notif .wa { width: 32px; height: 32px; border-radius: 50%; background: #42aa79; display: flex; align-items: center; justify-content: center; }
.notif .wa img { width: 18.7px; height: 18.7px; }
.notif strong { display: block; font-size: 12px; }
.notif span { font-size: 10px; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- Contact ---------- */
.contact { display: flex; gap: 120px; justify-content: center; align-items: flex-start; width: 100%; }
.contact-col { display: flex; flex-direction: column; gap: 24px; }
.contact-col h3 { font-weight: 700; font-size: 20px; }
.contact-items { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.contact-item {
  background: var(--neutral-50); border-radius: 16px; padding: 16px 24px;
  display: flex; gap: 16px; align-items: center; font-size: 16px; color: #000;
  transition: background .2s;
}
.contact-item:hover { background: #ececec; }
.contact-item img { width: 24px; height: 24px; }
.hours { display: flex; flex-direction: column; gap: 16px; font-size: 16px; }
.hours strong { font-weight: 700; }
.vline { align-self: stretch; width: 1px; background: var(--border); }
.form { display: flex; flex-direction: column; gap: 16px; width: 320px; }
.form h3 { font-weight: 700; font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; line-height: 22px; letter-spacing: -.43px; color: #0d0d0d; }
.field input {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px;
  font: 14px 'Open Sans', sans-serif; letter-spacing: -.43px; color: #0d0d0d; outline: none;
  transition: border-color .2s;
}
.field input::placeholder { color: var(--placeholder); }
.field input:focus { border-color: var(--brand-600); }

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: var(--neutral-800); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: .3s; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer ---------- */
.footer {
  background: var(--brand-600); color: #fff; text-align: center;
  padding: 16px 120px; display: flex; flex-direction: column; gap: 8px; font-size: 16px;
}
.footer .links { font-weight: 700; }
.footer .links a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .hero, .section, .app-wrap, .footer { padding-left: 40px; padding-right: 40px; }
  .hero-text { width: auto; flex: 1; }
  .hero-phones { width: 380px; }
  .contact { gap: 60px; }
}

@media (max-width: 1024px) {
  .menu, .login span { display: none; }
  .burger { display: block; }
  .mobile-menu.open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border-radius: 24px; padding: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.12);
  }
  .mobile-menu a { padding: 12px 16px; border-radius: 12px; font-weight: 700; font-size: 16px; }
  .mobile-menu a:hover { background: var(--brand-50); color: var(--title); }
  .app { flex-direction: column; }
  .app-visual { overflow: visible; }
}

@media (max-width: 860px) {
  .hero { min-height: 0; padding: 12px 16px 0; }
  .header { padding: 12px 16px; top: 12px; }
  .header-right .btn { display: none; }
  .hero-body { flex-direction: column; text-align: left; padding: 40px 0 24px; }
  .eyebrow { font-size: 20px; }
  .hero h1 { font-size: 32px; }
  .hero-phones { width: 100%; max-width: 340px; }
  .section, .app-wrap { padding: 32px 16px; }
  .section-head h2 { font-size: 24px; }
  .features { grid-template-columns: 1fr; }
  .app { padding: 24px; border-radius: 24px; }
  .app-text h2 { font-size: 28px; }
  .qr-row { flex-wrap: wrap; }
  .app-visual { min-height: 0; overflow: visible; }
  .stage { transform: scale(.56); transform-origin: center; margin: -101px 0; }
  .contact { flex-direction: column; gap: 32px; }
  .vline { display: none; }
  .form, .contact-col { width: 100%; }
  .footer { padding: 16px; font-size: 14px; }
}

@media (min-width: 861px) and (max-width: 1024px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Shared components for inner pages
   ===================================================================== */
[hidden] { display: none !important; }
.ic { display: block; flex-shrink: 0; }

.btn-outline { background: #fff; color: var(--brand-600); box-shadow: inset 0 0 0 1.5px var(--brand-600); }
.btn-outline:hover { background: var(--brand-50); }
.btn:disabled, .btn[aria-disabled="true"] { background: #b3b3b3; color: #fff; cursor: not-allowed; box-shadow: none; }
.btn-link {
  background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font: 700 14px 'Open Sans', sans-serif; color: var(--brand-600);
}
.btn-link:hover { text-decoration: underline; }

.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #0e2a47; color: #fff; font-weight: 600; font-size: 15px; letter-spacing: 1px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #4da2e2;
}
.avatar.sm { width: 32px; height: 32px; font-size: 11px; box-shadow: 0 0 0 2px #4da2e2; }
.avatar.lg { width: 56px; height: 56px; font-size: 17px; }

.success-card {
  width: 320px; background: var(--neutral-50); border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  animation: pop .3s ease;
}
.success-card h3 { font-size: 18px; font-weight: 700; color: var(--neutral-800); }
.success-card p { font-size: 13px; line-height: 1.45; margin-bottom: 8px; }
.success-icon { color: var(--brand-600); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* Inner page frame */
.page { min-height: 100vh; display: flex; flex-direction: column; background: var(--neutral-50); }
.page-top { padding: 16px 120px 0; }
.page-main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 48px 0; display: flex; align-items: center; }
.page-main.center { justify-content: center; }

/* Fields (shared) */
.field .label-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.field .label-row a { font-weight: 700; font-size: 13px; color: var(--brand-600); text-decoration: underline; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; padding-right: 48px; }
.input-wrap .eye, .input-wrap .info {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #555; cursor: pointer; padding: 2px; display: flex;
}
.input-wrap .eye.on { color: var(--brand-600); }
.input-wrap .info { cursor: help; }
.field input:disabled { background: var(--neutral-50); color: var(--placeholder); }
.field input.invalid { border-color: #d64545; }
.field-error { font-size: 12px; color: #c03434; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--brand-600); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand-600); }

.alert {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  font-size: 13px; border: 1px solid; animation: pop .25s ease;
}
.alert.error { background: #fdecec; border-color: #f2b8b8; color: #8a2a2a; }
.alert.error .ic { color: #d64545; }
.alert .alert-x { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; display: flex; }

/* Auth card */
.auth-card {
  width: 100%; max-width: 440px; background: #fff; border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.auth-card .head { text-align: center; display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.auth-card h1 { font-size: 26px; font-weight: 700; color: var(--title); }
.auth-card .head p { font-size: 14px; }
.auth-card .actions { display: flex; flex-direction: column; gap: 10px; }
.demo-hint { font-size: 12px; color: var(--placeholder); text-align: center; }
.result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0; }
.result .big-icon { color: var(--brand-600); }
.result h1 { font-size: 24px; }
.rules { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rules li { display: flex; align-items: center; gap: 8px; color: var(--placeholder); transition: color .2s; }
.rules li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #ccc; transition: background .2s; }
.rules li.ok { color: #2f8a5a; }
.rules li.ok::before { background: #42aa79; }

/* ---------- QR flow ---------- */
.qr-flow { display: flex; align-items: center; justify-content: space-between; gap: 40px; width: 100%; }
.qr-left { max-width: 520px; display: flex; flex-direction: column; gap: 32px; }
.qr-left h1 { font-size: 32px; line-height: 1.36; font-weight: 700; color: var(--neutral-800); }
.qr-left h1.success { color: #2f9d5d; }
.qr-left .lead { font-size: 18px; margin-top: 6px; }
.code-inputs { display: flex; gap: 10px; }
.code-inputs input {
  width: 52px; height: 56px; border-radius: 10px; border: 1px solid #fff; background: #fff;
  text-align: center; font: 700 22px 'Open Sans', sans-serif; color: var(--brand-600); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.code-inputs input:focus { border-color: #9cc6ec; box-shadow: 0 0 0 3px rgba(25,113,190,.12); }
.code-inputs input.filled { border-color: #c9def3; }
.qr-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.loading { display: flex; flex-direction: column; gap: 10px; font-weight: 700; font-size: 14px; color: var(--brand-600); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #cfe2f5; border-top-color: var(--brand-600); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.qr-box { width: 240px; padding: 20px; background: #fff; border-radius: 16px; animation: pop .35s ease; }
.fake-qr { display: block; width: 100%; height: auto; }

.qr-right { position: relative; display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.hand-note { position: relative; width: 180px; height: 170px; margin-right: 8px; }
.hand-note p {
  position: absolute; left: 0; width: 180px; font-family: 'Shadows Into Light', cursive;
  font-size: 22px; line-height: 1.05; text-align: center; color: var(--paragraph); transform: rotate(-8deg);
}
.hand-note svg { position: absolute; }
.hand-note.top p { top: 92px; }
.hand-note.top svg { left: 60px; top: 10px; }
.hand-note.bottom p { top: 0; }
.hand-note.bottom svg { left: 70px; top: 82px; }

/* HTML phone mockup */
.mock-phone {
  width: 232px; height: 442px; border-radius: 34px; background: #2a87d8; padding: 10px;
  box-shadow: 0 20px 40px rgba(25,113,190,.18); position: relative;
}
.mock-phone::before {
  content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 14px; background: #2a87d8; border-radius: 0 0 12px 12px; z-index: 2;
}
.mock-screen {
  height: 100%; background: #fafafa; border-radius: 25px; overflow: hidden;
  display: flex; flex-direction: column; font-size: 8px; color: #3d3d3d; padding: 6px 12px 12px;
}
.mock-status { display: flex; justify-content: space-between; font-size: 7px; color: #2c2c2c; margin-bottom: 10px; }
.mock-title { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 16px; }
.mock-title .ic { width: 14px; height: 14px; }
.mock-step { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 8.5px; margin-bottom: 6px; }
.mock-step span { width: 16px; height: 16px; border-radius: 50%; background: var(--brand-600); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 8px; }
.mock-screen p { line-height: 1.35; }
.mock-code { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.mock-code b { width: 23px; height: 26px; border-radius: 4px; background: #fff; border: 1px solid #e3e3e3; display: flex; align-items: center; justify-content: center; color: var(--brand-600); font-size: 10px; }
.mock-btn { margin-top: auto; background: var(--brand-600); color: #fff; border-radius: 8px; padding: 9px; text-align: center; font-weight: 700; font-size: 8px; transition: transform .3s; }
.mock-btn.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(25,113,190,.5); } 50% { box-shadow: 0 0 0 6px rgba(25,113,190,0); } }
.mock-bar { width: 60px; height: 3px; border-radius: 2px; background: #222; margin: 8px auto 0; }

/* ---------- App shell (logged in) ---------- */
.app-shell { flex: 1; width: 100%; max-width: 1072px; margin: 0 auto; padding: 48px 24px; display: flex; gap: 16px; align-items: flex-start; }
.app-topbar { display: none; }
.sidebar {
  width: 236px; flex-shrink: 0; background: #fff; border-radius: 8px; padding: 12px 10px;
  display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px;
}
.profile { display: flex; align-items: center; gap: 12px; padding: 4px 2px; }
.profile strong { display: block; font-size: 15px; color: var(--neutral-800); }
.profile span:not(.avatar) { font-size: 13px; }
.side-list { display: flex; flex-direction: column; gap: 6px; }
.side-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 4px;
  background: var(--neutral-50); border: 0; width: 100%; cursor: pointer; text-align: left;
  font: 400 12.5px 'Open Sans', sans-serif; color: var(--paragraph); transition: background .2s, color .2s;
}
.side-item span { flex: 1; }
.side-item .ic:first-child { color: #555; }
.side-item:hover { background: #e9f2fb; }
.side-item.active { background: #dcebf8; color: var(--brand-600); font-weight: 700; }
.side-item.active .ic { color: var(--brand-600); }
.side-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 12px; }
.side-foot .logo img { width: 38px; height: 30px; }

.panel { flex: 1; min-width: 0; background: #fff; border-radius: 8px; padding: 16px 20px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h1 { font-size: 20px; font-weight: 600; color: var(--neutral-800); }
.panel-head p { font-size: 13px; margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.grid-2 .full { grid-column: 1 / -1; }
.photo-row { display: flex; align-items: center; gap: 14px; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 999px; }
.panel-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.panel .field input { width: 100%; }

/* Residents */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { flex: 1; min-width: 200px; position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #888; }
.search input { width: 100%; padding: 11px 14px 11px 40px; border: 1px solid var(--border); border-radius: 8px; font: 14px 'Open Sans', sans-serif; outline: none; }
.search input:focus { border-color: var(--brand-600); }
.chip-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; cursor: pointer; font: 600 13px 'Open Sans', sans-serif; color: var(--paragraph);
}
.chip-btn:hover, .chip-btn.on { border-color: var(--brand-600); color: var(--brand-600); }
.chip-btn .badge-n { background: var(--brand-600); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; }
.filter-panel { position: relative; }
.filter-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 260px; background: #fff; border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.14); padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.filter-pop select, .modal select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: 14px 'Open Sans', sans-serif; background: #fff; }
.filter-pop .row { display: flex; gap: 8px; justify-content: space-between; }
.table-wrap { overflow-x: auto; }
table.residents { width: 100%; border-collapse: collapse; font-size: 13px; }
.residents th { text-align: left; font-weight: 700; color: var(--neutral-800); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.residents td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.residents tr { animation: pop .25s ease; }
.residents tbody tr:hover { background: var(--brand-50); }
.res-name { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--neutral-800); }
.res-name .avatar { width: 30px; height: 30px; font-size: 10px; box-shadow: none; background: #dcebf8; color: var(--brand-600); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pill.wa { background: #e3f5ec; color: #2f8a5a; }
.pill.mail { background: #e6f0fb; color: var(--brand-600); }
.pill.sms { background: #fff2dc; color: #a46a00; }
.table-foot { font-size: 12px; color: var(--placeholder); margin-top: 12px; }
.empty { text-align: center; padding: 40px 0; color: var(--placeholder); font-size: 14px; }
mark { background: #fff1a8; color: inherit; border-radius: 2px; }
.dropzone {
  border: 2px dashed #bcd6ef; border-radius: 12px; padding: 28px 16px; text-align: center; color: var(--brand-600);
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; background: var(--brand-50);
}
.dropzone.drag { background: #e3eefb; border-color: var(--brand-600); }

/* Download page */
.dl-wrap { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.dl-steps { list-style: none; display: flex; flex-direction: column; gap: 12px; counter-reset: s; font-size: 14px; }
.dl-steps li { display: flex; align-items: center; gap: 12px; counter-increment: s; }
.dl-steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--brand-600); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }

/* Legal */
.legal { width: 100%; max-width: 860px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 40px; }
.legal h1 { font-size: 32px; color: var(--title); margin-bottom: 4px; }
.legal .updated { font-size: 13px; color: var(--placeholder); margin-bottom: 28px; }
.legal h2 { font-size: 18px; color: var(--neutral-800); margin: 24px 0 8px; }
.legal p, .legal li { font-size: 15px; line-height: 1.6; }
.legal ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 30, 45, .35); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .2s;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  position: relative; width: 100%; max-width: 340px; background: #fff; border-radius: 16px; padding: 28px 24px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  transform: translateY(8px) scale(.98); transition: transform .2s;
}
.modal.wide { max-width: 440px; align-items: stretch; text-align: left; }
.modal-backdrop.show .modal { transform: none; }
.modal h3 { font-size: 18px; color: var(--neutral-800); }
.modal p { font-size: 14px; line-height: 1.45; }
.modal-x { position: absolute; top: 10px; right: 10px; background: none; border: 0; cursor: pointer; color: #777; display: flex; padding: 4px; border-radius: 6px; }
.modal-x:hover { background: var(--neutral-50); }
.modal-icon { color: var(--brand-600); }
.modal-icon.warn { color: #c96a1a; }
.modal-ok h3 { color: var(--brand-600); font-size: 15px; }
.modal-actions { display: flex; gap: 10px; width: 100%; margin-top: 8px; }
.modal-actions .btn { flex: 1; }
.modal form { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.modal .field input { width: 100%; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--brand-600); display: flex; padding: 4px; }

/* ---------- Responsive (inner pages) ---------- */
@media (max-width: 1240px) {
  .page-top { padding-left: 40px; padding-right: 40px; }
  .page-main { padding-left: 40px; padding-right: 40px; }
}
@media (max-width: 960px) {
  .qr-flow { flex-direction: column; align-items: flex-start; }
  .qr-right { align-self: center; }
}
@media (max-width: 860px) {
  .page-top { padding: 12px 16px 0; }
  .page-main { padding: 32px 16px; }
  .qr-left h1 { font-size: 24px; }
  .qr-left .lead { font-size: 15px; }
  .hand-note { width: 120px; }
  .hand-note p { width: 120px; font-size: 17px; }
  .hand-note svg { transform: scale(.75); }
  .mock-phone { width: 190px; height: 362px; }
  .app-shell { flex-direction: column; padding: 0 16px 32px; gap: 12px; align-items: stretch; }
  .app-topbar {
    display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 10px 14px; margin: 12px 0 0;
  }
  .app-topbar .logo img { width: 40px; height: 32px; }
  .app-topbar .lang { margin-left: auto; }
  .sidebar { display: none; width: 100%; position: static; }
  .sidebar.open { display: flex; }
  .side-foot { display: none; }
  .panel { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .legal { padding: 24px 18px; }
  .legal h1 { font-size: 24px; }
  .success-card { width: 100%; }
}

/* QR flow inside the logged-in panel */
.qr-flow.in-app { padding: 12px 4px; gap: 24px; }
.qr-flow.in-app .qr-left h1 { font-size: 24px; }
.qr-flow.in-app .qr-left .lead { font-size: 15px; }
.qr-flow.in-app .hand-note { width: 130px; }
.qr-flow.in-app .hand-note p { width: 130px; font-size: 18px; }
.qr-flow.in-app .mock-phone { width: 200px; height: 382px; }
@media (max-width: 1100px) {
  .qr-flow.in-app { flex-direction: column; align-items: flex-start; }
  .qr-flow.in-app .qr-right { align-self: center; }
}
.contact-item:hover { background: var(--neutral-50); }
.badge { cursor: default; }
.qr-flow.in-app .code-inputs input { border-color: var(--border); }
.qr-flow.in-app .code-inputs input:focus { border-color: #9cc6ec; }
.qr-flow.in-app .qr-box { box-shadow: inset 0 0 0 1px var(--border); }
