:root {
  --bg: #f4f6f8;
  --surface: rgba(255,255,255,.94);
  --surface-solid: #fff;
  --surface-soft: #eef2f5;
  --text: #101827;
  --muted: #687386;
  --line: rgba(15,23,42,.10);
  --primary: #715cff;
  --primary-dark: #5743e4;
  --secondary: #1bc7b1;
  --navy: #0f172a;
  --navy-2: #17233c;
  --success: #15845f;
  --warning: #d68b16;
  --danger: #d84646;
  --shadow: 0 18px 50px rgba(15,23,42,.10);
  --shadow-sm: 0 8px 24px rgba(15,23,42,.07);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 5% -10%, rgba(27,199,177,.12), transparent 32rem),
    radial-gradient(circle at 95% 0%, rgba(113,92,255,.12), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

.app-loader {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 32px;
}
.loader-card { text-align: center; color: var(--muted); }
.loader-mark { width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 22px; background: var(--navy); color: white; display: grid; place-items: center; font-size: 28px; animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-4px) scale(1.03); box-shadow: 0 18px 35px rgba(15,23,42,.18); } }

/* Auth */
.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(420px,.92fr); }
.auth-visual { position: relative; padding: clamp(36px,6vw,82px); background: var(--navy); color: white; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.auth-visual::before,.auth-visual::after { content:""; position:absolute; border-radius:50%; filter: blur(2px); }
.auth-visual::before { width: 560px; height: 560px; right: -220px; top: -200px; background: linear-gradient(145deg,rgba(27,199,177,.55),rgba(27,199,177,.05)); }
.auth-visual::after { width: 420px; height: 420px; left: -180px; bottom: -190px; background: linear-gradient(145deg,rgba(113,92,255,.52),rgba(113,92,255,.05)); }
.brand-lockup { position:relative; z-index:2; display:flex; align-items:center; gap:13px; font-weight:900; font-size:22px; letter-spacing:-.04em; }
.brand-mark { width:48px; height:48px; border-radius:17px; background:linear-gradient(145deg,var(--primary),#2dd7c0); display:grid; place-items:center; box-shadow:0 14px 34px rgba(113,92,255,.32); }
.brand-mark svg { width:27px; height:27px; }
.auth-copy { position:relative; z-index:2; max-width:680px; padding:70px 0; }
.auth-copy h1 { font-size:clamp(48px,6.6vw,92px); line-height:.92; letter-spacing:-.075em; margin:0 0 26px; }
.auth-copy p { margin:0; max-width:560px; color:rgba(255,255,255,.70); font-size:clamp(16px,1.5vw,20px); line-height:1.6; }
.feature-strip { position:relative; z-index:2; display:flex; flex-wrap:wrap; gap:10px; }
.feature-chip { padding:10px 13px; border-radius:999px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.10); color:rgba(255,255,255,.82); font-size:12px; font-weight:750; }
.auth-panel { min-height:100%; padding:calc(30px + var(--safe-top)) clamp(24px,5vw,76px) calc(32px + var(--safe-bottom)); display:grid; place-items:center; }
.auth-card { width:min(100%,490px); }
.mobile-brand { display:none; margin-bottom:30px; }
.auth-card h2 { font-size:38px; letter-spacing:-.055em; margin:0 0 10px; }
.auth-card > p { color:var(--muted); margin:0 0 28px; line-height:1.55; }
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; background:#e9edf1; border-radius:15px; padding:4px; margin-bottom:20px; }
.auth-tab { height:43px; border-radius:12px; background:transparent; color:var(--muted); font-weight:800; }
.auth-tab.active { background:white; color:var(--text); box-shadow:0 3px 10px rgba(15,23,42,.08); }
.form-stack { display:grid; gap:14px; }
.field { display:grid; gap:7px; }
.field label { font-size:12px; font-weight:850; color:#455166; }
.field input,.field select,.field textarea { width:100%; border:1px solid var(--line); outline:none; border-radius:15px; background:var(--surface-solid); min-height:52px; padding:0 15px; color:var(--text); transition:.18s border,.18s box-shadow; }
.field textarea { min-height:105px; padding-top:13px; resize:vertical; }
.field input:focus,.field select:focus,.field textarea:focus { border-color:rgba(27,199,177,.72); box-shadow:0 0 0 4px rgba(27,199,177,.11); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.password-wrap { position:relative; }
.password-wrap input { padding-right:48px; }
.password-toggle { position:absolute; right:8px; top:8px; width:36px; height:36px; border-radius:11px; background:var(--surface-soft); }
.btn { min-height:52px; white-space:nowrap; border-radius:15px; padding:0 18px; display:inline-flex; align-items:center; justify-content:center; gap:10px; font-weight:850; transition:.16s transform,.16s filter; }
.btn svg { width:18px; height:18px; flex:none; }
.btn:hover { filter:brightness(.985); }
.btn:active { transform:scale(.985); }
.btn-primary { background:var(--navy); color:white; box-shadow:0 12px 24px rgba(15,23,42,.15); }
.btn-accent { background:var(--primary); color:white; box-shadow:0 12px 24px rgba(113,92,255,.20); }
.btn-soft { background:var(--surface-soft); color:var(--text); }
.btn-white { background:white; color:var(--text); border:1px solid var(--line); }
.btn-danger { background:#fff0f0; color:var(--danger); }
.btn-sm { min-height:40px; padding:0 13px; border-radius:12px; font-size:12px; }
.btn-block { width:100%; }
.google-btn svg { width:20px; height:20px; }
.divider { display:flex; align-items:center; gap:12px; color:#9aa3b2; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; margin:4px 0; }
.divider::before,.divider::after { content:""; height:1px; background:var(--line); flex:1; }
.text-link { border:0; padding:0; background:transparent; color:#1d6f89; font-weight:800; font-size:13px; }
.demo-notice { margin-top:18px; padding:14px; border-radius:15px; background:#fff7df; border:1px solid #f2df9c; color:#795b10; font-size:12px; line-height:1.5; }

/* Main application */
.layout { min-height:100vh; min-height:100dvh; display:grid; grid-template-columns:250px minmax(0,1fr); }
.sidebar { position:sticky; top:0; height:100vh; height:100dvh; padding:calc(22px + var(--safe-top)) 16px calc(18px + var(--safe-bottom)); background:rgba(15,23,42,.97); color:white; display:flex; flex-direction:column; z-index:50; }
.sidebar .brand-lockup { font-size:20px; padding:0 8px 24px; }
.sidebar .brand-mark { width:42px; height:42px; border-radius:15px; }
.side-nav { display:grid; gap:6px; }
.side-link { min-height:48px; width:100%; border-radius:14px; padding:0 13px; background:transparent; color:rgba(255,255,255,.58); display:flex; align-items:center; gap:12px; text-align:left; font-weight:750; }
.side-link svg { width:20px; height:20px; flex:none; }
.side-link.active,.side-link:hover { color:white; background:rgba(255,255,255,.09); }
.side-spacer { flex:1; }
.user-mini { display:flex; align-items:center; gap:10px; padding:12px 8px 0; border-top:1px solid rgba(255,255,255,.10); }
.avatar { width:40px; height:40px; flex:none; border-radius:14px; background:linear-gradient(145deg,var(--secondary),#57d9ca); color:white; display:grid; place-items:center; font-weight:900; overflow:hidden; }
.avatar img { width:100%; height:100%; object-fit:cover; }
.user-mini strong { display:block; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:130px; }
.user-mini span { display:block; font-size:10px; color:rgba(255,255,255,.48); margin-top:2px; }
.main { min-width:0; padding:calc(28px + var(--safe-top)) clamp(22px,4vw,58px) calc(52px + var(--safe-bottom)); }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:28px; }
.page-heading small { color:var(--muted); font-weight:800; font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.page-heading h1 { margin:5px 0 0; font-size:clamp(31px,4vw,48px); line-height:1; letter-spacing:-.06em; }
.top-actions { display:flex; align-items:center; gap:9px; }
.icon-button { width:47px; height:47px; border-radius:15px; background:var(--surface); border:1px solid var(--line); display:grid; place-items:center; color:var(--text); box-shadow:0 5px 18px rgba(15,23,42,.04); }
.icon-button svg { width:20px; height:20px; }
.mobile-menu { display:none; }

.content { max-width:1420px; margin:0 auto; }
.stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:24px; }
.stat-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg); padding:19px; box-shadow:var(--shadow-sm); }
.stat-top { display:flex; align-items:center; justify-content:space-between; }
.stat-icon { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; background:#e9f8f5; color:#087f72; }
.stat-icon svg { width:20px; height:20px; }
.stat-card strong { display:block; font-size:27px; letter-spacing:-.04em; margin-top:17px; }
.stat-card span { color:var(--muted); font-size:12px; font-weight:700; }

.section-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin:28px 0 14px; }
.section-head h2 { margin:0; font-size:22px; letter-spacing:-.04em; }
.section-head p { margin:4px 0 0; color:var(--muted); font-size:13px; }
.filter-row { display:flex; gap:8px; overflow:auto; scrollbar-width:none; padding-bottom:3px; }
.filter-row::-webkit-scrollbar { display:none; }
.filter-chip { min-height:38px; padding:0 14px; border-radius:999px; background:var(--surface); color:var(--muted); border:1px solid var(--line); white-space:nowrap; font-size:12px; font-weight:820; }
.filter-chip.active { background:var(--navy); color:white; border-color:var(--navy); }

.trip-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.trip-card { min-height:320px; position:relative; border-radius:28px; overflow:hidden; color:white; box-shadow:var(--shadow); cursor:pointer; isolation:isolate; background:#27364f; }
.trip-card::after { content:""; position:absolute; inset:0; background:linear-gradient(to top,rgba(7,12,25,.88) 0%,rgba(7,12,25,.22) 58%,rgba(7,12,25,.08) 100%); z-index:-1; }
.trip-cover { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; transition:.35s transform; }
.trip-card:hover .trip-cover { transform:scale(1.035); }
.trip-card-body { height:100%; min-height:320px; padding:20px; display:flex; flex-direction:column; }
.trip-card-top { display:flex; justify-content:space-between; gap:10px; }
.trip-state { min-height:31px; padding:0 11px; border-radius:999px; display:inline-flex; align-items:center; background:rgba(255,255,255,.15); backdrop-filter:blur(12px); font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.trip-emoji { width:42px; height:42px; border-radius:14px; background:rgba(255,255,255,.17); backdrop-filter:blur(12px); display:grid; place-items:center; font-size:21px; }
.trip-card-content { margin-top:auto; }
.trip-card h3 { margin:0 0 7px; font-size:27px; letter-spacing:-.055em; line-height:1.02; }
.trip-card p { margin:0; color:rgba(255,255,255,.72); font-size:12px; }
.trip-progress { height:5px; border-radius:999px; background:rgba(255,255,255,.18); margin:16px 0 9px; overflow:hidden; }
.trip-progress > i { display:block; height:100%; border-radius:inherit; background:white; }
.trip-card-foot { display:flex; align-items:center; justify-content:space-between; color:rgba(255,255,255,.78); font-size:11px; font-weight:750; }
.avatar-stack { display:flex; }
.avatar-stack .avatar { width:29px; height:29px; border-radius:10px; border:2px solid rgba(15,23,42,.6); margin-left:-7px; font-size:10px; }
.avatar-stack .avatar:first-child { margin-left:0; }
.new-trip-card { min-height:320px; border-radius:28px; border:2px dashed rgba(15,23,42,.14); background:rgba(255,255,255,.55); display:grid; place-items:center; text-align:center; padding:28px; color:var(--muted); }
.new-trip-card:hover { border-color:rgba(27,199,177,.5); background:white; }
.new-trip-icon { width:65px; height:65px; border-radius:22px; display:grid; place-items:center; margin:0 auto 14px; background:#e9f8f5; color:#087f72; }
.new-trip-icon svg { width:28px; height:28px; }
.new-trip-card strong { display:block; color:var(--text); font-size:17px; }
.new-trip-card span { display:block; font-size:12px; margin-top:6px; line-height:1.5; }

.empty-state { min-height:340px; border:1px dashed rgba(15,23,42,.16); border-radius:28px; background:rgba(255,255,255,.55); display:grid; place-items:center; padding:36px; text-align:center; }
.empty-state .empty-icon { width:74px; height:74px; border-radius:24px; background:#e9f8f5; color:#087f72; display:grid; place-items:center; margin:0 auto 17px; }
.empty-state .empty-icon svg { width:32px; height:32px; }
.empty-state h3 { margin:0 0 8px; font-size:23px; letter-spacing:-.04em; }
.empty-state p { margin:0 auto 20px; max-width:450px; color:var(--muted); line-height:1.55; font-size:13px; }

/* Trip dashboard */
.trip-hero { position:relative; min-height:330px; color:white; border-radius:32px; overflow:hidden; padding:26px; display:flex; flex-direction:column; isolation:isolate; box-shadow:var(--shadow); }
.trip-hero::after { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(100deg,rgba(7,12,25,.88),rgba(7,12,25,.35) 72%,rgba(7,12,25,.10)); }
.trip-hero-cover { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; }
.trip-hero-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.breadcrumb { display:flex; align-items:center; gap:8px; font-size:12px; color:rgba(255,255,255,.72); font-weight:750; }
.hero-action { background:rgba(255,255,255,.14); color:white; border:1px solid rgba(255,255,255,.15); backdrop-filter:blur(12px); }
.trip-hero-content { margin-top:auto; max-width:760px; }
.trip-hero h1 { margin:0 0 10px; font-size:clamp(40px,6vw,72px); letter-spacing:-.07em; line-height:.94; }
.trip-hero p { margin:0; color:rgba(255,255,255,.72); line-height:1.5; max-width:660px; }
.trip-meta { display:flex; flex-wrap:wrap; gap:9px; margin-top:20px; }
.meta-pill { min-height:37px; padding:0 13px; border-radius:999px; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.10); display:inline-flex; align-items:center; gap:7px; font-size:11px; font-weight:820; backdrop-filter:blur(10px); }
.meta-pill svg { width:16px; height:16px; }
.module-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; }
.module-card { min-height:172px; padding:18px; background:var(--surface); border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; text-align:left; }
.module-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.module-icon { width:47px; height:47px; border-radius:16px; display:grid; place-items:center; }
.module-icon svg { width:23px; height:23px; }
.module-card h3 { margin:16px 0 4px; font-size:17px; letter-spacing:-.035em; }
.module-card p { margin:0; color:var(--muted); font-size:11px; line-height:1.45; }
.module-foot { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:13px; color:var(--muted); font-size:11px; font-weight:830; }
.module-card:nth-child(5n+1) .module-icon { background:#ffecec; color:#d74343; }
.module-card:nth-child(5n+2) .module-icon { background:#e9f8f5; color:#0d8175; }
.module-card:nth-child(5n+3) .module-icon { background:#edf0fb; color:#5569b7; }
.module-card:nth-child(5n+4) .module-icon { background:#fff3dc; color:#b57a13; }
.module-card:nth-child(5n) .module-icon { background:#f3eafa; color:#8053a2; }

/* Module lists */
.module-toolbar { display:flex; gap:10px; align-items:center; margin-bottom:15px; }
.search-box { min-height:49px; flex:1; background:var(--surface); border:1px solid var(--line); border-radius:15px; padding:0 14px; display:flex; align-items:center; gap:9px; }
.search-box svg { width:18px; height:18px; color:var(--muted); }
.search-box input { flex:1; min-width:0; border:0; outline:0; background:transparent; }
.card-list { display:grid; gap:11px; }
.item-card { background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:15px; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:13px; align-items:center; box-shadow:0 5px 18px rgba(15,23,42,.035); }
.item-card.clickable { cursor:pointer; }
.item-check { width:43px; height:43px; border-radius:14px; border:1.5px solid rgba(15,23,42,.15); background:white; display:grid; place-items:center; color:white; }
.item-check.done { background:var(--success); border-color:var(--success); }
.item-main { min-width:0; }
.item-title { font-size:15px; font-weight:850; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.item-card.completed .item-title { text-decoration:line-through; color:var(--muted); }
.item-sub { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.tag { min-height:24px; padding:0 8px; border-radius:999px; display:inline-flex; align-items:center; background:var(--surface-soft); color:#667083; font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.04em; }
.tag.accent { background:#ffe9e9; color:#c84242; }
.tag.success { background:#e4f3ed; color:#18785a; }
.item-menu { width:39px; height:39px; border-radius:12px; background:var(--surface-soft); display:grid; place-items:center; color:var(--muted); }
.item-menu svg { width:18px; height:18px; }

.city-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.city-card { min-height:220px; border-radius:25px; overflow:hidden; color:white; position:relative; padding:18px; display:flex; flex-direction:column; isolation:isolate; cursor:pointer; background:#394968; }
.city-card::after { content:""; position:absolute; inset:0; background:linear-gradient(to top,rgba(7,12,25,.88),rgba(7,12,25,.12)); z-index:-1; }
.city-card img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; }
.city-card h3 { margin:auto 0 4px; font-size:25px; letter-spacing:-.05em; }
.city-card p { margin:0; font-size:11px; color:rgba(255,255,255,.72); }
.city-card .city-count { align-self:flex-start; background:rgba(255,255,255,.15); backdrop-filter:blur(10px); padding:8px 10px; border-radius:999px; font-size:10px; font-weight:850; }

.photo-grid { columns:4 220px; column-gap:11px; }
.photo-card { break-inside:avoid; margin-bottom:11px; position:relative; border-radius:19px; overflow:hidden; background:#dfe4e8; cursor:pointer; }
.photo-card img { width:100%; height:auto; }
.photo-overlay { position:absolute; inset:auto 0 0; padding:42px 12px 11px; background:linear-gradient(transparent,rgba(7,12,25,.78)); color:white; font-size:11px; }

.expense-summary { display:grid; grid-template-columns:1.3fr .7fr; gap:14px; margin-bottom:16px; }
.balance-panel,.total-panel { border-radius:25px; padding:21px; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-sm); }
.total-panel { color:white; background:linear-gradient(145deg,var(--navy),#263856); border:0; }
.total-panel small { color:rgba(255,255,255,.58); font-weight:800; }
.total-panel strong { display:block; font-size:34px; margin:10px 0 4px; letter-spacing:-.05em; }
.total-panel span { color:rgba(255,255,255,.65); font-size:11px; }
.balance-list { display:grid; gap:9px; margin-top:13px; }
.balance-row { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; }
.balance-row b.positive { color:var(--success); }
.balance-row b.negative { color:var(--danger); }

.currency-card { max-width:720px; margin:0 auto; border-radius:30px; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow); padding:25px; }
.currency-fields { display:grid; grid-template-columns:1fr auto 1fr; gap:14px; align-items:end; }
.swap-btn { width:48px; height:48px; border-radius:16px; background:var(--navy); color:white; display:grid; place-items:center; margin-bottom:1px; }
.rate-info { margin-top:17px; padding-top:16px; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:11px; }

/* People / Admin */
.people-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.person-card { background:var(--surface); border:1px solid var(--line); border-radius:22px; padding:17px; display:flex; align-items:center; gap:12px; }
.person-card .avatar { width:50px; height:50px; border-radius:17px; }
.person-card strong { display:block; font-size:14px; }
.person-card span { color:var(--muted); font-size:11px; }
.role-select { margin-left:auto; min-height:38px; border-radius:11px; border:1px solid var(--line); background:white; padding:0 8px; font-size:11px; font-weight:750; }
.admin-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.data-table { width:100%; border-collapse:collapse; background:var(--surface); border-radius:20px; overflow:hidden; box-shadow:var(--shadow-sm); }
.data-table th,.data-table td { padding:12px 14px; border-bottom:1px solid var(--line); text-align:left; font-size:12px; }
.data-table th { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; }

/* Modal */
.modal-backdrop { position:fixed; inset:0; z-index:100; background:rgba(7,12,25,.52); backdrop-filter:blur(5px); display:flex; align-items:flex-end; justify-content:center; padding:20px; animation:fadeIn .16s ease; }
.modal { width:min(100%,660px); max-height:min(90vh,850px); overflow:auto; background:#f8fafb; border-radius:28px; padding:22px; box-shadow:0 30px 80px rgba(7,12,25,.32); animation:slideUp .2s ease; }
.modal.wide { width:min(100%,900px); }
.modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:20px; }
.modal-head h2 { margin:0; font-size:25px; letter-spacing:-.045em; }
.modal-head p { margin:5px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.close-modal { width:42px; height:42px; border-radius:14px; background:var(--surface-soft); display:grid; place-items:center; }
.modal-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:20px; }
.wizard-steps { display:flex; gap:8px; margin-bottom:18px; }
.wizard-step { height:5px; border-radius:999px; flex:1; background:#dde3e8; }
.wizard-step.active { background:var(--secondary); }
.color-options { display:flex; flex-wrap:wrap; gap:10px; }
.color-dot { width:38px; height:38px; border-radius:13px; border:3px solid transparent; box-shadow:inset 0 0 0 1px rgba(0,0,0,.06); }
.color-dot.active { border-color:white; outline:2px solid var(--navy); }
.emoji-options { display:flex; flex-wrap:wrap; gap:8px; }
.emoji-option { width:43px; height:43px; border-radius:13px; background:white; border:1px solid var(--line); font-size:20px; }
.emoji-option.active { background:var(--navy); }
.member-checks { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.member-check { display:flex; gap:9px; align-items:center; min-height:43px; border-radius:13px; padding:0 11px; background:white; border:1px solid var(--line); font-size:12px; font-weight:750; }

.toast-root { position:fixed; z-index:200; right:18px; bottom:18px; display:grid; gap:9px; pointer-events:none; }
.toast { min-width:250px; max-width:390px; padding:14px 16px; border-radius:15px; background:var(--navy); color:white; box-shadow:0 18px 45px rgba(7,12,25,.24); font-size:12px; font-weight:700; animation:toastIn .2s ease; }
.toast.error { background:#9e3232; }
.toast.success { background:#136c52; }
@keyframes toastIn { from { transform:translateY(10px); opacity:0; } }
@keyframes fadeIn { from { opacity:0; } }
@keyframes slideUp { from { transform:translateY(20px); opacity:.5; } }

.banner { display:flex; align-items:center; justify-content:space-between; gap:13px; padding:15px 17px; border-radius:18px; margin-bottom:18px; background:#fff7dc; border:1px solid #efd88f; color:#725910; }
.banner strong { display:block; font-size:13px; }
.banner span { display:block; font-size:11px; margin-top:3px; line-height:1.45; }
.offline-pill { position:fixed; z-index:80; left:50%; transform:translateX(-50%); bottom:calc(18px + var(--safe-bottom)); padding:10px 14px; border-radius:999px; background:#7a3d12; color:white; font-size:11px; font-weight:800; box-shadow:var(--shadow); }

.mobile-bottom { display:none; }

@media (max-width:1180px) {
  .trip-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .module-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .people-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .auth-shell { grid-template-columns:1fr; }
  .auth-visual { display:none; }
  .auth-panel { padding-top:calc(24px + var(--safe-top)); }
  .mobile-brand { display:flex; }
  .layout { display:block; }
  .sidebar { position:fixed; inset:0 auto 0 0; width:270px; transform:translateX(-105%); transition:.22s transform; box-shadow:25px 0 60px rgba(7,12,25,.28); }
  .sidebar.open { transform:translateX(0); }
  .mobile-menu { display:grid; }
  .main { padding-left:18px; padding-right:18px; padding-bottom:calc(100px + var(--safe-bottom)); }
  .module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .city-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .expense-summary { grid-template-columns:1fr; }
  .admin-grid { grid-template-columns:1fr; }
  .mobile-bottom { position:fixed; display:grid; grid-template-columns:repeat(4,1fr); z-index:45; left:12px; right:12px; bottom:calc(10px + var(--safe-bottom)); min-height:68px; border-radius:22px; padding:6px; background:rgba(255,255,255,.92); border:1px solid rgba(15,23,42,.10); backdrop-filter:blur(16px); box-shadow:0 18px 42px rgba(15,23,42,.14); }
  .mobile-nav-btn { border-radius:17px; background:transparent; color:var(--muted); display:grid; place-items:center; gap:2px; font-size:9px; font-weight:800; }
  .mobile-nav-btn svg { width:21px; height:21px; }
  .mobile-nav-btn.active { background:var(--navy); color:white; }
}
@media (max-width:620px) {
  .auth-card h2 { font-size:32px; }
  .form-row { grid-template-columns:1fr; }
  .topbar { align-items:flex-start; }
  .page-heading h1 { font-size:34px; }
  .top-actions .desktop-label { display:none; }
  .stats-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .stat-card { padding:15px; }
  .stat-card strong { font-size:23px; }
  .trip-grid { grid-template-columns:1fr; }
  .trip-card,.new-trip-card { min-height:290px; }
  .trip-card-body { min-height:290px; }
  .trip-hero { min-height:380px; padding:20px; border-radius:27px; }
  .trip-hero h1 { font-size:43px; }
  .module-grid { gap:10px; }
  .module-card { min-height:158px; padding:15px; border-radius:21px; }
  .module-card h3 { font-size:15px; }
  .city-grid { grid-template-columns:1fr; }
  .people-grid { grid-template-columns:1fr; }
  .photo-grid { columns:2 140px; }
  .currency-fields { grid-template-columns:1fr; }
  .swap-btn { margin:0 auto; transform:rotate(90deg); }
  .member-checks { grid-template-columns:1fr; }
  .modal-backdrop { padding:0; }
  .modal { width:100%; max-height:93vh; border-radius:28px 28px 0 0; padding:20px; }
  .toast-root { left:14px; right:14px; bottom:calc(92px + var(--safe-bottom)); }
  .toast { min-width:0; max-width:none; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; scroll-behavior:auto!important; transition-duration:.01ms!important; } }

/* WayGather identity refinements */
.brand-mark { position:relative; isolation:isolate; }
.brand-mark::after { content:""; position:absolute; inset:1px; border-radius:inherit; border:1px solid rgba(255,255,255,.24); pointer-events:none; }
.auth-visual { background:linear-gradient(155deg,#090e1d 0%,#111a33 55%,#151d36 100%); }
.auth-visual::before { background:linear-gradient(145deg,rgba(27,199,177,.58),rgba(27,199,177,.02)); }
.auth-visual::after { background:linear-gradient(145deg,rgba(113,92,255,.56),rgba(113,92,255,.02)); }
.trip-card,.trip-hero { transform:translateZ(0); }
@media (prefers-reduced-motion:no-preference) {
  .brand-mark { animation:wayGatherFloat 5s ease-in-out infinite; }
  .module-card,.trip-card,.new-trip-card { transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease; }
  @keyframes wayGatherFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-2px)} }
}
.activity-list{display:grid;gap:9px;max-height:min(56vh,520px);overflow:auto;padding-right:4px}.activity-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:11px;padding:12px;border-radius:15px;background:var(--surface-soft)}.activity-dot{width:10px;height:10px;border-radius:50%;background:linear-gradient(145deg,var(--primary),var(--secondary));box-shadow:0 0 0 5px rgba(113,92,255,.09)}.activity-row strong{display:block;font-size:13px}.activity-row span{display:block;color:var(--muted);font-size:10px;margin-top:3px}.activity-row time{color:var(--muted);font-size:10px;white-space:nowrap}.empty-inline{padding:28px;border:1px dashed var(--line);border-radius:18px;text-align:center}.empty-inline strong,.empty-inline span{display:block}.empty-inline span{color:var(--muted);font-size:12px;margin-top:6px}
