:root{--blue:#0757f8;--blue2:#073ebc;--text:#152033;--muted:#718096;--line:#e8edf5;--bg:#f3f6fb;--green:#22b35b}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:"Bai Jamjuree",Arial,sans-serif;color:var(--text)}button,input{font:inherit}.s8-app{max-width:520px;margin:auto;min-height:100vh;background:#fff;box-shadow:0 0 40px rgba(15,46,100,.12);padding-bottom:78px}.s8-topbar{height:64px;background:linear-gradient(135deg,var(--blue2),var(--blue));color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;position:sticky;top:0;z-index:20}.s8-brand{display:flex;align-items:center;gap:8px}.s8-brand span{font-size:28px;font-weight:900;font-style:italic}.s8-brand strong{font-size:19px}.s8-utc{font-size:11px;background:rgba(255,255,255,.14);padding:6px 9px;border-radius:20px}.s8-main{min-height:calc(100vh - 140px)}.s8-screen{display:none;padding:18px}.s8-screen.active{display:block}.s8-user-card{display:flex;align-items:center;gap:13px;margin:3px 0 20px}.s8-avatar{width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,#dce9ff,#8fc1ff);display:grid;place-items:center;font-weight:900;color:#084bc5}.s8-user-card div:last-child{display:flex;flex-direction:column;gap:4px}.s8-user-card small{color:var(--green);font-weight:700}.online-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green)}.s8-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:0 8px 25px rgba(28,60,110,.07)}.card-label{font-size:12px;font-weight:800;color:#1d4ba5;margin-bottom:14px}.task-card label{display:block;font-size:11px;color:var(--muted);margin:11px 0}.task-card input{width:100%;border:0;border-bottom:1px solid var(--line);padding:8px 0 10px;font-weight:700;color:var(--text);outline:none}.primary-capture{width:100%;border:0;border-radius:17px;margin:18px 0 14px;padding:17px;background:linear-gradient(135deg,#24b4ff,#164cf3);color:#fff;display:flex;align-items:center;gap:14px;text-align:left;box-shadow:0 12px 28px rgba(20,88,240,.28)}.capture-icon{font-size:31px}.primary-capture span:last-child{display:flex;flex-direction:column}.primary-capture strong{font-size:18px}.primary-capture small{font-size:12px;margin-top:3px}.s8-quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.quick-card{border:1px solid var(--line);border-radius:15px;background:#fff;padding:15px 10px;min-height:112px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:var(--text)}.quick-card>span{font-size:25px;color:var(--green)}.quick-card strong{font-size:12px;color:#1a53ba}.quick-card small{font-size:10px;color:var(--muted);max-width:150px;overflow:hidden;text-overflow:ellipsis}.s8-note{margin-top:14px;padding:12px;background:#f0f6ff;border-radius:12px;font-size:11px;color:#57708f;line-height:1.5}.camera-screen{padding:0;background:#05070a;min-height:calc(100vh - 64px)}.screen-head{height:56px;margin:-18px -18px 16px;background:linear-gradient(135deg,var(--blue2),var(--blue));color:#fff;display:grid;grid-template-columns:44px 1fr 44px;align-items:center;text-align:center}.camera-screen .screen-head{margin:0}.icon-btn{border:0;background:transparent;color:#fff;font-size:26px}.camera-stage{height:calc(100vh - 220px);min-height:420px;position:relative;overflow:hidden;background:#000}.camera-stage video,.camera-stage canvas{width:100%;height:100%;object-fit:cover}.camera-stage canvas{display:none}.camera-loading{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#fff;gap:12px}.spinner{width:38px;height:38px;border:4px solid rgba(255,255,255,.25);border-top-color:#fff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.gps-badge{position:absolute;top:15px;left:50%;transform:translateX(-50%);background:rgba(28,180,86,.94);color:#fff;padding:8px 12px;border-radius:20px;font-size:11px;font-weight:800;white-space:nowrap}.camera-guide{position:absolute;bottom:15px;left:20px;right:20px;background:rgba(0,0,0,.55);color:#fff;text-align:center;padding:10px;border-radius:10px;font-size:12px}.camera-controls{height:100px;display:grid;place-items:center;background:#05070a}.shutter{width:70px;height:70px;border-radius:50%;border:5px solid #fff;background:#fff;box-shadow:inset 0 0 0 4px #111}.preview-wrap{margin:-18px -18px 15px;position:relative;background:#111}.preview-wrap img{display:block;width:100%;max-height:52vh;object-fit:contain}.preview-stamp{position:absolute;left:12px;bottom:12px;right:12px;background:rgba(0,12,35,.76);color:#fff;padding:10px;border-radius:9px;display:flex;flex-direction:column;font-size:10px;gap:3px}.info-card{display:grid;gap:12px}.info-card>div,.receipt>div{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding-bottom:10px}.info-card>div:last-child,.receipt>div:last-child{border:0;padding:0}.info-card span,.receipt span{font-size:11px;color:var(--muted)}.info-card strong,.receipt strong{font-size:11px;text-align:right}.confirm-actions{display:grid;grid-template-columns:1fr 1.6fr;gap:10px;margin-top:15px}.btn-primary,.btn-outline{min-height:50px;border-radius:12px;font-weight:800}.btn-primary{border:0;background:linear-gradient(135deg,#1688ff,#164cf3);color:#fff}.btn-outline{background:#fff;border:1px solid #2466ef;color:#2466ef}.full{width:100%;margin-top:12px}.success-screen{text-align:center;padding-top:52px}.success-check{width:90px;height:90px;border-radius:50%;background:#e6f9ed;color:#19a84e;font-size:55px;display:grid;place-items:center;margin:0 auto 20px}.success-screen h2{color:#12a449;font-size:22px}.success-screen>p{color:var(--muted);font-size:13px}.receipt{text-align:left;margin-top:22px}.history-list{display:grid;gap:12px}.history-item{border:1px solid var(--line);border-radius:14px;padding:10px;display:flex;gap:12px;background:#fff}.history-item img{width:88px;height:88px;object-fit:cover;border-radius:10px}.history-item>div{display:flex;flex-direction:column;gap:4px}.history-item strong{font-size:13px}.history-item span{font-size:10px;color:var(--muted)}.status{font-style:normal;font-size:10px;font-weight:800;margin-top:3px}.status.pending{color:#f39c12}.status.approved{color:#1ca653}.status.rejected{color:#e74c3c}.empty-history{text-align:center;color:var(--muted);padding:50px 10px}.s8-bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(520px,100%);height:72px;background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(3,1fr);z-index:30}.s8-bottom-nav button{border:0;background:#fff;color:#526070;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:20px;gap:2px}.s8-bottom-nav small{font-size:10px}.s8-bottom-nav .active{color:var(--blue)}.toast{position:fixed;z-index:99;left:50%;bottom:90px;transform:translate(-50%,20px);width:min(460px,calc(100% - 28px));background:#172033;color:#fff;padding:13px 15px;border-radius:12px;opacity:0;pointer-events:none;transition:.25s;font-size:12px}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.error{background:#c0392b}@media(min-width:800px){body{padding:24px}.s8-app{border-radius:24px;overflow:hidden;min-height:calc(100vh - 48px)}.s8-bottom-nav{bottom:24px;border-radius:0 0 24px 24px}}
.s8-login-page{min-height:100vh;background:linear-gradient(145deg,#0639a7,#0878ff);display:grid;place-items:center;padding:20px}.s8-login-card{width:min(390px,100%);background:#fff;border-radius:24px;padding:30px;box-shadow:0 25px 70px rgba(0,20,80,.35)}.s8-login-logo{width:72px;height:72px;border-radius:20px;background:linear-gradient(135deg,#073ebc,#1688ff);color:#fff;display:grid;place-items:center;font-size:34px;font-weight:900;font-style:italic;margin:0 auto 18px}.s8-login-card h1{text-align:center;margin:0 0 8px;font-size:24px}.s8-login-card p{text-align:center;color:#718096;font-size:13px;margin-bottom:24px}.s8-login-card label{display:block;font-size:12px;font-weight:700;margin:14px 0}.s8-login-card input{width:100%;margin-top:7px;padding:14px;border:1px solid #dde5f0;border-radius:12px;outline:none}.s8-login-card button{width:100%;border:0;border-radius:13px;padding:15px;background:linear-gradient(135deg,#1688ff,#164cf3);color:#fff;font-weight:800;margin-top:8px}.login-error{background:#fff1f0;color:#c0392b;padding:10px;border-radius:10px;font-size:12px}.task-row{display:flex;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid var(--line)}.task-row:last-child{border-bottom:0}.task-row span{font-size:11px;color:var(--muted)}.task-row strong{font-size:12px;text-align:right}
/* V4.5 refined staff mobile UI */
.s8-main{background:linear-gradient(180deg,#f5f8ff 0,#fff 42%)}
#screenHome{padding:18px 16px 24px}
.staff-profile-card{background:linear-gradient(145deg,#0a328d,#0868ff);border-radius:20px;padding:18px;color:#fff;box-shadow:0 18px 35px rgba(8,78,210,.24);display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}
.profile-main{display:flex;align-items:center;gap:12px;min-width:0}.profile-main>div:last-child{display:flex;flex-direction:column;min-width:0}.profile-main .s8-avatar{width:54px;height:54px;background:rgba(255,255,255,.18);color:#fff;border:1px solid rgba(255,255,255,.25);flex:0 0 auto}.profile-kicker{font-size:9px;letter-spacing:.9px;opacity:.72;font-weight:700}.profile-main strong{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:3px 0}.profile-main small{font-size:10px;color:#dfffea}.staff-code-pill{font-size:10px;font-weight:800;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.2);padding:7px 9px;border-radius:999px;white-space:nowrap}
.today-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}.today-summary>div{background:#fff;border:1px solid #e8edf7;border-radius:14px;padding:11px 8px;text-align:center;box-shadow:0 7px 18px rgba(29,58,105,.05)}.today-summary span{display:block;font-size:9px;color:#8190a7;margin-bottom:4px}.today-summary strong{font-size:11px;color:#15376f;display:block;overflow:hidden;text-overflow:ellipsis}
.task-card{padding:17px}.task-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding-bottom:12px;border-bottom:1px solid var(--line)}.task-head h2{font-size:16px;margin:4px 0 0;color:#112c5e}.task-status{font-size:9px;font-weight:800;color:#14964c;background:#e8f8ef;padding:6px 8px;border-radius:999px;white-space:nowrap}.task-row{padding:10px 0}.task-row span{font-size:10px}.task-row strong{max-width:64%;font-size:11px}
.primary-capture{min-height:78px;margin-top:14px;border-radius:18px}.primary-capture:active{transform:scale(.99)}
.capture-rules{margin-top:14px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px;display:grid;gap:9px}.capture-rules>strong{font-size:12px;color:#163f88}.capture-rules>div{display:flex;align-items:center;gap:9px;font-size:10px;color:#64748b}.capture-rules>div span{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#eaf2ff;color:#0757f8;font-weight:800;flex:0 0 auto}
.confirm-title{margin:14px 0 10px;display:flex;flex-direction:column;gap:3px}.confirm-title span{font-size:9px;letter-spacing:.8px;color:#70819a;font-weight:700}.confirm-title strong{font-size:16px;color:#132d5e}.info-card>div{align-items:flex-start}.info-card span{font-size:10px}.info-card strong{font-size:11px;max-width:62%;word-break:break-word}.confirm-actions{position:sticky;bottom:82px;background:#fff;padding:10px 0 2px;z-index:5}
#screenConfirm{padding-bottom:110px}.preview-wrap{border-radius:0 0 18px 18px;overflow:hidden}.preview-wrap img{max-height:46vh}.preview-stamp{font-size:9px}
@media(max-width:380px){.today-summary{grid-template-columns:1fr}.staff-profile-card{align-items:flex-start;flex-direction:column}.staff-code-pill{align-self:flex-start}}

.location-card{align-items:flex-start!important;text-align:left!important}.location-card small{display:block;font-weight:700;line-height:1.45;color:#0f2a55;margin-top:6px}.location-card em{display:block;font-style:normal;font-size:11px;color:#71809b;margin-top:5px;word-break:break-all}.info-card strong#confirmAddress{line-height:1.45;text-align:right;max-width:62%;font-size:12px}
/* V5.1 Premium Staff Experience */
:root{--navy:#08245f;--royal:#0868ff;--cyan:#20b9ff;--soft-blue:#edf5ff}
.s8-app{max-width:560px;background:linear-gradient(180deg,#f7faff 0,#fff 36%)}
.s8-topbar{height:82px;padding:0 24px;background:linear-gradient(135deg,#0a9af3 0,#0757f8 55%,#063dbd 100%);box-shadow:0 12px 35px rgba(8,83,220,.22)}
.s8-brand span{font-size:36px;letter-spacing:-2px}.s8-brand strong{font-size:22px;letter-spacing:.2px}.topbar-actions{display:flex;align-items:center;gap:12px}.s8-utc{font-size:12px;padding:9px 14px;border:1px solid rgba(255,255,255,.25);backdrop-filter:blur(8px)}.notify-btn{width:38px;height:38px;border:0;background:transparent;color:#fff;font-size:25px;position:relative}.notify-btn i{position:absolute;width:8px;height:8px;background:#ff3b30;border-radius:50%;right:4px;top:4px;box-shadow:0 0 0 3px rgba(255,255,255,.18)}
#screenHome{padding:22px 20px 30px}.staff-profile-card{min-height:170px;border-radius:25px;padding:24px 22px;background:linear-gradient(135deg,#061c5d 0,#0751cb 54%,#0874ff 100%);box-shadow:0 24px 48px rgba(5,48,145,.28);position:relative;overflow:hidden;margin-bottom:20px}.profile-watermark{position:absolute;right:-8px;bottom:-38px;font-size:122px;font-weight:900;font-style:italic;color:rgba(255,255,255,.05);line-height:1}.profile-main{gap:18px;position:relative;z-index:2}.profile-main .s8-avatar{width:88px;height:88px;font-size:32px;border:2px solid rgba(255,255,255,.8);box-shadow:inset 0 0 0 6px rgba(18,165,255,.35),0 0 0 5px rgba(255,255,255,.08);position:relative}.avatar-ring{position:absolute;width:18px;height:18px;background:#1dd76a;border:4px solid #fff;border-radius:50%;right:-1px;bottom:4px}.profile-kicker{font-size:13px;letter-spacing:1.5px}.profile-main strong{font-size:25px;margin:6px 0 4px;letter-spacing:.2px}.profile-main small{font-size:14px}.staff-code-pill{font-size:14px;padding:10px 16px;background:rgba(255,255,255,.15);box-shadow:inset 0 0 0 1px rgba(255,255,255,.14);position:relative;z-index:2}
.today-summary{gap:12px;margin-bottom:20px}.today-summary>div{min-height:132px;border-radius:20px;padding:18px 14px;display:flex;align-items:flex-start;gap:12px;text-align:left;box-shadow:0 12px 30px rgba(27,65,125,.08)}.today-summary>div>div{min-width:0}.summary-icon{width:38px;height:38px;border-radius:13px;display:grid!important;place-items:center;font-size:18px;flex:0 0 auto}.summary-icon.purple{background:#eee9ff;color:#7055e8}.summary-icon.green{background:#ddf8ee;color:#16aa73}.summary-icon.blue{background:#e3efff;color:#0757f8}.today-summary span:not(.summary-icon){font-size:12px;margin:1px 0 8px;color:#66758d}.today-summary strong{font-size:22px;color:#10234b;white-space:nowrap}.today-summary em{display:block;font-style:normal;font-size:11px;color:#8190a7;margin-top:5px}
.s8-card{border-radius:24px}.task-card{padding:22px;margin-bottom:20px}.task-head{padding:0 0 14px;border:0}.card-label{display:flex;align-items:center;gap:9px;font-size:16px;margin:0;color:#174a9c}.label-icon{width:28px;height:28px;border-radius:9px;background:#eaf3ff;display:grid;place-items:center;color:#1772ff}.task-status{font-size:12px;padding:9px 14px}.mission-banner{display:flex;gap:14px;align-items:center;background:linear-gradient(90deg,#eaf5ff,#f8fbff);border:1px solid #cfe4ff;border-radius:16px;padding:16px;margin-bottom:12px}.mission-icon{width:48px;height:48px;border-radius:14px;background:#fff;display:grid;place-items:center;font-size:24px;color:#1262ee;box-shadow:0 8px 18px rgba(39,100,205,.08)}.mission-banner h2{margin:0 0 5px;font-size:19px;color:#12316b}.mission-banner p{margin:0;color:#70819b;font-size:12px}.task-row{padding:14px 0}.task-row span{font-size:13px}.task-row strong{font-size:14px;max-width:58%}
.primary-capture{min-height:132px;padding:20px 22px;border-radius:24px;margin:0 0 20px;gap:16px;position:relative;overflow:hidden;background:linear-gradient(120deg,#19b9f3 0,#0874ff 55%,#0750e9 100%);box-shadow:0 20px 42px rgba(15,104,242,.28)}.camera-visual{width:80px;height:70px;border-radius:18px;background:linear-gradient(145deg,#fff,#c7d8ef);display:grid;place-items:center;box-shadow:0 10px 20px rgba(0,33,100,.18);position:relative;flex:0 0 auto}.camera-visual:before{content:"";width:58px;height:38px;border-radius:10px;background:#1b2d4f;position:absolute}.camera-visual:after{content:"";width:18px;height:8px;border-radius:4px;background:#dbe8f8;position:absolute;top:11px}.camera-lens{width:27px;height:27px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#6edcff 0 12%,#2e5cff 30%,#121b58 60%,#040817 100%);z-index:2;border:3px solid #6f84a8}.capture-copy{min-width:0;flex:1}.primary-capture strong{font-size:21px}.primary-capture small{font-size:13px;line-height:1.5}.open-camera-pill{background:#fff;color:#174a9c;border-radius:16px;padding:15px 17px;font-weight:800;display:flex!important;align-items:center;gap:8px;white-space:nowrap;box-shadow:0 10px 22px rgba(3,55,160,.15)}
.s8-quick-grid{gap:14px;margin-bottom:20px}.quick-card{min-height:160px;border-radius:22px;padding:20px;text-align:left;align-items:center;justify-content:flex-start;flex-direction:row;gap:13px;box-shadow:0 12px 28px rgba(27,65,125,.06);position:relative}.quick-card>div{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0}.quick-icon{width:48px;height:48px;border-radius:16px;display:grid!important;place-items:center;font-size:24px;flex:0 0 auto}.quick-icon.location{background:#e4faef;color:#10a85c}.quick-icon.history{background:#e8f1ff;color:#0757f8}.quick-card strong{font-size:15px}.quick-card small{font-size:12px;max-width:none;white-space:normal}.quick-card em{font-size:11px!important;color:#71809b!important}.location-card i{font-size:10px;font-style:normal;color:#179852;background:#e7f8ef;padding:5px 8px;border-radius:999px;margin-top:4px}.quick-arrow{position:absolute;right:18px;font-size:27px;color:#5c6b80}.history-card{padding-right:42px}
.premium-note{min-height:112px;border:1px solid #d6e7ff;background:linear-gradient(90deg,#f6faff,#fff);border-radius:22px;padding:18px;display:flex;align-items:center;gap:14px;position:relative;overflow:hidden}.premium-note .shield-icon{width:42px;height:42px;border-radius:14px;background:#e5efff;color:#0757f8;display:grid;place-items:center;flex:0 0 auto}.premium-note b{font-size:14px;color:#1750aa}.premium-note p{font-size:12px;line-height:1.55;margin:5px 40px 0 0;color:#64748b}.map-pin-art{position:absolute;right:18px;font-size:36px;color:#126df5;opacity:.22}
.s8-bottom-nav{height:82px;box-shadow:0 -10px 30px rgba(22,54,105,.08)}.s8-bottom-nav button{font-size:24px}.s8-bottom-nav small{font-size:12px;margin-top:3px}
@media(max-width:460px){.s8-topbar{height:72px;padding:0 16px}.s8-brand span{font-size:30px}.s8-brand strong{font-size:19px}.notify-btn{display:none}#screenHome{padding:18px 14px 25px}.staff-profile-card{min-height:138px;padding:19px 16px}.profile-main .s8-avatar{width:68px;height:68px;font-size:25px}.profile-main strong{font-size:19px}.profile-kicker{font-size:10px}.profile-main small{font-size:11px}.staff-code-pill{font-size:11px;padding:8px 10px}.today-summary{gap:8px}.today-summary>div{min-height:104px;padding:12px 8px;gap:7px}.summary-icon{width:30px;height:30px;border-radius:10px;font-size:14px}.today-summary span:not(.summary-icon){font-size:9px}.today-summary strong{font-size:14px}.today-summary em{font-size:9px}.primary-capture{min-height:108px;padding:16px 14px}.camera-visual{width:58px;height:54px}.camera-visual:before{width:43px;height:30px}.open-camera-pill{padding:12px 11px;font-size:11px}.primary-capture strong{font-size:18px}.primary-capture small{font-size:11px}.s8-quick-grid{grid-template-columns:1fr 1fr}.quick-card{min-height:145px;padding:14px 12px;flex-direction:column;align-items:flex-start}.quick-icon{width:38px;height:38px}.quick-card strong{font-size:12px}.quick-card small{font-size:10px}.quick-arrow{display:none}.premium-note p{margin-right:20px}.task-row strong{font-size:12px}}
@media(max-width:365px){.today-summary{grid-template-columns:1fr}.today-summary>div{min-height:auto}.open-camera-pill{display:none!important}.s8-quick-grid{grid-template-columns:1fr}.quick-card{min-height:112px;flex-direction:row}.staff-profile-card{flex-direction:column;align-items:flex-start}.staff-code-pill{align-self:flex-start}}

/* V5.2 One-screen Staff Home */
@supports (height:100dvh){.s8-app{min-height:100dvh}.s8-main{min-height:calc(100dvh - 146px)}}
#screenHome.active{height:calc(100vh - 154px);height:calc(100dvh - 154px);overflow:hidden;display:flex;flex-direction:column;gap:10px;padding:12px 14px 10px}
#screenHome .staff-profile-card{min-height:96px;margin:0;padding:13px 14px;border-radius:20px;flex:0 0 auto}
#screenHome .profile-main{gap:11px}
#screenHome .profile-main .s8-avatar{width:58px;height:58px;font-size:22px}
#screenHome .profile-kicker{font-size:9px}
#screenHome .profile-main strong{font-size:18px;margin:2px 0}
#screenHome .profile-main small{font-size:10px}
#screenHome .staff-code-pill{font-size:10px;padding:7px 9px}
#screenHome .today-summary{gap:7px;margin:0;flex:0 0 auto}
#screenHome .today-summary>div{min-height:62px;padding:8px 7px;border-radius:15px;gap:6px;align-items:center}
#screenHome .summary-icon{width:28px;height:28px;border-radius:9px;font-size:13px}
#screenHome .today-summary span:not(.summary-icon){font-size:8px;margin:0 0 2px}
#screenHome .today-summary strong{font-size:13px}
#screenHome .today-summary em{font-size:8px;margin-top:1px}
#screenHome .primary-capture{order:3;min-height:74px;margin:0;padding:10px 12px;border-radius:18px;gap:11px;flex:0 0 auto}
#screenHome .camera-visual{width:52px;height:48px;border-radius:14px}
#screenHome .camera-visual:before{width:39px;height:27px}
#screenHome .camera-visual:after{top:8px;width:14px;height:6px}
#screenHome .camera-lens{width:21px;height:21px}
#screenHome .primary-capture strong{font-size:16px}
#screenHome .primary-capture small{font-size:10px;line-height:1.25}
#screenHome .open-camera-pill{padding:10px 11px;border-radius:12px;font-size:10px}
#screenHome .compact-task{order:4;padding:12px 13px;margin:0;border-radius:18px;flex:1 1 auto;min-height:0;overflow:hidden}
#screenHome .task-head{padding:0 0 8px}
#screenHome .card-label{font-size:12px;gap:6px}
#screenHome .label-icon{width:22px;height:22px;border-radius:7px}
#screenHome .task-status{font-size:9px;padding:6px 9px}
#screenHome .mission-banner{padding:9px 10px;margin-bottom:7px;border-radius:13px;gap:9px}
#screenHome .mission-icon{width:34px;height:34px;border-radius:10px;font-size:17px}
#screenHome .mission-banner h2{font-size:14px;margin-bottom:2px}
#screenHome .mission-banner p{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:310px}
.compact-meta{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.compact-meta>span{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid var(--line);min-width:0}
.compact-meta>span:nth-last-child(-n+2){border-bottom:0}
.compact-meta b{font-size:9px;color:var(--muted);font-weight:500;white-space:nowrap}
.compact-meta strong{font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:62%;text-align:right}
#screenHome .s8-quick-grid{order:5;gap:8px;margin:0;flex:0 0 auto}
#screenHome .quick-card{min-height:62px;border-radius:16px;padding:8px 10px;flex-direction:row;gap:8px}
#screenHome .quick-icon{width:31px;height:31px;border-radius:10px;font-size:16px}
#screenHome .quick-card strong{font-size:10px}
#screenHome .quick-card small{font-size:8px;line-height:1.25}
#screenHome .quick-card em{font-size:8px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}
#screenHome .location-card i{display:none}
#screenHome .quick-arrow{display:none}
#screenHome .home-note{display:none}

.camera-screen.active{display:grid;grid-template-rows:56px minmax(0,1fr) 92px;height:calc(100vh - 72px);height:calc(100dvh - 72px);min-height:0;overflow:hidden}
.camera-screen .camera-stage{height:auto;min-height:0}
.camera-screen .camera-controls{height:auto;min-height:92px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
.camera-screen .shutter{width:66px;height:66px}

@media(max-height:760px){
 #screenHome.active{gap:7px;padding-top:8px}
 #screenHome .staff-profile-card{min-height:82px;padding:10px 12px}
 #screenHome .profile-main .s8-avatar{width:50px;height:50px}
 #screenHome .primary-capture{min-height:66px}
 #screenHome .compact-task{padding:9px 11px}
 #screenHome .mission-banner{padding:7px 9px}
 #screenHome .quick-card{min-height:54px}
}
@media(max-width:365px){
 #screenHome .today-summary{grid-template-columns:repeat(3,1fr)}
 #screenHome .staff-profile-card{flex-direction:row;align-items:center}
 #screenHome .staff-code-pill{align-self:auto}
 #screenHome .s8-quick-grid{grid-template-columns:1fr 1fr}
 #screenHome .quick-card{min-height:56px;flex-direction:row}
 #screenHome .open-camera-pill{display:flex!important}
}

/* V5.3 Assigned campaign card */
.campaign-task-card .mission-banner{position:relative}.campaign-code{font-size:10px;letter-spacing:.08em;font-weight:700;color:#2878ff;display:block;margin-bottom:2px}.campaign-target{margin-left:auto;min-width:58px;height:58px;border-radius:16px;background:linear-gradient(145deg,#1a75ff,#164bd3);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 8px 18px rgba(24,96,223,.22)}.campaign-target b{font-size:19px;line-height:1}.campaign-target small{font-size:7px;margin-top:4px;letter-spacing:.05em}.campaign-instructions{margin-top:7px;border-radius:10px;background:#f4f8ff;border:1px solid #dce9ff;padding:0 10px}.campaign-instructions summary{font-size:10px;font-weight:700;color:#1558c8;padding:8px 0;cursor:pointer}.campaign-instructions p{font-size:10px;line-height:1.45;color:#51627f;margin:0 0 9px}.task-status.paused{background:#fff2d7;color:#a56a00}.no-campaign .mission-banner{background:#f7f9fd}.no-campaign .task-status{background:#eef2f7;color:#6f7c91}

.campaign-switcher{display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(135deg,#eef6ff,#fff);border:1px solid #cfe1ff;border-radius:18px;padding:12px 14px;margin:10px 0}.campaign-switcher b{display:block;color:#0a3d91;font-size:12px}.campaign-switcher small{display:block;color:#7b8aa6;font-size:10px;margin-top:2px}.campaign-switcher select{max-width:58%;border:1px solid #bcd4ff;border-radius:12px;padding:10px;background:#fff;color:#0b2d64;font-weight:700;font-family:inherit}.staff-campaign-checks{display:grid;gap:8px;max-height:220px;overflow:auto;border:1px solid #dce6f4;border-radius:14px;padding:10px}.staff-campaign-checks>label{display:flex!important;align-items:center;gap:10px;padding:9px;border-radius:10px;background:#f8fbff}.staff-campaign-checks input{width:auto!important}.staff-campaign-checks span b,.staff-campaign-checks span small{display:block}

/* V5.7 STAFF PHOTO VALIDATION */
.photo-quality-result{margin:14px 0;padding:15px;border:1px solid #ffc8cf;border-radius:17px;background:#fff6f7}.photo-quality-result.warning-only{border-color:#f4dda4;background:#fffaf0}.quality-head{display:flex;gap:10px;align-items:center}.quality-head>span{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#ffe7ea;color:#d84a58;font-weight:900}.quality-head b,.quality-head small{display:block}.quality-head small{margin-top:3px;color:#788d9d}.quality-errors{display:grid;gap:8px;margin-top:12px}.quality-errors>div{position:relative;padding:11px 78px 11px 12px;border-radius:12px;background:#fff;border:1px solid #e4edf3}.quality-errors b,.quality-errors span{display:block}.quality-errors b{font-size:12px;color:#173d58}.quality-errors span{margin-top:4px;font-size:10px;color:#71889a}.quality-errors em{position:absolute;right:9px;top:10px;padding:5px 7px;border-radius:999px;background:#ffe9ec;color:#d84e5c;font-size:8px;font-style:normal;font-weight:800}.quality-errors .warning em{background:#fff2cf;color:#a97a09}.photo-quality-result>button{width:100%;height:44px;margin-top:12px;border:0;border-radius:11px;background:linear-gradient(135deg,#147cff,#20bed9);color:#fff;font-weight:900}
.photo-rule-modal[hidden]{display:none}.photo-rule-modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:18px;background:rgba(6,28,50,.72);backdrop-filter:blur(8px)}.photo-rule-dialog{position:relative;width:min(430px,100%);max-height:90vh;overflow:auto;padding:27px;border-radius:26px;background:#fff;text-align:center;box-shadow:0 28px 80px rgba(0,0,0,.3)}.modal-close{position:absolute;right:16px;top:14px;width:34px;height:34px;border:0;border-radius:10px;background:#edf5fa;color:#547086;font-size:20px}.modal-rule-icon{width:72px;height:72px;margin:auto;border-radius:22px;display:grid;place-items:center;background:linear-gradient(145deg,#e7f5ff,#fff0f1);color:#147bd4;font-size:34px}.photo-rule-dialog>span{display:block;margin-top:15px;color:#1685cb;font-size:10px;font-weight:900;letter-spacing:.1em}.photo-rule-dialog h2{margin:8px 0 14px;color:#123853}.photo-rule-dialog #modalRuleErrors{text-align:left}.photo-rule-dialog .btn-primary,.photo-rule-dialog .btn-outline{margin-top:10px}

/* V5.8 PREMIUM STAFF CAMPAIGN SELECTOR */
.staff-campaign-selector{margin:10px 16px 12px;padding:14px;border:1px solid #cfe0ff;border-radius:20px;background:linear-gradient(145deg,#f7fbff,#edf5ff);box-shadow:0 12px 30px rgba(31,91,170,.08)}
.staff-campaign-selector-head{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:11px;align-items:center}.campaign-selector-icon{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(135deg,#247cff,#23c1e2);color:#fff;font-size:20px;box-shadow:0 9px 20px rgba(37,126,255,.2)}
.staff-campaign-selector-head span,.staff-campaign-selector-head strong,.staff-campaign-selector-head small{display:block}.staff-campaign-selector-head span{font-size:8px;font-weight:900;letter-spacing:.12em;color:#3478cf}.staff-campaign-selector-head strong{margin-top:3px;color:#153c70;font-size:14px}.staff-campaign-selector-head small{margin-top:3px;color:#8294a8;font-size:9px}.staff-campaign-selector-head button{border:0;border-radius:11px;padding:10px 12px;background:#e5f1ff;color:#176fd3;font-family:inherit;font-size:9px;font-weight:900}
.staff-campaign-selector-meta{display:grid;grid-template-columns:auto 1fr;gap:8px;margin-top:11px}.staff-campaign-selector-meta span{padding:8px 10px;border-radius:10px;background:#fff;border:1px solid #e0e9f3;color:#6d8298;font-size:9px}.staff-campaign-selector-meta span:first-child{color:#1670d2;font-weight:900;text-align:center}
.campaign-picker-modal[hidden]{display:none}.campaign-picker-modal{position:fixed;inset:0;z-index:9997;display:grid;place-items:center;padding:18px;background:rgba(7,28,53,.72);backdrop-filter:blur(8px)}.campaign-picker-dialog{position:relative;width:min(455px,100%);max-height:90vh;overflow:auto;padding:26px;border-radius:26px;background:#fff;box-shadow:0 30px 90px rgba(0,0,0,.28)}.campaign-picker-close{position:absolute;right:15px;top:13px;width:36px;height:36px;border:0;border-radius:11px;background:#edf5fb;color:#577085;font-size:21px}.campaign-picker-dialog>span{color:#1b80d8;font-size:9px;font-weight:900;letter-spacing:.13em}.campaign-picker-dialog h2{margin:7px 0 8px;color:#123b63}.campaign-picker-dialog>p{margin:0 0 16px;color:#72879a;font-size:11px;line-height:1.55}
.campaign-picker-list{display:grid;gap:10px;margin-bottom:15px}.campaign-picker-item{display:grid;grid-template-columns:58px 1fr auto;gap:10px;align-items:center;width:100%;padding:12px;border:1px solid #dce8f1;border-radius:15px;background:#fbfdff;text-align:left;font-family:inherit}.campaign-picker-item>span{display:grid;place-items:center;min-height:45px;border-radius:12px;background:#eaf4ff;color:#1773d5;font-size:9px;font-weight:900}.campaign-picker-item b,.campaign-picker-item small,.campaign-picker-item em{display:block}.campaign-picker-item b{color:#173e62}.campaign-picker-item small{margin-top:4px;color:#778da0;font-size:9px}.campaign-picker-item em{margin-top:3px;color:#9aa8b5;font-size:8px;font-style:normal}.campaign-picker-item i{padding:6px 8px;border-radius:999px;background:#edf4fa;color:#70879a;font-size:8px;font-style:normal;font-weight:900}.campaign-picker-item.active,.campaign-picker-item.selected{border-color:#2380ff;background:#f1f7ff;box-shadow:0 0 0 3px rgba(35,128,255,.09)}.campaign-picker-item.active i,.campaign-picker-item.selected i{background:#def7e9;color:#159158}.campaign-picker-empty{padding:24px;border-radius:15px;background:#f5f9fc;color:#748b9d;text-align:center}
@media(max-width:460px){.staff-campaign-selector-head{grid-template-columns:42px 1fr}.staff-campaign-selector-head button{grid-column:2;justify-self:start}.staff-campaign-selector-meta{grid-template-columns:1fr}.campaign-picker-item{grid-template-columns:52px 1fr}.campaign-picker-item i{grid-column:2;justify-self:start}}

/* ===== V5.10 STAFF MOBILE UI FIX ===== */
:root{
  --staff-safe-bottom:92px;
}
.staff-app,
.staff-shell,
.staff-dashboard{
  min-height:100dvh;
}
.staff-main,
.staff-content,
main{
  padding-bottom:calc(var(--staff-safe-bottom) + env(safe-area-inset-bottom,0px))!important;
}
.staff-campaign-selector{
  margin:10px 16px 10px;
  padding:13px;
  border-radius:18px;
}
.staff-campaign-selector.no-campaign{
  background:linear-gradient(145deg,#f8fbff,#eef5ff);
  border-style:dashed;
}
.staff-campaign-selector.no-campaign .staff-campaign-selector-meta{
  opacity:.72;
}
.campaign-empty-hint{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin-top:10px;
  padding:10px 11px;
  border-radius:12px;
  background:#fff7e8;
  border:1px solid #f6dca8;
}
.campaign-empty-hint[hidden]{display:none!important}
.campaign-empty-hint>span{
  flex:0 0 24px;
  width:24px;height:24px;
  border-radius:8px;
  display:grid;place-items:center;
  background:#ffb443;
  color:#fff;
  font-weight:900;
}
.campaign-empty-hint p{
  margin:1px 0 0;
  color:#8b641f;
  font-size:10px;
  line-height:1.45;
}
.capture-card{
  position:relative;
  margin-top:8px!important;
}
.capture-lock-note{
  position:absolute;
  inset:0;
  z-index:4;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  border-radius:inherit;
  background:rgba(239,247,255,.82);
  color:#567288;
  font-size:11px;
  font-weight:800;
  text-align:center;
  backdrop-filter:blur(3px);
}
.capture-lock-note[hidden]{display:none!important}
#takePhoto:disabled,
#takePhoto.is-disabled{
  cursor:not-allowed!important;
  filter:saturate(.35);
  opacity:.58;
  box-shadow:none!important;
}
.quick-stats{
  gap:8px!important;
}
.quick-stats>*{
  min-height:72px!important;
}
.staff-task-card,
.task-card{
  min-height:auto!important;
}
.staff-bottom-nav,
.bottom-nav{
  position:fixed!important;
  left:50%!important;
  bottom:0!important;
  transform:translateX(-50%)!important;
  width:min(700px,100%)!important;
  z-index:90!important;
  padding-bottom:env(safe-area-inset-bottom,0px)!important;
  box-shadow:0 -12px 30px rgba(18,55,90,.12)!important;
}
@media(max-width:760px){
  .staff-shell,
  .staff-app{
    width:100%!important;
    max-width:700px!important;
  }
  .staff-header{
    border-radius:0 0 0 0!important;
  }
  .staff-profile-card{
    margin:10px 16px 8px!important;
  }
  .quick-stats{
    margin:8px 16px!important;
  }
  .staff-campaign-selector-head{
    grid-template-columns:42px minmax(0,1fr) auto!important;
  }
  .staff-campaign-selector-head button{
    grid-column:auto!important;
    justify-self:end!important;
  }
  .staff-campaign-selector-meta{
    margin-top:8px!important;
  }
  .capture-card{
    margin:8px 16px!important;
  }
  .staff-task-card,
  .task-card{
    margin:8px 16px!important;
  }
  .staff-lower-grid,
  .staff-info-grid{
    margin:8px 16px 0!important;
    gap:8px!important;
  }
}
@media(max-width:420px){
  .staff-campaign-selector-head{
    grid-template-columns:40px minmax(0,1fr)!important;
  }
  .staff-campaign-selector-head button{
    grid-column:2!important;
    justify-self:start!important;
    margin-top:4px;
  }
  .staff-campaign-selector-meta{
    grid-template-columns:1fr!important;
  }
}

/* ===== V5.11 EXACT STAFF RUNTIME FIX ===== */
.s8-app{padding-bottom:0!important;min-height:100dvh!important}
.s8-main{min-height:calc(100dvh - 64px)!important;padding-bottom:0!important}
#screenHome.active{
  height:auto!important;
  min-height:calc(100dvh - 64px)!important;
  overflow:visible!important;
  display:flex!important;
  flex-direction:column!important;
  padding-bottom:112px!important;
}
#screenHome .staff-campaign-selector{order:3!important;margin:0!important;flex:0 0 auto!important}
#screenHome .primary-capture{order:4!important}
#screenHome .compact-task{order:5!important;flex:0 0 auto!important;min-height:auto!important;overflow:visible!important}
#screenHome .s8-quick-grid{order:6!important}
#screenHome .home-note{order:7!important}
.s8-bottom-nav{
  position:fixed!important;
  left:50%!important;
  bottom:0!important;
  transform:translateX(-50%)!important;
  width:min(520px,100%)!important;
  height:82px!important;
  z-index:999!important;
  padding-bottom:env(safe-area-inset-bottom,0px)!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:0 -12px 35px rgba(18,55,90,.14)!important;
}
.primary-capture:disabled,.primary-capture.is-disabled{
  opacity:.48!important;
  filter:grayscale(.35) saturate(.5)!important;
  cursor:not-allowed!important;
  box-shadow:none!important;
  pointer-events:none!important;
}
.s8-bottom-nav button:disabled,.s8-bottom-nav button.is-disabled{
  opacity:.38!important;
  cursor:not-allowed!important;
}
#screenHome .s8-quick-grid{margin-bottom:0!important}
@media(min-width:800px){.s8-bottom-nav{bottom:24px!important}}
@media(max-width:520px){
  body{padding:0!important}
  .s8-app{width:100%!important;max-width:none!important;box-shadow:none!important}
  #screenHome.active{padding:10px 14px 112px!important;gap:9px!important}
  #screenHome .staff-profile-card{min-height:102px!important}
  #screenHome .today-summary>div{min-height:68px!important}
  #screenHome .primary-capture{min-height:72px!important}
  #screenHome .quick-card{min-height:72px!important}
}


/* ===== V5.12 CAMERA SHUTTER POSITION FIX ===== */
.camera-screen{
  position:relative;
  padding-bottom:0!important;
  overflow:hidden;
}

.camera-stage{
  /* Chừa vùng an toàn cho cụm nút chụp và thanh điều hướng dưới */
  height:calc(100dvh - 64px - 56px - 118px)!important;
  min-height:360px!important;
}

.camera-controls{
  position:relative;
  z-index:45;
  height:118px!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  padding-top:0!important;
  background:#05070a!important;
  pointer-events:none;
}

.camera-controls .shutter{
  pointer-events:auto;
  position:relative;
  z-index:50;
  width:78px!important;
  height:78px!important;
  flex:0 0 78px;
  transform:translateY(-54px);
  border:6px solid #fff!important;
  background:#fff!important;
  box-shadow:
    0 12px 30px rgba(0,0,0,.34),
    0 0 0 5px rgba(255,255,255,.2),
    inset 0 0 0 4px #101722!important;
  transition:transform .16s ease, box-shadow .16s ease;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

.camera-controls .shutter:active{
  transform:translateY(-54px) scale(.92);
  box-shadow:
    0 6px 16px rgba(0,0,0,.3),
    0 0 0 5px rgba(255,255,255,.16),
    inset 0 0 0 4px #101722!important;
}

.camera-controls .shutter:disabled{
  opacity:.45;
  filter:grayscale(.45);
}

.camera-guide{
  bottom:64px!important;
}

/* Bảo đảm thanh menu luôn nằm dưới nút chụp */
.s8-bottom-nav{
  z-index:40!important;
}

@media(max-width:520px){
  .camera-stage{
    height:calc(100dvh - 64px - 56px - 112px)!important;
  }

  .camera-controls{
    height:112px!important;
  }

  .camera-controls .shutter{
    transform:translateY(-50px);
  }

  .camera-controls .shutter:active{
    transform:translateY(-50px) scale(.92);
  }

  .camera-guide{
    bottom:58px!important;
  }
}

@media(min-width:800px){
  .camera-controls .shutter{
    transform:translateY(-45px);
  }

  .camera-controls .shutter:active{
    transform:translateY(-45px) scale(.92);
  }
}

/* V5.15 MOBILE SUPERVISOR */
.supervisor-mobile-app{min-height:100dvh;background:#f1f7fc;font-family:'Bai Jamjuree',sans-serif;color:#123b5d;padding-bottom:24px}
.supervisor-mobile-header{height:76px;padding:0 20px;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#0a4fa2,#147fe0);color:#fff}
.supervisor-mobile-header>div{display:flex;align-items:center;gap:10px}.supervisor-mobile-header span{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#19a9de;font-weight:900}
.supervisor-mobile-header button{width:40px;height:40px;border:0;border-radius:12px;background:rgba(255,255,255,.14);color:#fff;font-size:22px}
.supervisor-profile{margin:14px;padding:16px;display:flex;gap:12px;align-items:center;border-radius:20px;background:linear-gradient(135deg,#0b3f86,#146bd1);color:#fff}
.supervisor-profile-avatar{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#3a83ee;border:4px solid rgba(255,255,255,.35);font-size:24px;font-weight:900}
.supervisor-profile span,.supervisor-profile strong,.supervisor-profile small{display:block}.supervisor-profile span{font-size:9px;font-weight:900;letter-spacing:.12em;color:#a7d8ff}.supervisor-profile strong{font-size:19px}.supervisor-profile small{margin-top:4px}
.supervisor-profile small i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#35de89}
.supervisor-mobile-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 14px 14px}.supervisor-mobile-stats article{padding:14px;border-radius:16px;background:#fff;border:1px solid #dce9f2;box-shadow:0 8px 20px rgba(33,89,130,.05)}
.supervisor-mobile-stats span,.supervisor-mobile-stats strong{display:block}.supervisor-mobile-stats span{font-size:9px;color:#7890a3}.supervisor-mobile-stats strong{margin-top:5px;font-size:24px;color:#0e5faf}
.supervisor-tabs{display:grid;grid-template-columns:1fr 1fr;margin:0 14px 12px;padding:5px;border-radius:14px;background:#e5eff7}.supervisor-tabs button{height:42px;border:0;border-radius:10px;background:transparent;font-family:inherit;font-weight:800;color:#6d8294}
.supervisor-tabs button.active{background:#fff;color:#1374d0;box-shadow:0 5px 14px rgba(26,93,146,.12)}.supervisor-mobile-content{padding:0 14px}.supervisor-tab-panel{display:none}.supervisor-tab-panel.active{display:block}
.supervisor-mobile-list,.supervisor-photo-list{display:grid;gap:10px}.supervisor-staff-card{display:grid;grid-template-columns:48px 1fr auto;gap:10px;align-items:center;padding:13px;border-radius:16px;background:#fff;border:1px solid #dce8f1}
.supervisor-staff-avatar{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#2480ff,#26c3df);color:#fff;font-weight:900}
.supervisor-staff-card strong,.supervisor-staff-card span,.supervisor-staff-card small,.supervisor-staff-card p{display:block;margin:0}.supervisor-staff-card span,.supervisor-staff-card small,.supervisor-staff-card p{font-size:9px;color:#7a90a2;margin-top:3px}
.supervisor-staff-card a{padding:8px;border-radius:9px;background:#e9f4ff;color:#1671d1;font-size:9px;font-weight:800;text-decoration:none}
.supervisor-photo-card{overflow:hidden;border-radius:18px;background:#fff;border:1px solid #dce8f1}.supervisor-photo-card>img{width:100%;aspect-ratio:16/10;object-fit:cover}.supervisor-photo-body{padding:12px}
.supervisor-photo-body>div{display:flex;justify-content:space-between;gap:8px}.supervisor-photo-body strong{color:#123c5d}.supervisor-photo-body span,.supervisor-photo-body p{font-size:9px;color:#7b91a2}
.supervisor-photo-body small{display:inline-block;margin-top:6px;padding:5px 8px;border-radius:999px;background:#eaf4ff;color:#1970cd}.supervisor-photo-body small.high{background:#ffe9ec;color:#d54858}
.supervisor-photo-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;padding:0 12px 12px}.supervisor-photo-actions button{height:38px;border:0;border-radius:10px;font-family:inherit;font-weight:800}
.supervisor-photo-actions button:nth-child(1){background:#e3f8ed;color:#159459}.supervisor-photo-actions button:nth-child(2){background:#eaf4ff;color:#166fc8}.supervisor-photo-actions button:nth-child(3){background:#ffecef;color:#d94a5b}
.supervisor-loading,.supervisor-empty-mobile{padding:28px;border-radius:16px;background:#fff;color:#7b90a1;text-align:center}

/* V5.16 SUPERVISOR FIELD CHECK-IN */
.supervisor-tabs.three{grid-template-columns:repeat(3,1fr)}
.field-supervision-card,.field-active-card{padding:18px;border-radius:20px;background:#fff;border:1px solid #d9e7f1;box-shadow:0 10px 25px rgba(24,75,115,.06)}
.field-supervision-card>span,.field-active-head span{font-size:9px;font-weight:900;letter-spacing:.12em;color:#1681d5}
.field-supervision-card h2{margin:7px 0;color:#123e62}.field-supervision-card p{color:#72899b;font-size:11px;line-height:1.55}
.field-supervision-card select{width:100%;height:48px;border:1px solid #d6e5ef;border-radius:12px;padding:0 12px;background:#fafdff;font-family:inherit}
.field-supervision-card button,.field-capture-button{width:100%;height:52px;margin-top:12px;border:0;border-radius:14px;background:linear-gradient(135deg,#157cff,#1fc1dd);color:#fff;font-family:inherit;font-weight:900}
.field-active-head{display:flex;align-items:center;justify-content:space-between}.field-active-head strong,.field-active-head small{display:block}.field-active-head strong{font-size:19px;color:#123e62}.field-active-head small{color:#7b91a2}.field-active-head i{padding:7px 10px;border-radius:999px;background:#e4faee;color:#15925a;font-style:normal;font-size:9px;font-weight:900}
.field-progress-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}.field-progress-grid article{padding:13px;border-radius:14px;background:#f4f9fd;border:1px solid #e0eaf2}.field-progress-grid span,.field-progress-grid strong{display:block}.field-progress-grid span{font-size:9px;color:#7890a3}.field-progress-grid strong{margin-top:5px;color:#0f62ad;font-size:17px}
.field-active-card textarea{width:100%;min-height:82px;margin-top:10px;border:1px solid #d6e5ef;border-radius:12px;padding:11px;font-family:inherit}.field-end-button{width:100%;height:46px;margin-top:10px;border:1px solid #ffd1d6;border-radius:13px;background:#fff0f2;color:#d84858;font-family:inherit;font-weight:900}
.field-camera-modal[hidden]{display:none}.field-camera-modal{position:fixed;inset:0;z-index:99999;background:#05070a}.field-camera-shell{position:relative;width:100%;height:100dvh;overflow:hidden;background:#000}.field-camera-shell header{position:absolute;left:0;right:0;top:0;z-index:4;height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;background:linear-gradient(135deg,#1478ed,#154bd8);color:#fff}.field-camera-shell header button{width:42px;height:42px;border:0;background:transparent;color:#fff;font-size:36px}.field-camera-shell header span{font-size:10px}.field-camera-shell video{width:100%;height:100%;object-fit:cover}.field-camera-guide{position:absolute;left:24px;right:24px;bottom:125px;padding:12px;border-radius:14px;background:rgba(0,0,0,.55);color:#fff;text-align:center;font-size:11px}.field-shutter{position:absolute;left:50%;bottom:36px;transform:translateX(-50%);width:78px;height:78px;border-radius:50%;border:7px solid #fff;background:#fff;box-shadow:0 0 0 5px rgba(255,255,255,.25),inset 0 0 0 5px #102238}
@media(max-width:420px){.supervisor-tabs.three button{font-size:10px}.field-progress-grid{grid-template-columns:1fr 1fr}}

/* V5.17 SUPERVISOR STAFF GPS */
.supervisor-tabs.four{
  grid-template-columns:repeat(4,1fr);
}
.supervisor-tabs.four button{
  padding:0 5px;
  font-size:9px;
}
.supervisor-gps-summary{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:10px;
}
.supervisor-gps-summary>div{
  padding:14px;
  border-radius:15px;
  background:#fff;
  border:1px solid #dce8f1;
}
.supervisor-gps-summary span,
.supervisor-gps-summary strong{
  display:block;
}
.supervisor-gps-summary span{
  color:#7c91a2;
  font-size:9px;
}
.supervisor-gps-summary strong{
  margin-top:5px;
  color:#0d65b5;
  font-size:23px;
}
.supervisor-gps-list{
  display:grid;
  gap:10px;
}
.supervisor-gps-card{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  gap:11px;
  align-items:start;
  padding:14px;
  border-radius:17px;
  background:#fff;
  border:1px solid #dce8f1;
  box-shadow:0 8px 22px rgba(31,78,118,.05);
}
.supervisor-gps-card.has-gps{
  border-color:#ccead9;
}
.supervisor-gps-card.no-gps{
  border-color:#f3d8a7;
  background:#fffdf8;
}
.supervisor-gps-icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:linear-gradient(135deg,#16a46c,#33d08d);
  color:#fff;
  font-size:21px;
  font-weight:900;
}
.supervisor-gps-card.no-gps .supervisor-gps-icon{
  background:linear-gradient(135deg,#ffae2b,#ffcd63);
}
.supervisor-gps-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.supervisor-gps-title strong{
  color:#123e60;
  font-size:14px;
}
.supervisor-gps-title span{
  padding:5px 8px;
  border-radius:999px;
  background:#e5f8ee;
  color:#16915b;
  font-size:8px;
  font-weight:900;
}
.supervisor-gps-card.no-gps .supervisor-gps-title span{
  background:#fff1d7;
  color:#bd7615;
}
.supervisor-gps-body>small,
.supervisor-gps-body>p{
  display:block;
  margin:4px 0 0;
  color:#7d91a2;
  font-size:9px;
  line-height:1.45;
}
.supervisor-gps-meta{
  display:grid;
  gap:4px;
  margin-top:9px;
  padding-top:9px;
  border-top:1px dashed #dce8ef;
}
.supervisor-gps-meta span{
  color:#456a84;
  font-size:9px;
}
.supervisor-map-button{
  align-self:center;
  padding:10px 11px;
  border-radius:11px;
  background:linear-gradient(135deg,#147cff,#20bddd);
  color:#fff!important;
  font-size:8px;
  font-weight:900;
  text-decoration:none;
  white-space:nowrap;
}
@media(max-width:470px){
  .supervisor-tabs.four{
    grid-template-columns:1fr 1fr;
    gap:4px;
  }
  .supervisor-tabs.four button{
    height:38px;
    font-size:10px;
  }
  .supervisor-gps-card{
    grid-template-columns:44px minmax(0,1fr);
  }
  .supervisor-gps-icon{
    width:44px;
    height:44px;
  }
  .supervisor-map-button{
    grid-column:2;
    justify-self:start;
  }
}

/* V5.18 MOBILE LOGOUT FOR STAFF & SUPERVISOR */
.supervisor-header-actions{display:flex;align-items:center;gap:8px}
.supervisor-mobile-header .mobile-logout-button,
.staff-logout-button{
  width:40px;height:40px;display:grid;place-items:center;border-radius:12px;
  text-decoration:none;font-size:21px;font-weight:900;color:#fff;
  background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.16);
  -webkit-tap-highlight-color:transparent
}
.supervisor-mobile-header .mobile-logout-button:active,
.staff-logout-button:active{transform:scale(.94);background:rgba(255,82,97,.35)}
.staff-logout-button{flex:0 0 40px}
.mobile-account-footer{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:16px 14px 26px;padding:14px;border-radius:16px;background:#fff;
  border:1px solid #dce8f1;box-shadow:0 8px 22px rgba(27,75,112,.06)
}
.mobile-account-footer span,.mobile-account-footer strong{display:block}
.mobile-account-footer span{color:#8294a4;font-size:8px;font-weight:800;letter-spacing:.08em}
.mobile-account-footer strong{margin-top:4px;color:#183f5f;font-size:13px}
.mobile-account-footer>a{
  padding:10px 13px;border-radius:11px;text-decoration:none;background:#fff0f2;
  color:#d94354;border:1px solid #ffd7dc;font-size:9px;font-weight:900;white-space:nowrap
}
.staff-account-footer{margin-bottom:110px}
@media(max-width:420px){
  .s8-topbar .topbar-actions{gap:6px}
  .s8-topbar .s8-utc{padding-left:10px;padding-right:10px;font-size:9px}
  .notify-btn,.staff-logout-button{width:36px!important;height:36px!important;flex-basis:36px}
}

/* V5.19 SUPERVISOR PHOTO REPORT */
.field-capture-button{
  min-height:56px;
  box-shadow:0 12px 28px rgba(21,124,255,.2);
}
.field-capture-button:before{
  content:"📷";
  margin-right:8px;
}

/* V5.20 SUPERVISOR CAMERA FLOW */
.field-camera-ready{
  display:flex;
  align-items:center;
  gap:11px;
  margin:14px 0 2px;
  padding:12px;
  border-radius:14px;
  border:1px solid #cfe4f2;
  background:linear-gradient(135deg,#f4faff,#eef8ff);
}
.field-camera-ready-icon{
  flex:0 0 46px;
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:linear-gradient(135deg,#147cff,#20bddc);
  font-size:22px;
  box-shadow:0 8px 18px rgba(20,124,255,.18);
}
.field-camera-ready strong,
.field-camera-ready span{
  display:block;
}
.field-camera-ready strong{
  color:#123f61;
  font-size:12px;
}
.field-camera-ready span{
  margin-top:3px;
  color:#748b9c;
  font-size:9px;
  line-height:1.4;
}
#startFieldVisit:disabled{
  opacity:.45;
  filter:grayscale(.35);
  cursor:not-allowed;
  box-shadow:none;
}
.supervisor-card-actions{
  display:grid;
  gap:7px;
  align-self:center;
}
.supervisor-card-actions>a,
.supervisor-card-actions>button{
  min-width:88px;
  padding:9px 10px;
  border:0;
  border-radius:10px;
  font-family:inherit;
  font-size:8px;
  font-weight:900;
  text-align:center;
  text-decoration:none;
  white-space:nowrap;
}
.supervisor-card-actions>a{
  background:#e9f4ff;
  color:#1671d1;
}
.supervisor-card-actions>button{
  background:linear-gradient(135deg,#147cff,#20bddc);
  color:#fff;
}
.field-capture-button{
  position:relative;
  overflow:hidden;
}
.field-capture-button:after{
  content:"";
  position:absolute;
  top:-50%;
  left:-35%;
  width:34%;
  height:200%;
  transform:rotate(24deg);
  background:rgba(255,255,255,.3);
  animation:fieldCameraShine 2.4s infinite;
}
@keyframes fieldCameraShine{
  0%{left:-45%}
  55%,100%{left:120%}
}
@media(max-width:470px){
  .supervisor-staff-card{
    grid-template-columns:44px minmax(0,1fr);
  }
  .supervisor-card-actions{
    grid-column:2;
    grid-template-columns:1fr 1fr;
    justify-self:stretch;
  }
}

/* V5.21 SUPERVISOR OWN WORK REPORT */
.supervisor-own-report-card{
  padding:20px;
  border-radius:22px;
  background:#fff;
  border:1px solid #d9e7f1;
  box-shadow:0 12px 30px rgba(28,79,119,.07);
}
.supervisor-own-report-head>span{
  color:#147cc7;
  font-size:9px;
  font-weight:900;
  letter-spacing:.14em;
}
.supervisor-own-report-head h2{
  margin:8px 0 7px;
  color:#123e60;
  font-size:23px;
  line-height:1.2;
}
.supervisor-own-report-head p{
  margin:0 0 17px;
  color:#71889a;
  font-size:11px;
  line-height:1.55;
}
.supervisor-report-field{
  display:block;
  margin-top:12px;
}
.supervisor-report-field>span{
  display:block;
  margin-bottom:6px;
  color:#5e778b;
  font-size:10px;
  font-weight:800;
}
.supervisor-report-field select,
.supervisor-report-field input,
.supervisor-report-field textarea{
  width:100%;
  border:1px solid #d5e4ee;
  border-radius:13px;
  background:#fbfdff;
  color:#153d5b;
  font-family:inherit;
  font-size:12px;
  outline:none;
}
.supervisor-report-field select,
.supervisor-report-field input{
  height:48px;
  padding:0 12px;
}
.supervisor-report-field textarea{
  min-height:108px;
  padding:12px;
  resize:vertical;
  line-height:1.5;
}
.supervisor-report-field select:focus,
.supervisor-report-field input:focus,
.supervisor-report-field textarea:focus{
  border-color:#1a92e4;
  box-shadow:0 0 0 4px rgba(26,146,228,.1);
}
.supervisor-own-gps{
  display:flex;
  align-items:center;
  gap:11px;
  margin-top:14px;
  padding:13px;
  border-radius:14px;
  background:#fff8e9;
  border:1px solid #f2d69c;
}
.supervisor-own-gps>i{
  width:12px;
  height:12px;
  flex:0 0 12px;
  border-radius:50%;
  background:#f5ad27;
  box-shadow:0 0 0 6px rgba(245,173,39,.13);
}
.supervisor-own-gps strong,
.supervisor-own-gps span{
  display:block;
}
.supervisor-own-gps strong{
  color:#8a611e;
  font-size:11px;
}
.supervisor-own-gps span{
  margin-top:3px;
  color:#a08048;
  font-size:9px;
}
.supervisor-own-gps.ready{
  background:#effbf5;
  border-color:#caecd9;
}
.supervisor-own-gps.ready>i{
  background:#32c77a;
  box-shadow:0 0 0 6px rgba(50,199,122,.13);
}
.supervisor-own-gps.ready strong{
  color:#176d49;
}
.supervisor-own-gps.ready span{
  color:#61927c;
}
.supervisor-own-camera-button{
  width:100%;
  min-height:76px;
  margin-top:14px;
  padding:13px 16px;
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:11px;
  align-items:center;
  border:0;
  border-radius:16px;
  background:linear-gradient(135deg,#147cff,#20bddc);
  color:#fff;
  font-family:inherit;
  text-align:left;
  box-shadow:0 13px 28px rgba(20,124,255,.22);
}
.supervisor-own-camera-button>b{
  grid-row:1/3;
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:rgba(255,255,255,.18);
  font-size:22px;
}
.supervisor-own-camera-button>span{
  align-self:end;
  font-size:12px;
  font-weight:900;
}
.supervisor-own-camera-button>small{
  align-self:start;
  margin-top:3px;
  color:#dff7ff;
  font-size:8px;
}
.supervisor-own-camera-button:active{
  transform:scale(.985);
}

/* V5.22 SUPERVISOR QUICK REPORT BUTTON */
.supervisor-quick-report{
  margin:0 14px 14px;
}
.supervisor-quick-report>button{
  width:100%;
  min-height:78px;
  display:grid;
  grid-template-columns:54px minmax(0,1fr) 32px;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:0;
  border-radius:18px;
  background:linear-gradient(135deg,#147cff 0%,#1b9fe7 55%,#20bddc 100%);
  color:#fff;
  font-family:inherit;
  text-align:left;
  box-shadow:0 14px 30px rgba(20,124,255,.22);
  position:relative;
  overflow:hidden;
}
.supervisor-quick-report>button:before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 90% 10%,rgba(255,255,255,.22),transparent 34%),
    linear-gradient(110deg,transparent 0 36%,rgba(255,255,255,.15) 48%,transparent 60%);
  pointer-events:none;
}
.supervisor-quick-report-icon{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.25);
  font-size:25px;
  position:relative;
  z-index:1;
}
.supervisor-quick-report-text{
  min-width:0;
  position:relative;
  z-index:1;
}
.supervisor-quick-report-text span,
.supervisor-quick-report-text strong,
.supervisor-quick-report-text small{
  display:block;
}
.supervisor-quick-report-text span{
  font-size:8px;
  font-weight:900;
  letter-spacing:.13em;
  color:#dff6ff;
}
.supervisor-quick-report-text strong{
  margin-top:4px;
  font-size:14px;
  line-height:1.2;
}
.supervisor-quick-report-text small{
  margin-top:4px;
  font-size:8px;
  color:#e6f8ff;
}
.supervisor-quick-report-arrow{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(255,255,255,.18);
  font-size:25px;
  line-height:1;
  position:relative;
  z-index:1;
}
.supervisor-quick-report>button:active{
  transform:scale(.985);
}
@media(max-width:380px){
  .supervisor-quick-report>button{
    grid-template-columns:48px minmax(0,1fr) 28px;
    gap:9px;
    padding:11px;
  }
  .supervisor-quick-report-icon{
    width:48px;
    height:48px;
  }
  .supervisor-quick-report-text strong{
    font-size:12px;
  }
}

/* V5.23 SUPERVISOR CURRENT GPS */
.supervisor-current-location{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  margin:0 14px 14px;
  padding:13px;
  border-radius:17px;
  background:#fff;
  border:1px solid #dbe8f1;
  box-shadow:0 9px 23px rgba(28,78,116,.06);
}
.supervisor-location-icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:linear-gradient(135deg,#ffad2a,#ffd166);
  color:#fff;
  font-size:24px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(255,173,42,.18);
}
.supervisor-location-info{
  min-width:0;
}
.supervisor-location-info span,
.supervisor-location-info strong,
.supervisor-location-info small{
  display:block;
}
.supervisor-location-info span{
  color:#6d879a;
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
}
.supervisor-location-info strong{
  margin-top:4px;
  color:#173f5d;
  font-size:12px;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.supervisor-location-info small{
  margin-top:4px;
  color:#8195a4;
  font-size:8px;
  line-height:1.35;
}
.supervisor-current-location>button{
  min-width:82px;
  height:38px;
  padding:0 10px;
  border:0;
  border-radius:11px;
  background:#edf5fb;
  color:#176eb8;
  font-family:inherit;
  font-size:8px;
  font-weight:900;
}
.supervisor-current-location.ready{
  border-color:#ccebd9;
  background:linear-gradient(135deg,#ffffff,#f4fcf8);
}
.supervisor-current-location.ready .supervisor-location-icon{
  background:linear-gradient(135deg,#17a86e,#39d392);
  box-shadow:0 8px 18px rgba(23,168,110,.18);
}
.supervisor-current-location.ready>button{
  background:#e3f8ed;
  color:#148f59;
}
.supervisor-current-location>button:disabled{
  opacity:.55;
}
@media(max-width:430px){
  .supervisor-current-location{
    grid-template-columns:44px minmax(0,1fr);
  }
  .supervisor-location-icon{
    width:44px;
    height:44px;
  }
  .supervisor-current-location>button{
    grid-column:2;
    justify-self:start;
    min-width:110px;
  }
  .supervisor-location-info strong{
    white-space:normal;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
  }
}

/* V5.25 SUPERVISOR CONFIRM BEFORE UPLOAD */
.supervisor-confirm-modal[hidden]{display:none}
.supervisor-confirm-modal{
  position:fixed;
  inset:0;
  z-index:100000;
  overflow:auto;
  background:#f2f7fc;
  font-family:'Bai Jamjuree',sans-serif;
}
.supervisor-confirm-shell{
  width:min(100%,620px);
  min-height:100dvh;
  margin:auto;
  padding-bottom:28px;
  background:#fff;
}
.supervisor-confirm-header{
  min-height:110px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:17px 20px;
  background:linear-gradient(135deg,#147cff,#2157ed);
  color:#fff;
}
.supervisor-confirm-header button{
  width:40px;
  height:40px;
  border:0;
  background:transparent;
  color:#fff;
  font-size:36px;
}
.supervisor-confirm-header span,
.supervisor-confirm-header strong{
  display:block;
}
.supervisor-confirm-header span{
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
}
.supervisor-confirm-header strong{
  margin-top:5px;
  font-size:18px;
}
.supervisor-confirm-header small{
  padding:9px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  font-size:9px;
  white-space:nowrap;
}
.supervisor-confirm-preview{
  position:relative;
  width:100%;
  min-height:360px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#080a0d;
}
.supervisor-confirm-preview>img{
  display:block;
  width:100%;
  max-height:590px;
  object-fit:contain;
}
.supervisor-confirm-stamp{
  position:absolute;
  left:16px;
  right:16px;
  bottom:14px;
  padding:12px 14px;
  border-radius:12px;
  background:linear-gradient(90deg,rgba(4,25,51,.94),rgba(5,45,88,.86));
  color:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
}
.supervisor-confirm-stamp b,
.supervisor-confirm-stamp span{
  display:block;
}
.supervisor-confirm-stamp b{
  margin-bottom:5px;
  font-size:10px;
}
.supervisor-confirm-stamp span{
  font-size:8px;
  line-height:1.45;
  color:#dcecff;
}
.supervisor-confirm-info{
  padding:20px;
}
.supervisor-confirm-info>span{
  color:#7a8fa1;
  font-size:9px;
  font-weight:900;
  letter-spacing:.1em;
}
.supervisor-confirm-info h2{
  margin:7px 0 15px;
  color:#153e5f;
  font-size:21px;
}
.supervisor-confirm-row{
  display:grid;
  grid-template-columns:130px minmax(0,1fr);
  gap:12px;
  padding:13px 0;
  border-bottom:1px solid #e5edf3;
}
.supervisor-confirm-row small{
  color:#8193a2;
  font-size:10px;
}
.supervisor-confirm-row strong{
  color:#173e5c;
  font-size:11px;
  line-height:1.45;
  text-align:right;
}
.supervisor-confirm-row.location strong{
  color:#0f69bc;
}
.supervisor-confirm-actions{
  position:sticky;
  bottom:0;
  z-index:5;
  display:grid;
  grid-template-columns:1fr 1.45fr;
  gap:10px;
  padding:13px 20px calc(13px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.96);
  border-top:1px solid #e1eaf1;
  backdrop-filter:blur(12px);
}
.supervisor-confirm-actions button{
  min-height:54px;
  border-radius:14px;
  font-family:inherit;
  font-size:12px;
  font-weight:900;
}
#retakeSupervisorPhoto{
  border:1px solid #1671c9;
  background:#fff;
  color:#1671c9;
}
#confirmUploadSupervisorPhoto{
  border:0;
  background:linear-gradient(135deg,#147cff,#2157ed);
  color:#fff;
  box-shadow:0 10px 22px rgba(20,124,255,.22);
}
#confirmUploadSupervisorPhoto:disabled{
  opacity:.55;
}
@media(max-width:430px){
  .supervisor-confirm-header{
    grid-template-columns:34px minmax(0,1fr);
  }
  .supervisor-confirm-header small{
    grid-column:2;
    justify-self:start;
    margin-top:-10px;
  }
  .supervisor-confirm-preview{
    min-height:310px;
  }
  .supervisor-confirm-row{
    grid-template-columns:105px minmax(0,1fr);
  }
}

/* V5.26 SUPERVISOR RUNTIME STABILITY */
.supervisor-runtime-error{
  margin:12px 14px;
  padding:12px 14px;
  border-radius:13px;
  background:#fff0f2;
  border:1px solid #ffd5db;
  color:#c83e50;
  font-size:10px;
  line-height:1.45;
}
#fieldShutter:disabled,
#confirmUploadSupervisorPhoto:disabled{
  opacity:.55;
  pointer-events:none;
}

/* V5.27 GPS UPDATE FIX */
.supervisor-current-location.loading{
  border-color:#9ed0f4;
  background:linear-gradient(135deg,#fff,#eef8ff);
}
.supervisor-current-location.loading .supervisor-location-icon{
  animation:s8GpsPulse 1.1s infinite ease-in-out;
}
@keyframes s8GpsPulse{
  0%,100%{transform:scale(1);opacity:1}
  50%{transform:scale(.9);opacity:.6}
}
#updateSupervisorLocation{
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
#updateSupervisorLocation:disabled{
  cursor:wait;
}

/* V5.30 DIRECT SUPERVISOR CAMERA */
#quickSupervisorReport{
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
#quickSupervisorReport:active{
  transform:scale(.985);
}
.supervisor-photo-list article strong{
  line-height:1.35;
}

/* V5.33 FULL STAFF RESTORE */
.s8-mobile-app{
  background:
    radial-gradient(circle at 50% -8%,rgba(28,132,255,.14),transparent 33%),
    linear-gradient(180deg,#f5f9fd,#edf5fb);
}
.primary-capture{
  min-height:94px;
  border-radius:24px!important;
  background:
    radial-gradient(circle at 88% 8%,rgba(255,255,255,.26),transparent 30%),
    linear-gradient(135deg,#16a9e7,#126ef0 58%,#1748dd)!important;
  box-shadow:0 18px 36px rgba(20,104,229,.24)!important;
}
.staff-campaign-selector,
.task-card,
.quick-card,
.today-summary>div{
  border-color:#d8e7f1!important;
  box-shadow:0 12px 28px rgba(27,76,113,.07)!important;
}
.camera-screen{
  background:#03070c!important;
}
.s8-bottom-nav{
  background:rgba(255,255,255,.96)!important;
  backdrop-filter:blur(17px);
  box-shadow:0 -11px 28px rgba(33,74,102,.1);
}
.toast.error{
  left:18px!important;
  right:18px!important;
  bottom:98px!important;
  padding:14px 16px!important;
  border-radius:16px!important;
  background:#c83c2e!important;
  box-shadow:0 14px 30px rgba(132,34,26,.25)!important;
  line-height:1.45;
}
.s8-screen.active{
  animation:s8StaffScreenIn .22s ease;
}
@keyframes s8StaffScreenIn{
  from{opacity:.5;transform:translateY(5px)}
  to{opacity:1;transform:none}
}

/* V5.34 REMOVE REDUNDANT STAFF ACCOUNT CARD */
.staff-account-footer,
.mobile-account-footer.staff-account-footer{
  display:none!important;
  height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
}

/* V5.35 REMOVE BLACK BLOCK / RESTORE CAMERA */
#screenHome > .camera-stage,
#screenHome > .camera-controls,
#screenHome > video,
#screenHome > canvas{
  display:none!important;
}
#screenCamera.camera-screen{
  min-height:100dvh;
}

/* V5.36 AUTH + CTV MOBILE */
.s8-auth-page{min-height:100dvh;display:grid;grid-template-columns:minmax(320px,1fr) minmax(460px,.85fr);font-family:'Bai Jamjuree',sans-serif;background:#f5f9ff;color:#102d4c}
.s8-auth-visual{padding:64px;display:flex;flex-direction:column;justify-content:space-between;background:radial-gradient(circle at 20% 10%,#23b8f1 0,transparent 30%),linear-gradient(145deg,#072d74,#075ddf 65%,#16aee8);color:#fff;position:relative;overflow:hidden}
.s8-auth-visual:after{content:"";position:absolute;width:520px;height:520px;border:1px solid rgba(255,255,255,.12);border-radius:50%;right:-180px;bottom:-220px;box-shadow:0 0 0 70px rgba(255,255,255,.04),0 0 0 140px rgba(255,255,255,.03)}
.s8-auth-brand{display:flex;align-items:center;gap:12px;font-size:22px;font-weight:900}.s8-auth-brand b,.s8-auth-mobile-logo b{width:54px;height:54px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(135deg,#19c5e8,#1879fb);font-size:23px;color:#fff}.s8-auth-visual-copy{max-width:650px;position:relative;z-index:1}.s8-auth-visual-copy small{font-size:11px;font-weight:900;letter-spacing:.16em;color:#aeeeff}.s8-auth-visual-copy h2{font-size:42px;line-height:1.14;margin:16px 0}.s8-auth-visual-copy p{font-size:15px;line-height:1.7;color:#dcecff}.s8-auth-visual-copy>div{display:flex;gap:18px;flex-wrap:wrap;margin-top:28px}.s8-auth-visual-copy>div span{font-size:11px;padding:10px 14px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(255,255,255,.08)}
.s8-auth-panel{display:grid;place-items:center;padding:40px}.s8-auth-card{width:min(100%,610px);background:#fff;padding:38px;border:1px solid #dce8f2;border-radius:28px;box-shadow:0 25px 70px rgba(20,63,103,.13)}.s8-auth-mobile-logo{display:none;align-items:center;gap:10px;font-weight:900}.s8-auth-heading span{font-size:9px;font-weight:900;letter-spacing:.14em;color:#1480d5}.s8-auth-heading h1{font-size:29px;margin:8px 0 7px}.s8-auth-heading p{margin:0 0 25px;color:#74899c;font-size:12px;line-height:1.5}.s8-auth-form{display:grid;gap:15px}.s8-register-grid{grid-template-columns:1fr 1fr}.s8-register-grid .full{grid-column:1/-1}.s8-auth-form label>span{display:block;margin-bottom:7px;font-size:10px;font-weight:800}.s8-auth-input{display:flex;align-items:center;gap:9px;height:52px;padding:0 14px;border:1px solid #d9e6f0;border-radius:14px;background:#fbfdff}.s8-auth-input:focus-within{border-color:#1685e5;box-shadow:0 0 0 4px rgba(22,133,229,.1)}.s8-auth-input i{font-style:normal;color:#6590b2}.s8-auth-input input{width:100%;border:0;outline:0;background:transparent;font:inherit;font-size:12px}.s8-auth-options{display:flex;justify-content:space-between;align-items:center;font-size:10px}.s8-auth-options label{display:flex;align-items:center;gap:6px}.s8-auth-options a,.s8-auth-switch a{color:#0875dd;font-weight:800;text-decoration:none}.s8-auth-submit{height:54px;border:0;border-radius:15px;background:linear-gradient(135deg,#1088f3,#1d54ed);color:#fff;font-family:inherit;font-size:12px;font-weight:900;box-shadow:0 12px 24px rgba(20,108,235,.2)}.s8-auth-submit b{float:right}.s8-auth-switch{text-align:center;margin-top:20px;padding-top:18px;border-top:1px solid #e5edf3;font-size:11px}.s8-auth-notice{margin-bottom:16px;padding:12px;border-radius:12px;background:#eaf9f1;color:#168453;font-size:10px;line-height:1.5}.s8-auth-notice.error{background:#fff0f2;color:#c13a4b}.s8-register-note{padding:11px;border-radius:12px;background:#f0f7ff;color:#5e7890;font-size:9px;line-height:1.5}
.ctv-mobile-app{width:min(100%,720px);min-height:100dvh;margin:auto;background:linear-gradient(180deg,#edf7ff,#f6f9fc);font-family:'Bai Jamjuree',sans-serif;color:#133d5c;padding-bottom:35px}.ctv-topbar{height:92px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#0868c9,#17a7df);color:#fff}.ctv-topbar>div{display:flex;align-items:center;gap:10px}.ctv-topbar b{width:45px;height:45px;display:grid;place-items:center;border-radius:14px;background:rgba(255,255,255,.18)}.ctv-topbar strong{font-size:17px}.ctv-topbar a{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;background:rgba(255,255,255,.16);color:#fff;text-decoration:none}.ctv-mobile-app main{padding:16px}.ctv-profile-card{display:grid;grid-template-columns:70px minmax(0,1fr);gap:13px;align-items:center;padding:19px;border-radius:23px;background:linear-gradient(135deg,#073d91,#087bd7);color:#fff;box-shadow:0 15px 35px rgba(8,82,157,.23)}.ctv-avatar{width:70px;height:70px;display:grid;place-items:center;border-radius:50%;border:5px solid rgba(255,255,255,.25);font-size:27px;background:#438ee7}.ctv-profile-card span{font-size:9px;letter-spacing:.12em;font-weight:900;color:#b8e4ff}.ctv-profile-card h2{margin:4px 0;font-size:21px}.ctv-profile-card small{font-size:10px}.ctv-profile-card small i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#22dc85}.ctv-profile-card em{grid-column:1/-1;padding:9px 12px;border-radius:11px;background:rgba(255,255,255,.12);font-style:normal;font-size:10px;text-align:center}.ctv-success-note{margin-top:12px;padding:12px;border-radius:13px;background:#e7faf0;color:#138153;font-size:10px}.ctv-status-card,.ctv-profile-form{margin-top:14px;padding:19px;border-radius:22px;background:#fff;border:1px solid #dbe9f2;box-shadow:0 12px 30px rgba(30,78,111,.07)}.ctv-status-card>span,.ctv-section-head>span{font-size:8px;font-weight:900;letter-spacing:.13em;color:#0b7bc8}.ctv-status-card h1{font-size:23px;margin:8px 0}.ctv-status-card p,.ctv-section-head p{font-size:10px;color:#768c9d;line-height:1.55}.ctv-progress{height:9px;border-radius:999px;background:#e6eff5;overflow:hidden;margin:17px 0}.ctv-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#19b479,#18aee9)}.ctv-step-list{display:grid;gap:8px}.ctv-step-list div{display:flex;gap:9px;color:#9aabba;font-size:9px}.ctv-step-list div.done{color:#17845d;font-weight:800}.ctv-telegram-card,.ctv-received-card{margin-top:14px;padding:16px;display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:11px;align-items:center;border-radius:19px;text-decoration:none;background:linear-gradient(135deg,#168de8,#16bdd4);color:#fff;box-shadow:0 13px 27px rgba(20,151,215,.2)}.ctv-telegram-card>div,.ctv-received-card>div{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:rgba(255,255,255,.17);font-size:21px}.ctv-telegram-card small,.ctv-telegram-card strong,.ctv-telegram-card em,.ctv-received-card small,.ctv-received-card strong,.ctv-received-card em{display:block}.ctv-telegram-card small,.ctv-received-card small{font-size:8px;letter-spacing:.09em}.ctv-telegram-card strong,.ctv-received-card strong{font-size:13px;margin:3px 0}.ctv-telegram-card em,.ctv-received-card em{font-style:normal;font-size:8px;color:#dffaff}.ctv-received-card{grid-template-columns:48px minmax(0,1fr);background:linear-gradient(135deg,#fff,#effaf5);color:#154b38;border:1px solid #ccebdc}.ctv-received-card em{color:#6f9284}.ctv-received-card form{grid-column:1/-1}.ctv-received-card button{width:100%;height:46px;border:0;border-radius:13px;background:#1ab47a;color:#fff;font-family:inherit;font-weight:900}.ctv-section-head h2{font-size:20px;margin:7px 0}.ctv-profile-form form{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:15px}.ctv-profile-form label{font-size:9px;font-weight:800}.ctv-profile-form input,.ctv-profile-form textarea{width:100%;box-sizing:border-box;margin-top:6px;border:1px solid #d7e5ef;border-radius:12px;padding:11px;font-family:inherit;font-size:10px;background:#fbfdff}.ctv-profile-form textarea{min-height:75px}.ctv-profile-form .full{grid-column:1/-1}.ctv-form-divider{padding:10px 0;border-top:1px solid #e2ebf1;color:#127bc2;font-size:9px;font-weight:900}.ctv-profile-form button{height:49px;border:0;border-radius:13px;background:linear-gradient(135deg,#1086e9,#1d5be9);color:#fff;font-family:inherit;font-weight:900}
@media(max-width:820px){.s8-auth-page{display:block;background:linear-gradient(180deg,#0874df 0 230px,#f5f9ff 230px)}.s8-auth-visual{display:none}.s8-auth-panel{padding:30px 15px}.s8-auth-card{padding:24px;border-radius:24px}.s8-auth-mobile-logo{display:flex;margin-bottom:25px}.s8-register-grid{grid-template-columns:1fr}.s8-register-grid .full{grid-column:auto}.s8-auth-heading h1{font-size:25px}.ctv-profile-form form{grid-template-columns:1fr}.ctv-profile-form .full{grid-column:auto}}

/* V5.37 CTV WORK PROGRESS */
.ctv-work-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:15px 0}.ctv-work-stat-grid>div{padding:12px;border-radius:13px;background:#f2f8fc}.ctv-work-stat-grid small,.ctv-work-stat-grid strong,.ctv-work-stat-grid em{display:block}.ctv-work-stat-grid small{font-size:8px;color:#718a9c}.ctv-work-stat-grid strong{font-size:19px;color:#0874c9;margin:4px 0}.ctv-work-stat-grid em{font-size:8px;color:#7a91a1;font-style:normal}.ctv-complete-work-btn{width:100%;height:48px;border:0;border-radius:13px;background:linear-gradient(135deg,#14b57b,#10a4db);color:#fff;font-family:inherit;font-weight:900}.ctv-complete-work-btn:disabled{background:#cbd8e1;color:#7f94a4}@media(max-width:480px){.ctv-work-stat-grid{grid-template-columns:1fr}}

/* V5.38 REMOVE CAMPAIGN UI FROM ALL MOBILE APPS */
.campaign-card,
.staff-campaign-selector,
.campaign-section,
[data-section="campaign"],
[data-tab="campaign"]{
  display:none!important;
}

/* V5.39 REGISTER FORM CLEANUP */
.s8-register-grid{
  grid-template-columns:1fr 1fr;
  gap:15px 16px;
}
.s8-register-grid .full{
  grid-column:1/-1;
}
.s8-register-grid input[name="account_username"]{
  font-weight:700;
  letter-spacing:.01em;
}
@media(max-width:640px){
  .s8-register-grid{
    grid-template-columns:1fr;
  }
  .s8-register-grid .full{
    grid-column:auto;
  }
}

/* V5.40 REGISTER REGION */
.s8-auth-input select{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  font-family:inherit;
  font-size:12px;
  color:#314f68;
  appearance:none;
  cursor:pointer;
}
.s8-register-grid label:has(select[name="work_region"]) .s8-auth-input{
  background:linear-gradient(135deg,#fbfdff,#f1f8ff);
}

/* =========================================================
   V5.43 REMOVE EMPTY GAP + ENABLE CTV CAPTURE
   ========================================================= */

/* Xóa toàn bộ phần chiến dịch còn sót */
.campaign-card,
.campaign-section,
.staff-campaign-selector,
.campaign-placeholder,
[data-section="campaign"],
[data-tab="campaign"],
[id*="campaignCard"],
[id*="campaignSection"]{
  display:none!important;
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
}

/* Xóa các vùng trống do block chiến dịch cũ để lại */
#screenHome .empty-block,
#screenHome .empty-placeholder,
#screenHome .home-spacer,
#screenHome .staff-spacer,
#screenHome .task-placeholder,
#screenHome > div:empty,
#screenHome > section:empty{
  display:none!important;
  height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
}

/* Thu gọn khoảng cách giữa nút chụp và nhiệm vụ */
#screenHome{
  gap:12px!important;
}
#screenHome .home-camera-button,
#screenHome .capture-cta,
#screenHome .camera-launch-card{
  margin-bottom:12px!important;
}
#screenHome .task-card,
#screenHome .task-section,
#screenHome .staff-task-card{
  margin-top:0!important;
}

/* CTV đã nhận hàng luôn được phép bấm chụp */
body.s8-ctv-received .capture-cta,
body.s8-ctv-received .camera-launch-card,
body.s8-ctv-received #openCamera,
body.s8-ctv-received #takePhoto,
.ctv-capture-enabled .capture-cta,
.ctv-capture-enabled #openCamera,
.ctv-capture-enabled #takePhoto{
  pointer-events:auto!important;
  opacity:1!important;
  filter:none!important;
}

/* Mobile */
@media(max-width:640px){
  #screenHome{
    gap:10px!important;
  }
  #screenHome .task-card,
  #screenHome .task-section,
  #screenHome .staff-task-card{
    margin-top:0!important;
  }
}

/* =========================================================
   V5.45 STABLE HOME WITHOUT CAMPAIGNS
   ========================================================= */
#screenHome{
  display:none;
}
#screenHome.active{
  display:block!important;
}
#screenHome > *{
  margin-top:12px;
}
#screenHome > *:first-child{
  margin-top:0;
}
#screenHome > :empty{
  display:none!important;
}
.staff-work-summary{
  padding:16px;
  border:1px solid #d8e7f0;
  border-radius:18px;
  background:linear-gradient(135deg,#fff,#eef7ff);
  box-shadow:0 9px 24px rgba(30,75,110,.06);
}
.staff-work-summary>div:first-child span,
.staff-work-summary>div:first-child strong,
.staff-work-summary>div:first-child small{
  display:block;
}
.staff-work-summary>div:first-child span{
  font-size:9px;
  font-weight:900;
  letter-spacing:.12em;
  color:#1680cb;
}
.staff-work-summary>div:first-child strong{
  margin-top:5px;
  font-size:16px;
  color:#123b59;
}
.staff-work-summary>div:first-child small{
  margin-top:4px;
  font-size:10px;
  color:#7890a1;
}
.staff-work-meta{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:14px;
}
.staff-work-meta span{
  padding:10px;
  border-radius:12px;
  background:#fff;
}
.staff-work-meta b,.staff-work-meta strong{
  display:block;
}
.staff-work-meta b{
  font-size:8px;
  color:#8095a5;
}
.staff-work-meta strong{
  margin-top:4px;
  font-size:10px;
  color:#183d58;
}
.primary-capture,
#openCamera,
#takePhoto,
#navCamera{
  pointer-events:auto;
}
.primary-capture.is-disabled,
#openCamera.is-disabled{
  opacity:1!important;
  filter:none!important;
}
.campaign-card,.mission-banner,.campaign-instructions,.task-status,
#campaignPickerModal,#staffCampaignSelector,#campaignEmptyHint,#captureLockNote{
  display:none!important;
}
@media(max-width:520px){
  .staff-work-meta{
    grid-template-columns:1fr 1fr;
  }
  #screenHome > *{
    margin-top:10px;
  }
}

/* =========================================================
   V5.46 PHONE-ONLY REGISTRATION
   ========================================================= */
.s8-phone-register{
  grid-template-columns:1fr!important;
  gap:17px!important;
}
.s8-phone-register .full{
  grid-column:1!important;
}
.s8-phone-register label{
  width:100%;
}
.s8-phone-register .s8-auth-input{
  min-height:62px;
}
.s8-phone-register input{
  font-weight:700;
}
.s8-field-help{
  display:block;
  margin:7px 2px 0;
  font-size:10px;
  line-height:1.45;
  color:#7a91a4;
}
.s8-phone-register .s8-register-note{
  padding:13px 15px;
  line-height:1.55;
  text-align:left;
}

/* V5.47 MOBILE-ONLY APP SHELL */
body.s8-mobile-only-app{
  margin:0!important;
  min-height:100vh;
  background:radial-gradient(circle at 50% 0%,rgba(25,151,235,.12),transparent 38%),#eef5fa!important;
  overflow-x:hidden!important;
}
body.s8-mobile-only-app #page,
body.s8-mobile-only-app .site,
body.s8-mobile-only-app .site-content,
body.s8-mobile-only-app main,
body.s8-mobile-only-app .s8-app,
body.s8-mobile-only-app .ctv-mobile-app,
body.s8-mobile-only-app .supervisor-mobile{
  width:100%!important;
  max-width:430px!important;
  min-width:320px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}
body.s8-mobile-only-app .s8-app,
body.s8-mobile-only-app .ctv-mobile-app,
body.s8-mobile-only-app .supervisor-mobile{
  min-height:100vh!important;
  background:#f4f8fc!important;
  box-shadow:0 0 40px rgba(26,72,104,.16);
  overflow:hidden!important;
}
body.s8-mobile-only-app .staff-profile-card,
body.s8-mobile-only-app .today-summary,
body.s8-mobile-only-app .primary-capture,
body.s8-mobile-only-app .staff-work-summary,
body.s8-mobile-only-app .s8-quick-grid,
body.s8-mobile-only-app .ctv-profile-card,
body.s8-mobile-only-app .ctv-status-card{
  width:calc(100% - 24px)!important;
  margin-left:12px!important;
  margin-right:12px!important;
  box-sizing:border-box!important;
}
body.s8-mobile-only-app .today-summary{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
body.s8-mobile-only-app .today-summary>div{
  min-width:0!important;
  padding:10px 8px!important;
}
body.s8-mobile-only-app .today-summary strong{
  font-size:13px!important;
  white-space:nowrap!important;
}
body.s8-mobile-only-app .primary-capture{
  min-height:88px!important;
  padding:10px!important;
}
body.s8-mobile-only-app .capture-copy strong{font-size:17px!important}
body.s8-mobile-only-app .capture-copy small{
  display:block!important;
  margin-top:4px!important;
  font-size:9px!important;
}
body.s8-mobile-only-app .staff-work-meta{grid-template-columns:1fr 1fr!important}
body.s8-mobile-only-app .s8-quick-grid{
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
}
body.s8-mobile-only-app .bottom-nav{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:0!important;
  transform:translateX(-50%)!important;
  width:100%!important;
  max-width:430px!important;
  z-index:999!important;
  box-shadow:0 -8px 24px rgba(20,62,92,.12)!important;
}
body.s8-mobile-only-app #screenHome,
body.s8-mobile-only-app #screenHistory,
body.s8-mobile-only-app #screenCamera,
body.s8-mobile-only-app #screenConfirm{
  padding-bottom:92px!important;
}
body.s8-mobile-only-app .s8-topbar,
body.s8-mobile-only-app .ctv-topbar,
body.s8-mobile-only-app .supervisor-topbar{
  width:100%!important;
  max-width:430px!important;
  margin:0 auto!important;
  border-radius:0!important;
}
body.s8-mobile-only-app .camera-stage,
body.s8-mobile-only-app .confirm-stage,
body.s8-mobile-only-app video,
body.s8-mobile-only-app canvas{
  width:100%!important;
  max-width:430px!important;
}
@media(min-width:700px){
  body.s8-mobile-only-app{padding:18px 0!important}
  body.s8-mobile-only-app .s8-app,
  body.s8-mobile-only-app .ctv-mobile-app,
  body.s8-mobile-only-app .supervisor-mobile{border-radius:28px!important}
  body.s8-mobile-only-app .s8-topbar,
  body.s8-mobile-only-app .ctv-topbar,
  body.s8-mobile-only-app .supervisor-topbar{border-radius:28px 28px 0 0!important}
}
@media(max-width:480px){
  body.s8-mobile-only-app{padding:0!important}
  body.s8-mobile-only-app #page,
  body.s8-mobile-only-app .site,
  body.s8-mobile-only-app .site-content,
  body.s8-mobile-only-app main,
  body.s8-mobile-only-app .s8-app,
  body.s8-mobile-only-app .ctv-mobile-app,
  body.s8-mobile-only-app .supervisor-mobile{
    max-width:none!important;
    min-width:0!important;
  }
  body.s8-mobile-only-app .s8-app,
  body.s8-mobile-only-app .ctv-mobile-app,
  body.s8-mobile-only-app .supervisor-mobile{
    border-radius:0!important;
    box-shadow:none!important;
  }
}

/* =========================================================
   V5.48 MOBILE SHELL + GPS WARNING FIX
   ========================================================= */

/* App luôn bắt đầu đúng từ đầu màn hình, không tạo khoảng đệm gây cắt header */
body.s8-mobile-only-app{
  padding:0!important;
}
body.s8-mobile-only-app .s8-app,
body.s8-mobile-only-app .ctv-mobile-app,
body.s8-mobile-only-app .supervisor-mobile{
  position:relative!important;
  margin-top:0!important;
  border-radius:0!important;
}

/* Đồng bộ mọi biến thể thanh điều hướng dưới với đúng khung app */
body.s8-mobile-only-app .bottom-nav,
body.s8-mobile-only-app .s8-bottom-nav,
body.s8-mobile-only-app nav.bottom-navigation,
body.s8-mobile-only-app .mobile-bottom-nav{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:0!important;
  transform:translateX(-50%)!important;
  width:100%!important;
  max-width:430px!important;
  margin:0!important;
  box-sizing:border-box!important;
  z-index:999!important;
}

/* Popup lỗi/cảnh báo gọn và dễ đọc */
.photo-rule-modal .modal-card,
#photoRuleModal .modal-card{
  width:calc(100% - 28px)!important;
  max-width:390px!important;
  padding:22px 18px!important;
}
#modalRuleErrors div,
.quality-errors div{
  line-height:1.45!important;
}
#modalRuleErrors b,
#modalRuleErrors span,
#modalRuleErrors em{
  display:block!important;
  margin-top:4px!important;
}
#modalRuleErrors b{
  margin-top:0!important;
}

/* GPS sai số cao chỉ là cảnh báo, không làm nút tải lên bị khóa */
.quality-errors .warning,
#modalRuleErrors .warning{
  border-color:#ffe0a2!important;
  background:#fff9ea!important;
  color:#9a6200!important;
}
.quality-errors .warning em,
#modalRuleErrors .warning em{
  color:#b57800!important;
}

/* Desktop hiển thị khung điện thoại nhưng không bo/cắt phần đầu */
@media(min-width:700px){
  body.s8-mobile-only-app .s8-app,
  body.s8-mobile-only-app .ctv-mobile-app,
  body.s8-mobile-only-app .supervisor-mobile{
    margin-top:0!important;
    border-radius:0 0 24px 24px!important;
  }
  body.s8-mobile-only-app .s8-topbar,
  body.s8-mobile-only-app .ctv-topbar,
  body.s8-mobile-only-app .supervisor-topbar{
    border-radius:0!important;
  }
}

/* V5.49 FORCE STAFF PREVIEW INTO MOBILE FRAME */
body.s8-staff-preview-mobile{
  margin:0!important;
  padding:18px 0!important;
  min-height:100vh!important;
  overflow-x:hidden!important;
  background:radial-gradient(circle at 50% 0%,rgba(21,145,232,.13),transparent 40%),#edf5fa!important;
}
body.s8-staff-preview-mobile #page,
body.s8-staff-preview-mobile .site,
body.s8-staff-preview-mobile .site-content,
body.s8-staff-preview-mobile main,
body.s8-staff-preview-mobile .s8-app{
  width:430px!important;
  max-width:430px!important;
  min-width:430px!important;
  margin:0 auto!important;
  padding-left:0!important;
  padding-right:0!important;
  box-sizing:border-box!important;
}
body.s8-staff-preview-mobile .s8-app{
  min-height:calc(100vh - 36px)!important;
  border-radius:26px!important;
  overflow:hidden!important;
  background:#f5f9fc!important;
  box-shadow:0 18px 55px rgba(28,74,106,.18)!important;
}
body.s8-staff-preview-mobile .s8-topbar,
body.s8-staff-preview-mobile .staff-profile-card,
body.s8-staff-preview-mobile .today-summary,
body.s8-staff-preview-mobile .primary-capture,
body.s8-staff-preview-mobile .staff-work-summary,
body.s8-staff-preview-mobile .s8-quick-grid{
  width:calc(100% - 24px)!important;
  max-width:none!important;
  margin-left:12px!important;
  margin-right:12px!important;
  box-sizing:border-box!important;
}
body.s8-staff-preview-mobile .s8-topbar{
  width:100%!important;
  margin:0!important;
  border-radius:26px 26px 0 0!important;
}
body.s8-staff-preview-mobile .today-summary{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
body.s8-staff-preview-mobile .today-summary>div{
  min-width:0!important;
  padding:10px 7px!important;
}
body.s8-staff-preview-mobile .staff-work-meta{
  grid-template-columns:1fr 1fr!important;
}
body.s8-staff-preview-mobile .s8-quick-grid{
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
}
body.s8-staff-preview-mobile .bottom-nav,
body.s8-staff-preview-mobile .s8-bottom-nav,
body.s8-staff-preview-mobile nav.bottom-navigation,
body.s8-staff-preview-mobile .mobile-bottom-nav{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:18px!important;
  transform:translateX(-50%)!important;
  width:430px!important;
  max-width:430px!important;
  min-width:430px!important;
  margin:0!important;
  z-index:999!important;
  box-sizing:border-box!important;
}
body.s8-staff-preview-mobile #screenHome,
body.s8-staff-preview-mobile #screenHistory,
body.s8-staff-preview-mobile #screenCamera,
body.s8-staff-preview-mobile #screenConfirm{
  padding-bottom:105px!important;
}
@media(max-width:480px){
  body.s8-staff-preview-mobile{padding:0!important}
  body.s8-staff-preview-mobile #page,
  body.s8-staff-preview-mobile .site,
  body.s8-staff-preview-mobile .site-content,
  body.s8-staff-preview-mobile main,
  body.s8-staff-preview-mobile .s8-app{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }
  body.s8-staff-preview-mobile .s8-app{
    min-height:100vh!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  body.s8-staff-preview-mobile .s8-topbar{border-radius:0!important}
  body.s8-staff-preview-mobile .bottom-nav,
  body.s8-staff-preview-mobile .s8-bottom-nav,
  body.s8-staff-preview-mobile nav.bottom-navigation,
  body.s8-staff-preview-mobile .mobile-bottom-nav{
    bottom:0!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }
}

/* =========================================================
   V5.50 CTV TABBED MOBILE APP
   ========================================================= */
.ctv-tabbed-app{
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  display:grid!important;
  grid-template-rows:auto auto auto minmax(0,1fr)!important;
  overflow:hidden!important;
  background:#f3f8fc!important;
}
.ctv-tabbed-app .ctv-topbar{
  min-height:74px!important;
  padding:12px 18px!important;
  flex-shrink:0;
}
.ctv-compact-profile{
  display:grid;
  grid-template-columns:58px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  margin:12px 14px 10px;
  padding:14px;
  border-radius:20px;
  color:#fff;
  background:linear-gradient(135deg,#0d428f,#087bd9);
  box-shadow:0 12px 28px rgba(9,78,145,.2);
}
.ctv-compact-profile .ctv-avatar{
  width:58px!important;height:58px!important;font-size:23px!important;
}
.ctv-compact-copy{min-width:0}
.ctv-compact-copy span,.ctv-compact-copy h2,.ctv-compact-copy small{display:block}
.ctv-compact-copy span{font-size:8px;letter-spacing:.14em;font-weight:900;color:#b9ddff}
.ctv-compact-copy h2{margin:3px 0;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ctv-compact-copy small{font-size:9px;color:#d8efff}.ctv-compact-copy small i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#2be297}
.ctv-compact-profile em{max-width:105px;padding:7px 9px;border-radius:999px;background:rgba(255,255,255,.14);font-size:8px;font-weight:800;font-style:normal;text-align:center}
.ctv-mini-notice{margin:0 14px 8px;padding:9px 12px;border-radius:11px;font-size:9px}.ctv-mini-notice.success{background:#e9f9f1;color:#137a54}
.ctv-app-tabs{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
  margin:0 14px 10px;
  padding:5px;
  border-radius:16px;
  background:#e7f0f7;
}
.ctv-app-tabs button{
  min-width:0;height:52px;border:0;border-radius:12px;background:transparent;color:#71879a;font-family:inherit;
}
.ctv-app-tabs button span,.ctv-app-tabs button b{display:block}
.ctv-app-tabs button span{font-size:16px;line-height:18px}.ctv-app-tabs button b{margin-top:3px;font-size:8px}
.ctv-app-tabs button.active{background:#fff;color:#0877c9;box-shadow:0 6px 16px rgba(34,80,112,.1)}
.ctv-tab-content{
  min-height:0!important;
  overflow:hidden!important;
  padding:0 14px 14px!important;
}
.ctv-tab-panel{
  display:none!important;
  height:100%!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  padding-bottom:18px;
  scrollbar-width:none;
}
.ctv-tab-panel::-webkit-scrollbar{display:none}
.ctv-tab-panel.active{display:block!important}
.ctv-overview-hero,.ctv-work-card,.ctv-panel-heading+.ctv-step-timeline,.ctv-app-form{
  border:1px solid #d8e6ef;
  border-radius:19px;
  background:#fff;
  box-shadow:0 9px 24px rgba(29,76,109,.06);
}
.ctv-overview-hero{padding:18px}
.ctv-overview-hero>span,.ctv-panel-heading>span{font-size:8px;letter-spacing:.14em;font-weight:900;color:#1480c8}
.ctv-overview-hero h1{margin:7px 0;font-size:23px;color:#153c58}.ctv-overview-hero p{margin:0 0 14px;font-size:10px;line-height:1.5;color:#738b9e}
.ctv-overview-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}
.ctv-overview-grid article{padding:13px;border:1px solid #dce8ef;border-radius:15px;background:#fff}
.ctv-overview-grid span,.ctv-overview-grid strong,.ctv-overview-grid small{display:block}.ctv-overview-grid span{font-size:8px;color:#7c91a1}.ctv-overview-grid strong{margin:5px 0;font-size:13px;color:#123c59}.ctv-overview-grid small{font-size:8px;color:#8296a5}
.ctv-support-action{display:grid;grid-template-columns:42px minmax(0,1fr) 20px;gap:10px;align-items:center;margin-top:10px;padding:12px;border-radius:16px;background:linear-gradient(135deg,#148aec,#16b9cf);color:#fff;text-decoration:none}.ctv-support-action>div{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:rgba(255,255,255,.14);font-size:20px}.ctv-support-action small,.ctv-support-action strong{display:block}.ctv-support-action small{font-size:7px;letter-spacing:.1em}.ctv-support-action strong{margin-top:3px;font-size:13px}
.ctv-receive-action{margin-top:10px}.ctv-receive-action button{width:100%;display:grid;grid-template-columns:42px minmax(0,1fr) 20px;gap:10px;align-items:center;padding:12px;border:0;border-radius:16px;background:linear-gradient(135deg,#13ad75,#0f99cc);color:#fff;text-align:left;font-family:inherit}.ctv-receive-action button>span{font-size:23px}.ctv-receive-action small,.ctv-receive-action strong{display:block}.ctv-receive-action small{font-size:7px}.ctv-receive-action strong{font-size:12px;margin-top:3px}
.ctv-panel-heading{padding:4px 2px 10px}.ctv-panel-heading h2{margin:5px 0 0;font-size:20px;color:#143d59}
.ctv-step-timeline{padding:14px}.ctv-step-timeline>div{display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px;position:relative;padding-bottom:13px}.ctv-step-timeline>div:not(:last-child):after{content:"";position:absolute;left:13px;top:28px;bottom:0;width:2px;background:#dbe6ed}.ctv-step-timeline b{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#edf3f7;color:#8193a0;font-size:9px;z-index:1}.ctv-step-timeline .done b{background:#e2f8ee;color:#14835b}.ctv-step-timeline .current b{background:#1488e8;color:#fff}.ctv-step-timeline strong,.ctv-step-timeline small{display:block}.ctv-step-timeline strong{font-size:10px;color:#173d59}.ctv-step-timeline small{margin-top:3px;font-size:8px;color:#8597a4}
.ctv-work-card{margin-top:10px;padding:16px}.ctv-work-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.ctv-work-kpis>div{padding:10px 7px;border-radius:12px;background:#f1f7fb}.ctv-work-kpis small,.ctv-work-kpis strong,.ctv-work-kpis em{display:block}.ctv-work-kpis small{font-size:7px;color:#7890a1}.ctv-work-kpis strong{margin:4px 0;font-size:17px;color:#0878c9}.ctv-work-kpis em{font-size:7px;color:#8295a3;font-style:normal}
.ctv-app-form{padding:14px}.ctv-app-form label{display:block;margin-bottom:10px}.ctv-app-form label span{display:block;margin:0 0 5px;font-size:8px;font-weight:800;color:#284a62}.ctv-app-form input,.ctv-app-form select,.ctv-app-form textarea{width:100%;box-sizing:border-box;border:1px solid #d5e3ec;border-radius:12px;background:#fbfdff;padding:11px;font-family:inherit;font-size:10px;outline:0}.ctv-app-form textarea{min-height:72px;resize:none}.ctv-app-form button{width:100%;height:48px;border:0;border-radius:13px;background:linear-gradient(135deg,#1488ee,#1766ec);color:#fff;font-family:inherit;font-size:11px;font-weight:900}.ctv-bank-security{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:center;margin-bottom:12px;padding:11px;border-radius:13px;background:#edf8ff}.ctv-bank-security>span{font-size:22px}.ctv-bank-security strong,.ctv-bank-security small{display:block}.ctv-bank-security strong{font-size:10px}.ctv-bank-security small{margin-top:3px;font-size:8px;color:#758c9e}
@media(max-width:380px){.ctv-app-tabs button b{font-size:7px}.ctv-compact-profile{grid-template-columns:52px minmax(0,1fr)}.ctv-compact-profile em{display:none}.ctv-work-kpis{grid-template-columns:1fr 1fr}.ctv-work-kpis>div:last-child{grid-column:1/-1}}

/* =========================================================
   V5.51 CTV TAB OVERLAP & MOBILE SPACING FIX
   ========================================================= */

.ctv-tabbed-app{
  grid-template-rows:auto auto auto minmax(0,1fr)!important;
}

.ctv-tabbed-app .ctv-app-tabs{
  position:relative!important;
  z-index:10!important;
  margin:0 14px 12px!important;
  min-height:64px!important;
  padding:6px!important;
  flex-shrink:0!important;
}

.ctv-tabbed-app .ctv-app-tabs button{
  height:52px!important;
  padding:5px 2px!important;
  line-height:1.1!important;
  overflow:hidden!important;
}

.ctv-tabbed-app .ctv-app-tabs button span{
  height:20px!important;
  line-height:20px!important;
}

.ctv-tabbed-app .ctv-app-tabs button b{
  line-height:13px!important;
  white-space:nowrap!important;
}

.ctv-tabbed-app .ctv-tab-content{
  position:relative!important;
  z-index:1!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:0 14px 16px!important;
}

.ctv-tabbed-app .ctv-tab-panel{
  box-sizing:border-box!important;
  padding-top:8px!important;
}

.ctv-tabbed-app .ctv-panel-heading{
  position:relative!important;
  z-index:1!important;
  min-height:58px!important;
  margin:0 0 10px!important;
  padding:10px 4px 12px!important;
  background:#f3f8fc!important;
}

.ctv-tabbed-app .ctv-panel-heading span{
  display:block!important;
  margin-bottom:7px!important;
  line-height:1.3!important;
}

.ctv-tabbed-app .ctv-panel-heading h2{
  display:block!important;
  margin:0!important;
  line-height:1.2!important;
  font-size:20px!important;
  word-break:break-word!important;
}

.ctv-tabbed-app .ctv-step-timeline,
.ctv-tabbed-app .ctv-app-form,
.ctv-tabbed-app .ctv-work-card{
  position:relative!important;
  z-index:1!important;
  margin-top:0!important;
}

.ctv-tabbed-app .ctv-work-card .ctv-panel-heading{
  min-height:auto!important;
  padding:0 0 12px!important;
  margin:0!important;
  background:transparent!important;
}

/* Hồ sơ và ngân hàng không để tiêu đề đè lên form */
.ctv-tab-panel[data-ctv-panel="profile"] .ctv-app-form,
.ctv-tab-panel[data-ctv-panel="bank"] .ctv-app-form{
  margin-top:0!important;
}

/* Tối ưu điện thoại màn hình thấp */
@media(max-width:480px){
  .ctv-tabbed-app .ctv-topbar{
    min-height:70px!important;
    padding:10px 16px!important;
  }

  .ctv-compact-profile{
    margin:10px 12px 8px!important;
    padding:12px!important;
  }

  .ctv-tabbed-app .ctv-app-tabs{
    margin:0 12px 10px!important;
    min-height:60px!important;
  }

  .ctv-tabbed-app .ctv-tab-content{
    padding:0 12px 12px!important;
  }

  .ctv-tabbed-app .ctv-panel-heading{
    min-height:54px!important;
    padding:8px 3px 10px!important;
  }

  .ctv-tabbed-app .ctv-panel-heading h2{
    font-size:18px!important;
  }
}

/* Màn hình rất hẹp */
@media(max-width:360px){
  .ctv-tabbed-app .ctv-app-tabs button b{
    font-size:6.5px!important;
  }

  .ctv-tabbed-app .ctv-panel-heading h2{
    font-size:17px!important;
  }
}

/* =========================================================
   V5.52 PREMIUM AUTH UI + AUTO LOGIN
   ========================================================= */
.s8-auth-page{
  min-height:100dvh!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.08fr) minmax(480px,.92fr)!important;
  gap:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#f3f8fc!important;
}
.s8-auth-visual{
  position:relative!important;
  min-height:100dvh!important;
  padding:64px 72px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  overflow:hidden!important;
  background:
    radial-gradient(circle at 18% 14%,rgba(52,212,255,.35),transparent 27%),
    radial-gradient(circle at 88% 85%,rgba(32,164,255,.42),transparent 34%),
    linear-gradient(145deg,#0750af 0%,#0d6fde 48%,#12b9d1 100%)!important;
}
.s8-auth-visual:before,
.s8-auth-visual:after{
  content:"";
  position:absolute;
  border:1px solid rgba(255,255,255,.12);
  border-radius:50%;
  pointer-events:none;
}
.s8-auth-visual:before{
  width:620px;height:620px;right:-270px;bottom:-260px;
  box-shadow:0 0 0 70px rgba(255,255,255,.025),0 0 0 150px rgba(255,255,255,.018);
}
.s8-auth-visual:after{
  width:260px;height:260px;left:-130px;top:32%;
  background:rgba(255,255,255,.025);
}
.s8-auth-brand{
  position:relative;z-index:2;
  display:flex!important;align-items:center!important;gap:12px!important;
  color:#fff!important;
}
.s8-auth-brand b,
.s8-auth-mobile-logo b{
  width:58px!important;height:58px!important;
  display:grid!important;place-items:center!important;
  border-radius:18px!important;
  background:linear-gradient(135deg,#18c7df,#1769ff)!important;
  box-shadow:0 12px 30px rgba(0,37,119,.25)!important;
  font-size:25px!important;font-style:italic!important;
}
.s8-auth-brand span{font-size:22px!important;font-weight:900!important}
.s8-auth-brand em{
  padding:6px 9px;border:1px solid rgba(255,255,255,.22);
  border-radius:999px;font-size:8px;font-style:normal;letter-spacing:.12em;
}
.s8-auth-visual-copy{
  position:relative!important;z-index:2!important;
  max-width:660px!important;color:#fff!important;
}
.s8-auth-visual-copy>small{
  font-size:10px!important;font-weight:900!important;letter-spacing:.18em!important;
  color:#b8edff!important;
}
.s8-auth-visual-copy h2{
  margin:18px 0!important;
  max-width:650px!important;
  font-size:48px!important;line-height:1.12!important;
  color:#fff!important;letter-spacing:-.025em!important;
}
.s8-auth-visual-copy p{
  max-width:620px!important;font-size:15px!important;line-height:1.65!important;
  color:#d8efff!important;
}
.s8-auth-visual-copy>div{
  display:flex!important;gap:10px!important;flex-wrap:wrap!important;margin-top:30px!important;
}
.s8-auth-visual-copy>div span{
  padding:10px 14px!important;border:1px solid rgba(255,255,255,.2)!important;
  border-radius:999px!important;background:rgba(255,255,255,.08)!important;
  backdrop-filter:blur(10px)!important;font-size:10px!important;color:#fff!important;
}
.s8-auth-panel{
  min-height:100dvh!important;
  display:grid!important;place-items:center!important;
  padding:42px!important;
  background:
    radial-gradient(circle at 85% 8%,rgba(21,156,233,.08),transparent 32%),
    #f5f9fc!important;
}
.s8-auth-card{
  width:100%!important;max-width:520px!important;
  max-height:calc(100dvh - 84px)!important;
  overflow-y:auto!important;scrollbar-width:none!important;
  padding:34px 36px!important;
  border:1px solid #d9e6ef!important;border-radius:30px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 26px 70px rgba(23,67,99,.14)!important;
  backdrop-filter:blur(18px)!important;
  box-sizing:border-box!important;
}
.s8-auth-card::-webkit-scrollbar{display:none!important}
.s8-auth-mobile-logo{
  display:none!important;align-items:center!important;gap:12px!important;
  margin-bottom:25px!important;
}
.s8-auth-mobile-logo span{font-size:17px!important;font-weight:900!important;color:#123b58!important}
.s8-auth-heading{margin-bottom:27px!important}
.s8-auth-heading>span{
  display:block!important;margin-bottom:9px!important;
  font-size:9px!important;font-weight:900!important;letter-spacing:.17em!important;color:#0879cc!important;
}
.s8-auth-heading h1{
  margin:0!important;font-size:31px!important;line-height:1.15!important;
  letter-spacing:-.025em!important;color:#102f49!important;
}
.s8-auth-heading p{
  margin:9px 0 0!important;font-size:11px!important;line-height:1.55!important;color:#7b90a1!important;
}
.s8-auth-form{display:grid!important;gap:17px!important}
.s8-auth-form label>span{
  display:block!important;margin-bottom:7px!important;
  font-size:9px!important;font-weight:900!important;color:#21455e!important;
}
.s8-auth-input{
  min-height:58px!important;
  display:grid!important;grid-template-columns:35px minmax(0,1fr)!important;
  align-items:center!important;
  border:1px solid #d4e3ed!important;border-radius:16px!important;
  background:#fbfdff!important;transition:.18s ease!important;
}
.s8-auth-input:focus-within{
  border-color:#1785e2!important;background:#fff!important;
  box-shadow:0 0 0 4px rgba(23,133,226,.09)!important;
}
.s8-auth-input i{
  display:grid!important;place-items:center!important;
  font-size:15px!important;font-style:normal!important;color:#3788c2!important;
}
.s8-auth-input input{
  width:100%!important;height:56px!important;border:0!important;outline:0!important;
  background:transparent!important;font-family:inherit!important;font-size:12px!important;
  color:#173a55!important;box-sizing:border-box!important;
}
.s8-auth-input input::placeholder{color:#9aaab6!important}
.s8-field-help{
  margin:7px 3px 0!important;font-size:9px!important;line-height:1.45!important;color:#8498a7!important;
}
.s8-auth-options{
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:12px!important;font-size:9px!important;
}
.s8-auth-options label{display:flex!important;align-items:center!important;gap:6px!important;color:#5f7688!important}
.s8-auth-options a,.s8-auth-switch a{color:#0878cf!important;font-weight:900!important;text-decoration:none!important}
.s8-auth-submit{
  min-height:58px!important;border:0!important;border-radius:16px!important;
  background:linear-gradient(135deg,#0b8bf0,#1c5bef)!important;color:#fff!important;
  font-family:inherit!important;font-size:11px!important;font-weight:900!important;
  box-shadow:0 13px 27px rgba(18,107,230,.23)!important;
  transition:.18s ease!important;
}
.s8-auth-submit:hover{transform:translateY(-1px)!important;box-shadow:0 17px 33px rgba(18,107,230,.29)!important}
.s8-auth-submit b{float:right!important;font-size:15px!important}
.s8-auth-switch{
  margin-top:22px!important;padding-top:20px!important;border-top:1px solid #e2ebf1!important;
  text-align:center!important;font-size:9px!important;color:#637b8d!important;
}
.s8-register-note{
  padding:12px 14px!important;border-radius:13px!important;
  background:linear-gradient(135deg,#edf7ff,#f1f8fc)!important;
  font-size:9px!important;line-height:1.55!important;color:#70889a!important;
}
.s8-auth-notice{
  margin-bottom:16px!important;padding:12px 14px!important;border-radius:13px!important;
  font-size:10px!important;line-height:1.45!important;
}
.s8-auth-notice.success{background:#e8f9f0!important;color:#147851!important}
.s8-auth-notice.error{background:#ffedf0!important;color:#b63d51!important}
.ctv-welcome-notice b,.ctv-welcome-notice span{display:block!important}
.ctv-welcome-notice span{margin-top:3px!important;font-size:8px!important}

/* Tablet */
@media(max-width:1050px){
  .s8-auth-page{grid-template-columns:minmax(330px,.8fr) minmax(440px,1.2fr)!important}
  .s8-auth-visual{padding:48px 38px!important}
  .s8-auth-visual-copy h2{font-size:36px!important}
}

/* Mobile app authentication */
@media(max-width:760px){
  .s8-auth-page{
    display:block!important;min-height:100dvh!important;
    padding:0!important;background:#eef5fa!important;
  }
  .s8-auth-visual{display:none!important}
  .s8-auth-panel{
    min-height:100dvh!important;padding:0!important;
    align-items:stretch!important;background:
      linear-gradient(160deg,#067cd7 0,#11b9d0 215px,#f3f8fc 216px)!important;
  }
  .s8-auth-card{
    width:100%!important;max-width:480px!important;min-height:100dvh!important;
    max-height:none!important;margin:0 auto!important;padding:28px 20px 40px!important;
    border:0!important;border-radius:0!important;background:transparent!important;
    box-shadow:none!important;
  }
  .s8-auth-mobile-logo{
    display:flex!important;color:#fff!important;margin:0 0 28px!important;
  }
  .s8-auth-mobile-logo b{
    width:54px!important;height:54px!important;border-radius:17px!important;
    background:rgba(255,255,255,.18)!important;box-shadow:none!important;
  }
  .s8-auth-mobile-logo span{color:#fff!important;font-size:19px!important}
  .s8-auth-heading,
  .s8-auth-form,
  .s8-auth-switch,
  .s8-auth-notice{
    position:relative!important;z-index:2!important;
  }
  .s8-auth-heading{
    padding:25px 22px 0!important;margin:0!important;
    border-radius:25px 25px 0 0!important;background:#fff!important;
  }
  .s8-auth-heading h1{font-size:27px!important}
  .s8-auth-form{
    padding:24px 22px!important;background:#fff!important;
  }
  .s8-auth-switch{
    margin:0!important;padding:18px 22px 25px!important;
    border-radius:0 0 25px 25px!important;background:#fff!important;
  }
  .s8-auth-notice{
    margin:0 0 10px!important;
  }
}

/* Small phone */
@media(max-width:380px){
  .s8-auth-card{padding-left:13px!important;padding-right:13px!important}
  .s8-auth-heading{padding-left:17px!important;padding-right:17px!important}
  .s8-auth-form{padding-left:17px!important;padding-right:17px!important}
  .s8-auth-switch{padding-left:17px!important;padding-right:17px!important}
  .s8-auth-heading h1{font-size:24px!important}
}

/* =========================================================
   V5.53 CTV PERSISTENT APP TABS IN CAPTURE MODE
   ========================================================= */
.ctv-live-app{
  display:grid!important;
  grid-template-rows:auto auto auto minmax(0,1fr)!important;
  height:100dvh!important;
  max-height:100dvh!important;
  overflow:hidden!important;
}
.ctv-live-profile{
  display:grid;
  grid-template-columns:50px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  margin:10px 12px 8px;
  padding:11px 12px;
  border-radius:18px;
  background:linear-gradient(135deg,#0c458f,#087dd8);
  color:#fff;
  box-shadow:0 9px 22px rgba(15,79,143,.17);
}
.ctv-live-profile .ctv-avatar{
  width:50px!important;height:50px!important;font-size:20px!important;
}
.ctv-live-profile>div:nth-child(2){min-width:0}
.ctv-live-profile span,.ctv-live-profile strong,.ctv-live-profile small{display:block}
.ctv-live-profile span{font-size:7px;letter-spacing:.13em;font-weight:900;color:#c0e2ff}
.ctv-live-profile strong{margin:3px 0;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ctv-live-profile small{font-size:8px;color:#d9efff}.ctv-live-profile small i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#27df91}
.ctv-live-profile em{max-width:94px;padding:6px 8px;border-radius:999px;background:rgba(255,255,255,.14);font-size:7px;font-style:normal;text-align:center}
.ctv-live-tabs{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:4px;
  margin:0 12px 9px;
  padding:4px;
  border-radius:15px;
  background:#e7f0f7;
  z-index:20;
}
.ctv-live-tabs button{
  height:48px;
  padding:3px 1px;
  border:0;
  border-radius:11px;
  background:transparent;
  color:#708799;
  font-family:inherit;
  overflow:hidden;
}
.ctv-live-tabs span,.ctv-live-tabs b{display:block}
.ctv-live-tabs span{font-size:14px;line-height:18px}
.ctv-live-tabs b{margin-top:2px;font-size:6.8px;line-height:11px;white-space:nowrap}
.ctv-live-tabs button.active{
  background:#fff;color:#0878c8;
  box-shadow:0 5px 14px rgba(31,75,107,.1);
}
.ctv-live-app .s8-main{
  min-height:0!important;
  overflow:hidden!important;
}
.ctv-live-panel{
  display:none!important;
  height:100%!important;
  overflow-y:auto!important;
  padding:4px 12px 96px!important;
  box-sizing:border-box!important;
  scrollbar-width:none;
}
.ctv-live-panel::-webkit-scrollbar{display:none}
.ctv-live-panel.active{display:block!important}
.ctv-live-heading{
  padding:14px;
  border:1px solid #d8e6ef;
  border-radius:17px;
  background:linear-gradient(135deg,#fff,#f0f8ff);
}
.ctv-live-heading span{display:block;font-size:7px;letter-spacing:.14em;font-weight:900;color:#0a80ca}
.ctv-live-heading h2{margin:5px 0;font-size:20px;line-height:1.2;color:#143c58}
.ctv-live-heading p{margin:0;font-size:9px;line-height:1.5;color:#778d9e}
.ctv-live-overview-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px;
}
.ctv-live-overview-grid article{
  padding:12px;border:1px solid #dbe7ef;border-radius:14px;background:#fff;
}
.ctv-live-overview-grid span,.ctv-live-overview-grid strong,.ctv-live-overview-grid small{display:block}
.ctv-live-overview-grid span{font-size:7px;color:#7c91a2}
.ctv-live-overview-grid strong{margin:4px 0;font-size:15px;color:#0879c9}
.ctv-live-overview-grid small{font-size:7px;color:#8496a4}
.ctv-live-progress{
  height:9px;margin-top:10px;border-radius:999px;background:#e2edf3;overflow:hidden;
}
.ctv-live-progress i{
  display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#13b78b,#1597e8);
}
.ctv-live-support{
  display:grid;grid-template-columns:38px minmax(0,1fr) 15px;gap:9px;align-items:center;
  margin-top:10px;padding:11px;border-radius:15px;background:linear-gradient(135deg,#148bed,#12b7ce);
  color:#fff;text-decoration:none;
}
.ctv-live-support>span{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:rgba(255,255,255,.14);font-size:18px}
.ctv-live-support small,.ctv-live-support strong{display:block}
.ctv-live-support small{font-size:6px}.ctv-live-support strong{margin-top:3px;font-size:12px}
.ctv-go-capture{
  width:100%;height:48px;margin-top:10px;border:0;border-radius:14px;
  background:linear-gradient(135deg,#0c86ed,#1b5ff0);color:#fff;
  font-family:inherit;font-size:10px;font-weight:900;
}
.ctv-live-timeline{
  margin-top:9px;padding:14px;border:1px solid #d8e6ef;border-radius:17px;background:#fff;
}
.ctv-live-timeline>div{display:grid;grid-template-columns:28px minmax(0,1fr);gap:9px;position:relative;padding-bottom:12px}
.ctv-live-timeline>div:not(:last-child):after{content:"";position:absolute;left:13px;top:28px;bottom:0;width:2px;background:#dce7ee}
.ctv-live-timeline b{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#edf3f7;color:#8093a1;font-size:8px;z-index:1}
.ctv-live-timeline .done b{background:#e3f8ee;color:#14815a}.ctv-live-timeline .current b{background:#1186e6;color:#fff}
.ctv-live-timeline strong,.ctv-live-timeline small{display:block}.ctv-live-timeline strong{font-size:9px;color:#183e59}.ctv-live-timeline small{margin-top:3px;font-size:7px;color:#8497a5}
.ctv-live-work-card{
  margin-top:9px;padding:14px;border:1px solid #d8e6ef;border-radius:17px;background:#fff;
}
.ctv-live-work-card>span{font-size:7px;letter-spacing:.13em;font-weight:900;color:#0c7dc7}
.ctv-live-work-card h3{margin:5px 0 12px;font-size:18px;color:#143c58}
.ctv-live-work-card>div:nth-of-type(1){display:grid;grid-template-columns:repeat(3,auto 1fr);gap:4px 7px;align-items:end}
.ctv-live-work-card b{font-size:17px;color:#087ac9}.ctv-live-work-card small{font-size:7px;color:#8194a2}
.ctv-live-form{
  margin-top:9px;padding:14px;border:1px solid #d8e6ef;border-radius:17px;background:#fff;
}
.ctv-live-form label{display:block;margin-bottom:9px}.ctv-live-form label span{display:block;margin-bottom:5px;font-size:8px;font-weight:800;color:#27495f}
.ctv-live-form input,.ctv-live-form select,.ctv-live-form textarea{
  width:100%;box-sizing:border-box;padding:11px;border:1px solid #d5e3ec;border-radius:12px;background:#fbfdff;font-family:inherit;font-size:10px;outline:0;
}
.ctv-live-form textarea{min-height:70px;resize:none}.ctv-live-form button{width:100%;height:47px;border:0;border-radius:13px;background:linear-gradient(135deg,#1289ed,#1762ed);color:#fff;font-family:inherit;font-size:10px;font-weight:900}
.ctv-live-security{margin-bottom:11px;padding:10px;border-radius:12px;background:#edf8ff;color:#317394;font-size:8px}
.ctv-live-app .s8-screen{padding-top:0!important}
.ctv-live-app .s8-bottom-nav{display:none!important}
.ctv-live-app .s8-main{padding-bottom:0!important}
.ctv-info-view .ctv-live-app .s8-main{overflow:hidden!important}
@media(max-width:370px){
  .ctv-live-profile em{display:none}
  .ctv-live-profile{grid-template-columns:46px minmax(0,1fr)}
  .ctv-live-tabs b{font-size:6px}
  .ctv-live-overview-grid{grid-template-columns:1fr}
}

/* =========================================================
   V5.54 UNIFIED CTV PROFILE CARD
   ========================================================= */
.ctv-profile-unified{
  min-height:76px!important;
  grid-template-columns:54px minmax(0,1fr) auto!important;
  gap:11px!important;
  margin:10px 12px 8px!important;
  padding:12px 13px!important;
  border:1px solid rgba(255,255,255,.16)!important;
  background:
    radial-gradient(circle at 88% 20%,rgba(43,188,255,.32),transparent 33%),
    linear-gradient(135deg,#0c3f8d 0%,#086ed3 58%,#0ca5df 100%)!important;
  box-shadow:0 12px 28px rgba(10,71,136,.2)!important;
}
.ctv-profile-unified .ctv-avatar{
  width:54px!important;
  height:54px!important;
  border:3px solid rgba(255,255,255,.24)!important;
  background:rgba(255,255,255,.12)!important;
  box-shadow:inset 0 0 0 5px rgba(255,255,255,.08)!important;
}
.ctv-profile-unified-copy{
  min-width:0!important;
}
.ctv-profile-unified-copy span,
.ctv-profile-unified-copy strong,
.ctv-profile-unified-copy small{
  display:block!important;
}
.ctv-profile-unified-copy span{
  font-size:7px!important;
  letter-spacing:.15em!important;
  font-weight:900!important;
  color:#c8e8ff!important;
}
.ctv-profile-unified-copy strong{
  margin:3px 0 4px!important;
  font-size:17px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.ctv-profile-unified-copy small{
  font-size:8px!important;
  color:#e1f4ff!important;
}
.ctv-profile-unified-copy small i{
  width:7px!important;
  height:7px!important;
  background:#2ce29a!important;
}
.ctv-profile-unified-meta{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-end!important;
  gap:6px!important;
  max-width:105px!important;
}
.ctv-profile-unified-meta b{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:48px!important;
  padding:6px 8px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.18)!important;
  color:#fff!important;
  font-size:8px!important;
  font-weight:900!important;
}
.ctv-profile-unified-meta em{
  display:block!important;
  max-width:105px!important;
  padding:5px 7px!important;
  border-radius:999px!important;
  background:rgba(10,40,93,.22)!important;
  color:#dff3ff!important;
  font-size:6.5px!important;
  line-height:1.2!important;
  text-align:center!important;
  font-style:normal!important;
}

/* Chụp ảnh bắt đầu ngay dưới tab, không còn thẻ hồ sơ thứ hai */
.ctv-live-app #screenHome{
  padding-top:4px!important;
}
.ctv-live-app #screenHome .today-summary{
  margin-top:4px!important;
}
.ctv-live-app #screenHome .primary-capture{
  margin-top:9px!important;
}

/* Giảm chiều cao tổng thể để nhìn được nhiều nội dung hơn */
.ctv-live-tabs{
  margin-bottom:7px!important;
}
.ctv-live-tabs button{
  height:46px!important;
}
.ctv-live-app .s8-main{
  margin-top:0!important;
}

@media(max-width:370px){
  .ctv-profile-unified{
    grid-template-columns:50px minmax(0,1fr) auto!important;
    padding:11px!important;
  }
  .ctv-profile-unified .ctv-avatar{
    width:50px!important;
    height:50px!important;
  }
  .ctv-profile-unified-copy strong{
    font-size:15px!important;
  }
  .ctv-profile-unified-meta{
    max-width:78px!important;
  }
  .ctv-profile-unified-meta em{
    display:none!important;
  }
}

/* V5.57 MULTI-ACCOUNT LOGIN */
.s8-auth-form label:first-of-type .s8-field-help{
  display:block!important;
  margin:7px 3px 0!important;
  color:#7790a2!important;
  font-size:9px!important;
  line-height:1.45!important;
}
.s8-auth-input input[name="username"]{
  text-transform:none!important;
}

/* =========================================================
   V5.58 FORCE ALL USER DATABASE APPS TO MOBILE UI
   Applies to: Staff / CTV / Supervisor
   Admin and Operation Manager remain desktop.
   ========================================================= */

body.s8-force-mobile-role{
  margin:0!important;
  padding:0!important;
  min-height:100vh!important;
  overflow-x:hidden!important;
  background:
    radial-gradient(circle at 50% 0%,rgba(21,150,234,.13),transparent 38%),
    #edf5fa!important;
}

/* WordPress wrappers */
body.s8-force-mobile-role #page,
body.s8-force-mobile-role .site,
body.s8-force-mobile-role .site-content,
body.s8-force-mobile-role main{
  width:100%!important;
  max-width:430px!important;
  min-width:320px!important;
  margin:0 auto!important;
  padding:0!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
}

/* All app roots */
body.s8-force-mobile-role .s8-app,
body.s8-force-mobile-role .ctv-mobile-app,
body.s8-force-mobile-role .ctv-tabbed-app,
body.s8-force-mobile-role .ctv-live-app,
body.s8-force-mobile-role .supervisor-mobile,
body.s8-force-mobile-role .supervisor-app{
  width:100%!important;
  max-width:430px!important;
  min-width:320px!important;
  min-height:100dvh!important;
  margin:0 auto!important;
  border-radius:0!important;
  background:#f4f8fc!important;
  box-shadow:0 0 42px rgba(25,70,102,.15)!important;
  overflow-x:hidden!important;
  box-sizing:border-box!important;
}

/* Headers */
body.s8-force-mobile-role .s8-topbar,
body.s8-force-mobile-role .ctv-topbar,
body.s8-force-mobile-role .supervisor-topbar{
  width:100%!important;
  max-width:430px!important;
  margin:0!important;
  border-radius:0!important;
  box-sizing:border-box!important;
}

/* Prevent desktop stretching */
body.s8-force-mobile-role .staff-profile-card,
body.s8-force-mobile-role .today-summary,
body.s8-force-mobile-role .primary-capture,
body.s8-force-mobile-role .staff-work-summary,
body.s8-force-mobile-role .s8-quick-grid,
body.s8-force-mobile-role .ctv-profile-card,
body.s8-force-mobile-role .ctv-status-card,
body.s8-force-mobile-role .ctv-live-profile,
body.s8-force-mobile-role .ctv-live-tabs,
body.s8-force-mobile-role .supervisor-profile,
body.s8-force-mobile-role .supervisor-stats,
body.s8-force-mobile-role .supervisor-tabs,
body.s8-force-mobile-role .supervisor-gps-card,
body.s8-force-mobile-role .supervisor-capture-card{
  width:calc(100% - 24px)!important;
  max-width:none!important;
  margin-left:12px!important;
  margin-right:12px!important;
  box-sizing:border-box!important;
}

/* Staff mobile grids */
body.s8-role-staff-mobile .today-summary{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
body.s8-role-staff-mobile .staff-work-meta{
  grid-template-columns:1fr 1fr!important;
}
body.s8-role-staff-mobile .s8-quick-grid{
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
}

/* CTV tabs always mobile */
body.s8-role-ctv-mobile .ctv-app-tabs,
body.s8-role-ctv-mobile .ctv-live-tabs{
  display:grid!important;
  width:calc(100% - 24px)!important;
  margin:0 12px 10px!important;
}
body.s8-role-ctv-mobile .ctv-app-tabs{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
body.s8-role-ctv-mobile .ctv-live-tabs{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
}
body.s8-role-ctv-mobile .ctv-tab-content,
body.s8-role-ctv-mobile .ctv-live-panel{
  width:100%!important;
  max-width:430px!important;
  box-sizing:border-box!important;
}

/* Supervisor dashboard: never render as desktop DB */
body.s8-role-supervisor-mobile .supervisor-mobile,
body.s8-role-supervisor-mobile .supervisor-app{
  display:block!important;
  width:100%!important;
}
body.s8-role-supervisor-mobile .supervisor-stats{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
}
body.s8-role-supervisor-mobile .supervisor-tabs{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:4px!important;
}
body.s8-role-supervisor-mobile .supervisor-tab-panel{
  width:100%!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
}
body.s8-role-supervisor-mobile .supervisor-list,
body.s8-role-supervisor-mobile .supervisor-gps-list,
body.s8-role-supervisor-mobile .supervisor-photo-list{
  display:block!important;
  width:100%!important;
}
body.s8-role-supervisor-mobile .supervisor-item,
body.s8-role-supervisor-mobile .supervisor-employee-card{
  width:calc(100% - 24px)!important;
  margin:0 12px 10px!important;
  box-sizing:border-box!important;
}

/* Bottom navigation */
body.s8-force-mobile-role .bottom-nav,
body.s8-force-mobile-role .s8-bottom-nav,
body.s8-force-mobile-role .mobile-bottom-nav,
body.s8-force-mobile-role nav.bottom-navigation{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:0!important;
  transform:translateX(-50%)!important;
  width:100%!important;
  max-width:430px!important;
  min-width:320px!important;
  margin:0!important;
  z-index:999!important;
  box-sizing:border-box!important;
  box-shadow:0 -8px 24px rgba(20,62,92,.12)!important;
}

/* Camera and confirm screens */
body.s8-force-mobile-role .camera-stage,
body.s8-force-mobile-role .confirm-stage,
body.s8-force-mobile-role video,
body.s8-force-mobile-role canvas{
  width:100%!important;
  max-width:430px!important;
}
body.s8-force-mobile-role #screenHome,
body.s8-force-mobile-role #screenHistory,
body.s8-force-mobile-role #screenCamera,
body.s8-force-mobile-role #screenConfirm{
  padding-bottom:96px!important;
}

/* Desktop: show a centered phone app, not a stretched DB */
@media(min-width:700px){
  body.s8-force-mobile-role{
    padding:16px 0!important;
  }
  body.s8-force-mobile-role .s8-app,
  body.s8-force-mobile-role .ctv-mobile-app,
  body.s8-force-mobile-role .ctv-tabbed-app,
  body.s8-force-mobile-role .ctv-live-app,
  body.s8-force-mobile-role .supervisor-mobile,
  body.s8-force-mobile-role .supervisor-app{
    min-height:calc(100dvh - 32px)!important;
    border-radius:26px!important;
    overflow:hidden!important;
  }
  body.s8-force-mobile-role .s8-topbar,
  body.s8-force-mobile-role .ctv-topbar,
  body.s8-force-mobile-role .supervisor-topbar{
    border-radius:26px 26px 0 0!important;
  }
  body.s8-force-mobile-role .bottom-nav,
  body.s8-force-mobile-role .s8-bottom-nav,
  body.s8-force-mobile-role .mobile-bottom-nav,
  body.s8-force-mobile-role nav.bottom-navigation{
    bottom:16px!important;
  }
}

/* Real phone */
@media(max-width:480px){
  body.s8-force-mobile-role{
    padding:0!important;
  }
  body.s8-force-mobile-role #page,
  body.s8-force-mobile-role .site,
  body.s8-force-mobile-role .site-content,
  body.s8-force-mobile-role main,
  body.s8-force-mobile-role .s8-app,
  body.s8-force-mobile-role .ctv-mobile-app,
  body.s8-force-mobile-role .ctv-tabbed-app,
  body.s8-force-mobile-role .ctv-live-app,
  body.s8-force-mobile-role .supervisor-mobile,
  body.s8-force-mobile-role .supervisor-app{
    max-width:none!important;
    min-width:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  body.s8-force-mobile-role .s8-topbar,
  body.s8-force-mobile-role .ctv-topbar,
  body.s8-force-mobile-role .supervisor-topbar{
    border-radius:0!important;
  }
  body.s8-force-mobile-role .bottom-nav,
  body.s8-force-mobile-role .s8-bottom-nav,
  body.s8-force-mobile-role .mobile-bottom-nav,
  body.s8-force-mobile-role nav.bottom-navigation{
    bottom:0!important;
    max-width:none!important;
    min-width:0!important;
  }
}

/* V5.59 CUSTOM LOGO */
.s8-auth-logo-img,.s8-auth-mobile-logo-img,.s8-mobile-brand-logo{display:block;object-fit:contain}.s8-auth-logo-img{width:58px;height:58px;border-radius:18px}.s8-auth-mobile-logo-img{width:54px;height:54px;border-radius:17px}.s8-mobile-brand-logo{width:42px;height:42px;border-radius:12px}.s8-brand>b.s8-mobile-brand-logo{font-size:0}.s8-brand .s8-mobile-brand-logo+strong{margin-left:8px}

/* =========================================================
   V5.60 APP DOWNLOAD ON AUTH SCREEN
   ========================================================= */
.s8-auth-mobile-logo{
  justify-content:space-between!important;
  width:100%!important;
}
.s8-auth-mobile-brand{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  min-width:0!important;
}
.s8-auth-mobile-brand span{
  color:#fff!important;
  font-size:19px!important;
  font-weight:900!important;
}
.s8-app-download-trigger{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-width:72px!important;
  min-height:48px!important;
  padding:7px 10px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:15px!important;
  background:rgba(255,255,255,.15)!important;
  color:#fff!important;
  font-family:inherit!important;
  cursor:pointer!important;
  backdrop-filter:blur(12px)!important;
  box-shadow:0 8px 20px rgba(0,74,142,.12)!important;
}
.s8-app-download-trigger b{
  font-size:17px!important;
  line-height:1!important;
}
.s8-app-download-trigger span{
  font-size:7px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
.s8-app-download-modal{
  position:fixed!important;
  inset:0!important;
  z-index:99999!important;
  display:none!important;
  align-items:flex-end!important;
  justify-content:center!important;
}
.s8-app-download-modal.open{display:flex!important}
.s8-app-download-backdrop{
  position:absolute!important;
  inset:0!important;
  background:rgba(10,31,48,.64)!important;
  backdrop-filter:blur(6px)!important;
}
.s8-app-download-sheet{
  position:relative!important;
  z-index:2!important;
  width:100%!important;
  max-width:430px!important;
  padding:28px 20px 24px!important;
  border-radius:28px 28px 0 0!important;
  background:#fff!important;
  text-align:center!important;
  box-sizing:border-box!important;
  animation:s8AppSheetUp .22s ease-out!important;
}
@keyframes s8AppSheetUp{from{transform:translateY(35px);opacity:0}to{transform:none;opacity:1}}
.s8-app-download-close{
  position:absolute!important;
  top:15px!important;
  right:16px!important;
  width:36px!important;
  height:36px!important;
  border:0!important;
  border-radius:11px!important;
  background:#eef5f9!important;
  color:#527087!important;
  font-size:20px!important;
}
.s8-app-download-icon{
  width:72px!important;
  height:72px!important;
  display:grid!important;
  place-items:center!important;
  margin:0 auto 15px!important;
  border-radius:22px!important;
  background:linear-gradient(135deg,#0794ed,#15bed0)!important;
  color:#fff!important;
  overflow:hidden!important;
  box-shadow:0 13px 28px rgba(13,137,213,.22)!important;
}
.s8-app-download-icon img{width:70%!important;height:70%!important;object-fit:contain!important}
.s8-app-download-icon b{font-size:26px!important;font-style:italic!important}
.s8-app-download-sheet>span{
  font-size:8px!important;
  font-weight:900!important;
  letter-spacing:.16em!important;
  color:#0780ce!important;
}
.s8-app-download-sheet h2{
  margin:7px 0!important;
  font-size:25px!important;
  color:#113a57!important;
}
.s8-app-download-sheet>p{
  margin:0 auto 18px!important;
  max-width:340px!important;
  font-size:10px!important;
  line-height:1.55!important;
  color:#748a9b!important;
}
.s8-app-download-options{
  display:grid!important;
  gap:9px!important;
}
.s8-app-download-options a{
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) 20px!important;
  gap:11px!important;
  align-items:center!important;
  min-height:64px!important;
  padding:9px 13px!important;
  border-radius:16px!important;
  text-align:left!important;
  text-decoration:none!important;
  color:#fff!important;
}
.s8-app-download-options a.android{background:linear-gradient(135deg,#13a665,#0d8d77)!important}
.s8-app-download-options a.ios{background:linear-gradient(135deg,#1b2837,#080c12)!important}
.s8-app-download-options a.direct{background:linear-gradient(135deg,#128bed,#1760ee)!important}
.s8-app-download-options a>i{
  width:44px!important;height:44px!important;display:grid!important;place-items:center!important;
  border-radius:13px!important;background:rgba(255,255,255,.14)!important;font-size:21px!important;font-style:normal!important;
}
.s8-app-download-options small,.s8-app-download-options strong{display:block!important}
.s8-app-download-options small{font-size:6px!important;letter-spacing:.1em!important;opacity:.76!important}
.s8-app-download-options strong{margin-top:3px!important;font-size:13px!important}
.s8-app-download-help{
  display:block!important;
  margin-top:14px!important;
  font-size:8px!important;
  line-height:1.45!important;
  color:#8799a5!important;
}
body.s8-modal-open{overflow:hidden!important}
@media(min-width:761px){
  .s8-auth-mobile-logo{display:flex!important}
  .s8-app-download-trigger{color:#087aca!important;background:#edf8ff!important;border-color:#d6eaf5!important}
  .s8-auth-mobile-brand span{color:#133c58!important}
  .s8-app-download-sheet{border-radius:28px!important;margin-bottom:24px!important}
}

html,body{margin-top:0!important}body.s8-mobile-only-app,body.s8-force-mobile-role{padding-top:0!important}.s8-auth-page,.s8-auth-panel{padding-top:0!important;margin-top:0!important}.s8-auth-card{margin-top:0!important}.s8-auth-mobile-logo{padding-top:max(18px,env(safe-area-inset-top))!important;margin-top:0!important}.s8-app-download-trigger{min-width:78px!important}

.s8-auth-brand span,.s8-auth-mobile-brand span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* =========================================================
   V5.69 FULL-FRAME MOBILE APP UI
   Staff / CTV / Supervisor only
   ========================================================= */

/* Mobile viewport always fills the available screen */
@media(max-width:699px){
  html,
  body.s8-force-mobile-role,
  body.s8-mobile-only-app{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    overflow-x:hidden!important;
    background:#f1f6fa!important;
  }

  body.s8-force-mobile-role #page,
  body.s8-force-mobile-role .site,
  body.s8-force-mobile-role .site-content,
  body.s8-force-mobile-role main,
  body.s8-mobile-only-app #page,
  body.s8-mobile-only-app .site,
  body.s8-mobile-only-app .site-content,
  body.s8-mobile-only-app main{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    overflow-x:hidden!important;
  }

  body.s8-force-mobile-role .s8-app,
  body.s8-force-mobile-role .ctv-mobile-app,
  body.s8-force-mobile-role .ctv-tabbed-app,
  body.s8-force-mobile-role .ctv-live-app,
  body.s8-force-mobile-role .supervisor-mobile,
  body.s8-force-mobile-role .supervisor-app,
  body.s8-mobile-only-app .s8-app,
  body.s8-mobile-only-app .ctv-mobile-app,
  body.s8-mobile-only-app .ctv-tabbed-app,
  body.s8-mobile-only-app .ctv-live-app,
  body.s8-mobile-only-app .supervisor-mobile,
  body.s8-mobile-only-app .supervisor-app{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:100dvh!important;
    margin:0!important;
    padding:0 0 calc(92px + env(safe-area-inset-bottom))!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow-x:hidden!important;
    background:
      radial-gradient(circle at 50% 0%,rgba(22,151,229,.12),transparent 38%),
      #f3f8fb!important;
  }

  /* Full-width top header */
  body.s8-force-mobile-role .s8-topbar,
  body.s8-force-mobile-role .ctv-topbar,
  body.s8-force-mobile-role .supervisor-topbar,
  body.s8-mobile-only-app .s8-topbar,
  body.s8-mobile-only-app .ctv-topbar,
  body.s8-mobile-only-app .supervisor-topbar{
    width:100%!important;
    max-width:none!important;
    min-height:92px!important;
    margin:0!important;
    padding:
      max(16px,env(safe-area-inset-top))
      18px
      14px!important;
    border-radius:0!important;
    box-sizing:border-box!important;
  }

  /* Cards use the whole mobile width with app-like gutters */
  body.s8-force-mobile-role .staff-profile-card,
  body.s8-force-mobile-role .today-summary,
  body.s8-force-mobile-role .primary-capture,
  body.s8-force-mobile-role .staff-work-summary,
  body.s8-force-mobile-role .s8-quick-grid,
  body.s8-force-mobile-role .ctv-profile-card,
  body.s8-force-mobile-role .ctv-status-card,
  body.s8-force-mobile-role .ctv-live-profile,
  body.s8-force-mobile-role .supervisor-profile,
  body.s8-force-mobile-role .supervisor-stats,
  body.s8-force-mobile-role .supervisor-tabs,
  body.s8-force-mobile-role .supervisor-gps-card,
  body.s8-force-mobile-role .supervisor-capture-card,
  body.s8-mobile-only-app .staff-profile-card,
  body.s8-mobile-only-app .today-summary,
  body.s8-mobile-only-app .primary-capture,
  body.s8-mobile-only-app .staff-work-summary,
  body.s8-mobile-only-app .s8-quick-grid,
  body.s8-mobile-only-app .ctv-profile-card,
  body.s8-mobile-only-app .ctv-status-card,
  body.s8-mobile-only-app .ctv-live-profile,
  body.s8-mobile-only-app .supervisor-profile,
  body.s8-mobile-only-app .supervisor-stats,
  body.s8-mobile-only-app .supervisor-tabs,
  body.s8-mobile-only-app .supervisor-gps-card,
  body.s8-mobile-only-app .supervisor-capture-card{
    width:calc(100% - 24px)!important;
    max-width:none!important;
    margin-left:12px!important;
    margin-right:12px!important;
    box-sizing:border-box!important;
  }

  body.s8-force-mobile-role .staff-profile-card,
  body.s8-force-mobile-role .ctv-profile-card,
  body.s8-force-mobile-role .ctv-live-profile,
  body.s8-force-mobile-role .supervisor-profile,
  body.s8-mobile-only-app .staff-profile-card,
  body.s8-mobile-only-app .ctv-profile-card,
  body.s8-mobile-only-app .ctv-live-profile,
  body.s8-mobile-only-app .supervisor-profile{
    margin-top:10px!important;
    border-radius:24px!important;
  }

  body.s8-force-mobile-role .today-summary,
  body.s8-mobile-only-app .today-summary{
    gap:7px!important;
    margin-top:8px!important;
  }

  body.s8-force-mobile-role .today-summary>*,
  body.s8-mobile-only-app .today-summary>*{
    min-width:0!important;
    padding:12px 9px!important;
    border-radius:17px!important;
  }

  body.s8-force-mobile-role .primary-capture,
  body.s8-mobile-only-app .primary-capture{
    min-height:104px!important;
    margin-top:9px!important;
    border-radius:25px!important;
  }

  body.s8-force-mobile-role .staff-work-summary,
  body.s8-mobile-only-app .staff-work-summary{
    margin-top:13px!important;
    padding:19px 16px!important;
    border-radius:24px!important;
  }

  body.s8-force-mobile-role .s8-quick-grid,
  body.s8-mobile-only-app .s8-quick-grid{
    margin-top:10px!important;
    gap:9px!important;
  }

  body.s8-force-mobile-role .s8-quick-grid>*,
  body.s8-mobile-only-app .s8-quick-grid>*{
    min-width:0!important;
    border-radius:19px!important;
  }

  /* Bottom navigation becomes edge-to-edge */
  body.s8-force-mobile-role .bottom-nav,
  body.s8-force-mobile-role .s8-bottom-nav,
  body.s8-force-mobile-role .mobile-bottom-nav,
  body.s8-force-mobile-role nav.bottom-navigation,
  body.s8-mobile-only-app .bottom-nav,
  body.s8-mobile-only-app .s8-bottom-nav,
  body.s8-mobile-only-app .mobile-bottom-nav,
  body.s8-mobile-only-app nav.bottom-navigation{
    left:0!important;
    right:0!important;
    bottom:0!important;
    transform:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:82px!important;
    margin:0!important;
    padding-bottom:env(safe-area-inset-bottom)!important;
    border-radius:0!important;
    box-shadow:0 -10px 28px rgba(20,62,92,.13)!important;
    box-sizing:border-box!important;
  }

  /* Keep text and icons from colliding on narrow phones */
  body.s8-force-mobile-role .s8-topbar *,
  body.s8-mobile-only-app .s8-topbar *,
  body.s8-force-mobile-role .staff-profile-card *,
  body.s8-mobile-only-app .staff-profile-card *{
    min-width:0;
  }

  body.s8-force-mobile-role .s8-topbar .brand,
  body.s8-mobile-only-app .s8-topbar .brand{
    max-width:55%!important;
  }

  body.s8-force-mobile-role .s8-topbar .brand span,
  body.s8-mobile-only-app .s8-topbar .brand span{
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
}

/* Desktop preview of user role still looks exactly like a phone */
@media(min-width:700px){
  body.s8-force-mobile-role,
  body.s8-mobile-only-app{
    display:flex!important;
    justify-content:center!important;
    align-items:flex-start!important;
    padding:14px 0!important;
    background:#eaf3f8!important;
  }

  body.s8-force-mobile-role #page,
  body.s8-force-mobile-role .site,
  body.s8-force-mobile-role .site-content,
  body.s8-force-mobile-role main,
  body.s8-mobile-only-app #page,
  body.s8-mobile-only-app .site,
  body.s8-mobile-only-app .site-content,
  body.s8-mobile-only-app main{
    width:100%!important;
    max-width:430px!important;
    min-width:360px!important;
    margin:0 auto!important;
    padding:0!important;
  }

  body.s8-force-mobile-role .s8-app,
  body.s8-force-mobile-role .ctv-mobile-app,
  body.s8-force-mobile-role .ctv-tabbed-app,
  body.s8-force-mobile-role .ctv-live-app,
  body.s8-force-mobile-role .supervisor-mobile,
  body.s8-force-mobile-role .supervisor-app,
  body.s8-mobile-only-app .s8-app,
  body.s8-mobile-only-app .ctv-mobile-app,
  body.s8-mobile-only-app .ctv-tabbed-app,
  body.s8-mobile-only-app .ctv-live-app,
  body.s8-mobile-only-app .supervisor-mobile,
  body.s8-mobile-only-app .supervisor-app{
    width:100%!important;
    max-width:430px!important;
    min-height:calc(100dvh - 28px)!important;
    border-radius:30px!important;
    overflow:hidden!important;
    box-shadow:0 22px 58px rgba(21,68,99,.18)!important;
  }

  body.s8-force-mobile-role .bottom-nav,
  body.s8-force-mobile-role .s8-bottom-nav,
  body.s8-force-mobile-role .mobile-bottom-nav,
  body.s8-force-mobile-role nav.bottom-navigation,
  body.s8-mobile-only-app .bottom-nav,
  body.s8-mobile-only-app .s8-bottom-nav,
  body.s8-mobile-only-app .mobile-bottom-nav,
  body.s8-mobile-only-app nav.bottom-navigation{
    width:430px!important;
    max-width:430px!important;
    left:50%!important;
    right:auto!important;
    transform:translateX(-50%)!important;
    bottom:14px!important;
    border-radius:0 0 30px 30px!important;
  }
}




/* ===== V5.71 FLAT MOBILE UI ===== */

body.s8-force-mobile-role .s8-app,
body.s8-force-mobile-role .ctv-mobile-app,
body.s8-force-mobile-role .ctv-tabbed-app,
body.s8-force-mobile-role .ctv-live-app,
body.s8-mobile-only-app .s8-app,
body.s8-mobile-only-app .ctv-mobile-app,
body.s8-mobile-only-app .ctv-tabbed-app,
body.s8-mobile-only-app .ctv-live-app{
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(21,68,99,.10) !important;
}

body.s8-force-mobile-role .bottom-nav,
body.s8-force-mobile-role .s8-bottom-nav,
body.s8-force-mobile-role .mobile-bottom-nav,
body.s8-mobile-only-app .bottom-nav,
body.s8-mobile-only-app .s8-bottom-nav,
body.s8-mobile-only-app .mobile-bottom-nav{
    border-radius: 0 !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06) !important;
}

[class*="card"],
[class*="panel"],
[class*="box"],
[class*="item"]{
    border-radius: 14px !important;
}

[class*="tabs"],
[class*="tab-bar"],
[class*="tab-menu"]{
    border-radius: 12px !important;
}

[class*="button"],
button{
    border-radius: 12px !important;
}



/* ===== S8 V5.72 TELEGRAM MOBILE TABS ===== */
.s8-mobile-tabs,
.ctv-tab-navigation,
.telegram-style-tabs{
 display:grid!important;
 grid-template-columns:repeat(4,1fr)!important;
 gap:0!important;
 background:#fff!important;
 border-radius:18px!important;
 overflow:hidden!important;
 box-shadow:0 4px 18px rgba(0,0,0,.08)!important;
 position:sticky!important;
 top:72px!important;
 z-index:50!important;
}

.s8-mobile-tabs .tab-item,
.ctv-tab-navigation .tab-item,
.telegram-style-tabs .tab-item{
 min-height:72px!important;
 border-radius:0!important;
 background:transparent!important;
}

.s8-mobile-tabs .tab-item.active,
.ctv-tab-navigation .tab-item.active,
.telegram-style-tabs .tab-item.active{
 border-bottom:3px solid #1f7cff!important;
 background:#f7fbff!important;
}

.s8-profile-card,
.s8-progress-card,
.s8-bank-card,
.s8-overview-card{
 border-radius:18px!important;
}


/* =========================================================
   V5.73 TELEGRAM PRO CTV UI
   ========================================================= */
.ctv-tabbed-app{
  width:100%!important;
  max-width:430px!important;
  height:100dvh!important;
  min-height:100dvh!important;
  margin:0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:#f4f7fa!important;
  color:#172b3d!important;
  border-radius:0!important;
  box-shadow:none!important;
  font-family:'Bai Jamjuree',system-ui,sans-serif!important;
}
.ctv-telegram-header{
  height:auto!important;
  min-height:84px!important;
  padding:calc(11px + env(safe-area-inset-top)) 14px 11px!important;
  display:grid!important;
  grid-template-columns:32px minmax(0,1fr) auto!important;
  gap:10px!important;
  align-items:center!important;
  background:linear-gradient(135deg,#0877dc,#075ee5)!important;
  border-radius:0!important;
}
.ctv-menu-button,.ctv-notification-button{
  width:32px!important;height:38px!important;border:0!important;background:transparent!important;color:#fff!important;
  font-size:21px!important;padding:0!important;border-radius:0!important;
}
.ctv-header-brand{display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;gap:9px!important;align-items:center!important}
.ctv-header-brand>b{
  width:44px!important;height:44px!important;display:grid!important;place-items:center!important;border:1.5px solid rgba(255,255,255,.8)!important;
  border-radius:50%!important;background:transparent!important;font-size:16px!important
}
.ctv-header-brand>span{min-width:0!important}
.ctv-header-brand strong,.ctv-header-brand small{display:block!important}
.ctv-header-brand strong{font-size:14px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.ctv-header-brand small{margin-top:2px!important;font-size:8px!important;color:#dff2ff!important}
.ctv-header-brand small i{display:inline-block!important;width:7px!important;height:7px!important;border-radius:50%!important;background:#1de78a!important}
.ctv-header-actions{display:flex!important;align-items:center!important;gap:6px!important}
.ctv-header-actions>a{width:34px!important;height:38px!important;border-radius:9px!important;background:rgba(255,255,255,.13)!important}
.ctv-notification-button{position:relative!important}
.ctv-notification-button>i{position:absolute!important;right:4px!important;top:4px!important;width:7px!important;height:7px!important;border-radius:50%!important;background:#ff3f4f!important;border:1px solid #fff!important}

.ctv-compact-profile{
  grid-template-columns:58px minmax(0,1fr) auto!important;
  margin:-3px 10px 9px!important;
  padding:13px!important;
  border:1px solid #e3ebf1!important;
  border-radius:13px!important;
  color:#142d40!important;
  background:#fff!important;
  box-shadow:0 5px 16px rgba(27,68,95,.07)!important;
}
.ctv-compact-profile .ctv-avatar{
  width:54px!important;height:54px!important;border:0!important;border-radius:50%!important;background:linear-gradient(135deg,#1686ed,#0564d5)!important;color:#fff!important
}
.ctv-compact-copy span{color:#0874d3!important}
.ctv-compact-copy h2{color:#132d40!important}
.ctv-compact-copy small{color:#19834f!important}
.ctv-compact-profile em{
  max-width:106px!important;padding:9px 10px!important;border-radius:10px!important;background:#eef6ff!important;
  color:#086dd0!important;border:1px solid #dbeeff!important;font-size:7px!important
}

.ctv-mini-notice{
  margin:0 10px 9px!important;padding:10px 11px!important;display:grid!important;grid-template-columns:22px minmax(0,1fr) 24px!important;
  gap:8px!important;align-items:center!important;border:1px solid #d9eee2!important;border-radius:9px!important;background:#f1fbf5!important;color:#137345!important
}
.ctv-mini-notice>b{width:20px!important;height:20px!important;display:grid!important;place-items:center!important;border-radius:50%!important;background:#15965e!important;color:#fff!important}
.ctv-mini-notice span strong,.ctv-mini-notice span small{display:block!important}
.ctv-mini-notice span strong{font-size:9px!important}.ctv-mini-notice span small{margin-top:2px!important;font-size:7px!important;color:#608172!important}
.ctv-mini-notice button{border:0!important;background:transparent!important;color:#627888!important;font-size:17px!important}

.ctv-telegram-tabs{
  margin:0 10px 7px!important;padding:0!important;min-height:63px!important;display:grid!important;grid-template-columns:repeat(4,1fr)!important;
  gap:0!important;border:1px solid #e0e8ee!important;border-radius:10px!important;background:#fff!important;box-shadow:0 3px 12px rgba(26,63,88,.05)!important
}
.ctv-telegram-tabs button{
  position:relative!important;height:62px!important;padding:8px 2px 6px!important;border-radius:0!important;background:transparent!important;color:#42596b!important;overflow:visible!important
}
.ctv-telegram-tabs button span{font-size:17px!important;color:#3f5364!important}
.ctv-telegram-tabs button b{font-size:8px!important;font-weight:600!important;color:inherit!important}
.ctv-telegram-tabs button.active{background:transparent!important;color:#0877e4!important;box-shadow:none!important}
.ctv-telegram-tabs button.active span{color:#0877e4!important}
.ctv-telegram-tabs button.active:after{
  content:""!important;position:absolute!important;left:20%!important;right:20%!important;bottom:-1px!important;height:2px!important;background:#0877e4!important;border-radius:2px 2px 0 0!important
}

.ctv-tab-content{
  flex:1 1 auto!important;min-height:0!important;padding:0 10px calc(76px + env(safe-area-inset-bottom))!important;overflow:hidden!important
}
.ctv-tab-panel{height:100%!important;padding:0 0 12px!important}
.ctv-overview-hero,.ctv-work-card,.ctv-panel-heading+.ctv-step-timeline,.ctv-app-form{
  border:1px solid #e1e9ef!important;border-radius:10px!important;background:#fff!important;box-shadow:0 3px 12px rgba(26,63,88,.045)!important
}
.ctv-overview-hero{padding:14px!important}
.ctv-overview-hero>span{display:none!important}
.ctv-overview-hero h1{margin:0 0 4px!important;font-size:16px!important}
.ctv-overview-hero p{font-size:8px!important;margin-bottom:10px!important}
.ctv-progress{height:5px!important;margin:10px 0 0!important;background:#dfe8ee!important}
.ctv-progress i{background:#0d74e5!important}

.ctv-overview-grid{gap:7px!important;margin-top:7px!important}
.ctv-overview-grid article{
  display:grid!important;grid-template-columns:36px minmax(0,1fr)!important;gap:8px!important;align-items:center!important;
  min-height:72px!important;padding:9px!important;border:1px solid #e3eaf0!important;border-radius:9px!important;background:#fff!important
}
.overview-icon{width:34px!important;height:34px!important;display:grid!important;place-items:center!important;border-radius:50%!important;font-style:normal!important;font-size:15px!important}
.overview-icon.product{background:#eaf3ff!important;color:#0875e3!important}
.overview-icon.photo{background:#e7f8ee!important;color:#15975b!important}
.overview-icon.region{background:#f1ebff!important;color:#7849e8!important}
.overview-icon.wallet{background:#fff0e7!important;color:#f27731!important}
.ctv-overview-grid strong{font-size:11px!important;margin:2px 0!important}.ctv-overview-grid span,.ctv-overview-grid small{font-size:7px!important}

.ctv-support-action{
  grid-template-columns:38px minmax(0,1fr) 18px!important;margin-top:7px!important;padding:10px!important;border:1px solid #e1e9ef!important;
  border-radius:9px!important;background:#fff!important;color:#162f42!important;box-shadow:none!important
}
.ctv-support-action>div{width:36px!important;height:36px!important;border-radius:50%!important;background:#179bdb!important;color:#fff!important}
.ctv-support-action small{color:#1479c8!important}.ctv-support-action strong{font-size:10px!important}.ctv-support-action>b{color:#0876df!important}

.ctv-panel-heading{min-height:auto!important;margin:0!important;padding:12px 12px 8px!important;background:#fff!important;border-radius:10px 10px 0 0!important}
.ctv-panel-heading>span{display:none!important}
.ctv-panel-heading h2{font-size:16px!important;color:#162d40!important}
.ctv-panel-heading p{margin:4px 0 0!important;font-size:8px!important;color:#748998!important}

.ctv-step-timeline{padding:7px 10px!important;border-radius:0 0 10px 10px!important;border-top:0!important}
.ctv-step-timeline>div{padding:9px 0!important;border-bottom:1px solid #edf1f4!important}
.ctv-step-timeline>div:last-child{border-bottom:0!important}
.ctv-step-timeline>div:not(:last-child):after{display:none!important}
.ctv-step-timeline b{background:#eef5fa!important}
.ctv-step-timeline strong{font-size:9px!important}.ctv-step-timeline small{font-size:7px!important}
.ctv-work-card{padding:12px!important}
.ctv-work-kpis{gap:6px!important}.ctv-work-kpis>div{background:#f6f8fa!important;border:1px solid #edf1f4!important;border-radius:8px!important}

.ctv-list-form{padding:0!important;overflow:hidden!important}
.ctv-list-form label{
  display:grid!important;grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr)!important;gap:10px!important;align-items:center!important;
  margin:0!important;padding:10px 12px!important;border-bottom:1px solid #edf1f4!important
}
.ctv-list-form label span{margin:0!important;font-size:9px!important;font-weight:500!important;color:#3c5263!important}
.ctv-list-form input,.ctv-list-form select,.ctv-list-form textarea{
  margin:0!important;padding:7px 9px!important;min-height:36px!important;border:0!important;border-radius:7px!important;background:#f5f7f9!important;text-align:right!important;font-size:8px!important
}
.ctv-list-form textarea{min-height:52px!important}
.ctv-list-form button[type="submit"]{width:calc(100% - 20px)!important;margin:10px!important;height:42px!important;border-radius:8px!important}
.ctv-bank-security{margin:10px!important;border-radius:8px!important}
.ctv-panel-info-note{margin:8px 0 0!important;padding:9px 10px!important;border-radius:7px!important;background:#eaf4ff!important;color:#0871d3!important;font-size:7px!important}

.ctv-bottom-nav{
  position:absolute!important;left:0!important;right:0!important;bottom:0!important;z-index:30!important;
  display:grid!important;grid-template-columns:repeat(3,1fr)!important;height:66px!important;padding-bottom:env(safe-area-inset-bottom)!important;
  border-top:1px solid #e0e7ec!important;background:rgba(255,255,255,.97)!important;backdrop-filter:blur(12px)!important
}
.ctv-bottom-nav button{border:0!important;background:transparent!important;color:#344b5d!important;font-family:inherit!important}
.ctv-bottom-nav span,.ctv-bottom-nav b{display:block!important}.ctv-bottom-nav span{font-size:18px!important}.ctv-bottom-nav b{margin-top:3px!important;font-size:8px!important;font-weight:500!important}
.ctv-bottom-nav button.active{color:#0877e4!important}

@media(max-width:380px){
  .ctv-compact-profile{grid-template-columns:50px minmax(0,1fr) auto!important}
  .ctv-compact-profile .ctv-avatar{width:48px!important;height:48px!important}
  .ctv-compact-profile em{max-width:85px!important;font-size:6.5px!important}
}
@media(min-width:700px){
  .ctv-tabbed-app{position:relative!important;border-radius:18px!important;box-shadow:0 18px 50px rgba(20,63,91,.15)!important}
}

/* =========================================================
   V5.74 PROFESSIONAL CTV CAMERA UI
   ========================================================= */
.ctv-camera-page,
.ctv-capture-screen,
.camera-screen,
[class*="ctv"][class*="camera"]{
  position:relative!important;
}

.ctv-camera-header,
.camera-header{
  min-height:58px!important;
  padding:0 14px!important;
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) 42px!important;
  align-items:center!important;
  background:#0878e5!important;
  color:#fff!important;
  border-radius:0!important;
}

.ctv-camera-header h1,
.camera-header h1{
  margin:0!important;
  font-size:17px!important;
  text-align:center!important;
  white-space:nowrap!important;
}

.ctv-camera-view,
.camera-preview,
video#camera,
video.camera-video{
  display:block!important;
  width:100%!important;
  height:min(62dvh,590px)!important;
  min-height:420px!important;
  object-fit:cover!important;
  background:#101820!important;
  border-radius:0!important;
}

.ctv-camera-controls{
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:24px!important;
  z-index:60!important;
  display:grid!important;
  grid-template-columns:62px 92px 62px!important;
  justify-content:center!important;
  align-items:center!important;
  gap:28px!important;
  pointer-events:none!important;
}

.ctv-camera-controls button{
  pointer-events:auto!important;
  border:0!important;
  font-family:inherit!important;
  -webkit-tap-highlight-color:transparent!important;
}

.ctv-camera-shutter{
  width:82px!important;
  height:82px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:6px solid rgba(255,255,255,.96)!important;
  border-radius:50%!important;
  background:rgba(255,255,255,.25)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.28)!important;
  backdrop-filter:blur(8px)!important;
}

.ctv-camera-shutter i{
  width:58px!important;
  height:58px!important;
  display:block!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:inset 0 0 0 2px rgba(10,88,170,.08)!important;
  transition:transform .12s ease,background .12s ease!important;
}

.ctv-camera-shutter:active i{
  transform:scale(.84)!important;
  background:#dceeff!important;
}

.ctv-camera-side{
  width:56px!important;
  height:56px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:1px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.35)!important;
  border-radius:50%!important;
  background:rgba(9,25,39,.46)!important;
  color:#fff!important;
  backdrop-filter:blur(10px)!important;
  box-shadow:0 6px 18px rgba(0,0,0,.18)!important;
}

.ctv-camera-side span{
  font-size:20px!important;
  line-height:1!important;
}
.ctv-camera-side small{
  font-size:6px!important;
  font-weight:800!important;
}

.ctv-camera-gps-status{
  position:absolute!important;
  left:50%!important;
  top:76px!important;
  z-index:55!important;
  transform:translateX(-50%)!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  max-width:calc(100% - 36px)!important;
  padding:8px 12px!important;
  border-radius:999px!important;
  background:rgba(10,27,40,.62)!important;
  color:#fff!important;
  font-size:8px!important;
  white-space:nowrap!important;
  backdrop-filter:blur(10px)!important;
  box-shadow:0 5px 16px rgba(0,0,0,.15)!important;
}
.ctv-camera-gps-status i{
  width:8px!important;
  height:8px!important;
  border-radius:50%!important;
  background:#ffc332!important;
  box-shadow:0 0 0 4px rgba(255,195,50,.18)!important;
}
.ctv-camera-gps-status.ready i{
  background:#22d982!important;
  box-shadow:0 0 0 4px rgba(34,217,130,.18)!important;
}
.ctv-camera-gps-status.error i{
  background:#ff5365!important;
  box-shadow:0 0 0 4px rgba(255,83,101,.18)!important;
}

.ctv-camera-guide,
.camera-guide,
[class*="camera"][class*="instruction"]{
  left:16px!important;
  right:16px!important;
  bottom:122px!important;
  width:auto!important;
  max-width:none!important;
  padding:9px 12px!important;
  border-radius:10px!important;
  background:rgba(10,24,36,.58)!important;
  color:#fff!important;
  font-size:8px!important;
  text-align:center!important;
  backdrop-filter:blur(8px)!important;
}

@media(max-width:380px){
  .ctv-camera-controls{
    grid-template-columns:54px 80px 54px!important;
    gap:22px!important;
  }
  .ctv-camera-shutter{
    width:74px!important;
    height:74px!important;
  }
  .ctv-camera-shutter i{
    width:52px!important;
    height:52px!important;
  }
  .ctv-camera-side{
    width:50px!important;
    height:50px!important;
  }
}
