/* ===== Al Hussainy FC - RTL Arabic ===== */
:root {
  --font-ar: "Tajawal", sans-serif;
  --primary: #0d47a1;
  --primary-dark: #002171;
  --primary-light: #5472d3;
  --accent: #ff6f00;
  --success: #2e7d32;
  --warning: #ed6c02;
  --danger: #c62828;
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5c5c6d;
  --border: #e0e0e8;
  --sidebar-bg: #0d47a1;
  --sidebar-text: #e3f2fd;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-card: #1e1e2e;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --border: #2d2d3a;
  --sidebar-bg: #0a1929;
  --sidebar-text: #b3d4fc;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
  line-height: 1.6;
  transition:
    background var(--transition),
    color var(--transition);
}

/* ===== Login ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
}

.login-card {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 420px;
  animation: fadeIn 0.4s ease;
}

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

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.login-header p {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.login-form .form-group {
  margin-bottom: 1.25rem;
}

.login-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  direction: rtl;
  transition: border-color var(--transition);
}

.login-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.role-select .role-options {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.role-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.role-option input {
  accent-color: var(--primary);
}

.error-msg {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  text-align: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-ar);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background var(--transition),
    transform 0.15s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--sidebar-text);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

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

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* ===== App Shell ===== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.user-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-size: 0.8rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: background var(--transition);
}

.sidebar-nav .nav-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  line-height: 1;
}

.sidebar-nav .nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 1.25rem;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-bar {
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  direction: rtl;
}

.current-page-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.content-area {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* ===== Cards & Panels ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ===== Forms ===== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  direction: rtl;
  background: var(--bg-card);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group input.readonly {
  background: var(--bg);
  cursor: not-allowed;
}

/* ===== Tables ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.data-table th,
table.data-table td {
  padding: 0.85rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

table.data-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text);
}

table.data-table tr:hover td {
  background: rgba(13, 71, 161, 0.04);
}

table.data-table mark {
  background: #fff59d;
  color: #000;
  padding: 0 2px;
}

[data-theme="dark"] table.data-table mark {
  background: #f9a825;
  color: #1a1a2e;
}

/* ===== Financial ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.stat-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-card.success .value {
  color: var(--success);
}
.stat-card.warning .value {
  color: var(--warning);
}

.chart-container {
  position: relative;
  height: 280px;
  margin-bottom: 1.5rem;
}

/* ===== Notifications ===== */
.notification-list .item {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.notification-list .item:last-child {
  border-bottom: none;
}

.notification-list .item mark {
  background: #fff59d;
  padding: 0 2px;
}

/* ===== Overlay & Modal ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  overflow: hidden; /* يمنع السكرول الخارجي نهائياً */
}

.modal {
  background: var(--bg-card);
  padding: 0; /* Remove padding to handle header/body separately */
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-body);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--bg-body);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-card);
}


.modal p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state p {
  margin-top: 0.5rem;
}

/* ===== Professional Responsive Design — All Devices ===== */

/* Custom Scrollbars */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(13, 71, 161, 0.25); border-radius: 10px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
::-webkit-scrollbar-thumb:hover { background: rgba(13, 71, 161, 0.55); }

/* ── Large Desktop (>1200px) ── */
@media (min-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .content-area { padding: 2rem; }
}

/* ── Tablet Landscape 1024px — Collapsed icon-only sidebar ── */
@media (max-width: 1024px) {
  .sidebar {
    width: 72px;
    overflow: hidden;
  }
  .sidebar-header h2,
  .sidebar-header #badges-container,
  #user-type-label { display: none !important; }
  .sidebar-header { padding: 1rem 0; align-items: center; }
  .sidebar-header div[style] { width: 50px !important; height: 50px !important; }
  .sidebar-nav a {
    justify-content: center;
    padding: 0.9rem 0;
  }
  .sidebar-nav .nav-icon { font-size: 1.4rem; display: block; }
  .sidebar-nav .nav-label { display: none; }
  .sidebar-footer { padding: 0.75rem 0; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
  .sidebar-footer #btn-logout {
    font-size: 0;
    padding: 0.5rem;
    background: transparent;
    border: none;
  }
  .sidebar-footer #btn-logout::before { content: "🚪"; font-size: 1.3rem; display: block; }
  .theme-toggle { width: auto; padding: 0.5rem; font-size: 1.3rem; }
}

/* ── Tablet Portrait 768px ── */
@media (max-width: 768px) {
  /* App shell layout */
  .app-shell {
    flex-direction: column;
    padding-bottom: 72px;
  }

  /* ─── Bottom Navigation Bar ─── */
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 72px;
    flex-direction: row;
    overflow: visible;
    padding: 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.18);
    z-index: 999;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  /* Hide sidebar chrome — only nav + action icons visible */
  .sidebar-header { display: none !important; }

  /* Nav items row */
  .sidebar-nav {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }

  .sidebar-nav a {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 6px;
    min-width: 58px;
    flex-shrink: 0;
    background: none !important;
    border-radius: 0;
    position: relative;
    transition: color 0.2s;
  }
  .sidebar-nav .nav-icon {
    font-size: 1.35rem;
    display: block;
    line-height: 1;
  }
  .sidebar-nav .nav-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 500;
    opacity: 0.88;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 58px;
    text-align: center;
    line-height: 1.2;
  }

  .sidebar-nav a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: transparent;
    transition: background 0.2s;
  }

  .sidebar-nav a.active::after {
    background: var(--accent, #ff6f00);
  }

  .sidebar-nav a span {
    display: block;
    font-size: 0.62rem;
    font-weight: 500;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
    text-align: center;
  }

  .sidebar-nav a.active {
    color: var(--accent, #ff6f00);
    font-weight: 700;
  }

  /* Action footer (logout + theme) — compact row */
  .sidebar-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 6px;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.12);
    gap: 4px;
    flex-shrink: 0;
  }
  .sidebar-footer #btn-logout {
    font-size: 0;
    padding: 6px;
    background: transparent;
    border: none;
    line-height: 1;
  }
  .sidebar-footer #btn-logout::before { content: "🚪"; font-size: 1.2rem; display: block; }
  .theme-toggle { margin: 0; padding: 6px; font-size: 1.2rem; width: auto; border: none; }

  /* ─── Top bar ─── */
  .top-bar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .search-wrap { max-width: 100%; width: 100%; flex: 1 1 100%; }
  .top-bar-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
  }
  .top-bar-actions .btn { font-size: 0.8rem; padding: 0.4rem 0.7rem; }
  .current-page-title { font-size: 1rem; }

  /* ─── Content area ─── */
  .content-area { padding: 0.85rem 0.75rem; }

  /* ─── Forms ─── */
  .form-row { grid-template-columns: 1fr; gap: 0.65rem; }

  /* ─── Stat cards ─── */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; margin-bottom: 1rem; }
  .stat-card { padding: 0.85rem; }
  .stat-card h4 { font-size: 0.78rem; }
  .stat-card .value { font-size: 1.15rem; }

  /* ─── Tables: horizontal scroll ─── */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.data-table { min-width: 500px; font-size: 0.82rem; }
  table.data-table th, table.data-table td { padding: 0.6rem 0.65rem; }

  /* ─── Cards ─── */
  .card { padding: 1rem; margin-bottom: 1rem; border-radius: 10px; }
  .card-title { font-size: 1rem; }

  /* ─── Bottom-sheet Modals ─── */
  .overlay { align-items: flex-end; padding: 0; }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    width: 100%;
    margin: 0;
    animation: slideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .modal-header { padding: 1rem 1.25rem; }
  .modal-body { padding: 1.25rem; }
  .modal-footer { padding: 0.85rem 1.25rem; flex-wrap: wrap; gap: 0.5rem; }
  .modal-footer .btn { flex: 1; }

  /* Branch tabs */
  .branch-tabs { gap: 6px !important; margin-bottom: 12px !important; }
  .branch-tabs .btn { padding: 0.4rem 0.65rem; font-size: 0.82rem; }

  /* Login card */
  .login-card { padding: 1.75rem 1.25rem; }

  /* Chart */
  .chart-container { height: 220px; }

  /* Attendance steps */
  #content-area .btn[style*="padding:20px"] {
    padding: 14px 22px !important;
    font-size: 1rem !important;
  }
}

/* ── Small phones ≤ 480px ── */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .top-bar { padding: 0.6rem 0.75rem; }
  .top-bar-actions { justify-content: center; }
  .top-bar-actions .btn { flex: 1; min-width: 100px; font-size: 0.78rem; padding: 0.38rem 0.5rem; }
  .login-card { padding: 1.5rem 1rem; }
  .login-header h1 { font-size: 1.6rem; }
  .content-area { padding: 0.65rem 0.5rem; }
  .card { padding: 0.85rem; }
  .export-bar .btn { flex: 1; font-size: 0.82rem; }
  table.data-table { min-width: 420px; font-size: 0.78rem; }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; }
}

/* ── Slide-up animation for bottom-sheet modals ── */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ===== Animations ===== */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: countUp 0.4s ease forwards;
}

/* ===== Export bar ===== */
.export-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* ===== Print ===== */
@media print {
  .login-screen,
  .app-shell .sidebar,
  .top-bar,
  .export-bar,
  .btn,
  .theme-toggle {
    display: none !important;
  }
  .app-shell {
    display: block;
  }
  .main-content {
    padding: 0;
  }
  .content-area {
    padding: 0;
  }
  body {
    background: #fff;
    color: #000;
  }
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ===== Payday check button ===== */
.btn-payday-check {
  transition:
    transform 0.15s ease,
    filter 0.15s ease;
  line-height: 1;
  vertical-align: middle;
  filter: grayscale(30%);
}

.btn-payday-check:hover {
  transform: scale(1.3);
  filter: grayscale(0%);
}

.btn-payday-check.confirmed {
  filter: grayscale(0%) drop-shadow(0 0 4px rgba(46, 125, 50, 0.5));
}

/* User type label in sidebar */
#user-type-label {
  padding: 0.2rem 0.6rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
}

/* ===== iPhone Notch / Safe Area ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  /* Push bottom-nav above the home-indicator on iPhone X+ */
  @media (max-width: 768px) {
    .sidebar {
      padding-bottom: env(safe-area-inset-bottom);
      height: calc(72px + env(safe-area-inset-bottom));
    }
    .app-shell {
      padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }
  }
}

/* ===== Touch feedback — instant tap highlight ===== */
.btn, .sidebar-nav a, .modal-close {
  -webkit-tap-highlight-color: transparent;
}

.sidebar-nav a:active {
  opacity: 0.7;
  transform: scale(0.95);
  transition: opacity 0.1s, transform 0.1s;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
  transition: transform 0.1s;
}

/* ===== Loading Spinner (Firebase loading overlay) ===== */
#firebase-loading {
  background: var(--bg, #f5f7fa) !important;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Prevent body scroll when modal open ===== */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ===== Table mobile — make action buttons smaller ===== */
@media (max-width: 768px) {
  table.data-table .btn-sm {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    margin: 1px;
  }
  /* Stack action buttons vertically in table cells */
  table.data-table td:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
  }
  /* Make search bar visible and not too tall */
  .search-input {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  /* Forms: use native font-size to prevent iOS auto-zoom */
  .form-group input,
  .form-group select,
  .form-group textarea,
  .login-form input {
    font-size: 16px;
  }
}

/* ===== Dark mode loading screen ===== */
[data-theme="dark"] #firebase-loading {
  background: #121212 !important;
  color: #b3d4fc !important;
}
[data-theme="dark"] #firebase-loading div {
  border-color: #1e3a5f !important;
  border-top-color: #4f8ef7 !important;
}
