﻿/* ===== Reset complet & fonturi ===== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f6f8;
    font-family: "Inter", "Segoe UI", Roboto, sans-serif;
    color: #333;
    overflow-x: hidden;
}

/* ===== Containerul principal ===== */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: #f5f6f8;
}

/* ===== Sidebar fix pe stânga ===== */
.sidebar {
    width: 240px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 10;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem 1rem;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}

/* ===== Brand ===== */
.brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

    .brand .logo {
        font-size: 1.8rem;
        margin-right: 0.5rem;
    }

/* ===== Meniu ===== */
.menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Linkurile de meniu */
.nav-item {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    position: relative;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .nav-item:hover {
        background-color: rgba(255, 255, 255, 0.08);
        color: #fff;
        transform: translateX(3px);
    }

    /* ===== Meniu activ ===== */
    .nav-item.active {
        background-color: rgba(37, 99, 235, 0.15);
        color: #fff;
        font-weight: 600;
    }

        .nav-item.active::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            border-radius: 2px;
            background-color: #2563eb;
            transition: all 0.25s ease-in-out;
        }

        .nav-item.active:hover {
            background-color: rgba(37, 99, 235, 0.25);
            box-shadow: inset 2px 0 6px rgba(37, 99, 235, 0.2);
        }

/* Secțiuni de meniu (titluri) */
.menu-section {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* ===== Zona utilizator ===== */
.user-info {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.username {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* ===== Zona principală ===== */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 2rem;
    background-color: #f5f6f8;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.content-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    min-height: calc(100vh - 4rem);
    animation: fadeIn 0.4s ease-in-out;
}

/* ===== Headere ===== */
h2, h3, h5 {
    font-weight: 600;
    color: #1e293b;
}

/* ===== Butoane ===== */
.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    transition: all 0.2s ease-in-out;
}

    .btn-primary:hover {
        background-color: #1e40af;
        border-color: #1e40af;
    }

.btn-outline-danger {
    border-color: #ef4444;
    color: #ef4444;
}

    .btn-outline-danger:hover {
        background-color: #ef4444;
        color: white;
    }

/* Butoane mari */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* ===== Linkuri ===== */
a {
    color: #2563eb;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* ===== Card-uri ===== */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}

/* ===== FORMULARE - Câmpuri de input ===== */
.form-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 0.75rem;
    display: block;
}

.form-control, .form-select {
    padding: 0.75rem;
    font-size: 1rem;
}

/* Câmpuri mari pentru detalii vehicul */
.form-control-lg {
    padding: 0.625rem 1rem !important;
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
    border-radius: 0.5rem !important;
    width: 100% !important;
}

/* Text areas mari */
textarea.form-control-lg {
    min-height: 100px;
    padding: 0.75rem 1rem !important;
}

/* ===== Spațiere ===== */
.mb-3 {
    margin-bottom: 1.25rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Spațiere între coloane */
.row.g-4 {
    --bs-gutter-x: 3rem;
    --bs-gutter-y: 2rem;
    display: flex;
    flex-wrap: wrap;
}

/* Asigură că coloanele rămân side-by-side pe ecrane medii și mari */
/* ===== Layout pe coloane (compact) ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem; /* spațiere mai mică între coloane */
}

    .row.g-4 {
        gap: 1.25rem !important;
    }

/* Două coloane egale pe ecrane medii și mari */
.col-md-6 {
    flex: 1 1 49%;
    max-width: 49%;
    box-sizing: border-box;
}

/* Pe ecrane mici, coloanele se așază una sub alta */
@media (max-width: 767px) {
    .col-md-6 {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ===== Câmpuri de formular mai compacte ===== */
.form-control,
.form-control-lg,
.form-select {
    padding: 0.45rem 0.8rem !important; /* mai puțin înalte */
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    border-radius: 0.4rem !important;
}

/* Textarea — mai puțin înaltă */
textarea.form-control,
textarea.form-control-lg {
    min-height: 70px !important;
}

/* ===== Spațiere între câmpuri ===== */
.mb-4 {
    margin-bottom: 0.9rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

/* ===== Secțiuni info ===== */
.info-section {
    background: #f8f9fa;
    padding: 1rem; /* padding mai mic */
    border-radius: 0.6rem;
    height: 100%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #212529;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}


/* Forțează toate input-urile să aibă aceeași lățime */
.info-section .form-control,
.info-section .form-control-lg {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* ===== Secțiuni info (detalii vehicul) ===== */
.info-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.75rem;
    height: 100%;
}

/* Titluri secțiuni */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #e9ecef;
}

/* ===== Scrollbar modern ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(100, 116, 139, 0.4);
    border-radius: 4px;
}

/* ===== Animație la schimbarea paginii ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ===== Tabel general ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.95rem;
}

    /* Header tabel */
    .table thead {
        background: #f1f5f9;
    }

    .table th {
        text-align: left;
        font-weight: 600;
        color: #334155;
        padding: 0.75rem 1rem;
        border-bottom: 2px solid #e2e8f0;
    }

    /* Celule corp tabel */
    .table td {
        padding: 0.6rem 1rem;
        border-bottom: 1px solid #e2e8f0; /* linie fină între înregistrări */
        color: #1e293b;
    }

    /* Rânduri alternante */
    .table tbody tr:nth-child(even) {
        background-color: #f9fafb;
    }

    /* Hover pe rând */
    .table tbody tr:hover {
        background-color: #e8efff;
        transition: background-color 0.15s ease-in-out;
    }

/* VIN badge */
.badge {
    background: #e2e8f0;
    color: #1e293b;
    font-family: monospace;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Link „Detalii” */
.table a.btn {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

    .table a.btn:hover {
        text-decoration: underline;
    }

/* Căsuța de căutare */
.input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.15s ease-in-out;
}

    .input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    }
/* ===== Badge status colorat ===== */
.status-badge {
    display: inline-block;
    min-width: 80px;
    text-align: center;
    padding: 0.3rem 0.6rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-transform: capitalize;
    font-size: 0.85rem;
}

.status-green {
    background-color: #dcfce7;
    color: #166534;
}

.status-red {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-yellow {
    background-color: #fef9c3;
    color: #92400e;
}

.status-gray {
    background-color: #e5e7eb;
    color: #374151;
}
/* ===== Badge status colorat ===== */
.status-badge {
    display: inline-block;
    min-width: 100px;
    text-align: center;
    padding: 0.4rem 0.7rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-transform: capitalize;
    font-size: 0.9rem;
}

.status-green {
    background-color: #dcfce7;
    color: #166534;
}

.status-red {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-yellow {
    background-color: #fef9c3;
    color: #92400e;
}

.status-gray {
    background-color: #e5e7eb;
    color: #374151;
}
.pagination-container .pagination {
    flex-wrap: nowrap;
    overflow-x: auto;
}
.form-check:hover {
    background-color: rgba(0, 0, 0, 0.03);
    transition: background-color 0.2s ease-in-out;
}
.modal-content {
    animation: modalFadeIn 0.3s ease-in-out;
}

@keyframes modalFadeIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}
.modal-content {
    animation: zoomIn 0.25s ease-in-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}
.modal-body object,
.modal-body iframe {
    display: block;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 120px);
}

/* Previne rearanjarea headerului și a săgeților */
.table th, .table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Iconița de sortare are o lățime fixă — nu schimbă layoutul */
.sort-icon {
    display: inline-block;
    width: 1em;
    text-align: center;
    margin-left: 3px;
}

/* Stilizare fină pe hover */
.table th:hover {
    background-color: #f5f5f5;
}

/* Asigură consistență între lățimile coloanelor */
.table {
    table-layout: fixed;
}
.vehicles-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

    .vehicles-table th,
    .vehicles-table td {
        vertical-align: middle;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

        .vehicles-table td span.badge {
            max-width: 100%;
            display: inline-block;
            text-overflow: ellipsis;
            overflow: hidden;
        }

        .vehicles-table td:nth-child(5) { /* Marca/Model */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

    .vehicles-table th {
        white-space: nowrap;
        cursor: pointer;
    }

.sort-icon {
    display: inline-block;
    width: 1em;
    text-align: center;
    margin-left: 3px;
}

.vehicles-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

    .vehicles-table th,
    .vehicles-table td {
        vertical-align: middle;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

/* 🔹 Rezervă spațiu fix pentru iconul de sortare */
.sort-icon {
    display: inline-block;
    width: 1em;
    text-align: center;
    margin-left: 3px;
}

/* 🔹 Coloana sortată activă — evidențiere clară */
.vehicles-table th.sorted-col {
    background-color: #f3f4f6; /* gri pal */
    border-bottom: 3px solid #0d6efd; /* linie albastră jos */
    font-weight: 600;
    color: #0d6efd;
}

/* 🔹 Mic efect de hover pentru header */
.vehicles-table th:hover {
    background-color: #f8f9fa;
}

/* 🔹 Efect vizual pe rând */
.vehicles-table tbody tr:hover {
    background-color: #f9fafb;
    transition: background-color 0.2s ease;
}