/* =============================================
   FONT IMPORTS — Substack-inspired
   Serif: DM Serif Display (heading)
   Sans:  DM Sans (body)
============================================= */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* =============================================
   CSS VARIABLES
============================================= */
:root {
  --color-bg:        #faf9f7;
  --color-surface:   #ffffff;
  --color-border:    #e8e4dc;
  --color-accent:    #171616;       /* Substack orange */
  --color-accent2:   #6f9cee;  
  --color-accent-dk: #0c0c0c;
  --color-text-h:    #1a1612;
  --color-text:      #3d3630;
  --color-text-muted:#8b8178;
  --color-info-bg:   #f5fbff;
  --color-info-bd:   #ccd8ff;
  --color-success:   #2d7d46;
  --color-danger:    #c0392b;
  --color-badge-ok:  #e8f5ec;
  --color-badge-no:  #fdecea;
  --font-serif:      'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-sans:       'DM Sans', 'Inter', system-ui, sans-serif;
  --radius-sm:       6px;
  --radius-md:       10px;
  --radius-lg:       16px;
  --shadow-card:     0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.05);
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  padding: 0;
  text-align: center;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   LAYOUT
============================================= */
.container {
  padding: 32px 20px 60px;
  max-width: 620px;
  margin: 0 auto;
}

/* =============================================
   LOGO
============================================= */
.logo {
  width: 100%;
  max-width: 100px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
  border-radius: 10px;
  border: none;
  object-fit: contain;
  aspect-ratio: 1/1;
}

@media (max-width: 480px) {
  .logo { max-width: 80px; }
}

.logo-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  width: 50%;
  margin: 0 auto 24px;
}

/* =============================================
   HEADINGS
============================================= */
h1 {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  color: var(--color-text-h);
  margin-top: 0px; /* Tambahkan ini untuk jarak atas */
  margin-bottom: 4px;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

h2 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-top: 2px; /* Tambahkan ini untuk jarak atas */
  margin-bottom: 0px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.year {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-top: 0px; /* Tambahkan ini untuk jarak atas */
  margin-bottom: 30px;
  /* Menambahkan Garis Bawah */
  border-bottom: 1px solid var(--color-border); /* Menggunakan warna border yang sudah ada */
  display: inline-block;    /* Agar garis hanya sepanjang teks, bukan selebar layar */
  padding-bottom: 8px;     /* Jarak antara teks tahun dengan garisnya */

}

/* =============================================
   INFO BOARD
============================================= */
.info-board {
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-bd);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.3;
  text-align: justify; /*tulisan rata tengah*/
  text-align-last: left; /* Menjaga baris terakhir tetap rapi di kiri */
  margin-bottom: 50px;
}

.info-board strong {
  color: var(--color-accent);
  font-weight: 600;
}

/* =============================================
   COUNTDOWN
============================================= */
#countdown-container {
  padding-top: 10px; /* Memberi ruang antara garis dan teks */
  border-top: 1px solid var(--color-border); /* Menambahkan garis atas */
  margin: 8px 0 28px;
}

#countdown-container > p {
  font-size: 13px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

#countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
}

#countdown div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 10px 10px;
  min-width: 68px;
  flex: 1;
  max-width: 80px;
}

#countdown span {
  display: block;
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--color-text-h);
  line-height: 1;
  margin-bottom: 4px;
}

#countdown p {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-text-muted);
}

/* =============================================
   FORM CONTAINER
============================================= */
#form-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 15px 28px 15px;
  max-width: 575px;
  margin: 0 auto 32px;
  text-align: center;
}

#form-container h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-h);
  margin: 0 0 20px;
  text-align: center;
   /* Menambahkan Garis Bawah */
  border-bottom: 1px solid var(--color-border); /* Menggunakan warna border yang sudah ada */
  display: inline-block;    /* Agar garis hanya sepanjang teks, bukan selebar layar */
  padding-bottom: 8px;     /* Jarak antara teks tahun dengan garisnya */
}

#form-container label,
#form-container small {
  font-size: small;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
  margin-bottom: 0px;
}

input[type="text"],
input[type="date"] {
  width: 80%;
  padding: 10px 13px;
  margin: 0 auto 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-text-h);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  display: block;
  max-width: 100%;
}

input[type="text"]:focus,
input[type="date"]:focus {
  border-color: var(--color-accent2);
  box-shadow: 0 0 0 3px rgba(255, 103, 25, 0.12);
}

button {
  width: 13%;
  background: var(--color-accent2);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 4px;
  margin-bottom: 19px;
  letter-spacing: 0.1px;
}

button:hover {
  background: var(--color-accent-dk);
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* =============================================
   RESULT BOX
============================================= */
#result {
  margin-top: 20px;
}

#result-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: left;
}

#result-box h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-h);
  margin: 0 0 16px;
  text-align: center;
}

.student-info p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  gap: 12px;
}

.student-info p:last-child {
  border-bottom: none;
}

.student-info p span:first-child {
  color: var(--color-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 500;
  flex-shrink: 0;
}

.student-info p span:last-child {
  color: var(--color-text-h);
  font-weight: 500;
  text-align: right;
}

#result-box hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 16px 0 12px;
}

#result-box > p {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-text-muted);
  margin: 0 0 10px;
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 7px 22px;
  border-radius: 999px;
  background: var(--color-badge-ok);
  color: var(--color-success);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-badge.red {
  background: var(--color-badge-no);
  color: var(--color-danger);
}

/* =============================================
   DOWNLOAD LINK
============================================= */
.download-section {
  margin-top: 16px;
  text-align: center;
}

.link-download {
  display: inline-block;
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-bd);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  margin: 0;
  font-size: 14px;
}

.link-download a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.link-download a:hover {
  text-decoration: underline;
  color: var(--color-accent-dk);
}

/* =============================================
   ERROR BOX
============================================= */
.error-box {
  background: var(--color-badge-no);
  border: 1px solid #f5c6c6;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 16px;
}

.error-box p {
  margin: 0;
  color: var(--color-danger);
  font-size: 14px;
  text-align: center;
}

/* =============================================
   NOTE BOX
============================================= */
.note-box {
  background: var(--color-info-bg);
  border-left: 3px solid var(--color-accent2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin-top: 20px;
  text-align: left;
}

.note-box h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.note-box ul {
  padding-left: 18px;
  margin: 0;
}

.note-box li {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.55;
}

/* =============================================
   UNDER CONSTRUCTION
============================================= */
#under-construction {
  padding: 80px 24px;
  max-width: 480px;
  margin: 0 auto;
}

#under-construction h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--color-text-h);
  margin-bottom: 12px;
}

#under-construction p {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* =============================================
   FOOTER
============================================= */
.site-footer {
  background: transparent;
  color: var(--color-text-muted);
  text-align: center;
  font-size: 13px;
  padding: 32px 10px 20px;
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
}

.footer-inner {
  display: inline-block;
}

.social-icons {
  margin-bottom: 14px;
}

.social-icons a {
  color: var(--color-text-muted);
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
}

.social-icons a:hover {
  color: var(--color-accent);
}

.social-icons a svg {
  filter: none !important;
}

.mini-line {
  border: none;
  border-top: 1px solid var(--color-border);
  width: 60%;
  margin: 0 auto 10px;
}

#copyright-year {
  color: var(--color-text-muted);
  font-size: 13px;
}


/* ── Variables ADMIN── */
    #login-page,
    #app {
      --bg: #f5f5f7;
      --surface: #ffffff;
      --surface2: #eef0f5;
      --border: #e2e4e9;
      --border2: #c8cad2;
      --accent: #3b5bdb;
      --accent-dk: #2f4ac7;
      --accent-glow: rgba(59,91,219,0.12);
      --success: #1a7f4b;
      --success-bg: rgba(26,127,75,0.08);
      --danger: #c62828;
      --danger-bg: rgba(198,40,40,0.07);
      --warning: #b45309;
      --text: #0f1117;
      --text-muted: #4b5160;
      --text-dim: #8a8f9e;
      --font-sans: 'DM Sans', sans-serif;
      --font-mono: 'Geist Mono', monospace;
      --font-serif: 'DM Serif Display', serif;
      --radius: 8px;
      --radius-lg: 12px;
      --sidebar-w: 240px;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body:has(#app),
    body:has(#login-page) {
      font-family: var(--font-sans);
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }

    /* ── Login Page ── */
    #login-page {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: radial-gradient(ellipse at 50% 0%, rgba(111,156,238,0.08) 0%, transparent 60%), var(--bg);
    }
    .login-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 48px 40px;
      width: 100%;
      max-width: 380px;
      box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 40px 80px rgba(0,0,0,0.6);
    }
    .login-box .brand {
      text-align: center;
      margin-bottom: 32px;
    }
    .login-box .brand h1 {
      font-family: var(--font-serif);
      font-size: 26px;
      font-weight: 400;
      color: var(--text);
      margin-bottom: 6px;
    }
    .login-box .brand p { font-size: 13px; color: var(--text-muted); }

    .form-group { margin-bottom: 18px; }
    .form-group label {
      display: block;
      font-size: 12px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
      margin-bottom: 6px;
    }
    .form-group input {
      width: 100%;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 10px 13px;
      font-family: var(--font-sans);
      font-size: 14px;
      color: var(--text);
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .form-group input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 10px 18px;
      border: none;
      border-radius: var(--radius);
      font-family: var(--font-sans);
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s;
    }
    .btn-primary {
      background: var(--accent);
      color: #fff;
      width: 100%;
      justify-content: center;
      padding: 12px;
    }
    .btn-primary:hover { background: var(--accent-dk); }
    .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
    .btn-sm { padding: 6px 12px; font-size: 13px; }
    .btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted);  margin-top: 18px; }
    .btn-ghost:hover { border-color: var(--border2); color: var(--color-accent2); }
    .btn-danger { background: var(--danger-bg); border: 1px solid rgba(248,113,113,0.3); color: var(--danger);  margin-top: 18px; }
    .btn-danger:hover { background: rgba(248,113,113,0.15); }
    .btn-success { background: var(--success-bg); border: 1px solid rgba(74,222,128,0.3); color: var(--success); margin-top: 18px; }
    .btn-success:hover { background: rgba(74,222,128,0.15); }
    .btn-accent { background: var(--accent-glow); border: 1px solid rgba(111,156,238,0.3); color: var(--accent); margin-top: 18px; }
    .btn-accent:hover { background: rgba(111,156,238,0.2); }

    #login-error {
      background: var(--danger-bg);
      border: 1px solid rgba(248,113,113,0.3);
      border-radius: var(--radius);
      padding: 10px 14px;
      color: var(--danger);
      font-size: 13px;
      margin-bottom: 16px;
      display: none;
    }

    /* ── App Layout ── */
    #app { display: none; min-height: 100vh; }

    /* Sidebar */
    .sidebar {
      position: fixed;
      top: 0; left: 0;
      width: var(--sidebar-w);
      height: 100vh;
      background: var(--surface);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      z-index: 100;
    }
    .sidebar-header {
      padding: 20px 20px 16px;
      border-bottom: 1px solid var(--border);
    }
    .sidebar-header h2 {
      font-family: var(--font-serif);
      font-size: 18px;
      font-weight: 400;
      color: var(--text);
    }
    .sidebar-header p { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

    .sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
    .nav-section { margin-bottom: 0px; }
    .nav-section-label {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--text-dim);
      padding: 0 12px;
      margin-bottom: 4px;
    }
    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 12px;
      border-radius: var(--radius);
      cursor: pointer;
      font-size: 14px;
      color: var(--text-muted);
      transition: all 0.12s;
      border: none;
      background: none;
      width: 100%;
      text-align: left;
    }
    .nav-item:hover { background: var(--surface2); color: var(--text); }
    .nav-item.active { background: var(--accent-glow); color: var(--accent); }
    .nav-item .icon { font-size: 16px; width: 20px; text-align: center; }

    /* sidebar lama */ 

    .sidebar-footer {
      padding: 12px 8px;
      border-top: 1px solid var(--border);
    }
    .user-info {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      border-radius: var(--radius);
      margin-bottom: 4px;
    }
    .user-avatar {
      width: 32px; height: 32px;
      border-radius: 50%;
      background: var(--accent-glow);
      border: 1px solid rgba(111,156,238,0.3);
      display: flex; align-items: center; justify-content: center;
      font-size: 14px; color: var(--accent);
      flex-shrink: 0;
    }

    /* === Admin Sidebar Footer Fix === */
.sidebar-footer {
  padding: 14px 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  margin-bottom: 10px;
}

.admin-profile .user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}

.admin-meta {
  min-width: 0;
  text-align: left;
}

.admin-meta .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.admin-meta .role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(198, 40, 40, 0.25);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
}

.logout-btn:hover {
  background: rgba(198, 40, 40, 0.12);
  color: var(--danger);
}

.admin-footer-text {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.4;
}

.admin-footer-text small {
  display: block;
  font-size: 10px;
}
    .user-info .name { font-size: 13px; font-weight: 500; }
    .user-info .role { font-size: 11px; color: var(--text-muted); }

    /* Main content */
    .main {
      margin-left: var(--sidebar-w);
      min-height: 100vh;
    }
    .topbar {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      padding: 16px 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky;
      top: 0;
      z-index: 50;
    }
    .topbar h1 { font-family: var(--font-serif); font-size: 22px; font-weight: 400; }
    .topbar-actions { display: flex; gap: 8px; align-items: center; }

    .content { padding: 28px; }

    /* Panels */
    .panel { display: none; }
    .panel.active { display: block; }

    /* Cards */
    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 20px;
    }
    .card-title {
      font-family: var(--font-serif);
      font-size: 18px;
      font-weight: 400;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* Stats */
    .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
    .stat-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
    }
    .stat-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 8px; }
    .stat-card .value { font-family: var(--font-mono); font-size: 28px; color: var(--text); }
    .stat-card .sublabel { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

    /* Table */
    .table-toolbar {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 14px;
      flex-wrap: nowrap;
    }
    .table-toolbar .search-input {
      flex: 1;
      min-width: 0;
      width: auto !important;
    }
    .student-count-label {
      white-space: nowrap;
      font-size: 12px;
      color: var(--text-muted);
      flex-shrink: 0;
    }
    .search-input {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 8px 12px;
      font-size: 13px;
      color: var(--text);
      outline: none;
      width: 240px;
      font-family: var(--font-sans);
    }
    .search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
    .table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
    table { width: 100%; border-collapse: collapse; font-size: 13px; }
    thead th {
      background: var(--surface2);
      padding: 10px 14px;
      text-align: center;
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }
    tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
    tbody tr:last-child { border-bottom: none; }
    tbody tr:hover { background: var(--surface2); }
    tbody td { padding: 11px 14px; color: var(--text); vertical-align: middle; }
    .badge {
      display: inline-flex;
      align-items: center;
      padding: 3px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.3px;
      text-transform: uppercase;
    }
    .badge-lulus { background: var(--success-bg); color: var(--success); border: 1px solid rgba(74,222,128,0.2); }
    .badge-tidak { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(248,113,113,0.2); }

    /* Pagination */
    .pagination { display: flex; align-items: center; gap: 6px; margin-top: 16px; justify-content: center; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }

    /* Form grid */
    .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .form-grid .full { grid-column: 1/-1; }
    .form-group select {
      width: 100%;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 10px 13px;
      font-family: var(--font-sans);
      font-size: 14px;
      color: var(--text);
      outline: none;
      transition: border-color 0.15s;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2371717a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      padding-right: 36px;
    }
    .form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
    .form-group textarea {
      width: 100%;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 10px 13px;
      font-family: var(--font-sans);
      font-size: 14px;
      color: var(--text);
      outline: none;
      resize: vertical;
      min-height: 120px;
      transition: border-color 0.15s;
    }
    .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

    /* Settings sections */
    .settings-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 20px;
    }
    .settings-section h3 {
      font-family: var(--font-serif);
      font-size: 17px;
      font-weight: 400;
      margin-bottom: 6px;
    }
    .settings-section .desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }

    /* Toggle */
    .toggle-wrap { display: flex; align-items: center; gap: 12px; }
    .toggle {
      position: relative;
      width: 44px; height: 24px;
      flex-shrink: 0;
    }
    .toggle input { opacity: 0; width: 0; height: 0; }
    .toggle-slider {
      position: absolute; inset: 0;
      background: var(--border2);
      border-radius: 999px;
      cursor: pointer;
      transition: 0.2s;
    }
    .toggle-slider::before {
      content: '';
      position: absolute;
      width: 18px; height: 18px;
      border-radius: 50%;
      background: #fff;
      top: 3px; left: 3px;
      transition: 0.2s;
    }
    .toggle input:checked + .toggle-slider { background: var(--accent); }
    .toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
    .toggle-label { font-size: 14px; }

    /* Toasts */
    #toast-container {
      position: fixed;
      top: 80px; right: 24px;
      z-index: 999;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .toast {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 12px 18px;
      font-size: 13px;
      min-width: 240px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.5);
      display: flex;
      align-items: center;
      gap: 10px;
      animation: slideIn 0.2s ease;
    }
    .toast.success { border-left: 3px solid var(--success); }
    .toast.error { border-left: 3px solid var(--danger); }
    @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

    /* Modal */
    .modal-overlay {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.7);
      z-index: 200;
      display: flex; align-items: center; justify-content: center;
      padding: 20px;
      display: none;
    }
    .modal-overlay.open { display: flex; }
    .modal {
      background: #ffffff !important;
      color: #1a1612 !important;
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 28px;
      width: 100%;
      max-width: 560px;
      max-height: 90vh;
      overflow-y: auto;
    }
    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }
    .modal-header h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 400; }
    .modal-close {
      background: none; border: none; color: var(--danger);
      cursor: pointer; font-size: 20px; padding: 4px;
      border-radius: var(--radius); transition: color 0.1s;
    }
    .modal-close:hover { color: var(--accent); }
    .modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

    /* Import area */
    .import-area {
      border: 2px dashed var(--border);
      border-radius: var(--radius-lg);
      padding: 32px;
      text-align: center;
      cursor: pointer;
      transition: border-color 0.15s;
      margin-bottom: 16px;
    }
    .import-area:hover { border-color: var(--accent); }
    .import-area .icon { font-size: 32px; margin-bottom: 8px; }
    .import-area p { font-size: 14px; color: var(--text-muted); }
    .import-area small { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); }

    /* Alert */
    .alert {
      border-radius: var(--radius);
      padding: 12px 16px;
      font-size: 13px;
      margin-bottom: 16px;
    }
    .alert-info { background: rgba(111,156,238,0.08); border: 1px solid rgba(111,156,238,0.2); color: var(--accent); }
    .alert-warning { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); color: var(--warning); }

    /* Empty state */
    .empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
    .empty-state .icon { font-size: 40px; margin-bottom: 12px; }
    .empty-state p { font-size: 14px; }

    /* Loader */
    .spinner {
      width: 20px; height: 20px;
      border: 2px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      display: inline-block;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* Responsive */
    @media (max-width: 768px) {
      .sidebar { transform: translateX(-100%); transition: transform 0.2s; }
      .sidebar.open { transform: translateX(0); }
      .main { margin-left: 0; }
      .content { padding: 16px; }
      .form-grid { grid-template-columns: 1fr; }
    }

    /* ── Hamburger ── */
.hamburger {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Overlay mobile */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 90;
  display: none;
}

.sidebar-overlay.show {
  display: block;
}

/* Mobile */
@media (max-width: 768px) {
  .hamburger {
    display: inline-flex;
  }

  .topbar {
    gap: 12px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 100;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .content {
    padding: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   ADMIN — INPUT OVERRIDE
   (mencegah style publik width:80% masuk ke admin)
============================================= */

/* Reset semua input di dalam admin agar tidak ikut style publik */
#login-page input,
#app input[type="text"],
#app input[type="date"],
#app input[type="password"],
#app input[type="number"],
#app input[type="url"],
#app input[type="email"],
#app input[type="datetime-local"] {
  width: 100%;
  margin: 0;
  display: block;
  font-size: 14px;
  padding: 10px 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: none;
}

#login-page input:focus,
#app input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Kotak jam & menit — ukuran kecil tetap terjaga */
#app #s-countdownHour,
#app #s-countdownMinute {
  width: 56px !important;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 16px;
  padding: 10px 8px;
}

/* Input tanggal countdown — flex:1 tapi tidak melebihi kontainer */
#app #s-countdownDate {
  width: 100%;
  max-width: 200px;
  flex: 1;
  min-width: 130px;
}

/* Search input tabel — lebar tetap terkontrol */
#app .search-input {
  width: 100%;
  max-width: 240px;
}

/* Button di admin — override width:60% dari publik */
#app .btn,
#login-page .btn {
  width: auto;
}
#app .btn-primary,
#login-page .btn-primary {
  width: 100%;
}

/* Tombol simpan di settings — jangan full width */
#app .settings-section + div .btn-primary,
#app > .main .content > div > div[style*="flex-end"] .btn-primary {
  width: auto;
}

/* =============================================
   ADMIN — CONTENT MAX WIDTH
   Membatasi lebar konten agar tidak terlalu lebar
   di layar besar
============================================= */
#app .content {
  max-width: 960px;
}

#app .settings-section,
#app .card {
  max-width: 100%;
}

/* Form group input tidak boleh overflow */
#app .form-group {
  width: 100%;
  display: flex;
  flex-direction: column;

  align-items: center;
}

/* =============================================
   ADMIN — MOBILE TAMBAHAN
============================================= */
@media (max-width: 480px) {

  /* Countdown 3 field — susun vertikal di layar sangat kecil */
  #app #s-countdownDate {
    max-width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  /* Kotak jam & menit tetap kecil */
  #app #s-countdownHour,
  #app #s-countdownMinute {
    width: 52px !important;
    font-size: 15px;
  }

  /* Toolbar tabel: search full width */
  #app .search-input {
    max-width: 100%;
    width: 100%;
  }

  /* Tombol toolbar mobile — 2 baris */
  #app .table-toolbar {
    flex-wrap: wrap;
    gap: 6px;
  }
  #app .table-toolbar .search-input {
    flex: 1 1 100%;   /* baris 1: search full width */
    order: 1;
  }
  #app .student-count-label {
    flex: 1 1 100%;   /* baris 2: count full width */
    order: 2;
    text-align: right;
    display: block;   /* pastikan tetap tampil */
  }
  #app .table-toolbar .btn {
    order: 3;         /* baris 3: tombol-tombol */
    flex: 1;
    justify-content: center;
    font-size: 12px;
    padding: 7px 6px;
  }

  /* Padding content lebih kecil */
  #app .content {
    padding: 12px;
  }

  /* Card padding lebih compact */
  #app .card,
  #app .settings-section {
    padding: 16px;
  }

  /* Stats grid 2 kolom di mobile */
  #app .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* Login box padding lebih kecil */
  .login-box {
    padding: 32px 20px;
  }

  /* Toast lebih kecil */
  #toast-container {
    top: 60px;
    right: 12px;
    left: 12px;
  }
  .toast {
    min-width: 0;
    width: 100%;
  }
}

/* Password Field */
.password-field {
  position: relative;
  width: 100%;
  max-width:420px;
}

.password-input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 46px !important;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 16px;
  padding: 0;
  line-height: 1;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.password-toggle:hover {
  background: rgba(255,255,255,.06);
  color: var(--text);
}

.password-toggle:active {
  transform: translateY(-50%) scale(.94);
}

.password-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,.08);
}

/* Password Strength */
.password-strength {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.password-strength-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.password-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width .3s ease, background .3s ease;
}

.password-strength-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 72px;
  text-align: right;
}

.password-match-msg {
  margin-top: 6px;
  font-size: 12px;
  display: none;
}

.password-error {
  display: none;
  margin-top: 4px;
}

.password-actions {
  display: flex;
  justify-content: flex-end;
}

/* Hilangkan icon password bawaan browser */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear{
  display:none;
}

input[type="password"]::-webkit-credentials-auto-fill-button{
  visibility:hidden;
  display:none !important;
  pointer-events:none;
}

/* =========================
   LOGIN BACK BUTTON
========================= */

.login-back-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:14px;
  padding:9px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface2);
  color:var(--text-muted);
  text-decoration:none;
  font-size:13px;
  font-weight:500;
  transition:.15s;
}

.login-back-btn:hover{
  background:var(--surface);
  color:var(--accent);
  border-color:var(--accent);
}
/* =========================
   HEADER CUSTOM
========================= */

.site-header{
  width:100%;
  background:var(--color-bg);
  border-bottom:1px solid var(--color-border);
  position:sticky;
  top:0;
  z-index:999;
}

.site-header-inner{
  max-width:620px;
  margin:0 auto;
  padding:12px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.header-logos{
  display:flex;
  align-items:center;
  gap:8px;
}

.header-logos img{
  width:42px;
  height:42px;
  object-fit:contain;
  border-radius:none;
  border:none;
  background:none;
  padding:0;
}

.header-menu{
  position:relative;
}

.burger-btn{
  width:auto;
  min-width:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:8px 12px;
  margin:0;
  border:1px solid var(--color-border);
  border-radius:999px;
  background:var(--color-surface);
  color:var(--color-text-h);
  font-size:13px;
  font-weight:600;
  line-height:1;
  cursor:pointer;
}

.burger-btn:hover{
  background:var(--color-info-bg);
  color:var(--color-accent);
}

.header-dropdown{
  display:none;
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  width:max-content;
  min-width:135px;
  background:var(--color-surface);
  border:1px solid var(--color-border);
  border-radius:10px;
  box-shadow:var(--shadow-card);
  padding:6px;
  text-align:left;
}

.header-dropdown.show{
  display:block;
}

.header-dropdown a{
  display:block;
  padding:8px 10px;
  border-radius:7px;
  color:var(--color-text);
  text-decoration:none;
  font-size:13px;
  white-space:nowrap;
}

.header-dropdown a:hover{
  background:var(--color-info-bg);
  color:var(--color-accent);
}

/* Mobile */
@media(max-width:480px){
  .site-header-inner{
    padding:10px 14px;
  }

  .header-logos img{
    width:36px;
    height:36px;
  }

  .burger-btn{
    padding:8px 10px;
    font-size:12px;
  }
}

/* =========================
   HALAMAN TENTANG
========================= */
/* =========================
   FIX HEADER LAMA
========================= */

.site-header {
  width: 100%;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 999;
}

.site-header .header-inner {
  max-width: 620px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-header .header-logos {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.site-header .hdr-logo {
  width:42px;
  height:42px;
  object-fit:contain;
  border-radius:none;
  border:none;
  background:none;
  padding:0;
}


.site-header .header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.site-header .header-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header .hdr-btn {
  display: inline-flex;
  width: auto;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .hdr-btn--ghost {
  background: var(--color-surface);
  color: var(--color-text-h);
  border: 1px solid var(--color-border);
}

.site-header .hdr-btn--solid {
  background: var(--color-accent2);
  color: #fff;
  border: 1px solid var(--color-accent2);
}

.site-header .hdr-burger,
.site-header .hdr-dropdown {
  display: none !important;
}

/* Mobile */
@media (max-width: 480px) {
  .site-header .header-inner {
    padding: 9px 14px;
  }

  .site-header .hdr-logo {
    width: 34px;
    height: 34px;
  }

  .site-header .hdr-btn {
    font-size: 12px;
    padding: 7px 10px;
  }
}

/* =========================
   FIX ISI HALAMAN TENTANG
========================= */

.tentang-page {
  max-width: 720px;
  padding-top: 28px;
}

.tentang-page .about-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
  margin-bottom: 18px;
  text-align: left;
}

.tentang-page .about-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-bd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}

.tentang-page .about-card h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--color-text-h);
  margin: 0 0 10px;
}

.tentang-page .about-card p {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0 0 10px;
}

.tentang-page .about-list {
  margin: 10px 0 0;
  padding-left: 22px;
}

.tentang-page .about-list li {
  margin-bottom: 8px;
  padding-left: 4px;
  font-size: 14px;
  line-height: 1.65;
}

.tentang-page ol.about-list {
  list-style: decimal;
}

.tentang-page ul.about-list,
.tentang-page .about-list--bullet {
  list-style: disc;
}

.tentang-page .about-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 4px;
}

.tentang-page .about-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.tentang-page .about-table td:first-child {
  width: 38%;
  color: var(--color-text-muted);
  font-weight: 600;
}

.tentang-page .about-table td:last-child {
  color: var(--color-text-h);
}

.tentang-page .about-link {
  color: var(--color-accent2);
  text-decoration: none;
  font-weight: 600;
}

.tentang-page .about-link:hover {
  text-decoration: underline;
}

.tentang-page .about-version {
  margin-top: 14px !important;
  color: var(--color-text-muted) !important;
  font-size: 13px !important;
}

@media (max-width: 480px) {
  .tentang-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .tentang-page .about-card {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .tentang-page .about-card h3 {
    font-size: 19px;
  }

  .tentang-page .about-table tr {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .tentang-page .about-table td {
    display: block;
    width: 100%;
    padding: 4px 0;
    border-bottom: none;
  }

  .tentang-page .about-table td:first-child {
    width: 100%;
    font-size: 12px;
    text-transform: uppercase;
  }
}


/* ── Daftar Siswa Lulus ──────────────────────────────────── */
.lulus-toolbar {
  display: flex;
  gap: 8px;
  margin: 8px 0 8px;
  flex-wrap: wrap;
}
.lulus-toolbar input {
  flex: 1;
  min-width: 160px;
  padding: 9px 13px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.lulus-toolbar input:focus { border-color: #1e40af; }
.lulus-toolbar button {
  padding: 9px 10px;
  border: none;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, opacity .2s;
  white-space: nowrap;
}
.lulus-toolbar button:disabled { opacity: .5; cursor: default; }
#lulus-search-btn  { background: #1e40af; color: #fff; }
#lulus-search-btn:hover:not(:disabled)  { background: #1e3a8a; }
#lulus-refresh-btn { background: #f3f4f6; color: #374151; border: 1.5px solid #d1d5db; }
#lulus-refresh-btn:hover:not(:disabled) { background: #e5e7eb; }

.lulus-count {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
  text-align: center;
}

.lulus-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}
.lulus-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.lulus-table thead tr { background: #1e40af; color: #fff; }
.lulus-table th {
  padding: 11px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.lulus-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background .15s;
}
.lulus-table tbody tr:last-child { border-bottom: none; }
.lulus-table tbody tr:hover { background: rgba(30,64,175,.04); }
.lulus-table td { padding: 10px 12px; vertical-align: middle; }

/* ==========================================
   FIX PAGINATION DAFTAR LULUS
========================================== */

.lulus-pagination{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  margin:18px 0 8px;
  flex-wrap:wrap;
  font-size:13px;
  text-align:center;
}

/* paksa override style button global */
.lulus-pagination button{
  width:auto !important;
  min-width:90px;
  height:38px;
  padding:0 16px !important;
  margin:0 !important;

  display:inline-flex !important;
  align-items:center;
  justify-content:center;

  border:1.5px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  color:#374151;

  font-size:13px !important;
  font-weight:600;
  line-height:1;
  white-space:nowrap;

  cursor:pointer;
  transition:all .15s ease;
}

.lulus-pagination button:hover:not(:disabled){
  background:#1e40af;
  border-color:#1e40af;
  color:#fff;
}

.lulus-pagination button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* teks halaman */
.lulus-pagination span{
  font-size:13px;
  font-weight:500;
  color:#6b7280;
  min-width:max-content;
}

/* MOBILE */
@media (max-width:768px){

  .lulus-pagination{
    gap:8px;
  }

  .lulus-pagination button{
    min-width:78px;
    height:36px;
    font-size:12px !important;
    padding:0 12px !important;
  }

  .lulus-pagination span{
    width:100%;
    order:-1;
    text-align:center;
    font-size:12px;
  }
}

@media (max-width: 520px) {
  .lulus-toolbar { flex-direction: column; }
  .lulus-table th, .lulus-table td { font-size: 12px; padding: 8px 8px; }
}

/* ==========================================
   FIX UKURAN TABEL DESKTOP
========================================== */

/* Header kolom */
.lulus-table thead th{
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 8px 8px !important;
  line-height: 1.3;
}

/* Isi tabel */
.lulus-table tbody td{
  font-size: 12px !important;
  padding: 9px 8px !important;
  line-height: 1.35 !important;
}

/* Nama siswa */
.lulus-table tbody td strong{
  font-size: 12px !important;
  font-weight: 600;
}

/* NISN */
.lulus-table td[style*="font-family:monospace"]{
  font-size: 11px !important;
}

/* Badge LULUS */
.status-badge{
  font-size: 10px !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

/* Link SKL */
.lulus-table td a{
  font-size: 11px !important;
}

/* Toolbar desktop */
.lulus-toolbar input{
  font-size: 13px !important;
}

.lulus-toolbar button{
  font-size: 12px !important;
  padding: 9px 12px !important;
}

.lulus-toolbar button{
  width: 73px !important;
  padding: 10px 10px !important;
  font-size: 10px !important;
  white-space: nowrap;
}

/* ==========================================
   FIX TOOLBAR MOBILE KELULUSAN
========================================== */
@media screen and (max-width:768px){

  .lulus-toolbar{
    display:grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap:8px !important;
    width:100%;
    align-items:center;
  }

  /* Input full width di atas */
  .lulus-toolbar input{
    grid-column:1 / -1 !important;
    width:100% !important;
    min-width:100% !important;
    margin:0 !important;
  }

  /* Paksa semua tombol ikut grid */
  .lulus-toolbar > button{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    display:flex !important;
    justify-content:center;
    align-items:center;
    padding:10px 8px !important;
    margin:0 !important;
    font-size:12px !important;
    box-sizing:border-box;
  }
}

/* ==========================================
   TABEL KELULUSAN — MOBILE (fixed, tidak berubah)
   Lebar kolom: No 8% | Nama 34% | Asal 32% | Jalur 26% = 100%
========================================== */
@media screen and (max-width:768px){

  /* Wrapper: cegah overflow, no scroll */
  .lulus-table-wrap{
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* Tabel fixed — lebar kolom tidak bergeser */
  .lulus-table{
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  /* Semua th & td: font & padding seragam */
  .lulus-table th,
  .lulus-table td{
    font-size: 11px !important;
    line-height: 1.3 !important;
    vertical-align: middle !important;
    padding: 7px 4px !important;
    overflow: hidden !important;
    word-break: break-word !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  /* Header sedikit lebih kecil */
  .lulus-table thead th{
    font-size: 10px !important;
    padding: 6px 4px !important;
    text-align: center !important;
  }

  /* Kolom No — 8% */
  .lulus-table th:nth-child(1),
  .lulus-table td:nth-child(1){
    width: 13% !important;
    text-align: center !important;
  }

  /* Kolom Nama — 34% */
  .lulus-table th:nth-child(2),
  .lulus-table td:nth-child(2){
    width: 34% !important;
    text-align: left !important;
  }

  /* Kolom Asal Sekolah — 32% */
  .lulus-table th:nth-child(3),
  .lulus-table td:nth-child(3){
    width: 32% !important;
    text-align: left !important;
  }

  /* Kolom Jalur — 26% */
  .lulus-table th:nth-child(4),
  .lulus-table td:nth-child(4){
    width: 26% !important;
    text-align: center !important;
  }

  /* Nama siswa bold */
  .lulus-table td strong{
    font-size: 11px !important;
    font-weight: 600 !important;
  }

  /* Badge jalur */
  .badge-jalur{
    font-size: 10px !important;
    padding: 2px 5px !important;
    border-radius: 4px !important;
    line-height: 1.3 !important;
    display: inline-block !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Badge status lulus */
  .status-badge{
    font-size: 10px !important;
    padding: 3px 6px !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
  }
}

/* ==========================================
   FIX ALIGNMENT TABEL DESKTOP (AMAN)
========================================== */
@media screen and (min-width:769px){

  /* hapus paksa fixed */
  .lulus-table{
    width:100%;
    table-layout:auto;
  }

  /* Header tabel */
  .lulus-table thead th{
    font-size:12px !important;
    padding:10px 8px !important;
    line-height:1.35 !important;
    vertical-align:middle !important;
    text-align:center !important;
    white-space:nowrap;
  }

  /* Isi tabel */
  .lulus-table tbody td{
    font-size:12px !important;
    padding:10px 8px !important;
    line-height:1.35 !important;
    vertical-align:middle !important;
    text-align:center !important;
  }

  /* asal sekolah */
  .lulus-table th:nth-child(3){
  text-align: left !important;
  width: 10px;
  min-width: 10px;
  }
  
  .lulus-table td:nth-child(3){
    text-align:left !important;
    width: 10px;
    min-width: 10px;
  }

  /* nomor*/
  .lulus-table th:nth-child(1){
  text-align: center !important;
  width: 10px;
  min-width: 10px;
  }
  .lulus-table td:nth-child(1){
  text-align: center !important;
  width: 10px;
  min-width: 10px;
  }

  /* Nama */
  .lulus-table th:nth-child(2){
  text-align: left !important;
  width: 30px;
  min-width: 30px;
  }
  .lulus-table td:nth-child(2){
  text-align: left !important;
  width: 30px;
  min-width: 100px;
  }

  /* Status */
  .lulus-table th:nth-child(4){
  text-align: center !important;
  width: 10px;
  min-width: 10px;
  }
  .lulus-table td:nth-child(4){
  text-align: center !important;
  width: 10px;
  min-width: 10px;
  }

  /* SKL */
  .lulus-table th:nth-child(5),
  .lulus-table td:nth-child(5){
    min-width:95px;
  }

  /* Badge rata tengah */
  .status-badge{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    min-width:70px;
  }
}

/* ==========================================
   DATA SISWA TOOLBAR - 3 BARIS MOBILE
========================================== */
@media (max-width:768px){

  #app .table-toolbar{
    display:grid !important;
    grid-template-columns:repeat(4,1fr);
    gap:8px;
    align-items:center;
  }

  #app .table-toolbar .search-input{
    grid-column:1/-1;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  #app .student-count-label{
    grid-column:1/-1;
    text-align:center;
    padding:4px 0;
    font-size:13px;
    display:block;
  }

  #app .table-toolbar .btn{
    width:100% !important;
    margin:0 !important;
    justify-content:center;
    padding:10px 6px;
    font-size:12px;
  }
}

/* Info pagination */
.pagination-info{
  margin-left:8px;
  margin-bottom: 0px;
  font-size:12px;
  color:var(--text-dim);
  font-weight:500;
  white-space:nowrap;
}

@media (max-width:768px){

  .pagination-info{
    width:100%;
    margin-left:0;
    text-align:center;
    order:-1; /* pindah ke atas tombol */
    font-size:12px;
    padding-bottom:4px;
  }

}

#student-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:8px 12px;
  border-radius:999px;

  background:var(--surface2);
  border:1px solid var(--border);

  font-size:13px;
  font-weight:600;
  color:var(--accent);
}
/* ── Badge Jalur SPMB ────────────────────────────────────── */
.badge-jalur {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
}
.badge-jalur-prestasi  { background: #fef9c3; color: #92400e; }
.badge-jalur-affirmasi { background: #fce7f3; color: #9d174d; }
.badge-jalur-mutasi    { background: #dbeafe; color: #1e40af; }
.badge-jalur-tka       { background: #f0fdf4; color: #166534; }
.badge-jalur-domisili  { background: #ede9fe; color: #5b21b6; }

/* Stats grid 8 kolom untuk dashboard SPMB */
#app .stats-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
