/* App CSS - styles are managed in resources/js/assets/main.css */
/* ═══════════════════════════════════════════
   RIDERZ — Global Design System
   ═══════════════════════════════════════════ */

:root {
  --primary:    #034AB3;
  --primary-dark: #02368a;
  --primary-light: #e8effc;
  --secondary:  #FEDA00;
  --secondary-dark: #e5c500;
  --error:      #D32C2C;
  --error-light: #fdecea;
  --success:    #78C13F;
  --success-light: #f0fae7;
  --warning:    rgba(251, 187, 45, 0.4);
  --warning-solid: #FBBB2D;

  --bg:         #F5F7FA;
  --surface:    #FFFFFF;
  --border:     #E2E8F0;
  --text-primary:   #0D1B35;
  --text-secondary: #637089;
  --text-muted:     #A0AEBF;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(3,74,179,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(3,74,179,0.12), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 40px rgba(3,74,179,0.16), 0 4px 12px rgba(0,0,0,0.06);

  --header-h: 64px;
  --footer-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Scrollable area utility */
.scroll-area {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-body); font-weight: 700; }
.display { font-family: var(--font-display); letter-spacing: 0.02em; }

/* Utility classes */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.relative { position: relative; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.18s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  background: var(--secondary);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--secondary-dark); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-danger {
  background: var(--error-light);
  color: var(--error);
}
.btn-success {
  background: var(--success-light);
  color: #4a8a1f;
}
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-lg { padding: 17px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Form elements */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.input-field {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(3,74,179,0.1);
}
.input-field::placeholder { color: var(--text-muted); }
.input-field.error { border-color: var(--error); }
.input-field.error:focus { box-shadow: 0 0 0 3px rgba(211,44,44,0.1); }
.input-hint { font-size: 12px; color: var(--text-muted); }
.input-error { font-size: 12px; color: var(--error); }

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.badge-entry { background: #fff3e0; color: #e65100; }
.badge-medium { background: #e3f2fd; color: #1565c0; }
.badge-pro { background: #f3e5f5; color: #6a1b9a; }
.badge-success { background: var(--success-light); color: #4a8a1f; }
.badge-error { background: var(--error-light); color: var(--error); }
.badge-warning { background: rgba(251,187,45,0.25); color: #9a6800; }
.badge-neutral { background: var(--bg); color: var(--text-secondary); }

/* Status dot */
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-success { background: var(--success); }
.dot-error { background: var(--error); }
.dot-warning { background: var(--warning-solid); }

/* Banner alerts */
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.banner-warning { background: rgba(251,187,45,0.4); color: #7a4f00; border: 1px solid rgba(251,187,45,0.6); }
.banner-error { background: var(--error-light); color: var(--error); border: 1px solid rgba(211,44,44,0.2); }
.banner-info { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(3,74,179,0.2); }
.banner i { font-size: 20px; flex-shrink: 0; }

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 -20px;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}
.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Spinner */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-primary {
  border-color: rgba(3,74,179,0.2);
  border-top-color: var(--primary);
}

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

/* Page transitions */
.page-enter-active, .page-leave-active {
  transition: opacity 0.2s, transform 0.2s;
}
.page-enter-from { opacity: 0; transform: translateX(20px); }
.page-leave-to { opacity: 0; transform: translateX(-20px); }

/* Slide up for modals/overlays */
.slide-up-enter-active, .slide-up-leave-active {
  transition: opacity 0.25s, transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
.slide-up-enter-from { opacity: 0; transform: translateY(100%); }
.slide-up-leave-to { opacity: 0; transform: translateY(100%); }

/* Fade */
.fade-enter-active, .fade-leave-active { transition: opacity 0.2s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* Safe area helpers for Flutter WebView */
.pb-safe { padding-bottom: var(--safe-bottom); }
.pt-safe { padding-top: env(safe-area-inset-top, 0px); }

/* Shimmer loading */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 52px;
  height: 28px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #CBD5E0;
  border-radius: 100px;
  transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 22px; width: 22px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--success); }
.toggle input:checked + .toggle-slider::before { transform: translateX(24px); }

/* Pulse animation for live indicator */
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}
.pulse-dot {
  position: relative;
  display: inline-flex;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-ring 1.5s ease-out infinite;
}

/* Radio group */
.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}
.radio-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.radio-option input { display: none; }
.radio-circle {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.radio-option.selected .radio-circle {
  border-color: var(--primary);
  background: var(--primary);
}
.radio-option.selected .radio-circle::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--text-muted);
  text-align: center;
}
.empty-state i { font-size: 48px; opacity: 0.4; }
.empty-state p { font-size: 14px; line-height: 1.6; max-width: 240px; }

/* ═══════════════════════════════════════════
   Desktop Responsive
   ═══════════════════════════════════════════ */

@media (min-width: 768px) {
  html, body {
    overflow: auto;
  }

  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
  }
}
