:root {
    --main-color: #FF7F11;
    --second-color: #ACBFA4;
    --third-color: #E2E8CE;
    --fourth-color: #262626;
    --light-bg: #ffffff;
    --light-text: #262626;
    --light-border: #e0e0e0;
    --light-card: #f9f9f9;
    --dark-bg: #1a1a1a;
    --dark-text: #E2E8CE;
    --dark-border: #3a3a3a;
    --dark-card: #262626;
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--light-text);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-theme {
    background: var(--dark-bg);
    color: var(--dark-text);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: var(--main-color);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-content h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Desktop: header-top-row and header-action-row display inline */
.header-top-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.theme-toggle-slider {
    position: absolute;
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.theme-toggle.active .theme-toggle-slider {
    transform: translateX(30px);
    background: var(--fourth-color);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

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

.btn-primary:hover {
    background: #e67010;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 127, 17, 0.3);
}

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

.btn-secondary:hover {
    background: #9bad95;
}

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

.btn-danger:hover {
    background: #d32f2f;
}

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

.btn-success:hover {
    background: #45a049;
}

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

.dark-theme .btn-outline {
    border-color: var(--second-color);
    color: var(--second-color);
}

.btn-outline:hover {
    background: var(--main-color);
    color: white;
}

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

/* Cards */
.card {
    background: var(--light-card);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--light-border);
}

.dark-theme .card {
    background: var(--dark-card);
    border-color: var(--dark-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.card:hover {
    box-shadow: 0 4px 20px rgba(255, 127, 17, 0.15);
}

.card-header {
    border-bottom: 2px solid var(--main-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--main-color);
}

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

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

.dark-theme .form-label {
    color: var(--dark-text);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-border);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
    color: var(--light-text);
}

.dark-theme .form-control {
    background: var(--dark-card);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

.form-control:focus {
    outline: none;
    border-color: var(--main-color);
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.dark-theme .form-control:disabled {
    background: #1a1a1a;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.dark-theme table {
    background: var(--dark-card);
}

thead {
    background: var(--main-color);
    color: white;
}

th, td {
    padding: 12px 15px;
    text-align: left;
}

th {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr {
    border-bottom: 1px solid var(--light-border);
    transition: background 0.2s ease;
}

.dark-theme tbody tr {
    border-bottom-color: var(--dark-border);
}

tbody tr:hover {
    background: rgba(255, 127, 17, 0.05);
}

.dark-theme tbody tr:hover {
    background: rgba(172, 191, 164, 0.1);
}

tbody tr:last-child {
    border-bottom: none;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-5 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Stats Cards */
.stat-card {
    background: linear-gradient(135deg, var(--main-color), #ff9a40);
    color: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 127, 17, 0.3);
}

.stat-card.secondary {
    background: linear-gradient(135deg, var(--second-color), #c5d4be);
}

.stat-card h3 {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1px;
    opacity: 0.9;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1px;
}

.stat-card .label {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--error);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.dark-theme .modal-content {
    background: var(--dark-card);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--main-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--main-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--fourth-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dark-theme .modal-close {
    color: var(--dark-text);
}

.modal-close:hover {
    background: rgba(255, 127, 17, 0.1);
    transform: rotate(90deg);
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--third-color);
    border-top: 3px solid var(--main-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

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

.badge-success {
    background: var(--success);
    color: white;
}

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

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--main-color), var(--second-color));
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 450px;
    width: 100%;
}

.dark-theme .login-box {
    background: var(--dark-card);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    color: var(--main-color);
    font-size: 2rem;
    margin-bottom: 5px;
}

.login-logo p {
    color: var(--fourth-color);
    font-size: 0.95rem;
}

.dark-theme .login-logo p {
    color: var(--dark-text);
}

/* Employee Header Card */
.employee-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.employee-header-info {
    flex: 1;
    min-width: 0;
}

.employee-header-info h2 {
    word-break: break-word;
}

.employee-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .employee-header-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .employee-header-actions {
        width: 100%;
    }

    .employee-header-actions .btn,
    .employee-header-actions form,
    .employee-header-actions form .btn {
        width: 100%;
        text-align: center;
    }
}
.employee-list {
    display: grid;
    gap: 15px;
}

.employee-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--main-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-theme .employee-item {
    background: var(--dark-card);
}

.employee-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 127, 17, 0.2);
}

.employee-info h3 {
    color: var(--fourth-color);
    margin-bottom: 5px;
}

.dark-theme .employee-info h3 {
    color: var(--dark-text);
}

.employee-info p {
    font-size: 0.9rem;
    color: #666;
}

.dark-theme .employee-info p {
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    /* Header */
    .header-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 0 15px;
    }

    .header-content h1 {
        font-size: 1.3rem;
    }

    .header-right {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    /* Row 1: user-info + theme toggle side by side */
    .header-right .user-info,
    .header-right .theme-toggle {
        order: 1;
    }

    /* Row 1 wrapper: user-info and theme-toggle together */
    .header-top-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        width: 100%;
    }

    /* Row 2: settings + logout */
    .header-action-row {
        display: flex;
        gap: 10px;
        justify-content: center;
        width: 100%;
    }

    /* Container */
    .container {
        padding: 15px;
    }

    /* Action buttons row on dashboard */
    .flex-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .flex-between .flex {
        flex-wrap: wrap;
        gap: 8px;
    }

    .flex-between .flex .btn {
        flex: 1 1 calc(50% - 4px);
        text-align: center;
        font-size: 0.85rem;
        padding: 9px 10px;
        min-width: 130px;
    }

    /* Grids */
    .grid-2, .grid-3, .grid-4, .grid-5 {
        grid-template-columns: 1fr 1fr;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Tables */
    table {
        font-size: 0.82rem;
    }

    th, td {
        padding: 8px 8px;
    }

    /* Employee items */
    .employee-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .employee-item > div:last-child {
        text-align: left !important;
        width: 100%;
        border-top: 1px solid var(--light-border);
        padding-top: 10px;
    }

    .dark-theme .employee-item > div:last-child {
        border-top-color: var(--dark-border);
    }

    /* Stat cards */
    .stat-card .value {
        font-size: 1.6rem;
    }

    /* Modal */
    .modal-content {
        padding: 20px 15px;
        width: 95%;
    }

    /* Buttons in header */
    .btn-sm {
        padding: 8px 14px;
        font-size: 0.88rem;
    }

    /* Settings and other page form cards */
    .card {
        padding: 15px;
    }

    /* Table responsive - scroll on small screens */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

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

    .header-content h1 {
        font-size: 1.1rem;
    }

    .flex-between .flex .btn {
        flex: 1 1 100%;
    }

    .stat-card .value {
        font-size: 1.4rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

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

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

/* Car Rental Box - Light Theme */
.car-rental-box {
    border: 1px solid #e0e0e0;
    background: #fafafa;
}

.car-rental-euro-label {
    color: #666;
}

.car-rental-small {
    color: #888;
}

/* Car Rental Box - Dark Theme */
.dark-theme .car-rental-box {
    border: 1px solid var(--dark-border);
    background: var(--dark-card);
}

.dark-theme .car-rental-euro-label {
    color: var(--dark-text);
}

.dark-theme .car-rental-small {
    color: #aaa;
}
