:root{
  --navy:#0B1A33; --navy-2:#162A4D; --navy-3:#223861;
  --teal:#10B981; --teal-2:#0E9F8E; --teal-soft:#E6F7F1;
  --blue:#3B82F6; --blue-soft:#EAF2FF;
  --indigo:#6366F1; --indigo-soft:#EEF0FF;
  --gold:#F59E0B; --gold-soft:#FEF3C7;
  --red:#D2232A; --red-2:#B01C22; --red-soft:#FDE8E8;
  --bg:#F3F6FA; --card:#FFFFFF; --border:#E6EBF2;
  --text:#0F1E36; --muted:#6B778C;
  --warn:#D97706; --warn-soft:#FEF3C7;
  --danger:#E11D48; --danger-soft:#FFE4E6;
  --ok:#10B981; --ok-soft:#E6F7F1;
  --shadow-sm:0 2px 6px rgba(11,26,51,0.04), 0 1px 2px rgba(11,26,51,0.03);
  --shadow-md:0 10px 28px rgba(11,26,51,0.08), 0 2px 8px rgba(11,26,51,0.04);
  --shadow-navy:0 16px 34px rgba(11,26,51,0.22);
  --shadow-red:0 8px 20px rgba(210,35,42,0.28);
}
*{box-sizing:border-box;}
body{
  margin:0; font-family:'Plus Jakarta Sans',system-ui,-apple-system,sans-serif;
  background:#E9EEF5; color:var(--text); font-size:14px;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--teal-2); text-decoration:none;}
.app{
  max-width:480px; margin:0 auto; min-height:100vh;
  background:var(--bg); position:relative; padding-bottom:88px;
  box-shadow:0 0 40px rgba(11,26,51,0.08);
}

/* ---------- Navy Headers ---------- */
.topbar{
  background:linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 100%);
  padding:18px 18px 24px; border-radius:0 0 26px 26px;
  display:flex; flex-direction:column; gap:14px;
  box-shadow:var(--shadow-navy); position:relative; overflow:hidden;
}
.topbar::after{
  content:''; position:absolute; top:-70px; right:-60px;
  width:200px; height:200px; border-radius:50%;
  background:radial-gradient(circle, rgba(16,185,129,0.18), transparent 70%);
  pointer-events:none;
}
.topbar .row{display:flex; align-items:center; justify-content:space-between; border:none; padding:0;}
.brand-row{display:flex; align-items:center; gap:9px;}
.brand-logo{width:30px; height:30px; border-radius:9px; background:var(--red); display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow:var(--shadow-red);}
.brand-name{color:#fff; font-size:22px; font-weight:800; letter-spacing:-0.3px;}
.greet{color:#CBD5E1; font-size:17px; font-weight:600;}
.org{color:#fff; font-size:25px; font-weight:800; margin-top:4px; letter-spacing:-0.3px;}
.avatar{
  width:36px; height:36px; border-radius:50%;
  background:linear-gradient(135deg, var(--teal), var(--blue));
  color:#fff; font-size:13px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  border:2px solid rgba(255,255,255,0.22);
}
.iconbtn{
  width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,0.10);
  display:flex; align-items:center; justify-content:center;
  border:none; cursor:pointer; position:relative; color:#fff;
  transition:transform 0.15s, background 0.15s;
}
.iconbtn:hover{background:rgba(255,255,255,0.16);}
.iconbtn-red{background:var(--red); box-shadow:var(--shadow-red);}
.iconbtn-red:hover{background:var(--red-2);}

/* Page-level Navy Header (Properties, Finances, School, Investments, Payroll, Settings) */
.navy-header{
  background:linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 100%);
  padding:18px 18px 20px; border-radius:0 0 24px 24px;
  color:#fff; box-shadow:var(--shadow-navy); position:relative; overflow:hidden;
}
.navy-header::after{
  content:''; position:absolute; top:-60px; right:-50px;
  width:170px; height:170px; border-radius:50%;
  background:radial-gradient(circle, rgba(59,130,246,0.16), transparent 70%);
  pointer-events:none;
}
.navy-header-top{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.navy-header h1{font-size:20px; font-weight:800; margin:0; color:#fff; letter-spacing:-0.3px;}
.back-link{
  display:inline-flex; align-items:center; gap:6px;
  color:#fff; font-size:18px; font-weight:800; letter-spacing:-0.2px;
}

/* Legacy light header (for secondary form pages) */
.header{padding:18px 18px 12px;}
.header h1{font-size:20px; font-weight:800; margin:0;}

/* ---------- Dark Hero Cards ---------- */
.hero-card{
  background:rgba(255,255,255,0.07);
  border:1px solid rgba(255,255,255,0.10);
  border-radius:18px; padding:16px;
  backdrop-filter:blur(8px);
}
.dark-card{
  background:linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 100%);
  color:#fff; border-radius:18px; padding:16px;
  box-shadow:var(--shadow-navy); border:none;
}
.hero-label{
  display:flex; align-items:center; gap:6px;
  color:#CBD5E1; font-size:12px; font-weight:500;
}
.eye-btn{
  background:none; border:none; padding:2px; cursor:pointer;
  color:#94A3B8; display:inline-flex; align-items:center;
}
.hero-value-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin-top:6px;
}
.hero-value{
  font-size:30px; font-weight:800; color:#fff;
  font-variant-numeric:tabular-nums; letter-spacing:-0.5px;
}
.trend-pill{
  display:inline-flex; align-items:center; gap:4px;
  background:var(--ok); color:#fff;
  font-size:11.5px; font-weight:700; padding:4px 9px; border-radius:20px;
}
.trend-pill.light{background:var(--ok-soft); color:var(--ok);}
.trend-pill.down{background:var(--danger); color:#fff;}

/* ---------- KPI Horizontal Strip ---------- */
.kpi-strip{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:8px;
}
.kpi-card{
  background:var(--card); border:1px solid var(--border);
  border-radius:16px; padding:11px 8px; text-align:center;
  box-shadow:var(--shadow-sm); display:flex; flex-direction:column;
  align-items:center; gap:6px; color:inherit;
}
.kpi-icon{
  width:34px; height:34px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
}
.kpi-val{font-size:18px; font-weight:800; font-variant-numeric:tabular-nums; color:var(--text); line-height:1.15;}
.kpi-lbl{font-size:11px; font-weight:600; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;}

/* ---------- Stats & Grids ---------- */
.stats{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.stat{background:rgba(255,255,255,0.08); border-radius:14px; padding:12px 14px;}
.stat.light{background:var(--card); border:1px solid var(--border); box-shadow:var(--shadow-sm);}
.stat .v{font-size:19px; font-weight:800; font-variant-numeric:tabular-nums; color:#fff;}
.stat.light .v{color:var(--text); font-size:18px;}
.stat .l{font-size:11px; margin-top:2px; color:#9FACC4;}
.stat.light .l{color:var(--muted);}

.content{padding:16px 18px; display:flex; flex-direction:column; gap:16px;}
.content > form{display:flex; flex-direction:column; gap:16px;}
.section-head{display:flex; align-items:center; justify-content:space-between; margin-top:10px;}
.section-head h2{font-size:17px; font-weight:800; margin:0; color:var(--text);}
.section-head a:not(.btn){font-size:12px; font-weight:600; color:var(--blue); display:inline-flex; align-items:center; gap:3px;}

.card{
  background:var(--card); border:1px solid var(--border);
  border-radius:18px; padding:14px 16px; box-shadow:var(--shadow-sm);
}
.card h3{font-size:13.5px; font-weight:700; margin:0 0 10px;}

.stat-mini{
  background:var(--card); border:1px solid var(--border);
  border-radius:16px; padding:13px 14px; box-shadow:var(--shadow-sm);
}
.stat-mini .v{font-size:17px; font-weight:800; font-variant-numeric:tabular-nums;}
.stat-mini .l{font-size:11px; color:var(--muted); margin-top:2px; font-weight:500;}
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:10px;}

.row{display:flex; justify-content:space-between; font-size:12.5px; padding:8px 0; border-bottom:1px solid var(--border);}
.row:last-child{border-bottom:none;}
.row .l{color:var(--muted);}
.row .v{font-weight:600;}

.list-row{display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--border);}
.list-row:last-child{border-bottom:none;}
.avatar-sq{
  width:40px; height:40px; border-radius:12px;
  background:var(--teal-soft); color:var(--teal-2);
  font-weight:700; font-size:13px;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.circle-icon{
  width:34px; height:34px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.list-text{flex:1; min-width:0;}
.list-title{font-size:13.5px; font-weight:600; color:var(--text);}
.list-sub{font-size:11.5px; color:var(--muted); margin-top:2px;}

/* ---------- Badges ---------- */
.badge{font-size:10.5px; font-weight:700; padding:4px 9px; border-radius:20px; white-space:nowrap; display:inline-block;}
.badge.due, .badge.part{background:var(--warn); color:#fff;}
.badge.overdue{background:var(--danger); color:#fff;}
.badge.paid, .badge.active{background:var(--ok); color:#fff;}

/* ---------- Tabs & Search ---------- */
.tabs{display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; scrollbar-width:none;}
.tabs::-webkit-scrollbar{display:none;}
.tab{
  font-size:12px; font-weight:600; padding:7px 14px; border-radius:20px;
  background:var(--card); border:1px solid var(--border);
  color:var(--muted); white-space:nowrap; transition:all 0.15s;
}
.tab.active{background:var(--red); color:#fff; border-color:var(--red); box-shadow:var(--shadow-red);}
.tab.disabled{opacity:0.5; cursor:default;}

.pill-row{display:flex; gap:6px; overflow-x:auto; padding:4px 2px 10px; margin:-4px -2px -10px; scrollbar-width:none;}
.pill-row::-webkit-scrollbar{display:none;}
.pill{
  font-size:12px; font-weight:700; padding:7px 14px; border-radius:20px;
  background:#fff; border:1px solid var(--border); color:var(--muted);
  white-space:nowrap; text-decoration:none; transition:all 0.15s;
}
.pill.active{background:var(--red); color:#fff; border-color:var(--red); box-shadow:var(--shadow-red);}

.month-picker-panel{
  display:none; margin-top:10px;
  background:#fff; border:1px solid var(--border); border-radius:12px; padding:10px;
  box-shadow:var(--shadow-sm); gap:8px; align-items:center;
}
.month-picker-panel.open{display:flex;}
.tx-date-header{
  font-size:11.5px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:0.03em;
  padding:14px 0 6px;
}
.tx-date-header:first-child{padding-top:2px;}
.month-picker-panel select{
  flex:1; font-size:12.5px; font-weight:600; color:var(--text); background:var(--bg);
  border:1px solid var(--border); border-radius:10px; padding:8px 10px; cursor:pointer;
}

.tabs-float{
  display:flex; gap:4px; background:#fff; border-radius:16px; padding:5px;
  box-shadow:var(--shadow-md); margin-top:22px; position:relative; z-index:2;
}
.tabs-float a{
  flex:1; text-align:center; color:var(--muted); text-decoration:none;
  padding:9px 8px; border-radius:12px; font-size:12.5px; font-weight:700;
  position:relative; z-index:2; transition:color 0.25s;
}
.tabs-float a.active{color:#fff;}
.tabs-float:not(.tabs-float-sliding) a.active{background:var(--red); box-shadow:var(--shadow-red);}
.tabs-indicator{
  position:absolute; top:5px; bottom:5px; left:5px; width:0; z-index:1;
  background:var(--red); border-radius:12px; box-shadow:var(--shadow-red);
  transition:left 0.32s cubic-bezier(.4,0,.2,1), width 0.32s cubic-bezier(.4,0,.2,1);
}

/* Fade/slide transition for AJAX-swapped list content */
.fade-swap{transition:opacity 0.22s ease, transform 0.22s ease;}
.fade-swap.fade-out{opacity:0; transform:translateY(6px);}

.tabs-dark{
  display:flex; gap:6px; background:rgba(255,255,255,0.08);
  padding:4px; border-radius:24px; margin-top:14px;
}
.tabs-dark .tab{
  flex:1; text-align:center; background:transparent; border:none;
  color:#CBD5E1; padding:7px 10px; font-size:12px;
}
.tabs-dark .tab.active{
  background:var(--red); color:#fff; box-shadow:var(--shadow-red);
}

.search{
  display:flex; align-items:center; gap:9px;
  background:var(--card); border:1px solid var(--border);
  border-radius:14px; padding:10px 14px; box-shadow:var(--shadow-sm);
}
.search input{border:none; outline:none; background:transparent; font-size:13.5px; width:100%; color:var(--text);}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  border:none; border-radius:24px; padding:12px 18px;
  font-size:13.5px; font-weight:700; cursor:pointer; text-decoration:none;
  transition:transform 0.12s, opacity 0.15s;
}
.btn:active{transform:scale(0.99);}
.btn-primary{background:var(--red); color:#fff; box-shadow:var(--shadow-red);}
.btn-navy{background:var(--navy); color:#fff; box-shadow:var(--shadow-navy);}
.btn-block{width:100%;}
.btn-sm{padding:6px 12px; font-size:11.5px; border-radius:16px;}

/* ---------- Toggles ---------- */
.toggle{position:relative; display:inline-block; width:42px; height:24px; flex-shrink:0; cursor:pointer;}
.toggle input{opacity:0; width:0; height:0;}
.toggle .slider{position:absolute; inset:0; background:#CBD5E1; border-radius:24px; transition:0.2s;}
.toggle .slider::before{content:''; position:absolute; width:18px; height:18px; left:3px; top:3px; background:#fff; border-radius:50%; transition:0.2s; box-shadow:0 1px 3px rgba(0,0,0,0.2);}
.toggle input:checked + .slider{background:var(--ok);}
.toggle input:checked + .slider::before{transform:translateX(18px);}

.icon-tile{width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.sparkline{display:block; margin-top:6px; width:100%; height:auto;}
.chip{font-size:10.5px; font-weight:700; padding:3px 8px; border-radius:12px; display:inline-flex; align-items:center; gap:3px;}
.notif-dot{
  position:absolute; top:-2px; right:-2px; min-width:17px; height:17px;
  border-radius:50%; background:var(--red); color:#fff;
  font-size:9.5px; font-weight:700; display:flex; align-items:center;
  justify-content:center; border:2px solid var(--navy); padding:0 3px;
}

/* ---------- Forms ---------- */
.form-group{margin-bottom:14px;}
.form-group label{display:block; font-size:12px; font-weight:600; color:var(--muted); margin-bottom:6px;}
.form-group input, .form-group select, .form-group textarea{
  width:100%; padding:11px 13px; border:1px solid var(--border);
  border-radius:12px; font-size:13.5px; font-family:inherit;
  background:var(--card); color:var(--text);
}
.form-group select{
  background:var(--bg); font-weight:600; cursor:pointer;
}
.month-pill{
  display:inline-flex; align-items:center; gap:6px;
  background:var(--card); border:1px solid var(--border);
  border-radius:12px; padding:8px 14px; font-size:13.5px; font-weight:700;
  color:var(--text); box-shadow:var(--shadow-sm);
}
.month-pill input[type="month"]{
  border:none; outline:none; background:transparent; font-family:inherit;
  font-size:13.5px; font-weight:700; color:var(--text); cursor:pointer;
}
.select-pill{
  padding:8px 11px; border:1px solid var(--border); border-radius:10px;
  background:var(--bg); color:var(--text); font-family:inherit;
  font-size:12.5px; font-weight:600; cursor:pointer;
}
.select-pill-sm{
  padding:6px 10px; border-radius:10px; font-size:12px;
}
.select-pill:disabled, .form-group select:disabled{opacity:0.55; cursor:not-allowed;}

/* ---------- Bottom Navigation ---------- */
.navbar{
  position:fixed; left:50%; transform:translateX(-50%); bottom:0;
  width:100%; max-width:480px; background:rgba(255,255,255,0.96);
  backdrop-filter:blur(10px);
  border-top:1px solid var(--border); display:flex; padding:8px 6px 12px;
  z-index:50; box-shadow:0 -4px 18px rgba(11,26,51,0.05);
}
.navitem{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
  font-size:10.5px; font-weight:600; color:var(--muted); text-decoration:none;
}
.navitem.active{color:var(--red); font-weight:700;}
.navitem svg{stroke:var(--muted);}
.navitem.active svg{stroke:var(--red);}

/* ---------- Property Horizontal Cards (Moodboard Screen 2) ---------- */
.prop-card{
  background:var(--card); border:1px solid var(--border);
  border-radius:18px; padding:12px; display:flex; gap:12px;
  align-items:stretch; color:inherit; box-shadow:var(--shadow-sm);
  transition:transform 0.12s, box-shadow 0.15s;
}
.prop-card:hover{box-shadow:var(--shadow-md);}
.prop-thumb{
  width:100px; aspect-ratio:5/6; border-radius:14px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  position:relative; overflow:hidden; background-size:cover; background-position:center;
}
.prop-thumb img{width:100%; height:100%; object-fit:cover; display:block;}
.prop-body{flex:1; min-width:0; display:flex; flex-direction:column; justify-content:space-between; gap:6px;}
.prop-title{font-size:14.5px; font-weight:700; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.prop-sub{font-size:11.5px; color:var(--muted);}
.prop-foot{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:2px;}
.prop-metrics{display:flex; align-items:center; gap:10px; font-size:11.5px; font-weight:600; color:var(--muted);}
.prop-metrics span{display:inline-flex; align-items:center; gap:4px;}
.view-pill{
  font-size:11.5px; font-weight:700; color:var(--navy);
  background:#EEF2F7; padding:5px 10px; border-radius:10px;
  display:inline-flex; align-items:center; gap:4px; white-space:nowrap;
}

/* Legacy pcard support (e.g. property_detail) */
.pcard{background:var(--card); border:1px solid var(--border); border-radius:16px; overflow:hidden; display:block; color:inherit; box-shadow:var(--shadow-sm);}
.pimg{height:92px; background:linear-gradient(135deg,var(--navy),var(--navy-2)); display:flex; align-items:flex-end; padding:10px 14px; position:relative;}
.ptype{position:absolute; top:10px; left:14px; font-size:10px; font-weight:700; color:#fff; background:rgba(255,255,255,0.15); padding:3px 9px; border-radius:7px; letter-spacing:0.3px;}
.pname{color:#fff; font-size:15px; font-weight:700;}
.pbody{padding:12px 14px 14px; display:flex; flex-direction:column; gap:10px;}
.occbar{height:6px; border-radius:4px; background:var(--border); overflow:hidden;}
.occfill{height:100%; background:var(--teal); border-radius:4px;}

/* ---------- Settings Grouped List ---------- */
.settings-group{padding:4px 16px;}
.settings-item{
  display:flex; align-items:center; gap:12px; padding:12px 0;
  border-bottom:1px solid var(--border); color:inherit;
}
.settings-item:last-child{border-bottom:none;}
.settings-icon{
  width:34px; height:34px; border-radius:10px; background:#F1F5F9;
  color:var(--navy); display:flex; align-items:center; justify-content:center; flex-shrink:0;
}

/* ---------- Login & Empty States ---------- */
.login-wrap{
  min-height:100vh; margin-bottom:-88px; display:flex; flex-direction:column;
  background:var(--bg);
}
.login-hero{
  background:linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 100%);
  padding:46px 24px 68px; border-radius:0 0 32px 32px; text-align:center;
  color:#fff; box-shadow:var(--shadow-navy); position:relative; overflow:hidden;
}
.login-hero::after{
  content:''; position:absolute; top:-70px; right:-50px;
  width:210px; height:210px; border-radius:50%;
  background:radial-gradient(circle, rgba(16,185,129,0.22), transparent 70%);
  pointer-events:none;
}
.login-hero::before{
  content:''; position:absolute; bottom:-80px; left:-60px;
  width:190px; height:190px; border-radius:50%;
  background:radial-gradient(circle, rgba(59,130,246,0.18), transparent 70%);
  pointer-events:none;
}
.login-logo-row{display:flex; align-items:center; justify-content:center; gap:11px; margin-bottom:8px; position:relative; z-index:1;}
.login-logo{
  width:42px; height:42px; border-radius:12px; background:var(--red);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  box-shadow:var(--shadow-red);
}
.login-sub{font-size:13px; color:#CBD5E1; font-weight:500; position:relative; z-index:1;}
.login-body{
  flex:1; display:flex; flex-direction:column; align-items:center;
  padding:0 18px 32px; margin-top:-38px; position:relative; z-index:2;
}
.login-card{
  background:var(--card); border:1px solid var(--border); border-radius:22px;
  padding:28px 22px 24px; width:100%; max-width:400px; box-shadow:var(--shadow-md);
}
.login-title{font-size:20px; font-weight:800; color:var(--text); margin:0 0 4px; letter-spacing:-0.3px;}
.login-hint{font-size:12.5px; color:var(--muted); margin:0 0 20px;}
.login-card .form-group input:focus{
  outline:none; border-color:var(--navy); box-shadow:0 0 0 3px rgba(11,26,51,0.08);
}
.pw-wrap{position:relative;}
.pw-wrap input{padding-right:42px;}
.pw-toggle{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  background:none; border:none; padding:4px; cursor:pointer; color:var(--muted);
  display:inline-flex; align-items:center; justify-content:center;
}
.pw-toggle:hover{color:var(--text);}
.login-footer{margin-top:18px; font-size:11.5px; color:var(--muted); text-align:center;}
.error-box{background:var(--danger-soft); color:var(--danger); font-size:12.5px; padding:10px 12px; border-radius:12px; margin-bottom:14px;}
.alert-ok{
  background:var(--ok-soft); color:var(--ok); font-size:13px; font-weight:700;
  padding:12px 14px; border-radius:14px; box-shadow:var(--shadow-sm);
}
.alert-ok.alert-flex{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.alert-ok.alert-center{text-align:center;}
.empty-state{text-align:center; padding:32px 18px; color:var(--muted); font-size:13px;}

/* ---------- Smooth Page Transitions ---------- */
@view-transition{
  navigation:auto;
}
.navbar{
  view-transition-name:bottom-navbar;
}
::view-transition-old(root){
  animation:vtFadeOut 180ms cubic-bezier(0.4,0,1,1) both;
}
::view-transition-new(root){
  animation:vtSlideIn 240ms cubic-bezier(0.22,1,0.36,1) both;
}
::view-transition-old(bottom-navbar),
::view-transition-new(bottom-navbar){
  animation:none;
}
@keyframes vtFadeOut{
  from{opacity:1; transform:translateY(0);}
  to{opacity:0; transform:translateY(-4px);}
}
@keyframes vtSlideIn{
  from{opacity:0; transform:translateY(8px);}
  to{opacity:1; transform:translateY(0);}
}

@keyframes pageEnter{
  from{opacity:0; transform:translateY(8px);}
  to{opacity:1; transform:translateY(0);}
}
.app > :not(.navbar){
  animation:pageEnter 240ms cubic-bezier(0.22,1,0.36,1) both;
}
html.has-vt .app > :not(.navbar){
  animation:none;
}
.app.page-leaving > :not(.navbar){
  opacity:0;
  transform:translateY(-4px);
  transition:opacity 140ms ease, transform 140ms ease;
}
.prop-card:active, .list-row:active, .btn:active, .iconbtn:active, .navitem:active{
  transform:scale(0.98);
}
.modal-sheet{
  background:#fff; width:100%; max-width:480px; border-radius:18px 18px 0 0;
  padding:20px; max-height:90vh; overflow-y:auto;
}
@media (max-width:380px){
  .grid-2:has(.form-group){grid-template-columns:1fr; gap:0;}
}
@media (min-width:640px){
  .app{max-width:860px;}
  .navbar{max-width:860px; padding:10px 16px 14px;}
  .navitem{font-size:11.5px; gap:4px;}
  .topbar{padding:22px 28px 28px; gap:16px;}
  .navy-header{padding:22px 28px 24px;}
  .header{padding:22px 28px 14px;}
  .content{padding:20px 28px; gap:18px;}
  .card{padding:18px 20px;}
  .hero-value{font-size:34px;}
  .kpi-strip{gap:12px;}
  .kpi-card{padding:14px 12px;}
  .kpi-val{font-size:20px;}
  .stats, .grid-2{gap:14px;}
  .login-card{max-width:420px; padding:36px 28px;}
  .modal-sheet{max-width:600px; border-radius:20px; margin:auto;}
}
@media (prefers-reduced-motion:reduce){
  .app > :not(.navbar),
  ::view-transition-old(root),
  ::view-transition-new(root){
    animation:none !important;
    transition:none !important;
  }
}
