/* =========================================================
   MYMONITOR - SISTEM MONITORING STATUS MAHASISWA
   Design System & Styling
   ========================================================= */

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

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Brand Palette */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-focus: rgba(37, 99, 235, 0.25);
  --primary-light: #eff6ff;
  --primary-dark: #1e3a8a;
  
  --secondary: #64748b;
  --secondary-light: #f1f5f9;
  
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  
  /* Status Colors */
  --status-aktif: #10b981;
  --status-aktif-bg: #ecfdf5;
  --status-aktif-border: #a7f3d0;
  --status-aktif-text: #065f46;

  --status-cuti: #f59e0b;
  --status-cuti-bg: #fffbeb;
  --status-cuti-border: #fde68a;
  --status-cuti-text: #92400e;

  --status-do: #ef4444;
  --status-do-bg: #fef2f2;
  --status-do-border: #fecaca;
  --status-do-text: #991b1b;

  --status-mundur: #64748b;
  --status-mundur-bg: #f8fafc;
  --status-mundur-border: #e2e8f0;
  --status-mundur-text: #334155;

  --status-meninggal: #0f172a;
  --status-meninggal-bg: #f1f5f9;
  --status-meninggal-border: #cbd5e1;
  --status-meninggal-text: #0f172a;

  /* Surfaces & Backgrounds */
  --bg-app: #f8fafc;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: #1e293b;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 0.925rem;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--primary-hover);
}

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

/* Sidebar */
.app-sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)) drop-shadow(0 2px 6px rgba(14, 165, 233, 0.4));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.sidebar-logo-img:hover {
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 6px 16px rgba(14, 165, 233, 0.65));
}

.logo-timbul {
  width: 145px;
  height: 145px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.45)) drop-shadow(0 4px 10px rgba(14, 165, 233, 0.35));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.28s ease;
}

.logo-timbul:hover {
  transform: translateY(-4px) scale(1.05);
  filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.55)) drop-shadow(0 6px 16px rgba(14, 165, 233, 0.55));
}

.sidebar-brand-text h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sidebar-brand-text h2 span {
  color: #38bdf8;
}
.sidebar-brand-text p {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  padding: 20px 12px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 1px;
  padding: 12px 14px 6px;
  margin-top: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #cbd5e1;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.nav-link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.nav-link:hover {
  background-color: var(--bg-sidebar-hover);
  color: #ffffff;
}
.nav-link:hover i {
  color: #38bdf8;
}

.nav-link.active {
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.nav-link.active i {
  color: #ffffff;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(0, 0, 0, 0.2);
}
.user-info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.user-details {
  flex: 1;
  margin-left: 10px;
  overflow: hidden;
}
.user-details .user-name {
  font-weight: 600;
  color: white;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-details .user-role {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: capitalize;
}

/* Main Content Area */
.app-main {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Public Guest View (No sidebar, full width) */
.public-view .app-main {
  margin-left: 0 !important;
  width: 100% !important;
}

.public-view .content-body {
  padding: 24px 32px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.public-hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 6px 0 10px 0;
}

.public-hero-text {
  flex: 1;
  min-width: 280px;
  max-width: 820px;
}

.public-hero-logo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-left: auto;
  transform: translateY(-16px);
}

.btn-login-hero {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 18px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-login-hero:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
}

/* Top Navbar */
.top-navbar {
  height: 70px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.current-semester-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}
.current-semester-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Content Container */
.content-body {
  padding: 28px 32px 40px;
  flex: 1;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}
.stat-card.total::after { background-color: var(--primary); }
.stat-card.aktif::after { background-color: var(--status-aktif); }
.stat-card.cuti::after { background-color: var(--status-cuti); }
.stat-card.do::after { background-color: var(--status-do); }
.stat-card.mundur::after { background-color: var(--status-mundur); }
.stat-card.meninggal::after { background-color: var(--status-meninggal); }

.stat-info .stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.stat-info .stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}
.stat-info .stat-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.stat-card.total .stat-icon { background: #eff6ff; color: #2563eb; }
.stat-card.aktif .stat-icon { background: #ecfdf5; color: #10b981; }
.stat-card.cuti .stat-icon { background: #fffbeb; color: #f59e0b; }
.stat-card.do .stat-icon { background: #fef2f2; color: #ef4444; }
.stat-card.mundur .stat-icon { background: #f8fafc; color: #64748b; }
.stat-card.meninggal .stat-icon { background: #f1f5f9; color: #0f172a; }

/* Content Cards & Sections */
.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header-flex {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.card-title-group h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title-group p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.card-body {
  padding: 24px;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 290px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

/* Mahasiswa Status Badges */
.badge-status-aktif {
  background-color: var(--status-aktif-bg);
  color: var(--status-aktif-text);
  border: 1px solid var(--status-aktif-border);
}
.badge-status-cuti {
  background-color: var(--status-cuti-bg);
  color: var(--status-cuti-text);
  border: 1px solid var(--status-cuti-border);
}
.badge-status-do {
  background-color: var(--status-do-bg);
  color: var(--status-do-text);
  border: 1px solid var(--status-do-border);
}
.badge-status-mundur {
  background-color: var(--status-mundur-bg);
  color: var(--status-mundur-text);
  border: 1px solid var(--status-mundur-border);
}
.badge-status-meninggal {
  background-color: var(--status-meninggal-bg);
  color: var(--status-meninggal-text);
  border: 1px solid var(--status-meninggal-border);
}

/* UKT Badges */
.badge-ukt-lunas {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge-ukt-belum {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* KRS Badges */
.badge-krs-ya {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.badge-krs-tidak {
  background-color: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

/* Filter Controls Toolbar */
.filter-toolbar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}
.search-box input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
  background-color: #fafbfc;
}
.search-box input:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.form-select, .form-input {
  padding: 9px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-main);
  background-color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}
.form-select:focus, .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background-color: #ffffff;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: var(--secondary-light);
  border-color: #cbd5e1;
}

.btn-success {
  background-color: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
  background-color: #059669;
  color: #ffffff;
}

.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}
.btn-danger:hover {
  background-color: #dc2626;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.775rem;
  border-radius: var(--radius-sm);
}

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

/* Clean Modern Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table-custom th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 18px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.table-custom td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.table-custom tbody tr {
  transition: background-color 0.15s ease;
}
.table-custom tbody tr:hover {
  background-color: #f8fafc;
}

.student-meta {
  display: flex;
  flex-direction: column;
}
.student-meta .student-name {
  font-weight: 600;
  color: var(--text-main);
}
.student-meta .student-nim {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* Timeline History (Per Semester) */
.history-timeline {
  position: relative;
  padding-left: 28px;
  margin-top: 15px;
}
.history-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 9px;
  bottom: 10px;
  width: 2px;
  background-color: var(--border-color);
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 4px solid var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.timeline-item.aktif .timeline-dot { border-color: var(--status-aktif); }
.timeline-item.cuti .timeline-dot { border-color: var(--status-cuti); }
.timeline-item.do .timeline-dot { border-color: var(--status-do); }
.timeline-item.mundur .timeline-dot { border-color: var(--status-mundur); }
.timeline-item.meninggal .timeline-dot { border-color: var(--status-meninggal); }

.timeline-content {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.timeline-semester-name {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Modal Popup */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.show {
  display: flex;
}
.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalSlide 0.25s ease-out;
}
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-close:hover {
  color: var(--text-main);
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: #f8fafc;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  animation: toastSlide 0.3s ease;
}
.toast.success { border-left: 4px solid var(--status-aktif); }
.toast.error { border-left: 4px solid var(--status-do); }
.toast.warning { border-left: 4px solid var(--status-cuti); }

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 3rem;
  color: #cbd5e1;
  margin-bottom: 12px;
}
.empty-state h4 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

/* Print Styling for Rekap PDF */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-sidebar, .top-navbar, .filter-toolbar, .btn, .no-print, #toast-container {
    display: none !important;
  }
  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .content-body {
    padding: 0 !important;
  }
  .card-box {
    border: none !important;
    box-shadow: none !important;
  }
  .print-header {
    display: block !important;
    margin-bottom: 20px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
  }
  .table-custom th, .table-custom td {
    border: 1px solid #ddd !important;
    padding: 6px 10px !important;
    font-size: 9pt !important;
  }
}

.print-header {
  display: none;
}

/* =========================================================
   RESPONSIVE DESIGN SYSTEM (MOBILE PHONE & TABLET)
   ========================================================= */

/* Mobile Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 95;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

@media (max-width: 992px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* 1. App Sidebar & Drawer Mobile */
  #sidebar-toggle {
    display: inline-flex !important;
  }

  .app-sidebar {
    transform: translateX(-100%);
    width: 275px;
    z-index: 100;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.4);
  }

  .app-sidebar.show {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* 2. Top Navbar Mobile */
  .top-navbar {
    height: auto;
    min-height: 56px;
    padding: 8px 14px;
    gap: 8px;
  }

  .digital-clock-badge {
    display: none !important;
  }

  .nav-preview-text {
    display: none !important;
  }

  .nav-preview-btn {
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
  }

  .user-top-badge {
    padding: 3px 6px 3px 3px !important;
  }

  .user-top-badge > div:nth-child(2) {
    display: none !important;
  }

  /* 3. Content Body & Container */
  .content-body {
    padding: 14px 12px 36px;
  }

  .public-view .content-body {
    padding: 14px 12px 30px;
  }

  /* 4. Hero Banner Publik Mobile */
  .public-hero-container {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    text-align: left;
  }

  .public-hero-text {
    max-width: 100%;
    min-width: 100%;
  }

  .public-hero-text h2 {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
  }

  .public-hero-text p {
    font-size: 0.825rem !important;
    line-height: 1.5 !important;
  }

  .public-hero-logo-col {
    margin: 8px auto 0 auto !important;
    transform: none !important;
    width: 100%;
    text-align: center;
  }

  .logo-timbul {
    width: 96px !important;
    height: 96px !important;
  }

  .btn-login-hero {
    width: auto;
    padding: 8px 22px;
    font-size: 0.825rem;
  }

  /* 5. Stat Cards Grid Mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
  }

  .stat-card {
    padding: 12px 14px;
  }

  .stat-info .stat-value {
    font-size: 1.35rem;
  }

  .stat-info .stat-label {
    font-size: 0.72rem;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    border-radius: 8px;
  }

  /* 6. Filter Controls & Toolbar */
  .filter-toolbar {
    padding: 12px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-toolbar > * {
    width: 100% !important;
    min-width: 100% !important;
  }

  .search-box {
    min-width: 100% !important;
  }

  .form-select, .form-input, .btn {
    width: 100%;
    justify-content: center;
  }

  .card-header-flex {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .card-header-flex .btn-group {
    width: 100%;
    flex-wrap: wrap;
  }

  .card-header-flex .btn-group .btn {
    flex: 1 1 auto;
  }

  /* 7. Form Grid & Modals */
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modal-dialog {
    max-width: 96vw;
    margin: 10px auto;
    max-height: 92vh;
  }

  .modal-header, .modal-body, .modal-footer {
    padding: 14px 16px;
  }

  /* 8. Tables Horizontal Scroll */
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 8px;
  }

  .table-custom th, .table-custom td {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  /* 9. Generator Barcode Bingkai di Mobile */
  .barcode-generator-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .preview-canvas-container {
    padding: 16px 8px;
  }

  .frame-card-canvas {
    max-width: 100% !important;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 10px 12px;
  }

  .content-body {
    padding: 12px 10px 30px;
  }

  .top-navbar {
    padding: 6px 10px;
  }

  .table-custom th, .table-custom td {
    padding: 8px 10px;
    font-size: 0.775rem;
  }
}

