/* =====================================
   RESET
===================================== */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f4f6f9;
    color: #1f2937;
}


/* =====================================
   PAGE WRAPPER
===================================== */
.page-wrapper {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
}


/* =====================================
   CONTAINER (FULL DESKTOP WIDTH)
===================================== */
.container {
    max-width: 1500px;
    width: 100%;
}


/* =====================================
   HEADER
===================================== */
.title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.header-logo {
    width: 60px;
    height: auto;
}

h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}


/* =====================================
   SECTION STYLE
===================================== */
.section {
    background: #ffffff;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.section h2 {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
}


/* =====================================
   TOP GRID (GENERAL + ADDRESS)
===================================== */
.top-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}


/* =====================================
   VEHICLE GRID (TRUCK + TRAILER)
===================================== */
.vehicle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}


/* =====================================
   FORM GRID
===================================== */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.form-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 500;
}


/* =====================================
   INPUTS
===================================== */
input,
select {
    margin-top: 6px;
    padding: 8px 11px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    min-height: 38px;
    transition: 0.2s ease;
    background: #ffffff;
}

input:focus,
select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

input[type="radio"] {
    accent-color: #2563eb;
}


/* =====================================
   SECTION HEADER BUTTONS
===================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.inline-add-btn {
    background: #2563eb;
    color: #fff;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
}

.inline-add-btn:hover {
    background: #1e4ed8;
}


/* =====================================
   DYNAMIC ROW ITEMS
===================================== */
.items-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.row-item {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 10px;
}

.row-item label {
    flex: 1;
    min-width: 120px;
}

.row-item .remove-btn {
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    align-self: center;
}

.row-item .remove-btn:hover {
    background: #b91c1c;
}


/* Width Helpers */
.w-type      { flex: 0 0 100px; }
.w-name      { flex: 1 1 150px; }
.w-date      { flex: 0 0 125px; }
.w-license   { flex: 0 0 135px; }
.w-state     { flex: 0 0 65px; }

.w-year      { flex: 0 0 85px; }
.w-make      { flex: 1 1 130px; }
.w-trucktype { flex: 0 0 130px; }
.w-gvw       { flex: 0 0 100px; }
.w-vin       { flex: 1 1 170px; }


/* =====================================
   CARGO TOTAL
===================================== */
.total-indicator {
    margin-top: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: right;
}


/* =====================================
   FILE UPLOAD
===================================== */
.compact-upload {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-name {
    font-size: 14px;
    color: #2563eb;
}

.remove-file-btn {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
}

.remove-file-btn:hover {
    background: #b91c1c;
}

.upload-note {
    font-size: 12px;
    color: #6b7280;
}


/* =====================================
   COVERAGE GRID
===================================== */
.coverage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.coverage-row {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 10px;
}

.coverage-row strong {
    display: block;
    margin-bottom: 6px;
}

.coverage-options {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
}

.coverage-fields {
    display: none;
    flex-direction: column;
    gap: 6px;
}


/* =====================================
   SUBMIT BUTTON
===================================== */
.submit-btn {
    width: 100%;
    background: #2563eb;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px;
    border-radius: 8px;
    margin-top: 18px;
    border: none;
    cursor: pointer;
}

.submit-btn:hover {
    background: #1e4ed8;
}


/* =====================================
   AUTOCOMPLETE
===================================== */
.suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.suggestion-item:hover {
    background: #f3f4f6;
}


/* =====================================
   RESPONSIVE
===================================== */
@media (max-width: 1200px) {
    .coverage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .top-grid,
    .vehicle-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

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

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

    .row-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .row-item .remove-btn {
        width: 100%;
    }

    input,
    select {
        min-height: 44px;
    }

    .submit-btn {
        padding: 16px;
    }
}

@media (max-width: 500px) {
    .title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-logo {
        width: 50px;
    }
}