/* ============================================================
   VVMVP Trust Office — "Sanctuary" theme
   Editorial warmth: Fraunces display + Hanken Grotesk body,
   ivory paper with grain, marigold-saffron + temple teal.
   ============================================================ */
:root {
  --bg: #f4eddf;
  --surface: #fffdf7;
  --surface-2: #f8f1e4;
  --ink: #2a2620;
  --ink-soft: #6a6256;
  --muted: #9b9384;
  --line: #e7dcc7;
  --line-strong: #dccdb1;
  --primary: #c0701a;          /* marigold / saffron */
  --primary-ink: #884d0b;
  --primary-soft: #f6e6c6;
  --accent: #2c6660;           /* temple teal */
  --accent-soft: #dbeae5;
  --gold: #ad8534;             /* gold leaf */
  --danger: #b23a23;
  --ok: #2f7d52;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-xs: 0 1px 2px rgba(58,46,28,.06);
  --shadow: 0 2px 6px rgba(58,46,28,.05), 0 14px 34px rgba(58,46,28,.08);
  --shadow-lg: 0 24px 60px rgba(58,46,28,.18);
  --grad-warm: linear-gradient(135deg, #c97c1f 0%, #a85c0f 100%);
  --grad-gold: linear-gradient(135deg, #d29433, #b6822f);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --nav-h: 66px;
  --tap: 44px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 480px at 100% -6%, #f7e4bf 0%, transparent 58%),
    radial-gradient(880px 420px at -10% 6%, #e3ede9 0%, transparent 52%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* paper grain overlay */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 2; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13.5px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: rgba(255,253,247,.8); backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40;
  padding-top: calc(14px + env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  position: relative; width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; overflow: hidden;
  background: var(--grad-gold); color: #fff8ea; display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px; font-weight: 500;
  box-shadow: 0 6px 16px rgba(173,133,52,.4), inset 0 1px 0 rgba(255,255,255,.35);
}
.brand-mark.has-logo, .hero-mark.has-logo { background: #fffdf7; box-shadow: var(--shadow); border: 1px solid var(--line); }
.logo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14%; background: #fffdf7; }
.brand-title { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.1; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-box { display: flex; align-items: center; gap: 11px; }
.user-meta { display: flex; flex-direction: column; align-items: flex-end; max-width: 42vw; }
.user-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.user-role { font-size: 9.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; }

/* ---------- Buttons ---------- */
.btn {
  border: 1px solid transparent; border-radius: 999px; padding: 11px 20px;
  font-family: var(--sans); font-weight: 600; font-size: 15px; cursor: pointer; min-height: var(--tap);
  transition: transform .08s ease, background .15s ease, box-shadow .2s ease, filter .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad-warm); color: #fff8ee; box-shadow: 0 8px 20px rgba(192,112,26,.3), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(192,112,26,.4); }
.btn-ghost { background: var(--surface); color: var(--ink-soft); border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: #e8c6bd; }
.btn-danger:hover { background: #f9ece8; }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-sm { padding: 8px 15px; font-size: 13.5px; min-height: 0; }
.btn-add { padding: 10px 18px; }

/* ---------- Hero ---------- */
.hero {
  min-height: 88vh; display: grid; place-items: center; text-align: center; padding: 36px 24px;
  position: relative; overflow: hidden;
}
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; z-index: 0; }
.hero::before { width: 440px; height: 440px; background: #f2d398; top: -130px; right: -100px; }
.hero::after { width: 380px; height: 380px; background: #c9e1dc; bottom: -130px; left: -90px; }
.hero-inner { max-width: 600px; position: relative; z-index: 1; animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
.hero-mark {
  position: relative; overflow: hidden;
  width: 80px; height: 80px; border-radius: 24px; margin: 0 auto 26px;
  background: var(--grad-gold); color: #fff8ea; display: grid; place-items: center;
  font-family: var(--serif); font-size: 40px; box-shadow: 0 18px 44px rgba(173,133,52,.46), inset 0 1px 0 rgba(255,255,255,.4);
}
.hero h1 { font-family: var(--serif); font-size: clamp(32px, 7.5vw, 58px); font-weight: 500; letter-spacing: -.025em; line-height: 1.04; margin: 0 0 18px; }
.hero h1 em { font-style: italic; color: var(--primary-ink); }
.hero p { font-size: 18px; color: var(--ink-soft); margin: 0 0 34px; line-height: 1.55; }

/* ---------- App shell ---------- */
.app { max-width: 1180px; margin: 0 auto; padding: 16px 14px calc(var(--nav-h) + 30px); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* Ashram switcher */
.context-bar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 17px; margin-bottom: 18px; box-shadow: var(--shadow);
  position: sticky; top: calc(66px + env(safe-area-inset-top)); z-index: 15;
}
.ashram-picker { display: flex; flex-direction: column; gap: 3px; }
.picker-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
#ashramSelect {
  border: none; background: transparent; font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.015em;
  color: var(--ink); padding: 1px 28px 1px 0; width: 100%; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23c0701a' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center; cursor: pointer;
}
#ashramSelect:focus { outline: none; }
.context-stats { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
.context-stats:empty { display: none; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); letter-spacing: .01em; }
.input, select.input, textarea.input {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 13px;
  font-family: var(--sans); font-size: 16px; background: var(--surface); color: var(--ink); width: 100%; min-height: var(--tap);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form.row { flex-direction: row; align-items: stretch; flex-wrap: wrap; }
.form.row .input { flex: 1; min-width: 150px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.checkbox { flex-direction: row; align-items: center; gap: 10px; font-size: 15px; color: var(--ink); font-weight: 500; }
.checkbox input { width: 22px; height: 22px; accent-color: var(--primary); }

/* ---------- Views ---------- */
.view { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); position: relative; }
.view-head::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 64px; height: 2px; background: var(--grad-gold); border-radius: 2px; }
.view-head h2 { margin: 0; font-size: 27px; font-weight: 600; }
.view-hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.filter-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; box-shadow: var(--shadow); overflow: hidden; }
.filter-box > summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.filter-box > summary::-webkit-details-marker { display: none; }
.filter-box > summary::before { content: '⚲'; margin-right: 8px; color: var(--primary); }
.filter-box[open] > summary { border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; }
.filters .input { flex: 1; min-width: 140px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 13px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); cursor: pointer; position: relative; overflow: hidden;
  transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, border-color .22s ease;
  animation: rise .45s cubic-bezier(.2,.8,.2,1) both;
}
.card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad-gold); transform: scaleY(0); transform-origin: top; transition: transform .25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card:hover::before { transform: scaleY(1); }
.card:active { transform: scale(.99); }
.card-grid .card:nth-child(2) { animation-delay: .04s; }
.card-grid .card:nth-child(3) { animation-delay: .08s; }
.card-grid .card:nth-child(4) { animation-delay: .12s; }
.card-grid .card:nth-child(5) { animation-delay: .16s; }
.card-grid .card:nth-child(n+6) { animation-delay: .2s; }
.person-top { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 56px; height: 56px; border-radius: 15px; object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-soft), #cee4df); color: var(--accent);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 19px; border: 1px solid #cfe3de;
}
.card h4 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.2; }
.card .sub { font-size: 13px; color: var(--muted); font-family: var(--sans); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 13px; }
.badge {
  font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 999px; letter-spacing: .02em;
  background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line-strong);
}
.badge.gold { background: var(--primary-soft); color: var(--primary-ink); border-color: #ecd5a6; }
.badge.teal { background: var(--accent-soft); color: var(--accent); border-color: #c6ddd7; }
.badge.green { background: #dcefdf; color: var(--ok); border-color: #c2e2cc; }
.badge.amber { background: #fbeecb; color: #8f6411; border-color: #eddaa6; }
.badge.grey { background: #efeadf; color: var(--muted); border-color: var(--line); }
.badge.red { background: #f8e3dd; color: var(--danger); border-color: #ecc7bc; }
.card-meta { margin-top: 13px; font-size: 14px; color: var(--ink-soft); display: grid; gap: 5px; }
.card-meta span b { color: var(--ink); font-weight: 700; }

/* ---------- Asset expiry alert banner ---------- */
.alert-banner { background: linear-gradient(135deg, #fbeccb, #f7ddd2); border: 1px solid #ecca97; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 15px; box-shadow: var(--shadow); }
.alert-head { font-family: var(--serif); font-weight: 600; font-size: 17px; color: #8a4a14; margin-bottom: 9px; }
.alert-row { font-size: 13.5px; color: var(--ink-soft); padding: 3px 0; }
.alert-row b { color: var(--ink); }
.doc-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.doc-chip { font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); border: 1px solid #c6ddd7; text-decoration: none; }
.doc-chip:hover { filter: brightness(.97); }

/* photo / document camera+upload picker */
.photo-picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.doc-status { font-size: 12.5px; color: var(--ok); font-weight: 600; }

/* ---------- Tree ---------- */
.tree { display: flex; flex-direction: column; gap: 13px; }
.tree-ashram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .2s; animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.tree-ashram[open] { box-shadow: var(--shadow-lg); }
.tree-ashram > summary { list-style: none; cursor: pointer; padding: 17px 18px; display: flex; flex-direction: column; gap: 9px; }
.tree-ashram > summary::-webkit-details-marker { display: none; }
.tree-ashram > summary:hover { background: var(--surface-2); }
.tree-ashram-title { display: flex; align-items: center; gap: 11px; font-family: var(--serif); font-weight: 600; font-size: 19px; }
.tree-ashram-title .caret { color: var(--primary); transition: transform .2s; font-size: 13px; font-family: var(--sans); }
.tree-ashram[open] .tree-ashram-title .caret { transform: rotate(90deg); }
.mini-stats { display: flex; gap: 9px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); }
.mini-stats b { color: var(--primary-ink); font-weight: 700; }
.tree-body { padding: 6px 18px 16px; border-top: 1px solid var(--line); }
.dept-group { padding: 9px 0; }
.dept-name { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 6px; }
.dept-people { display: flex; flex-direction: column; gap: 2px; }
.tree-person { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); cursor: pointer; min-height: var(--tap); transition: background .12s; }
.tree-person:hover { background: var(--surface-2); }
.tree-person .avatar { width: 40px; height: 40px; border-radius: 11px; font-size: 14px; }
.tree-person .tp-name { font-weight: 600; font-size: 15px; }
.tree-person .tp-sub { font-size: 12.5px; color: var(--muted); }
.tree-person .spacer { flex: 1; }
.empty { padding: 52px 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); line-height: 1.65; font-size: 15px; }
.empty .big { font-size: 40px; display: block; margin-bottom: 12px; }

/* ---------- Tiles / table ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.tile::after { content: ''; position: absolute; right: -20px; top: -20px; width: 64px; height: 64px; border-radius: 50%; background: var(--primary-soft); opacity: .55; }
.tile .num { font-family: var(--serif); font-size: 32px; font-weight: 600; letter-spacing: -.02em; position: relative; line-height: 1; }
.tile .lbl { font-size: 12px; color: var(--muted); margin-top: 6px; position: relative; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { background: var(--surface-2); font-weight: 700; color: var(--ink-soft); position: sticky; top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.table td:first-child { font-family: var(--serif); font-size: 15px; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }

/* ---------- Admin ---------- */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 14px; font-size: 20px; font-weight: 600; }
.editor-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 9px; }
.editor-list li { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.editor-list .em { font-weight: 700; font-size: 14.5px; word-break: break-word; }

/* ---------- Primary nav ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: rgba(255,253,247,.94); backdrop-filter: saturate(150%) blur(12px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(58,46,28,.08);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-inner { display: flex; }
.bottomnav .tab {
  flex: 1; background: none; border: none; cursor: pointer; padding: 9px 2px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-family: var(--sans); min-height: var(--nav-h); transition: color .15s;
}
.bottomnav .tab .ico { font-size: 21px; line-height: 1; transition: transform .15s; }
.bottomnav .tab .lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.bottomnav .tab.active { color: var(--primary-ink); }
.bottomnav .tab.active .ico { transform: translateY(-2px) scale(1.08); }

/* Floating add button */
.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  z-index: 35; width: 60px; height: 60px; border-radius: 50%; border: none;
  background: var(--grad-warm); color: #fff8ee; font-size: 32px; font-weight: 300; line-height: 1;
  box-shadow: 0 14px 30px rgba(192,112,26,.46), inset 0 1px 0 rgba(255,255,255,.25); cursor: pointer; display: grid; place-items: center;
  transition: transform .12s ease;
}
.fab:active { transform: scale(.9) rotate(90deg); }

/* ---------- Modal (sheet on mobile) ---------- */
.modal-root { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(42,38,32,.5); backdrop-filter: blur(3px); }
.modal {
  position: relative; background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
  width: 100%; max-height: 92vh; overflow: auto; padding: 26px 18px calc(28px + env(safe-area-inset-bottom));
  animation: sheet-up .26s cubic-bezier(.2,.85,.2,1);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal::before { content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 44px; height: 4px; border-radius: 999px; background: var(--line-strong); }
.modal h3 { margin: 12px 0 4px; font-size: 24px; font-weight: 600; }
.modal .modal-sub { color: var(--muted); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 18px; }
.modal-actions { display: flex; flex-direction: column-reverse; gap: 10px; margin-top: 24px; }
.modal-actions .btn { width: 100%; }
.modal-close { position: absolute; top: 16px; right: 16px; border: none; background: var(--surface-2); width: 38px; height: 38px; border-radius: 50%; font-size: 22px; color: var(--ink-soft); cursor: pointer; line-height: 1; transition: background .15s; }
.modal-close:hover { background: var(--line); }

/* feedback timeline */
.timeline { display: flex; flex-direction: column; gap: 11px; margin-top: 12px; max-height: 240px; overflow: auto; }
.fb-item { border-left: 2px solid var(--primary); padding: 5px 0 5px 14px; }
.fb-item .fb-meta { font-size: 11.5px; color: var(--muted); }
.fb-item .fb-notes { font-size: 15px; }
.stars { color: var(--primary); letter-spacing: 2px; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.section-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 4px 0 10px; }

/* toast */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fdf8ee; padding: 13px 24px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 100; max-width: 88vw; text-align: center;
}
.toast.err { background: var(--danger); }

/* ---------- Desktop / tablet ---------- */
@media (min-width: 760px) {
  body { font-size: 15px; }
  .topbar { padding: 16px 34px; padding-top: 16px; }
  .app { max-width: 1180px; padding: 28px 34px 56px; }

  .bottomnav {
    position: sticky; top: calc(75px + env(safe-area-inset-top)); bottom: auto;
    border-top: none; border-bottom: 1px solid var(--line); box-shadow: 0 6px 20px rgba(58,46,28,.05);
  }
  .nav-inner { max-width: 1180px; margin: 0 auto; padding: 11px 34px; gap: 6px; justify-content: center; }
  .bottomnav .tab {
    flex: 0 0 auto; flex-direction: row; gap: 8px; min-height: 0; padding: 10px 20px;
    border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--ink-soft);
  }
  .bottomnav .tab:hover { background: var(--surface-2); color: var(--ink); }
  .bottomnav .tab .ico { font-size: 16px; }
  .bottomnav .tab .lbl { font-size: 14.5px; }
  .bottomnav .tab.active { background: var(--grad-warm); color: #fff8ee; box-shadow: 0 8px 18px rgba(192,112,26,.32); }
  .bottomnav .tab.active .ico { transform: none; }

  .context-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; top: 142px; }
  .ashram-picker { flex-direction: row; align-items: baseline; gap: 13px; }
  .context-stats { margin-top: 0; }
  #ashramSelect { font-size: 20px; min-width: 230px; }

  .fab { display: none !important; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form.row { flex-wrap: nowrap; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
  .admin-grid { grid-template-columns: 1fr 1.25fr; gap: 22px; }
  .tree-ashram > summary { flex-direction: row; align-items: center; justify-content: space-between; }

  .modal-root { align-items: center; padding: 20px; }
  .modal { border-radius: 22px; width: min(680px, 100%); padding: 30px; animation: pop .22s ease; }
  @keyframes pop { from { transform: scale(.96); opacity: .6; } to { transform: scale(1); opacity: 1; } }
  .modal::before { display: none; }
  .modal-actions { flex-direction: row; justify-content: flex-end; }
  .modal-actions .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
