/* Android app look (only when <html> has .is-app — see includes/pwa.php). Normal browsers ignore all of this. */
:root { --ea-h: 56px; --ea-bg: #262044; --ea-ink: #1f2937; }

html.is-app body { padding-top: var(--ea-h); }
html.is-app.ea-public body { padding-top: 0; }           /* public pages already leave room for their own top bar */
html.is-app .landing-nav,
html.is-app #mobileSidebarToggle,
html.is-app .mobile-sidebar-toggle { display: none !important; }
html.is-app .app-topbar { top: var(--ea-h); }
html.is-app .sidebar { top: var(--ea-h); }
html.is-app .flash-toast { top: var(--ea-h) !important; }
html.is-app .impersonation-banner.sticky-top { top: var(--ea-h); }
@media (max-width: 991.98px) {
    html.is-app .app-topbar { padding-left: 1rem; }      /* no room needed for the old floating hamburger */
}

.ea-bar {
    position: fixed; top: 0; left: 0; right: 0; height: var(--ea-h); z-index: 1040;
    display: flex; align-items: center; gap: 6px; padding: 0 6px 0 4px;
    background: var(--ea-bg); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.22);
    font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.ea-bar button, .ea-bar .ea-icon {
    background: transparent; border: 0; color: #fff; width: 46px; height: 46px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 12px;
    font-size: 1.45rem; cursor: pointer; text-decoration: none; position: relative;
}
.ea-bar button:active, .ea-bar .ea-icon:active { background: rgba(255,255,255,.16); }
.ea-title {
    flex: 1 1 auto; min-width: 0; color: #fff !important; text-decoration: none !important;
    font-weight: 800; font-size: 1.08rem; letter-spacing: .2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ea-title small { display: block; font-weight: 600; font-size: .72rem; opacity: .72; line-height: 1.1; }
@media (min-width: 992px) { html.ea-site .ea-burger { display: none; } } /* sidebar is always open on wide screens */

/* Own drawer (pages without the clinic sidebar: website, sign-in) */
.ea-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100000; opacity: 0; pointer-events: none; transition: opacity .2s; }
html.ea-open .ea-scrim { opacity: 1; pointer-events: auto; }
.ea-drawer {
    position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); z-index: 100001;
    background: #fff; color: var(--ea-ink); transform: translateX(-102%); transition: transform .24s ease;
    display: flex; flex-direction: column; overflow-y: auto; box-shadow: 2px 0 18px rgba(0,0,0,.25);
    font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
html.ea-open .ea-drawer { transform: none; }
.ea-head { display: flex; align-items: center; gap: 10px; padding: 16px; background: var(--ea-bg); color: #fff; position: sticky; top: 0; z-index: 1; }
.ea-head .ea-mark { width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(120deg, #FF8FB1 0%, #FF6F61 45%, #FFC93C 100%); font-size: 1.15rem; }
.ea-head .ea-who { flex: 1; min-width: 0; }
.ea-head strong { display: block; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ea-head span { display: block; font-size: .78rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ea-head button { background: transparent; border: 0; color: #fff; width: 40px; height: 40px; border-radius: 10px; font-size: 1.3rem; }
.ea-sec { padding: 14px 18px 4px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: #94a3b8; }
.ea-nav a { display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: var(--ea-ink); text-decoration: none; font-size: .96rem; font-weight: 600; }
.ea-nav a i { font-size: 1.1rem; width: 22px; text-align: center; color: #6D4BF2; }
.ea-nav a:active { background: #f3f1fb; }
.ea-foot { margin-top: auto; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid #eef0f6; }
.ea-btn { display: block; width: 100%; text-align: center; padding: 12px; border-radius: 12px; font-weight: 800; font-size: .92rem; text-decoration: none; cursor: pointer; }
.ea-btn + .ea-btn { margin-top: 10px; }
.ea-btn-danger { border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; }
.ea-btn-plain { border: 1px solid #e2e8f0; background: #f8fafc; color: #334155; }
.ea-btn-primary { border: 0; background: #6D4BF2; color: #fff !important; }

/* Extra links added to the clinic sidebar */
.ea-extra .nav-link.ea-danger, .ea-extra .nav-link.ea-danger i { color: #fca5a5 !important; }

/* Delete-account dialog */
.ea-modal { position: fixed; inset: 0; z-index: 100002; display: none; align-items: center; justify-content: center; background: rgba(15,23,42,.6); padding: 18px; }
.ea-modal.show { display: flex; }
.ea-modal form { background: #fff; color: var(--ea-ink); border-radius: 18px; width: 100%; max-width: 420px; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
    font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.ea-modal h3 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 800; }
.ea-modal p { margin: 0 0 16px; font-size: .86rem; color: #64748b; line-height: 1.5; }
.ea-modal label { display: block; font-size: .78rem; font-weight: 700; margin: 0 0 4px; color: #475569; }
.ea-modal input { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 1rem; margin-bottom: 14px; }
.ea-actions { display: flex; gap: 10px; justify-content: flex-end; }
.ea-actions button { padding: 11px 16px; border-radius: 10px; font-weight: 700; font-size: .9rem; border: 1px solid #e2e8f0; background: #f8fafc; color: #334155; }
.ea-actions .ok { background: #dc2626; border-color: #dc2626; color: #fff; }
.ea-err { display: none; margin: -6px 0 12px; padding: 9px 11px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: .82rem; }
