/* styles.css — AGVP shared stylesheet
   Consolidated from landing.css, privacy_policy.css, delete_account.css,
   export_data.css and admin.css into a single file served by every static
   page. All pages share the same design language (modern, responsive,
   light/dark adaptive, strict CSP, no external fonts or assets); rules that
   differ per page are scoped under a page class on <body> (pg-landing,
   pg-privacy, pg-del, pg-export, pg-admin) while identical rules are shared
   once. */

/* ================= 1. Design tokens ================= */
:root {
  color-scheme: light dark;

  --bg-1: #f4f6fb;
  --bg-2: #eceef7;
  --glow-1: rgba(99, 102, 241, 0.16);
  --glow-2: rgba(139, 92, 246, 0.12);
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-border: rgba(15, 23, 42, 0.08);
  --card-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.28);
  --text: #0f172a;
  --text-muted: #5b6b84;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(99, 102, 241, 0.10);
  --danger: #e11d48;
  --danger-2: #be123c;
  --danger-soft: rgba(225, 29, 72, 0.08);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.12);
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: rgba(15, 23, 42, 0.14);
  --row-bg: rgba(15, 23, 42, 0.035);
  --ring: 0 0 0 4px rgba(99, 102, 241, 0.25);
  --link-hover: #4f46e5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-1: #0b0f1c;
    --bg-2: #101528;
    --glow-1: rgba(99, 102, 241, 0.22);
    --glow-2: rgba(34, 211, 238, 0.10);
    --card-bg: rgba(17, 24, 39, 0.82);
    --card-border: rgba(255, 255, 255, 0.09);
    --card-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #818cf8;
    --accent-2: #a78bfa;
    --accent-soft: rgba(129, 140, 248, 0.14);
    --danger: #fb7185;
    --danger-2: #f43f5e;
    --danger-soft: rgba(244, 63, 94, 0.12);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.14);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.16);
    --row-bg: rgba(255, 255, 255, 0.045);
    --ring: 0 0 0 4px rgba(129, 140, 248, 0.30);
    --link-hover: #c7d2fe;
  }
}

/* The privacy page uses a slightly different danger tone. */
body.pg-privacy {
  --danger: #dc2626;
}

@media (prefers-color-scheme: dark) {
  body.pg-privacy {
    --danger: #f87171;
  }
}

/* ================= 2. Base ================= */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* The hidden attribute must always win over display rules (e.g. .topbar). */
[hidden] {
  display: none !important;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 500px at 85% -10%, var(--glow-1), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, var(--glow-2), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Long-form pages are set slightly more airy. */
body.pg-privacy,
body.pg-landing {
  line-height: 1.65;
}

/* Skip link (keyboard users) */
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ================= 3. Shared layout & components ================= */
.page {
  display: grid;
  place-items: center;
  gap: 20px;
  padding: 32px 16px 40px;
}

body.pg-landing .page {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

h1 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

body.pg-admin h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

body.pg-admin .view-head h2 {
  margin: 0;
}

.subtitle {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.lead {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

body.pg-admin .lead {
  margin: 0 0 18px;
  font-size: 1rem;
}

.muted {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

body.pg-admin .muted {
  font-size: 0.88rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.pg-del .card,
body.pg-export .card {
  width: min(660px, 100%);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 44px);
}

body.pg-privacy .card {
  width: min(780px, 100%);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 48px);
}

body.pg-landing .card {
  border-radius: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 28px;
}

body.pg-admin .card {
  width: min(480px, 100%);
  border-radius: 22px;
  padding: 30px;
}

body.pg-admin .card.wide {
  width: min(1200px, 100%);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

body.pg-privacy .card-header {
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px -8px var(--accent);
}

.logo svg {
  width: 26px;
  height: 26px;
}

body.pg-landing .logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 16px 32px -12px var(--accent-soft);
}

body.pg-landing .logo svg {
  width: 34px;
  height: 34px;
}

/* Stepper (account-deletion and data-export pages) */
.stepper {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  counter-reset: step;
}

.step-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 2px;
  border-radius: 1px;
  background: var(--input-border);
}

.step-item.active {
  color: var(--accent);
}

.step-item.active:not(:last-child)::after {
  background: linear-gradient(90deg, var(--accent), var(--input-border));
}

.dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  background: var(--row-bg);
  border: 1.5px solid var(--input-border);
  transition: all 0.25s ease;
}

.step-item.active .dot {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px -6px var(--accent);
}

/* Panels */
.panel {
  animation: fade-in 0.35s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Forms */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.field code {
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.85em;
  background: var(--row-bg);
  border: 1px solid var(--input-border);
}

body.pg-admin .field {
  margin-bottom: 14px;
}

body.pg-admin .field input {
  padding: 11px 14px;
  border: 1px solid var(--input-border);
}

/* Click focus shows the ring on the admin panel too (original behavior). */
body.pg-admin .field input:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 18px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn:not(:disabled):active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

body.pg-del .btn-primary,
body.pg-export .btn-primary {
  box-shadow: 0 12px 26px -12px var(--accent);
}

body.pg-export .btn-secondary {
  background: var(--row-bg);
  color: var(--text);
  border: 1.5px solid var(--input-border);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), var(--danger-2));
  box-shadow: 0 12px 26px -12px var(--danger);
}

body.pg-admin .btn {
  display: inline-block;
  width: auto;
  margin-top: 0;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: opacity 0.15s ease, transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
}

body.pg-admin .btn:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

body.pg-admin .btn:not(:disabled):active {
  transform: translateY(0);
}

body.pg-admin .btn-secondary {
  background: var(--accent-soft);
  color: var(--text);
  border-color: var(--card-border);
}

/* Alerts */
.alert {
  margin: 14px 0 4px;
  padding: 11px 14px;
  font-size: 0.88rem;
  border-radius: 10px;
  color: var(--danger);
  background: var(--danger-soft);
}

body.pg-del .alert,
body.pg-export .alert {
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

body.pg-admin .alert {
  margin: 10px 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.alert[hidden] {
  display: none;
}

/* Account chip */
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 8px 14px;
  font-size: 0.88rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.account-chip strong {
  max-width: 26ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Checkbox */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 4px;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}

.check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.check input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

body.pg-export .check {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--row-bg);
}

body.pg-export .check strong {
  font-size: 0.9rem;
  color: var(--text);
}

/* Done state */
.done-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 8px auto 18px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--success), #10b981);
  box-shadow: 0 16px 34px -12px var(--success);
  animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

.done-icon svg {
  width: 34px;
  height: 34px;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#panel-done {
  text-align: center;
}

/* ================= 4. Account-deletion page ================= */
/* Warning note */
.warning {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 13px 15px;
  font-size: 0.9rem;
  border-radius: 12px;
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
}

.warning p {
  margin: 0;
}

.warning-icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--danger);
}

/* Data list (deleted-data summary) */
body.pg-del .data-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

body.pg-del .data-list li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  font-size: 0.88rem;
  border-radius: 12px;
  background: var(--row-bg);
  border: 1px solid var(--card-border);
}

body.pg-del .data-list li strong {
  font-size: 0.9rem;
}

.data-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--accent);
  background: var(--accent-soft);
}

.data-icon svg {
  width: 19px;
  height: 19px;
}

/* ================= 5. Data-export page ================= */
/* Format selection (radio group) */
.format-group {
  border: 1.5px solid var(--input-border);
  border-radius: 14px;
  padding: 14px;
  margin: 0 0 16px;
}

.format-group legend {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 6px;
}

.radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  margin: 6px 0;
  cursor: pointer;
  border-radius: 10px;
  background: var(--row-bg);
  border: 1.5px solid transparent;
  transition: border-color 0.15s ease;
}

.radio:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.radio input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.radio input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.radio span {
  font-size: 0.88rem;
}

.radio strong {
  font-size: 0.9rem;
}

/* ================= 6. Privacy-policy page ================= */
.updated-chip {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--row-bg);
  border: 1px solid var(--input-border);
  white-space: nowrap;
}

/* Language switcher (privacy page) */
body.pg-privacy .lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--input-border);
}

body.pg-privacy .lang-switch a {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

body.pg-privacy .lang-switch a:hover {
  color: var(--accent);
  border-color: var(--input-border);
}

body.pg-privacy .lang-switch a.current {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px -6px var(--accent);
}

body.pg-privacy .lang-switch a:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* Introduction */
body.pg-privacy .intro {
  margin: 22px 0 8px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--accent-soft);
  border: 1px solid var(--input-border);
}

body.pg-privacy .intro-title {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.01em;
}

body.pg-privacy .intro p {
  margin: 0;
  font-size: 0.95rem;
}

/* Policy sections */
.sections {
  counter-reset: section;
}

.policy-section {
  counter-increment: section;
  padding: 26px 0 4px;
}

.policy-section + .policy-section {
  border-top: 1px solid var(--input-border);
  margin-top: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 10px;
  font-size: 1.06rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.section-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--input-border);
}

.section-icon svg {
  width: 20px;
  height: 20px;
}

.section-title::before {
  content: counter(section, decimal) ".";
  margin-right: 8px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.policy-section p {
  margin: 0 0 10px;
  font-size: 0.93rem;
}

.policy-section p:last-child {
  margin-bottom: 0;
}

/* Bullet list (data categories) */
body.pg-privacy .data-list {
  list-style: none;
  margin: 14px 0 4px;
  padding: 0;
  display: grid;
  gap: 10px;
}

body.pg-privacy .data-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--row-bg);
  border: 1px solid var(--input-border);
  font-size: 0.9rem;
}

body.pg-privacy .data-list li::before {
  content: "";
  flex: none;
  align-self: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

body.pg-privacy .data-list strong {
  font-weight: 650;
}

/* Contact form */
.contact-form {
  margin-top: 14px;
  padding: 18px 18px 20px;
  border-radius: 16px;
  background: var(--accent-soft);
  border: 1px solid var(--input-border);
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.93rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 110px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.form-status {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  background: var(--row-bg);
  border: 1px solid var(--input-border);
}

.form-status:not([hidden]) {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 45%, transparent);
  background: color-mix(in srgb, var(--success) 10%, transparent);
}

.form-status.error:not([hidden]) {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.contact-submit {
  justify-self: start;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px -8px var(--accent);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.contact-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px var(--accent);
}

.contact-submit:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.contact-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ================= 7. Landing page ================= */
/* Hero */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.badge {
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.page-title {
  margin: 4px 0 0;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
}

/* Language switcher (landing page) */
body.pg-landing .lang-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 12px;
}

body.pg-landing .lang-switch a {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

body.pg-landing .lang-switch a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

body.pg-landing .lang-switch a.current {
  color: var(--accent);
  font-weight: 600;
}

/* Intro */
body.pg-landing .intro h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

body.pg-landing .intro p {
  margin: 0;
  color: var(--text-muted);
}

/* Features */
.features-title {
  text-align: center;
  margin: 8px 0 0;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

body.pg-landing .feature {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
}

.feature-title {
  margin: 0;
  font-size: 1.05rem;
}

.feature-body {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Call to action */
.cta {
  text-align: center;
  padding: 8px 0;
}

.playstore-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 16px 32px -12px var(--accent-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.playstore-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -12px var(--accent-soft);
}

.playstore-button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.playstore-icon {
  width: 26px;
  height: 26px;
}

.coming-soon {
  margin: 0;
  padding: 14px 28px;
  border: 1px dashed var(--card-border);
  border-radius: 14px;
  display: inline-block;
  color: var(--text-muted);
  background: var(--card-bg);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: var(--link-hover);
}

/* ================= 8. Admin panel ================= */
body.pg-admin .page {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
  gap: 20px;
}

body.pg-admin .topbar {
  width: min(1200px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 20px;
  padding: 16px 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.topbar .logo {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px -6px var(--accent);
}

.topbar .logo svg {
  width: 22px;
  height: 22px;
}

.topbar-text {
  flex: 1;
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.topbar .subtitle {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.86rem;
  border-radius: 12px;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}

/* Login View */
.card-login {
  width: min(440px, 100%);
  margin: 20px auto;
  border-radius: 24px;
  padding: 36px 32px;
  border-top: 3px solid var(--accent);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  box-shadow: 0 10px 24px -8px var(--accent);
}

.login-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.login-header .lead {
  font-size: 0.9rem;
  margin: 0;
}

.btn-block {
  width: 100%;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 10px 24px -8px var(--accent);
}

/* Status & Tag Badges */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}

.status-badge.ok {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.no {
  background: var(--row-bg);
  color: var(--text-muted);
}

.mono-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--row-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
}

.badge-role-admin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.badge-role-user {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--row-bg);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
}

.badge-unverified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

/* List view */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.toolbar input[type="search"] {
  width: 100%;
  padding: 11px 16px 11px 40px;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.toolbar input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.toolbar-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-count-badge {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--row-bg);
  border: 1px solid var(--card-border);
  padding: 5px 12px;
  border-radius: 999px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: 0 4px 16px -8px rgba(0, 0, 0, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

th {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--row-bg);
  border-bottom: 1px solid var(--card-border);
}

td {
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr.clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}

tbody tr.clickable:hover,
tbody tr.clickable:focus-visible {
  background: var(--accent-soft);
}

tbody tr.empty td {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
}

.cell-user-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.cell-username {
  font-weight: 600;
  color: var(--text);
}

.cell-email {
  color: var(--text-muted);
}

.cell-date {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.cell-num {
  font-variant-numeric: tabular-nums;
}

.unit-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

.photo-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--row-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
}

/* Entries view: the note cell wraps over several lines so long notes never
   stretch the table horizontally. */
td.note {
  white-space: pre-wrap;
  word-break: break-word;
  min-width: 14ch;
  max-width: 36ch;
  font-size: 0.84rem;
  line-height: 1.4;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.pager .btn {
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.86rem;
}

/* Sub Navigation & Breadcrumbs */
.admin-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.admin-nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
}

.admin-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.crumb-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.12s ease;
}

.crumb-link:hover {
  color: var(--accent);
}

.crumb-sep {
  color: var(--text-muted);
  opacity: 0.6;
}

.crumb-current {
  color: var(--text);
  font-weight: 700;
}

.nav-tabs {
  display: inline-flex;
  background: var(--row-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}

.nav-tab {
  padding: 6px 14px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.12s ease;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-tab.active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.1);
}

.nav-tab:hover:not(.active) {
  color: var(--text);
}

/* User Hero Banner */
.user-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  background: var(--row-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.user-hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 8px 20px -6px var(--accent);
}

.user-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.user-hero-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-hero-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Detail view */
.view-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.detail-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 4px 16px -8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.detail-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}

.detail-section-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.detail-section h3 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(105px, auto) 1fr;
  gap: 8px 14px;
  font-size: 0.88rem;
}

.dl dt {
  color: var(--text-muted);
  font-weight: 500;
}

.dl dd {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.stat-big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 16px;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Photos view */
.photo-block {
  margin-bottom: 28px;
}

.photo-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.photo-block-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}

.photo-count-chip {
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--row-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 2px 10px;
  border-radius: 999px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 14px;
}

.photo-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid var(--card-border);
  background: var(--row-bg);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  outline: none;
}

.photo-item:hover,
.photo-item:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.18);
  border-color: var(--accent);
}

.photo-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--row-bg);
}

.photo-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.photo-item:hover img {
  transform: scale(1.04);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 60%);
  pointer-events: none;
}

.photo-item .photo-date {
  position: absolute;
  left: 8px;
  bottom: 8px;
  right: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-zoom-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.photo-item:hover .photo-zoom-icon,
.photo-item:focus-visible .photo-zoom-icon {
  opacity: 1;
  transform: scale(1);
}

.photo-item .photo-meta {
  display: none;
}

.photo-item.loading .photo-thumb-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: block;
}

.notice {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.88rem;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

/* Lightbox Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(11, 15, 28, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.2s ease-out;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  max-width: min(90vw, 900px);
  max-height: 90vh;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalScaleIn 0.2s ease-out;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--card-border);
  background: var(--row-bg);
}

.modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close-btn {
  padding: 6px;
  border-radius: 10px;
  line-height: 0;
  display: grid;
  place-items: center;
}

.modal-body {
  padding: 16px;
  overflow: auto;
  display: grid;
  place-items: center;
  max-height: calc(85vh - 70px);
}

.modal-body img {
  max-width: 100%;
  max-height: calc(85vh - 100px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 30px -10px rgba(0, 0, 0, 0.3);
}

.modal-delete-card {
  max-width: min(90vw, 480px);
  width: 100%;
}

.modal-delete-card .modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  place-items: initial;
  text-align: left;
}

.delete-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.delete-target-info {
  font-weight: 600;
  padding: 10px 14px;
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  border-radius: 12px;
  color: var(--danger);
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.btn-hero-delete {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
}

.btn-hero-delete:not(:disabled):hover {
  background: var(--danger);
  color: #fff;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ================= 9. Footer ================= */
.footer {
  text-align: center;
}

.footer p {
  margin: 0;
}

body.pg-del .footer,
body.pg-export .footer {
  max-width: 620px;
}

body.pg-del .footer p,
body.pg-export .footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

body.pg-privacy .footer {
  width: min(780px, 100%);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0 8px;
}

body.pg-landing .footer {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.pg-admin .footer {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ================= 10. Responsive ================= */
@media (max-width: 480px) {
  body.pg-del .card,
  body.pg-export .card {
    padding: 24px 18px;
  }

  body.pg-del .step-item,
  body.pg-export .step-item {
    font-size: 0.7rem;
  }

  body.pg-del .logo,
  body.pg-export .logo {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 560px) {
  body.pg-privacy .updated-chip {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  body.pg-privacy .card-header {
    margin-bottom: 14px;
  }

  body.pg-privacy .data-list li {
    flex-direction: column;
    gap: 4px;
  }

  body.pg-privacy .data-list li::before {
    display: none;
  }

  body.pg-privacy .form-grid {
    grid-template-columns: 1fr;
  }

  body.pg-privacy .contact-submit {
    justify-self: stretch;
  }

  body.pg-landing .page {
    padding: 40px 14px 32px;
    gap: 20px;
  }

  body.pg-landing .card {
    padding: 20px;
  }
}

/* ================= 11. Reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
