/* Global mobile-first fixes shared across the app */

:root { --touch: 44px; }

html, body { -webkit-text-size-adjust: 100%; }

button, .btn, .tab-btn, .burger, a.button, input[type="submit"], input[type="button"] { min-height: var(--touch); }

input, select, textarea { font-size: 16px; }

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }

/* ========================================
   DARK MODE TOGGLE (global – sidebar shared across all pages)
   ======================================== */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.55);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #0f172a);
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 4px;
  font-family: inherit;
  text-align: left;
}
.theme-toggle:hover {
  background: rgba(255,255,255,.88);
  border-color: rgba(15,23,42,.13);
}
[data-theme="dark"] .theme-toggle {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.09);
  color: #e2e8f0;
}
[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255,255,255,.11);
}
.theme-toggle-track {
  margin-left: auto;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(15,23,42,.18);
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}
.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 0.28s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
}
[data-theme="dark"] .theme-toggle-track {
  background: #0ea5a4;
}
[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(16px);
}
