/* =========================================================
   App Ceklok - Stylesheet Utama
   Palet   : Navy #16345A, Biru #1F6FB2, Amber #F5A623, Teal #2EC4B6
   Font    : Poppins (display/heading), Inter (body)
========================================================= */

:root{
  --navy:        #16345A;
  --navy-dark:   #0E2440;
  --blue:        #1F6FB2;
  --blue-light:  #4FA6E8;
  --teal:        #2EC4B6;
  --amber:       #F5A623;
  --amber-dark:  #D98A0B;
  --red:         #E5484D;
  --green:       #2FB170;
  --bg:          #F1F5F9;
  --card:        #FFFFFF;
  --text:        #1B2430;
  --text-mute:   #6B7686;
  --border:      #E4E9F0;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 10px 30px rgba(22,52,90,0.08);
  --shadow-sm:   0 4px 12px rgba(22,52,90,0.06);
}

*{box-sizing:border-box; margin:0; padding:0;}
html,body{height:100%;}
body{
  font-family:'Inter', system-ui, -apple-system, sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,h5,.brand{font-family:'Poppins', sans-serif;}
a{text-decoration:none; color:inherit;}
ul{list-style:none;}
img{max-width:100%; display:block;}
button{font-family:inherit; cursor:pointer;}

/* ---------- scrollbar ---------- */
::-webkit-scrollbar{width:8px; height:8px;}
::-webkit-scrollbar-thumb{background:#c9d3e0; border-radius:10px;}

/* =========================================================
   LOGIN PAGE
========================================================= */
.login-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 55%, #091A2E 100%);
  padding:24px;
  position:relative;
  overflow:hidden;
}
.login-wrap::before,.login-wrap::after{
  content:"";
  position:absolute;
  border-radius:50%;
  filter:blur(0px);
}
.login-wrap::before{
  width:520px;height:520px;
  background:radial-gradient(circle, rgba(46,196,182,0.25), transparent 70%);
  top:-160px; left:-140px;
}
.login-wrap::after{
  width:460px;height:460px;
  background:radial-gradient(circle, rgba(245,166,35,0.18), transparent 70%);
  bottom:-140px; right:-120px;
}
.login-card{
  position:relative;
  z-index:2;
  width:100%;
  max-width:940px;
  display:grid;
  grid-template-columns:1.05fr 1fr;
  background:var(--card);
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 30px 60px rgba(0,0,0,0.35);
}
.login-visual{
  background:linear-gradient(150deg, var(--blue) 0%, var(--navy) 100%);
  padding:48px 40px;
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  position:relative;
}
.login-visual .clock-badge{
  width:78px;height:78px;
  border-radius:22px;
  background:rgba(255,255,255,0.12);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:28px;
}
.login-visual h1{
  font-size:28px;
  line-height:1.3;
  font-weight:700;
  margin-bottom:12px;
}
.login-visual p{
  font-size:14px;
  opacity:0.85;
  line-height:1.6;
  max-width:320px;
}
.login-illustration{
  margin-top:20px;
}
.pill-stat{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,0.12);
  border-radius:999px;
  padding:8px 14px;
  font-size:12px;
  margin-top:6px;
  width:fit-content;
}
.pill-stat b{color:var(--amber);}

.login-form-side{
  padding:48px 42px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.login-form-side .brand{
  font-weight:700;
  font-size:20px;
  color:var(--navy);
  margin-bottom:4px;
  display:flex;
  align-items:center;
  gap:8px;
}
.login-form-side .brand span{color:var(--amber);}
.login-sub{
  color:var(--text-mute);
  font-size:13.5px;
  margin-bottom:26px;
}

.role-switch{
  display:grid;
  grid-template-columns:1fr 1fr;
  background:#EEF2F7;
  border-radius:12px;
  padding:5px;
  margin-bottom:24px;
}
.role-switch input{display:none;}
.role-switch label{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 8px;
  border-radius:9px;
  font-size:13.5px;
  font-weight:600;
  color:var(--text-mute);
  transition:.2s;
}
.role-switch input:checked + label{
  background:var(--card);
  color:var(--navy);
  box-shadow:var(--shadow-sm);
}
.role-switch input#role-admin:checked ~ label[for="role-admin"]{color:var(--blue);}
.role-switch input#role-guru:checked ~ label[for="role-guru"]{color:var(--teal);}

.field{margin-bottom:16px;}
.field label{
  display:block;
  font-size:12.5px;
  font-weight:600;
  color:var(--navy);
  margin-bottom:6px;
}
.input-wrap{
  display:flex;
  align-items:center;
  border:1.5px solid var(--border);
  border-radius:11px;
  padding:0 14px;
  background:#FBFCFE;
  transition:.15s;
}
.input-wrap:focus-within{border-color:var(--blue); box-shadow:0 0 0 3px rgba(31,111,178,0.12);}
.input-wrap svg{flex-shrink:0; color:var(--text-mute);}
.input-wrap input{
  border:none;
  outline:none;
  background:transparent;
  padding:12px 10px;
  width:100%;
  font-size:14px;
  color:var(--text);
}
.toggle-eye{color:var(--text-mute); background:none; border:none; padding:6px;}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:none;
  border-radius:11px;
  font-weight:600;
  font-size:14px;
  padding:12px 18px;
  transition:.15s;
}
.btn-block{width:100%;}
.btn-primary{background:var(--navy); color:#fff;}
.btn-primary:hover{background:var(--navy-dark);}
.btn-amber{background:var(--amber); color:#2A1B02;}
.btn-amber:hover{background:var(--amber-dark);}
.btn-teal{background:var(--teal); color:#04352F;}
.btn-outline{background:transparent; border:1.5px solid var(--border); color:var(--text);}
.btn-outline:hover{border-color:var(--blue); color:var(--blue);}
.btn-danger{background:#FDECEC; color:var(--red);}
.btn-danger:hover{background:var(--red); color:#fff;}
.btn-sm{padding:8px 12px; font-size:12.5px; border-radius:8px;}
.btn-icon{width:38px; height:38px; padding:0; border-radius:10px;}

.login-note{
  text-align:center;
  font-size:12px;
  color:var(--text-mute);
  margin-top:18px;
}
.alert{
  padding:11px 14px;
  border-radius:10px;
  font-size:13px;
  margin-bottom:16px;
  display:flex;
  align-items:center;
  gap:8px;
}
.alert-error{background:#FDECEC; color:#B3261E;}
.alert-success{background:#E7F8EF; color:#1D8A54;}
.alert-info{background:#EAF3FC; color:var(--blue);}

/* =========================================================
   APP LAYOUT (Dashboard)
========================================================= */
.app{
  display:flex;
  min-height:100vh;
}
.sidebar{
  width:264px;
  background:linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color:#fff;
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100vh;
  transition:.2s;
  z-index:50;
}
.sidebar .side-brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:22px 22px 18px;
  font-weight:700;
  font-size:17px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}
.sidebar .side-brand .badge-mark{
  width:38px;height:38px;
  border-radius:11px;
  background:rgba(255,255,255,0.12);
  display:flex;align-items:center;justify-content:center;
  color:var(--amber);
  flex-shrink:0;
}
.side-user{
  display:flex;
  align-items:center;
  gap:10px;
  padding:16px 20px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}
.side-user img,.side-user .avatar-fallback{
  width:42px;height:42px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid rgba(255,255,255,0.25);
}
.avatar-fallback{
  display:flex;align-items:center;justify-content:center;
  background:var(--teal);
  color:#04352F;
  font-weight:700;
  font-size:14px;
}
.side-user .u-name{font-size:13.5px; font-weight:600;}
.side-user .u-role{font-size:11px; color:#9FB3CC;}

.side-nav{
  padding:14px 12px;
  flex:1;
  overflow-y:auto;
}
.side-nav .nav-label{
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#7C93B3;
  padding:14px 12px 6px;
}
.side-nav a{
  display:flex;
  align-items:center;
  gap:12px;
  padding:11px 14px;
  border-radius:10px;
  font-size:13.5px;
  font-weight:500;
  color:#CBD9EA;
  margin-bottom:3px;
  transition:.15s;
}
.side-nav a svg{flex-shrink:0; opacity:.9;}
.side-nav a:hover{background:rgba(255,255,255,0.06); color:#fff;}
.side-nav a.active{
  background:rgba(245,166,35,0.14);
  color:var(--amber);
  font-weight:600;
}
.side-nav a.active svg{color:var(--amber);}
.side-foot{padding:14px 12px; border-top:1px solid rgba(255,255,255,0.08);}
.side-foot a{color:#FDCDCD;}
.side-foot a:hover{background:rgba(229,72,77,0.14); color:#ff8a8a;}

.main{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
}
.topbar{
  height:70px;
  background:var(--card);
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 26px;
  position:sticky;
  top:0;
  z-index:40;
}
.topbar .page-title{font-size:17px; font-weight:700; color:var(--navy);}
.topbar .page-sub{font-size:12px; color:var(--text-mute);}
.burger{display:none; background:none; border:none; color:var(--navy);}
.topbar-right{display:flex; align-items:center; gap:14px;}
.clock-live{
  font-size:13px; font-weight:600; color:var(--navy);
  background:#EEF2F7; padding:8px 14px; border-radius:10px;
}

.content{padding:26px; flex:1;}

/* ---------- Cards / grid stats ---------- */
.stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
  gap:18px;
  margin-bottom:22px;
}
.stat-card{
  background:var(--card);
  border-radius:var(--radius);
  padding:20px;
  box-shadow:var(--shadow-sm);
  display:flex;
  align-items:center;
  gap:14px;
  border:1px solid var(--border);
}
.stat-card .icon{
  width:48px;height:48px;
  border-radius:13px;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.stat-card .icon.blue{background:#E9F2FB; color:var(--blue);}
.stat-card .icon.amber{background:#FDF1DD; color:var(--amber-dark);}
.stat-card .icon.teal{background:#E4F9F6; color:#0F8F82;}
.stat-card .icon.navy{background:#E7ECF3; color:var(--navy);}
.stat-card .num{font-size:22px; font-weight:700; color:var(--navy);}
.stat-card .label{font-size:12px; color:var(--text-mute);}

.card{
  background:var(--card);
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
  padding:22px;
  margin-bottom:22px;
}
.card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
  gap:10px;
  flex-wrap:wrap;
}
.card-head h3{font-size:15.5px; color:var(--navy); font-weight:700;}
.card-head p{font-size:12px; color:var(--text-mute); margin-top:2px;}

/* ---------- Table ---------- */
.table-wrap{overflow-x:auto;}
table{width:100%; border-collapse:collapse; font-size:13.5px;}
thead th{
  text-align:left;
  font-size:11.5px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--text-mute);
  padding:10px 14px;
  border-bottom:1.5px solid var(--border);
  white-space:nowrap;
}
tbody td{
  padding:13px 14px;
  border-bottom:1px solid var(--border);
  color:var(--text);
  vertical-align:middle;
}
tbody tr:hover{background:#F8FAFD;}
.td-guru{display:flex; align-items:center; gap:10px;}
.td-guru img,.td-guru .avatar-fallback{width:36px;height:36px;border-radius:50%;object-fit:cover;font-size:12px;}

.badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:4px 10px;
  border-radius:999px;
  font-size:11.5px;
  font-weight:600;
}
.badge-green{background:#E7F8EF; color:#1D8A54;}
.badge-amber{background:#FDF1DD; color:var(--amber-dark);}
.badge-red{background:#FDECEC; color:var(--red);}
.badge-blue{background:#E9F2FB; color:var(--blue);}
.badge-gray{background:#EEF1F5; color:var(--text-mute);}

.action-group{display:flex; gap:6px;}

/* ---------- Forms ---------- */
.form-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:16px;}
.form-grid .full{grid-column:1/-1;}
.form-group{margin-bottom:16px;}
.form-group label{display:block; font-size:12.5px; font-weight:600; color:var(--navy); margin-bottom:6px;}
.form-control{
  width:100%;
  border:1.5px solid var(--border);
  border-radius:10px;
  padding:11px 13px;
  font-size:13.5px;
  background:#FBFCFE;
  outline:none;
  transition:.15s;
  font-family:inherit;
  color:var(--text);
}
.form-control:focus{border-color:var(--blue); box-shadow:0 0 0 3px rgba(31,111,178,0.12);}
select.form-control{appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7686' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center;}
.form-hint{font-size:11.5px; color:var(--text-mute); margin-top:5px;}
.upload-box{
  border:1.5px dashed var(--border);
  border-radius:12px;
  padding:16px;
  display:flex;
  align-items:center;
  gap:14px;
  background:#FBFCFE;
}
.upload-box .preview{
  width:64px;height:64px;border-radius:50%;object-fit:cover;background:#EEF2F7;flex-shrink:0;
}

/* ---------- Radio / checkbox card (jadwal hari, dsb) ---------- */
.chip-group{display:flex; gap:8px; flex-wrap:wrap;}
.chip-group input{display:none;}
.chip-group label{
  padding:8px 14px;
  border-radius:999px;
  border:1.5px solid var(--border);
  font-size:12.5px;
  font-weight:600;
  color:var(--text-mute);
  cursor:pointer;
}
.chip-group input:checked + label{background:var(--navy); color:#fff; border-color:var(--navy);}

/* ---------- Modal ---------- */
.modal-overlay{
  position:fixed; inset:0; background:rgba(14,24,40,0.55);
  display:none; align-items:center; justify-content:center; z-index:200; padding:20px;
}
.modal-overlay.show{display:flex;}
.modal-box{
  background:#fff; border-radius:16px; padding:24px; max-width:460px; width:100%;
  box-shadow:0 30px 60px rgba(0,0,0,0.3);
}
.modal-box h3{color:var(--navy); margin-bottom:10px; font-size:16px;}
.modal-box p{font-size:13.5px; color:var(--text-mute); margin-bottom:18px; line-height:1.5;}
.modal-actions{display:flex; gap:10px; justify-content:flex-end;}

/* ---------- Ceklok page ---------- */
.ceklok-hero{
  background:linear-gradient(140deg, var(--navy), var(--blue));
  border-radius:20px;
  padding:34px;
  color:#fff;
  text-align:center;
  position:relative;
  overflow:hidden;
}
.ceklok-hero .time-now{font-size:46px; font-weight:700; font-family:'Poppins',sans-serif; letter-spacing:.02em;}
.ceklok-hero .date-now{font-size:13.5px; opacity:.85; margin-top:4px;}
.ceklok-hero .loc-status{
  display:inline-flex; align-items:center; gap:8px;
  background:rgba(255,255,255,0.14); border-radius:999px;
  padding:8px 16px; font-size:12.5px; margin-top:18px;
}
.ceklok-buttons{display:flex; gap:14px; justify-content:center; margin-top:22px; flex-wrap:wrap;}
.ceklok-buttons .btn{padding:14px 28px; font-size:14px; min-width:160px;}

.jadwal-item{
  display:flex; align-items:center; gap:14px;
  padding:14px; border-radius:12px; border:1px solid var(--border);
  margin-bottom:10px;
}
.jadwal-item .jam-box{
  width:56px; height:56px; border-radius:12px; background:#EEF2F7;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  color:var(--navy); font-weight:700; font-size:12px; flex-shrink:0; text-align:center;
}
.jadwal-item .info b{font-size:13.5px; color:var(--text);}
.jadwal-item .info span{font-size:12px; color:var(--text-mute);}

.empty-state{
  text-align:center; padding:40px 20px; color:var(--text-mute);
}
.empty-state svg{margin-bottom:12px; opacity:.5;}
.empty-state p{font-size:13.5px;}

.profile-head{display:flex; align-items:center; gap:18px; margin-bottom:6px;}
.profile-head img,.profile-head .avatar-fallback{width:78px;height:78px;border-radius:50%;object-fit:cover;font-size:24px;}
.profile-head h3{color:var(--navy); font-size:16px;}
.profile-head p{color:var(--text-mute); font-size:12.5px;}

.filter-bar{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px;}
.filter-bar .form-control{max-width:200px;}

.slip-row{display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid var(--border);}
.slip-row:last-child{border-bottom:none;}
.slip-total{
  display:flex; justify-content:space-between; align-items:center;
  background:#F8FAFD; border-radius:12px; padding:16px 18px; margin-top:10px;
}
.slip-total .amt{font-size:20px; font-weight:700; color:var(--navy);}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .login-card{grid-template-columns:1fr;}
  .login-visual{display:none;}
}
@media (max-width: 860px){
  .form-grid{grid-template-columns:1fr;}
  .sidebar{position:fixed; left:-264px; box-shadow:0 0 40px rgba(0,0,0,0.3);}
  .sidebar.open{left:0;}
  .burger{display:flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:10px; background:#EEF2F7;}
  .stat-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));}
}
@media (max-width: 520px){
  .content{padding:16px;}
  .topbar{padding:0 16px;}
  .ceklok-hero .time-now{font-size:34px;}
  .ceklok-buttons .btn{width:100%;}
}
