/* ================================================================
   Stylesheet
   ================================================================

   Table of Contents:
   01. Settings .......... CSS Variables, Fonts
   02. Base .............. Reset, Root Elements
   03. Layout ............ App Container, Sidebar, Main Content
   04. Components ........ Cards, Buttons, Badges, Alerts, Forms
   05. Tables ............ Table Styles
   06. Utilities ......... Empty State, Helpers
   07. Pages ............. Login, Dashboard (page-specific)
   08. Responsive ........ Media Queries
   09. Print ............. Print Styles
   10. Legal Pages ....... Datenschutz, Impressum (Header, Hero, Content, Footer)
   11. Cookie Consent .... GDPR Cookie Banner
   12. Reduced Motion .... Accessibility

   ================================================================ */

/* ================================================================
   1. SETTINGS
   ================================================================ */

:root {
    /* Color Scheme */
    color-scheme: light;

    /* Colors - Primary */
    --primary: #BC0003;
    --primary-dark: #8A0002;
    --primary-light: rgba(188, 0, 3, 0.1);

    /* Colors - Secondary */
    --secondary: #154C79;
    --secondary-dark: #0D3A5C;
    --secondary-light: rgba(21, 76, 121, 0.1);

    /* Colors - Status */
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --dark: #3C3C3C;

    /* Colors - Neutrals */
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;

    /* Transitions */
    --transition: all 0.2s ease;
}


/* ================================================================
   2. BASE
   ================================================================ */

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

body {
    font-family: 'Roboto Slab', Georgia, 'Times New Roman', serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}


/* ================================================================
   3. LAYOUT
   ================================================================ */

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.logo-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.6;
}

.logo-company {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
}

.sidebar-nav {
    padding: 16px 12px;
}

.nav-section {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 12px 8px;
    margin-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

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

.nav-item .material-icons-outlined {
    font-size: 20px;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.content-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--gray-500);
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.logout-link:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.logout-link .material-icons-outlined {
    font-size: 20px;
}

.content-body {
    padding: 24px;
}


/* ================================================================
   4. COMPONENTS
   ================================================================ */

.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.secondary { background: var(--secondary-light); color: var(--secondary); }
.stat-icon.success { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-icon.dark { background: rgba(60, 60, 60, 0.1); color: var(--dark); }

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-info p {
    font-size: 16px;
    color: var(--gray-500);
}

.section {
    margin-top: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

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

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--gray-700);
    transition: var(--transition);
}

.quick-action:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.quick-action .material-icons-outlined {
    font-size: 32px;
    color: var(--gray-500);
    transition: var(--transition);
}

.quick-action:hover .material-icons-outlined {
    color: var(--primary);
}

.quick-action span:last-child {
    font-size: 14px;
    font-weight: 500;
}


/* ================================================================
   5. TABLES
   ================================================================ */

.table-container {
    overflow-x: auto;
}

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

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
}

td {
    font-size: 14px;
    color: var(--gray-700);
}

tr:hover {
    background: var(--gray-50);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

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

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

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}

.btn-outline:hover {
    background: var(--gray-100);
}

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

.btn-icon {
    padding: 8px;
}

.actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.action-btn .material-icons-outlined {
    font-size: 18px;
}

.action-btn.edit {
    background: var(--secondary-light);
    color: var(--secondary);
}

.action-btn.edit:hover {
    background: var(--secondary);
    color: var(--white);
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.action-btn.delete:hover {
    background: var(--danger);
    color: var(--white);
}

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

.badge.active, .badge.operational {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.badge.inactive, .badge.retired {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge.not-applicable {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-500);
}

.badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge.in-progress {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.badge.completed {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px var(--secondary-light);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--secondary-light);
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 3px var(--primary-light);
}

.action-btn:focus-visible,
.nav-item:focus-visible,
.quick-action:focus-visible,
.logout-link:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

select.form-control {
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title .material-icons-outlined {
    color: var(--danger);
}

.modal-text {
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}


/* ================================================================
   06. UTILITIES
   ================================================================ */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-500);
}

.empty-state .material-icons-outlined {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 12px;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

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

/* Promo Cards */
.promo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.promo-card {
    position: relative;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.promo-list .promo-icon {
    width: 44px;
    height: 44px;
    margin: 0;
    flex-shrink: 0;
}

.promo-list .promo-icon .material-icons-outlined {
    font-size: 22px;
}

.promo-list .promo-content {
    flex: 1;
    min-width: 0;
}

.promo-list .promo-title {
    font-size: 15px;
    margin-bottom: 2px;
}

.promo-list .promo-description {
    font-size: 13px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.promo-list .promo-price {
    font-size: 16px;
    margin-top: 0;
    white-space: nowrap;
}

.promo-list .promo-badge {
    top: 8px;
    right: 8px;
    font-size: 10px;
    padding: 2px 8px;
}

.promo-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.promo-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.promo-badge.new {
    background: var(--info);
}

.promo-badge.hot {
    background: var(--warning);
}

.promo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-icon .material-icons-outlined {
    font-size: 28px;
    color: var(--primary);
}

.promo-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.promo-description {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.5;
    margin-bottom: 12px;
}

.promo-valid {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
}

.promo-price {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
}

.promo-price small {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .material-icons-outlined {
    font-size: 20px;
    color: var(--primary);
}


/* ================================================================
   7. PAGES
   ================================================================ */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #1E293B 0%, #0F172A 100%);
    padding: 20px;
    gap: 24px;
}

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

.login-page-footer {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.login-page-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.login-page-footer a:hover {
    color: var(--white);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
}

.login-card.login-card-split {
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.login-branding {
    background: var(--gray-50);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-branding-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.login-branding-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.login-branding-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.6;
}

.login-branding-company {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-800);
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.login-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-feature-icon .material-icons-outlined {
    font-size: 22px;
    color: var(--primary);
}

.login-feature-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.login-feature-text p {
    font-size: 15px;
    color: var(--gray-500);
    line-height: 1.5;
}

.login-form-section {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .login-form-title {
        font-size: 28px;
        font-weight: 700;
        color: var(--gray-800);
        margin-bottom: 12px;
        text-align: center;
}

.login-form-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

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

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-control.login-input-clean {
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.form-control.login-input-clean.has-toggle {
    padding-right: 48px;
}

.form-control.login-input-clean:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: none;
}

.btn-login-full {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 8px;
}

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

.forgot-password-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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

.input-icon-wrapper {
    position: relative;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    cursor: pointer;
}

.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle .material-icons-outlined {
    position: static;
    transform: none;
    font-size: 20px;
}

.password-toggle:hover {
    color: var(--gray-600);
}


/* ================================================================
   8. RESPONSIVE
   ================================================================ */

/* Breakpoint: 768px – sync with App.MOBILE_BREAKPOINT in app.js */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

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

    .menu-toggle {
        display: block;
    }

    .login-card.login-card-split {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .login-branding {
        padding: 32px 24px;
    }

    .login-branding-header {
        text-align: center;
    }

    .login-branding-title {
        font-size: 11px;
    }

    .login-branding-company {
        font-size: 24px;
    }

    .login-features {
        gap: 20px;
    }

    .login-feature-icon {
        width: 36px;
        height: 36px;
    }

    .login-feature-icon .material-icons-outlined {
        font-size: 18px;
    }

    .login-feature-text h4 {
        font-size: 13px;
    }

    .login-feature-text p {
        font-size: 12px;
    }

    .login-form-section {
        padding: 32px 24px;
    }
}


/* ================================================================
   9. PRINT
   ================================================================ */

@media print {
    .sidebar,
    .content-header,
    .menu-toggle,
    .btn,
    .action-btn,
    .quick-actions {
        display: none !important;
    }

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

    .content-body {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #CCC;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: none;
        color: inherit;
    }
}


/* ================================================================
   10. LEGAL PAGES
   ================================================================ */

.legal-wrapper {
    min-height: 100vh;
    background: var(--white);
}

.legal-topbar {
    background: var(--white);
    padding: 24px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.legal-topbar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.legal-topbar-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.legal-topbar-company {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
}

.legal-topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legal-topbar-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    margin: 0 16px;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.legal-topbar-nav a:hover {
    color: var(--primary);
}

.legal-topbar-nav a.active {
    color: var(--primary);
}

.legal-topbar-nav a .material-icons-outlined {
    font-size: 18px;
}

.legal-topbar-back {
    color: var(--gray-400);
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--gray-200);
}

.legal-topbar-back:hover {
    color: var(--primary);
}

.legal-hero {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    padding: 80px 48px;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.legal-hero h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

.legal-hero .legal-updated {
    font-size: 16px;
    color: var(--gray-500);
    margin: 0;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px 32px 100px;
}

.legal-content {
    color: var(--gray-700);
    line-height: 1.9;
}

.legal-article {
    font-size: 17px;
}

.legal-section {
    margin-bottom: 56px;
    padding-left: 20px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 24px -20px;
    position: relative;
    padding-left: 20px;
}

.legal-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.legal-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-700);
    margin: 40px 0 20px 0;
}

.legal-section p {
    margin: 0 0 24px 0;
    font-size: 17px;
}

.legal-section ul {
    margin: 0 0 24px 0;
    padding-left: 0;
    list-style: none;
}

.legal-section li {
    margin-bottom: 16px;
    font-size: 17px;
    padding-left: 28px;
    position: relative;
}

.legal-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.legal-section a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.legal-section a:hover {
    border-bottom-color: var(--primary);
}

.legal-section strong {
    color: var(--gray-800);
    font-weight: 600;
}

.legal-footer {
    background: var(--gray-50);
    padding: 40px 32px;
    text-align: center;
    border-top: 1px solid var(--gray-200);
}

.legal-footer-links {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.legal-footer-links a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

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

.legal-footer-copyright {
    color: var(--gray-400);
    font-size: 13px;
    margin: 0;
}

@media (max-width: 900px) {
    .legal-topbar {
        padding: 20px 24px;
        flex-direction: column;
        gap: 20px;
    }

    .legal-topbar-brand {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .legal-topbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .legal-topbar-back {
        margin-left: 0;
    }

    .legal-hero {
        padding: 48px 24px;
    }

    .legal-hero h1 {
        font-size: 36px;
    }

    .legal-container {
        padding: 48px 24px 80px;
    }

    .legal-section h2 {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .legal-topbar-nav a .nav-text {
        display: none;
    }

    .legal-topbar-nav a {
        padding: 10px;
    }

    .legal-hero h1 {
        font-size: 28px;
    }

    .legal-container {
        padding: 32px 16px 60px;
    }

    .legal-article {
        font-size: 16px;
    }

    .legal-section {
        margin-bottom: 40px;
    }

    .legal-section h2 {
        font-size: 20px;
        padding-left: 16px;
    }

    .legal-section p,
    .legal-section li {
        font-size: 16px;
    }
}


/* ================================================================
   11. COOKIE CONSENT
   ================================================================ */

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

.cookie-overlay.open {
    display: flex;
}

.cookie-box {
    background: var(--white);
    border-radius: var(--radius-md);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 16px;
}

.cookie-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cookie-icon .material-icons-outlined {
    font-size: 24px;
    color: var(--primary);
}

.cookie-header-text h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.cookie-header-text p {
    font-size: 14px;
    color: var(--gray-500);
}

.cookie-description {
    padding: 0 24px 20px;
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.7;
}

.cookie-description a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.cookie-description a:hover {
    text-decoration: underline;
}

.cookie-options {
    padding: 0 24px;
}

.cookie-option {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.cookie-option:last-child {
    margin-bottom: 0;
}

.cookie-checkbox {
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--secondary);
    cursor: pointer;
}

.cookie-checkbox input[type="checkbox"]:disabled {
    accent-color: var(--secondary);
    cursor: not-allowed;
}

.cookie-option-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.cookie-option-content p {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
}

.cookie-actions {
    padding: 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cookie-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 10px 14px;
    font-size: 13px;
    min-width: fit-content;
}

.cookie-footer {
    padding: 0 24px 24px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.cookie-footer a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

@media (max-width: 480px) {
    .cookie-box {
        max-height: 95vh;
    }

    .cookie-header {
        padding: 20px 20px 12px;
    }

    .cookie-description,
    .cookie-options,
    .cookie-actions,
    .cookie-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .cookie-actions {
        flex-direction: column;
    }

    .cookie-footer {
        flex-wrap: wrap;
        gap: 16px;
    }
}


/* ================================================================
   12. REDUCED MOTION
   ================================================================ */

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