body{
    margin:0;
    padding:0;
    color:white;
    background-color:#17020a;
    background-image:
      linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
      radial-gradient(circle at top left, #0f172a 0%, #020617 65%);
    background-size:40px 40px, 40px 40px, 100% 100%;
    background-attachment:fixed;
}

.container {
  padding: 20px;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  margin: 0;
  font-size: 22px;
  color: #bfa15a;
}

.header p {
  margin: 5px 0 0;
  color: #ffffff;
  font-weight: 600;
}



/* BUTTON */
.btn{
    padding:10px 18px;
    border:none;
    border-radius:12px;
    cursor:pointer;
    font-weight:600;
    font-size:12px;
    transition:all 0.3s ease;
    letter-spacing:.3px;
    color: #fff;
    background:linear-gradient(135deg,#a77e06,#a77e06);
}

/* PRIMARY */
.btn.primary{
    background:linear-gradient(135deg,#f30303,#f30303);
    color:#fff;
    box-shadow:0 0 15px rgba(34,197,94,.35);
}

.btn.primary:hover{
    transform:translateY(-2px);
    box-shadow:0 0 25px rgba(34,197,94,.55);
}

/* DANGER */
.btn.danger{
    background:linear-gradient(135deg,#a77e06,#a77e06);
    color:#fff;
    box-shadow:0 0 15px rgba(239,68,68,.35);
}

.btn.danger:hover{
    transform:translateY(-2px);
    box-shadow:0 0 25px rgba(239,68,68,.55);
}

/* LIGHT */
.btn.light{
    background:rgba(255,255,255,0.08);
    color:#fff;
    border:1px solid rgba(255,255,255,0.08);
    backdrop-filter:blur(10px);
}

.btn.light:hover{
    background:rgba(255,255,255,0.14);
    transform:translateY(-2px);
}

/* CARDS */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 25px 0;
}

.card{
    padding:20px;
    border-radius:18px;
    cursor: pointer;

    background: linear-gradient(135deg,
        rgba(20,25,60,0.95),
        rgba(35,45,120,0.88),
        rgba(15,20,45,0.95)
    );

    border:1px solid rgba(255,255,255,0.08);

    box-shadow:
        0 10px 30px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 0 15px rgba(0,120,255,0.10);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition: all 0.3s ease;
    overflow:hidden;
    position:relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2),
  0 0 20px rgba(0,149,255,0.18);
}

.card h4 {
  color:#bfa15a;
  margin-bottom: 14px;
  font-weight: 600;
  opacity: 0.9;
}
.card h2 {
  margin: 10px 0;
  font-size: 28px;
}

.card p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
}

/* Gradient */
.blue { background: linear-gradient(135deg, #333434, #060971); }
.blue { background: linear-gradient(135deg, #333434, #060971); }
.green { background: linear-gradient(135deg, #333434, #060971); }
.purple { background: linear-gradient(135deg, #333434, #060971); }
.orange { background: linear-gradient(135deg, #333434, #060971); }

/* FILTER */
.filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.filter input {
  width: 40%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
}

.right-filter {
  display: flex;
  gap: 10px;
}

/* TABLE */
.table-container {
  
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.05);
  overflow-x: auto;
  overflow-y: auto;
  position: relative;
  font-size: 11px;
   color: #042248;
   
}
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 12px;
  background: rgb(15, 23, 42, 0.82);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  overflow: hidden;
  
  color: #6d99d3;
}

thead {
  position: sticky;
  top: 0;
  background: #f9fafc;
}

th {
    background: rgba(255,255,255,0.03);
    color: #bfa15a;
    text-align: left;
    padding: 8px 10px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;

    text-shadow:
       
        0 0 3px rgb(201, 162, 39,0.15);

    border-bottom: 1px solid rgba(15, 15, 15, 0.25);

}

td {
  padding: 6px 8px;
  border-top: 1px solid #f1f1f1;
  font-size: 14px;
  line-height: 1.2;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: middle;
  color: #bfa15a;
}


tbody tr {
 transition: 0.2s;
 height: 42px;
}

tbody tr:hover {
  background: rgba(59, 130, 246,0.08);
}

/* BADGE */
.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}
.badge.green {
  background: #22c55e;
  color: black;
}

.badge.red {
  background: #ef4444;
  color: white;
}

/* COLORS */
.normal { background: #e6f4ea; color: #1e7e34; }
.rusak { background: #fdecea; color: #c0392b; }
.online { background: #e3f2fd; color: #1565c0; }
.warning { background: #fff4e5; color: #b26a00; }

.status-selesai { background: #e6f4ea; color: #1e7e34; }
.status-belum { background: #fdecea; color: #c0392b; }
.status-proses { background: #fff4e5; color: #b26a00; }

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.hidden {
  display: none;
}

.modal-content input,
.modal-content select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-content.large {
  width: 700px;
}

.modal-content label{
    display:block;
    color:#000000 !important;
    font-size:13px;
    font-weight:600;
    margin-bottom:6px;
    margin-top:14px;
}

.modal-content *{
    opacity:1 !important;
    -webkit-text-fill-color:#080389 !important;
}
  


.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  display: block;
}

textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  resize: none;
}

/* Upload preview */
.preview {
  margin-top: 10px;
  max-width: 150px;
  border-radius: 10px;
}

.btn.small {
  padding: 5px 10px;
  font-size: 12px;
}

/* Notifikasi tombol tersimpan */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #2ecc71;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  font-size: 14px;
  z-index: 9999;
}

.hidden {
  display: none;
}

/* ===== ACTION BUTTON EDIT & HAPUS ===== */
.aksi {
    display: flex;
    gap: 8px;
}

.btn-icon {
    border: none;
    padding: 2px 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

/* EDIT */
.btn-icon.edit {
    background: #e0f2fe;
    color: #0284c7;
}

.btn-icon.edit:hover {
    background: #0284c7;
    color: white;
    transform: scale(1.1);
}

/* DELETE */
.btn-icon.delete {
    background: #fee2e2;
    color: #dc2626;
}

.btn-icon.delete:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

/* Pageination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.pagination button:hover {
  background: #bfa15a;
  transform: scale(1.05);
}

.pagination button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

#pageInfo {
  font-weight: 600;
  font-size: 14px;
  color: #bfa15a;
}
.pagination button {
    min-width: 20px;
    height: 22px;
    border-radius: 12px;
    border: none;
    background: #2c2c2c;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.pagination button:hover {
    background: #e60023;
    transform: translateY(-2px);
}

/* SIDEBAR FIX KIRI */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: #040022;
  color:#bfa15a;;
  padding: 20px;
}

/* LOGO */
.logo {
  font-size: 0px;
  font-weight: bold;
  margin-bottom: 30px;
}

/* MENU */
.menu {
  list-style: none;
  padding: 0;
}

.menu li {
  display:  flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: 0.2s ease;
}

.menu li:hover {
  background: #334155;
  transform: translateX(5px);
}

.menu li.active {
  background: #ef4444;
}

/* MAIN HARUS GESER */
.main {
  margin-left: 240px; /* ini kunci */
  padding: 20px;
}

/* HEADER SIDEBAR */
.sidebar-header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  padding-bottom: 20px;
}

/* LOGO */
.logo-sidebar {
  width: 150px;
  margin: 10px auto 20px;
  padding: 20px 10px;
  filter: brightness(1.2);
}

/* TITLE */
.sidebar-header h2 {
  text-align: center;
  padding: 20px 10px;
  font-size: 16px;
  color: white;
}
.sidebar a{
    width:100%;
    height:30px;

    display:flex;
    align-items:center;
    justify-content:left;

    padding:0 16px;
    margin-bottom:14px;

    border-radius:10px;
    box-sizing:border-box;

    text-decoration:none;
    text-align:center;

    font-size:12px;
    font-weight:700;
    line-height:1.2;

    color:#f6d67a;

    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.08);
    transition: .25s;
}
.sidebar a:hover{
    transform:translateY(-2px);
    background:rgba(255,255,255,0.08);
    transition: .2s;
}

.sidebar a.active{
    background:linear-gradient(135deg,#ff4a4a,#ff1d1d);
    color:#fff;
   
}

.logout-btn{
   width:100%;
   border:none;
   border-radius:16px;
   padding:14px;
   background:rgba(255,255,255,.06);
   color:#f5d77a;
   font-weight:700;
}


/* DETAIL DATA (TOMBOL DETAIL) */
.hidden {
  display: none;
}

#detailFoto {
  width: 450px;
  height: 300px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  margin: 20px auto;
  background: #f5f5f5;
  border: 2px solid #ddd;
}

.modal-content {
  background: #bfa15a;;
  padding: 25px;
  width: 500px;
  border-radius: 12px;
  position: relative;
  max-width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 10000;
  cursor: pointer;

  margin-top: 40px;
  max-height: 90vh;
  overflow-y: auto;
}
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}
.close:hover {
  color: rgb(9, 9, 9);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin-top: 15px;
}
.detail-grid div {
  font-size: 16px;

}


/* Live status dan jam serta tanggal Dashboard utama */
.live-status{
    margin-left: auto;
    margin-right: 15px;
    display:flex;
    align-items:center;
    gap:8px;
    background:rgba(255, 255, 255, 0.062);
    padding:10px 18px;
    border-radius:30px;
    font-size:13px;
    font-weight:700;
    color:#e8e4e4;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
}
.dot{
    width:10px;
    height:10px;
    background:#0222f1;
    border-radius:50%;
    animation:pulse 2s infinite;
}
@keyframes pulse{
    0%{transform:scale(1);opacity:1;}
    50%{transform:scale(1.4);opacity:.5;}
    100%{transform:scale(1);opacity:1;}
}
#clock{
  margin-left: 10px;
  font-weight: 700;
  color:#fbf7f7;
  font-size: 13px;
}




/* Search Box Modifikasi */
.search-box{
    display:flex;
    align-items:center;
    gap:10px;
    background:#bfbdbd;
    border-radius:12px;
    padding:0 12px;
    height:42px;
    width:300px;
    box-shadow:0 10px 26px rgba(255,255,0,.05);
    color: #bfa15a;
}

.search-box i{
    color:#060606;
    font-size:14px;
}

.search-box input{
    border:none;
    outline:none;
    width:100%;
    background:transparent;
    font-size:14px;
    color:#101010;
}

/* Tandai warna perangkat yg bermasalah */
.text-danger{
    color:#e53935 !important;
    font-weight:700;
}


.cyber-page{
    margin:0;
    height:100vh;
    overflow:hidden;
    font-family:Arial,sans-serif;
    background:#020617;
    color:white;
    position:relative;
}

.scan-grid{
    position:absolute;
    inset:0;
    background-image:
      linear-gradient(rgba(0,255,255,.08) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0,255,255,.08) 1px, transparent 1px);
    background-size:40px 40px;
    animation:gridMove 12s linear infinite;
}

@keyframes gridMove{
    from{transform:translateY(0);}
    to{transform:translateY(40px);}
}

.pulse-ring{
    position:absolute;
    width:380px;
    height:380px;
    border:2px solid rgba(0,255,255,.15);
    border-radius:50%;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    animation:pulse 3s infinite;
}

@keyframes pulse{
    0%{transform:translate(-50%,-50%) scale(1); opacity:1;}
    100%{transform:translate(-50%,-50%) scale(1.35); opacity:0;}
}

.login-container{
    position:relative;
    z-index:2;
    display:flex;
    justify-content:center;
    align-items:center;
    height:100vh;
}

.cyber-card{
    width:420px;
    padding:40px;
    border-radius:22px;
    background:rgba(2,6,23,.72);
    border:1px solid rgba(0,255,255,.18);
    box-shadow:0 0 40px rgba(0,255,255,.12);
    backdrop-filter:blur(10px);
    text-align:center;
}

.login-logo{
    width:180px;
    margin-bottom:14px;
}

.cyber-card h1{
    margin:0;
    color:#67e8f9;
}

.sub-title{
    color:#cbd5e1;
    margin:8px 0 24px;
}

.cyber-card input{
    width:100%;
    padding:14px;
    margin-bottom:14px;
    border-radius:12px;
    border:1px solid rgba(103,232,249,.25);
    background:#0f172a;
    color:white;
    box-sizing:border-box;
}

.password-box{
    position:relative;
}

.password-box span{
    position:absolute;
    right:14px;
    top:13px;
    cursor:pointer;
}

.cyber-card button{
    width:100%;
    padding:14px;
    border:none;
    border-radius:12px;
    font-weight:bold;
    cursor:pointer;
    margin-bottom:10px;
}

#loginBtn{
    background:#06b6d4;
    color:#001018;
}

#loginBtn:hover{
    filter:brightness(1.08);
}

.finger-btn{
    background:#111827;
    color:#67e8f9;
    border:1px solid rgba(103,232,249,.25);
}

#msg{
    color:#fca5a5;
    margin-top:10px;
}

/* LOGOUT BTN */
.logout-btn{
    width: 100%;
    margin-top: 10px;
    margin-bottom: 18px;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    color:#bfa15a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
    backdrop-filter: blur(8px);
}

.logout-btn:hover{
    background: #ff3b3b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,59,59,0.35);
}

.logout-btn:active{
    transform: scale(0.98);
}

.overdue-table  {
  border: 3px solid red !important;
}


/* ===== FOTO FULLSCREEN ===== */

#fotoModal{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#fotoModal.hidden{
    display: none;
}

.foto-full{
    max-width: 95%;
    max-height: 95%;
    border-radius: 10px;
    object-fit: contain;
}

#detailFoto{
    max-width: 300px;
    border-radius: 8px;
    cursor: pointer;
    transition: .3s;
}

#detailFoto:hover{
    transform: scale(1.03);
}

/* =========================
   LEADERBOARD TOP 5 Disiplin
========================= */

.leaderboard-container{
    display:flex;
    gap:20px;
    margin:25px 0;
}

.leaderboard-card{
    flex:1;
    background:rgba(25,40,85,.45);
    border:1px solid rgba(255,215,0,.35);
    border-radius:15px;
    padding:15px;
    box-shadow:0 0 15px rgba(0,0,0,.35);
    height: 320px;
    display: flex;
    flex-direction: column;
}

.leaderboard-card.success{
    border-left:5px solid #32cd32;
    box-shadow: 0 0 12px rgba(0, 255, 0,.25);
}

.leaderboard-card.danger{
    border-left:5px solid #ff3b3b;
    box-shadow: 0 0 12px rgba(0, 255, 0,.25);
}
.leaderboard-card.table{
  width: 100%;
  table-layout: fixed;
}

.leaderboard-table{
    width:100%;
    border-collapse:collapse;
}

.leaderboard-table th{
    color:#bfa15a;
    padding:10px;
    border-bottom:1px solid rgba(255,255,255,.15);
}

.leaderboard-table td{
    color:white;
    padding:10px;
    border-bottom:1px solid rgba(255,255,255,.08);
}
.leaderboard-card h3{
    width:100%;
    text-align:center;
    margin:0 0 20px;
    color:#ffffff;
    font-size:32px;
    font-weight:bold;
}
.leaderboard-table td:first-child{
    font-size:20px;
    font-weight:bold;
    text-align:center;
}
.branch-title{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    font-size:38px;
    font-weight:800;
    color:#fff;
    text-transform:uppercase;
    letter-spacing:2px;
    margin:10px 0 25px;
    font-family:"Times New Roman",serif;
}

.branch-title::before,
.branch-title::after{
    content:"";
    width:120px;
    height:2px;
    background:linear-gradient(to right, transparent, gold);
}

.branch-title::after{
    background:linear-gradient(to left, transparent, gold);
}
.alert-panel{

    border-left:6px solid #ff3b30;

    animation:borderAlarm 1.8s infinite;

}

@keyframes borderAlarm{

    0%{
        border-left-color:#ff3b30;
        box-shadow:-3px 0 8px rgba(255,0,0,.25);
    }

    50%{
        border-left-color:#ff0000;
        box-shadow:-6px 0 25px rgba(255,0,0,.85);
    }

    100%{
        border-left-color:#ff3b30;
        box-shadow:-3px 0 8px rgba(255,0,0,.25);
    }
/* ===== CHART ===== */
}
.trend-card{
    margin-top:20px;
    background:#112240;
    border-radius:12px;
    padding:20px;
    border:1px solid rgba(255,255,255,.1);
    height:auto;
}

.card-subtitle{
   
font-size:15px;
font-weight:400;
min-height:30px;
}

#trendPrestasiChart{
    width:100%;
    height:420px !important;
}
.card-header{

    font-size:38px;
    font-weight:800;
    letter-spacing:.5px;
    color:#FFD700;
    align-items: center;
}
#trendPrestasiContainer h2{
    font-size:44px;
    font-weight:800;
}
/* ===== AKHIR ===== */
#trendArea{
    display:grid;
    grid-template-columns:
    repeat(auto-fit,minmax(150px,1fr));
    gap:14px;
    margin-top:18px;
}
.trend-item{
    align-items:center;
    font-size:30px;
    display:flex;
}
.trend-item:hover{
    transform:translateY(-3px);
    border-color:#38bdf8;
}
.trend-left{
    color:white;
    font-size:12px;
}
.trend-left small{

    font-size:12px;
    font-weight:600;
    color:#ffffff;
    opacity:.9;
}
.trend-right{
    font-size:12px;
    font-weight:800;
}
