/* ============================================
   Hafalan Santri - Modern Islamic Design
   ============================================ */

/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Light/Dark Mode */
:root {
  --bg-primary: linear-gradient(135deg, #f5f7fa 0%, #e8f5e9 100%);
  --bg-secondary: #ffffff;
  --bg-nav: linear-gradient(135deg, #1c6d3d 0%, #155c32 100%);
  --text-primary: #2c3e50;
  --text-secondary: #666;
  --text-light: #888;
  --border-color: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.12);
  --accent-color: #1c6d3d;
  --accent-hover: #155c32;
  --card-bg: #ffffff;
  --input-bg: #f9f9f9;
}

[data-theme="dark"] {
  --bg-primary: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  --bg-secondary: #2d2d2d;
  --bg-nav: linear-gradient(135deg, #0f4c2a 0%, #1c6d3d 100%);
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-light: #888;
  --border-color: #404040;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
  --accent-color: #4ade80;
  --accent-hover: #22c55e;
  --card-bg: #2d2d2d;
  --input-bg: #1a1a1a;
}

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

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  background: var(--bg-nav);
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease;
  width: 100%;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.brand {
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  letter-spacing: 0.5px;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.brand-link:hover {
  opacity: 0.9;
}

.brand-icon {
  font-size: 26px;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.brand-text {
  font-weight: 700;
}

.welcome-section {
  display: flex;
  align-items: center;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.welcome-text strong {
  font-weight: 600;
  color: white;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  gap: 5px;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 10px 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: white;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.nav-link:hover::before {
  width: calc(100% - 32px);
}

.nav-link-primary {
  background: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.nav-link-primary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nav-link-danger:hover {
  background: rgba(255, 0, 0, 0.2);
}

.nav-link .icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1;
}

.nav-link .text {
  flex-shrink: 0;
  line-height: 1.2;
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
  flex-shrink: 0;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(15deg) scale(1.05);
}

.theme-toggle:active {
  transform: rotate(15deg) scale(0.95);
}

.theme-icon {
  transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-icon {
  content: '☀️';
}

/* ============================================
   Card & Container
   ============================================ */
.card {
  background: var(--card-bg);
  max-width: 450px;
  margin: 80px auto;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 30px var(--shadow);
  animation: fadeInUp 0.5s ease;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

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

.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 20px 30px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--shadow);
  animation: fadeInUp 0.5s ease;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* ============================================
   Typography
   ============================================ */
h1 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--accent-color);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

h2 {
  color: var(--accent-color);
  font-size: 24px;
  margin-bottom: 15px;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.section-title {
  margin-top: 30px;
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-color);
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent-color);
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease, border-color 0.3s ease;
}

/* ============================================
   Forms
   ============================================ */
form {
  margin-top: 20px;
}

label {
  margin-top: 18px;
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  margin-top: 6px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
}

input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(28, 109, 61, 0.1);
}

button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  border: 0;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 16px;
  margin-top: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(28, 109, 61, 0.3);
  font-family: 'Poppins', sans-serif;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28, 109, 61, 0.4);
}

button:active {
  transform: translateY(0);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
  background: rgba(198, 40, 40, 0.1);
  color: #c62828;
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #c62828;
  font-weight: 500;
  animation: shake 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

[data-theme="dark"] .alert {
  background: rgba(198, 40, 40, 0.2);
  color: #ff6b6b;
  border-left-color: #ff6b6b;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.success {
  background: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #2e7d32;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
}

[data-theme="dark"] .success {
  background: rgba(46, 125, 50, 0.2);
  color: #4ade80;
  border-left-color: #4ade80;
}

/* ============================================
   Tables
   ============================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.table th {
  background: linear-gradient(135deg, #1c6d3d 0%, #155c32 100%);
  color: white;
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.table tr:hover {
  background: var(--input-bg);
}

.table tr:last-child td {
  border-bottom: none;
}

/* ============================================
   Links
   ============================================ */
a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

p {
  text-align: center;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* ============================================
   Dashboard Styles
   ============================================ */
.dashboard-header {
  text-align: center;
  padding: 30px 0;
  margin-bottom: 30px;
}

.dashboard-welcome {
  font-size: 28px;
  color: var(--accent-color);
  margin-bottom: 10px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.dashboard-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  font-style: italic;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.dashboard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.search-box {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 45px 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(28, 109, 61, 0.1);
}

.search-box .search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(28, 109, 61, 0.3);
  font-family: 'Poppins', sans-serif;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28, 109, 61, 0.4);
}

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

.stat-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--shadow);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px var(--shadow-hover);
}

.stat-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 5px;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

/* Hafalan Cards Grid */
.hafalan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.hafalan-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--shadow);
  transition: all 0.3s ease;
  border-left: 4px solid var(--accent-color);
}

.hafalan-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow-hover);
}

.hafalan-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 15px;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-selesai {
  background: rgba(46, 125, 50, 0.15);
  color: #2e7d32;
}

[data-theme="dark"] .status-selesai {
  background: rgba(46, 125, 50, 0.3);
  color: #4ade80;
}

.status-proses {
  background: rgba(230, 81, 0, 0.15);
  color: #e65100;
}

[data-theme="dark"] .status-proses {
  background: rgba(230, 81, 0, 0.3);
  color: #ff9800;
}

.status-belum {
  background: rgba(97, 97, 97, 0.15);
  color: #616161;
}

[data-theme="dark"] .status-belum {
  background: rgba(97, 97, 97, 0.3);
  color: #b0b0b0;
}

.hafalan-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.hafalan-info {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.hafalan-progress {
  margin: 15px 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
  transition: background 0.3s ease;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  border-radius: 4px;
  transition: width 0.3s ease, background 0.3s ease;
}

.progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.hafalan-dates {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.hafalan-action {
  margin-top: 15px;
}

.hafalan-action a {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.hafalan-action a:hover {
  text-decoration: underline;
}

.btn-edit,
.btn-delete {
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-edit {
  background: rgba(33, 150, 243, 0.1);
  color: #2196F3;
  border: 1px solid rgba(33, 150, 243, 0.3);
}

.btn-edit:hover {
  background: rgba(33, 150, 243, 0.2);
  transform: translateY(-2px);
  text-decoration: none;
}

[data-theme="dark"] .btn-edit {
  background: rgba(33, 150, 243, 0.2);
  color: #64b5f6;
  border-color: rgba(33, 150, 243, 0.4);
}

.btn-delete {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.btn-delete:hover {
  background: rgba(244, 67, 54, 0.2);
  transform: translateY(-2px);
  text-decoration: none;
}

[data-theme="dark"] .btn-delete {
  background: rgba(244, 67, 54, 0.2);
  color: #ef5350;
  border-color: rgba(244, 67, 54, 0.4);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.empty-state-text {
  font-size: 18px;
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
}

.empty-state-subtext {
  font-size: 14px;
  color: var(--text-light);
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet and Below */
@media (max-width: 992px) {
  .nav-container {
    padding: 12px 20px;
  }

  .nav-left {
    gap: 15px;
  }

  .welcome-text {
    font-size: 13px;
  }

  .brand a {
    font-size: 22px;
  }

  .container {
    margin: 20px 15px;
    padding: 20px;
  }

  .card {
    max-width: 90%;
    margin: 60px auto;
    padding: 30px 25px;
  }

  h1 {
    font-size: 28px;
  }

  .dashboard-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }
}

/* Mobile Landscape and Below */
@media (max-width: 768px) {
  .nav-container {
    padding: 12px 15px;
    position: relative;
  }

  .nav-left {
    gap: 10px;
  }

  .welcome-section {
    display: none;
  }

  .brand-link {
    font-size: 20px;
  }

  .brand-icon {
    font-size: 22px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-right {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    gap: 0;
  }

  .nav-right.active {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    justify-content: flex-start;
    border-radius: 8px;
    margin-bottom: 5px;
    font-size: 15px;
  }

  .nav-link::before {
    display: none;
  }

  .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
  }

  .nav-divider {
    display: none;
  }

  .theme-toggle {
    width: 100%;
    padding: 12px 15px;
    justify-content: flex-start;
    margin: 5px 0;
    height: auto;
  }

  .container {
    margin: 15px 10px;
    padding: 15px;
  }

  .card {
    margin: 40px auto;
    padding: 25px 20px;
  }

  h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .section-title {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 15px;
  }

  .dashboard-welcome {
    font-size: 22px;
  }

  .dashboard-subtitle {
    font-size: 14px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-number {
    font-size: 28px;
  }

  .stat-icon {
    font-size: 32px;
  }

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

  .table {
    font-size: 12px;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .table th,
  .table td {
    padding: 10px 8px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"] {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
  }

  button {
    padding: 12px;
    font-size: 15px;
  }

  .btn-primary {
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .nav-container {
    padding: 10px 12px;
  }

  .brand-link {
    font-size: 18px;
  }

  .brand-icon {
    font-size: 20px;
  }

  .welcome-section {
    display: none;
  }

  .container {
    margin: 10px 8px;
    padding: 15px 12px;
  }

  .card {
    padding: 20px 15px;
    margin: 30px auto;
  }

  h1 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .section-title {
    font-size: 18px;
  }

  .dashboard-welcome {
    font-size: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-number {
    font-size: 24px;
  }

  .stat-icon {
    font-size: 28px;
  }

  .hafalan-card {
    padding: 15px;
  }

  .hafalan-title {
    font-size: 18px;
  }

  .nav-right {
    padding: 10px;
  }

  .nav-link {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .brand-link {
    font-size: 16px;
  }

  .brand-icon {
    font-size: 18px;
  }

  .container {
    padding: 12px 10px;
  }

  .card {
    padding: 18px 12px;
  }

  h1 {
    font-size: 18px;
  }
}
