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

/* ===== iOS PREMIUM LIGHT DESIGN SYSTEM ===== */
:root {
  /* Vibrant Apple iOS Light Palette */
  --primary: #34c759;
  /* iOS Green */
  --primary-light: #30d158;
  /* iOS Bright Green */
  --primary-lighter: #eafaf1;
  /* iOS Soft Green background */
  --primary-dark: #248a3d;
  /* iOS Dark Green */
  --primary-glow: rgba(52, 199, 89, 0.12);

  --accent: #ff9500;
  /* iOS Orange */
  --accent-light: #fff4e5;
  /* iOS Soft Orange */
  --accent-dark: #d07c00;

  --info: #007aff;
  /* iOS Blue */
  --info-light: #e5f1ff;
  /* iOS Soft Blue */
  --info-dark: #005ec3;

  --danger: #ff3b30;
  /* iOS Red */
  --danger-light: #ffebe5;
  /* iOS Soft Red */
  --danger-dark: #c92a20;

  --warning: #ffcc00;
  /* iOS Yellow */
  --warning-light: #fffbeb;

  --purple: #af52de;
  /* iOS Purple */
  --purple-light: #f7e5ff;
  --purple-dark: #893ab8;

  /* iOS Gradients for Icon Tiles */
  --grad-blue: linear-gradient(135deg, #5ac8fa, #007aff);
  --grad-green: linear-gradient(135deg, #4cd964, #34c759);
  --grad-orange: linear-gradient(135deg, #ffcc00, #ff9500);
  --grad-red: linear-gradient(135deg, #ff5e3a, #ff3b30);
  --grad-purple: linear-gradient(135deg, #d573f5, #af52de);
  --grad-teal: linear-gradient(135deg, #52e5e7, #13c2c2);
  --grad-gray: linear-gradient(135deg, #c7c7cc, #8e8e93);

  /* iOS Backgrounds & Surfaces (Light Theme) */
  --bg: #f2f2f7;
  /* iOS Grouped Background Color */
  --bg-secondary: #ffffff;
  /* Pure White */
  --surface: #ffffff;
  --surface-hover: #fcfcfd;
  --border: rgba(0, 0, 0, 0.045);
  --border-2: rgba(0, 0, 0, 0.08);
  --border-focus: #007aff;
  --border-neutral: rgba(0, 0, 0, 0.08);

  /* Typography */
  --text-primary: #000000;
  --text-secondary: #3c3c43;
  --text-muted: #8e8e93;

  /* iOS Style Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);

  /* Apple Superellipse Corners */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  /* Navigation Dimension */
  --nav-height: 64px;
  --sidebar-width: 270px;

  /* Standard Transitions */
  --transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.12s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Plus Jakarta Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

input,
select,
textarea {
  font-family: inherit;
  outline: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* ===== iOS ICON TILE ===== */
.ios-icon-tile {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.ios-icon-tile.blue {
  background: var(--grad-blue);
}

.ios-icon-tile.green {
  background: var(--grad-green);
}

.ios-icon-tile.orange {
  background: var(--grad-orange);
}

.ios-icon-tile.red {
  background: var(--grad-red);
}

.ios-icon-tile.purple {
  background: var(--grad-purple);
}

.ios-icon-tile.teal {
  background: var(--grad-teal);
}

.ios-icon-tile.gray {
  background: var(--grad-gray);
}

.ios-icon-tile svg,
.ios-icon-tile i {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2.2;
}

/* ===== LUCIDE ICON GLOBAL STYLE ===== */
.lucide-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: middle;
  transition: var(--transition);
}

/* ===== LAYOUT WRAPPER ===== */
.page-wrapper {
  display: flex;
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 24px 20px;
  animation: fadeInUp 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (min-width: 1024px) {
  .main-content {
    padding: 32px 40px;
  }
}

/* Page View Visibility with Smooth Blur Animation */
.page-view {
  display: none;
}

.page-view.active {
  display: block;
  animation: pageSlideUpFade 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageSlideUpFade {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}


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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== NAVBAR (iOS GLASS HEADER) ===== */
.navbar {
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--grad-green);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.15rem;
  box-shadow: 0 3px 8px rgba(52, 199, 89, 0.2);
}

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

.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.user-avatar {
  width: 26px;
  height: 26px;
  background: var(--grad-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.78rem;
}

.hamburger {
  display: none;
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.hamburger:hover {
  background: rgba(0, 0, 0, 0.08);
}

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

/* ===== SIDEBAR (iOS SETTINGS LIST STYLE) ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 0.5px solid rgba(0, 0, 0, 0.08);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  transition: var(--transition-slow);
  flex-shrink: 0;
}

.sidebar-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition);
  margin-bottom: 2px;
  gap: 12px;
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.035);
}

.nav-item.active {
  background: rgba(52, 199, 89, 0.1);
  color: var(--primary-dark);
  font-weight: 600;
}

.nav-item.active .ios-icon-tile {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.nav-item.active .nav-badge {
  background: var(--accent);
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: var(--nav-height);
    z-index: 9999;
    width: 270px;
    height: calc(100vh - var(--nav-height));
    box-shadow: var(--shadow-xl);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--bg-secondary);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--nav-height);
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

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

/* ===== CARDS (iOS WIDGET STYLE) ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 0, 0, 0.08);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .lucide-icon,
.card-title svg {
  color: var(--primary);
}

/* Stat Cards */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.stat-change {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 6px;
  display: inline-block;
}

.stat-change.up {
  background: var(--primary-lighter);
  color: var(--primary-dark);
}

.stat-change.down {
  background: var(--danger-light);
  color: var(--danger-dark);
}

/* Color overrides for Stat Cards using iOS tiles */
.stat-card.green .stat-icon {
  background: var(--grad-green);
  color: white;
}

.stat-card.amber .stat-icon {
  background: var(--grad-orange);
  color: white;
}

.stat-card.blue .stat-icon {
  background: var(--grad-blue);
  color: white;
}

.stat-card.red .stat-icon {
  background: var(--grad-red);
  color: white;
}

.stat-card.purple .stat-icon {
  background: var(--grad-purple);
  color: white;
}

/* ===== PRAYER CARD (iOS LOCKSCREEN WIDGET) ===== */
.prayer-card {
  background: linear-gradient(135deg, #10b981, #047857);
  background-image: linear-gradient(135deg, #34c759 0%, #248a3d 100%);
  border-radius: var(--radius-xl);
  padding: 28px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(52, 199, 89, 0.25);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.prayer-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.prayer-card .prayer-name {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.prayer-card .prayer-label {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 4px 0;
  letter-spacing: -0.02em;
}

.prayer-card .prayer-time {
  font-size: 0.9rem;
  opacity: 0.85;
}

.prayer-card .prayer-countdown {
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin: 16px 0 8px;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.prayer-card .prayer-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.16);
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.prayer-card .prayer-status-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 6px #34c759;
}

/* Prayer row list (Grouped List Style) */
.prayer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prayer-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f2f2f7;
  border: 0.5px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition);
  gap: 12px;
}

.prayer-row.active {
  border-color: rgba(52, 199, 89, 0.2);
  background: var(--primary-lighter);
  box-shadow: var(--shadow-sm);
}

.prayer-row.passed {
  opacity: 0.5;
}

.prayer-row .p-icon {
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prayer-row .p-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.prayer-row .p-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.prayer-row .p-range {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
}

.prayer-row .p-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
}

/* ===== STREAK CARD (iOS HEALTH WIDGET STYLE) ===== */
.streak-card {
  background: linear-gradient(135deg, #ff9500, #ff5e3a);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  color: white;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 20px rgba(255, 149, 0, 0.2);
  position: relative;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.streak-card::before {
  content: '⚡';
  position: absolute;
  right: -5px;
  bottom: -15px;
  font-size: 5.5rem;
  opacity: 0.15;
  pointer-events: none;
}

.streak-number {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
}

/* ===== TABLE (iOS GROUPED LIST TABLE) ===== */
.table-wrapper,
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  background: white;
  margin-bottom: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
  padding-bottom: 4px;
}

.table-wrapper::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.table-wrapper::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 999px;
  margin: 0 6px;
}

.table-wrapper::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.table-wrapper::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

thead {
  background: #f2f2f7;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
  transition: var(--transition-fast);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: #fbfbfb;
}

/* Table row stagger slide-in animation */
.table-row-animate {
  animation: tableRowSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes tableRowSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

tbody td {
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  white-space: nowrap;
  vertical-align: middle;
}

tbody td strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* iOS Student cell inside tables */
.stu-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stu-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f2f2f7;
  color: #3c3c43;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.stu-name {
  font-weight: 700;
  color: #1c1c1e;
  font-size: 0.88rem;
}

/* iOS Pagination Styling */
.ios-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.05);
  background: #ffffff;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.pagination-info {
  font-size: 0.8rem;
  color: #8e8e93;
  font-weight: 600;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  color: #1c1c1e;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  cursor: pointer;
}

.pagination-btn:hover:not(:disabled) {
  background: #f2f2f7;
  border-color: rgba(0, 0, 0, 0.1);
}

.pagination-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-ellipsis {
  font-size: 0.85rem;
  color: #8e8e93;
  padding: 0 4px;
  font-weight: 700;
}

.check-cell {
  text-align: center;
}

.check-yes {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.check-no {
  color: var(--text-muted);
  opacity: 0.35;
}

/* ===== iOS SEGMENTED CONTROL (UISegmentedControl) ===== */
.role-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(120, 120, 128, 0.12);
  border-radius: 9px;
  padding: 2px;
  margin-bottom: 20px;
  position: relative;
}

.role-selector.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.role-btn {
  border: none;
  background: none;
  padding: 8px 4px;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  outline: none;
}

.role-btn:hover {
  color: var(--text-primary);
}

.role-btn.selected {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.role-btn .role-icon {
  font-size: 1.25rem;
}

.role-btn .role-name {
  font-size: 0.78rem;
  font-weight: 600;
}

/* ===== FORMS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-label span {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  padding: 10px 14px;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: #f2f2f7;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
}

.form-control:focus {
  background: #ffffff;
  border-color: var(--info);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-row {
  display: grid;
  gap: 16px;
}

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

@media (max-width: 500px) {
  .form-row.cols-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ===== BUTTONS (iOS CLEAN & HIGHLIGHT) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  border: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(52, 199, 89, 0.15);
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: rgba(120, 120, 128, 0.12);
  color: var(--info);
}

.btn-secondary:hover {
  background: rgba(120, 120, 128, 0.18);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger-dark);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 6px rgba(255, 149, 0, 0.15);
}

.btn-accent:hover {
  background: #ffa126;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 24px;
  border-radius: 14px;
}

.btn .lucide-icon,
.btn svg {
  margin-right: 6px;
  width: 16px;
  height: 16px;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-green {
  background: var(--primary-lighter);
  color: var(--primary-dark);
}

.badge-amber {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.badge-red {
  background: var(--danger-light);
  color: var(--danger-dark);
}

.badge-blue {
  background: var(--info-light);
  color: var(--info-dark);
}

.badge-purple {
  background: var(--purple-light);
  color: var(--purple-dark);
}

.badge-gray {
  background: #e5e5ea;
  color: #5c5c60;
}

/* ===== SECTION HEADER ===== */
.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.025em;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== ALERTS ===== */
.alert {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

.alert-info {
  background: var(--info-light);
  color: var(--info-dark);
}

.alert-warning {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.alert-danger {
  background: var(--danger-light);
  color: var(--danger-dark);
}

.alert-icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* ===== LIST ITEMS ===== */
.report-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: white;
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.report-item:hover {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow);
}

.stu-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

/* ===== MODALS (iOS BOTTOM SHEET ON MOBILE, CARD ON DESKTOP) ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: white;
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.94) translateY(10px);
  transition: var(--transition);
  max-height: 85vh;
  overflow-y: auto;
  border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 12px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e5ea;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: #d1d1d6;
  color: var(--text-primary);
}

@media (max-width: 576px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
    max-height: 90vh;
  }

  .modal-overlay.open .modal {
    transform: translateY(0);
  }
}

/* ===== PROFILE HERO (iOS INSPIRED PROFILE CARD) ===== */
.profile-hero {
  background: linear-gradient(135deg, #10b981 0%, #059669 60%, #0d9488 100%);
  background-image: linear-gradient(135deg, #34c759 0%, #248a3d 100%);
  border-radius: var(--radius-xl);
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(52, 199, 89, 0.15);
  margin-bottom: 20px;
}

.profile-hero::before {
  content: '☪';
  position: absolute;
  right: 15px;
  bottom: -15px;
  font-size: 7.5rem;
  opacity: 0.08;
  line-height: 1;
  pointer-events: none;
}

.profile-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  border: 2px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.profile-hero h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.profile-hero p {
  opacity: 0.85;
  font-size: 0.88rem;
}

/* ===== WEEKLY HEATMAP (STUDENT ACTIVITY WIDGET) ===== */
.weekly-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
}

.weekly-day {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.weekly-cell {
  aspect-ratio: 1;
  border-radius: 7px;
  background: #e5e5ea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  transition: var(--transition);
  color: var(--text-secondary);
}

.weekly-cell.full {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 4px rgba(52, 199, 89, 0.2);
}

.weekly-cell.partial {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.weekly-cell.none {
  background: var(--danger-light);
  color: var(--danger);
}

/* ===== BOTTOM NAVIGATION (iOS TAB BAR) ===== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  z-index: 100;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }

  .main-content {
    padding-bottom: 95px !important;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  flex: 1;
  height: 100%;
  transition: var(--transition-fast);
}

.bottom-nav-item .lucide-icon,
.bottom-nav-item svg {
  width: 22px !important;
  height: 22px !important;
  margin-bottom: 3px;
  stroke-width: 2.2;
}

.bottom-nav-item.active {
  color: var(--primary-dark);
}

.bottom-nav-item.active .lucide-icon,
.bottom-nav-item.active svg {
  stroke: var(--primary);
  transform: scale(1.08);
}

/* ===== GRID SYSTEM ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

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

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

@media (max-width: 640px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-20 {
  gap: 20px;
}

/* ===== SPACING ===== */
.mt-4 {
  margin-top: 4px;
}

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

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

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

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

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

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

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

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

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

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

.hidden {
  display: none !important;
}

.w-full {
  width: 100%;
}

/* ===== iOS NOTIFICATION BANNER TOASTS ===== */
#toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 350px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1), toast-out 0.3s cubic-bezier(0.16, 1, 0.3, 1) 2.7s forwards;
}

.toast.success {
  border-left: 4px solid var(--primary);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--accent);
}

.toast.info {
  border-left: 4px solid var(--info);
}

.toast-icon {
  font-size: 1.15rem;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.93);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-16px) scale(0.93);
  }
}

/* ===== QR DISPLAY FRAME ===== */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(0, 0, 0, 0.15);
}

.qr-frame {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.qr-frame::before,
.qr-frame::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--primary);
  border-style: solid;
}

.qr-frame::before {
  top: 6px;
  left: 6px;
  border-width: 3px 0 0 3px;
  border-radius: 6px 0 0 0;
}

.qr-frame::after {
  bottom: 6px;
  right: 6px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 6px 0;
}

.qr-student-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.qr-student-id {
  font-family: monospace;
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.9rem;
}

/* ===== LOGIN PAGE (iOS LOCKSCREEN MOCKUP) ===== */
.login-page {
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 10% 20%, rgba(52, 199, 89, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 122, 255, 0.05) 0%, transparent 40%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  max-width: 390px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  position: relative;
}

.login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo .logo-icon {
  width: 60px;
  height: 60px;
  background: var(--grad-green);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.25);
  color: white;
}

.login-logo h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.login-logo p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.tagline {
  font-family: 'Amiri', serif;
  font-size: 0.95rem;
  color: var(--primary-dark);
  text-align: center;
  margin-top: 6px;
  direction: rtl;
}

.error-msg {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
  font-weight: 600;
  display: none;
}

/* Demo accounts */
.demo-accounts {
  margin-top: 20px;
  padding: 12px;
  background: #f2f2f7;
  border-radius: 10px;
}

.demo-accounts h4 {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  margin: 2px;
  background: #ffffff;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.demo-chip:hover {
  background: var(--primary-lighter);
  border-color: rgba(52, 199, 89, 0.2);
  color: var(--primary-dark);
}

/* ===== iOS SETTINGS-LIKE LIST LAYOUTS ===== */
.schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-day {
  background: #f2f2f7;
  border-radius: var(--radius);
  border: 0.5px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.schedule-day-header {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.schedule-day-header .day-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.schedule-day-body {
  padding: 12px 16px;
}

/* Schedule Tag Pill Styles */
.schedule-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: white;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  font-size: 0.78rem;
  font-weight: 600;
  margin: 3px 2px;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: var(--transition-fast);
  line-height: 1.2;
}

.schedule-tag:hover {
  background: #f8f9fa;
  border-color: var(--primary);
}

.schedule-tag i,
.schedule-tag svg,
.schedule-tag .lucide-icon {
  width: 14px !important;
  height: 14px !important;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.schedule-tag.active {
  background: var(--primary-lighter);
  color: var(--primary-dark);
  border-color: rgba(52, 199, 89, 0.3);
}

/* iOS Checkbox Toggles */
.prayer-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media(min-width: 480px) {
  .prayer-checkbox-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media(min-width: 768px) {
  .prayer-checkbox-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.prayer-cb {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  background: white;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}

.prayer-cb input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.prayer-cb.checked {
  border-color: var(--primary);
  background: var(--primary-lighter);
  box-shadow: 0 1px 4px rgba(52, 199, 89, 0.1);
}

.prayer-cb .pc-icon {
  font-size: 1.2rem;
}

.prayer-cb .pc-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.prayer-cb.checked .pc-name {
  color: var(--primary-dark);
}

/* Laporan Selects */
.report-prayer-select {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media(min-width: 480px) {
  .report-prayer-select {
    grid-template-columns: repeat(5, 1fr);
  }
}

.prayer-select-btn {
  background: white;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.prayer-select-btn .pray-icon {
  font-size: 1.3rem;
}

.prayer-select-btn span:not(.pray-icon) {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.prayer-select-btn.active-window {
  border-color: var(--primary);
  background: #f4fbf6;
  box-shadow: 0 2px 10px rgba(52, 199, 89, 0.12);
}

.prayer-select-btn.selected {
  border-color: var(--primary-dark);
  background: var(--primary-lighter);
  box-shadow: 0 4px 14px rgba(52, 199, 89, 0.25);
  transform: translateY(-2px);
}

.prayer-select-btn.selected span:not(.pray-icon) {
  color: var(--primary-dark);
}

.prayer-select-btn.done,
.prayer-select-btn.disabled {
  border-color: rgba(0, 0, 0, 0.06);
  background: #f8f8fa;
  cursor: not-allowed;
  opacity: 0.65;
  filter: grayscale(0.2);
}

.prayer-select-btn.done span:not(.pray-icon),
.prayer-select-btn.disabled span:not(.pray-icon) {
  color: var(--text-muted);
}

/* Location Tags */
.location-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: white;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.location-tag.selected {
  border-color: var(--primary);
  background: var(--primary-lighter);
  color: var(--primary-dark);
  box-shadow: 0 1px 4px rgba(52, 199, 89, 0.1);
}

/* Class Stat */
.class-stat-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media(min-width: 600px) {
  .class-stat-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

.class-stat {
  background: #f2f2f7;
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  border: 0.5px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition);
  cursor: pointer;
}

.class-stat:hover {
  background: white;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-sm);
}

.class-stat.active {
  background: white;
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: scale(1.03);
}

.class-stat .cs-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.class-stat .cs-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
  text-transform: uppercase;
}

/* Scanner Results */
@keyframes popIn {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }

  50% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

.scan-result {
  padding: 16px;
  border-radius: var(--radius);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  background: #f2f2f7;
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition);
}

.scan-result.success {
  border-color: var(--primary-light);
  background: var(--primary-lighter);
  color: var(--primary-dark);
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.scan-result.already {
  border-color: var(--accent-light);
  background: var(--accent-light);
  color: var(--accent-dark);
  animation: shake 0.35s ease-in-out both;
}

.scan-result.error {
  border-color: #fca5a5;
  background: var(--danger-light);
  color: var(--danger-dark);
  animation: shake 0.35s ease-in-out both;
}

/* QR Scanner Box */
#reader {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: none !important;
  background: #000000;
  box-shadow: var(--shadow-sm);
}

#reader video {
  border-radius: var(--radius);
  object-fit: cover;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
}

.empty-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  opacity: 0.7;
}

.empty-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 600px) {
  .hide-mobile {
    display: none !important;
  }

  .navbar-user span {
    display: none !important;
  }

  .navbar-user {
    padding: 4px !important;
  }

  .navbar-right {
    gap: 8px !important;
  }

  .profile-hero {
    padding: 20px 16px !important;
  }

  .profile-hero h2 {
    font-size: 1.25rem !important;
  }

  .streak-card {
    padding: 16px !important;
  }

  .streak-number {
    font-size: 2.2rem !important;
  }

  .stat-card {
    padding: 12px 10px !important;
    gap: 8px !important;
  }

  .stat-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
  }

  .stat-icon svg,
  .stat-icon i {
    width: 18px !important;
    height: 18px !important;
  }

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

  .stat-label {
    font-size: 0.7rem !important;
  }
}

/* ===== iOS & PREMIUM ANIMATION STYLES ===== */

/* Confetti System */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.8;
  animation: fall linear forwards;
}

@keyframes fall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Fullscreen Sending Overlay */
.animation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.97);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.animation-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sending-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.airplane-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 50%;
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(52, 199, 89, 0.2);
}

.airplane-wrapper svg,
.airplane-wrapper i {
  width: 36px;
  height: 36px;
}

.airplane-wrapper.sending svg,
.airplane-wrapper.sending i {
  animation: fly-away 1.5s infinite ease-in-out;
}

.airplane-wrapper.success {
  background: var(--primary);
  color: white;
  animation: scale-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fly-away {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }

  45% {
    transform: translate(60px, -60px) scale(0.6);
    opacity: 0;
  }

  50% {
    transform: translate(-60px, 60px) scale(0.6);
    opacity: 0;
  }

  100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes scale-up {
  0% {
    transform: scale(0.6);
  }

  100% {
    transform: scale(1.1);
  }
}

.sending-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 12px;
}

/* iOS Alert Celebration Modal */
.ios-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ios-alert-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ios-alert-modal {
  width: 300px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
  transform: scale(1.12);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.ios-alert-overlay.active .ios-alert-modal {
  transform: scale(1);
  opacity: 1;
}

.ios-alert-header {
  padding: 28px 24px 20px 24px;
}

.ios-alert-icon {
  width: 64px;
  height: 64px;
  background: #eafaf1;
  color: #34c759;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px auto;
  font-size: 2rem;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.15);
}

.ios-alert-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.ios-alert-message {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.ios-alert-buttons {
  display: flex;
  border-top: 0.5px solid rgba(0, 0, 0, 0.12);
}

.ios-alert-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #007aff;
  cursor: pointer;
  outline: none;
  transition: background 0.2s;
}

.ios-alert-btn:hover {
  background: rgba(0, 0, 0, 0.03);
}

.ios-alert-btn:active {
  background: rgba(0, 0, 0, 0.06);
}

/* Premium iOS Report Card Design */
.ios-report-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ios-report-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.ios-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ios-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e4f9eb, #c3f2d2);
  color: #248a3d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.ios-user-info {
  flex: 1;
}

.ios-user-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1c1c1e;
  line-height: 1.2;
}

.ios-meta-info {
  font-size: 0.78rem;
  color: #8e8e93;
  margin-top: 2px;
}

.ios-badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ios-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ios-pill-blue {
  background: rgba(0, 122, 255, 0.1);
  color: #007aff;
}

.ios-pill-gray {
  background: rgba(142, 142, 147, 0.1);
  color: #8e8e93;
}

.ios-note-bubble {
  background: #f2f2f7;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  color: #3a3a3c;
  line-height: 1.4;
  border-left: 3px solid #007aff;
}

.ios-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 0.5px solid #f2f2f7;
}

.ios-status-text {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ios-status-pending {
  color: #ff9500;
}

.ios-status-approved {
  color: #34c759;
}

.ios-approve-btn {
  background: #007aff;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s, transform 0.1s;
}

.ios-approve-btn:hover {
  background: #0062cc;
}

.ios-approve-btn:active {
  transform: scale(0.96);
}

/* ===== CIRCULAR PERCENTAGE PROGRESS & RADIAL GAUGE DESIGN SYSTEM ===== */
.circle-progress-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto;
}

.circle-progress-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-progress-ring svg {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  display: block;
}

.circle-progress-bg {
  stroke: rgba(0, 0, 0, 0.06);
  fill: none;
}

.circle-progress-bar {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.3s ease;
  filter: drop-shadow(0px 0px 6px currentColor);
}

.circle-progress-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  width: 80%;
}

.circle-percent-val {
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.circle-percent-unit {
  font-size: 0.55em;
  font-weight: 700;
  opacity: 0.85;
  margin-left: 1px;
}

.circle-percent-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Radial Gauge Hero Card */
.radial-hero-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.radial-hero-card::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(52, 199, 89, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.radial-hero-info {
  flex: 1;
  min-width: 0;
}

.radial-hero-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.radial-hero-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.radial-hero-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radial-mini-stat {
  background: var(--bg);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

/* Prayer Radial Ring Card */
.prayer-radial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.prayer-radial-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.prayer-radial-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(52, 199, 89, 0.25);
}

.prayer-radial-card.done {
  background: linear-gradient(180deg, #ffffff 0%, #f6fcf8 100%);
  border-color: rgba(52, 199, 89, 0.3);
}

.prc-name {
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: 8px;
  color: var(--text-primary);
}

.prc-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.prc-status {
  margin-top: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Excel Export Button */
.btn-excel {
  background: #107c41;
  color: white;
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(16, 124, 65, 0.2);
}

.btn-excel:hover {
  background: #0b5c30;
  box-shadow: 0 4px 12px rgba(16, 124, 65, 0.3);
  transform: translateY(-1px);
}

.btn-excel:active {
  transform: translateY(0);
}

/* 1-Click Attendance Toggle Button */
.att-toggle-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
}

.att-toggle-btn.present {
  background: var(--primary-lighter);
  color: var(--primary-dark);
  border-color: rgba(52, 199, 89, 0.3);
}

.att-toggle-btn.present:hover {
  background: #d5f7e2;
  box-shadow: 0 2px 6px rgba(52, 199, 89, 0.2);
}

.att-toggle-btn.absent {
  background: #f2f2f7;
  color: var(--text-muted);
  border-color: rgba(0, 0, 0, 0.08);
}

.att-toggle-btn.absent:hover {
  background: var(--primary-lighter);
  color: var(--primary-dark);
  border-color: var(--primary);
}

/* Reject Modal / Feedback Box */
.feedback-box {
  background: #fff8f8;
  border-left: 3px solid var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--danger-dark);
  margin-top: 8px;
}

/* Student Management Action Buttons */
.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.icon-btn.danger:hover {
  background: var(--danger-light);
  color: var(--danger-dark);
  border-color: var(--danger);
}

@media (max-width: 768px) {
  .radial-hero-card {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .radial-hero-title {
    justify-content: center;
  }

  .radial-hero-stats {
    justify-content: center;
  }
}

/* Pencil Writing Animation */
@keyframes pencilWrite {
  0% {
    transform: rotate(0deg) translateX(0);
  }

  15% {
    transform: rotate(-15deg) translateX(-2px);
  }

  30% {
    transform: rotate(5deg) translateX(1px);
  }

  45% {
    transform: rotate(-10deg) translateX(-1px);
  }

  60% {
    transform: rotate(0deg) translateX(0);
  }

  100% {
    transform: rotate(0deg) translateX(0);
  }
}

.animate-pencil {
  animation: pencilWrite 1.5s infinite ease-in-out;
  transform-origin: bottom left;
}

.btn-primary:hover .animate-pencil {
  animation: pencilWrite 0.8s infinite ease-in-out;
}

/* Typewriter Text Animation */
.typewriter-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid rgba(255, 255, 255, 0.75);
  width: 0;
  animation: typewrite 2.5s steps(20, end) 0.5s forwards, blinkCursor 0.6s step-end infinite;
}

@keyframes typewrite {
  from {
    width: 0;
  }

  to {
    width: 11em;
  }
}

@keyframes blinkCursor {

  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.75);
  }

  50% {
    border-color: transparent;
  }
}




/* Print Styles for Bulk QR Cards & PDF Export */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  body>*:not(#print-container) {
    display: none !important;
  }

  #print-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 6mm;
    padding: 0;
    background: #fff;
  }

  .print-barcode-card {
    border: 1.5px solid #34c759;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    page-break-inside: avoid;
    break-inside: avoid;
    display: flex !important;
    flex-direction: column !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    box-shadow: none;
    max-height: 80mm;
  }

  .print-barcode-card .card-header {
    background: #1b5e20;
    color: #fff;
    padding: 6px 10px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px;
    border-bottom: 2px solid #144718;
    text-align: left;
  }

  .print-barcode-card .school-logo {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0;
    object-fit: contain;
  }

  .print-barcode-card .header-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100%;
  }

  .print-barcode-card .school-name {
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #ffffff;
  }

  .print-barcode-card .school-sub {
    font-size: 8px;
    opacity: 0.9;
    font-weight: 600;
    color: #e8f5e9;
  }

  .print-barcode-card .card-body {
    padding: 10px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex-grow: 1;
    background: #fafafa;
  }

  .print-barcode-card .qr-wrapper {
    background: #fff;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
  }

  .print-barcode-card canvas,
  .print-barcode-card img {
    width: 3.2cm !important;
    height: 3.2cm !important;
    margin: 0 auto !important;
  }

  .print-barcode-card .student-info {
    text-align: center;
    width: 100%;
  }

  .print-barcode-card .student-name {
    font-weight: 800;
    font-size: 12px;
    color: #1b5e20;
    margin-bottom: 2px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .print-barcode-card .student-id {
    font-size: 9.5px;
    color: #555;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: monospace;
  }

  .print-barcode-card .card-footer {
    background: #e8f5e9;
    padding: 6px;
    text-align: center;
    border-top: 1px solid #c8e6c9;
  }

  .print-barcode-card .student-class {
    font-weight: 800;
    font-size: 12px;
    color: #2e7d32;
    letter-spacing: 0.5px;
  }
}

/* ==========================================================================
   iOS PREMIUM SPLIT CHART & LEGEND DESIGN SYSTEM
   ========================================================================== */
.chart-flex-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.chart-wrapper-half {
  position: relative;
  height: 200px;
  width: 200px;
  flex-shrink: 0;
  margin: 0 auto;
}

.chart-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.chart-center-label .c-total {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1c1c1e;
  line-height: 1;
}

.chart-center-label .c-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

.chart-legend-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f2f2f7;
  border: 0.5px solid rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.legend-item:hover {
  background: #e5e5ea;
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1c1c1e;
}

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

.legend-count {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1c1c1e;
}

.legend-pct {
  font-size: 0.78rem;
  color: #8e8e93;
  font-weight: 600;
}

/* ===== QR CODE CENTERING (safe for qrcodejs) ===== */
#dashQrCode,
#fullQrCode,
#qrCode {
  text-align: center;
}

#dashQrCode img,
#dashQrCode canvas,
#fullQrCode img,
#fullQrCode canvas,
#qrCode img,
#qrCode canvas {
  display: block;
  margin: 0 auto;
}

/* ===== COMPREHENSIVE MOBILE RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
  .main-content {
    padding: 16px 12px 95px 12px !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .card {
    padding: 16px 14px !important;
    border-radius: 16px !important;
    margin-bottom: 16px !important;
  }

  .section-header {
    margin-bottom: 16px !important;
  }

  .section-title {
    font-size: 1.15rem !important;
  }

  /* Table Horizontal Scrolling on Mobile */
  .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    display: block;
  }

  table th,
  table td {
    padding: 10px 10px !important;
    font-size: 0.8rem !important;
    white-space: nowrap;
  }

  /* Modal Dialog Fixes on Mobile */
  .modal {
    width: 94% !important;
    max-width: 480px !important;
    padding: 18px 14px !important;
    border-radius: 20px !important;
    max-height: 88vh !important;
    overflow-y: auto;
  }

  /* Radial Hero Card on Mobile */
  .radial-hero-card {
    padding: 18px 14px !important;
    border-radius: 20px !important;
    flex-direction: column !important;
    text-align: center !important;
  }

  .prayer-radial-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .prayer-radial-card {
    padding: 12px 8px !important;
  }

  /* Floating Bottom Nav Padding & Icons */
  .bottom-nav {
    display: flex !important;
    height: 62px;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 990;
  }

  .bottom-nav-item {
    padding: 4px 1px;
    font-size: 0.62rem;
  }

  .bottom-nav-item .lucide-icon,
  .bottom-nav-item svg {
    width: 20px !important;
    height: 20px !important;
    margin-bottom: 2px;
  }

  /* Sidebar Drawer on Mobile */
  .sidebar {
    position: fixed !important;
    left: -280px;
    top: var(--nav-height) !important;
    z-index: 9999 !important;
    width: 270px !important;
    height: calc(100vh - var(--nav-height)) !important;
    box-shadow: var(--shadow-xl) !important;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    background: var(--bg-secondary) !important;
  }

  .sidebar.open {
    left: 0 !important;
  }

  .sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    top: var(--nav-height) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    z-index: 9998 !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}