/* ============================================
   All My Rides - Modern UI
   ============================================ */

:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #0f3460;
  --accent-bright: #4361ee;
  --accent-hover: #3a56d4;
  --bg: #f5f6fa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --transition: 0.2s ease;
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   Login View
   ============================================ */

.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--accent-bright) 100%);
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo img {
  width: 160px;
  height: 160px;
}

.login-brand h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-tagline {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin-top: 4px;
}

.login-form-container {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.login-form-container h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.login-form-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--bg-card);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
}

.forgot-password-link {
  color: var(--accent-bright);
  font-size: 13px;
  text-decoration: none;
  text-align: right;
  display: block;
  margin-top: -8px;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--text-light);
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social-login-buttons {
  display: flex;
  gap: 10px;
}

.login-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.login-switch a {
  color: var(--accent-bright);
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
}

.login-switch a:hover {
  text-decoration: underline;
}

.login-language {
  text-align: center;
  margin-top: 20px;
}

.login-language select {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.login-language select option {
  color: var(--text);
  background: var(--bg-card);
}

.login-legal-links {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
}

.login-legal-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.login-legal-links a:hover {
  color: rgba(255,255,255,0.9);
  text-decoration: underline;
}

.login-legal-separator {
  color: rgba(255,255,255,0.4);
  margin: 0 8px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

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

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

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--border-light);
  color: var(--text);
}

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

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

.btn-social {
  flex: 1;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 13px;
  gap: 6px;
}

.btn-social:hover {
  background: var(--border-light);
  border-color: var(--text-light);
}

.btn-social svg {
  flex-shrink: 0;
}

/* ============================================
   App Layout
   ============================================ */

.app-view {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform var(--transition);
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.sidebar-close-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
}

.sidebar-logo img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-item:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.nav-item.active {
  background: var(--accent-bright);
  color: #fff;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer .btn-ghost {
  color: rgba(255,255,255,0.6);
  width: 100%;
  justify-content: flex-start;
  font-size: 13px;
}

.sidebar-footer .btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  flex: 1;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.page-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

/* ============================================
   Page Components
   ============================================ */

.page-header {
  margin-bottom: 28px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.stat-card .stat-change {
  font-size: 12px;
  margin-top: 4px;
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--border-light);
}

/* Tables */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--border-light);
}

.btn-delete-service {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  opacity: 0.4;
  transition: opacity 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-delete-service:hover {
  opacity: 1;
  color: #e53e3e;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.badge-neutral {
  background: var(--border-light);
  color: var(--text-secondary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-light);
}

/* Form Sections */
.form-section {
  margin-bottom: 32px;
}

.form-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

/* Form Row */
.form-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Toggle Switch */
.toggle-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
}

.toggle-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent-bright);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  min-width: 280px;
  max-width: 400px;
}

.toast-success {
  background: var(--success);
  color: #fff;
}

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

.toast-info {
  background: var(--info);
  color: #fff;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Vehicle Card Grid */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.vehicle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.vehicle-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.vehicle-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.vehicle-card-title {
  font-size: 16px;
  font-weight: 600;
}

.vehicle-card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.vehicle-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.vehicle-detail-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.vehicle-detail-value {
  font-size: 14px;
  font-weight: 500;
  margin-top: 2px;
}

.vehicle-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* Danger Zone */
.danger-zone {
  border: 1px solid var(--danger);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 32px;
}

.danger-zone h3 {
  color: var(--danger);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.danger-zone p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Upcoming Service List */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow var(--transition);
}

.service-item:hover {
  box-shadow: var(--shadow-sm);
}

.service-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.service-item-icon.scheduled {
  background: #dbeafe;
}

.service-item-icon.completed {
  background: #d1fae5;
}

.service-item-icon.overdue {
  background: #fee2e2;
}

.service-item-info {
  flex: 1;
}

.service-item-title {
  font-size: 14px;
  font-weight: 600;
}

.service-item-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.service-item-meta {
  text-align: right;
}

.service-item-date {
  font-size: 13px;
  font-weight: 500;
}

.service-item-cost {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar select {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.filter-bar select:focus {
  outline: none;
  border-color: var(--accent-bright);
}

/* Message */
.message {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}

.message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ============================================
   Mobile Bottom Navigation
   ============================================ */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  z-index: 101;
  padding: 4px 0;
  padding-bottom: env(safe-area-inset-bottom, 4px);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item.active {
  color: var(--accent-bright);
}

.bottom-nav-item:hover {
  color: var(--accent-bright);
}

.bottom-nav-icon {
  width: 22px;
  height: 22px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: block;
  }

  .mobile-menu-btn {
    display: block;
  }

  .bottom-nav {
    display: flex;
    justify-content: space-around;
  }

  .page-content {
    padding: 20px 16px;
    padding-bottom: 80px;
  }

  .top-bar {
    padding: 0 16px;
  }

  .page-title {
    font-size: 17px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 14px 16px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

  .vehicle-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .social-login-buttons {
    flex-direction: column;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .service-item {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }

  .service-item-meta {
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
  }

  .card-header {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .card-body {
    padding: 16px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .btn {
    min-height: 44px;
    padding: 10px 16px;
  }

  .btn-sm {
    min-height: 36px;
  }

  .danger-zone {
    padding: 16px;
  }
}

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

  .login-container {
    max-width: 100%;
  }

  .login-form-container {
    padding: 24px;
    border-radius: var(--radius-lg);
  }

  .login-brand h1 {
    font-size: 24px;
  }

  .vehicle-card-details {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-row {
    flex-direction: column;
  }

  .top-bar-actions {
    display: none;
  }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

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

/* ============================================
   Modal / Dialog
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.modal-content .form-group {
  margin-bottom: 16px;
}

.modal-content .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}

.modal-content .form-group input,
.modal-content .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}
