/* account.css — user account / dashboard (2026-10-20). Same dark family as filter-form.css. */

:root {
  --bg: #0F172A;
  --card: #1E293B;
  --card-alt: #0B1220;
  --border: #334155;
  --text: #E2E8F0;
  --muted: #94A3B8;
  --accent: #22C55E;
  --accent-hover: #16A34A;
  --accent-soft: rgba(34, 197, 94, 0.15);
  --warn: #EAB308;
  --error: #EF4444;
  --info: #38BDF8;
}

* { box-sizing: border-box; }

body.acc {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); }

/* Platby loads filter-form.css for the plan card — undo its centred column body */
body.acc:not(.acc-auth) { display: block; padding: 0; }
.acc-plan .card, .acc-plan > div { max-width: none; margin: 0 0 16px; }

/* ── top bar + menu (also used above the filter form) ── */
.acc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 16px;
}
/* same wordmark as the landing header: house mark (no circle) + Inter "RealityMatch.sk" */
.acc-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #F8FAFC; font-family: Inter, system-ui, sans-serif; font-weight: 800; font-size: 23px; letter-spacing: 0.01em; white-space: nowrap; }
.acc-brand picture, .auth-brand picture { display: block; flex-shrink: 0; line-height: 0; }
.acc-brand img { width: 46px; height: 46px; display: block; }
@media (max-width: 480px) { .acc-brand { font-size: 19px; gap: 8px; } .acc-brand img { width: 38px; height: 38px; } .acc-email { display: none; } }
.acc-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acc-email { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.acc-logout { margin: 0; }
.acc-logout button {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer;
}
.acc-logout button:hover { color: var(--text); border-color: var(--muted); }

.acc-nav {
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto 8px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}
.acc-nav::-webkit-scrollbar { display: none; }
.acc-nav a {
  flex: 0 0 auto;
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.acc-nav a:hover { color: var(--text); }
.acc-nav a.active { color: var(--text); border-bottom-color: var(--accent); }

/* filter-form.css centres its body as a column; give the menu the full width there */
body.with-acc-nav { padding-top: 0; }
body.with-acc-nav .acc-top, body.with-acc-nav .acc-nav { align-self: stretch; }
body.with-acc-nav .acc-nav { margin-bottom: 20px; }
body.with-acc-nav .card { margin-top: 0; }

/* ── main ── */
.acc-main { width: 100%; max-width: 1040px; margin: 0 auto; padding: 8px 16px 48px; }
.acc-h1 { font-size: 22px; margin: 8px 0 16px; }
.acc-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .acc-grid.cols-2 { grid-template-columns: 1fr 1fr; } .acc-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.acc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 20px;
  margin-bottom: 16px;
  min-width: 0;
}
.acc-grid > .acc-card { margin-bottom: 0; }
.acc-card h2 { font-size: 16px; margin: 0 0 12px; }
.acc-card p { margin: 0 0 12px; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.acc-flash { border-radius: 10px; padding: 12px 14px; margin: 8px 0 16px; font-size: 14px; }
.acc-flash-ok { background: var(--accent-soft); border: 1px solid var(--accent); }
.acc-flash-err { background: rgba(239, 68, 68, 0.12); border: 1px solid var(--error); }
.acc-flash-info { background: rgba(56, 189, 248, 0.12); border: 1px solid var(--info); }

.acc-note { background: var(--card-alt); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 8px 0; font-size: 14px; }
.acc-note-ok { border-color: var(--accent); }
.acc-note-warn { border-color: var(--warn); }

.acc-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.acc-dl dt { color: var(--muted); }
.acc-dl dd { margin: 0; overflow-wrap: anywhere; }

/* ── forms + buttons ── */
.acc-form, .auth-form { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 0; }
.inline-form { display: inline; margin: 8px 0 0; }
.acc-form label, .auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.acc-form input, .auth-form input, .acc-select {
  background: var(--card-alt); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 16px; width: 100%;
}
.acc-form input:focus, .auth-form input:focus, .acc-select:focus { outline: none; border-color: var(--accent); }
.btn-primary, .btn-secondary, .btn-danger, .btn-link {
  font: inherit; font-weight: 700; font-size: 16px; border-radius: 12px; padding: 12px 22px; cursor: pointer;
  text-align: center; text-decoration: none; display: inline-block;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}
/* the landing page CTA ("Vyskúšať 72h zadarmo"): green fill, dark bold text, soft glow */
.btn-primary { background: #22C55E; color: #0F172A; border: 1px solid #22C55E; box-shadow: 0 0 24px rgba(34, 197, 94, 0.3); }
.btn-primary:hover { background: #16A34A; border-color: #16A34A; box-shadow: 0 0 32px rgba(34, 197, 94, 0.5); }
.btn-sm { font-size: 14px; padding: 8px 14px; border-radius: 10px; }
.acc-card > .btn-primary, .acc-card > .btn-secondary { margin-top: 4px; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: #22C55E; color: #22C55E; }
.btn-danger { background: transparent; color: var(--error); border: 1px solid var(--error); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.1); }
.btn-link { background: none; border: none; color: var(--muted); padding: 6px 0; text-decoration: underline; font-weight: 400; }
.btn-block { display: block; width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.badge-ok { background: var(--accent-soft); color: var(--accent); }
.badge-warn { background: rgba(234, 179, 8, 0.15); color: var(--warn); }
.badge-err { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.badge-info { background: rgba(56, 189, 248, 0.15); color: var(--info); }
.badge-muted { background: rgba(148, 163, 184, 0.15); color: var(--muted); }

/* ── login pages ── */
body.acc-auth { display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; text-decoration: none; color: #F8FAFC; font-family: Inter, system-ui, sans-serif; font-weight: 800; font-size: 26px; letter-spacing: 0.01em; }
.auth-brand img { width: 84px; height: 84px; display: block; }
.auth-card .btn-secondary.btn-block { margin-top: 8px; }
.auth-card h1 { font-size: 22px; text-align: center; margin: 0 0 14px; }
.auth-hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.auth-small { font-size: 13px; margin-top: 16px; }
.auth-tabs { display: flex; gap: 6px; margin: 0 0 16px; background: var(--card-alt); border-radius: 10px; padding: 4px; }
.auth-tabs a { flex: 1; text-align: center; padding: 8px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.auth-tabs a.active { background: var(--card); color: var(--text); }

/* ── profile ── */
.steps { padding-left: 20px; margin: 0 0 12px; }
.steps li { margin-bottom: 10px; }
/* QR + manual key centred in the card, outside the numbered steps */
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 4px 0 18px; }
.qr { background: #fff; padding: 10px; border-radius: 12px; line-height: 0; }
.qr svg { width: 200px; height: 200px; }
.secret { font-size: 15px; letter-spacing: 1px; overflow-wrap: anywhere; color: var(--text); text-align: center; }
.codes { columns: 2; padding-left: 22px; margin: 10px 0 12px; }
.codes code { font-size: 15px; }
.acc-sessions { list-style: none; padding: 0; margin: 0 0 12px; }
.acc-sessions li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.acc-sessions li:last-child { border-bottom: none; }

/* ── overview ── */
.acc-main .kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .acc-main .kpis { grid-template-columns: repeat(4, 1fr); } }
.acc-main .kpi { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.acc-main .kpi .v { font-size: 26px; font-weight: 700; display: block; font-variant-numeric: tabular-nums; }
.acc-main .kpi .l { color: var(--muted); font-size: 13px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.filter-head { margin-bottom: 18px; }
.filter-head p { margin: 0; }
/* viewBox is 640 wide: text sizes are in viewBox units, scaled per width so the labels read ~12–13 px */
.chart { width: 100%; max-width: 760px; height: auto; display: block; }
.chart .bar { fill: var(--accent); }
.chart .bar-zero { fill: var(--border); }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .val { fill: var(--text); font-size: 11px; font-weight: 600; }
@media (max-width: 600px) { .chart .axis, .chart .val { font-size: 22px; } }

/* ── listings ── */
.lst-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.chip {
  display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
}
.chip.active { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.lst { list-style: none; padding: 0; margin: 0; }
.lst li { border-bottom: 1px solid var(--border); padding: 12px 0; display: grid; gap: 4px; }
.lst li:last-child { border-bottom: none; }
.lst-title { font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.lst-title:hover { text-decoration: underline; }
.lst-meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.lst-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.lst-old { text-decoration: line-through; color: var(--muted); font-weight: 400; margin-left: 6px; }
.lst-gone .lst-title { color: var(--muted); }
.lst-unverified .lst-title { color: #CBD5E1; }
.pager { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 16px; }

/* ── payments ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.tbl th { color: var(--muted); font-weight: 600; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; }

/* ── filter history (filter form page) ── */
.fh-list { list-style: none; padding: 0; margin: 8px 0 0; font-size: 14px; }
.fh-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.fh-list li:last-child { border-bottom: none; }

/* filter change history below the filter form (dashboard) */
.acc-history { margin-top: 16px; }
.acc-history summary { cursor: pointer; }

/* map opened from the account: menu on top, the map app fills the rest of the window */
body.map-with-acc { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: var(--bg); }
body.map-with-acc .acc-top, body.map-with-acc .acc-nav { flex: 0 0 auto; max-width: none; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body.map-with-acc .acc-nav { margin-bottom: 0; }
body.map-with-acc .app { height: auto; flex: 1 1 auto; min-height: 0; }

/* wordmark in the logo colours */
.wm-r { color: #51C96B; }
.wm-m { color: #51B5DC; }
