/* ABSENSI SDIT RMK · UI Refresh 2026 / v3.5.133
   Layer visual yang sengaja terpisah dari CSS logika modul.
   Prinsip: kontras terukur, hirarki jelas, target sentuh nyaman, status tetap terbaca.
   Layout single-viewport dan foto 3:4 pada v3.5.132 tidak diubah. */
:root{
  --bg:#f5f8f8; --card:#ffffff; --text:#203633; --muted:#687b77;
  --line:#e1eae7; --primary:#307c7c; --primary-dark:#246969;
  --soft:#eaf4f3; --danger:#b42318; --warning:#9a6700;
  --success:#077555; --shadow:0 5px 22px rgba(29,65,59,.035);
  --ui-teal:#307c7c;--ui-teal-dark:#246969;--ui-ink:#203633;
  --ui-border:#e1eae7;--ui-gold:#d3ab66;--ui-radius:17px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-synthesis:none;
}
html{color-scheme:light;scroll-behavior:smooth}
body,.admin-body,.user-body{background:#f5f8f8;color:var(--text)}
a{color:var(--primary)}
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
[hidden]{display:none!important}
/* App chrome desktop */
.topbar,.admin-topbar{
  background:rgba(255,255,255,.97);color:var(--text);
  border-bottom:1px solid var(--line);box-shadow:none;backdrop-filter:blur(16px);
}
.topbar{height:70px;gap:22px}
.topbar .brand img{width:40px;height:40px;object-fit:contain}
.topbar .brand b{font-size:13px;letter-spacing:.025em;color:var(--text)}
.topbar .brand small{font-size:11px;letter-spacing:0;color:var(--muted)}
.desktop-nav a{font-weight:650;color:#647773;padding:10px 13px;border-radius:12px}
.desktop-nav a.active,.desktop-nav a:hover{background:#eaf4f3;color:#246969}
.user-chip{background:#f5f8f7;border:1px solid var(--line);border-radius:12px;padding:8px 10px}
.user-chip a{color:#9e4c43}
.admin-shell{margin-left:248px}
.admin-sidebar{
  width:248px;background:#fff;box-shadow:none;border-right:1px solid var(--line);
  padding-bottom:8px;
}
.admin-brand{height:78px;padding:13px 20px;border-color:var(--line);gap:12px}
.admin-brand img{width:41px;height:41px}
.admin-brand b{color:#276f70;font-size:16px;letter-spacing:.02em}
.admin-brand small{color:#71827e;font-weight:650;font-size:10px;letter-spacing:.05em}
.admin-section{color:#9aa9a5;letter-spacing:.095em;font-size:10px;padding:24px 20px 9px}
.admin-nav-item{
  min-height:43px;margin:2px 11px;padding:0 12px;gap:11px;border:0;border-radius:12px;
  color:#667874;font-size:12.5px;font-weight:500;transition:background .16s ease,color .16s ease;
}
.admin-nav-item b{font-weight:600;line-height:1.25}
.admin-nav-icon{width:20px;min-width:20px;height:20px;display:grid;place-items:center}
.admin-nav-icon svg{width:19px;height:19px}
.admin-nav-item:hover{border-left-color:transparent;background:#f2f7f6;color:#266e6e}
.admin-nav-item.active{border:0;background:#e9f4f2;color:#246e6b;font-weight:750}
.admin-nav-item.active::after{content:"";width:4px;height:19px;position:absolute;right:9px;border-radius:8px;background:var(--ui-teal)}
.admin-nav-item{position:relative}
.admin-spacer{min-height:10px}
.admin-nav-item[href*="logout"]{margin-top:4px}
.admin-topbar{height:70px;gap:12px;padding:0 clamp(17px,2vw,32px)}
.admin-topbar>div:nth-child(2){display:grid;gap:1px;min-width:0}
.admin-topbar>div:nth-child(2)>b{color:#243d39;font-size:16px;font-weight:750;line-height:1.3}
.admin-topbar>div:nth-child(2)>small{font-size:11px;color:#8a9a95;opacity:1}
.icon-button{background:#f4f8f7;border:1px solid var(--line);color:#376d67;border-radius:12px;width:40px;height:40px}
.icon-button:hover{background:#eaf4f3}
.admin-user{display:flex;align-items:center;justify-content:flex-end;gap:10px;text-align:left;max-width:300px;min-width:0}
.admin-user-avatar{display:grid;place-items:center;flex:0 0 37px;width:37px;height:37px;border-radius:50%;background:#e6f2ee;color:#236963;font-size:14px;font-weight:800}
.admin-user-copy{display:grid;gap:2px;min-width:0}
.admin-user-copy b{max-width:175px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:#344f4a}
.admin-user-copy small{font-size:10px;max-width:175px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);opacity:1}
.admin-main{padding:24px clamp(15px,2.1vw,32px) 80px;max-width:1700px;margin:0 auto}
.app-main{margin-top:25px}
/* Sections & overview */
.page-head,.admin-page-title{margin-bottom:20px;align-items:center;gap:16px}
.page-head h1,.admin-page-title h1,.detail-profile-head h1{color:#213b36;letter-spacing:-.035em;font-size:clamp(21px,2.3vw,28px);line-height:1.25;font-weight:780}
.page-head p,.admin-page-title p,.detail-profile-head p{color:var(--muted);font-size:12px;line-height:1.5}
.card,.admin-card,.leave-card,.data-center-card,.attendance-calendar-card{
  background:#fff;border:1px solid var(--line);border-radius:var(--ui-radius);
  box-shadow:0 4px 20px rgba(32,67,62,.035);
}
.card,.admin-card{padding:20px}
.admin-card{margin-top:16px}
.card h2,.admin-card h2,.leave-card h2,.card h3{color:#24413b;font-weight:750;letter-spacing:-.016em}
.admin-card h2{font-size:15px}
.card-head{display:flex;align-items:center;gap:12px;margin-bottom:15px}
.card-head small,.card-head p{color:var(--muted);line-height:1.5}
.admin-two-col{gap:15px}
.grid{gap:16px}
.badge{border:1px solid #d5e9e3;background:#eff8f4;color:#287362;font-size:11px;font-weight:740;padding:6px 10px}
/* Statistics: no full-bleed rainbow background, color signals confined to icon + accent */
.admin-stat-grid{gap:13px}
.admin-stat-card,.admin-stat-card.cyan,.admin-stat-card.orange,.admin-stat-card.red,.admin-stat-card.green{
  min-height:112px;border-radius:16px;padding:17px 17px 16px;background:#fff;color:var(--text);
  border:1px solid var(--line);box-shadow:0 4px 20px rgba(32,67,62,.035);
}
.admin-stat-card::before{content:"";position:absolute;left:0;top:0;width:100%;height:3px;background:#307c7c;opacity:.9}
.admin-stat-card.orange::before{background:#d3ab66}
.admin-stat-card.red::before{background:#d38073}
.admin-stat-card.green::before{background:#62a88e}
.admin-stat-card strong{color:#243e39;font-size:clamp(25px,2.7vw,31px);letter-spacing:-.055em}
.admin-stat-card b{color:#6a7a76;font-size:11.5px;font-weight:650;margin-top:12px}
.admin-stat-card .big-icon{font-size:42px;opacity:.18;color:#438b86}
.admin-stat-card.orange .big-icon{color:#c99646}
.admin-stat-card.red .big-icon{color:#b66e65}
.admin-stat-card.green .big-icon{color:#398b67}
.stat-icon{background:#eaf4f3;color:#307c7c;border-radius:13px}
/* Charts / tables / sticky results */
.attendance-chart{border-color:var(--line);background:repeating-linear-gradient(to top,#fff 0,#fff 43px,#f0f5f3 44px)}
.chart-bar{background:#4b9390;border-radius:6px 6px 0 0}
.table-wrap,.detail-table-wrap,.attendance-matrix-wrap{border:1px solid var(--line);border-radius:13px;background:#fff}
.table,.compact-table{background:#fff}
.table th,.compact-table th{background:#f7faf9;color:#667a75;font-size:10.5px;font-weight:750;letter-spacing:.04em;border-bottom:1px solid var(--line)}
.table td,.compact-table td{color:#37514b;border-bottom:1px solid #edf2f0;line-height:1.4}
.table tbody tr:hover td,.compact-table tbody tr:hover td{background:#f9fcfb}
.attendance-matrix thead th{background:#f3f8f6;color:#456a63}
.attendance-matrix thead .sticky-no,.attendance-matrix thead .sticky-name{background:#327b79;color:#fff}
.attendance-matrix th,.attendance-matrix td{border-color:#e3eae8}
.status,.status-ok,.status-warn,.status-danger,.status-info,.status-muted{
  border-radius:999px;font-size:11px;font-weight:700;padding:5px 9px;
}
.status-ok{background:#e9f7f0;color:#08724b}
.status-warn{background:#fff5df;color:#8c6000}
.status-danger{background:#fff0ed;color:#a12d23}
.status-info{background:#eaf3fa;color:#2a648c}
.status-muted{background:#eef2f1;color:#657670}
/* Controls */
.btn{border-radius:11px;min-height:40px;padding:10px 15px;font-size:12.5px;font-weight:740;letter-spacing:0;box-shadow:none;transition:background .15s,border-color .15s,box-shadow .15s}
.btn:hover{transform:none}
.btn-primary{background:var(--primary);color:#fff;border:1px solid var(--primary)}
.btn-primary:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
.btn-soft{background:#eaf5f2;color:#256e68;border:1px solid #e1f0eb}
.btn-soft:hover{background:#dceee9}
.btn-light{background:#fff;color:#33544d;border:1px solid #dbe7e3}
.btn-light:hover{background:#f7faf9}
.btn-danger{background:#fef1ee;color:#ad3a2b;border:1px solid #f8e1da}
.btn-xs{min-height:34px;padding:7px 11px;font-size:11.5px}
.btn:disabled{cursor:not-allowed;opacity:.55}
input:not([type=checkbox]):not([type=radio]),select,textarea{
  border-color:#d9e5e1;background:#fff;border-radius:11px;color:#2b4942;
  box-shadow:0 1px 2px rgba(19,52,46,.02);
}
input:not([type=checkbox]):not([type=radio]):focus,select:focus,textarea:focus{
  border-color:#56a39a;box-shadow:0 0 0 3px rgba(48,124,124,.11);outline:none;
}
input::placeholder,textarea::placeholder{color:#a1b0ab}
label{color:#566b65;font-size:12px;font-weight:650}
input[type=checkbox],input[type=radio]{accent-color:var(--primary)}
select{cursor:pointer}
.filter-bar,.report-toolbar,.detail-filter{gap:12px}
.alert{border-radius:13px;border:1px solid;padding:12px 14px;font-size:12px;line-height:1.55}
.alert-success{background:#ebf8f1;border-color:#cceada;color:#08724b}
.alert-warning{background:#fff9ea;border-color:#f1e3b9;color:#8c6000}
.alert-danger{background:#fff0ee;border-color:#f3d8d1;color:#ac3328}
.alert-info{background:#edf6fb;border-color:#d4e8f3;color:#285e80}
.site-card,.work-group-card,.habit-setting-card,.backup-option,.admin-control-card,.diagnostic-card{border-color:var(--line);border-radius:15px;box-shadow:none}
.site-card:hover,.work-group-card:hover{border-color:#bddbd5}
/* Dense data and teacher-facing modules */
.data-center-subnav-row{gap:12px}
.data-center-subnav{background:#fff;border:1px solid var(--line);padding:5px;border-radius:13px;box-shadow:none}
.data-center-subnav a{border-radius:9px;color:#607873}
.data-center-subnav a.active{background:#eaf4f3;color:#246969}
.daily-habit-cta,.daily-habit-cta-side,.official-duty-cta,.official-duty-active{
  border-radius:13px;box-shadow:none;
}
.morning-smile-card{background:#f8fbfa;border:1px solid #dfeae6;box-shadow:none;border-radius:13px}
.morning-smile-card.is-detected{background:#edf8f3;border-color:#cbe9d9}
.morning-smile-emoji{background:#fff6df;border-radius:11px}
.location-box{background:#f7faf9;border:1px solid #ddeae5;border-radius:13px}
.photo-zone{background:#f9fbfa;border-color:#e1eae7;border-radius:15px}
.photo-zone .camera-final-stage{border-color:#d8e5df;box-shadow:0 4px 14px rgba(24,59,51,.04)}
.attendance-schedule-card{border-radius:13px;border-color:#e3ebe8;background:#fff}
.attendance-submit{background:#307c7c;border-color:#307c7c;color:#fff;font-weight:800}
.attendance-submit:hover{background:#246969}
/* Dialogs and overlays. Preserve dialog behavior and native form submission. */
.responsive-form-dialog,.app-dialog{border:0}
.responsive-form-dialog-shell,.dialog-card,.gtk-management-card,.meeting-invitation-card,.mutabaah-checkout-card,.permission-alert-card,.announcement-popup-card{
  background:#fff;border-radius:19px;border:1px solid var(--line);box-shadow:0 20px 65px rgba(20,54,48,.15);
}
.responsive-form-dialog-head{background:#fff;border-bottom:1px solid var(--line)}
.responsive-form-dialog-head h2{color:#22423b;font-size:17px;letter-spacing:-.02em}
.responsive-form-dialog-close,.meeting-invitation-close,.gtk-management-close,.announcement-popup-close{border-radius:10px}
.responsive-form-launcher{border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:none}
.responsive-form-launcher small{color:var(--muted)}
.notification-panel{border:1px solid var(--line);border-radius:17px;box-shadow:0 15px 50px rgba(20,54,48,.14)}
.notification-bell{border-color:var(--line);color:#48746f}
.notification-item{border-color:#ecf2f0;border-radius:12px}
/* Login visual; only form and shell, no behavioral changes */
.login-page{background:#f5f8f8;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)}
.login-side{background:linear-gradient(145deg,#266e70,#387f7e);color:#fff;position:relative;overflow:hidden;padding:clamp(32px,5vw,70px)}
.login-side::before{content:"";position:absolute;width:290px;height:290px;border-radius:50%;border:50px solid rgba(211,171,102,.09);bottom:-170px;right:-110px}
.login-side h1{font-size:clamp(30px,3.5vw,50px);line-height:1.15;letter-spacing:-.05em;max-width:420px}
.login-side img{border-radius:18px;background:#fff;padding:8px;width:69px;height:69px}
.login-side p{font-size:14px;line-height:1.75;color:#dfefed;max-width:450px}
.login-form-wrap{padding:clamp(22px,5vw,60px)}
.login-form{background:#fff;border:1px solid var(--line);box-shadow:0 15px 60px rgba(31,75,66,.055);border-radius:23px;padding:clamp(23px,3.5vw,39px);width:min(460px,100%)}
.login-form h2{color:#1f3b35;font-size:clamp(23px,3vw,29px);letter-spacing:-.04em}
.login-form>p{font-size:12.5px}
.login-form .btn{min-height:48px;font-size:14px}
.login-mobile-brand{display:none}
/* Mobile-first adjustments, preserve bottom navigation from v3.5.132 */
@media(max-width:980px){
  .admin-shell{margin-left:0}
  .admin-topbar{height:62px;padding:0 14px}
  .admin-main{padding:17px 12px calc(94px + env(safe-area-inset-bottom,0px))}
  .admin-sidebar{width:100%}
  .admin-body .admin-sidebar{border-radius:21px 21px 0 0;max-height:min(78dvh,650px)}
  .admin-body .admin-brand{height:64px}
  .admin-body .admin-nav-item{margin:3px 12px;min-height:48px}
  .admin-body .mobile-sheet-close{border-radius:11px}
  .topbar{height:62px;padding:0 14px}
  .mobile-nav{background:#fff;border-top:1px solid var(--line);box-shadow:0 -7px 27px rgba(17,56,47,.075);border-radius:15px 15px 0 0}
  .mobile-nav .mobile-nav-link{color:#84918d}
  .mobile-nav .mobile-nav-link.active,.mobile-nav .mobile-nav-more[aria-expanded=true]{color:var(--primary)}
  .mobile-nav .mobile-nav-link.active .mobile-nav-icon,.mobile-nav .mobile-nav-more[aria-expanded=true] .mobile-nav-icon{background:#e7f3f0;color:#277774;border-radius:10px}
  .mobile-nav .mobile-nav-label{font-weight:650}
  .page-head,.admin-page-title{gap:10px;margin-bottom:14px}
  .page-head h1,.admin-page-title h1{font-size:22px}
  .admin-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .admin-stat-card,.admin-stat-card.cyan,.admin-stat-card.orange,.admin-stat-card.red,.admin-stat-card.green{min-height:96px;padding:13px}
  .admin-stat-card strong{font-size:25px}
  .admin-stat-card b{font-size:11px;margin-top:10px}
  .admin-stat-card .big-icon{font-size:36px}
  .card,.admin-card{padding:15px}
  .admin-two-col,.leave-layout{gap:13px}
  .app-main{margin-top:17px}
  .login-page{grid-template-columns:1fr;min-height:100dvh}
  .login-side{display:none}
  .login-form-wrap{min-height:100dvh;display:grid;place-items:center;padding:24px 16px}
  .login-mobile-brand{display:flex;gap:11px;align-items:center;margin-bottom:22px}
  .login-mobile-brand img{width:43px;height:43px;object-fit:contain}
  .login-mobile-brand span{display:grid;gap:2px}
  .login-mobile-brand b{font-size:15px;color:#276f70;letter-spacing:.02em}
  .login-mobile-brand small{font-size:10px;color:#7a8c86;font-weight:700}
  .login-form{padding:23px 20px;border-radius:18px}
}
@media(max-width:580px){
  .admin-user{display:none}
  .admin-topbar>div:nth-child(2)>b{font-size:14px}
  .admin-topbar>div:nth-child(2)>small{font-size:10px}
  .admin-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .card,.admin-card{border-radius:15px}
  .table-wrap{border-radius:11px}
  .admin-page-title,.page-head{align-items:flex-start}
  .btn{min-height:41px}
  .login-form{border-radius:16px}
}
/* Single viewport has strict geometry; only colors/typography may change. */
.attendance-viewport .topbar{height:64px}
.attendance-viewport .admin-topbar{height:60px;flex-basis:60px}
.attendance-viewport .attendance-page-head h1{font-size:clamp(18px,2vw,23px)}
.attendance-viewport .attendance-panel{border-color:var(--line);box-shadow:none}
.attendance-viewport .photo-zone{background:#f7faf9}
.attendance-viewport .camera-final-stage{aspect-ratio:3 / 4!important}
.attendance-viewport .attendance-submit{margin:0}
@media(max-width:980px){
  .attendance-viewport .app-main{height:calc(100dvh - 64px - 64px - env(safe-area-inset-bottom,0px));margin-top:0}
  .attendance-viewport .admin-main{padding-bottom:calc(70px + env(safe-area-inset-bottom,0px))}
  .attendance-viewport .attendance-panel{padding:clamp(6px,.9vh,10px)}
  .attendance-viewport .attendance-submit{min-height:clamp(42px,5.7vh,54px)}
  .attendance-viewport .daily-habit-cta-side,.attendance-viewport .attendance-schedule-card{box-shadow:none}
}
@media(max-width:980px) and (orientation:landscape) and (max-height:600px){
  .attendance-viewport .app-main{height:calc(100dvh - 60px - 64px - env(safe-area-inset-bottom,0px))}
  .attendance-viewport .topbar{height:60px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important}}
@media print{
  body,.admin-body,.user-body{background:#fff!important}
  .topbar,.admin-topbar,.admin-sidebar,.mobile-nav,.notification-center,.sidebar-backdrop{display:none!important}
  .admin-shell{margin:0}
  .admin-main,.app-main{max-width:none;width:100%;padding:0!important;margin:0!important}
  .card,.admin-card{box-shadow:none;break-inside:avoid}
}
