:root{--primary:#155eef;--primary-dark:#0f46b8;--navy:#0b1f44;--surface:#fff;--surface-soft:#f6f8fc;--border:#e5eaf2;--text:#182230;--muted:#667085;--success:#17b26a;--warning:#f79009;--danger:#f04438;--shadow:0 10px 30px rgba(16,24,40,.08);--radius:20px}
*{box-sizing:border-box}html,body{background:#f4f7fb!important;color:var(--text);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important}body{min-height:100vh}a{text-decoration:none}.presensi-shell{min-height:100vh;padding-bottom:96px}.modern-container{width:min(100% - 28px,1100px);margin:0 auto}.modern-topbar{position:sticky;top:0;z-index:100;background:rgba(244,247,251,.92);backdrop-filter:blur(14px);border-bottom:1px solid rgba(229,234,242,.8)}.modern-topbar-inner{height:68px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand-mini{display:flex;align-items:center;gap:10px;font-weight:800;color:var(--navy)}.brand-mini img{width:36px;height:36px;border-radius:12px;object-fit:cover}.top-action{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:var(--muted);background:#fff;border:1px solid var(--border)}.page-head{display:flex;align-items:center;justify-content:space-between;padding:18px 0 8px}.page-head h1{font-size:1.3rem;margin:0;font-weight:800}.page-head p{margin:4px 0 0;color:var(--muted);font-size:.9rem}.back-btn{width:42px;height:42px;border-radius:14px;border:1px solid var(--border);background:#fff;color:var(--text);display:grid;place-items:center}.hero{margin-top:18px;background:linear-gradient(145deg,#103b9a,#155eef);color:#fff;border-radius:28px;padding:22px;box-shadow:0 18px 40px rgba(21,94,239,.22);position:relative;overflow:hidden}.hero:after{content:"";position:absolute;width:180px;height:180px;border-radius:50%;background:rgba(255,255,255,.08);right:-70px;top:-80px}.user-row{display:flex;align-items:center;gap:14px;position:relative;z-index:1}.avatar-modern{width:58px;height:58px;border-radius:18px;object-fit:cover;border:2px solid rgba(255,255,255,.75);background:#fff}.user-meta h2{font-size:1.15rem;margin:0 0 3px;font-weight:800;color:#fff}.user-meta span{font-size:.86rem;color:rgba(255,255,255,.82)}.hero-date{margin-top:16px;font-size:.88rem;color:rgba(255,255,255,.82)}.status-card{margin-top:16px;background:#fff;border:1px solid var(--border);border-radius:24px;padding:20px;box-shadow:var(--shadow)}.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.section-title-row h3{font-size:1rem;margin:0;font-weight:800}.section-title-row a{font-size:.82rem;font-weight:700;color:var(--primary)}.gps-pill{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border-radius:999px;background:#ecfdf3;color:#087443;font-size:.78rem;font-weight:700}.gps-pill.wait{background:#fff7ed;color:#b54708}.gps-dot{width:8px;height:8px;border-radius:50%;background:currentColor}.attendance-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.attendance-box{background:var(--surface-soft);border-radius:18px;padding:15px;border:1px solid #eef2f7}.attendance-box .label{font-size:.78rem;color:var(--muted);margin-bottom:6px}.attendance-box .time{font-size:1.35rem;font-weight:800;letter-spacing:-.02em}.attendance-box .state{font-size:.76rem;margin-top:5px;color:var(--muted)}.primary-cta{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:54px;margin-top:14px;border:none;border-radius:16px;background:var(--primary);color:#fff;font-weight:800;font-size:.96rem;box-shadow:0 10px 22px rgba(21,94,239,.22)}.primary-cta.danger{background:var(--danger);box-shadow:0 10px 22px rgba(240,68,56,.2)}.primary-cta:disabled{opacity:.55}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.stat-card{background:#fff;border:1px solid var(--border);border-radius:18px;padding:14px 10px;text-align:center;box-shadow:0 5px 16px rgba(16,24,40,.04)}.stat-icon{width:34px;height:34px;border-radius:11px;margin:0 auto 8px;display:grid;place-items:center;font-size:18px}.stat-card strong{display:block;font-size:1.1rem}.stat-card span{font-size:.72rem;color:var(--muted)}.i-blue{background:#eef4ff;color:#155eef}.i-green{background:#ecfdf3;color:#17b26a}.i-orange{background:#fff7ed;color:#f79009}.i-red{background:#fff1f0;color:#f04438}.modern-section{margin-top:18px}.activity-list{display:flex;flex-direction:column;gap:10px}.activity-item{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--border);border-radius:18px;padding:13px 14px}.activity-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#eef4ff;color:var(--primary);font-size:20px;flex:0 0 auto}.activity-main{min-width:0;flex:1}.activity-main strong{font-size:.88rem;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.activity-main small{display:block;color:var(--muted);margin-top:3px}.badge-modern{padding:6px 9px;border-radius:999px;font-size:.72rem;font-weight:800;white-space:nowrap}.b-success{background:#ecfdf3;color:#087443}.b-danger{background:#fff1f0;color:#b42318}.b-warning{background:#fff7ed;color:#b54708}.b-info{background:#eef4ff;color:#1849a9}.filter-card,.form-card{background:#fff;border:1px solid var(--border);border-radius:22px;padding:18px;box-shadow:var(--shadow)}.modern-field{margin-bottom:14px}.modern-field label{font-size:.78rem;font-weight:700;color:#344054;margin-bottom:7px;display:block}.modern-field .form-control,.modern-field select,.modern-field textarea{height:48px;border:1px solid #d0d5dd;border-radius:14px!important;background:#fff;padding:0 13px;box-shadow:none!important;font-size:.9rem}.modern-field textarea{height:auto;min-height:120px;padding-top:12px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:10px}.camera-card{background:#0b1220;border-radius:24px;padding:10px;overflow:hidden;box-shadow:var(--shadow)}.webcam-capture,.webcam-capture video{display:block!important;width:100%!important;height:auto!important;min-height:300px;object-fit:cover;border-radius:18px}.camera-overlay-hint{text-align:center;color:#d0d5dd;font-size:.78rem;padding:10px 8px 3px}.location-card{margin-top:12px;background:#fff;border:1px solid var(--border);border-radius:20px;padding:14px}.location-line{display:flex;align-items:center;gap:10px;margin-bottom:12px}.location-line ion-icon{font-size:23px;color:var(--primary)}.location-line strong{font-size:.86rem;display:block}.location-line span{font-size:.75rem;color:var(--muted)}#map{height:230px!important;border-radius:16px;overflow:hidden}.profile-avatar-wrap{text-align:center;margin-bottom:18px}.profile-avatar{width:96px;height:96px;border-radius:28px;object-fit:cover;border:4px solid #fff;box-shadow:var(--shadow)}.empty-state{text-align:center;background:#fff;border:1px dashed #cfd7e5;border-radius:18px;padding:28px 16px;color:var(--muted)}.appBottomMenu{height:72px!important;background:rgba(255,255,255,.96)!important;backdrop-filter:blur(14px);border-top:1px solid var(--border)!important;box-shadow:0 -8px 24px rgba(16,24,40,.05)!important}.appBottomMenu .item{color:#98a2b3!important}.appBottomMenu .item.active,.appBottomMenu .item.active ion-icon,.appBottomMenu .item.active strong{color:var(--primary)!important}.appBottomMenu .item ion-icon{font-size:23px!important}.appBottomMenu .item strong{font-size:10px!important;margin-top:2px!important}.appBottomMenu .action-button{background:var(--primary)!important;box-shadow:0 8px 22px rgba(21,94,239,.28)!important}.appHeader{display:none!important}#appCapsule{padding-top:0!important}.login-modern{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 10% 0,#dce8ff,transparent 36%),#f5f8fd}.login-card{width:min(100%,430px);background:#fff;border:1px solid var(--border);border-radius:28px;padding:26px;box-shadow:0 22px 60px rgba(16,24,40,.11)}.login-logo{width:76px;height:76px;border-radius:22px;display:block;margin:0 auto 16px;object-fit:cover}.login-card h1{text-align:center;font-size:1.45rem;margin:0;color:var(--navy)}.login-card .subtitle{text-align:center;color:var(--muted);font-size:.86rem;margin:7px 0 24px}.login-brand{text-align:center;font-size:.75rem;color:var(--muted);margin-top:20px}.mobile-only{display:block}.desktop-grid{display:block}
@media(min-width:768px){.presensi-shell{padding-bottom:30px}.appBottomMenu{left:50%!important;transform:translateX(-50%);max-width:560px;border-radius:18px 18px 0 0}.modern-container{width:min(100% - 44px,1040px)}.dashboard-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px;align-items:start}.dashboard-grid .modern-section{margin-top:0}.hero{padding:26px}.stats-grid{gap:14px}.stat-card{padding:16px}.camera-layout{display:grid;grid-template-columns:1.15fr .85fr;gap:16px;align-items:start}#map{height:320px!important}}
@media(min-width:1100px){.presensi-shell{padding-left:0}.appBottomMenu{max-width:620px}.modern-topbar-inner{height:76px}.hero{border-radius:30px}.status-card,.filter-card,.form-card{border-radius:24px}}

/* Stage 2.1 logout visibility fix */
.top-actions{display:flex;align-items:center;gap:8px}.logout-action{color:#b42318;background:#fff1f0;border-color:#fecdca}.logout-action:hover{color:#912018;background:#fee4e2}

/* Stage 4: PWA install prompt */
.pwa-install-banner{margin-top:14px;background:#fff;border:1px solid var(--border);border-radius:18px;padding:12px 13px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;box-shadow:0 7px 20px rgba(16,24,40,.05)}.pwa-install-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#eef4ff;color:var(--primary);font-size:21px}.pwa-install-copy{min-width:0}.pwa-install-copy strong{display:block;font-size:.83rem;color:#344054}.pwa-install-copy span{display:block;font-size:.7rem;color:var(--muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pwa-install-action{border:0;border-radius:12px;min-height:40px;padding:0 13px;display:inline-flex;align-items:center;gap:6px;background:var(--primary);color:#fff;font-weight:800;font-size:.74rem;cursor:pointer}.pwa-install-action ion-icon{font-size:16px}@media(max-width:520px){.pwa-install-banner{grid-template-columns:40px minmax(0,1fr);}.pwa-install-action{grid-column:1/-1;width:100%;justify-content:center;min-height:42px}.pwa-install-copy span{white-space:normal}}

/* =========================================================
   Stage 4.4 — Mobile Selfie Capture + PWA installed state
   ========================================================= */
.capture-page{padding-bottom:158px}.capture-page-head{padding:12px 0 10px}.capture-page-head h1{font-size:1.12rem}.capture-page-head p{max-width:620px}.capture-eyebrow{display:inline-flex;align-items:center;gap:6px;margin-bottom:5px;color:var(--primary);font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.capture-eyebrow ion-icon{font-size:14px}.capture-main-grid{display:grid;gap:12px}.capture-camera-card{background:#0b1220;border-radius:24px;padding:10px;box-shadow:0 14px 34px rgba(15,23,42,.14);overflow:hidden}.capture-camera-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 4px 10px;color:#d0d5dd}.capture-step{display:inline-flex;align-items:center;gap:7px;font-size:.72rem;font-weight:700}.capture-step b{width:21px;height:21px;border-radius:8px;display:grid;place-items:center;background:#155eef;color:#fff;font-size:.68rem}.capture-live{display:inline-flex;align-items:center;gap:6px;font-size:.68rem;color:#98a2b3}.capture-live i{width:7px;height:7px;border-radius:50%;background:#17b26a;box-shadow:0 0 0 4px rgba(23,178,106,.13)}.capture-webcam-frame{position:relative;width:100%;height:clamp(245px,38dvh,360px);border-radius:18px;overflow:hidden;background:#050b16}.capture-webcam{position:relative;width:100%;height:100%;min-height:0!important;border-radius:18px;overflow:hidden;background:#050b16}.capture-webcam video,.capture-webcam canvas,.capture-webcam img{width:100%!important;height:100%!important;min-height:0!important;object-fit:cover!important;object-position:center center;border-radius:18px}.capture-face-guide{position:absolute;z-index:5;inset:0;pointer-events:none;display:grid;place-items:center}.capture-face-guide:before{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(3,8,18,.12),transparent 20%,transparent 78%,rgba(3,8,18,.16))}.capture-face-guide span{position:relative;width:min(50%,190px);aspect-ratio:.78;border:2px solid rgba(255,255,255,.72);border-radius:48% 48% 44% 44% / 40% 40% 55% 55%;box-shadow:0 0 0 999px rgba(2,8,23,.06)}.camera-helper-modern{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 8px 2px;color:#c7d0df;font-size:.72rem;text-align:center;line-height:1.45}.camera-helper-modern ion-icon{font-size:17px;color:#fdb022;flex:0 0 auto}.capture-side-panel{min-width:0}.capture-location-card{background:#fff;border:1px solid var(--border);border-radius:20px;padding:13px;box-shadow:0 8px 24px rgba(16,24,40,.05)}.capture-location-top{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;align-items:center}.capture-location-icon{width:42px;height:42px;border-radius:14px;background:#eef4ff;color:var(--primary);display:grid;place-items:center}.capture-location-icon ion-icon{font-size:23px}.capture-location-copy{min-width:0}.capture-step-label{display:block;color:#667085;font-size:.64rem;font-weight:700;margin-bottom:2px}.capture-location-copy strong{display:block;font-size:.84rem;color:#1d2939}.capture-location-copy small{display:block;margin-top:2px;color:#667085;font-size:.69rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.capture-gps-quality{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:0 9px;border-radius:999px;font-size:.64rem;font-weight:800;white-space:nowrap}.capture-gps-quality.waiting{background:#f2f4f7;color:#667085}.capture-gps-quality.good{background:#ecfdf3;color:#087443}.capture-gps-quality.fair{background:#fff7ed;color:#b54708}.capture-location-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;padding-top:9px;border-top:1px solid #eef2f6}.capture-coordinate{min-width:0;color:#98a2b3;font-size:.64rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.capture-map-toggle{flex:0 0 auto;border:0;background:#eef4ff;color:#155eef;min-height:34px;padding:0 10px;border-radius:10px;display:inline-flex;align-items:center;gap:5px;font-weight:800;font-size:.67rem}.capture-map-toggle:disabled{opacity:.45}.capture-map-toggle.active{background:#e9f6ef;color:#087443}.capture-map-panel{max-height:0;opacity:0;overflow:hidden;transition:max-height .28s ease,opacity .2s ease,margin-top .28s ease;margin-top:0}.capture-map-panel.open{max-height:260px;opacity:1;margin-top:10px}.capture-map-panel #map{height:160px!important;border-radius:14px}.capture-map-panel p{margin:8px 2px 0;color:#667085;font-size:.64rem;line-height:1.45}.capture-action-dock{position:fixed;z-index:91;left:0;right:0;bottom:calc(72px + env(safe-area-inset-bottom));padding:9px 14px 10px;background:linear-gradient(to top,rgba(244,247,251,.99) 68%,rgba(244,247,251,.84),rgba(244,247,251,0));pointer-events:none}.capture-action-inner{width:min(100%,720px);margin:0 auto;pointer-events:auto}.capture-submit{min-height:58px;margin:0;border-radius:18px;font-size:.9rem;box-shadow:0 12px 28px rgba(21,94,239,.25)}.capture-submit.danger{box-shadow:0 12px 28px rgba(240,68,56,.22)}.capture-action-inner small{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:5px;color:#667085;font-size:.64rem}.capture-action-inner small ion-icon{font-size:14px;color:#155eef}

@media(max-width:420px){.capture-page{width:min(100% - 20px,1100px)}.capture-page-head p{display:none}.capture-page-head{padding-top:9px}.capture-webcam-frame{height:clamp(230px,35dvh,315px)}.camera-helper-modern{font-size:.67rem}.capture-location-card{padding:11px}.capture-location-top{grid-template-columns:38px minmax(0,1fr) auto;gap:8px}.capture-location-icon{width:38px;height:38px;border-radius:12px}.capture-location-copy small{max-width:185px}.capture-action-dock{padding-left:10px;padding-right:10px}.capture-submit{min-height:56px;font-size:.84rem}}

@media(min-width:768px){.capture-page{padding-bottom:34px}.capture-main-grid{grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);gap:16px;align-items:start}.capture-webcam-frame{height:clamp(360px,52vh,520px)}.capture-side-panel{position:sticky;top:92px}.capture-location-card{padding:16px}.capture-map-panel{max-height:420px;opacity:1;margin-top:12px}.capture-map-panel #map{height:240px!important}.capture-map-toggle{display:none}.capture-action-dock{position:static;padding:0;background:none;margin-top:12px}.capture-submit{min-height:56px}.capture-action-inner small{margin-top:8px}.capture-page-head{padding:18px 0 12px}.capture-page-head h1{font-size:1.3rem}}
