*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f3f6f4;
    color: #1f2933;
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(960px, 92%);
    margin: 0 auto;
}

.topbar {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: #fff;
    padding: 16px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-size: 1.35rem;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 12px;
}

.nav a {
    padding: 8px 14px;
    border-radius: 999px;
    opacity: 0.9;
}

.nav a.active,
.nav a:hover {
    background: rgba(255, 255, 255, 0.16);
    opacity: 1;
}

.main {
    padding: 28px 0 48px;
}

.footer {
    padding: 24px 0 32px;
    text-align: center;
    color: #667885;
    font-size: 0.92rem;
}

.hero,
.card,
.panel {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(31, 41, 51, 0.08);
    border: 1px solid #e5ece7;
}

.hero {
    background: linear-gradient(135deg, #e8f5e9, #ffffff);
}

.hero h1,
.card h1,
.card h2,
.panel h2 {
    margin-bottom: 8px;
}

.muted {
    color: #667885;
}

.hidden {
    display: none !important;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.vehicle-list {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.vehicle-card {
    display: block;
    padding: 20px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5ece7;
    box-shadow: 0 6px 18px rgba(31, 41, 51, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vehicle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.1);
}

.vehicle-card h3 {
    margin-bottom: 4px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    background: #e8f5e9;
    color: #1b5e20;
}

.badge-draft {
    background: #fff3e0;
    color: #e65100;
}

.alert-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.alert-item {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fafafa;
    border-left: 4px solid #ccc;
}

.alert-item.critical { border-left-color: #e53935; background: #ffebee; }
.alert-item.warning { border-left-color: #fb8c00; background: #fff3e0; }
.alert-item.ok { border-left-color: #43a047; background: #e8f5e9; }

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
}

.field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.field span {
    font-size: 0.92rem;
    color: #4b5563;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="file"],
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d6dde0;
    border-radius: 12px;
    font: inherit;
    background: #fff;
}

input:focus,
select:focus {
    outline: 2px solid rgba(46, 125, 50, 0.25);
    border-color: #2e7d32;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.btn:hover {
    opacity: 0.92;
}

.btn-primary {
    background: #2e7d32;
    color: #fff;
}

.btn-secondary {
    background: #edf2ef;
    color: #1f2933;
}

.btn-block {
    width: 100%;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.preview-card {
    margin-top: 20px;
    padding: 20px;
    border-radius: 16px;
    background: #f8fbf9;
    border: 1px solid #dfeae2;
}

.preview-card.found {
    border-color: #a5d6a7;
}

.preview-card.partial {
    border-color: #ffcc80;
}

.deadlines {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.deadline-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2ef;
}

.deadline-row:last-child {
    border-bottom: none;
}

.field-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.field-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fafafa;
}

.field-status.ok {
    background: #e8f5e9;
}

.field-status.missing {
    background: #fff3e0;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state p {
    margin: 10px 0 20px;
    color: #667885;
}

.doc-list,
.service-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.doc-item,
.service-item {
    padding: 14px;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid #eceff1;
}

.extraction-box {
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    background: #f1f8f2;
    border: 1px solid #c8e6c9;
}

.extraction-box ul {
    margin: 10px 0 0 18px;
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.stat-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef2ef;
    font-size: 0.92rem;
}

.targa-input {
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

.section-title {
    margin-top: 24px;
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .actions {
        flex-direction: column;
    }

    .btn,
    .actions .btn {
        width: 100%;
    }
}
