/**
 * AltmarkCloud Cockpit Design System
 * Basis-Styles und CSS Custom Properties
 */

/* ─── CSS RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── CSS CUSTOM PROPERTIES ─────────────────────────────────────────── */
:root {
    /* Primärfarben – Altmark.Cloud Corporate Identity */
    --color-primary: #eb5c34;       /* Altmark Orange */
    --color-primary-light: #fef2ee; /* Helles Orange für Backgrounds */
    --color-primary-dark: #1b3942;  /* Altmark Dunkelblau für Hover/Text */

    /* Akzentfarben */
    --color-accent: #d94e28;        /* Dunkleres Orange für Akzente */
    --color-accent-light: #fff0eb;  /* Hellstes Orange */

    /* Neutrale Farben */
    --color-bg: #F8F9FC;
    --color-surface: #FFFFFF;
    --color-border: #E4E8F0;
    --color-text: #1b3942;          /* Altmark Dunkelblau als Haupttext */
    --color-text-muted: #6B7280;
    --color-text-light: #9CA3AF;

    /* Status-Farben */
    --color-success: #10B981;
    --color-success-light: #D1FAE5;
    --color-warning: #F59E0B;
    --color-warning-light: #FEF3C7;
    --color-danger: #EF4444;
    --color-danger-light: #FEE2E2;
    --color-info: #3B82F6;
    --color-info-light: #DBEAFE;

    /* Typografie */
    --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

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

    /* Spacing (8px Grid) */
    --space-1: 0.25rem;      /*  4px */
    --space-2: 0.5rem;       /*  8px */
    --space-3: 0.75rem;      /* 12px */
    --space-4: 1rem;         /* 16px */
    --space-6: 1.5rem;       /* 24px */
    --space-8: 2rem;         /* 32px */
    --space-12: 3rem;        /* 48px */
    --space-16: 4rem;        /* 64px */

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.05);
    --shadow-focus: 0 0 0 3px rgba(235,92,52,0.2);  /* Altmark Orange */
}

/* ─── DARK MODE ──────────────────────────────────────────────────────── */
[data-theme="dark"] {
    --color-primary: #f07050;
    --color-primary-light: #2a1f1a;
    --color-primary-dark: #ff9070;

    --color-accent: #f07050;
    --color-accent-light: #2a1a14;

    --color-bg: #111318;
    --color-surface: #1a1d24;
    --color-border: #2d3140;
    --color-text: #e4e7ed;
    --color-text-muted: #9ca3af;
    --color-text-light: #6b7280;

    --color-success: #34d399;
    --color-success-light: #0d2818;
    --color-warning: #fbbf24;
    --color-warning-light: #2a2008;
    --color-danger: #f87171;
    --color-danger-light: #2a1010;
    --color-info: #60a5fa;
    --color-info-light: #0d1a2a;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
    --shadow-focus: 0 0 0 3px rgba(240,112,80,0.3);
}

/* ─── BASE STYLES ────────────────────────────────────────────────────── */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

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

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

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-4);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4, h5, h6 { font-size: var(--text-base); }

p {
    margin: 0 0 var(--space-4);
}

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

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

.text-sm {
    font-size: var(--text-sm);
}

.text-xs {
    font-size: var(--text-xs);
}

/* ─── UTILITY CLASSES ────────────────────────────────────────────────── */
.required {
    color: var(--color-danger);
}
