/* Mobile application shell for signed-in user accounts only. */
.user-app-shell {
    --app-navy: #101b35;
    --app-ink: #17233e;
    --app-muted: #7b879e;
    --app-accent: #6558e8;
    --app-bg: #f4f6fb;
    min-height: 100vh;
    background: var(--app-bg);
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
}
.user-app-shell .site-navbar {
    min-height: 68px;
    background: rgba(16, 27, 53, .97) !important;
    box-shadow: 0 5px 22px rgba(16, 27, 53, .14);
    backdrop-filter: blur(14px);
}
.user-app-shell .site-navbar > .container { max-width: 1120px; }
.user-app-shell .navbar-brand { color: #fff; font-size: 1rem; }
.user-app-shell .navbar-brand .brand-icon { color: #fff; }
.user-app-shell .user-app-top-actions { display:flex; align-items:center; gap:.8rem; }
.user-app-greeting { color: rgba(255,255,255,.86); font-size:.88rem; font-weight:600; }
.user-app-avatar { width:40px; height:40px; display:grid; place-items:center; border-radius:15px; color:#fff; background:linear-gradient(145deg,#8176ff,#5549d4); box-shadow:0 6px 16px rgba(91,78,221,.3); font-size:1.15rem; }
.user-app-bottom-nav { position:fixed; z-index:1040; inset:auto 0 0; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); padding:.55rem max(.35rem,env(safe-area-inset-left)) calc(.55rem + env(safe-area-inset-bottom)); border-top:1px solid rgba(226,230,240,.85); background:rgba(255,255,255,.94); box-shadow:0 -8px 30px rgba(24,35,62,.08); backdrop-filter:blur(18px); }
.user-app-tab { display:flex; min-width:0; flex-direction:column; align-items:center; justify-content:center; gap:.12rem; padding:.12rem .15rem; color:#8993a8; font-size:.66rem; font-weight:600; line-height:1.2; transition:color .18s ease,transform .18s ease; }
.user-app-tab-icon { display:grid; width:34px; height:28px; place-items:center; border-radius:12px; font-size:1.18rem; transition:background .18s ease,transform .18s ease; }
.user-app-tab-badge { display:inline-grid; min-width:17px; height:17px; place-items:center; margin-left:.22rem; padding:0 .25rem; border-radius:999px; color:#fff; background:#ef476f; font-size:.63rem; font-weight:800; line-height:1; vertical-align:middle; }
.user-app-tab-badge[hidden] { display:none; }
.user-app-tab.active { color:var(--app-accent); }
.user-app-tab.active .user-app-tab-icon { background:#eeedff; transform:translateY(-2px); }
.user-app-tab:active { transform:scale(.95); }
.user-app-status { position:fixed; z-index:1050; inset:auto 1rem calc(88px + env(safe-area-inset-bottom)); display:none; width:max-content; max-width:calc(100% - 2rem); margin:auto; padding:.7rem 1rem; border-radius:14px; background:#18233c; color:#fff; box-shadow:0 10px 28px rgba(12,20,39,.2); font-size:.85rem; }
.user-app-status.show { display:block; animation:app-status-in .22s ease-out; }
.user-app-status button { margin-left:.75rem; border:0; background:none; color:#b9b4ff; font:inherit; font-weight:700; }
.pwa-login-card { display:grid; grid-template-columns:42px 1fr; gap:.15rem .8rem; align-items:center; margin-top:1.2rem; padding:1rem; border:1px solid #e7e9fb; border-radius:20px; background:linear-gradient(135deg,#f5f4ff,#fff 70%); }
.pwa-login-icon { display:grid; grid-row:span 2; width:42px; height:42px; place-items:center; border-radius:14px; color:#5b4ddd; background:#e9e7ff; font-size:1.3rem; }
.pwa-login-copy strong { display:block; color:#202b48; font-size:.9rem; }
.pwa-login-copy p { margin:.15rem 0 0; color:#78839a; font-size:.76rem; line-height:1.45; }
.pwa-login-button { grid-column:2; justify-self:start; margin-top:.5rem; padding:.5rem .85rem; border:0; border-radius:11px; color:white; background:#5b4ddd; font-size:.8rem; font-weight:700; box-shadow:0 5px 13px #5b4ddd30; }
.pwa-install-help { grid-column:1 / -1; margin:.65rem 0 0; padding:.7rem; border-radius:12px; color:#58647d; background:#fff; font-size:.75rem; line-height:1.55; }
.pwa-standalone-brand { display:none; }
.user-app-shell .site-main { min-height:calc(100vh - 68px); }
.user-app-shell .dashboard-section { padding-top:1.4rem; }
.user-app-shell .dashboard-hero { overflow:hidden; border:0; border-radius:26px; background:radial-gradient(circle at 90% 5%,rgba(255,255,255,.2),transparent 30%),linear-gradient(130deg,#262e67,#5b4ddd 62%,#786df3); box-shadow:0 18px 40px rgba(75,68,184,.2); color:#fff; }
.user-app-shell .dashboard-hero p,.user-app-shell .dashboard-eyebrow { color:rgba(255,255,255,.78); }
.user-app-shell .dashboard-hero h1 { color:#fff; }
.user-app-shell .dashboard-stat,.user-app-shell .content-card,.user-app-shell .event-card,.user-app-shell .profile-card,.user-app-shell .auth-card { border:1px solid #edf0f6; border-radius:20px; box-shadow:0 8px 24px rgba(26,38,67,.055); }
.user-app-shell .content-card,.user-app-shell .event-card { transition:transform .2s ease,box-shadow .2s ease; }
.user-app-shell .content-card:hover,.user-app-shell .event-card:hover { transform:translateY(-3px); box-shadow:0 14px 32px rgba(26,38,67,.1); }
.user-app-shell .site-footer { display:none; }
@keyframes app-status-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media (min-width: 992px) {
    .user-app-shell { padding-bottom:2rem; }
    .user-app-bottom-nav { position:static; display:flex; justify-content:center; gap:.45rem; padding:.7rem 1rem; border-top:0; border-bottom:1px solid #e9edf5; box-shadow:none; }
    .user-app-tab { flex-direction:row; gap:.4rem; padding:.55rem .9rem; border-radius:14px; font-size:.83rem; }
    .user-app-tab-icon { width:auto; height:auto; font-size:1rem; }
    .user-app-tab.active { background:#eeedff; }
    .user-app-tab.active .user-app-tab-icon { background:none; transform:none; }
    .user-app-status { inset:auto 1.5rem 1.5rem auto; }
}
@media (prefers-reduced-motion: reduce) { .user-app-tab,.user-app-tab-icon,.user-app-shell .content-card { transition:none; } }

@media (display-mode: standalone) {
    body.auth-page,
    body.auth-page.pwa-standalone-login {
        min-height:100vh;
        background:radial-gradient(circle at 90% 5%,rgba(122,111,255,.2),transparent 28rem),linear-gradient(160deg,#111b35,#202552 58%,#4c43a5);
    }
    body.auth-page .site-navbar { display:none !important; }
    body.auth-page #main-content { width:100%; max-width:100%; min-height:100vh; overflow-x:hidden; display:grid; place-items:center; }
    body.auth-page .auth-section { display:grid; place-items:center; width:100%; min-width:0; min-height:100vh; margin:0; padding:calc(1.25rem + env(safe-area-inset-top)) 1rem calc(1.25rem + env(safe-area-inset-bottom)); background:transparent; }
    body.auth-page .auth-section > .container { width:100%; max-width:460px; margin:0 auto; padding:0; }
    body.auth-page .auth-section > .container > .row { display:block; width:100%; margin:0; }
    body.auth-page .auth-section > .container > .row > div { display:block; width:100%; max-width:100%; padding:0; }
    body.auth-page .auth-card { padding:clamp(1.35rem,6vw,2rem); border:1px solid rgba(255,255,255,.65); border-radius:26px; box-shadow:0 28px 70px rgba(5,10,28,.32); }
    body.auth-page .pwa-login-card,
    body.auth-page .user-app-status,
    body.auth-page .site-footer,
    body.auth-page .auth-footer-note,
    body.auth-page .wa-float { display:none !important; }
    body.auth-page .pwa-standalone-brand { display:block; margin-bottom:1.4rem; color:#5145cd; font-size:.82rem; font-weight:800; letter-spacing:.14em; text-align:center; text-transform:uppercase; }
}

body.auth-page.pwa-standalone-login { min-height:100vh; background:radial-gradient(circle at 90% 5%,rgba(122,111,255,.2),transparent 28rem),linear-gradient(160deg,#111b35,#202552 58%,#4c43a5); }
body.auth-page.pwa-standalone-login .site-navbar { display:none !important; }
body.auth-page.pwa-standalone-login #main-content { width:100%; max-width:100%; min-height:100vh; overflow-x:hidden; display:grid; place-items:center; }
body.auth-page.pwa-standalone-login .auth-section { display:grid; place-items:center; width:100%; min-width:0; min-height:100vh; margin:0; padding:calc(1.25rem + env(safe-area-inset-top)) 1rem calc(1.25rem + env(safe-area-inset-bottom)); background:transparent; }
body.auth-page.pwa-standalone-login .auth-section > .container { width:100%; max-width:460px; margin:0 auto; padding:0; }
body.auth-page.pwa-standalone-login .auth-section > .container > .row { display:block; width:100%; margin:0; }
body.auth-page.pwa-standalone-login .auth-section > .container > .row > div { display:block; width:100%; max-width:100%; padding:0; }
body.auth-page.pwa-standalone-login .auth-card { padding:clamp(1.35rem,6vw,2rem); border:1px solid rgba(255,255,255,.65); border-radius:26px; box-shadow:0 28px 70px rgba(5,10,28,.32); }
body.auth-page.pwa-standalone-login .pwa-login-card,
body.auth-page.pwa-standalone-login .user-app-status,
body.auth-page.pwa-standalone-login .site-footer,
body.auth-page.pwa-standalone-login .auth-footer-note,
body.auth-page.pwa-standalone-login .wa-float { display:none !important; }
body.auth-page.pwa-standalone-login .pwa-standalone-brand { display:block; margin-bottom:1.4rem; color:#5145cd; font-size:.82rem; font-weight:800; letter-spacing:.14em; text-align:center; text-transform:uppercase; }
