/* ==========================================================================
   Variables
   ========================================================================== */

:root {
  /* Colors */
  --color-background: #0b1020; /* deep, modern corporate background */
  --color-surface: #12172a;
  --color-surface-alt: #181e33;
  --color-text: #f5f7fb;
  --color-text-muted: #a4adc2;

  --color-primary: #1f7ae0; /* fleet-tech blue */
  --color-primary-soft: rgba(31, 122, 224, 0.12);
  --color-primary-strong: #1760b3;

  --color-success: #28a745;
  --color-warning: #f0ad4e;
  --color-danger: #dc3545;

  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2933;
  --color-gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px) */
  --space-0: 0;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-8: 16px;
  --space-10: 20px;
  --space-12: 24px;
  --space-16: 32px;
  --space-20: 40px;
  --space-24: 48px;
  --space-32: 64px;
  --space-40: 80px;
  --space-48: 96px;

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 240ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
}

/* ==========================================================================
   Reset / Normalize
   ========================================================================== */

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

img {
  border-style: none;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

h1,
 h2,
 h3,
 h4,
 h5,
 h6,
 p,
 figure {
  margin: 0;
}

a {
  color: inherit;
}

/* ==========================================================================
   Base
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

h1,
 h2,
 h3,
 h4,
 h5,
 h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-12);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: var(--space-10);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-8);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-6);
}

p {
  margin-bottom: var(--space-8);
  color: var(--color-text-muted);
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--color-primary-strong);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

code,
 pre {
  font-family: var(--font-mono);
}

pre {
  padding: var(--space-8);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  overflow-x: auto;
}

/* ==========================================================================
   Accessibility & Motion
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

/* ==========================================================================
   Utilities
   ========================================================================== */

/* Layout container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--space-16);
}

@media (min-width: 1200px) {
  .container {
    padding-inline: var(--space-24);
  }
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--space-16);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-16);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-16);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Spacing utilities (margin-bottom only for common stacking) */
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }
.mb-12 { margin-bottom: var(--space-12) !important; }
.mb-16 { margin-bottom: var(--space-16) !important; }
.mb-24 { margin-bottom: var(--space-24) !important; }
.mb-32 { margin-bottom: var(--space-32) !important; }

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 10px;
}

.badge-primary {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
}

.btn:hover {
  background-color: var(--color-primary-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.btn-secondary {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--color-text)!important;
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.btn-ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--color-text-muted)!important;
  box-shadow: none;
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--color-text);
}

/* Inputs & form controls */
.input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(5, 7, 15, 0.85);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  outline: none;
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

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

.input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft);
  background-color: rgba(8, 11, 24, 0.95);
}

.input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

label {
  display: block;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.form-row {
  margin-bottom: var(--space-12);
}

/* Card component - for modules like diagnostics, planning, reporting */
.card {
  position: relative;
  background: radial-gradient(circle at top left, rgba(31, 122, 224, 0.18), transparent 55%),
              var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.card-header {
  margin-bottom: var(--space-10);
}

.card-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
}

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

.card-body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Simple tag for metrics (e.g., uptime, kostenbesparing) */
.metric {
  font-size: var(--font-size-3xl);
  font-weight: 600;
  color: var(--color-text);
}

.metric-label {
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Hero-like section helper for homepage intro */
.section-hero {
  padding-block: var(--space-32);
}

.section-hero-subtitle {
  max-width: 40rem;
  color: var(--color-text-muted);
}

/* Minimal table styling for reporting/overviews */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
}

.table thead tr {
  background-color: rgba(255, 255, 255, 0.02);
}

.table th {
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.01);
}

.table tbody tr:hover {
  background-color: rgba(31, 122, 224, 0.06);
}

/* Table wrapper for mobile scrolling */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -12px;
  padding: 0 12px;
}

.table {
  min-width: 100%;
}

/* Status pills for vehicle condition / maintenance status */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.status-success {
  background-color: rgba(40, 167, 69, 0.12);
  color: var(--color-success);
}

.status-warning {
  background-color: rgba(240, 173, 78, 0.14);
  color: var(--color-warning);
}

.status-danger {
  background-color: rgba(220, 53, 69, 0.14);
  color: var(--color-danger);
}

/* Simple navigation bar baseline */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(5, 7, 15, 0.94), rgba(5, 7, 15, 0.78));
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-10);
}

.site-logo {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--font-size-sm);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.site-nav a {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--color-text);
}

/* Footer baseline */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-block: var(--space-16);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.site-footer a {
  color: var(--color-text-muted);
}

.site-footer a:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   End
   ========================================================================== */
