/* Modern Garage System CSS */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --background-color: #f3f4f6;
  --surface-color: #ffffff;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.justify-end {
  justify-content: flex-end;
}
.flex-col {
  flex-direction: column;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-4 {
  gap: 1rem;
}
.w-full {
  width: 100%;
}
.h-screen {
  height: 100vh;
}
.text-center {
  text-align: center;
}
.mt-4 {
  margin-top: 1rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.p-4 {
  padding: 1rem;
}
.p-6 {
  padding: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-outline {
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
}

.btn-outline:hover {
  background-color: var(--background-color);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--surface-color);
  transition: border-color 0.2s;
  font-family: inherit;
  font-size: 0.875rem;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Cards */
.card {
  background-color: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 1.125rem;
}

.card-body {
  padding: 1.5rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table th {
  background-color: #f9fafb;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.table tbody tr:hover {
  background-color: #f9fafb;
}

/* Layouts */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1));
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: #1e293b;
  color: white;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid #334155;
}

.sidebar-nav {
  padding: 1rem;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #cbd5e1;
  border-radius: var(--radius-md);
  margin-bottom: 0.25rem;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  background-color: #334155;
  color: white;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  background-color: var(--background-color);
}

.topbar {
  height: 64px;
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

/* Landing Page */
.landing-hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, #2563eb, #1e40af);
  color: white;
  text-align: center;
  padding: 1rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  max-width: 600px;
}

/* Status Badges */
.badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}
.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}
.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Mobile & Responsive */
@media (max-width: 1024px) {
  .dashboard-layout {
    position: relative;
    overflow-x: hidden;
  }
  
  /* Sidebar Mobile Transformation */
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px; /* Hide off-screen */
    height: 100vh;
    z-index: 200;
    width: 260px;
    transition: left 0.3s ease-in-out;
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
  }

  .sidebar.open {
    left: 0;
  }

  /* Overlay Backdrop */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 40;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Adjust Main Content */
  .main-content {
    width: 100%;
    margin-left: 0;
  }

  /* Topbar Adjustments */
  .topbar {
    padding: 0 1rem;
    justify-content: space-between;
  }

  /* Hamburger Toggle Visibility */
  .mobile-menu-btn {
    display: flex !important;
  }
  
  .mobile-only {
    display: block !important; 
  }
}

/* Base state for larger screens */
@media (min-width: 1025px) {
  .mobile-menu-btn, .mobile-only {
    display: none;
  }
}

/* Mobile Typography & Spacing */
@media (max-width: 640px) {
  .card-header {
    padding: 1rem;
    font-size: 1rem;
  }
  .card-body {
    padding: 1rem;
  }
  .p-6 {
    padding: 1rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  
  /* Stack flex containers on very small screens */
  .flex.md\:flex-row {
    flex-direction: column;
  }
  
  /* Buttons full width on mobile if needed */
  .btn-mobile-full {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}
/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in-up {
  animation-duration: 0.5s;
  animation-fill-mode: both;
  animation-name: fadeInUp;
}

.animate-fade-in {
  animation-duration: 0.5s;
  animation-fill-mode: both;
  animation-name: fadeIn;
}

/* Stagger animations delays if needed using :nth-child in usage or helper classes */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* Hover effects for cards */
.transition-hover {
  transition: transform 0.2s, box-shadow 0.2s;
}
.transition-hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
