:root{--teal:#0f766e;--teal-2:#0d9488;--teal-soft:#e7f6f3;--ink:#152825;--muted:#70807d;--line:#e4ebe9;--surface:#fff;--bg:#f4f7f6;--shadow:0 12px 30px rgba(25,64,56,.07);--radius:18px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;line-height:1.5}button,input,select,textarea{font:inherit}button{cursor:pointer}.app-shell{display:flex;max-width:1440px;min-height:100vh;margin:auto}.sidebar{position:sticky;top:0;width:248px;height:100vh;padding:26px 18px 20px;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:11px;padding:0 8px 30px;color:var(--ink);font-size:16px;font-weight:800;text-decoration:none}.brand small,.profile small{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.08em}.brand-mark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,var(--teal-2),var(--teal));color:#fff;box-shadow:0 8px 18px #0f766e33}.nav{display:grid;gap:5px}.nav button{display:flex;align-items:center;gap:12px;border:0;border-radius:12px;padding:11px 13px;background:transparent;color:#64736f;text-align:left;font-weight:650}.nav button:hover{background:#f2f7f5}.nav button.active{background:var(--teal-soft);color:var(--teal)}.nav-icon{width:24px;text-align:center;font-size:17px}.sidebar-footer{margin-top:auto;padding:18px 8px 4px;border-top:1px solid var(--line)}.sidebar-footer label{display:block;margin-bottom:6px;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.sidebar-footer small{display:block;margin-top:8px;color:#93a09d}.main{min-width:0;flex:1;padding:31px 36px 70px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:28px}.eyebrow{margin:0 0 3px;color:var(--teal);font-size:11px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.topbar h1{margin:0;font-size:28px;letter-spacing:-.04em}.topbar>div>p:last-child{margin:3px 0 0;color:var(--muted)}.profile{display:flex;align-items:center;gap:10px;padding:8px 10px;background:var(--surface);border:1px solid var(--line);border-radius:14px}.avatar{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:var(--teal-soft);color:var(--teal);font-weight:850}.profile strong{font-size:13px}.profile select{display:none}.page{display:none}.page.active{display:block}.hero{position:relative;overflow:hidden;min-height:190px;padding:30px 32px;border-radius:23px;background:linear-gradient(120deg,#075c57 0%,#0f766e 58%,#20a696 100%);color:#fff;display:flex;justify-content:space-between;align-items:center;box-shadow:0 18px 40px #0f766e29}.hero:after{content:"";position:absolute;width:280px;height:280px;right:-90px;top:-135px;border:55px solid #ffffff0b;border-radius:50%}.hero-label{font-size:12px;color:#d1f3ed}.hero h2{margin:5px 0 1px;font-size:44px;line-height:1.1;letter-spacing:-.05em}.hero h2 small{font-size:16px;letter-spacing:0}.hero p{margin:4px 0 0;color:#ccebe6}.rank-card{position:relative;z-index:1;min-width:145px;padding:16px 19px;border:1px solid #ffffff38;border-radius:16px;background:#ffffff12;backdrop-filter:blur(6px);text-align:center}.rank-card span,.rank-card small{display:block;font-size:11px;color:#d6efeb}.rank-card strong{display:block;margin:1px;font-size:27px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:14px}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:21px;box-shadow:var(--shadow)}.metric{position:relative;display:flex;align-items:center;gap:13px}.metric-icon{width:42px;height:42px;flex:0 0 auto;border-radius:13px;display:grid;place-items:center;background:var(--teal-soft);color:var(--teal);font-weight:900}.metric-icon.gold{background:#fff4dd;color:#b66c00}.metric-icon.blue{background:#eaf2ff;color:#3868b0}.metric p{margin:0;color:var(--muted);font-size:12px}.metric strong{font-size:26px;line-height:1}.metric small{margin-left:4px;color:var(--muted)}.metric em{position:absolute;right:16px;top:15px;color:#18806f;font-size:10px;font-style:normal}.metric.simple strong{display:block;margin:4px 0;font-size:28px}.section-heading{margin:27px 0 11px}.section-heading h2,.card-head h2{margin:0;font-size:18px;letter-spacing:-.025em}.section-heading.split,.card-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.quick-actions button{display:flex;align-items:center;gap:13px;padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--ink);text-align:left;transition:.2s}.quick-actions button:hover{transform:translateY(-2px);border-color:#abd8cf;box-shadow:var(--shadow)}.quick-actions button>span{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--teal-soft);color:var(--teal);font-size:21px}.quick-actions button div{flex:1}.quick-actions strong,.quick-actions small{display:block}.quick-actions small{margin-top:2px;color:var(--muted);font-size:11px}.quick-actions b{color:var(--teal);font-size:18px}.content-grid{display:grid;grid-template-columns:1.12fr .88fr;gap:15px}.section-gap{margin-top:15px}.card-head{margin-bottom:13px}.text-button{border:0;background:transparent;color:var(--teal);font-size:12px;font-weight:750}.list-row{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid #edf1f0}.list-row:last-child{border:0}.list-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#f0f7f5;color:var(--teal);font-weight:900}.list-body{min-width:0;flex:1}.list-body strong,.list-body small{display:block}.list-body small{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pill{display:inline-flex;padding:5px 9px;border-radius:99px;background:var(--teal-soft);color:var(--teal);font-size:10px;font-weight:800}.rank-number{width:28px;text-align:center;font-weight:900;color:var(--muted)}.rank-number.top{color:#c98416}.rank-total{font-weight:800}.progress{height:5px;margin-top:7px;border-radius:20px;background:#edf2f1;overflow:hidden}.progress span{display:block;height:100%;border-radius:20px;background:linear-gradient(90deg,var(--teal),#36b5a5)}.product-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-bottom:15px}.product{display:flex;align-items:center;gap:11px;padding:15px;border:1px solid var(--line);border-radius:15px;background:#fff;color:var(--ink);font-weight:750;text-align:left}.product span{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:#f0f6f4;color:var(--teal)}.product:hover,.product.selected{border-color:var(--teal)}.product.selected{background:#f1faf8;box-shadow:inset 0 0 0 1px var(--teal)}.form-card{margin-top:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-card>label,.form-grid label{display:block;margin-bottom:14px;color:#455a56;font-size:12px;font-weight:700}.wide{grid-column:1/-1}input,select,textarea{width:100%;margin-top:6px;padding:11px 12px;border:1px solid #d8e3e0;border-radius:11px;background:#fff;color:var(--ink);outline:0}input:focus,select:focus,textarea:focus{border-color:var(--teal-2);box-shadow:0 0 0 3px #0d948818}textarea{min-height:88px;resize:vertical}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:17px}.button{padding:11px 16px;border:0;border-radius:11px;font-weight:750}.button.primary{background:var(--teal);color:#fff}.button.primary:hover{background:#0b655f}.button.secondary{background:#edf4f2;color:#38544f}.button.full{width:100%}.message{margin:13px 0 0;padding:11px 13px;border-radius:10px;background:#e7f6f1;color:#12685c;font-size:12px;font-weight:700}.segments{display:flex;padding:4px;border-radius:11px;background:#e7eeec}.segments button{padding:7px 10px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:11px;font-weight:750}.segments button.active{background:#fff;color:var(--teal);box-shadow:0 2px 6px #1d443b18}.visit-gallery{display:grid;grid-template-columns:1fr 1fr;gap:12px}.visit-card{overflow:hidden;border:1px solid var(--line);border-radius:14px}.visit-image{height:95px;display:grid;place-items:center;background:linear-gradient(135deg,#d8eee8,#9fcfc2);color:#256e62;font-size:25px}.visit-card div:last-child{padding:10px}.visit-card strong,.visit-card small{display:block}.visit-card small{color:var(--muted);font-size:10px}.search{max-width:250px;margin:0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left}th{padding:11px 10px;background:#f7f9f8;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.05em}td{padding:13px 10px;border-bottom:1px solid #edf1f0;font-size:12px}tbody tr:last-child td{border:0}.status{color:#147461;font-weight:700}.bar-chart{height:235px;display:flex;align-items:flex-end;justify-content:space-around;gap:12px;padding:15px 6px 0;border-bottom:1px solid var(--line)}.bar-item{height:100%;flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:7px;color:var(--muted);font-size:10px}.bar-item b{color:var(--ink)}.bar-item span{width:min(46px,75%);border-radius:8px 8px 0 0;background:linear-gradient(#20a696,#a8ded4)}.mobile-nav{display:none}
@media(max-width:900px){.sidebar{width:205px}.main{padding:27px 22px 60px}.content-grid{grid-template-columns:1fr}.product-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){body{font-size:13px}.sidebar{display:none}.main{padding:20px 14px 92px}.topbar{align-items:flex-start;margin-bottom:20px}.topbar h1{font-size:23px}.topbar>div>p:last-child,.profile>div{display:none}.profile{padding:6px}.profile select{display:block;width:auto;margin:0;border:0;padding:7px 4px}.avatar{display:none}.hero{min-height:153px;padding:20px;gap:12px}.hero h2{margin-top:5px;font-size:31px;white-space:nowrap}.hero h2 small{font-size:0}.hero h2 small:after{content:'Closing';font-size:31px}.hero p{max-width:190px;font-size:13px;line-height:1.5}.rank-card{width:107px;min-width:107px;padding:14px 9px}.rank-card strong{font-size:24px}.metrics{grid-template-columns:1fr;gap:9px}.metric{padding:14px 16px}.metric strong{font-size:23px}.quick-actions{grid-template-columns:1fr 1fr;gap:8px}.quick-actions button{height:71px;justify-content:center;padding:11px}.quick-actions button>span{width:38px;height:38px}.quick-actions button div,.quick-actions button b{display:none}.product-grid{grid-template-columns:1fr 1fr}.product{padding:11px;font-size:12px}.form-grid{grid-template-columns:1fr}.wide{grid-column:auto}.section-heading.split{align-items:flex-start;flex-direction:column}.history-head{align-items:flex-start;flex-direction:column}.search{max-width:none}.visit-gallery{grid-template-columns:1fr 1fr}.mobile-nav{position:fixed;z-index:20;bottom:0;left:0;right:0;display:flex;justify-content:space-around;padding:8px 4px calc(8px + env(safe-area-inset-bottom));background:#ffffffef;border-top:1px solid var(--line);backdrop-filter:blur(12px)}.mobile-nav button{min-width:52px;border:0;background:transparent;color:#7a8986;font-size:9px;font-weight:700}.mobile-nav span{display:block;font-size:18px}.mobile-nav button.active{color:var(--teal)}}
@media(max-width:680px){.card-head h2{font-size:17px}.text-button{min-width:131px;padding:12px 13px;white-space:nowrap}.list-row{padding:12px 0}.list-icon{width:40px;height:40px}.list-body strong{font-size:13px}.list-body small{font-size:10px}.quick-actions button{justify-content:flex-start;text-align:left}.quick-actions button>span{width:38px;height:38px;font-size:20px;flex:0 0 38px}.quick-actions button div{display:block;min-width:0}.quick-actions button strong{font-size:12px;line-height:1.25}.quick-actions button small{font-size:10px;line-height:1.25}.quick-actions button b{display:none}}
@media(max-width:680px){.performance-card .card-head{align-items:flex-start}.performance-card .chart-select{max-width:108px;font-size:11px}.staff-chart{height:190px}.modal{padding:12px}.modal-panel{padding:22px 16px;border-radius:20px}.closing-bar-row{grid-template-columns:94px 1fr 20px;font-size:10px}.podium{gap:7px;padding:16px 5px 0;min-height:300px}.podium-avatar{width:46px;height:46px}.podium-item strong{font-size:10px}.podium-bar{height:95px}.place-1 .podium-bar{height:145px}.place-2 .podium-bar{height:120px}.place-3 .podium-bar{height:95px}.leaderboard-list{padding:10px}.leader-row{gap:9px}.product-select-label{max-width:none}}
@media(max-width:400px){.hero{align-items:center;flex-direction:row}.hero>div:first-child{min-width:0;flex:1}.rank-card{display:block;text-align:center}.visit-gallery{grid-template-columns:1fr}}
.rank-number.top{font-size:0}.rank-number.top:after{font-size:16px}.list-row:nth-child(1) .rank-number.top:after{content:'🥇'}.list-row:nth-child(2) .rank-number.top:after{content:'🥈'}.list-row:nth-child(3) .rank-number.top:after{content:'🥉'}
.text-button{background:var(--teal-soft);color:#0b665e;border-radius:11px;padding:12px 14px}
.nav-icon svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.mobile-nav svg{display:block;width:25px;height:25px;margin:0 auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hero-clickable{cursor:pointer}.hero-clickable:hover{filter:saturate(1.08);transform:translateY(-1px)}
.performance-card{padding-bottom:16px}.chart-select,.product-select{margin:0;min-width:115px;padding:9px 11px;background:#f5faf8;border-color:#cfe5df;font-weight:700}.chart-legend{display:flex;justify-content:space-between;align-items:center;margin:4px 0 4px;color:var(--muted);font-size:11px}.chart-legend span{display:flex;align-items:center;gap:6px;color:var(--ink);font-weight:750}.chart-legend i{width:8px;height:8px;border-radius:50%;background:var(--teal);display:inline-block}.staff-chart{position:relative;height:210px;padding-left:32px}.staff-chart svg{width:100%;height:172px;overflow:visible;background:repeating-linear-gradient(to bottom,transparent 0,transparent 33px,#e9efed 34px)}.chart-area{pointer-events:none}.chart-line{fill:none;stroke:var(--chart-color,#119b91);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.staff-chart circle{fill:#fff;stroke:var(--chart-color,#119b91);stroke-width:2}.chart-y{position:absolute;left:0;top:0;height:172px;display:flex;flex-direction:column;justify-content:space-between;color:var(--muted);font-size:10px}.chart-x{display:flex;justify-content:space-between;color:var(--muted);font-size:10px;padding:2px 0 0}.product-select-label{display:block;max-width:440px;margin:0 0 15px;color:#455a56;font-size:12px;font-weight:750}.product-select-label select{display:block}.modal[hidden]{display:none}.modal{position:fixed;z-index:30;inset:0;display:grid;place-items:center;padding:20px}.modal-backdrop{position:absolute;inset:0;background:#0b292688;backdrop-filter:blur(3px)}.modal-panel{position:relative;z-index:1;width:min(620px,100%);padding:28px;border-radius:24px;background:#fff;box-shadow:0 24px 70px #0b292655}.modal-close{position:absolute;right:17px;top:13px;border:0;background:transparent;color:var(--muted);font-size:26px}.modal-panel h2{margin:4px 0 2px;font-size:22px;text-transform:capitalize}.modal-subtitle{margin:0 0 22px;color:var(--muted);font-size:12px}.closing-bars{display:grid;gap:12px}.closing-bar-row{display:grid;grid-template-columns:125px 1fr 25px;align-items:center;gap:10px;font-size:12px}.closing-bar-row>span{text-align:right;color:#53635f}.closing-bar-row>div{height:27px;background:#f0f3f2;border:1px solid #e0e8e5}.closing-bar-row i{display:block;height:100%;border-radius:0 7px 7px 0}.closing-bar-row b{font-size:12px}.leaderboard-card{overflow:hidden}.podium{display:grid;grid-template-columns:repeat(3,1fr);align-items:end;gap:18px;min-height:355px;padding:20px 18px 0;background:#fbfcf7}.podium-item{display:flex;flex-direction:column;align-items:center;text-align:center;gap:3px}.podium-avatar{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;background:var(--teal-soft);color:var(--teal);font-weight:850;border:4px solid #fff;box-shadow:0 4px 14px #1b514620}.podium-item strong{font-size:12px}.podium-item small{color:var(--muted);font-size:10px}.podium-bar{width:100%;height:115px;margin-top:8px;border-radius:13px 13px 0 0;background:#d7ecd0;display:grid;place-items:center;color:#385c3e;font-size:22px}.place-1 .podium-bar{height:180px}.place-2 .podium-bar{height:145px}.place-3 .podium-bar{height:115px}.leaderboard-list{display:grid;gap:2px;padding:13px 18px}.leader-row{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--line)}.leader-row>span{width:28px;font-size:20px;color:#4b514e}.leader-row div{flex:1}.leader-row strong,.leader-row small{display:block}.leader-row small{color:var(--muted);font-size:11px}.leader-row>b{color:#cf3c7c;font-size:22px}.rank-unit{color:var(--muted);font-size:10px}.visit-card p{margin:5px 0 0;color:var(--muted);font-size:11px}
.visit-image img{width:100%;height:100%;object-fit:cover;display:block}
.auth-screen{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#e8f4f1,#f8faf9)}.auth-screen[hidden]{display:none}.auth-card{width:min(420px,100%);padding:32px;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:0 24px 70px #0f766e24}.auth-card .brand-mark{margin-bottom:18px}.auth-card h1{margin:4px 0;font-size:25px}.auth-card>p{color:var(--muted)}.auth-card label{display:block;margin:15px 0;color:#455a56;font-size:12px;font-weight:700}.auth-card>small{display:block;margin-top:14px;color:#9a5c12}.message.error{background:#fff0ee;color:#a33228}.logout-button{border:0;background:#edf4f2;color:#38544f;border-radius:9px;padding:8px 10px;font-weight:700}.loading{cursor:progress}.loading button{pointer-events:none;opacity:.7}.empty{color:var(--muted);font-size:12px}.delete-button{border:1px solid #f0c8c3;border-radius:8px;padding:6px 9px;background:#fff5f3;color:#b33b30;font-size:11px;font-weight:800;cursor:pointer}.delete-button:hover{background:#ffe9e5}.delete-button:disabled{cursor:wait;opacity:.65}
.staff-detail-trigger{cursor:pointer}.staff-detail-trigger:hover{background:#f7fbfa;border-radius:10px}.staff-closing-rows{display:grid;gap:8px;max-height:52vh;overflow:auto}.staff-closing-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.staff-closing-row strong,.staff-closing-row small{display:block}.staff-closing-row small{margin-top:3px;color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.staff-closing-row>span{color:var(--muted);font-size:11px;white-space:nowrap}.staff-closing-row>b{color:var(--teal);font-size:13px;white-space:nowrap}

/* Jaga header dan grafik tetap rapi ketika lebar desktop menyempit. */
.profile>div{min-width:0}.profile strong,.profile small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.performance-card,.staff-chart{min-width:0}.staff-chart{width:100%;max-width:100%;overflow:hidden}.staff-chart svg{display:block;max-width:100%;overflow:hidden}.chart-x{padding:2px 4px 0}
.all-staff-charts{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));height:auto;padding:0;gap:14px;background:transparent}.all-staff-chart-card{min-width:0;padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff}.all-staff-chart-card>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.all-staff-chart-card strong{font-size:13px}.all-staff-chart-card small{color:var(--muted);font-size:11px;white-space:nowrap}.staff-chart-mini{height:180px;padding-left:28px}
@media (min-width:681px) and (max-width:1100px){.topbar{min-height:0;align-items:stretch;flex-direction:column;gap:12px}.topbar-actions{width:100%;justify-content:space-between}.topbar-actions .profile{max-width:calc(100% - 190px)}.main{padding:26px 22px 60px}}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:20px 0 16px;padding:4px;border-radius:12px;background:#edf3f1}.auth-tabs button{padding:9px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-weight:750}.auth-tabs button.active{background:#fff;color:var(--teal);box-shadow:0 2px 8px #123c3214}.auth-card form[hidden]{display:none}.auth-card form>p{margin:0 0 14px;color:var(--muted)}
.field-hint{display:block;margin-top:6px;color:var(--muted);font-size:10px;font-weight:500}
.role-badge{display:block;margin-top:6px;padding:8px 10px;border-radius:10px;background:var(--teal-soft);color:var(--teal);font-size:12px;font-weight:800}.chart-select[hidden]{display:none}
.form-card input,.form-card select,.form-card textarea{max-width:100%}.form-grid,.form-grid>label,.form-card>label{min-width:0}@media(max-width:680px){.form-card input[type="date"]{display:block;width:100%;max-width:100%;min-width:0;min-inline-size:0;-webkit-appearance:none;appearance:none}.form-card input[type="number"],.form-card select,.form-card textarea{width:100%;max-width:100%;min-width:0}.form-grid>label,.form-card>label{width:100%;max-width:100%;overflow:hidden}}
.closing-heading{margin-bottom:14px}.closing-heading h2{font-size:21px}.closing-heading p,.closing-card-head p{margin:4px 0 0;color:var(--muted);font-size:12px}.product-select-label{max-width:none!important;display:flex!important;align-items:center;gap:18px;margin-bottom:16px!important;padding:16px 18px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--shadow);font-size:13px!important}.product-select-label>span{flex:0 0 112px;color:var(--ink);font-weight:800}.product-select-label .product-select{flex:1;min-height:52px;padding:13px 15px;font-size:15px}.closing-card-head{padding-bottom:15px;border-bottom:1px solid var(--line);margin-bottom:18px}
.closing-card-head .pill{flex:0 0 auto}@media(max-width:680px){.closing-heading{margin-top:18px}.product-select-label{display:block!important;padding:14px}.product-select-label>span{display:block;margin-bottom:8px}.product-select-label .product-select{width:100%;min-height:54px;margin:0;font-size:15px}.closing-card-head{align-items:flex-start}.closing-card-head h2{font-size:19px}#closingFields{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 10px}#closingFields>label:nth-child(n+3){grid-column:1/-1}#closingFields>label:nth-child(-n+2){grid-column:auto;margin-bottom:2px}#closingFields>label:nth-child(-n+2) input{padding:11px 9px;font-size:12px;text-align:left}}
.brand-logo{width:64px;height:42px;padding:4px 5px;border-radius:10px;background:#fff;box-shadow:0 6px 16px #0f766e1c}.brand-logo img{display:block;width:100%;height:100%;object-fit:contain}.auth-card .brand-logo{width:78px;height:48px;padding:3px 4px}
body{font-family:"Lato",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
/* BYOND-inspired visual theme; layout and application structure remain unchanged. */
:root{--teal:#009b8f;--teal-2:#08aea0;--teal-soft:#ddf5f1;--ink:#17201f;--muted:#7b8583;--line:#e7ecea;--surface:#fff;--bg:#f4f6f5;--shadow:0 10px 28px rgba(24,49,45,.09);--radius:22px}
body{background:var(--bg);color:var(--ink)}
.main{background:linear-gradient(180deg,#00998e 0,#37aa98 105px,#f2c75a 220px,#f4f6f5 360px);background-repeat:no-repeat;background-size:100% 360px}
.sidebar{border-right:0;box-shadow:8px 0 28px rgba(31,61,55,.05)}
.brand-mark.brand-logo{background:#fff;border:0;box-shadow:0 8px 20px rgba(0,75,68,.14)}
.nav button{border-radius:15px;padding:13px 14px}.nav button.active{background:#dff5f1;color:#008f84}.nav button:hover{background:#edf8f6}
.topbar{min-height:92px}.topbar .eyebrow,.topbar h1,.topbar>div>p:last-child{color:#fff}.topbar .eyebrow{opacity:.84}.topbar h1{font-weight:900;text-shadow:0 1px 1px rgba(0,62,57,.08)}
.profile{border:1px solid rgba(255,255,255,.55);background:rgba(255,255,255,.93);border-radius:18px;box-shadow:0 8px 22px rgba(0,79,71,.12)}
.avatar{border-radius:50%;background:#0b8f85;color:#fff}.logout-button{background:#e5f4f1;color:#126b64;border-radius:12px}
.card{border:0;border-radius:22px;box-shadow:0 8px 26px rgba(31,52,49,.08)}
.hero{background:#fff;color:var(--ink);border:0;border-radius:25px;box-shadow:0 14px 32px rgba(29,56,52,.12)}
.hero:before{content:"";position:absolute;right:-20px;top:-30px;width:220px;height:150px;border-radius:55% 0 40% 55%;background:linear-gradient(135deg,#f2b83f,#f77969 50%,#9d67cb);opacity:.24;transform:rotate(-8deg)}
.hero:after{width:170px;height:170px;right:55px;top:-70px;border:32px solid rgba(0,158,145,.10)}
.hero-label,.hero p{color:#77817f}.hero h2{color:#111817}.rank-card{border:0;background:#e4f6f3;color:#126d65}.rank-card span,.rank-card small{color:#5c7772}.rank-card strong{color:#008f84}
.quick-actions button{border:0;border-radius:20px;box-shadow:0 7px 22px rgba(31,52,49,.07)}.quick-actions button:nth-child(1)>span{background:#c8f4ef;color:#009c90}.quick-actions button:nth-child(2)>span{background:#fff0bd;color:#c48109}.quick-actions button:hover{border:0;box-shadow:0 12px 26px rgba(17,91,82,.13)}
.section-heading h2,.card-head h2{font-weight:900}.eyebrow{color:#008f84}
.product-select-label{border:0!important;border-radius:20px!important;box-shadow:0 8px 26px rgba(31,52,49,.08)!important}.product-select-label .product-select{border:0;background:#eef7f5;border-radius:14px}
input,select,textarea{border-color:#dfe7e5;border-radius:14px;background:#fbfcfc}input:focus,select:focus,textarea:focus{border-color:#08a99b;box-shadow:0 0 0 3px rgba(8,169,155,.13)}
.button{border-radius:14px}.button.primary{background:linear-gradient(100deg,#008f84,#10aa9b);box-shadow:0 8px 18px rgba(0,143,132,.18)}.button.primary:hover{background:linear-gradient(100deg,#007f76,#079d91)}.button.secondary{background:#edf3f1;color:#4e625e}
.pill{background:#e0f5f1;color:#08786f}.message{border-radius:14px}.progress{background:#edf2f1}.progress span{background:linear-gradient(90deg,#04a496,#5fcbbf)}
.visit-card{border:0;border-radius:18px;background:#fff;box-shadow:0 6px 18px rgba(25,49,45,.08)}.visit-image{height:120px;background:linear-gradient(135deg,#c8f2ed,#f4d57d)}
.segments{background:#e8eeec;border-radius:14px}.segments button{border-radius:11px}.segments button.active{color:#008f84}
.mobile-nav{border-top:0;box-shadow:0 -8px 26px rgba(26,49,45,.10)}
@media(max-width:680px){body{background:#f4f6f5}.main{background:linear-gradient(180deg,#00998e 0,#41ad99 112px,#f1c75c 225px,#f4f6f5 355px);background-repeat:no-repeat;background-size:100% 355px}.topbar{min-height:112px;margin:-20px -14px 10px;padding:24px 14px 26px}.topbar h1{font-size:25px}.profile{padding:6px 7px;background:rgba(255,255,255,.94)}.logout-button{padding:9px 12px}.hero{border-radius:24px;padding:22px}.card{border-radius:22px}.quick-actions button{border-radius:18px;background:#fff}.form-card{padding:20px}.product-select-label{border-radius:20px!important}.mobile-nav{left:8px;right:8px;bottom:7px;border-radius:22px;padding:10px 5px calc(9px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96)}.mobile-nav button.active{color:#00998e}.mobile-nav button.active .nav-icon,.mobile-nav button.active>span{color:#00998e}.visit-card{border-radius:18px}}
/* Contrast pass for gradient backgrounds and small supporting copy. */
.brand>span:last-child small{color:#52635f;font-size:11px;font-weight:800;letter-spacing:.09em;opacity:1}
:root{--muted:#5f6d69}
.eyebrow{color:#006f68}.section-heading h2,.closing-heading h2{color:#102321}.section-heading p,.closing-heading p{color:#3f5551}.closing-heading{padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.76);box-shadow:0 6px 18px rgba(43,65,60,.06);backdrop-filter:blur(8px)}
.product-select-label>span,.closing-card-head h2,.form-card label{color:#17201f}.closing-card-head p{color:#53625f}.quick-actions small,.list-body small,.visit-card small,.metric p,.metric small,.chart-y,.chart-x,.chart-legend,.field-hint{color:#5f6d69}
.text-button{color:#006f68}.pill{color:#006f68}.status{color:#006f62}.role-badge{color:#006f68}.nav button.active,.mobile-nav button.active{color:#007a71}
.button.primary{background:linear-gradient(100deg,#007d74,#07978b)}.button.primary:hover{background:linear-gradient(100deg,#006f68,#078a80)}
.hero>div{position:relative;z-index:1}.hero-label,.hero p{color:#52635f}.rank-card span,.rank-card small{color:#466a64}.rank-card strong{color:#006f68}
@media(max-width:680px){.closing-heading{background:rgba(255,255,255,.82)}.topbar .eyebrow,.topbar h1,.topbar>div>p:last-child{color:#fff}.section-heading h2{color:#102321}.section-heading p{color:#3f5551}}
.avatar{overflow:hidden}.avatar img{display:block;width:100%;height:100%;object-fit:cover}
.history-profile-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:18px;margin-bottom:16px;padding:22px}
.history-profile-photo{display:grid;width:88px;height:88px;overflow:hidden;place-items:center;border-radius:24px;background:linear-gradient(145deg,#008f84,#48bba9);box-shadow:0 8px 20px rgba(0,126,116,.2);color:#fff;font-size:25px;font-weight:900}
.history-profile-photo img{display:block;width:100%;height:100%;object-fit:cover}.history-profile-copy{min-width:0}.history-profile-copy .eyebrow{margin:0}.history-profile-copy h2{overflow:hidden;margin:3px 0;text-overflow:ellipsis;font-size:21px;white-space:nowrap}.history-profile-copy p:last-child{margin:0;color:var(--muted);font-size:12px}.profile-upload-button{cursor:pointer;text-align:center}.profile-upload-button:focus-within{outline:3px solid rgba(8,169,155,.2)}.profile-photo-message{grid-column:1/-1;margin:0}
@media(max-width:680px){.history-profile-card{grid-template-columns:72px minmax(0,1fr);gap:14px;padding:18px}.history-profile-photo{width:72px;height:72px;border-radius:20px;font-size:21px}.history-profile-copy h2{font-size:18px}.profile-upload-button{grid-column:1/-1;width:100%}.profile-photo-message{grid-column:1/-1}}
.auth-screen{display:flex;align-items:center;justify-content:center;overflow-x:hidden;overflow-y:auto}
.auth-card{display:grid;width:min(860px,100%);grid-template-columns:minmax(250px,.85fr) minmax(340px,1.15fr);overflow:hidden;padding:0}
.auth-intro{display:flex;min-height:540px;flex-direction:column;justify-content:center;padding:48px;background:linear-gradient(150deg,#007f76,#15aa9b 65%,#f1c65a);color:#fff}.auth-intro .brand-logo{margin-bottom:28px}.auth-intro .eyebrow{margin:0;color:#fff;opacity:.8}.auth-intro h1{margin:8px 0 12px;font-size:34px}.auth-intro>p:last-child{max-width:285px;margin:0;color:rgba(255,255,255,.88);font-size:15px;line-height:1.6}
.auth-form-panel{display:flex;min-width:0;flex-direction:column;justify-content:center;padding:38px 44px}.auth-form-panel>small{display:block;margin-top:14px;color:#9a5c12}
.password-field{position:relative;display:block}.password-field input{padding-right:92px}.password-field button{position:absolute;right:7px;top:50%;padding:7px 9px;transform:translateY(-42%);border:0;border-radius:9px;background:#e5f4f1;color:#08756c;font-size:11px;font-weight:800;cursor:pointer}
@media(max-width:680px){.auth-screen{display:block;padding:18px 14px}.auth-card{display:block;width:min(420px,100%);margin:auto}.auth-intro{display:block;min-height:0;padding:28px 28px 10px;background:#fff;color:var(--ink)}.auth-intro .brand-logo{margin-bottom:16px}.auth-intro .eyebrow{color:var(--muted);opacity:1}.auth-intro h1{margin:5px 0;font-size:26px}.auth-intro>p:last-child{display:none}.auth-form-panel{display:block;padding:10px 28px 30px}.auth-card label{margin:13px 0}.auth-tabs{margin-top:8px}}
@media(max-height:700px) and (min-width:681px){.auth-screen{align-items:flex-start;padding:20px}.auth-intro{min-height:520px}.auth-form-panel{padding-top:26px;padding-bottom:26px}}
/* Mobile navigation inspired by BYOND: floating tray, soft icon wells, clear active state. */
@media(max-width:680px){.mobile-nav{left:12px;right:12px;bottom:10px;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;gap:2px;padding:8px 7px calc(8px + env(safe-area-inset-bottom));border:1px solid rgba(225,235,232,.9);border-radius:26px;background:rgba(255,255,255,.96);box-shadow:0 12px 32px rgba(24,63,57,.16);backdrop-filter:blur(14px)}.mobile-nav button{display:flex;min-width:0;min-height:53px;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:17px;color:#8b9693;font-size:9px;font-weight:800;letter-spacing:-.01em;transition:background .18s ease,color .18s ease,transform .18s ease}.mobile-nav button:active{transform:scale(.94)}.mobile-nav button .nav-icon{display:grid;width:31px;height:29px;place-items:center;border-radius:12px}.mobile-nav button .nav-icon svg{width:23px;height:23px;stroke-width:1.75}.mobile-nav button.active{background:transparent;color:#00998e}.mobile-nav button.active .nav-icon{background:#d9f5f0;color:#008f84}.mobile-nav button.active .nav-icon svg{stroke-width:2.1}.mobile-nav button:not(.active):hover{background:#f4f8f7;color:#60716d}.mobile-nav button>span:last-child{display:block;line-height:1.1}.mobile-nav button.active>span:last-child{font-weight:900;color:#008f84}}
@media(max-width:680px){.mobile-nav{left:0;right:0;bottom:0;overflow:visible;padding:8px 6px calc(7px + env(safe-area-inset-bottom));border:0;border-radius:23px 23px 0 0;background:#fff;box-shadow:0 -7px 24px rgba(28,50,47,.11)}.mobile-nav button{position:relative;min-height:51px;gap:4px;border-radius:0;background:transparent!important;color:#929a98;font-size:8px;font-weight:700}.mobile-nav button .nav-icon{width:28px;height:26px;border-radius:0;background:transparent!important;color:inherit}.mobile-nav button .nav-icon svg{width:21px;height:21px;fill:currentColor;stroke:none}.mobile-nav button.active{color:#00a395}.mobile-nav button.active:before{content:"";position:absolute;top:-8px;width:31px;height:4px;border-radius:0 0 5px 5px;background:#00a395}.mobile-nav button.active>span:last-child{color:#00a395;font-weight:900}.mobile-nav button:nth-child(3){transform:translateY(-8px)}.mobile-nav button:nth-child(3):active{transform:translateY(-8px) scale(.94)}.mobile-nav button:nth-child(3) .nav-icon{width:44px;height:44px;border-radius:50%;background:linear-gradient(145deg,#f5bd35,#de8c09)!important;box-shadow:0 5px 12px rgba(210,135,12,.3);color:#fff}.mobile-nav button:nth-child(3) .nav-icon svg{width:24px;height:24px}.mobile-nav button:nth-child(3):before{display:none}.mobile-nav button:nth-child(3)>span:last-child{margin-top:-1px}.mobile-nav button:nth-child(3).active>span:last-child{color:#c77a00}}
.nav .nav-icon svg{fill:currentColor;stroke:none}
.quick-actions button>span.quick-action-icon{display:grid;width:42px;height:42px;flex:0 0 42px;place-items:center;border-radius:12px}.quick-actions .quick-action-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.quick-actions button>span.closing-icon{background:#CEF5F0;color:#087D77}.quick-actions button>span.visit-icon{background:#FFF0C2;color:#D99000}
@media(max-width:680px){.quick-actions button>span.quick-action-icon{width:38px;height:38px;flex-basis:38px}.quick-actions .quick-action-icon svg{width:20px;height:20px}}
@media(max-width:680px){.mobile-nav{left:0;right:0;bottom:0;min-height:70px;overflow:visible;align-items:center;padding:7px 8px calc(7px + env(safe-area-inset-bottom));border:0;border-radius:20px 20px 0 0;background:#fff;box-shadow:0 -4px 18px rgba(27,57,52,.10)}.mobile-nav button{position:relative;display:flex;min-width:0;min-height:54px;padding:3px 0;transform:none!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-radius:12px!important;background:transparent!important;color:#8d9895;font-size:9px;font-weight:700}.mobile-nav button:before{display:none!important}.mobile-nav button .nav-icon{display:grid;width:28px;height:26px;margin:0;transform:none;place-items:center;border-radius:0;background:transparent!important;color:inherit}.mobile-nav button .nav-icon svg{width:21px;height:21px;fill:currentColor;stroke:none}.mobile-nav button .nav-label{display:block;max-width:100%;overflow:hidden;color:inherit;font-size:9px;line-height:12px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.mobile-nav button.active,.mobile-nav button.active .nav-label{color:#009d91}.mobile-nav button:nth-child(3) .nav-icon{width:40px;height:40px;margin-top:-13px;margin-bottom:-1px;border:3px solid #fff;border-radius:50%;background:linear-gradient(145deg,#f7bd32,#e59109)!important;box-shadow:0 4px 10px rgba(210,135,12,.25);color:#fff}.mobile-nav button:nth-child(3) .nav-icon svg{width:21px;height:21px}.mobile-nav button:nth-child(3) .nav-label{color:#707b78}.mobile-nav button:nth-child(3).active .nav-label{color:#c47a00}.mobile-nav button:active{transform:scale(.96)!important}.mobile-nav button:nth-child(3):active{transform:scale(.96)!important}}
@media(max-width:680px){.mobile-nav{grid-template-columns:repeat(5,minmax(0,1fr));min-height:72px;padding:8px 8px calc(8px + env(safe-area-inset-bottom))}.mobile-nav button{min-height:54px;gap:5px;padding:3px 2px}.mobile-nav button .nav-icon{width:25px;height:25px}.mobile-nav button .nav-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.mobile-nav button .nav-label{font-size:9px;line-height:11px}.mobile-nav button.active{color:#087D77}.mobile-nav button:nth-child(3) .nav-icon{width:46px;height:46px;margin-top:-17px;margin-bottom:-4px;border:4px solid #fff;background:linear-gradient(145deg,#FFB72C,#E99A08)!important;box-shadow:0 6px 14px rgba(217,144,0,.28);color:#fff}.mobile-nav button:nth-child(3) .nav-icon svg{width:21px;height:21px;fill:none;stroke:#fff;stroke-width:2}.mobile-nav button:nth-child(3).active .nav-label{color:#D99000}}
.nav .nav-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rank-avatar{display:grid;width:38px;height:38px;flex:0 0 38px;overflow:hidden;place-items:center;border:2px solid #fff;border-radius:50%;background:linear-gradient(145deg,#087D77,#20aa9e);box-shadow:0 3px 10px rgba(8,125,119,.18);color:#fff;font-size:14px;font-weight:900}.rank-avatar img{display:block;width:100%;height:100%;object-fit:cover}.rank-avatar span{line-height:1}
#ranking .section-heading>div:first-child{padding:9px 13px;border-radius:14px;background:rgba(0,89,83,.72);box-shadow:0 5px 16px rgba(0,74,69,.12);backdrop-filter:blur(7px)}#ranking .section-heading .eyebrow{color:#cafff9}#ranking .section-heading h2{color:#fff;text-shadow:0 1px 4px rgba(0,46,43,.2)}
.visit-card{position:relative;min-height:180px}.visit-card .visit-image{height:180px;overflow:hidden}.visit-card>div:last-child{position:absolute;right:0;bottom:0;left:0;padding:48px 12px 12px;background:linear-gradient(180deg,transparent,rgba(7,31,28,.9));color:#fff}.visit-card>div:last-child strong{color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.35)}.visit-card>div:last-child small,.visit-card>div:last-child p{color:rgba(255,255,255,.88);text-shadow:0 1px 3px rgba(0,0,0,.35)}
.export-card{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(420px,1.2fr);align-items:end;gap:22px}.export-card h2{margin:0;font-size:18px}.export-card>div:first-child>p:last-child{margin:5px 0 0;color:var(--muted);font-size:12px}.export-form{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:10px}.export-form label{color:#455a56;font-size:11px;font-weight:800}.export-form input{min-height:44px;margin-top:5px}.export-form .button{min-height:44px;white-space:nowrap}.export-card>.message{grid-column:1/-1;margin:0}
@media(max-width:680px){.export-card{display:block}.export-form{grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.export-form .button{grid-column:1/-1;width:100%}.mobile-nav.supervisor-nav{grid-template-columns:repeat(4,minmax(0,1fr))}.mobile-nav.supervisor-nav button[data-route="visits"] .nav-icon{width:25px;height:25px;margin:0;border:0;border-radius:0;background:transparent!important;box-shadow:none;color:inherit}.mobile-nav.supervisor-nav button[data-route="visits"] .nav-icon svg{width:21px;height:21px;stroke:currentColor}.mobile-nav.supervisor-nav button[data-route="visits"].active .nav-label{color:#087D77}.mobile-nav.supervisor-nav button[data-route="ranking"] .nav-icon{width:46px;height:46px;margin-top:-17px;margin-bottom:-4px;border:4px solid #fff;border-radius:50%;background:linear-gradient(145deg,#FFB72C,#E99A08)!important;box-shadow:0 6px 14px rgba(217,144,0,.28);color:#fff}.mobile-nav.supervisor-nav button[data-route="ranking"] .nav-icon svg{width:21px;height:21px;stroke:#fff}.mobile-nav.supervisor-nav button[data-route="ranking"].active .nav-label{color:#D99000}}
.supervisor-mode #visits .form-card{display:none}.supervisor-mode #visits .content-grid{grid-template-columns:1fr}.supervisor-mode #visits .visit-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:900px){.supervisor-mode #visits .visit-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.supervisor-mode #visits .visit-gallery{grid-template-columns:1fr}}

/* iOS Safari memperbesar halaman saat kontrol form berukuran di bawah 16px. */
@media(max-width:680px){input,select,textarea{font-size:16px!important}}
.role-pending-notice{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:-10px 0 18px;padding:12px 15px;border:1px solid #f0cf78;border-radius:14px;background:#fff4cf;color:#725000;box-shadow:0 5px 16px rgba(122,86,0,.08)}.role-pending-notice[hidden]{display:none}.role-pending-notice strong{font-size:12px}.role-pending-notice span{font-size:11px}@media(max-width:680px){.role-pending-notice{align-items:flex-start;flex-direction:column;gap:2px;margin:-3px 0 15px}}
/* Period selector and dashboard identity */
.topbar-actions{display:flex;align-items:center;gap:12px}.month-filter{display:flex;align-items:center;gap:8px;color:#f5fffd;font-size:11px;font-weight:850;line-height:1;white-space:nowrap;text-shadow:0 1px 2px rgba(0,70,62,.35)}.month-filter input{width:145px;height:54px;margin:0;padding:0 12px;font-size:13px;font-weight:750;border:1px solid rgba(255,255,255,.65);border-radius:16px;background:rgba(255,255,255,.96)}.topbar-actions .profile{height:54px;padding:7px 10px;border-radius:16px}.topbar-actions .logout-button{height:38px;padding:0 12px}.hero-name{margin:5px 0 0;font-size:20px;letter-spacing:-.02em}
@media(max-width:680px){.topbar-actions{gap:6px;align-items:flex-start}.month-filter{display:block;font-size:9px}.month-filter input{width:126px;font-size:11px;padding:8px 6px}.hero-name{font-size:17px}}
.table-card small{display:block;color:var(--muted);font-size:10px}.status-pill{display:inline-flex;padding:5px 9px;border-radius:99px;background:var(--teal-soft);color:var(--teal);font-size:10px;font-weight:800}.status-pill.pending{background:#fff4cf;color:#8a6200}.muted-text{color:var(--muted)}

/* Header mobile: samakan tinggi kontrol periode dan kartu profil. */
@media(max-width:680px){
  .topbar-actions{align-items:center;gap:8px}
  .month-filter{display:flex;align-items:center;gap:7px;color:#f5fffd;font-size:11px;font-weight:850;line-height:1;white-space:nowrap;text-shadow:0 1px 2px rgba(0,70,62,.35)}
  .month-filter input{width:145px;height:46px;margin:0;padding:0 10px;font-size:13px!important;font-weight:750;border:1px solid rgba(255,255,255,.65);border-radius:14px;background:rgba(255,255,255,.96)}
  .profile{height:46px;padding:5px 8px;border-radius:14px}
  .profile .avatar{width:34px;height:34px}
  .logout-button{height:34px;padding:0 12px}
}

/* Pratinjau foto profil dan dokumentasi. */
.zoomable-photo{cursor:zoom-in}
.photo-lightbox[hidden]{display:none}
.photo-lightbox{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:20px}
.photo-lightbox-backdrop{position:absolute;inset:0;background:rgba(5,22,20,.82);backdrop-filter:blur(5px)}
.photo-lightbox-panel{position:relative;z-index:1;display:grid;max-width:min(94vw,900px);max-height:92vh;place-items:center}
.photo-lightbox-panel img{display:block;max-width:94vw;max-height:88vh;width:auto;height:auto;border-radius:16px;object-fit:contain;box-shadow:0 18px 60px rgba(0,0,0,.4)}
.photo-lightbox-close{position:absolute;z-index:2;top:-14px;right:-14px;width:38px;height:38px;border:1px solid rgba(255,255,255,.5);border-radius:50%;background:#fff;color:#174640;font-size:25px;line-height:1;box-shadow:0 5px 18px rgba(0,0,0,.25)}
.history-profile-photo img,.visit-image img,.avatar img{cursor:zoom-in}
@media(max-width:680px){
  .photo-lightbox{padding:14px}
  .photo-lightbox-panel img{max-width:calc(100vw - 28px);max-height:82vh;border-radius:12px}
  .photo-lightbox-close{top:-8px;right:-4px}
}

/* Filter per kolom pada tabel riwayat. */
.history-filter-row th{padding:7px 6px;background:#fff;border-bottom:1px solid var(--line)}
.history-filter{width:100%;min-width:72px;height:32px;margin:0;padding:5px 7px;border:1px solid #dbe6e3;border-radius:8px;background:#fbfcfc;color:var(--ink);font-size:11px;font-weight:600;text-transform:none;letter-spacing:0}
.history-filter:focus{border-color:var(--teal-2);box-shadow:0 0 0 2px #0d948818}
@media(max-width:680px){
  #history .table-wrap{width:100%;overflow-x:auto;overflow-y:hidden}
  #history .table-wrap table{table-layout:fixed;min-width:760px}
  #history .history-filter-row th{padding:7px 5px;overflow:hidden}
  #history .history-filter{display:block;width:100%;min-width:0;max-width:100%;height:38px;min-inline-size:0;margin:0;overflow:hidden;font-size:14px!important}
  #history .history-filter[type="date"]{-webkit-appearance:none;appearance:none}
}

/* Tata letak final untuk layar ponsel: Staff, Supervisor, dan Admin. */
@media(max-width:680px){
  .main{padding:16px 14px calc(96px + env(safe-area-inset-bottom))}
  .topbar{min-height:0;margin:-16px -14px 12px;padding:20px 14px 18px;flex-direction:column;align-items:stretch;gap:14px}
  .topbar>div:first-child{min-width:0}
  .topbar h1{font-size:26px;line-height:1.12;overflow-wrap:anywhere}
  .topbar>div>p:last-child{display:block;font-size:12px;line-height:1.4}
  .topbar-actions{width:100%;align-items:center;justify-content:space-between;gap:8px}
  .month-filter{display:flex;flex:1;align-items:center;gap:7px;font-size:11px!important}
  .month-filter input{width:auto;min-width:0;flex:1;height:44px;padding:0 9px;font-size:16px!important}
  .topbar-actions .profile{height:44px;flex:0 0 auto;padding:5px 7px;border-radius:14px}
  .topbar-actions .profile .avatar,.topbar-actions .profile>div{display:none}
  .topbar-actions .logout-button{height:32px;padding:0 11px;font-size:12px}
  .hero{min-height:0;padding:20px;flex-direction:column;align-items:stretch;gap:16px}
  .hero h2{font-size:36px;white-space:normal}
  .hero h2 small{font-size:14px}
  .hero p{max-width:none}
  .rank-card{width:100%;min-width:0;padding:13px 14px}
  .metrics{grid-template-columns:1fr;gap:10px;margin-top:10px}
  .metric{min-height:92px;padding:16px}
  .card{padding:18px;border-radius:20px}
  .section-heading{margin:22px 0 10px}
  .section-heading.split,.card-head{flex-wrap:wrap;gap:10px}
  .text-button{min-width:0}
  .table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .table-wrap table{min-width:620px}
  #history .table-wrap table{min-width:760px}
  .table-card{padding:14px}
  .mobile-nav:has(button:only-child){grid-template-columns:1fr}
  .mobile-nav:has(button:only-child) button{flex-direction:row;gap:8px}
  .mobile-nav.supervisor-nav{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:370px){
  .topbar-actions{gap:6px}
  .month-filter{gap:5px;font-size:10px!important}
  .month-filter input{max-width:132px;padding:0 6px}
  .topbar-actions .logout-button{padding:0 9px}
  .hero{padding:18px}
}

/* iOS Safari: font kontrol tetap >=16px, sementara proporsi visual diatur lewat spacing. */
@media(max-width:680px){
  input,select,textarea{font-size:16px!important;line-height:1.25;min-height:44px;padding:10px 12px}
  input::placeholder,textarea::placeholder{font-size:14px;color:#8a9995}
  .form-card>label,.form-grid label,.product-select-label>span,.export-form label{font-size:12px}
  .history-filter{font-size:16px!important;line-height:1.2;min-height:38px;padding:7px 8px}
  .month-filter input{font-size:16px!important;line-height:1.2;min-height:44px;padding:0 9px}
  #closingFields .tabungan-field{grid-column:auto!important;margin-bottom:2px}
  #closingFields .tabungan-field input{padding:11px 9px}
}

/* Cegah isi kartu performa saling menimpa pada viewport ponsel yang sempit. */
@media(max-width:680px){
  #dashboard .hero{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(118px,145px);
    align-items:stretch;
    gap:14px;
    overflow:hidden;
  }
  #dashboard .hero>div:first-child{
    width:100%;
    min-width:0;
  }
  #dashboard .hero:before{
    right:-85px;
    top:-48px;
    width:180px;
    height:120px;
    opacity:.16;
  }
  #dashboard .hero:after{
    right:-36px;
    top:-76px;
    width:135px;
    height:135px;
    border-width:24px;
    opacity:.7;
  }
  #dashboard .hero-name{
    max-width:calc(100% - 56px);
    overflow-wrap:anywhere;
  }
  #dashboard .hero h2{
    margin:8px 0 2px;
    font-size:clamp(28px,10vw,36px);
    line-height:1.08;
    white-space:normal;
  }
  #dashboard .hero p{
    margin-bottom:0;
    overflow-wrap:anywhere;
  }
  #dashboard .rank-card{
    position:relative;
    z-index:2;
    box-sizing:border-box;
    width:100%;
    min-width:0;
    text-align:center;
    align-self:center;
  }
  #dashboard .rank-card>span,
  #dashboard .rank-card>strong,
  #dashboard .rank-card>small{
    display:block;
    white-space:normal;
  }
  #dashboard .rank-card>small{white-space:nowrap}
  #dashboard .rank-card>small span{display:inline}
}

@media(max-width:380px){
  #dashboard .hero{grid-template-columns:minmax(0,1fr) 112px;gap:10px;padding:16px}
  #dashboard .hero-name{max-width:100%;font-size:16px}
  #dashboard .hero h2{font-size:30px}
  #dashboard .rank-card{padding:11px 7px}
  #dashboard .rank-card strong{font-size:22px}
  #dashboard .rank-card>small{font-size:10px}
}

/* Susunan hero di ponsel: ringkasan kiri, ranking di samping kanan. */
@media(max-width:680px){
  #dashboard .hero{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(118px,145px) !important;
    grid-template-rows:auto !important;
    flex-direction:row;
  }
  #dashboard .hero>div:first-child{
    grid-column:1 !important;
    grid-row:1 !important;
    align-self:center;
  }
  #dashboard .rank-card{
    grid-column:2 !important;
    grid-row:1 !important;
    width:auto !important;
    min-width:0 !important;
    margin:0 !important;
  }
  #dashboard .hero h2 small:after{content:none !important}
}
@media(max-width:380px){
  #dashboard .hero{grid-template-columns:minmax(0,1fr) 112px !important}
}

/* Jaga semua bagian dashboard tetap tepat selebar viewport ponsel. */
@media(max-width:680px){
  html,body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }
  .app-shell,.main,.page{
    width:100%;
    max-width:100%;
    min-width:0;
  }
  #dashboard,
  #dashboard .hero,
  #dashboard .quick-actions,
  #dashboard .performance-card,
  #dashboard .content-grid,
  #dashboard .content-grid>.card{
    width:100%;
    max-width:100%;
    min-width:0;
  }
  #dashboard .content-grid{
    grid-template-columns:minmax(0,1fr);
  }
  #dashboard .card-head{
    min-width:0;
  }
  #dashboard .card-head>h2,
  #dashboard .card-head>div{
    min-width:0;
  }
  #dashboard .text-button{
    flex:0 0 auto;
    max-width:48%;
  }
  #dashboard .staff-chart{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow:hidden;
  }
  #dashboard .staff-chart svg{
    display:block;
    max-width:100%;
    overflow:hidden;
  }
}
