/* ================================================================
   Paris 12 - Design system
   ================================================================ */

:root {
  --navy:        #14235C;
  --primary:     #1E3A8A;
  --primary-600: #1D4ED8;
  --primary-400: #3B82F6;
  --primary-100: #DBEAFE;
  --primary-50:  #EFF6FF;
  --accent:      #38BDF8;
  --accent-soft: #E0F2FE;

  --ink:      #0F172A;
  --ink-2:    #334155;
  --muted:    #64748B;
  --line:     #E2E8F0;
  --surface:  #FFFFFF;
  --bg:       #F4F6FB;
  --bg-2:     #EEF2F9;

  --ok:       #047857;
  --ok-soft:  #DCFCE7;
  --warn:     #B45309;
  --warn-soft:#FEF3C7;
  --danger:   #B91C1C;
  --danger-soft:#FEE2E2;

  --radius:   14px;
  --radius-lg:20px;
  --shadow-sm:0 1px 2px rgba(15,23,42,.06);
  --shadow:   0 6px 18px -6px rgba(15,23,42,.14);
  --shadow-lg:0 18px 40px -18px rgba(20,35,92,.32);

  --nav-h:    66px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
}

body.no-nav { padding-bottom: 32px; }

img { max-width: 100%; display: block; }

a { color: var(--primary-600); text-decoration: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; color: var(--navy); font-weight: 700; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.03rem; }
p  { margin: 0 0 .7rem; }

/* ---------------------------------------------------------------
   Layout
   --------------------------------------------------------------- */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 620px; }

.section { margin: 26px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.section-head .link { font-size: .86rem; font-weight: 600; }

.stack { display: grid; gap: 12px; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 14px; grid-template-columns: 1fr; }

/* ---------------------------------------------------------------
   Top bar
   --------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(140deg, var(--navy) 0%, var(--primary) 52%, var(--primary-600) 82%, var(--accent) 100%);
  color: #fff;
  padding-top: env(safe-area-inset-top, 0px);
  box-shadow: 0 4px 20px -8px rgba(20,35,92,.5);
}
.topbar-inner {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 16px;
  max-width: 1080px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 11px; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  display: grid; place-items: center;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { min-width: 0; }
.brand-name { font-weight: 700; font-size: 1.03rem; color: #fff; letter-spacing: -.01em; }
.brand-sub  { font-size: .7rem; color: rgba(255,255,255,.72); text-transform: uppercase; letter-spacing: .1em; }
.topbar-spacer { flex: 1; }
.topbar-action {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.26);
  color: #fff; padding: 8px 13px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.topbar-action:hover { background: rgba(255,255,255,.22); }
.topbar-action svg { width: 16px; height: 16px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.26);
  display: grid; place-items: center; cursor: pointer; color: #fff; position: relative;
}
.icon-btn svg { width: 19px; height: 19px; }
.badge-dot {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  background: var(--accent); color: var(--navy); border-radius: 999px;
  font-size: .66rem; font-weight: 800; display: grid; place-items: center; padding: 0 4px;
  border: 2px solid var(--primary);
}

/* ---------------------------------------------------------------
   Bottom nav
   --------------------------------------------------------------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
}
.bottomnav a {
  flex: 1; text-align: center; padding: 9px 2px 8px;
  color: var(--muted); font-size: .66rem; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none; position: relative;
}
.bottomnav a svg { width: 21px; height: 21px; }
.bottomnav a.active { color: var(--primary-600); }
.bottomnav a.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--primary-600);
}
.bottomnav .nav-badge {
  position: absolute; top: 4px; right: calc(50% - 20px);
  min-width: 16px; height: 16px; border-radius: 999px; background: var(--danger);
  color: #fff; font-size: .6rem; font-weight: 800; display: grid; place-items: center; padding: 0 4px;
}

/* ---------------------------------------------------------------
   Cards
   --------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 16px;
}
.card.pad-0 { padding: 0; overflow: hidden; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-1px); transition: .16s; }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: .98rem; }

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(150deg, var(--navy) 0%, var(--primary) 46%, var(--primary-600) 80%, var(--accent) 100%);
  padding: 34px 0 30px;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(680px 300px at 88% -10%, rgba(56,189,248,.32), transparent 65%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 1.72rem; max-width: 20ch; }
.hero p { color: rgba(255,255,255,.86); margin-top: 10px; max-width: 46ch; font-size: .95rem; }
.hero-media {
  margin-top: 22px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgba(255,255,255,.22); box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 10; background: rgba(255,255,255,.08);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  color: #fff; padding: 5px 11px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow-dark {
  background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-600);
}

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: .88rem; font-weight: 600;
  padding: 11px 17px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; transition: .15s; text-decoration: none; white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--primary-600); color: #fff; box-shadow: 0 6px 16px -8px rgba(29,78,216,.9); }
.btn-primary:hover { background: var(--primary); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-light { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.34); }
.btn-light:hover { background: rgba(255,255,255,.26); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-sm { padding: 7px 12px; font-size: .8rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------------------------------------------------------------
   Forms
   --------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--ink-2); margin-bottom: 6px;
}
.field .hint { font-size: .76rem; color: var(--muted); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=search], select, textarea {
  width: 100%; font-family: inherit; font-size: .92rem; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); transition: .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(59,130,246,.16);
}
textarea { resize: vertical; min-height: 104px; line-height: 1.55; }
.form-row { display: grid; gap: 12px; grid-template-columns: 1fr; }

.switch { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--ink-2); }
.switch input { width: auto; }

/* ---------------------------------------------------------------
   Chips / tags
   --------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--primary-50); color: var(--primary-600);
  font-size: .74rem; font-weight: 600;
}
.chip-accent { background: var(--accent-soft); color: var(--warn); }
.chip-ok     { background: var(--ok-soft); color: var(--ok); }
.chip-warn   { background: var(--warn-soft); color: var(--warn); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-muted  { background: var(--bg-2); color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------
   Avatars
   --------------------------------------------------------------- */
.avatar {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .86rem;
  overflow: hidden;
}
.avatar.sm { width: 34px; height: 34px; flex-basis: 34px; font-size: .76rem; }
.avatar.lg { width: 62px; height: 62px; flex-basis: 62px; font-size: 1.15rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------
   List rows (sujets, annonces, membres)
   --------------------------------------------------------------- */
.row {
  display: flex; gap: 13px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); align-items: flex-start;
}
.row:last-child { border-bottom: none; }
.row-main { min-width: 0; flex: 1; }
.row-title {
  font-weight: 650; font-size: .95rem; color: var(--navy);
  margin-bottom: 3px; display: block;
}
.row-title:hover { color: var(--primary-600); }
.row-meta { font-size: .78rem; color: var(--muted); display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.row-snippet {
  font-size: .84rem; color: var(--muted); margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------------------------------------------------------------
   Stats
   --------------------------------------------------------------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow-sm);
}
.stat-label { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 1.6rem; font-weight: 750; color: var(--navy); line-height: 1.15; margin-top: 4px; }
.stat-sub { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.stat-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary-600); margin-bottom: 10px;
}
.stat-icon svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------
   Listing cards
   --------------------------------------------------------------- */
.listing-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.listing-card .thumb { aspect-ratio: 4 / 3; background: var(--bg-2); overflow: hidden; }
.listing-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .body { padding: 12px 13px 14px; }
.listing-card .price { font-weight: 750; color: var(--primary); font-size: 1rem; }
.listing-card .title { font-weight: 650; font-size: .92rem; color: var(--navy); margin: 4px 0 6px; display: block; }

/* ---------------------------------------------------------------
   Chat
   --------------------------------------------------------------- */
.thread { display: flex; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.thread:last-child { border-bottom: none; }
.unread-pill {
  background: var(--primary-600); color: #fff; border-radius: 999px;
  min-width: 21px; height: 21px; font-size: .7rem; font-weight: 700;
  display: grid; place-items: center; padding: 0 6px;
}
.bubbles { display: flex; flex-direction: column; gap: 9px; padding: 16px; }
.bubble { max-width: 82%; padding: 10px 13px; border-radius: 15px; font-size: .89rem; }
.bubble.in  { align-self: flex-start; background: var(--bg-2); color: var(--ink); border-bottom-left-radius: 5px; }
.bubble.out { align-self: flex-end; background: var(--primary-600); color: #fff; border-bottom-right-radius: 5px; }
.bubble .when { display: block; font-size: .68rem; margin-top: 4px; opacity: .7; }
.composer {
  display: flex; gap: 9px; padding: 12px 16px;
  border-top: 1px solid var(--line); background: var(--surface);
  position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
.composer input { flex: 1; }

/* ---------------------------------------------------------------
   Filters / segmented
   --------------------------------------------------------------- */
.segmented {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented a, .segmented button {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.segmented .on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------------------------------------------------------
   Tables (admin)
   --------------------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 620px; }
table.data th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 700; padding: 11px 14px;
  border-bottom: 1px solid var(--line); background: var(--bg-2); white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }

/* ---------------------------------------------------------------
   Modal / toast
   --------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(15,23,42,.55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.modal-card {
  background: var(--surface); width: 100%; max-width: 520px;
  border-radius: 20px 20px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  max-height: 92vh; overflow-y: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { font-size: 1.1rem; }
.toast-wrap {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 200; display: grid; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff; padding: 12px 15px; border-radius: 12px;
  font-size: .86rem; box-shadow: var(--shadow-lg); animation: toastIn .22s ease;
}
.toast.ok  { background: #065F46; }
.toast.err { background: #991B1B; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------
   Alerts / empty
   --------------------------------------------------------------- */
.alert { padding: 13px 15px; border-radius: 12px; font-size: .87rem; margin-bottom: 14px; }
.alert-info { background: var(--primary-50); color: var(--primary); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-err  { background: var(--danger-soft); color: var(--danger); }
.alert-ok   { background: var(--ok-soft); color: var(--ok); }

.empty { text-align: center; padding: 40px 18px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: .45; }
.empty p { font-size: .88rem; }

/* ---------------------------------------------------------------
   Auth pages
   --------------------------------------------------------------- */
.auth-shell {
  min-height: calc(100vh - var(--nav-h));
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, var(--navy) 0%, var(--primary) 42%, var(--primary-600) 76%, var(--accent) 100%);
  padding-top: env(safe-area-inset-top, 0px);
}
.auth-top { padding: 30px 20px 22px; color: #fff; text-align: center; }
.auth-top .brand-mark { margin: 0 auto 14px; width: 56px; height: 56px; flex-basis: 56px; border-radius: 16px; }
.auth-top .brand-mark svg { width: 30px; height: 30px; }
.auth-top h1 { color: #fff; font-size: 1.45rem; }
.auth-top p { color: rgba(255,255,255,.82); font-size: .88rem; margin-top: 7px; }
.auth-card {
  flex: 1; background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 24px 20px calc(28px + env(safe-area-inset-bottom, 0px));
}
.auth-switch { text-align: center; font-size: .86rem; color: var(--muted); margin-top: 18px; }
.auth-switch a { font-weight: 650; }

/* ---------------------------------------------------------------
   Public landing sections
   --------------------------------------------------------------- */
.feature-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.feature .fi {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary-600); margin-bottom: 12px;
}
.feature .fi svg { width: 20px; height: 20px; }
.feature h3 { font-size: .98rem; margin-bottom: 5px; }
.feature p { font-size: .85rem; color: var(--muted); margin: 0; }

.testimonial {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.testimonial p { font-size: .89rem; color: var(--ink-2); font-style: italic; }
.testimonial .who { display: flex; align-items: center; gap: 10px; margin-top: 13px; }
.testimonial .who strong { font-size: .86rem; display: block; }
.testimonial .who span { font-size: .76rem; color: var(--muted); }

.band {
  background: linear-gradient(140deg, var(--navy), var(--primary) 70%, var(--primary-600));
  color: #fff; border-radius: var(--radius-lg); padding: 26px 20px;
}
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.85); font-size: .9rem; }

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,.72);
  padding: 30px 0 26px; margin-top: 34px; font-size: .85rem;
}
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: 10px; }
.site-footer a { color: rgba(255,255,255,.82); display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.16); margin-top: 22px; padding-top: 16px;
  font-size: .78rem; color: rgba(255,255,255,.55);
}

/* ---------------------------------------------------------------
   Install app
   --------------------------------------------------------------- */
.install-cta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px dashed var(--primary-400);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
}
.install-cta .ic {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px;
  background: var(--primary-50); color: var(--primary-600); display: grid; place-items: center;
}
.install-cta .ic svg { width: 22px; height: 22px; }
.install-cta .txt { flex: 1; min-width: 190px; }
.install-cta .txt strong { display: block; font-size: .94rem; color: var(--navy); }
.install-cta .txt span { font-size: .81rem; color: var(--muted); }
.store-icons { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.store-icons svg { width: 22px; height: 22px; color: var(--ink-2); }

/* ---------------------------------------------------------------
   Admin
   --------------------------------------------------------------- */
.admin-shell { background: var(--bg); }
.admin-topbar {
  background: linear-gradient(135deg, #0B142F, var(--navy) 55%, var(--primary-600));
  color: #fff; position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
}
.admin-topbar .topbar-inner { min-height: 58px; }
.admin-mark { background: rgba(56,189,248,.22) !important; border-color: rgba(56,189,248,.5) !important; color: var(--accent); }
.admin-tag {
  font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(56,189,248,.22); color: #BAE6FD; border: 1px solid rgba(56,189,248,.45);
  padding: 3px 8px; border-radius: 999px; font-weight: 700;
}
.admin-view { display: none; }
.admin-view.on { display: block; }

.chart-box { position: relative; height: 260px; width: 100%; }

.gate-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 18px;
  background: linear-gradient(160deg, #0B142F, var(--navy) 45%, var(--primary) 80%, var(--primary-600));
}
.gate-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 26px 22px; width: 100%; max-width: 430px; box-shadow: var(--shadow-lg);
}
.gate-card .brand-mark { margin: 0 auto 16px; width: 52px; height: 52px; flex-basis: 52px; border-radius: 15px; background: var(--navy) !important; border: none !important; }
.gate-card .brand-mark svg { width: 27px; height: 27px; color: #fff; }
.gate-card h1 { font-size: 1.25rem; text-align: center; }
.gate-card .sub { text-align: center; color: var(--muted); font-size: .86rem; margin: 7px 0 20px; }

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .stats  { grid-template-columns: repeat(4, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: repeat(2, 1fr); }
  .form-row .full { grid-column: 1 / -1; }
  .hero h1 { font-size: 2.3rem; }
  h1 { font-size: 1.9rem; }
  .auth-card { border-radius: 24px; margin: 0 20px 30px; }
  .auth-shell { justify-content: center; }
  .auth-top { padding-top: 46px; }
  .modal { align-items: center; padding: 20px; }
  .modal-card { border-radius: var(--radius-lg); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
  body { padding-bottom: calc(var(--nav-h) + 34px); }

  .bottomnav {
    left: 50%; right: auto; transform: translateX(-50%);
    bottom: 18px; width: auto; max-width: 720px;
    border: 1px solid var(--line); border-radius: 999px;
    box-shadow: var(--shadow-lg);
    padding: 6px 8px env(safe-area-inset-bottom, 0px);
  }
  .bottomnav a { flex: 0 0 auto; flex-direction: row; gap: 8px; font-size: .85rem; padding: 9px 15px; border-radius: 999px; }
  .bottomnav a.active::before { display: none; }
  .bottomnav a.active { background: var(--primary-50); }
  .bottomnav a svg { width: 19px; height: 19px; }

  .listing-grid { display: grid; gap: 16px; }
  .listing-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

  .toast-wrap { left: auto; right: 20px; width: 340px; bottom: 96px; }
  .composer { bottom: 0; }
}

