:root{
  --bg-1: #060A18;
  --bg-2: #0A1130;
  --bg-3: #121B42;

  --blue: #3B82F6;
  --violet: #8B5CF6;
  --cyan: #22D3EE;
  --amber: #F5A93D;
  --danger: #F2565C;
  --success: #34D399;

  --grad-primary: linear-gradient(135deg, #3B82F6 0%, #6D5DF6 55%, #8B5CF6 100%);
  --grad-text: linear-gradient(135deg, #7DD3FC, #A78BFA);

  --glass-bg: rgba(255,255,255,0.055);
  --glass-bg-strong: rgba(255,255,255,0.09);
  --glass-border: rgba(255,255,255,0.10);
  --glass-shadow: 0 10px 40px rgba(2,6,23,0.45);

  --text: #F3F5FA;
  --text-dim: #93A0C2;
  --text-faint: #5C6790;

  --font-ui: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --radius: 20px;
  --radius-sm: 13px;
}

*{ box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html,body{ height:100%; }
body{
  margin:0;
  background: linear-gradient(165deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Ambient glow (signature element) ---------- */
.bg-glow{
  position: fixed; inset:0; z-index:-1; pointer-events:none; overflow:hidden;
}
.bg-glow::before, .bg-glow::after{
  content:""; position:absolute; border-radius:50%; filter: blur(90px);
}
.bg-glow::before{
  width: 420px; height: 420px; top:-140px; right:-120px;
  background: radial-gradient(circle, rgba(59,130,246,0.38), transparent 70%);
}
.bg-glow::after{
  width: 460px; height: 460px; bottom:-10%; left:-160px;
  background: radial-gradient(circle, rgba(139,92,246,0.30), transparent 70%);
}

.app{ max-width: 480px; margin: 0 auto; position: relative; min-height: 100vh; }

/* ---------- Splash screen (shown every time the app opens) ---------- */
.splash{
  position: fixed; inset:0; z-index: 200;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(165deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%);
  transition: opacity .45s ease, visibility .45s ease;
}
.splash.hide{ opacity:0; visibility:hidden; pointer-events:none; }
.splash-inner{ text-align:center; padding: 24px; animation: splash-rise .5s ease; }
.splash-mark{
  width:84px; height:84px; border-radius:22px; object-fit:cover; object-position:center top;
  box-shadow: 0 14px 40px rgba(99,102,241,0.5);
  border: 2px solid rgba(255,255,255,0.18);
  margin-bottom: 18px;
}
.splash-name{
  font-size: 26px; font-weight: 800; letter-spacing:.2px;
  background: var(--grad-text); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.splash-tagline{ margin-top:6px; color: var(--text-dim); font-size: 13px; letter-spacing:.3px; }
.splash-dev{ margin-top: 22px; color: var(--text-faint); font-size: 12px; }
.splash-dev strong{ color: var(--text-dim); font-weight:600; }
.splash-loader{ display:flex; gap:6px; justify-content:center; margin-top:22px; }
.splash-loader span{
  width:7px; height:7px; border-radius:50%; background: var(--blue);
  animation: splash-bounce 1s infinite ease-in-out;
}
.splash-loader span:nth-child(2){ animation-delay:.15s; background: var(--violet); }
.splash-loader span:nth-child(3){ animation-delay:.3s; background: var(--cyan); }
@keyframes splash-bounce{ 0%,80%,100%{ transform: scale(0.6); opacity:.5; } 40%{ transform: scale(1); opacity:1; } }
@keyframes splash-rise{ from{ opacity:0; transform: translateY(10px); } to{ opacity:1; transform:none; } }

/* ---------- Topbar ---------- */
.topbar{
  position: sticky; top:0; z-index: 30;
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px 18px;
  background: rgba(8,12,28,0.55);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
}
.brand{ display:flex; align-items:center; gap:11px; }
.brand-mark{
  width:40px; height:40px; border-radius:12px;
  object-fit: cover; object-position: center top;
  box-shadow: 0 6px 18px rgba(99,102,241,0.45);
  border: 1.5px solid rgba(255,255,255,0.18);
  background: var(--grad-primary);
}
.brand-text{ display:flex; flex-direction:column; line-height:1.25; }
.brand-text strong{ font-size:16px; letter-spacing:.1px; font-weight:700; }
.brand-text span{ font-size:11.5px; color: var(--text-dim); }
.icon-round-btn{
  width:38px; height:38px; border-radius: 50%;
  background: var(--glass-bg-strong); border:1px solid var(--glass-border);
  color: var(--text-dim); display:flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.icon-round-btn svg{ width:18px; height:18px; }
.icon-round-btn:hover{ color: var(--text); border-color: rgba(139,92,246,0.5); }

/* ---------- Layout ---------- */
.main{ padding: 18px 16px 110px; display:flex; flex-direction:column; gap:18px; }
.section-title{
  font-size: 11.5px; letter-spacing: 1.4px; text-transform:uppercase;
  color: var(--text-dim); font-weight:600; margin: 0 0 10px 2px;
}
.section-title-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px;
}
.section-title-row .section-title{ margin:0; }
.card{
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--glass-shadow);
}
.grid{ display:grid; gap:12px; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 420px){
  .grid-3{ grid-template-columns: 1fr 1fr; }
}

/* ---------- Stat cards ---------- */
.stat{
  background: rgba(255,255,255,0.05);
  border:1px solid var(--glass-border); border-radius: var(--radius-sm);
  padding: 14px;
}
.stat .label{ font-size:10.5px; color: var(--text-dim); text-transform:uppercase; letter-spacing:.8px; }
.stat .value{
  font-family: var(--font-mono); font-weight:700; font-size: 19px; margin-top:7px;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.stat.accent .value{ color: var(--cyan); }
.stat.amber .value{ color: var(--amber); }
.stat.danger .value{ color: var(--danger); }

/* ---------- Liquid money hero ---------- */
.liquid-hero{
  text-align:center; position:relative; overflow:hidden;
  border: 1px solid rgba(139,92,246,0.35);
  background: linear-gradient(160deg, rgba(59,130,246,0.16), rgba(139,92,246,0.10));
}
.liquid-hero .label{
  font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim);
}
.liquid-hero .value{
  font-family: var(--font-mono); font-weight: 800; font-size: 38px;
  margin: 10px 0 4px;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip:text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.liquid-hero .hint{ margin:0; color: var(--text-faint); }

/* ---------- Cash Summary (foil-framed receipt) ---------- */
.receipt-frame{
  position: relative;
  padding: 3px 3px 0;
  border-radius: 19px 19px 0 0;
  background: linear-gradient(120deg, var(--blue), var(--violet) 55%, var(--cyan));
  box-shadow: 0 20px 50px rgba(59,130,246,0.28), 0 10px 30px rgba(139,92,246,0.22);
}
.receipt-frame::before{
  content:"";
  position:absolute; inset:-14px;
  background: linear-gradient(120deg, var(--blue), var(--violet) 55%, var(--cyan));
  filter: blur(28px); opacity:.45; z-index:-1;
  border-radius: 30px;
  animation: frame-glow 3.2s ease-in-out infinite;
}
@keyframes frame-glow{ 0%,100%{ opacity:.35; } 50%{ opacity:.6; } }

.receipt{
  position: relative;
  background: linear-gradient(180deg, #FBF9F3, #EDE7D8);
  color: #1B2233;
  border-radius: 16px 16px 0 0;
  padding: 22px 22px 0;
  font-family: var(--font-mono);
}
.receipt::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-12px; height:14px;
  background:
    linear-gradient(-45deg, #EDE7D8 8px, transparent 0),
    linear-gradient(45deg, #EDE7D8 8px, transparent 0);
  background-size: 16px 16px;
  background-repeat: repeat-x;
  background-position: bottom;
}
.receipt-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
  border-bottom: 1px dashed #1B223340; padding-bottom:12px; margin-bottom:4px;
}
.receipt-head .shop{ font-family: var(--font-ui); font-weight:800; letter-spacing:1.6px; text-transform:uppercase; font-size:14.5px; }
.receipt-head .date{ font-size:10.5px; opacity:.6; margin-top:4px; font-family: var(--font-mono); }
.live-badge{
  display:inline-flex; align-items:center; gap:6px; flex-shrink:0;
  font-family: var(--font-ui); font-size:9.5px; font-weight:800; letter-spacing:1.4px; text-transform:uppercase;
  color:#0C7A50; background: rgba(16,185,129,0.14); border:1px solid rgba(16,185,129,0.4);
  padding: 4px 10px 4px 7px; border-radius:999px; white-space:nowrap;
}
.live-dot{
  width:6px; height:6px; border-radius:50%; background:#10B981;
  box-shadow: 0 0 0 0 rgba(16,185,129,.6);
  animation: live-pulse 1.7s infinite;
}
@keyframes live-pulse{
  0%{ box-shadow:0 0 0 0 rgba(16,185,129,.55); }
  70%{ box-shadow:0 0 0 7px rgba(16,185,129,0); }
  100%{ box-shadow:0 0 0 0 rgba(16,185,129,0); }
}
.receipt-row{
  display:flex; align-items:center; justify-content:space-between; font-size:12.5px; padding:7px 0;
  border-bottom: 1px dotted #1B223322;
}
.receipt-row:last-of-type{ border-bottom:none; }
.receipt-row .k{ opacity:.72; display:flex; align-items:center; gap:8px; font-family: var(--font-ui); }
.receipt-row .k .dot{ width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.receipt-row .k .dot.dot-pos{ background: #0891B2; }
.receipt-row .k .dot.dot-inside{ background: #C2790F; }
.receipt-row .k .dot.dot-outside{ background: #7C3AED; }
.receipt-row .v{ font-weight:600; font-variant-numeric: tabular-nums; }
.receipt-total-ribbon{
  margin: 12px -22px 0;
  padding: 15px 22px 22px;
  background: var(--grad-primary);
  display:flex; align-items:baseline; justify-content:space-between;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}
.receipt-total-ribbon .tlabel{
  font-family: var(--font-ui); font-size:11px; font-weight:800; letter-spacing:1.8px;
  text-transform:uppercase; color: rgba(255,255,255,.85);
}
.receipt-total-ribbon .tvalue{
  font-family: var(--font-mono); font-size:20px; font-weight:800; color:#fff;
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce){
  .receipt-frame::before, .live-dot{ animation: none; }
}

/* ---------- Table ---------- */
.table-wrap{ overflow-x:auto; border:1px solid var(--glass-border); border-radius: var(--radius-sm); background: rgba(255,255,255,0.02); }
table{ width:100%; border-collapse: collapse; font-size: 13px; }
thead th{
  background: rgba(255,255,255,0.04); color: var(--text-dim);
  text-transform: uppercase; font-size: 10px; letter-spacing: .6px;
  padding: 10px 11px; text-align:left; border-bottom:1px solid var(--glass-border);
  white-space: nowrap;
}
tbody td{
  padding: 9px 11px; border-bottom: 1px solid rgba(255,255,255,0.05);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
tbody td.text{ font-family: var(--font-ui); }
tbody tr:last-child td{ border-bottom:none; }
tbody tr:hover{ background: rgba(255,255,255,.025); }
tfoot td{
  padding: 10px 11px; font-family: var(--font-mono); font-weight:700;
  background: rgba(255,255,255,0.04); border-top: 1px solid var(--glass-border);
}

/* ---------- Denomination sections ---------- */
.denom-section{ border-left: 3px solid var(--glass-border); }
.denom-section.tone-pos{ border-left-color: var(--cyan); }
.denom-section.tone-inside{ border-left-color: var(--amber); }
.denom-section.tone-outside{ border-left-color: var(--violet); }
.denom-section.tone-pos .section-title{ color: var(--cyan); }
.denom-section.tone-inside .section-title{ color: var(--amber); }
.denom-section.tone-outside .section-title{ color: #C4B5FD; }
.section-subtotal{
  font-family: var(--font-mono); font-weight:700; font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.denom-table th:first-child, .denom-table td:first-child{ width: 34%; }
.grand-total-card{ background: rgba(255,255,255,0.04); }
.grand-total-line{
  display:flex; justify-content:space-between; align-items:center;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--glass-border);
  font-family: var(--font-mono); font-weight:700; font-size: 19px;
  background: var(--grad-text); -webkit-background-clip:text; background-clip:text; color:transparent;
}

/* ---------- Fund source split rows (Expense / Deposit) ---------- */
.fund-source-row{ padding: 14px; }
.fund-source-row + .fund-source-row{ margin-top: 12px; }
.fund-source-head{ display:flex; align-items:flex-end; gap:10px; }
.fund-source-head .field{ flex:1; }
.fund-source-subtotal{ text-align:right; min-width: 92px; }
.fund-source-subtotal .label{ font-size:10px; color: var(--text-dim); text-transform:uppercase; letter-spacing:.6px; }
.fund-source-subtotal .value{ font-family: var(--font-mono); font-weight:700; font-size:15px; }
.mini-denom-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(76px,1fr));
  gap: 8px; margin-top: 12px;
}
.mini-denom-cell{
  display:flex; flex-direction:column; gap:4px;
  background: rgba(255,255,255,0.03); border:1px solid var(--glass-border);
  border-radius: 10px; padding: 6px 8px;
}
.mini-denom-cell .mini-denom-label{
  font-size: 10.5px; color: var(--text-dim); font-family: var(--font-mono); font-weight:600;
}
.mini-denom-cell input{ padding: 6px 7px; font-size: 12.5px; }
.fund-sources-total{
  display:flex; justify-content:space-between; align-items:center;
  margin-top: 4px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04); border:1px solid var(--glass-border);
}
.fund-sources-total .label{ font-size:11.5px; color: var(--text-dim); text-transform:uppercase; letter-spacing:.8px; }
.fund-sources-total .value{ font-family: var(--font-mono); font-weight:800; font-size:19px; }
.fund-sources-total .value.mismatch{ color: var(--danger); }
.add-source-row{ display:flex; }

/* ---------- Forms ---------- */
input, select, textarea{
  background: rgba(255,255,255,0.045); border:1px solid var(--glass-border); color: var(--text);
  border-radius: 11px; padding: 10px 12px; font-family: var(--font-ui); font-size: 13.5px;
  width:100%;
}
input:focus, select:focus, textarea:focus{
  outline:none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
}
input[type=number]{ font-family: var(--font-mono); }
select{ appearance:none; -webkit-appearance:none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2393A0C2'%3E%3Cpath d='M6 8l4 4 4-4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position: right 10px center; padding-right: 30px; }
.field{ display:flex; flex-direction:column; gap:6px; }
.field label{ font-size: 11px; color: var(--text-dim); }
.form-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(135px,1fr)); gap:12px; align-items:end; }
.chip-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.chip{
  border:1px solid var(--glass-border); background: rgba(255,255,255,0.05); color: var(--text-dim);
  border-radius: 999px; padding: 6px 13px; font-size:12px; cursor:pointer;
}
.chip:hover{ color: var(--text); border-color: var(--blue); }

/* ---------- Buttons ---------- */
.primary-btn{
  background: var(--grad-primary); color:#fff; border:none; border-radius: 13px;
  padding: 12px 18px; font-weight:600; font-size:13.5px; cursor:pointer;
  text-align:center; box-shadow: 0 8px 22px rgba(99,102,241,0.35);
}
.primary-btn.secondary{ background: rgba(255,255,255,0.06); color: var(--text); border:1px solid var(--glass-border); box-shadow:none; }
.primary-btn:hover{ filter: brightness(1.08); }
.ghost-btn{
  background: rgba(255,255,255,0.04); color: var(--text-dim); border:1px solid var(--glass-border);
  border-radius:13px; padding: 10px 15px; font-size:13px; cursor:pointer;
}
.ghost-btn:hover{ color: var(--text); border-color: var(--blue); }
.ghost-btn.full{ width:100%; margin-top: 6px; }
.ghost-btn.small{ padding: 6px 12px; font-size: 11.5px; }
.danger-btn{
  background: rgba(242,86,92,.13); color: var(--danger); border:1px solid rgba(242,86,92,.35);
  border-radius:13px; padding: 11px 15px; font-size:13px; cursor:pointer;
}
.icon-btn{
  background:transparent; border:none; color: var(--text-dim); cursor:pointer; font-size:15px;
  padding:2px 6px;
}
.icon-btn:hover{ color: var(--danger); }

/* ---------- Badges ---------- */
.badge{
  display:inline-block; padding: 3px 10px; border-radius: 999px; font-size: 10.5px; font-weight:600;
  text-transform: uppercase; letter-spacing:.4px;
}
.badge.paid{ background: rgba(52,211,153,.15); color: var(--success); }
.badge.pending{ background: rgba(245,169,61,.15); color: var(--amber); }
.badge.overdue{ background: rgba(242,86,92,.15); color: var(--danger); }
.badge.variance-ok{ background: rgba(52,211,153,.15); color: var(--success); }
.badge.variance-short{ background: rgba(242,86,92,.15); color: var(--danger); }
.badge.variance-excess{ background: rgba(245,169,61,.15); color: var(--amber); }

/* ---------- Empty state ---------- */
.empty{
  text-align:center; padding: 32px 16px; color: var(--text-dim); font-size: 13.5px;
}
.hint{ font-size:12px; color: var(--text-dim); margin-top: 6px; line-height:1.55; }

/* ---------- App credit footer ---------- */
.app-credit{
  text-align:center; color: var(--text-faint); font-size: 11px; letter-spacing:.2px;
  padding: 4px 0 2px;
}

/* ---------- Toast ---------- */
.toast{
  position: fixed; left:50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  background: rgba(18,24,52,0.85); backdrop-filter: blur(16px);
  border:1px solid var(--glass-border); color: var(--text);
  padding: 11px 18px; border-radius: 13px; font-size: 13px;
  opacity:0; pointer-events:none; transition: opacity .2s, transform .2s;
  box-shadow: 0 10px 26px rgba(0,0,0,.4);
  z-index: 50; max-width: 88vw; text-align:center;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }

/* ---------- Modal ---------- */
.modal-overlay{
  position: fixed; inset:0; background: rgba(3,6,16,.6);
  display:flex; align-items:center; justify-content:center; z-index: 100; padding:16px;
  backdrop-filter: blur(6px);
}
.modal-overlay.hidden{ display:none; }
.modal{
  background: rgba(16,22,48,0.88); backdrop-filter: blur(24px) saturate(160%);
  border:1px solid var(--glass-border); border-radius: 22px;
  padding: 24px; width: 100%; max-width: 400px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.modal h3{ margin:0 0 8px; }
.modal .muted{ color: var(--text-dim); font-size: 13px; line-height:1.55; }
.modal-actions{ display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
.modal-actions > *{ flex:1; }
.modal.modal-wide{ max-width: 520px; }
.modal-scroll{ max-height: 58vh; overflow-y: auto; margin-top: 8px; padding-right: 2px; }
.activity-row .activity-serial{
  width: 22px; height:22px; border-radius:50%; flex-shrink:0; margin-top:1px;
  background: rgba(99,102,241,0.16); color: var(--blue); font-size:11px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}
.live-dot{
  width:7px; height:7px; border-radius:50%; background: var(--success, #34D399);
  display:inline-block; margin-right:6px; animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse{ 0%,100%{ opacity:1; } 50%{ opacity:.35; } }

.row-between{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }

/* ---------- Bottom navigation (mobile app tab bar) ---------- */
.bottom-nav{
  display:flex; gap:2px;
  max-width: 480px; width: calc(100% - 24px);
  background: rgba(12,16,36,0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 7px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
  position: fixed; left:50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
}
.tab-btn{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
  background:transparent; border:none; color: var(--text-faint);
  font-family: var(--font-ui); font-size: 10px; font-weight:600;
  padding: 8px 2px; border-radius: 16px; cursor:pointer;
  transition: color .15s;
}
.tab-icon{ width:20px; height:20px; display:flex; align-items:center; justify-content:center; }
.tab-icon svg{ width:20px; height:20px; }
.tab-label{ letter-spacing:.2px; }
.tab-btn.active{
  color:#fff;
  background: var(--grad-primary);
  box-shadow: 0 6px 18px rgba(99,102,241,0.4);
}
.tab-btn:not(.active):hover{ color: var(--text); }

/* scrollbar */
::-webkit-scrollbar{ width:8px; height:8px; }
::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.12); border-radius: 8px; }

/* ---------- Auth / Login screen ---------- */
.hidden{ display:none !important; }
.auth-screen{
  position: fixed; inset:0; z-index: 200; display:flex; align-items:center; justify-content:center;
  padding: 20px; background: radial-gradient(circle at 30% 20%, rgba(99,102,241,0.18), transparent 60%),
  var(--bg, #0A0F24);
}
.auth-card{
  width:100%; max-width: 360px; background: rgba(16,22,48,0.9); backdrop-filter: blur(24px) saturate(160%);
  border:1px solid var(--glass-border); border-radius: 22px; padding: 28px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5); text-align:center;
}
.auth-card .brand-mark{ width:56px; height:56px; border-radius:16px; margin-bottom:10px; }
.auth-card h2{ margin: 0 0 4px; font-size: 20px; }
.auth-card .muted{ color: var(--text-dim); font-size: 13px; margin: 0 0 18px; }
.auth-card input, .auth-card select{
  width:100%; box-sizing:border-box; background: rgba(255,255,255,0.04); color: var(--text);
  border:1px solid var(--glass-border); border-radius: 12px; padding: 12px 14px; font-size:14px;
  margin-bottom: 10px; outline:none;
}
.auth-card input:focus, .auth-card select:focus{ border-color: var(--blue); }
.auth-error{ color: var(--danger); font-size:12.5px; min-height: 16px; margin: 6px 0 0; }
.auth-offline-note{ margin-top: 14px !important; font-size:11.5px !important; }

/* ============================================================ PROFILE MODAL */
.profile-info{ display:flex; flex-direction:column; gap:8px; margin-top:6px; }
.profile-row{ display:flex; justify-content:space-between; gap:10px; font-size:13px; padding:8px 0; border-bottom:1px solid var(--glass-border); }
.profile-row .k{ color: var(--text-dim); }
.profile-row .v{ font-weight:600; text-align:right; }
.modal .field{ margin-top:10px; }
.modal .field input{
  width:100%; box-sizing:border-box; background: rgba(255,255,255,0.04); color: var(--text);
  border:1px solid var(--glass-border); border-radius: 12px; padding: 12px 14px; font-size:14px; outline:none;
}
.modal .field input:focus{ border-color: var(--blue); }

/* ============================================================ ACTIVITY FEED & PRESENCE */
.activity-list{ display:flex; flex-direction:column; gap:2px; }
.activity-row{
  display:flex; align-items:flex-start; gap:10px; padding:10px 2px; border-bottom:1px solid var(--glass-border);
}
.activity-row:last-child{ border-bottom:none; }
.activity-dot{ width:8px; height:8px; border-radius:50%; margin-top:6px; flex-shrink:0; background: var(--blue); }
.activity-body{ flex:1; min-width:0; }
.activity-text{ font-size:13.5px; line-height:1.4; }
.activity-text strong{ font-weight:700; }
.activity-time{ font-size:11.5px; color: var(--text-dim); margin-top:2px; }

.presence-row{ display:flex; flex-wrap:wrap; gap:8px; margin-top:2px; }
.presence-chip{
  display:flex; align-items:center; gap:6px; background: rgba(52,211,153,.12); color: var(--success);
  border:1px solid rgba(52,211,153,.3); border-radius:999px; padding:6px 12px; font-size:12.5px; font-weight:600;
}
.presence-dot{
  width:7px; height:7px; border-radius:50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: presencePulse 1.8s infinite;
}
@keyframes presencePulse{
  0%{ box-shadow: 0 0 0 0 rgba(52,211,153,.5); }
  70%{ box-shadow: 0 0 0 6px rgba(52,211,153,0); }
  100%{ box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
