/* Monitor di dalam aplikasi Android (html.app-mode): navigasi bawah, tanpa sidebar. */
.app-tabs{display:none}
html.app-mode .sidebar,html.app-mode #menu-scrim,html.app-mode #menu-toggle,html.app-mode .app-footer,html.app-mode #open-clock,html.app-mode .timezone{display:none!important}
html.app-mode .main{margin-left:0}
html.app-mode .topbar{height:56px;min-height:56px;padding:0 16px;position:sticky;top:0;z-index:30}
html.app-mode .topbar #page-title{font-size:18px}
html.app-mode #content{padding:18px 14px calc(88px + env(safe-area-inset-bottom,0px))}
html.app-mode .app-tabs{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;background:#fff;border-top:1px solid var(--line,#dce6e2);padding:6px 4px calc(6px + env(safe-area-inset-bottom,0px));box-shadow:0 -6px 20px #071a2210}
html.app-mode #app[hidden] .app-tabs{display:none}
.app-tabs button{flex:1;min-width:0;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:transparent;border-radius:12px;color:var(--muted,#51636a);font-size:11.5px;font-weight:600;letter-spacing:.01em;padding:4px 2px;-webkit-tap-highlight-color:transparent;transition:background .15s,color .15s}
.app-tabs button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.app-tabs button span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.app-tabs button:active{background:#2bc97c1f}
.app-tabs button.selected{color:#0f7a4a;background:#2bc97c24}
.app-tabs button:focus-visible{outline:2px solid #1f9d61;outline-offset:-2px}
html.app-mode #message{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
html.app-mode dialog#modal{max-height:calc(100dvh - 24px)}
/* Lembar "Lainnya" */
.app-more h2{margin:0 0 4px;font-size:20px}
.app-more .who{margin:0 0 14px;color:var(--muted,#51636a);font-size:13.5px}
.app-more .group{margin:16px 0 6px;font-size:11.5px;font-weight:700;letter-spacing:.08em;color:var(--muted,#51636a)}
.app-more .item{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:10px 12px;border:0;border-radius:12px;background:transparent;text-align:left;font-size:15px;font-weight:600;color:var(--ink,#10232b);text-decoration:none}
.app-more .item:active{background:#2bc97c1f}
.app-more .item svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:#1f9d61}
.app-more .item small{display:block;font-weight:500;color:var(--muted,#51636a);font-size:12.5px;line-height:1.35}
.app-more .item.danger svg,.app-more .item.danger{color:#b4361b}
.app-more select{width:100%;min-height:48px;margin-top:2px}
.app-error{max-width:420px;margin:0 auto;padding:40px 24px;text-align:center}
.app-error h1{font-size:22px;margin:0 0 8px}
.app-error p{color:var(--muted,#51636a);margin:0 0 20px}
.app-error .btn{min-height:48px;display:inline-flex;align-items:center;justify-content:center;padding:0 22px}
@media(prefers-reduced-motion:reduce){.app-tabs button{transition:none}}
/* Tema gelap */
:root[data-theme=dark] html.app-mode .app-tabs,:root[data-theme=dark].app-mode .app-tabs{background:#101c21;border-top-color:#26363c;box-shadow:0 -6px 20px #0006}
:root[data-theme=dark].app-mode .app-tabs button.selected{color:#4fd19a;background:#2bc97c26}
:root[data-theme=dark].app-mode .app-more .item svg{color:#4fd19a}
:root[data-theme=dark].app-mode .app-more .item.danger,:root[data-theme=dark].app-mode .app-more .item.danger svg{color:#ff9d84}
/* Kayla AI di aplikasi: tinggi obrolan dikurangi bilah atas, bilah tab bawah, dan padding agar kolom ketik tidak tertutup. */
html.app-mode .assistant-conversation.wa{height:calc(100dvh - 176px - env(safe-area-inset-bottom,0px));min-height:300px}

/* Pemilik/Admin pindah mode Admin <-> Staf dengan satu ketukan. Tampilan sama dengan tombol di aplikasi HP (Pengaturan dan Beranda): jalur hijau muda, pilihan aktif hijau tua. */
.mode-switch{display:inline-flex;align-items:center;gap:0;padding:2px;margin-right:8px;border:0;border-radius:13px;background:#e6f4ec}
.mode-switch[hidden]{display:none}
.mode-switch>*{display:inline-flex;align-items:center;justify-content:center;min-height:28px;min-width:52px;padding:0 11px;border-radius:11px;font-size:12.5px;font-weight:800;text-decoration:none;color:#0f7a4a}
.mode-switch .is-on{background:#0f7a4a;color:#fff}
.mode-switch.is-wide{display:flex;margin:4px 0 0;padding:3px;border-radius:17px}
.mode-switch.is-wide>*{flex:1 1 0;min-height:46px;min-width:0;padding:0 16px;border-radius:14px;font-size:14px}
.mode-hint{margin:10px 2px 4px;font-size:13px;line-height:1.4;color:var(--muted,#51636a)}
:root[data-theme=dark] .mode-switch{background:#16262b}
:root[data-theme=dark] .mode-switch>*{color:#7fe0ae}
:root[data-theme=dark] .mode-switch .is-on{background:#128a58;color:#fff}
@media (max-width:480px){.top-actions .mode-switch{margin-right:4px}.top-actions .mode-switch>*{min-width:44px;padding:0 9px;font-size:12px}}
@media (max-width:480px){.top-actions:has(.mode-switch:not([hidden])) #open-clock>span:last-child{display:none}.top-actions:has(.mode-switch:not([hidden])) #open-clock{padding:0 12px}}

/* Daftar staf di HP: satu kartu ringkas per orang. Nama di atas, keterangan satu baris, tombol tindakan satu baris yang bisa digeser. */
@media (max-width:580px){
.staff-list tbody tr{display:flex;flex-wrap:wrap;align-items:center;gap:2px 10px;padding:12px 14px}
.staff-list tbody td{width:auto;padding:0!important;font-size:13px;color:var(--muted,#5d7068)}
.staff-list tbody td:first-child{width:100%;font-size:15px;color:inherit;margin-bottom:2px}
.staff-list .who-cell{gap:10px}
.staff-list tbody td:nth-child(4){display:none}
.staff-list .col-komp,.staff-list .col-koef{font-size:12px}
.staff-list .col-komp:has(.muted),.staff-list .col-koef:has(.muted){display:none}
.staff-list .col-koef:not(:empty)::before{content:'Koef. ';color:var(--muted,#5d7068)}
.staff-list tbody td{min-width:0}
.staff-list .who-cell small.sub{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:calc(100vw - 110px)}
.staff-list tbody td:last-child{width:100%;margin-top:6px;padding-top:2px!important;border-top:1px solid var(--line,#e3ebe6)!important}
.staff-list .row-actions{display:flex;flex-wrap:nowrap;gap:0 2px;justify-content:space-between;overflow-x:auto;scrollbar-width:none;margin:0 -6px}
.staff-list .row-actions::-webkit-scrollbar{display:none}
.staff-list .row-actions .text-button{flex:none;min-height:40px;margin:0;padding:0 6px;font-size:13px;font-weight:700;white-space:nowrap;color:#0f7a4a}
.staff-list .row-actions .text-button[data-action=member-confirm]{color:#a3341d}
}
:root[data-theme=dark] .staff-list .row-actions .text-button{color:#7fe0ae}
:root[data-theme=dark] .staff-list .row-actions .text-button[data-action=member-confirm]{color:#ff9d86}

@media (max-width:380px){.staff-list .row-actions .text-button{font-size:12px;padding:0 4px}}
.field-hint{display:block;margin-top:4px;font-size:12px;font-weight:400;color:var(--muted,#5d7068)}

/* Daftar staf dengan kolom Komputer dan Koefisien: kolom "Absen lewat" disembunyikan (tombol Perangkat sudah ada) supaya tabel muat. */
.staff-list.has-cols th:nth-child(4),.staff-list.has-cols td:nth-child(4){display:none}
.staff-list.has-cols .row-actions{display:flex;flex-wrap:wrap;gap:0 12px}
.staff-list.has-cols td.col-komp{max-width:190px;overflow-wrap:anywhere}
.staff-list .comp-use{display:block;font-size:11.5px;color:var(--muted,#5d7068);margin-top:2px}
.staff-list .comp-use.on{color:#0f7a4a;font-weight:700}
@media (max-width:580px){.staff-list .comp-use{display:inline;margin:0 0 0 4px}.staff-list .comp-use::before{content:'· '}}
:root[data-theme=dark] .staff-list .comp-use.on{color:#7fe0ae}

/* Absensi: jam komputer StaffCop */
.pc-cell{color:#1d63c4;font-weight:600}
.day-pc{display:flex;align-items:center;gap:10px;margin:8px 0;font-size:13px;color:var(--muted)}
.day-pc b{color:#1d63c4}
.pc-strip{display:flex;flex:1;min-width:0;height:8px;border-radius:99px;overflow:hidden;background:#e3ecf8}
.pc-strip i{flex:1}

/* Dialog Ubah peran: tiga kartu pilihan dengan penjelasan hak akses */
.role-intro{margin:0 0 12px;color:var(--muted)}
.role-list{display:grid;gap:10px;margin:0 0 12px}
.role-opt{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border:1.5px solid var(--line);border-radius:14px;cursor:pointer;background:var(--panel,#fff);min-height:44px}
.role-opt input{margin:4px 0 0;width:20px;height:20px;flex:none;accent-color:#22b573}
.role-opt:has(input:checked){border-color:#22b573;background:#eefaf4}
.role-opt:has(input:focus-visible){outline:3px solid #9bdcbc;outline-offset:2px}
.role-body{display:grid;gap:3px;min-width:0}
.role-title{font-weight:700;font-size:16px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.role-title em{font-style:normal;font-size:11.5px;font-weight:700;padding:1px 8px;border-radius:99px;background:#e7edf3;color:#475569}
.role-sub{color:var(--muted);font-size:13.5px}
.role-body ul{margin:4px 0 0;padding-left:18px;font-size:13.5px;line-height:1.45}
.role-foot{margin:0 0 14px;font-size:13px;color:var(--muted)}
:root[data-theme=dark] .role-opt{background:#121b1e}
:root[data-theme=dark] .role-opt:has(input:checked){background:#12301f;border-color:#2bc97c}
:root[data-theme=dark] .role-title em{background:#243238;color:#b7c9d1}

html body .staff-list.has-cols th.col-koef:empty,html body .staff-list.has-cols td.col-koef:empty{display:none}

html.app-mode .top-actions{gap:8px}
html.app-mode #app-invite{min-height:34px;padding:0 12px;border-radius:10px;font-size:13px;font-weight:700;white-space:nowrap;background:#1f9d61;border-color:#1f9d61;color:#fff}
html.app-mode #app-invite:active{background:#178a54}
