/* Stickers CSS - Stripe/Apple Aesthetic */
:root {
  /* Colors */
  --color-primary: #000000;
  --color-secondary: #71717a;
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-background: #ffffff;
  --color-surface: #fafafa;
  --color-border: #e4e4e7;
  --color-text: #18181b;
  --color-text-muted: #71717a;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, monospace;

  /* Spacing */
  --section-padding: 120px 0;
  --section-padding-sm: 80px 0;
  --container-max: 1200px;
  --container-padding: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link.active {
  color: var(--color-text);
}

/* Secondary nav link (cross-product) */
.nav-secondary {
  font-size: 13px;
  color: var(--color-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.nav-secondary:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: #27272a;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #d4d4d8;
  cursor: not-allowed;
  transform: none;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-text);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: white;
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* Card */
.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.card-header {
  padding: 24px;
  border-bottom: 1px solid var(--color-border);
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.card-description {
  font-size: 14px;
  color: var(--color-text-muted);
}

.card-body {
  padding: 24px;
}

/* Auth Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-surface);
}

.auth-box {
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  text-decoration: none;
  color: var(--color-text);
}

.auth-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.auth-logo-text {
  font-size: 24px;
  font-weight: 700;
}

.auth-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.auth-card-header {
  padding: 24px;
  text-align: center;
}

.auth-card-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.auth-card-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
}

.auth-card-body {
  padding: 0 24px 24px;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-muted);
}

.auth-footer a {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-notification {
  transition: transform 0.3s ease;
}

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--color-surface);
}

.dashboard-sidebar {
  width: 240px;
  background: white;
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
}

.dashboard-main {
  flex: 1;
  margin-left: 240px;
}

.dashboard-content {
  padding: 32px;
}

/* Sidebar Navigation */
.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}

.sidebar-nav-item:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.sidebar-nav-item.active {
  background: var(--color-primary);
  color: white;
}

.sidebar-nav-item svg {
  width: 20px;
  height: 20px;
}

.sidebar-nav-group {
  margin-bottom: 2px;
}

.sidebar-nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-secondary);
  cursor: pointer;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.sidebar-nav-group-header .sidebar-nav-item-content svg {
  width: 20px;
  height: 20px;
}

.sidebar-nav-group-header:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.sidebar-nav-group-items {
  margin-left: 32px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height var(--transition-normal), opacity 0.2s ease, margin-top 0.2s ease;
  margin-top: 0;
}

.sidebar-nav-group-items.expanded {
  max-height: 500px;
  opacity: 1;
  margin-top: 4px;
}

.sidebar-nav-group-item {
  display: block;
  padding: 8px 12px 8px 16px;
  font-size: 13px;
  color: #52525b;
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.sidebar-nav-group-item:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.sidebar-nav-group-item.active {
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
  border-left: 2px solid var(--color-text);
}

.sidebar-nav-subheading {
  padding: 12px 12px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

.sidebar-nav-subheading:first-child {
  padding-top: 4px;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--color-border);
}

/* Page Header */
.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Vehicle Cards */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.vehicle-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.vehicle-card:hover {
  border-color: var(--color-text);
  box-shadow: var(--shadow-lg);
}

.vehicle-card-header {
  padding: 20px;
}

.vehicle-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

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

.vehicle-card-vin {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.vehicle-card-preview {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 20px;
  height: 420px;
  overflow: hidden;
}

.vehicle-card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 250, 250, 0.5);
}

/* Print Styles */
@media print {
  .header,
  .dashboard-sidebar,
  .print\\:hidden {
    display: none !important;
  }

  .dashboard-main {
    margin-left: 0;
  }

  body {
    background: white;
  }

  .dashboard-content {
    padding: 0;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

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

  .dashboard-main {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

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

  .dashboard-content {
    padding: 16px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Generation button disabled state */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
