* { box-sizing: border-box; }

:root {
    ///--lusmar-dark: #2f2f32;
    --lusmar-dark: #0e1b4d;
    --lusmar-navy: #0e1b4d;
    --lusmar-blue: #2e3f6e;
    ///--line: #d7dbe3;
    --line: #0000004f;
    --bg: #f5f7fb;
    --text: #111827;
    --lusmar-vehicle: #abacadad;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a { color: #0b57d0; text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
    width: 100%;
    background: var(--lusmar-dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.16);
}

.header-inner {
    width: min(1500px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand { display: inline-flex; align-items: center; color: #fff; min-width: 130px; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 34px; width: auto; display: block; }

.main-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.main-nav a {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 14px 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: background .18s ease;
}
.main-nav a:hover { background: #3b3b3e; text-decoration: none; }
.nav-icon { color: #fff; font-size: 15px; line-height: 1; }

.site-footer {
    width: 100%;
    background: var(--lusmar-dark);
    color: #fff;
    text-align: center;
    padding: 22px 10px;
    margin-top: 40px;
    font-size: 14px;
    font-weight: 700;
}

.container {
    width: min(1280px, calc(100% - 32px));
    margin: 24px auto;
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,.06);
}
.a4-screen { max-width: 297mm; min-height: 210mm; }
.narrow { max-width: 820px; }

.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.action-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h1 { margin: 0 0 8px; font-size: 26px; }
h2 { margin: 0 0 14px; font-size: 18px; }
.muted { margin: 0; color: #6b7280; }
.print-title { text-align: center; margin-bottom: 24px; }

.button, button {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    border: 0;
    background: var(--lusmar-blue);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}
.button:hover, button:hover { text-decoration: none; filter: brightness(.95); }
.button-light { background: #eef2ff; color: #0e1b4d; }

.card-section { border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 18px 0; background: #fbfcff; }

.vehicle-form { display: grid; gap: 14px; }
.vehicle-form label { display: grid; gap: 6px; font-weight: 700; }
.vehicle-form input, .vehicle-form select, .vehicle-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-actions { display: flex; gap: 10px; align-items: center; }
.checkbox-label { display: flex !important; align-items: center; gap: 8px; }
.checkbox-label input { width: auto; }
.success, .notice { padding: 10px 12px; border-radius: 10px; background: #e9f8ee; color: #146c2e; margin: 12px 0; }
.error { padding: 10px 12px; border-radius: 10px; background: #fdecec; color: #a30000; margin: 12px 0; }

.compat-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
    table-layout: fixed;
}
.compat-table th, .compat-table td {
    border: 1px solid var(--line);
    padding: 8px 10px;
    vertical-align: middle;
    overflow-wrap: anywhere;
}
.compat-table thead th {
    background: var(--lusmar-navy) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,.35) !important;
    text-align: left;
    font-weight: 700;
}
.compat-table thead th span { color: #fff !important; }
.compat-table th:nth-child(1) { width: 12%; }
.compat-table th:nth-child(2) { width: 16%; }
.compat-table th:nth-child(3) { width: 11%; }
.compat-table th:nth-child(4) { width: 15%; }
.compat-table th:nth-child(5) { width: 6%; text-align: center; }
.compat-table th:nth-child(6) { width: 9%; }
.compat-table th:nth-child(7) { width: 9%; }
.compat-table th:nth-child(8) { width: 8%; }
.compat-table th:nth-child(9) { width: 10%; }
.compat-table th:nth-child(10) { width: 7%; }

.compat-table tbody tr.vehicle-group-white td { background: #fff; color: #000; }
.compat-table tbody tr.vehicle-group-blue td { background: var(--lusmar-vehicle); color: #000; }
.compat-table tbody tr.vehicle-group-blue a { color: #fff; text-decoration: underline; }
.compat-table tbody tr.vehicle-group-blue .tool-icon { color: #fff; }
.compat-table tbody tr.manufacturer-row td {
    background: #f2f4f8 !important;
    color: #000 !important;
    font-weight: 800;
    padding-top: 13px;
}
.beam-col { text-align: center; }
.beam-icon { width: 22px; height: 22px; display: inline-block; opacity: 1 !important; filter: none !important; vertical-align: middle; }
.beam-head { display: grid; align-items: center; justify-content: center; gap: 3px; }
.beam-other { font-size: 24px; line-height: 1; color: #6b7280; }
.tool-icon { font-size: 16px; opacity: .9; }

.login-body { min-height: 100vh; display: grid; place-items: center; background: #eef2ff; }
.login-card { width: min(420px, calc(100% - 32px)); background: #fff; padding: 28px; border-radius: 18px; box-shadow: 0 16px 42px rgba(0,0,0,.14); }
.login-card form { display: grid; gap: 14px; }
.login-card label { display: grid; gap: 6px; font-weight: 700; }
.login-card input { padding: 12px; border-radius: 10px; border: 1px solid var(--line); }
.login-logo { 
    max-height: 48px; 
    max-width: 220px; 
    width: 240px;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
}

@media (max-width: 800px) {
    .header-inner { align-items: flex-start; flex-direction: column; padding: 10px 0; }
    .main-nav { justify-content: flex-start; }
    .page-actions { align-items: flex-start; flex-direction: column; }
    .grid-2 { grid-template-columns: 1fr; }
    .container { width: min(100% - 16px, 1280px); padding: 14px; }
}

@media print {
    @page { size: A4 portrait; margin: 8mm; }
    body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .no-print, .site-header, .site-footer { display: none !important; }
    .container { width: 100%; max-width: none; min-height: auto; margin: 0; padding: 0; border-radius: 0; box-shadow: none; }
    .print-title { display: block; font-size: 22px; margin: 0 0 10px; }
    .compat-table { font-size: 10px; table-layout: fixed; }
    .compat-table th, .compat-table td { padding: 6px 7px; }
    .compat-table thead th { background: #0e1b4d !important; color: #fff !important; }
    .compat-table tbody tr.vehicle-group-white td { background: #fff !important; color: #000 !important; }
    .compat-table tbody tr.vehicle-group-blue td { background: #abacadad !important; color: #fff !important; }
    .beam-icon { width: 18px; height: 18px; }
}
