/* ============================================
   Bel Sekolah SD SIG - CSS Styles
   ============================================ */

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

:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --purple: #8b5cf6;

  --sidebar-width: 260px;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #3b82f6;
  --topbar-height: 64px;

  --bg-main: #f1f5f9;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: #1e293b;
  background: var(--bg-main);
}

/* ============================================
   AUTH PAGE
   ============================================ */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1a1a2e 100%);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 0 16px;
}

.auth-brand .brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  font-size: 32px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
}

.auth-brand .brand-title {
  margin: 8px 0 4px;
  font-size: 2rem;
  font-weight: 800;
  color: white;
}

.auth-brand .brand-subtitle {
  margin: 0;
  color: #94a3b8;
}

.auth-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.auth-card .form-label {
  color: #e2e8f0;
}
.auth-card .form-control,
.auth-card .input-group-text {
  color: white;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}
.auth-card .form-control::placeholder {
  color: #94a3b8;
}
.auth-card .form-control:focus {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}
.auth-card h4 {
  color: white;
}
.auth-card p {
  color: #94a3b8;
}
.auth-card .btn-primary {
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  transition: all 0.2s;
}
.auth-card .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}
.auth-card .btn-outline-secondary {
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   SIDEBAR & ANIMATED SCROLLABLE SIDEBAR
   ============================================ */
:root {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 75px;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #3b82f6;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  background: var(--sidebar-bg);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar-header,
.sidebar-user,
.sidebar-footer {
  flex-shrink: 0;
  transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-brand-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 18px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 10px;
  transition: transform 0.2s ease;
}
.sidebar-brand:hover .sidebar-brand-icon {
  transform: scale(1.08);
}

.sidebar-brand-text {
  transition: opacity 0.25s ease, max-width 0.3s ease;
  max-width: 180px;
  overflow: hidden;
}
.sidebar-brand-text .brand-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
  color: white;
}
.sidebar-brand-text .brand-sub {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
}

.sidebar-user {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sidebar-avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  font-size: 18px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--info));
  border-radius: 50%;
}
.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
  transition: opacity 0.25s ease;
}
.sidebar-user-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
  color: white;
  white-space: nowrap;
}

/* Scrollable Sidebar Menu */
.sidebar-menu {
  flex: 1;
  padding: 12px 0;
  margin: 0;
  list-style: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Custom Scrollbar */
.sidebar-menu::-webkit-scrollbar {
  width: 5px;
}
.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

.sidebar-label {
  padding: 12px 20px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.sidebar-menu li a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 18px;
  margin: 2px 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-menu li a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.sidebar-menu li a.active {
  color: #ffffff;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.85),
    rgba(139, 92, 246, 0.75)
  );
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.sidebar-menu li a i {
  width: 20px;
  font-size: 1.1rem;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sidebar-menu li a:hover i {
  transform: scale(1.15);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logout {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: #94a3b8;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-logout:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

.sidebar-toggle-btn {
  color: #94a3b8;
  transition: transform 0.2s ease, color 0.2s ease;
}
.sidebar-toggle-btn:hover {
  color: white;
  transform: rotate(90deg);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1040;
  display: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

/* Mode Collapsed pada Desktop (Animasi Buka Tutup Sidebar) */
@media (min-width: 992px) {
  body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
  }

  body.sidebar-collapsed .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
  }

  body.sidebar-collapsed .sidebar-brand-text,
  body.sidebar-collapsed .sidebar-user-info,
  body.sidebar-collapsed .sidebar-label,
  body.sidebar-collapsed .sidebar-menu li a span,
  body.sidebar-collapsed .sidebar-logout span {
    opacity: 0;
    width: 0;
    display: none;
  }

  body.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding: 16px 8px;
  }

  body.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding: 12px 8px;
  }

  body.sidebar-collapsed .sidebar-menu li a {
    justify-content: center;
    padding: 12px 0;
    margin: 4px 8px;
  }

  body.sidebar-collapsed .sidebar-menu li a:hover {
    transform: scale(1.08);
  }

  body.sidebar-collapsed .sidebar-menu li a i {
    width: auto;
    font-size: 1.25rem;
  }

  body.sidebar-collapsed .sidebar-footer {
    padding: 12px 8px;
  }

  body.sidebar-collapsed .sidebar-logout {
    justify-content: center;
    padding: 10px 0;
  }
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: 100%;
  transition: all 0.3s ease;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  gap: 16px;
  align-items: center;
  height: var(--topbar-height);
  padding: 0 24px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

.topbar-toggle-btn {
  padding: 4px 8px;
  font-size: 1.4rem;
  color: #64748b;
  background: none;
  border: none;
}
.topbar-toggle-btn:hover {
  color: var(--primary);
}

.topbar-title h5 {
  font-weight: 700;
  color: #1e293b;
}

.topbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
}

.topbar-clock {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 20px;
}

.main-content {
  flex: 1;
  padding: 0;
}

.content-page {
  padding: 24px 0;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h4 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 800;
}

/* ============================================
   CARDS
   ============================================ */
.card-custom {
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-custom-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}
.card-custom-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.card-custom-body {
  padding: 20px;
}

/* ============================================
   CLOCK HERO (Dashboard)
   ============================================ */
.clock-hero {
  position: relative;
  padding: 36px 24px 28px;
  margin-bottom: 0;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
}

.clock-hero.has-next {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.clock-hero::before {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  content: "";
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.15) 0%,
    transparent 60%
  );
  animation: pulse-bg 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-bg {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.clock-display {
  position: relative;
  z-index: 1;
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: white;
  letter-spacing: 0.05em;
  text-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
  line-height: 1.1;
}

.clock-date {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  color: #94a3b8;
}

.clock-hari {
  position: relative;
  z-index: 1;
  margin-top: 2px;
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Bel Berikutnya */
.alert-bel-next {
  padding: 16px 24px;
  color: white;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.bel-next-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 20px;
  color: var(--warning);
  background: rgba(245, 158, 11, 0.2);
  border: 2px solid var(--warning);
  border-radius: 50%;
  animation: ring 2s ease-in-out infinite;
}

@keyframes ring {
  0%,
  100% {
    transform: rotate(0deg);
  }
  10%,
  30% {
    transform: rotate(-15deg);
  }
  20%,
  40% {
    transform: rotate(15deg);
  }
  50% {
    transform: rotate(0deg);
  }
}

.countdown-display {
  font-size: 1.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--warning);
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.stat-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
}
.stat-blue::before {
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}
.stat-green::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}
.stat-purple::before {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}
.stat-orange::before {
  background: linear-gradient(90deg, #f59e0b, #fb923c);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  margin-bottom: 8px;
  font-size: 2rem;
}
.stat-blue .stat-icon {
  color: #3b82f6;
}
.stat-green .stat-icon {
  color: #10b981;
}
.stat-purple .stat-icon {
  color: #8b5cf6;
}
.stat-orange .stat-icon {
  color: #f59e0b;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: #1e293b;
}

.stat-label {
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

/* ============================================
   LOG LIST
   ============================================ */
.log-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.log-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}
.log-item:last-child {
  border-bottom: none;
}
.log-item:hover {
  background: #f8fafc;
}

.log-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  border-radius: 50%;
}
.log-icon.auto {
  color: var(--info);
  background: rgba(6, 182, 212, 0.15);
}
.log-icon.manual {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.15);
}

.log-info {
  flex: 1;
  min-width: 0;
}
.log-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ============================================
   ABSENSI MINI
   ============================================ */
.absensi-mini {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
}
.absensi-mini.hadir {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.absensi-mini.izin {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.absensi-mini.alpha {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.absensi-mini-val {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}
.hadir .absensi-mini-val {
  color: var(--success);
}
.izin .absensi-mini-val {
  color: var(--info);
}
.alpha .absensi-mini-val {
  color: var(--danger);
}

.absensi-mini-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

/* ============================================
   DETAIL ITEM
   ============================================ */
.detail-item {
  height: 100%;
  padding: 12px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
}
.detail-label {
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail-value {
  font-weight: 600;
  color: #1e293b;
}

/* ============================================
   SUARA CARD
   ============================================ */
.suara-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.suara-card:hover {
  background: rgba(59, 130, 246, 0.03);
  border-color: var(--primary);
}

.suara-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  color: white;
  background: linear-gradient(135deg, var(--success), #34d399);
  border-radius: var(--radius-sm);
}

.suara-info {
  flex: 1;
  min-width: 0;
}
.suara-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
  white-space: nowrap;
}

.suara-actions {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
}

/* ============================================
   ABSENSI RADIO BUTTON
   ============================================ */
.absensi-radio .form-check-input {
  display: none;
}
.badge-status {
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  opacity: 0.6;
  transition: all 0.15s;
}
.form-check-input:checked + .badge-status {
  box-shadow: var(--shadow-sm);
  opacity: 1;
  transform: scale(1.05);
}

/* ============================================
   HARI CHECKBOX
   ============================================ */
.hari-check .form-check-input {
  display: none;
}
.hari-check .form-check-label {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.15s;
}
.hari-check .form-check-input:checked + .form-check-label {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

/* ============================================
   TABLES
   ============================================ */
.table th {
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
  border-bottom: 2px solid var(--border-color);
}
.table td {
  padding: 12px 16px;
  vertical-align: middle;
}
.table-hover tbody tr:hover {
  background: rgba(59, 130, 246, 0.03);
}

/* ============================================
   RESPONSIVE & MOBILE OPTIMIZATIONS
   ============================================ */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    height: 100dvh;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    display: block;
    backdrop-filter: blur(4px);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .content-page {
    padding: 16px 0;
  }
  .topbar {
    padding: 0 16px;
  }
}

@media (max-width: 767.98px) {
  .page-header {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }
  .page-header > div:last-child {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .page-header .btn {
    width: 100%;
    justify-content: center;
  }
  
  .clock-display {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
  .stat-card {
    padding: 14px;
  }
  .stat-value {
    font-size: 1.6rem;
  }
  .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
  }
  
  /* Tables on mobile */
  .table-responsive {
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
  }
  .table th {
    padding: 10px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  /* Card custom body padding on mobile */
  .card-custom-body {
    padding: 14px;
  }
  .card-custom-header {
    padding: 12px 14px;
  }
  
  /* Modals on mobile */
  .modal-dialog {
    margin: 0.5rem;
  }
  
  /* Touch target min heights */
  .btn, .form-control, .form-select {
    min-height: 42px;
  }
}

@media (max-width: 575.98px) {
  .topbar-clock {
    padding: 4px 10px;
    font-size: 0.8rem;
  }
  .topbar-right .btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
  }
  .clock-hero {
    padding: 24px 16px 16px;
  }
  .alert-bel-next {
    padding: 12px 16px;
  }
  .countdown-display {
    font-size: 1.4rem;
  }
}

/* ============================================
   SCROLLBAR
   ============================================ */
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* ============================================
   ANIMATIONS & UTILITIES
   ============================================ */
.stat-card,
.card-custom,
.suara-card {
  animation: fadeInUp 0.3s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Badge purple custom */
.badge.bg-purple {
  background: var(--purple) !important;
}

/* Form controls */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
