/* AppDrop design system: tokens, layout, components. Mobile-first; light + dark. */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f0f2f5; --border: #e3e6eb;
  --text: #0f1419; --text-2: #5b6470; --text-3: #8a929c;
  --accent: #2563eb; --accent-hover: #1d4ed8; --accent-soft: #e8efff; --on-accent: #fff;
  --ok: #15803d; --ok-soft: #e7f6ec; --warn: #b45309; --warn-soft: #fff4e0; --bad: #c62828; --bad-soft: #fdecec;
  --radius: 14px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10; --surface: #14171c; --surface-2: #1b1f26; --border: #262b33;
    --text: #e8eaed; --text-2: #a3abb5; --text-3: #6f7783;
    --accent: #4f8bff; --accent-hover: #6b9dff; --accent-soft: #16233d; --on-accent: #fff;
    --ok: #4ade80; --ok-soft: #10261a; --warn: #fbbf24; --warn-soft: #2a2110; --bad: #f87171; --bad-soft: #2c1414;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 750; }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* layout */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; margin: 0 auto; padding: 0 16px; }
main { padding: 28px 0 56px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 1.1rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #3b82f6, #7c3aed);
  display: grid; place-items: center; color: #fff; }
.nav { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-2); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--text-3); font-size: .875rem; }
.site-footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--text-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 12px; border: 1px solid transparent; font: 600 1rem/1 var(--font); cursor: pointer;
  background: var(--accent); color: var(--on-accent); transition: background .15s, transform .05s; text-decoration: none; }
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: var(--bad); filter: brightness(.92); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1.05rem; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .875rem; border-radius: 9px; }
.btn-block { width: 100%; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-flat { box-shadow: none; }
.card h3 { margin-bottom: .35em; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

/* forms */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-size: .875rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.hint { font-size: .8rem; color: var(--text-3); margin-top: 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px; min-height: 44px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--accent); }
input[type=file] { padding: 9px; }
.code-input { font: 700 1.6rem/1 var(--mono); letter-spacing: .4em; text-align: center; }
.check { display: flex; gap: 8px; align-items: center; font-size: .95rem; color: var(--text); font-weight: 500; }

/* alerts & badges */
.alert { border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; border: 1px solid; font-size: .95rem; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert-bad, .error { color: var(--bad); }
.alert-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert-info { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }

/* progress steps */
.steps { list-style: none; padding: 0; margin: 8px 0 0; position: relative; }
.steps li { position: relative; padding: 0 0 18px 36px; color: var(--text-3); font-weight: 500; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface); }
.steps li::after { content: ""; position: absolute; left: 10px; top: 25px; bottom: 2px; width: 2px; background: var(--border); }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--text); }
.steps li.done::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/13px no-repeat; border-color: var(--ok); }
.steps li.done::after { background: var(--ok); }
.steps li.current { color: var(--text); font-weight: 700; }
.steps li.current::before { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
  background: radial-gradient(circle, var(--accent) 0 5px, var(--surface) 6px); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px var(--accent-soft); } }
@media (prefers-reduced-motion: reduce) { .steps li.current::before { animation: none; } }

/* app tiles */
.avatar { width: 52px; height: 52px; flex: none; border-radius: 13px; display: grid; place-items: center; color: #fff;
  font-weight: 750; font-size: 1.3rem; background: linear-gradient(135deg, hsl(var(--h,220) 75% 55%), hsl(calc(var(--h,220) + 40) 70% 45%)); }
.app-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.app-row:first-child { border-top: 0; }
.app-row .meta { flex: 1; min-width: 0; }
.app-row .title { font-weight: 650; }
.app-row .state { font-size: .85rem; color: var(--accent); min-height: 1.2em; }
.app-chip { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.app-chip .avatar { width: 40px; height: 40px; font-size: 1.05rem; border-radius: 10px; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* plans */
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plan { position: relative; display: block; cursor: pointer; background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 20px; transition: border-color .15s, box-shadow .15s; }
.plan:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.plan input[type=radio] { position: absolute; top: 18px; right: 18px; width: 20px; height: 20px; }
.plan .name { font-weight: 700; font-size: 1.05rem; padding-right: 28px; }
.plan .price { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 2px; }
.plan .price small { font-size: .95rem; font-weight: 600; color: var(--text-2); }
.plan ul { list-style: none; padding: 0; margin: 12px 0 0; font-size: .9rem; color: var(--text-2); }
.plan li { padding: 3px 0 3px 22px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* landing */
.hero { padding: 56px 0 40px; }
.hero .eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-size: .85rem; font-weight: 650; margin-bottom: 18px; }
.hero h1 { max-width: 20ch; }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text-2); max-width: 36rem; margin-bottom: 26px; }
.hero-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: 1.1fr .9fr; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .phone { display: none; } }
.phone { justify-self: center; width: 270px; height: 540px; border-radius: 44px; padding: 12px; background: #111; box-shadow: var(--shadow), 0 30px 60px rgba(16,24,40,.18); }
.phone .screen { height: 100%; border-radius: 34px; background: linear-gradient(160deg, #1e3a8a, #6d28d9 60%, #db2777); padding: 46px 18px 18px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 10px; align-content: start; }
.phone .icon { aspect-ratio: 1; border-radius: 13px; background: rgba(255,255,255,.18); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .9rem; }
.phone .icon.hl { background: #fff; color: #2563eb; box-shadow: 0 0 0 3px rgba(255,255,255,.4); }
.section { padding: 48px 0; }
.section-title { text-align: center; max-width: 40rem; margin: 0 auto 32px; }
.section-title p { color: var(--text-2); }
.how { counter-reset: how; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.how .card { position: relative; padding-top: 52px; }
.how .card::before { counter-increment: how; content: counter(how); position: absolute; top: 18px; left: 20px; width: 28px; height: 28px;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); padding-bottom: 6px; }
.cta { text-align: center; padding: 40px 20px; background: linear-gradient(135deg, var(--accent), #7c3aed); color: #fff; border-radius: 22px; }
.cta .btn { background: #fff; color: #1e3a8a; }
.cta p { color: rgba(255,255,255,.85); }

/* tables (admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 650; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
td input, td select { min-height: 36px; padding: 6px 9px; }

/* focus, status pills (redesign 2026-10) */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.steps .hint { display: block; font-size: .82rem; font-weight: 450; color: var(--text-3); margin-top: 2px; }

/* cabinet */
.cab { max-width: 640px; }
.sub-hero { background: linear-gradient(135deg, var(--accent), #6d4cff); color: #fff; border-radius: 18px; padding: 18px 20px; }
.sub-hero .t { font-size: .85rem; opacity: .85; }
.sub-hero .v { font-size: 1.35rem; font-weight: 750; margin: 2px 0 12px; }
.sub-hero .meter { height: 6px; border-radius: 99px; background: rgba(255,255,255,.25); overflow: hidden; }
.sub-hero .meter i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.sub-hero .row { justify-content: space-between; font-size: .85rem; margin-top: 8px; opacity: .95; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sec-h h2 { font-size: 1.15rem; margin: 0; }
.app-row .sub { font-size: .82rem; color: var(--text-3); }
.app-row .bar { height: 4px; background: var(--surface-2); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.app-row .bar i { display: block; height: 100%; width: 60%; background: var(--accent); animation: bar 1.6s ease-in-out infinite; }
@keyframes bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(170%); } }
@media (prefers-reduced-motion: reduce) { .app-row .bar i { animation: none; } }
.tip { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; }
.tip summary { cursor: pointer; font-weight: 650; color: var(--accent); }
.tip p { margin: 8px 0 0; }
.empty { text-align: center; padding: 28px 16px; }
.empty .big { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.order-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
