/* setari generale */
* {
    box-sizing: border-box; /* include paddingul si bordura in dimensiunea elementului. */
    margin: 0; /* elimina marginile implicite. */
    padding: 0; /* elimina spatierea interioara implicita. */
}

body {
    font-family: Arial, Helvetica, sans-serif; /* alege fontul textului. */
    line-height: 1.6; /* stabileste distanta dintre randuri. */
    background-color: #f4f6f9; /* seteaza culoarea fundalului. */
    color: #333; /* seteaza culoarea textului. */
    padding: 16px; /* adauga spatiu in interior. */
    max-width: 1000px; /* limiteaza latimea maxima. */
    margin: 0 auto; /* centreaza pagina pe orizontala. */
}

/* antet si sigla */
header {
    background-color: #1e293b;
    color: #ffffff;
    padding: 16px;
    border-radius: 8px; /* rotunjeste colturile. */
    margin-bottom: 25px; /* adauga spatiu sub element. */
}

.brand-row,
.header-actions {
    display: flex; /* asaza elementele pe un rand flexibil. */
    align-items: center; /* aliniaza elementele pe verticala. */
    gap: 12px; /* adauga spatiu intre elemente. */
}

.brand-row {
    margin-bottom: 12px;
}

.brand-row h1 {
    font-size: 1.4rem;
}

header img {
    border-radius: 6px;
    object-fit: cover; /* potriveste imaginea fara a-i deforma proportiile. */
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    color: #cbd5e1;
}

.auth-status a {
    color: #f87171;
    text-decoration: underline;
}

.auth-status .auth-logout {
    padding: 0;
    color: #f87171;
    background: none;
    border: 0;
    text-decoration: underline;
}

/* navigare principala */
header.app-header nav.app-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

header nav ul {
    list-style: none; /* elimina marcatorii listei. */
    display: flex;
    flex-wrap: wrap; /* muta elementele pe randul urmator cand este nevoie. */
    gap: 10px;
}

header nav ul li a {
    color: #cbd5e1;
    text-decoration: none; /* elimina sublinierea linkului. */
    padding: 8px 14px;
    background-color: #334155;
    border-radius: 4px;
    display: inline-block; /* permite aplicarea dimensiunilor si spatiului. */
    transition: background-color 0.2s ease, color 0.2s ease; /* animeaza schimbarea culorilor. */
}

header nav ul li a:hover {
    background-color: #0284c7;
    color: #ffffff;
}

.header-actions {
    margin-bottom: 12px;
    justify-content: space-between;
}

.language-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.language-picker select {
    width: auto;
    min-width: 112px;
    padding: 8px;
}

.menu-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.menu-backdrop {
    display: none;
}

/* titluri */
h2, h3 {
    color: #1e293b;
    margin-bottom: 15px;
}

/* tabele */
table {
    width: 100%; /* foloseste toata latimea disponibila. */
    border-collapse: collapse; /* uneste bordurile celulelor. */
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden; /* ascunde continutul care depaseste marginile. */
    margin-bottom: 25px;
    border: 1px solid #e2e8f0; /* seteaza bordura tabelului. */
}

th, td {
    padding: 12px 15px;
    text-align: left; /* aliniaza textul la stanga. */
    border-bottom: 1px solid #e2e8f0; /* adauga o bordura sub celula. */
}

th {
    background-color: #e2e8f0;
    color: #1e293b;
    font-weight: bold; /* ingroasa textul. */
}

tr:hover {
    background-color: #f8fafc;
}

/* formulare si campuri de introducere */
form {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

label {
    font-weight: bold;
    display: inline-block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 14px; /* stabileste dimensiunea textului. */
    background-color: #fff;
}

input:focus, select:focus, textarea:focus {
    outline: none; /* elimina conturul implicit la focalizare. */
    border-color: #0284c7; /* evidentiaza bordura campului focalizat. */
}

/* butoane */
button {
    background-color: #0284c7;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 15px;
    border-radius: 4px;
    cursor: pointer; /* arata cursorul de clic. */
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #0369a1;
}

/* aspectul specific paginii principale (index.php) */
.home-intro {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.home-links {
    margin-top: 15px; /* adauga spatiu deasupra elementului. */
    display: flex;
    justify-content: center; /* centreaza elementele pe axa principala. */
    gap: 15px;
}

.home-links a {
    text-decoration: none;
    padding: 10px 18px;
    background-color: #0284c7;
    color: white;
    border-radius: 4px;
}

.home-features {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.home-features div {
    flex: 1; /* distribuie spatiul disponibil in mod egal. */
    background: #ffffff; /* seteaza fundalul elementului. */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* pagina de mentenanta (mentenanta.php) */
section {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

section ul, section ol {
    padding-left: 20px; /* pastreaza spatiu pentru marcatorii listei. */
}

/* subsol */
footer {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 13px;
    border-top: 1px solid #e2e8f0; /* adauga o bordura deasupra subsolului. */
    margin-top: 20px;
}

/* ajusteaza aspectul paginii pentru ecrane inguste. */
@media (max-width: 700px) {
    body {
        padding: 8px;
    }

    header {
        padding: 12px;
        margin-bottom: 16px;
    }

    .brand-row {
        flex: 1;
        margin-bottom: 8px;
    }

    .brand-row h1 {
        font-size: 1.35rem;
    }

    .header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .menu-toggle {
        position: relative;
        z-index: 30;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: -1;
    }

    header.app-header nav.app-menu {
        display: block;
        position: fixed;
        z-index: 20;
        inset: 0 auto 0 0;
        width: min(82vw, 320px);
        padding: 180px 16px 20px;
        overflow-y: auto;
        background: #1e293b;
        box-shadow: 8px 0 24px rgb(15 23 42 / 25%);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 0.2s ease, visibility 0.2s ease;
    }

    header.app-header nav.app-menu.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    header nav ul {
        flex-direction: column;
        gap: 8px;
    }

    header nav ul li a {
        display: block;
        min-height: 44px;
        padding: 10px 14px;
    }

    .menu-backdrop.is-visible {
        display: block;
        position: fixed;
        z-index: 9;
        inset: 0;
        background: rgb(15 23 42 / 55%);
    }

    body.menu-open {
        overflow: hidden;
    }

    .auth-status {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 16px 10px 0;
    }

    .home-features {
        flex-direction: column;
    }

    .home-intro {
        padding: 22px 16px;
    }

    .home-links {
        flex-direction: column;
        gap: 10px;
    }

    .home-links a {
        min-height: 44px;
    }

    .language-picker {
        margin-left: auto;
    }

    .language-picker select {
        min-width: 98px;
    }

    table {
        display: block;
        overflow-x: auto; /* permite derularea tabelului pe orizontala. */
        white-space: nowrap; /* pastreaza fiecare celula pe un singur rand. */
    }

    form {
        padding: 15px;
    }
}

.maintenance-page {
    max-width: 1000px;
}

.maintenance-toolbar,
.maintenance-vehicle-header,
.service-vehicle-heading,
.record-actions,
.maintenance-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.maintenance-toolbar {
    justify-content: space-between;
    margin-bottom: 20px;
}

.garage-picker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 12px 16px;
}

.garage-picker label {
    margin: 0;
}

.maintenance-vehicle {
    padding: 16px;
    margin: 0 0 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgb(15 23 42 / 5%);
}

.maintenance-vehicle-header {
    padding: 4px 4px 18px;
    margin: 0 0 16px;
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
}

.maintenance-vehicle-header > div {
    flex: 1;
}

.maintenance-vehicle-header h3,
.service-vehicle-heading h3 {
    margin: 0 0 4px;
}

.garage-photo {
    width: 84px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #dce3ed;
}

.maintenance-section {
    padding: 16px 4px;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.maintenance-section + .maintenance-section {
    border-top: 1px solid #e2e8f0;
}

.maintenance-section h4 {
    margin-bottom: 12px;
    font-size: 1.08rem;
}

.document-grid,
.maintenance-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.document-card,
.insight-card,
.service-record-card {
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow-wrap: anywhere;
}

.document-card {
    border-left: 4px solid #94a3b8;
}

.document-card h5,
.insight-card h5 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.document-card p,
.insight-card p,
.service-record-card p {
    margin: 4px 0;
}

.document-card.status-valid {
    border-left-color: #16a34a;
}

.document-card.status-soon {
    border-left-color: #eab308;
}

.document-card.status-expired {
    border-left-color: #dc2626;
}

.document-state {
    font-weight: 700;
}

.status-valid .document-state {
    color: #15803d;
}

.status-soon .document-state {
    color: #a16207;
}

.status-expired .document-state {
    color: #b91c1c;
}

.maps-link,
.maintenance-actions a,
.record-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-top: 8px;
    color: #1d4ed8;
    font-weight: 650;
}

.maintenance-actions {
    margin-top: 14px;
}

.maintenance-actions .button-link,
.service-vehicle-heading .button-link {
    color: #fff;
    text-decoration: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.service-field[hidden],
.helper-text[hidden] {
    display: none !important;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.form-grid input[type="date"] {
    box-sizing: border-box;
    padding-inline: 10px;
    font: inherit;
}

.form-grid input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
}

.service-date-frame {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-inline: 3px;
    overflow: hidden;
    border-radius: 12px;
}

.form-grid .service-date-input {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.form-grid input[type="file"] {
    padding: 8px;
}

.helper-text {
    margin: 8px 0 14px;
    color: #64748b;
    font-size: 0.9rem;
}

.field-hint {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.4;
}

.service-vehicle-heading {
    padding: 16px;
    margin-bottom: 18px;
}

.service-vehicle-heading > div {
    flex: 1;
}

.service-vehicle-details {
    min-width: 0;
}

.service-vehicle-details h3 {
    margin-bottom: 8px;
}

.service-vehicle-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.vehicle-plate {
    display: inline-flex;
    max-width: 100%;
    padding: 4px 10px;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 750;
    letter-spacing: 0.035em;
    overflow-wrap: anywhere;
}

.vehicle-year {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
}

.report-vehicle-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 10px 18px;
}

.report-vehicle-details p {
    margin: 0;
}

.report-vehicle-details .report-vehicle-plate {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
}

.report-vehicle-plate > span {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.report-vehicle-plate > strong {
    padding: 5px 10px;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.95rem;
    letter-spacing: 0.035em;
    overflow-wrap: anywhere;
}

.service-record-list {
    display: grid;
    gap: 12px;
}

.service-record-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.service-record-heading h4 {
    margin: 0;
}

.inline-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.button-danger {
    background: #dc2626;
    border-color: #dc2626;
}

.empty-state-panel {
    text-align: center;
}

#enable-notifications {
    margin: 0;
}

@media (max-width: 600px) {
    .maintenance-toolbar,
    .garage-picker {
        align-items: stretch;
        flex-direction: column;
    }

    .garage-picker select {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .service-record-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .maintenance-vehicle {
        padding: 12px;
    }
}

/* App-style layout */
body {
    max-width: 1120px;
    padding: 20px;
    color: #172033;
    background:
        radial-gradient(ellipse at top left, rgb(191 219 254 / 38%), transparent 34rem),
        #f4f7fb;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

header.app-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: sticky;
    top: 12px;
    z-index: 10;
    padding: 16px 20px;
    color: #172033;
    background: rgb(255 255 255 / 94%);
    border: 1px solid #e6ebf2;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgb(15 23 42 / 7%);
}

.brand-row h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #172033;
    font-size: 1.55rem;
    letter-spacing: -0.035em;
}

.brand-row h1 img {
    flex: 0 0 40px;
    border-radius: 10px;
}

.header-actions {
    margin: 0 0 0 auto;
}

.menu-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    display: inline-grid;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    place-items: center;
    font-size: 1.25rem;
}

header.app-header nav.app-menu {
    flex: 1 0 100%;
    padding-top: 12px;
    border-top: 1px solid #edf0f5;
}

header.app-header nav.app-menu > ul {
    order: 1;
}

.app-menu .auth-status {
    order: 2;
}

.app-menu .menu-tools {
    order: 3;
}

header.app-header nav ul li a {
    padding: 9px 13px;
    color: #475569;
    background: transparent;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 600;
}

header.app-header nav ul li a:hover,
header.app-header nav ul li a:focus-visible {
    color: #075fc7;
    background: #eaf3ff;
}

.auth-status {
    color: #64748b;
    font-size: 0.9rem;
}

.auth-status a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.auth-status .auth-logout {
    padding: 0;
    color: #2563eb;
    background: none;
    border: 0;
    text-decoration: none;
    font-weight: 600;
}

.language-picker {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
}

.language-picker select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
textarea {
    max-width: none;
    min-height: 46px;
    padding: 11px 13px;
    color: #172033;
    background: #fff;
    border: 1px solid #dce3ed;
    border-radius: 12px;
    font: inherit;
}

.language-picker select {
    min-height: 42px;
    padding: 8px 12px;
}

button,
.button-link {
    min-height: 44px;
    padding: 10px 16px;
    color: #fff;
    background: #2563eb;
    border: 1px solid #2563eb;
    border-radius: 12px;
    font: inherit;
    font-weight: 650;
    box-shadow: 0 4px 10px rgb(37 99 235 / 16%);
}

button:hover,
.button-link:hover {
    background: #1d4ed8;
}

main {
    max-width: 900px;
    margin: 32px auto;
}

main > h2 {
    margin: 0 0 20px;
    color: #172033;
    font-size: clamp(1.65rem, 4vw, 2.2rem);
    letter-spacing: -0.045em;
}

main > section,
.home-intro,
.home-features > div {
    padding: 24px;
    background: #fff;
    border: 1px solid #e7ecf3;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgb(15 23 42 / 4%);
}

.home-intro {
    padding: clamp(28px, 6vw, 56px);
    text-align: left;
    background: linear-gradient(125deg, #fff 20%, #edf5ff 100%);
}

.home-intro h2 {
    max-width: 640px;
    color: #172033;
    font-size: clamp(2rem, 6vw, 3.2rem);
    line-height: 1.12;
    letter-spacing: -0.055em;
}

.home-intro p {
    max-width: 620px;
    color: #64748b;
    font-size: 1.08rem;
}

.home-links {
    justify-content: flex-start;
    margin-top: 24px;
}

.home-links a {
    min-height: 46px;
    padding: 11px 17px;
    border-radius: 12px;
    font-weight: 650;
}

.home-links a + a {
    color: #1d4ed8;
    background: #eaf2ff;
}

.home-features {
    gap: 16px;
    margin-top: 18px;
}

.home-features > div {
    flex: 1;
}

.home-features h3,
main section h3 {
    color: #172033;
}

form {
    padding: clamp(18px, 4vw, 28px);
    background: #fff;
    border: 1px solid #e7ecf3;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgb(15 23 42 / 4%);
}

form > br {
    display: none;
}

form label {
    margin: 16px 0 7px;
    color: #334155;
    font-size: 0.94rem;
}

form input,
form select,
form textarea {
    margin-bottom: 8px;
}

form textarea {
    width: 100%;
    resize: vertical;
}

form > button {
    margin-top: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.form-grid label {
    margin: 8px 0 0;
}

.form-grid input,
.form-grid textarea {
    width: 100%;
    margin: 0;
}

.status-message {
    margin: 0 0 18px;
    padding: 13px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 600;
}

.status-error {
    color: #a12232;
    background: #fff1f2;
    border-color: #fecdd3;
}

.status-success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.page-actions {
    margin-bottom: 18px;
}

.button-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.cancel-link {
    display: inline-block;
    margin: 12px 0 0 14px;
    color: #475569;
    font-weight: 600;
    text-decoration: none;
}

table {
    overflow: hidden;
    border: 1px solid #e7ecf3;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgb(15 23 42 / 4%);
}

th {
    color: #475569;
    background: #f1f5f9;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

td {
    color: #334155;
}

td a {
    color: #2563eb;
    font-weight: 650;
    text-decoration: none;
}

td a[data-i18n="delete"] {
    margin-left: 10px;
    color: #dc2626;
}

.fleet-table .fleet-vehicle-name {
    font-size: 1.2rem;
    font-weight: 750;
    line-height: 1.3;
}

.fleet-table .fleet-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 3px 8px rgb(15 23 42 / 8%);
}

.fleet-table td[data-column="6"] {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fleet-table td[data-column="6"] .inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.fleet-table td[data-column="6"] .inline-form > button {
    margin: 0;
}

.fleet-table .fleet-edit {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.fleet-table .fleet-edit:hover,
.fleet-table .fleet-edit:focus-visible {
    color: #1e40af;
    background: #dbeafe;
}

.fleet-table .fleet-delete {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}

.fleet-table .fleet-delete:hover,
.fleet-table .fleet-delete:focus-visible {
    background: #b91c1c;
    border-color: #b91c1c;
}

.empty-state {
    padding: 32px;
    color: #64748b;
    text-align: center;
}

.contact-table {
    margin-bottom: 22px;
}

section ul,
section ol {
    display: grid;
    gap: 12px;
}

section li label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-weight: 400;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    accent-color: #2563eb;
}

footer {
    color: #8491a4;
    border-color: #e4e9f0;
}

@media (max-width: 700px) {
    body {
        padding: 10px;
    }

    header.app-header {
        top: 6px;
        padding: 12px;
        border-radius: 16px;
    }

    .header-actions {
        margin: 0;
        order: -1;
    }

    .brand-row {
        margin: 0;
        justify-content: flex-end;
        text-align: right;
    }

    .brand-row h1 {
        justify-content: flex-end;
        width: 100%;
        text-align: right;
    }

    header.app-header nav.app-menu {
        display: block;
        top: 98px;
        bottom: 0;
        padding: 18px 16px 24px;
        background: #fff;
        border: 0;
        border-radius: 0 18px 0 0;
        order: 4;
    }

    .menu-tools {
        justify-content: space-between;
        margin-bottom: 18px;
        padding-bottom: 16px;
        border-bottom: 1px solid #edf0f5;
    }

    .language-picker {
        gap: 8px;
        font-size: 0.9rem;
    }

    .language-picker select {
        min-width: 112px;
        max-width: 140px;
    }

    .theme-toggle {
        width: 42px;
        height: 42px;
    }

    header.app-header nav ul li a {
        padding: 12px 14px;
        background: #f1f5f9;
        font-size: 1rem;
    }

    main {
        margin: 22px auto;
    }

    main > section,
    .home-intro,
    .home-features > div {
        padding: 20px;
        border-radius: 16px;
    }

    .home-intro {
        padding: 26px 20px;
    }

    .home-features {
        gap: 12px;
    }

    .contact-table {
        display: block;
        overflow: visible;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .contact-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .contact-table tbody,
    .contact-table tr {
        display: grid;
        gap: 10px;
    }

    .contact-table tr {
        padding: 14px;
        background: #fff;
        border: 1px solid #e7ecf3;
        border-radius: 14px;
        box-shadow: 0 6px 18px rgb(15 23 42 / 4%);
    }

    .contact-table td {
        display: grid;
        grid-template-columns: minmax(88px, 0.65fr) minmax(0, 1fr);
        gap: 12px;
        padding: 0;
        border: 0;
        overflow-wrap: anywhere;
    }

    .contact-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.78rem;
        font-weight: 700;
        text-transform: uppercase;
    }

    .contact-table th,
    .contact-table td {
        font-size: 0.82rem;
    }

    form {
        padding: 18px;
    }

    .fleet-table {
        display: block;
        overflow: visible;
        white-space: normal;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .fleet-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .fleet-table tbody {
        display: grid;
        gap: 14px;
    }

    .fleet-table tbody tr {
        display: grid;
        gap: 0;
        padding: 12px 16px;
        background: #fff;
        border: 1px solid #e7ecf3;
        border-radius: 16px;
        box-shadow: 0 8px 24px rgb(15 23 42 / 5%);
    }

    .fleet-table tbody td {
        display: grid;
        grid-template-columns: minmax(108px, 0.75fr) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 10px 0;
        color: #334155;
        border: 0;
        border-bottom: 1px solid #edf0f5;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .fleet-table tbody td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.76rem;
        font-weight: 700;
        letter-spacing: 0.025em;
        text-transform: uppercase;
    }

    .fleet-table tbody td:last-child {
        border-bottom: 0;
    }

    .fleet-table tbody td[data-column="0"] {
        color: #172033;
        font-size: 1.15rem;
    }

    .fleet-table .fleet-vehicle-name {
        font-size: 1.3rem;
    }

    .fleet-table tbody td[data-column="6"] {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .fleet-table tbody td[data-column="6"]::before {
        flex: 1 0 100%;
    }

    .fleet-table tbody td[data-column="6"] .inline-form {
        display: inline-flex;
        width: auto;
        padding: 0;
    }

    .fleet-table .empty-state {
        display: block;
        padding: 24px 8px;
        border: 0;
        text-align: center;
    }
}