/* veki.app's sign-in, sign-up and account pages: a centred card on legal.css's tokens and top bar. */
[hidden] { display: none !important; }
.auth { min-height: calc(100vh - 61px); display: grid; place-items: center; padding: 40px 16px 56px; }
.auth-card {
  width: 100%; max-width: 410px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 28px 26px; box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.45);
}
.auth-card h1 { font-size: 26px; letter-spacing: -0.025em; margin: 0 0 6px; line-height: 1.2; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; font-size: 14.5px; }
.auth-card .sub strong { color: var(--text); }

.field { display: block; margin-bottom: 14px; }
.field span { display: flex; justify-content: space-between; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.field span small { color: var(--faint); font-weight: 500; }
.field input {
  width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  font: inherit; font-weight: 700; font-size: 15px; border-radius: 11px; padding: 11px 16px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); text-decoration: none;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn svg { width: 18px; height: 18px; flex: none; }

.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.notice { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; line-height: 1.5; }
.notice.error { background: color-mix(in srgb, #ff6e6e 14%, transparent); border: 1px solid color-mix(in srgb, #ff6e6e 40%, transparent); }
.notice.ok { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.notice[hidden] { display: none; }

.switch { text-align: center; color: var(--muted); font-size: 14px; margin: 20px 0 0; }
.fine { color: var(--faint); font-size: 12.5px; text-align: center; margin: 14px 0 0; line-height: 1.5; }
.fine a { color: var(--muted); text-decoration: underline; }

.who { display: flex; align-items: center; gap: 14px; margin: 4px 0 20px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 22px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who b { display: block; font-size: 17px; }
.who span { color: var(--muted); font-size: 14px; word-break: break-all; }
.facts { list-style: none; padding: 0; margin: 0 0 22px; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--muted); }
.facts li b { color: var(--text); font-weight: 600; }
/* The veki loader (wwwroot/veki-loader.svg), fading in after a moment so a quick load never flashes it. */
.loading { display: grid; place-items: center; padding: 72px 0; animation: loading-in 0.25s 0.15s both; }
.loading img { width: 64px; height: 64px; }
.loading .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes loading-in { from { opacity: 0; } }
.auth-card #google + #facebook { margin-top: 10px; }
.field span a { font-weight: 500; }
.center { text-align: center; }
.big { font-size: 54px; font-weight: 800; letter-spacing: -0.04em; margin: 0 0 4px; color: var(--accent); line-height: 1.1; }

/* Signed-in pages: the dashboard and the account page. */
.home { padding: 40px 0 64px; min-height: calc(100vh - 61px - 90px); }
.wrap.narrow { max-width: 680px; }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.hello h1, .page-title { font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.03em; margin: 0; line-height: 1.15; }
.page-title { margin-bottom: 22px; }
.hello .sub { color: var(--muted); margin: 6px 0 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13.5px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.pill:hover { text-decoration: none; filter: brightness(1.08); }
.pill.warn { background: color-mix(in srgb, #ffb547 16%, transparent); color: #e59a1f; border-color: color-mix(in srgb, #ffb547 45%, transparent); }

.tiles { display: grid; grid-template-columns: 1.3fr 1fr; grid-auto-rows: auto; gap: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.tile h2 { margin: 0; font-size: 19px; letter-spacing: -0.015em; }
.tile p { margin: 0; color: var(--muted); font-size: 14.5px; }
.tile .btn { margin-top: auto; width: auto; align-self: flex-start; padding: 10px 18px; }
.tile .fine { text-align: left; margin: 0; }
.tile-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); font-size: 20px; }
.hero-tile { grid-row: span 2; background-image: radial-gradient(520px 220px at 0% 0%, var(--accent-soft), transparent 70%); }
.hero-tile h2 { font-size: 24px; }
.hero-tile .btn { font-size: 16px; padding: 13px 22px; }
.hero-tile .store-row { margin-top: 0; }
.qr-row { display: flex; gap: 16px; align-items: center; }
.store-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.tile .store-row .btn { margin-top: 0; }
.btn.disabled { opacity: 0.55; cursor: default; pointer-events: none; }
.qr { width: 112px; height: 112px; border-radius: 10px; flex: none; background: #fff; padding: 4px; }
.fine.left { text-align: left; margin-top: 22px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; margin-bottom: 18px; }
.panel h2 { font-size: 17px; margin: 0 0 12px; }
.panel .who { margin-top: 0; }
.panel .hint { color: var(--muted); font-size: 14px; margin: -4px 0 14px; }
.row-form { display: flex; gap: 10px; align-items: flex-end; }
.row-form .field { flex: 1; margin-bottom: 12px; }
.row-form .btn { margin-bottom: 12px; }
.btn.small { width: auto; font-size: 14px; padding: 9px 16px; flex: none; }
.btn.danger { color: #ff6e6e; border-color: color-mix(in srgb, #ff6e6e 40%, transparent); }
.btn.danger:hover { border-color: #ff6e6e; }
.panel.danger { border-color: color-mix(in srgb, #ff6e6e 25%, var(--line)); }
.confirm { margin-top: 14px; }
.confirm p { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.plan-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.plan-row b { display: block; font-size: 16px; }
.plan-row span { color: var(--muted); font-size: 14px; }

.methods, .devices { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--line); }
.methods li, .devices li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.methods li svg { width: 20px; height: 20px; flex: none; }
.methods .mail { width: 20px; text-align: center; color: var(--muted); }
.methods li > span, .devices li > span { flex: 1; min-width: 0; }
.methods small, .devices small { display: block; color: var(--faint); font-size: 12.5px; }
.methods .btn, .devices .btn { padding: 6px 12px; font-size: 13px; }
.tag { font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 7px; margin-left: 6px; }
#password .row-form { flex-wrap: wrap; }
#password .field { min-width: 180px; }
#password label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); width: 100%; margin: -4px 0 10px; }

footer .wrap { justify-content: flex-start; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; }
  .hero-tile { grid-row: auto; }
  .row-form { flex-direction: column; align-items: stretch; gap: 0; }
  .panel { padding: 18px 16px; }
  .qr-row { flex-direction: column; align-items: flex-start; }
}
.plan-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.plan-actions:empty { display: none; }
.plan-actions .hint { margin: 0; }
.plan-options { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.plan-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; }
.plan-option:hover { border-color: var(--accent); }
.plan-option:disabled { opacity: 0.6; cursor: progress; }
.plan-option.best { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-2)); }
.plan-option .plan-name { display: flex; align-items: center; font-weight: 700; font-size: 15px; }
.plan-option .plan-price { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 1.5em; }
.plan-option .plan-per { color: var(--muted); font-size: 12.5px; }
/* The new-member offer: the usual price crossed out, a warm badge, a countdown. */
.plan-option .plan-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-option .was { color: var(--faint); font-weight: 600; font-size: 14px; text-decoration-thickness: 1.5px; }
.plan-option.offer { border-color: color-mix(in srgb, #ffb547 60%, var(--line-2)); background: color-mix(in srgb, #ffb547 8%, var(--panel-2)); }
.plan-option.offer:hover { border-color: #ffb547; }
.tag.hot { color: #2a1700; background: #ffb547; }
.countdown { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: #e59a1f; margin-top: 4px; }
[data-theme="light"] .countdown { color: #9a5b00; }
.offer-note { margin: 6px 0 0; }
.offer-note .countdown { font-size: inherit; margin: 0; }

/* The dashboard's upgrade card while on the trial: what you keep, and the plans one click away. */
.upgrade { margin: 0 0 18px; padding: 22px 24px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  background: radial-gradient(600px 220px at 100% 0%, var(--accent-soft), transparent 70%), var(--panel); scroll-margin-top: 80px; }
.upgrade.warn { border-color: color-mix(in srgb, #ffb547 55%, var(--line));
  background: radial-gradient(600px 220px at 100% 0%, color-mix(in srgb, #ffb547 14%, transparent), transparent 70%), var(--panel); }
.upgrade h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -0.015em; }
.upgrade-head p { margin: 0; color: var(--muted); font-size: 14.5px; }
.perks { list-style: none; margin: 14px 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--text); }
.perks li::before { content: "✓ "; color: var(--accent); font-weight: 800; }
.upgrade .fine.left { margin: 12px 0 0; }
.upgrade .plan-option.best { background: color-mix(in srgb, var(--accent) 8%, var(--panel-2)); }
.pill[href="#upgrade"] { cursor: pointer; }

/* The admin statistics. */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi b { display: block; font-size: 26px; letter-spacing: -0.02em; line-height: 1.2; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi small { display: block; color: var(--faint); font-size: 12px; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.tile.wide { margin-bottom: 18px; }
.tile .hint { color: var(--muted); font-size: 13.5px; margin: -4px 0 6px; }
.chart svg { width: 100%; height: 170px; display: block; }
.chart .legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.funnel { display: grid; gap: 7px; }
.funnel div { display: grid; grid-template-columns: 150px 1fr 70px; gap: 10px; align-items: center; font-size: 13.5px; }
.funnel span { color: var(--muted); }
.funnel i { display: block; height: 18px; border-radius: 5px; background: var(--accent); min-width: 2px; }
.funnel em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; background: none; color: var(--text); }
.table th { color: var(--muted); font-weight: 600; }
.table th:first-child, .table td:first-child { text-align: left; }
.table td.dim { color: var(--faint); }
.scroll { overflow-x: auto; }
.callout { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; }
.callout:empty { display: none; }
@media (max-width: 860px) { .charts { grid-template-columns: 1fr; } .funnel div { grid-template-columns: 110px 1fr 56px; } }
.big-avatar { width: 64px; height: 64px; font-size: 26px; margin: 0 auto 14px; }
