:root{
  --bg:#f4f7fb;
  --surface:#ffffff;
  --surface-soft:#f8fafc;
  --text:#172033;
  --muted:#6b7280;
  --line:#e7ebf1;
  --primary:#174d9f;
  --primary-2:#2563c7;
  --primary-soft:#edf4ff;
  --accent:#ef5b32;
  --success:#0f9f6e;
  --success-soft:#ecfdf5;
  --danger:#c0362c;
  --danger-soft:#fff0ee;
  --warning:#b7791f;
  --shadow:0 14px 38px rgba(20,42,78,.08);
  --shadow-sm:0 7px 22px rgba(20,42,78,.06);
  --radius:18px;
  --radius-sm:12px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font:15px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:
    radial-gradient(circle at 0 0,rgba(37,99,199,.07),transparent 28rem),
    linear-gradient(180deg,#f8fbff 0,#f4f7fb 260px,#f4f7fb 100%);
  color:var(--text);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit}
button,input,select,textarea{font:inherit}

.app-header{
  position:sticky;top:0;z-index:30;
  display:flex;align-items:center;justify-content:space-between;gap:22px;
  min-height:74px;padding:11px clamp(16px,4vw,52px);
  background:rgba(255,255,255,.92);
  border-bottom:1px solid rgba(220,226,235,.9);
  backdrop-filter:blur(14px);
  box-shadow:0 3px 18px rgba(28,53,90,.04);
}
.brand-wrap{display:flex;align-items:center;gap:11px;min-width:max-content}
.brand-mark{
  width:42px;height:42px;border-radius:13px;display:grid;place-items:center;
  background:linear-gradient(145deg,var(--primary),var(--primary-2));color:#fff;
  box-shadow:0 8px 18px rgba(23,77,159,.22);font-size:20px;
}
.brand-text{display:flex;flex-direction:column;line-height:1.1}
.brand{font-weight:850;font-size:17px;letter-spacing:-.02em;color:#143667}
.brand-sub{font-size:11px;color:var(--muted);margin-top:4px;font-weight:650}

.main-nav{display:flex;gap:5px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.main-nav a{
  color:#40516f;text-decoration:none;padding:9px 11px;border-radius:10px;
  font-weight:700;font-size:13px;transition:.18s ease;white-space:nowrap;
}
.main-nav a:hover{background:var(--primary-soft);color:var(--primary)}
.main-nav a.active{background:linear-gradient(145deg,var(--primary),var(--primary-2));color:#fff;box-shadow:0 7px 16px rgba(23,77,159,.18)}
.main-nav .logout-link{color:#9b2c2c}
.main-nav .logout-link:hover{background:#fff0f0;color:#9b2c2c}

.container{max-width:1220px;margin:0 auto;padding:30px clamp(14px,3vw,26px) 52px}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:2px 0 22px}
.page-title-wrap h1{margin:0;font-size:clamp(25px,3vw,34px);line-height:1.15;letter-spacing:-.035em;color:#172b4d}
.page-kicker{margin:7px 0 0;color:var(--muted);font-size:14px}
h2{margin:28px 0 14px;font-size:20px;letter-spacing:-.02em;color:#203657}
h3{color:#203657}

.hero-strip{
  position:relative;overflow:hidden;margin-bottom:18px;padding:22px 24px;
  border-radius:22px;color:#fff;background:linear-gradient(115deg,#153f83 0%,#2366c8 72%,#3679d5 100%);
  box-shadow:0 16px 40px rgba(20,70,145,.17);
}
.hero-strip:after{content:"";position:absolute;right:-45px;top:-95px;width:230px;height:230px;border-radius:50%;background:rgba(255,255,255,.10)}
.hero-strip strong{font-size:19px;display:block;position:relative;z-index:1}
.hero-strip p{margin:5px 0 0;color:rgba(255,255,255,.82);position:relative;z-index:1}

.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}
.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:18px;box-shadow:var(--shadow-sm);
}
.metric-card{position:relative;overflow:hidden;min-height:125px;padding:20px}
.metric-card:after{content:"";position:absolute;right:-28px;bottom:-36px;width:105px;height:105px;border-radius:50%;background:var(--primary-soft)}
.metric-top{display:flex;align-items:center;justify-content:space-between;gap:10px;position:relative;z-index:1}
.metric-icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--primary-soft);font-size:19px}
.metric{font-size:34px;line-height:1;font-weight:850;letter-spacing:-.04em;margin-top:13px;position:relative;z-index:1;color:#17355f}
.metric-label{font-size:13px;font-weight:700;color:var(--muted)}
.muted{color:var(--muted)}

.table-wrap{overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm)}
table{width:100%;border-collapse:collapse}
th,td{padding:13px 14px;border-bottom:1px solid #edf0f4;text-align:left;vertical-align:middle}
th{background:#f8fafc;color:#59657a;font-size:12px;text-transform:uppercase;letter-spacing:.045em;font-weight:800;white-space:nowrap}
td{color:#27364f}
tr:last-child td{border-bottom:0}
tbody tr:hover{background:#fbfdff}
.cell-primary{font-weight:780;color:#1d3355}
.cell-sub{margin-top:3px;font-size:12px;color:var(--muted)}
.empty-state{text-align:center!important;color:var(--muted);padding:28px!important}

.btn,button{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;
  border:0;border-radius:11px;padding:10px 15px;text-decoration:none;cursor:pointer;
  background:linear-gradient(145deg,var(--primary),var(--primary-2));color:#fff;font-weight:760;
  box-shadow:0 7px 16px rgba(23,77,159,.16);transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;
}
.btn:hover,button:hover{transform:translateY(-1px);filter:brightness(1.03);box-shadow:0 9px 20px rgba(23,77,159,.2)}
.btn.secondary{background:#edf3fb;color:#244c80;box-shadow:none;border:1px solid #dce7f5}
.btn.danger{background:#b9362c;box-shadow:0 7px 16px rgba(185,54,44,.16)}
.btn.small{min-height:34px;padding:7px 10px;font-size:12px;border-radius:9px}
.btn.ghost{background:#fff;color:#3b4f70;border:1px solid var(--line);box-shadow:none}

.form-card{max-width:860px;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:23px;box-shadow:var(--shadow)}
.form-card.wide{max-width:none}
.row{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.field{margin-bottom:16px}
.field label{display:block;font-weight:760;margin-bottom:7px;color:#31425d;font-size:13px}
.field input,.field select,.field textarea{
  width:100%;min-height:44px;padding:11px 12px;border:1px solid #d8dee8;border-radius:11px;background:#fff;color:#1f2d42;
  outline:none;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.field textarea{min-height:130px;resize:vertical;line-height:1.55}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#6ea0e6;box-shadow:0 0 0 4px rgba(37,99,199,.10);background:#fff}
.field input::placeholder,.field textarea::placeholder{color:#9aa4b3}
.field-help{font-size:12px;color:var(--muted);margin-top:6px}
.form-section{padding:3px 0 6px}
.form-section-title{font-weight:820;font-size:14px;color:#203657;margin:3px 0 14px}
.form-divider{height:1px;background:var(--line);margin:5px 0 20px}

.toggle-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:14px 15px;border:1px solid var(--line);border-radius:13px;background:#fbfcfe;margin-bottom:12px}
.toggle-copy strong{display:block;color:#253856}.toggle-copy span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.switch{position:relative;display:inline-block;width:46px;height:26px;flex:0 0 auto}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;inset:0;background:#cbd3df;border-radius:99px;transition:.2s;cursor:pointer}
.slider:before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;background:#fff;border-radius:50%;box-shadow:0 2px 5px rgba(0,0,0,.18);transition:.2s}
.switch input:checked + .slider{background:var(--success)}
.switch input:checked + .slider:before{transform:translateX(20px)}

.alert{padding:13px 15px;border-radius:12px;margin-bottom:16px;border:1px solid transparent;font-weight:650}
.alert.success{background:var(--success-soft);color:#057a55;border-color:#c9f3df}
.alert.error{background:var(--danger-soft);color:#a12a22;border-color:#ffd7d2}
.alert.info{background:#eef6ff;color:#1857a2;border-color:#d6e8ff}
.badge{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800;background:#eef2f6;color:#59657a;text-transform:capitalize}
.badge.on{background:var(--success-soft);color:#087a57}.badge.on:before{content:"";width:6px;height:6px;border-radius:50%;background:#0f9f6e}
.badge.off{background:var(--danger-soft);color:#a12a22}.badge.off:before{content:"";width:6px;height:6px;border-radius:50%;background:#c0362c}
.badge.info{background:#edf4ff;color:#245aa8}

.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px;flex-wrap:wrap}
.search{display:flex;gap:8px;flex-wrap:wrap;flex:1;max-width:560px}
.search input{flex:1;min-width:250px;min-height:42px;padding:10px 12px;border:1px solid #d8dee8;border-radius:11px;background:#fff;outline:none}
.search input:focus{border-color:#6ea0e6;box-shadow:0 0 0 4px rgba(37,99,199,.09)}
.actions{display:flex;gap:8px;flex-wrap:wrap}

.login-shell{max-width:430px;margin:7vh auto 4vh;padding:0 16px}
.login-brand{text-align:center;margin-bottom:20px}
.login-brand .brand-mark{margin:0 auto 12px;width:58px;height:58px;border-radius:17px;font-size:26px}
.login-brand h1{margin:0;color:#183866;font-size:27px;letter-spacing:-.035em}
.login-brand p{margin:7px 0 0;color:var(--muted)}
.login-card{max-width:none;padding:25px}
.login-card button{width:100%;margin-top:2px}

.occasion-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border-radius:9px;background:#f2f6fb;font-size:12px;font-weight:700;color:#36547d}
.occasion-chip.birthday{background:#fff4e9;color:#a15b13}.occasion-chip.anniversary{background:#fff0f5;color:#9b3d65}
.inline-note{padding:12px 14px;border-radius:12px;background:#f8fafc;border:1px solid var(--line);color:#5e6b7f;font-size:13px}
hr{border:0;border-top:1px solid var(--line);margin:22px 0}
code{background:#f0f3f7;padding:2px 6px;border-radius:6px;font-size:12px}

footer{text-align:center;color:#8993a2;padding:18px 16px 34px;font-size:12px}
footer a{text-decoration:none;color:#315d9b;font-weight:760}

@media(max-width:980px){
  .app-header{align-items:flex-start;flex-direction:column;gap:9px;padding-bottom:9px}
  .brand-wrap{width:100%}
  .main-nav{width:100%;overflow-x:auto;flex-wrap:nowrap;justify-content:flex-start;padding-bottom:2px;scrollbar-width:none}
  .main-nav::-webkit-scrollbar{display:none}
  .main-nav a{flex:0 0 auto}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:700px){
  body{background:#f5f8fc;padding-bottom:68px}
  .app-header{position:static;padding:14px 15px 12px;background:#fff}
  .brand-mark{width:39px;height:39px;border-radius:12px}
  .brand{font-size:16px}
  .main-nav{
    position:fixed;left:8px;right:8px;bottom:8px;z-index:50;width:auto;
    display:grid;grid-template-columns:repeat(6,1fr);gap:3px;padding:7px;
    background:rgba(255,255,255,.96);border:1px solid #dfe5ed;border-radius:17px;
    box-shadow:0 12px 34px rgba(18,39,73,.18);backdrop-filter:blur(14px);overflow:visible;
  }
  .main-nav a{padding:8px 4px;text-align:center;font-size:10px;line-height:1.15;border-radius:10px;overflow:hidden;text-overflow:ellipsis}
  .main-nav a.active{box-shadow:none}
  .main-nav .logout-link{display:none}
  .container{padding:20px 12px 34px}
  .page-head{align-items:flex-start;margin-bottom:16px}
  .page-title-wrap h1{font-size:26px}
  .hero-strip{padding:18px;border-radius:18px}
  .grid{grid-template-columns:1fr 1fr;gap:10px}
  .metric-card{min-height:112px;padding:15px}
  .metric{font-size:29px}
  .metric-icon{width:35px;height:35px;font-size:17px}
  .row{grid-template-columns:1fr;gap:0}
  .form-card{padding:17px;border-radius:17px}
  .toolbar{align-items:stretch}
  .search{max-width:none;width:100%}.search input{min-width:0;width:100%}.search button{flex:0 0 auto}
  .toolbar>.actions{width:100%}.toolbar>.actions .btn{flex:1}
  .actions{width:100%}.actions .btn,.actions button{flex:1}

  .responsive-table{border:0;background:transparent;box-shadow:none;overflow:visible}
  .responsive-table table,.responsive-table thead,.responsive-table tbody,.responsive-table th,.responsive-table td,.responsive-table tr{display:block;width:100%}
  .responsive-table thead{display:none}
  .responsive-table tr{background:#fff;border:1px solid var(--line);border-radius:16px;margin-bottom:10px;padding:9px 12px;box-shadow:var(--shadow-sm)}
  .responsive-table td{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:8px 0;border:0;white-space:normal;text-align:right}
  .responsive-table td:before{content:attr(data-label);font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:800;color:#8490a2;text-align:left;flex:0 0 38%}
  .responsive-table td[data-label="Resident"],.responsive-table td.primary-mobile{display:block;text-align:left;padding:9px 0 10px;border-bottom:1px solid #eef1f5}
  .responsive-table td[data-label="Resident"]:before,.responsive-table td.primary-mobile:before{display:none}
  .responsive-table td.actions-cell{display:block;text-align:left;padding-top:10px;border-top:1px solid #eef1f5;margin-top:3px}
  .responsive-table td.actions-cell:before{display:none}
  .responsive-table td.actions-cell .btn{width:100%}
  .responsive-table .empty-state{display:block!important;text-align:center!important;padding:20px!important}
  .responsive-table .empty-state:before{display:none}

  .toggle-row{padding:12px}
  footer{padding-bottom:20px}
}

@media(max-width:430px){
  .grid{grid-template-columns:1fr 1fr}
  .metric-card{padding:14px;min-height:108px}
  .metric-label{font-size:11px}.metric{font-size:27px}
  .main-nav{left:5px;right:5px;bottom:5px;padding:6px 4px}
  .main-nav a{font-size:9.5px;padding:8px 2px}
  .btn,button{padding-left:12px;padding-right:12px}
}

/* ===== v1.2 interactive dashboard ===== */
.metric-link{display:block;text-decoration:none;color:inherit;cursor:pointer;position:relative;outline:none}
.metric-link:hover{transform:translateY(-4px);border-color:#d5e2f4;box-shadow:0 18px 38px rgba(20,55,105,.13)}
.metric-link:focus-visible{box-shadow:0 0 0 4px rgba(37,99,199,.16),0 18px 38px rgba(20,55,105,.13)}
.metric-action{margin-top:12px;font-size:11px;font-weight:800;color:#5d78a2;opacity:.85;display:flex;align-items:center;gap:5px}
.metric-action span{transition:transform .16s ease}.metric-link:hover .metric-action span{transform:translateX(3px)}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:28px}.section-head h2{margin:0 0 14px}.section-link{margin:0 0 14px;color:var(--primary);font-size:12px;font-weight:800;text-decoration:none}.section-link:hover{text-decoration:underline}
.clickable-table .click-row{cursor:pointer;transition:background .15s ease,box-shadow .15s ease}.clickable-table .click-row:hover{background:#f7fbff}.clickable-table .click-row:focus-visible{outline:2px solid #6ea0e6;outline-offset:-2px}
.filter-tabs{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 16px}.filter-tabs a{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 12px;border-radius:10px;border:1px solid var(--line);background:#fff;text-decoration:none;color:#52627b;font-size:12px;font-weight:800;box-shadow:0 3px 10px rgba(20,42,78,.03)}.filter-tabs a:hover{background:var(--primary-soft);color:var(--primary)}.filter-tabs a.active{background:linear-gradient(145deg,var(--primary),var(--primary-2));color:#fff;border-color:transparent}.compact-tabs{margin-top:-4px}
.occasion-list{display:grid;gap:12px}.occasion-card{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:15px;padding:16px 18px;background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow-sm);text-decoration:none;color:inherit;transition:.17s ease}.occasion-card:hover{transform:translateY(-2px);border-color:#d6e2f2;box-shadow:0 13px 30px rgba(20,55,105,.10)}.occasion-card-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:var(--primary-soft);font-size:22px}.occasion-card-name{font-size:16px;font-weight:850;color:#1b355a}.occasion-card-meta{margin-top:3px;color:var(--muted);font-size:12px}.occasion-card-date{margin-top:5px;font-size:12px;font-weight:750;color:#526b91}.occasion-card-status{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.occasion-card-arrow{font-size:20px;color:#6d84a7;font-weight:700}.empty-panel{text-align:center;color:var(--muted);padding:28px}
@media(max-width:700px){.main-nav{grid-template-columns:repeat(7,1fr)}.metric-action{font-size:10px;margin-top:9px}.section-head{align-items:flex-end}.section-link{white-space:nowrap}.occasion-tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px;scrollbar-width:none}.occasion-tabs::-webkit-scrollbar{display:none}.occasion-tabs a{flex:0 0 auto}.occasion-card{grid-template-columns:auto 1fr auto;gap:11px;padding:14px}.occasion-card-status{grid-column:2/4;align-items:flex-start;flex-direction:row;flex-wrap:wrap}.occasion-card-arrow{grid-column:3;grid-row:1;align-self:center}.occasion-card-icon{width:42px;height:42px;border-radius:12px;font-size:19px}.occasion-card-name{font-size:15px}}
@media(max-width:430px){.metric-action{display:none}.main-nav a{font-size:8.8px}}

/* ===== v1.3 resident history + Maya Garden City branding ===== */
.brand-home{display:flex;text-decoration:none;color:inherit}.brand-logo{display:block;width:280px;max-width:42vw;height:48px;object-fit:contain;object-position:left center}.brand-wrap{min-width:280px}
.resident-history-section{margin-top:26px}.resident-history-head{align-items:flex-end}.resident-history-head h2{margin:0 0 5px;color:#1b355a}.resident-history-head p{margin:0;color:var(--muted);font-size:13px}
.history-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:15px 0}.history-summary-card{display:flex;align-items:center;gap:12px;padding:15px;background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow-sm)}.history-summary-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#f0f6ff;font-size:19px}.history-summary-card small{display:block;color:var(--muted);font-weight:750;font-size:11px;text-transform:uppercase;letter-spacing:.035em}.history-summary-card strong{display:block;margin-top:3px;color:#203a60;font-size:14px}
.history-card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-sm);overflow:hidden}.history-card-title{display:flex;justify-content:space-between;gap:15px;padding:18px 20px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#fff,#fbfcff)}.history-card-title h3{margin:0;color:#1b355a;font-size:17px}.history-card-title p{margin:4px 0 0;color:var(--muted);font-size:12px}.history-timeline{padding:4px 20px}.history-event{position:relative;display:grid;grid-template-columns:44px 1fr;gap:13px;padding:17px 0;border-bottom:1px solid #edf1f6}.history-event:last-child{border-bottom:0}.history-event-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#f3f7fc;font-size:18px}.history-event-top{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#1f385d}.history-status{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.03em;background:#eef2f6;color:#647086}.history-status.sent{background:#e8f8f0;color:#087553}.history-status.failed{background:#ffefed;color:#ac352c}.history-event-message{margin:7px 0;color:#52627a;font-size:12px;line-height:1.5;max-width:820px}.history-event-meta{display:flex;gap:12px;flex-wrap:wrap;color:#8a95a6;font-size:11px}.empty-history{text-align:center;padding:34px 18px;color:var(--muted)}.empty-history>div{font-size:27px;margin-bottom:8px}.empty-history strong,.empty-history span{display:block}.empty-history strong{color:#344a69;margin-bottom:4px}
.login-page{min-height:calc(100vh - 68px);display:grid;grid-template-columns:minmax(0,1.05fr) minmax(430px,.95fr);margin:-34px -24px -10px}.login-showcase{position:relative;display:flex;align-items:center;overflow:hidden;padding:62px;background:linear-gradient(145deg,#0e397c,#1c5bb7 58%,#2f79d9);color:#fff}.login-showcase:before{content:"";position:absolute;width:440px;height:440px;border-radius:50%;right:-180px;top:-150px;background:rgba(255,255,255,.08)}.login-showcase:after{content:"";position:absolute;width:300px;height:300px;border-radius:50%;left:-130px;bottom:-150px;background:rgba(255,255,255,.06)}.login-showcase-inner{position:relative;z-index:1;max-width:590px}.login-main-logo{width:320px;max-width:90%;height:auto;filter:brightness(0) invert(1);margin-bottom:48px}.login-eyebrow{display:inline-flex;padding:7px 11px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:rgba(255,255,255,.08);font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.login-showcase h1{font-size:44px;line-height:1.08;letter-spacing:-.045em;margin:18px 0 16px;max-width:520px}.login-showcase>div>p{max-width:520px;margin:0;color:rgba(255,255,255,.82);font-size:16px;line-height:1.65}.login-points{display:grid;gap:13px;margin-top:35px}.login-points>div{display:grid;grid-template-columns:28px 1fr;column-gap:10px}.login-points>div>span{grid-row:1/3;width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:rgba(255,255,255,.14);font-weight:900}.login-points strong{font-size:13px}.login-points small{display:block;color:rgba(255,255,255,.68);margin-top:2px}.login-panel{display:flex;align-items:center;justify-content:center;padding:45px 42px;background:#f8faff}.login-panel-inner{width:100%;max-width:430px}.login-mobile-brand{display:none}.login-copy{margin-bottom:23px}.login-kicker{color:var(--primary);font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.login-copy h2{margin:7px 0 6px;color:#19365f;font-size:30px;letter-spacing:-.035em}.login-copy p{margin:0;color:var(--muted);font-size:13px;line-height:1.55}.login-card{padding:23px;border-radius:18px}.login-button{display:flex;align-items:center;justify-content:center;gap:10px}.login-button span{font-size:17px;transition:transform .18s}.login-button:hover span{transform:translateX(3px)}.login-security{text-align:center;margin-top:18px;color:#8b96a7;font-size:11px}
@media(max-width:980px){.brand-logo{width:250px;max-width:70vw}.brand-wrap{min-width:0}.history-summary-grid{grid-template-columns:repeat(2,1fr)}.login-page{grid-template-columns:1fr;min-height:0;margin:-20px -12px -5px}.login-showcase{display:none}.login-panel{min-height:calc(100vh - 55px);padding:36px 20px}.login-mobile-brand{display:block;text-align:center;margin-bottom:28px}.login-mobile-brand img{width:300px;max-width:90%}}
@media(max-width:700px){.brand-logo{width:225px;height:42px;max-width:76vw}.resident-history-section{margin-top:20px}.resident-history-head{align-items:flex-start}.history-summary-grid{grid-template-columns:1fr 1fr;gap:9px}.history-summary-card{padding:12px;gap:9px}.history-summary-icon{width:35px;height:35px;font-size:16px}.history-summary-card strong{font-size:12px}.history-card-title{padding:15px}.history-timeline{padding:0 14px}.history-event{grid-template-columns:38px 1fr;gap:10px;padding:15px 0}.history-event-icon{width:34px;height:34px}.history-event-top{align-items:flex-start}.history-event-message{font-size:11.5px}.login-panel{padding:27px 14px}.login-copy h2{font-size:26px}.login-card{padding:18px}}
@media(max-width:430px){.brand-logo{width:205px}.history-summary-grid{grid-template-columns:1fr 1fr}.history-summary-card{display:block}.history-summary-icon{margin-bottom:8px}.history-event-top{display:block}.history-status{margin-top:6px}.login-mobile-brand img{width:250px}}

/* =========================================================
   MAYA GARDEN CITY — OFFICIAL LOGO
   ========================================================= */

/* Top navigation logo */
.brand-logo{
    width: 150px !important;
    height: 62px !important;
    max-width: none !important;
    object-fit: contain !important;
    object-position: left center !important;
}

.brand-wrap{
    min-width: 170px !important;
    display: flex;
    align-items: center;
}

/* Login desktop logo */
.login-main-logo{
    width: 250px !important;
    max-width: 85% !important;
    height: auto !important;
    margin: 0 0 34px 0 !important;

    /* Important: preserve official logo colours */
    filter: none !important;
}

/* Mobile login logo */
.login-mobile-brand img{
    width: 220px !important;
    max-width: 80% !important;
    height: auto !important;
    filter: none !important;
}

/* Mobile header */
@media (max-width: 700px){
    .brand-logo{
        width: 115px !important;
        height: 50px !important;
    }

    .brand-wrap{
        min-width: 120px !important;
    }
}

@media (max-width: 430px){
    .brand-logo{
        width: 100px !important;
        height: 46px !important;
    }

    .login-mobile-brand img{
        width: 190px !important;
    }
}


/* =========================================================
   LOGIN BRANDING ALIGNMENT FIX
   ========================================================= */

.login-brand-row{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    min-height:120px;
    margin-bottom:28px;
}

.login-main-logo{
    display:block;
    width:210px !important;
    max-width:70% !important;
    height:auto !important;
    margin:0 !important;
    object-fit:contain !important;
    object-position:left center !important;
    filter:none !important;
}

/* Keep content visually balanced below logo */
.login-hero-content{
    padding-top:6px !important;
}

/* Tablet */
@media (max-width: 991px){
    .login-main-logo{
        width:190px !important;
        max-width:75% !important;
    }

    .login-brand-row{
        min-height:105px;
        margin-bottom:24px;
    }
}

/* Mobile */
@media (max-width: 767px){
    .login-brand-row{
        justify-content:center;
        min-height:auto;
        margin-bottom:20px;
    }

    .login-main-logo{
        width:180px !important;
        max-width:72% !important;
        margin:0 auto !important;
    }
}

/* =========================================================
   MAYA GARDEN CITY LOGIN — FINAL LOGO ALIGNMENT
   ========================================================= */

/* Desktop login */
.login-showcase-inner{
    width:100%;
    max-width:590px;
}

.login-main-logo{
    display:block !important;
    width:190px !important;
    max-width:190px !important;
    height:auto !important;

    margin:0 0 46px 0 !important;

    object-fit:contain !important;
    object-position:left center !important;

    filter:none !important;
}

/* Keep portal badge aligned with the rest of the content */
.login-eyebrow{
    margin-left:0 !important;
}

/* Mobile login */
.login-mobile-brand{
    text-align:center !important;
}

.login-mobile-brand img{
    display:block !important;
    width:185px !important;
    max-width:70% !important;
    height:auto !important;

    margin:0 auto 26px !important;

    object-fit:contain !important;
    filter:none !important;
}

/* Smaller phones */
@media(max-width:430px){

    .login-mobile-brand img{
        width:165px !important;
        max-width:68% !important;
    }

}


/* =========================================================
   LOGIN LEFT PANEL — COMPACT BRAND SPACING
   ========================================================= */

@media (min-width:981px){

    .login-showcase{
        align-items:flex-start !important;
        padding-top:58px !important;
        padding-bottom:45px !important;
    }

    .login-showcase-inner{
        margin:0 !important;
    }

    .login-main-logo{
        width:185px !important;
        max-width:185px !important;
        height:auto !important;

        margin:0 0 24px 0 !important;

        display:block !important;
        object-fit:contain !important;
        filter:none !important;
    }

    .login-eyebrow{
        margin-top:0 !important;
    }

}


/* =========================================================
   LOGOUT BUTTON — PROMINENT RED
   ========================================================= */

.topnav a.logout-link{
    color:#ffffff !important;
    background:#dc3545 !important;
    border:1px solid #dc3545 !important;
    border-radius:9px !important;
    padding:10px 16px !important;
    margin-left:5px !important;
    box-shadow:0 4px 10px rgba(220,53,69,.16) !important;

    transition:
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease !important;
}

.topnav a.logout-link:hover{
    color:#ffffff !important;
    background:#bb2d3b !important;
    border-color:#b02a37 !important;
    box-shadow:0 7px 16px rgba(220,53,69,.28) !important;
    transform:translateY(-1px);
}

.topnav a.logout-link:active{
    background:#a52834 !important;
    border-color:#9b2732 !important;
    box-shadow:0 2px 6px rgba(220,53,69,.20) !important;
    transform:translateY(0);
}

.topnav a.logout-link:focus-visible{
    outline:3px solid rgba(220,53,69,.25) !important;
    outline-offset:2px;
}

/* FINAL LOGOUT BUTTON STYLE */
a.logout-link{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;

    background:#dc3545 !important;
    color:#fff !important;

    padding:10px 16px !important;
    border-radius:8px !important;
    border:1px solid #dc3545 !important;

    font-weight:700 !important;
    text-decoration:none !important;

    box-shadow:0 4px 10px rgba(220,53,69,.18) !important;
    transition:all .18s ease !important;
}

a.logout-link:hover{
    background:#b02a37 !important;
    border-color:#b02a37 !important;
    color:#fff !important;
    transform:translateY(-1px) !important;
    box-shadow:0 7px 16px rgba(220,53,69,.28) !important;
}

/* =========================================================
   v1.5 — DYNAMIC SOCIETY BRANDING
   ========================================================= */

.brand-home{
    gap:12px;
}

.brand-logo{
    flex:0 0 auto;
}

.brand-text{
    display:flex;
    flex-direction:column;
    min-width:0;
    line-height:1.15;
}

.brand-text strong{
    color:#17345d;
    font-size:14px;
    font-weight:850;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:185px;
}

.brand-text small{
    margin-top:3px;
    color:#8590a2;
    font-size:9px;
    font-weight:750;
    text-transform:uppercase;
    letter-spacing:.045em;
}

.login-society-name{
    margin:-10px 0 22px;
    color:#ffffff;
    font-size:19px;
    font-weight:850;
    letter-spacing:-.02em;
}

.login-mobile-brand strong{
    display:block;
    margin-top:-13px;
    color:#1b355a;
    font-size:18px;
    font-weight:850;
}

.branding-settings-card{
    overflow:hidden;
}

.branding-preview{
    display:flex;
    align-items:center;
    gap:18px;
    margin:22px 0;
    padding:18px;
    border:1px solid var(--line);
    border-radius:16px;
    background:linear-gradient(180deg,#fbfdff,#f6f9fd);
}

.branding-preview-logo{
    width:120px;
    height:74px;
    flex:0 0 120px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:7px;
    border-radius:13px;
    background:#fff;
    border:1px solid #e6ebf2;
}

.branding-preview-logo img{
    display:block;
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

.branding-preview-copy{
    min-width:0;
}

.branding-preview-copy strong{
    display:block;
    color:#1b355a;
    font-size:18px;
    font-weight:850;
}

.branding-preview-copy span{
    display:block;
    margin-top:4px;
    color:var(--muted);
    font-size:12px;
}

.field-help{
    margin-top:7px;
    color:var(--muted);
    font-size:11px;
    line-height:1.5;
}

@media(max-width:980px){
    .brand-text{
        display:none;
    }

    .login-mobile-brand strong{
        margin-top:-7px;
        margin-bottom:22px;
    }
}

@media(max-width:700px){
    .branding-preview{
        align-items:flex-start;
    }

    .branding-preview-logo{
        width:92px;
        height:64px;
        flex-basis:92px;
    }

    .branding-preview-copy strong{
        font-size:15px;
    }
}

/* =========================================================
   HEADER — COMPACT BRAND + NAV ALIGNMENT
   ========================================================= */

@media (min-width:981px){

    .app-header{
        justify-content:flex-start !important;
        gap:0 !important;
    }

    .brand-wrap{
        width:auto !important;
        min-width:0 !important;
        max-width:none !important;
        margin:0 !important;
        flex:0 0 auto !important;
    }

    .brand-logo{
        flex:0 0 auto !important;
    }

    .brand-text{
        width:auto !important;
        min-width:0 !important;
        max-width:190px !important;
    }

    .main-nav{
        margin-left:54px !important;
        margin-right:0 !important;
    }

}

/* =========================================================
   HEADER BRANDING — FINAL SPACING FIX
   ========================================================= */

@media (min-width:981px){

    /* Restore menu to its proper right-side position */
    .app-header{
        justify-content:space-between !important;
        gap:24px !important;
    }

    /* Logo + society name stay together */
    .brand-wrap{
        display:flex !important;
        align-items:center !important;
        gap:8px !important;

        width:auto !important;
        min-width:0 !important;
        max-width:none !important;

        margin:0 !important;
        flex:0 0 auto !important;
    }

    /* IMPORTANT:
       Do not give the square logo a 150px-wide invisible box */
    .brand-logo{
        width:68px !important;
        height:48px !important;
        max-width:68px !important;

        flex:0 0 68px !important;

        object-fit:contain !important;
        object-position:center center !important;
    }

    .brand-text{
        width:auto !important;
        min-width:0 !important;
        max-width:190px !important;
        margin:0 !important;
    }

    .main-nav{
        margin-left:auto !important;
        margin-right:0 !important;
    }
}

/* =========================================================
   v1.6 — MOBILE UI REBUILD
   Desktop remains unchanged
   ========================================================= */

.mobile-menu{
    display:none;
}

@media (max-width: 760px){

    html,
    body{
        max-width:100%;
        overflow-x:hidden;
    }

    body{
        background:#f4f7fb;
    }

    /* ---------- HEADER ---------- */

    .app-header{
        position:sticky !important;
        top:0;
        z-index:1000;
        min-height:64px !important;
        height:64px !important;
        padding:8px 14px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:space-between !important;
        gap:12px !important;
        background:rgba(255,255,255,.97) !important;
        border-bottom:1px solid #e6ebf2 !important;
        box-shadow:0 3px 14px rgba(28,52,88,.07) !important;
        backdrop-filter:blur(10px);
    }

    .desktop-nav{
        display:none !important;
    }

    .brand-wrap{
        min-width:0 !important;
        width:auto !important;
        max-width:calc(100% - 58px) !important;
        gap:8px !important;
        display:flex !important;
        align-items:center !important;
    }

    .brand-logo{
        width:48px !important;
        height:42px !important;
        max-width:48px !important;
        flex:0 0 48px !important;
        object-fit:contain !important;
    }

    .brand-text{
        display:flex !important;
        min-width:0 !important;
        max-width:220px !important;
    }

    .brand-text strong{
        max-width:190px !important;
        font-size:13px !important;
        line-height:1.15 !important;
    }

    .brand-text small{
        font-size:8px !important;
        margin-top:2px !important;
    }

    /* ---------- HAMBURGER ---------- */

    .mobile-menu{
        display:block;
        position:relative;
        flex:0 0 auto;
    }

    .mobile-menu summary{
        list-style:none;
        width:44px;
        height:44px;
        display:grid;
        place-items:center;
        cursor:pointer;
        border:1px solid #dbe4ef;
        border-radius:12px;
        background:#fff;
        box-shadow:0 4px 12px rgba(31,55,87,.08);
    }

    .mobile-menu summary::-webkit-details-marker{
        display:none;
    }

    .mobile-menu-icon{
        width:20px;
        display:grid;
        gap:4px;
    }

    .mobile-menu-icon i{
        display:block;
        height:2px;
        border-radius:5px;
        background:#24446f;
    }

    .mobile-menu[open] summary{
        background:#edf4ff;
        border-color:#b9d0ef;
    }

    .mobile-menu-panel{
        position:absolute;
        right:0;
        top:53px;
        width:min(290px,calc(100vw - 28px));
        padding:9px;
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:7px;
        border:1px solid #e1e7f0;
        border-radius:17px;
        background:#fff;
        box-shadow:0 18px 45px rgba(20,42,74,.18);
    }

    .mobile-menu-panel a{
        min-height:52px;
        padding:10px 11px;
        display:flex;
        align-items:center;
        gap:8px;
        border-radius:11px;
        color:#314965;
        text-decoration:none;
        font-size:12px;
        font-weight:750;
        background:#f8fafe;
        border:1px solid transparent;
    }

    .mobile-menu-panel a span{
        width:22px;
        text-align:center;
        font-size:15px;
    }

    .mobile-menu-panel a.active{
        color:#fff;
        background:#2461bd;
    }

    .mobile-menu-panel .mobile-logout{
        color:#fff;
        background:#dc3545;
        grid-column:1 / -1;
        justify-content:center;
    }

    /* ---------- PAGE SHELL ---------- */

    .container{
        width:auto !important;
        max-width:none !important;
        margin:0 !important;
        padding:24px 14px 28px !important;
    }

    .page-head{
        margin:0 0 20px !important;
    }

    .page-head h1{
        font-size:30px !important;
        line-height:1.12 !important;
        letter-spacing:-.035em !important;
        margin:0 !important;
    }

    .page-kicker{
        margin-top:8px !important;
        font-size:13px !important;
        line-height:1.55 !important;
    }

    /* ---------- DASHBOARD HERO ---------- */

    .dashboard-hero,
    .hero-card{
        border-radius:18px !important;
        padding:23px 20px !important;
        min-height:auto !important;
        margin-bottom:18px !important;
    }

    .dashboard-hero h2,
    .hero-card h2{
        font-size:20px !important;
        margin-bottom:8px !important;
    }

    .dashboard-hero p,
    .hero-card p{
        max-width:100% !important;
        font-size:13px !important;
        line-height:1.6 !important;
    }

    /* ---------- METRIC CARDS ---------- */

    .metric-grid,
    .dashboard-grid,
    .stats-grid{
        grid-template-columns:1fr 1fr !important;
        gap:10px !important;
        margin-bottom:25px !important;
    }

    .metric-card,
    .stat-card{
        min-height:138px !important;
        padding:17px 15px !important;
        border-radius:17px !important;
    }

    .metric-label,
    .stat-label{
        padding-right:34px !important;
        font-size:11px !important;
        line-height:1.35 !important;
    }

    .metric-number,
    .stat-number{
        margin-top:22px !important;
        font-size:34px !important;
        line-height:1 !important;
    }

    .metric-action{
        display:none !important;
    }

    .metric-icon,
    .stat-icon{
        top:14px !important;
        right:13px !important;
        width:38px !important;
        height:38px !important;
        font-size:17px !important;
    }

    /* ---------- SECTION HEADERS ---------- */

    .section-title,
    .section-title-row{
        align-items:center !important;
        gap:10px !important;
        margin:24px 0 12px !important;
    }

    .section-title h2,
    .section-title-row h2,
    .section-heading{
        font-size:21px !important;
        line-height:1.2 !important;
    }

    .section-link{
        font-size:11px !important;
        white-space:nowrap;
    }

    /* ---------- TABLES / LISTS ---------- */

    .table-wrap,
    .table-card{
        border-radius:17px !important;
        overflow:hidden !important;
    }

    table{
        font-size:12px !important;
    }

    /* Dashboard upcoming table: hide header and use card-like rows */
    .upcoming-table thead{
        display:none !important;
    }

    .upcoming-table,
    .upcoming-table tbody,
    .upcoming-table tr,
    .upcoming-table td{
        display:block !important;
        width:100% !important;
    }

    .upcoming-table tr{
        padding:15px !important;
        border-bottom:1px solid #edf1f6 !important;
    }

    .upcoming-table td{
        padding:3px 0 !important;
        border:0 !important;
    }

    /* ---------- FORMS ---------- */

    .form-card{
        padding:18px !important;
        border-radius:17px !important;
    }

    .row{
        grid-template-columns:1fr !important;
        gap:0 !important;
    }

    input,
    select,
    textarea,
    button,
    .btn{
        min-height:46px;
        font-size:14px !important;
    }

    /* ---------- FOOTER ---------- */

    footer{
        padding:20px 12px 30px !important;
        font-size:11px !important;
        line-height:1.5 !important;
    }

    /* ---------- RESIDENTS PAGE ---------- */

    .residents-toolbar,
    .toolbar,
    .filter-toolbar{
        display:grid !important;
        grid-template-columns:1fr !important;
        gap:9px !important;
    }

    .toolbar-actions{
        display:grid !important;
        grid-template-columns:1fr 1fr !important;
        gap:8px !important;
    }

    /* ---------- BRANDING SETTINGS ---------- */

    .branding-preview{
        gap:12px !important;
        padding:13px !important;
    }

    .branding-preview-logo{
        width:78px !important;
        height:58px !important;
        flex-basis:78px !important;
    }
}

@media (max-width: 390px){

    .container{
        padding-left:11px !important;
        padding-right:11px !important;
    }

    .brand-text strong{
        max-width:150px !important;
        font-size:12px !important;
    }

    .metric-card,
    .stat-card{
        min-height:132px !important;
        padding:15px 13px !important;
    }

    .metric-number,
    .stat-number{
        font-size:31px !important;
    }

    .mobile-menu-panel{
        width:calc(100vw - 22px);
    }
}

/* =========================================================
   MOBILE HEADER + MENU — FINAL FIX v1.6.1
   ========================================================= */

@media (max-width:760px){

    /* Keep header as ONE horizontal row */
    .app-header{
        position:sticky !important;
        top:0 !important;
        z-index:2000 !important;

        width:100% !important;
        height:64px !important;
        min-height:64px !important;

        padding:7px 14px !important;

        display:flex !important;
        flex-direction:row !important;
        flex-wrap:nowrap !important;

        align-items:center !important;
        justify-content:space-between !important;

        background:#ffffff !important;
        border-bottom:1px solid #e4eaf2 !important;
        box-shadow:0 3px 14px rgba(27,48,78,.08) !important;

        overflow:visible !important;
    }

    /* Brand stays left */
    .brand-home,
    .brand-wrap{
        display:flex !important;
        flex-direction:row !important;
        align-items:center !important;

        width:auto !important;
        min-width:0 !important;
        max-width:calc(100% - 62px) !important;

        margin:0 !important;
        padding:0 !important;
        gap:8px !important;

        flex:1 1 auto !important;
    }

    .brand-logo{
        width:48px !important;
        height:44px !important;
        max-width:48px !important;
        flex:0 0 48px !important;

        margin:0 !important;
        padding:0 !important;

        object-fit:contain !important;
    }

    .brand-text{
        display:flex !important;
        flex-direction:column !important;
        justify-content:center !important;

        width:auto !important;
        min-width:0 !important;
        max-width:190px !important;

        margin:0 !important;
        padding:0 !important;
    }

    .brand-text strong{
        font-size:13px !important;
        line-height:1.15 !important;
    }

    .brand-text small{
        margin-top:2px !important;
        font-size:8px !important;
    }


    /* Hamburger fixed at RIGHT */
    details.mobile-menu{
        position:static !important;

        display:block !important;

        width:44px !important;
        height:44px !important;

        min-width:44px !important;
        max-width:44px !important;

        margin:0 !important;
        padding:0 !important;

        flex:0 0 44px !important;
    }

    details.mobile-menu > summary{
        position:relative !important;

        width:44px !important;
        height:44px !important;

        margin:0 !important;
        padding:0 !important;

        display:grid !important;
        place-items:center !important;

        border-radius:11px !important;
        border:1px solid #d9e3ef !important;

        background:#ffffff !important;

        box-shadow:0 4px 12px rgba(28,52,88,.10) !important;
    }


    /* Dropdown spans almost full phone width */
    .mobile-menu-panel{
        position:absolute !important;

        top:70px !important;
        left:12px !important;
        right:12px !important;

        width:auto !important;
        max-width:none !important;

        margin:0 !important;
        padding:10px !important;

        display:grid !important;
        grid-template-columns:1fr 1fr !important;

        gap:8px !important;

        background:#ffffff !important;

        border:1px solid #dfe6ef !important;
        border-radius:16px !important;

        box-shadow:0 18px 45px rgba(21,43,73,.20) !important;

        overflow:visible !important;
        z-index:2100 !important;
    }

    .mobile-menu-panel a{
        width:auto !important;
        min-width:0 !important;
        min-height:50px !important;

        margin:0 !important;
        padding:10px 11px !important;

        display:flex !important;
        align-items:center !important;
        justify-content:flex-start !important;

        gap:8px !important;

        border-radius:11px !important;

        white-space:nowrap !important;
        overflow:hidden !important;
        text-overflow:ellipsis !important;
    }

    .mobile-menu-panel a span{
        flex:0 0 22px !important;
    }

    .mobile-menu-panel a.active{
        background:#2461bd !important;
        color:#ffffff !important;
    }

    .mobile-menu-panel a.mobile-logout{
        grid-column:1 / -1 !important;

        justify-content:center !important;

        background:#dc3545 !important;
        color:#ffffff !important;

        border-radius:11px !important;
    }


    /* Dashboard must start BELOW header, not underneath menu button */
    main.container{
        padding-top:24px !important;
    }

    .page-head{
        margin-top:0 !important;
    }

}


/* Narrow phones */
@media (max-width:390px){

    .mobile-menu-panel{
        left:9px !important;
        right:9px !important;
    }

    .brand-text{
        max-width:155px !important;
    }

    .brand-text strong{
        font-size:12px !important;
    }

}

/* =========================================================
   v1.6.2 — MOBILE QUICK LAUNCH BAR
   ========================================================= */

.mobile-quick-nav{
    display:none;
}

@media(max-width:760px){

    body{
        padding-bottom:86px !important;
    }

    .mobile-quick-nav{
        position:fixed;
        left:10px;
        right:10px;
        bottom:calc(10px + env(safe-area-inset-bottom));
        z-index:1900;

        height:68px;
        padding:7px 8px;

        display:grid;
        grid-template-columns:repeat(5,1fr);
        align-items:end;
        gap:3px;

        background:rgba(255,255,255,.97);
        border:1px solid #dde5ef;
        border-radius:20px;

        box-shadow:
            0 12px 34px rgba(22,43,72,.18),
            0 2px 8px rgba(22,43,72,.08);

        backdrop-filter:blur(14px);
        -webkit-backdrop-filter:blur(14px);
    }

    .mobile-quick-nav a{
        position:relative;
        min-width:0;
        height:54px;

        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:center;

        gap:3px;

        color:#748197;
        text-decoration:none;

        border-radius:13px;

        transition:
            background-color .15s ease,
            color .15s ease,
            transform .15s ease;
    }

    .mobile-quick-nav a.active{
        color:#1f5ebc;
        background:#edf4ff;
    }

    .mobile-quick-nav a:active{
        transform:scale(.96);
    }

    .quick-nav-icon{
        height:23px;
        min-width:23px;

        display:grid;
        place-items:center;

        font-size:18px;
        line-height:1;
    }

    .mobile-quick-nav small{
        display:block;
        max-width:100%;

        font-size:9px;
        line-height:1;
        font-weight:800;

        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    /* Prominent centre action, matching HK app behaviour */
    .mobile-quick-nav .quick-nav-primary{
        height:64px;
        margin-top:-17px;

        color:#ffffff;
        background:transparent !important;
        overflow:visible;
    }

    .quick-nav-plus{
        width:48px;
        height:48px;

        display:grid;
        place-items:center;

        margin-top:-2px;

        color:#ffffff;

        background:linear-gradient(145deg,#174d9f,#2c72d3);

        border:5px solid #ffffff;
        border-radius:50%;

        box-shadow:
            0 7px 16px rgba(31,94,188,.30),
            0 2px 5px rgba(31,94,188,.16);

        font-size:29px;
        font-weight:400;
        line-height:1;
    }

    .mobile-quick-nav .quick-nav-primary small{
        margin-top:0;
        color:#31527d;
        font-size:9px;
    }

    /* Prevent content/footer from hiding behind the fixed bar */
    footer{
        padding-bottom:96px !important;
    }
}

@media(max-width:390px){

    .mobile-quick-nav{
        left:7px;
        right:7px;
        padding-left:5px;
        padding-right:5px;
    }

    .mobile-quick-nav small{
        font-size:8.4px;
    }

    .quick-nav-icon{
        font-size:17px;
    }
}
