/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Prevent zoom on input focus (iOS) */
input, select, textarea, button {
  font-family: inherit;
  font-size: 16px;
}

/* ================= CSS VARIABLES ================= */
:root {
  /* Colors */
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --primary-soft: #ecfdf5;
  
  --navy: #0f172a;
  --navy-light: #1e293b;
  --navy-lighter: #334155;
  
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --danger-light: #fee2e2;
  
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  
  --info: #3b82f6;
  --info-light: #dbeafe;
  
  /* Text */
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  
  /* Backgrounds */
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #fafbfc;
  
  /* Borders */
  --border: #e2e8f0;
  --border-dark: #cbd5e1;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 60px rgba(15, 23, 42, 0.15);
  
  /* Radius */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-2xl: 32px;
  
  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= LOADING SCREEN ================= */
.loading-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 60%, #10b981 160%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.loading-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

.loading-logo svg {
  width: 40px;
  height: 40px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.loading-brand {
  font-size: 32px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  margin-bottom: 32px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
}

/* ================= UTILITY CLASSES ================= */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-sm { margin-top: var(--space-sm); }
.mt { margin-top: var(--space); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb { margin-bottom: var(--space); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ================= SCROLLBAR ================= */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 380px) {
  .loading-brand { font-size: 26px; }
  .loading-logo { width: 60px; height: 60px; }
  .loading-logo svg { width: 32px; height: 32px; }
}