/* ============================================================
   SIUAM - Stylesheet Utama
   Tema: Akademik Profesional - Hijau & Biru Islami
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Amiri:wght@400;700&display=swap');

/* ---- VARIABEL ---- */
:root {
  --primary:       #1B4F72;
  --primary-dark:  #154360;
  --primary-light: #2E86C1;
  --secondary:     #1A5632;
  --secondary-light: #27AE60;
  --accent:        #F39C12;
  --accent-light:  #F9E79F;
  --danger:        #C0392B;
  --danger-light:  #FADBD8;
  --warning:       #E67E22;
  --warning-light: #FDEBD0;
  --success:       #1E8449;
  --success-light: #D5F5E3;
  --info:          #2471A3;
  --info-light:    #D6EAF8;
  --dark:          #1C2833;
  --text:          #2C3E50;
  --text-muted:    #7F8C8D;
  --border:        #D5D8DC;
  --bg:            #F0F3F7;
  --bg-card:       #FFFFFF;
  --sidebar-w:     260px;
  --header-h:      64px;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow:        0 2px 12px rgba(0,0,0,.08);
  --shadow-md:     0 4px 24px rgba(0,0,0,.12);
  --transition:    0.2s ease;
  --font-main:     'Plus Jakarta Sans', sans-serif;
  --font-arabic:   'Amiri', serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ---- LAYOUT ---- */
.app-wrapper { display: flex; min-height: 100vh; }

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary-dark);
  background-image: linear-gradient(180deg, #154360 0%, #1B4F72 60%, #1a3a2e 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

.sidebar-brand {
  padding: 1.25rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.sidebar-brand .brand-logo {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.3rem; color: #fff; flex-shrink: 0;
}
.sidebar-brand .brand-text { color: #fff; }
.sidebar-brand .brand-name {
  font-size: .95rem; font-weight: 700; letter-spacing: .02em; line-height: 1.2;
}
.sidebar-brand .brand-sub {
  font-size: .68rem; opacity: .7; line-height: 1.2;
}

.sidebar-section {
  padding: .75rem 1.2rem .3rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.sidebar-nav { padding: .25rem .75rem; }
.nav-item { margin-bottom: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}
.nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-link.active {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-link .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}
.nav-submenu {
  margin-left: 2rem;
  margin-top: 2px;
  display: none;
}
.nav-submenu.open { display: block; }
.nav-submenu .nav-link {
  font-size: .83rem;
  padding: .45rem .65rem;
  color: rgba(255,255,255,.6);
}
.nav-submenu .nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-submenu .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-chevron {
  margin-left: auto;
  font-size: .85rem;
  transition: transform var(--transition);
  opacity: .6;
}
.nav-link.open .nav-chevron { transform: rotate(180deg); }

.sidebar-footer {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.user-card {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}
.user-card:hover { background: rgba(255,255,255,.1); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--secondary-light);
  display: grid; place-items: center;
  font-weight: 700; font-size: .88rem;
  color: #fff; flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info { min-width: 0; }
.user-name {
  font-size: .82rem; font-weight: 600;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role {
  font-size: .7rem; color: rgba(255,255,255,.5);
  text-transform: capitalize;
}

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- HEADER / TOPBAR ---- */
.topbar {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-toggle {
  display: none;
  background: none; border: none;
  font-size: 1.3rem; color: var(--text-muted); cursor: pointer;
}
.topbar-breadcrumb {
  display: flex; align-items: center; gap: .4rem;
  font-size: .83rem; color: var(--text-muted);
}
.topbar-breadcrumb .current { color: var(--text); font-weight: 600; }
.topbar-breadcrumb .sep { color: var(--border); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.topbar-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: none; border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 1rem; color: var(--text-muted);
  cursor: pointer; position: relative;
  transition: all var(--transition);
}
.topbar-btn:hover { background: var(--bg); color: var(--text); }
.topbar-notif { position: relative; }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--danger); border-radius: 50%;
  border: 1.5px solid #fff;
}
.topbar-search {
  display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 0 .75rem;
  gap: .4rem; height: 38px;
}
.topbar-search input {
  background: none; border: none; outline: none;
  font-size: .83rem; color: var(--text); width: 180px;
}
.topbar-search i { color: var(--text-muted); font-size: .95rem; }
.ta-ujian-badge {
  display: flex; align-items: center; gap: .4rem;
  background: var(--accent-light); border: 1px solid #F0B27A;
  border-radius: 8px; padding: .3rem .75rem;
  font-size: .78rem; font-weight: 600; color: #784212;
}

/* ---- PAGE CONTENT ---- */
.page-content { padding: 1.5rem; flex: 1; }

/* ---- PAGE HEADER ---- */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap;
}
.page-title { font-size: 1.35rem; font-weight: 700; color: var(--dark); line-height: 1.3; }
.page-subtitle { font-size: .83rem; color: var(--text-muted); margin-top: .2rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap;
}
.card-title {
  font-size: .95rem; font-weight: 700;
  color: var(--dark); display: flex; align-items: center; gap: .5rem;
}
.card-title i { color: var(--primary); font-size: 1.1rem; }
.card-body { padding: 1.25rem; }
.card-footer {
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #FAFBFC;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex; align-items: flex-start; gap: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.stat-icon.blue   { background: #EBF5FB; color: var(--primary); }
.stat-icon.green  { background: #EAFAF1; color: var(--secondary); }
.stat-icon.amber  { background: #FEF9E7; color: var(--warning); }
.stat-icon.red    { background: var(--danger-light); color: var(--danger); }
.stat-icon.purple { background: #F5EEF8; color: #7D3C98; }
.stat-icon.teal   { background: #E8F8F5; color: #148F77; }
.stat-info .stat-value {
  font-size: 1.6rem; font-weight: 800;
  color: var(--dark); line-height: 1.1;
}
.stat-info .stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .1rem; }
.stat-info .stat-change {
  font-size: .75rem; margin-top: .35rem;
  display: flex; align-items: center; gap: .25rem;
  font-weight: 600;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ---- TOMBOL ---- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600; font-size: .85rem;
  border: 1.5px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: all var(--transition);
  line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .35rem .8rem; font-size: .78rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: .95rem; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #166A3A; border-color: #166A3A; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #A93226; }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-info { background: var(--info); color: #fff; border-color: var(--info); }
.btn-secondary { background: #ECF0F1; color: var(--text); border-color: #BDC3C7; }
.btn-secondary:hover { background: #D5D8DC; }
.btn-outline-primary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }
.btn-icon { padding: .45rem; border-radius: 8px; }
.btn-group { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ---- TABEL ---- */
.table-responsive { overflow-x: auto; border-radius: var(--radius); }
.table {
  width: 100%; border-collapse: collapse;
  font-size: .855rem;
}
.table thead tr { background: #F2F4F6; }
.table th {
  padding: .75rem 1rem;
  text-align: left; font-weight: 700;
  color: var(--text-muted); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid #F0F3F7;
  vertical-align: middle;
  color: var(--text);
}
.table tbody tr:hover td { background: #F8FAFC; }
.table tbody tr:last-child td { border-bottom: none; }
.table-striped tbody tr:nth-child(even) td { background: #FAFBFC; }
.table .fw-bold { font-weight: 700; }

/* ---- FORM ---- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.form-grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: .82rem; font-weight: 600; color: var(--text); }
.form-label .required { color: var(--danger); }
.form-control {
  width: 100%; padding: .55rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff; color: var(--text);
  font-size: .88rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(46,134,193,.15);
}
.form-control:read-only { background: #F8FAFC; color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .75rem; color: var(--text-muted); }
.form-error { font-size: .75rem; color: var(--danger); }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .input-group-btn { border-radius: 0 var(--radius) var(--radius) 0; }
.form-check { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.form-check input[type="checkbox"], .form-check input[type="radio"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary);
}
.form-section {
  padding: 1rem;
  background: #F8FAFC;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.form-section-title {
  font-size: .82rem; font-weight: 700;
  color: var(--primary); text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: .75rem;
  display: flex; align-items: center; gap: .4rem;
}

/* ---- BADGE ---- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .65rem; border-radius: 99px;
  font-size: .72rem; font-weight: 700;
}
.badge-primary { background: #EBF5FB; color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: #A04000; }
.badge-info    { background: var(--info-light); color: var(--info); }
.badge-secondary { background: #ECF0F1; color: var(--text-muted); }
.badge-green   { background: #D5F5E3; color: #1E8449; }

/* ---- ALERT ---- */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .88rem;
  display: flex; align-items: flex-start; gap: .6rem;
  margin-bottom: 1rem;
}
.alert i { font-size: 1.1rem; margin-top: .05rem; flex-shrink: 0; }
.alert-success { background: var(--success-light); color: #145A32; border-left: 4px solid var(--success); }
.alert-danger  { background: var(--danger-light); color: #922B21; border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: #784212; border-left: 4px solid var(--warning); }
.alert-info    { background: var(--info-light); color: #1A5276; border-left: 4px solid var(--info); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: none; place-items: center;
  animation: fadeIn .15s ease;
  padding: 1rem;
}
.modal-overlay.open { display: grid; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%; max-width: 600px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: slideUp .2s ease;
}
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }
.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 700; color: var(--dark); }
.modal-close {
  background: none; border: none;
  font-size: 1.2rem; cursor: pointer; color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 8px; display: grid; place-items: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--bg); color: var(--danger); }
.modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: .5rem;
}

/* ---- TABS ---- */
.tabs { border-bottom: 2px solid var(--border); margin-bottom: 1.25rem; display: flex; gap: .25rem; overflow-x: auto; }
.tab-btn {
  padding: .6rem 1rem;
  border: none; background: none;
  font-size: .85rem; font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer; white-space: nowrap;
  transition: all var(--transition);
  display: flex; align-items: center; gap: .4rem;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- PROGRESS ---- */
.progress { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; transition: width .4s ease; }
.progress-bar.blue { background: var(--primary-light); }
.progress-bar.green { background: var(--secondary-light); }
.progress-bar.amber { background: var(--accent); }
.progress-bar.red { background: var(--danger); }

/* ---- TOAST ---- */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 999; display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  background: var(--dark); color: #fff;
  padding: .8rem 1.2rem;
  border-radius: var(--radius);
  font-size: .85rem;
  display: flex; align-items: center; gap: .6rem;
  min-width: 260px; max-width: 380px;
  box-shadow: var(--shadow-md);
  animation: slideInRight .25s ease;
}
.toast.success { background: var(--success); }
.toast.danger  { background: var(--danger); }
.toast.warning { background: var(--warning); color: #fff; }

/* ---- LOGIN ---- */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #154360 0%, #1B4F72 40%, #1A5632 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  position: relative; overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-box {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  position: relative;
}
.login-header { text-align: center; margin-bottom: 2rem; }
.login-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 20px;
  display: grid; place-items: center;
  margin: 0 auto 1rem;
  font-size: 2rem; color: #fff;
}
.login-title { font-size: 1.4rem; font-weight: 800; color: var(--dark); }
.login-subtitle { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; }
.login-madrasah {
  font-size: .78rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: .5rem;
}
.login-divider {
  text-align: center; position: relative;
  margin: 1.5rem 0; font-size: .78rem; color: var(--text-muted);
}
.login-divider::before {
  content: '';
  position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.login-divider span { background: #fff; padding: 0 .75rem; position: relative; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 2.5rem; }
.input-icon-wrap .input-icon {
  position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem; pointer-events: none;
}
.input-eye {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); cursor: pointer; font-size: 1rem;
}

/* ---- DASHBOARD ---- */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; overflow: hidden; position: relative;
}
.welcome-banner::after {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.welcome-text h2 { font-size: 1.3rem; font-weight: 800; }
.welcome-text p { font-size: .85rem; opacity: .85; margin-top: .25rem; }
.welcome-icon { font-size: 3rem; opacity: .3; position: relative; z-index: 1; }

/* ---- TAHAPAN UJIAN ---- */
.progress-steps { display: flex; gap: 0; margin-bottom: 1.5rem; overflow-x: auto; }
.step-item {
  flex: 1; min-width: 100px;
  display: flex; flex-direction: column; align-items: center;
  position: relative; padding: .5rem;
}
.step-item::before {
  content: '';
  position: absolute; top: 1.2rem; right: -50%;
  width: 100%; height: 2px;
  background: var(--border);
}
.step-item:last-child::before { display: none; }
.step-item.done::before { background: var(--success); }
.step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  display: grid; place-items: center;
  font-size: .85rem; color: var(--text-muted);
  z-index: 1; font-weight: 700;
  transition: all var(--transition);
}
.step-item.done .step-dot { background: var(--success); border-color: var(--success); color: #fff; }
.step-item.active .step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-label { font-size: .72rem; color: var(--text-muted); text-align: center; margin-top: .4rem; line-height: 1.3; }
.step-item.active .step-label { color: var(--primary); font-weight: 600; }
.step-item.done .step-label { color: var(--success); }

/* ---- UTILITAS ---- */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: .35rem; } .gap-2 { gap: .65rem; } .gap-3 { gap: 1rem; }
.mt-1 { margin-top: .35rem; } .mt-2 { margin-top: .65rem; } .mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: .35rem; } .mb-2 { margin-bottom: .65rem; } .mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.ms-auto { margin-left: auto; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .8rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-bold { font-weight: 700; }
.fw-600 { font-weight: 600; }
.w-100 { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.empty-state {
  text-align: center; padding: 3rem 1rem; color: var(--text-muted);
}
.empty-state i { font-size: 3rem; opacity: .4; margin-bottom: .75rem; display: block; }
.empty-state p { font-size: .9rem; }
.separator { height: 1px; background: var(--border); margin: 1rem 0; }
.avatar-text {
  width: 36px; height: 36px;
  border-radius: 50%; background: var(--primary-light);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: .85rem;
}
.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- PRINT ---- */
@media print {
  .sidebar, .topbar, .page-actions, .btn { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  .page-content { padding: 0 !important; }
}

/* ---- ANIMASI ---- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ---- RESPONSIVE ---- */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-search { display: none; }
  .page-content { padding: 1rem; }
  .login-box { padding: 1.75rem 1.25rem; }
}
