:root {
    --dilawri-red: #ba0c2f;
    --dilawri-red-dark: #8f0923;
    --bg: #eef1f5;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --soft: #f8fafc;
    --header: #333333;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: "Montserrat", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(180, 0, 0, 0.10), transparent 30%),
        linear-gradient(135deg, #f7f8fa, var(--bg));
    color: var(--text);
    font-size: 15px;
}

.dilawri-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: var(--header);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.dilawri-header-inner {
    height: 80px;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.dilawri-header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.dilawri-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.dilawri-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.dilawri-logo {
    max-height: 70px;
    width: auto;
}

.dilawri-logout {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    padding: 8px 16px;
    margin-right: 16px;
}

.dilawri-logout:hover {
    color: #ffffff;
}


.separator {
    color: rgba(255, 255, 255, 0.55);
    margin-left: 12px;
}

.page-404 {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #f3f4f6;
}

.card-404 {
    width: 100%;
    max-width: 620px;
    padding: 48px 38px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    text-align: center;
}

.card-404 h1 {
    margin: 0 0 10px;
    font-size: 72px;
    line-height: 1;
    font-weight: 700;
    color: var(--dilawri-red);
}

.card-404 h2 {
    margin: 0 0 14px;
    font-size: 30px;
    font-weight: 700;
    color: #111827;
}

.card-404 p {
    margin: 0 0 28px;
    font-size: 16px;
    color: #6b7280;
}

.dilawri-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.dilawri-nav-list li a {
    color: #f3f4f6;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.dilawri-nav-list li.active a,
.dilawri-nav-list li a:hover {
    color: #ffffff;
}

.dilawri-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    padding: 8px;
}

.dilawri-user-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.dilawri-user-name {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.login-page,
.reset-page {
    max-width: 1140px;
    padding: 20px 40px;
}

.login-title,
.reset-title {
    margin: 0 0 40px;
    color: var(--auth-text);
    font-size: 27px;
    font-weight: 400;
    line-height: 1.25;
}

.login-form,
.reset-form {
    width: 100%;
    max-width: 1000px;
}

.form-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    margin-bottom: 26px;
}

.form-row label {
    margin: 0;
    color: #0f2f57;
    font-size: 16px;
    font-weight: 400;
}

.login-input,
.reset-input {
    width: 100%;
    max-width: 750px;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    outline: none;
    background: #ffffff;
    color: var(--auth-text);
    font: inherit;
    font-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input:focus,
.reset-input:focus {
    border-color: var(--dilawri-red);
    box-shadow: 0 0 0 3px rgba(186, 12, 47, 0.08);
}

.password-wrap {
    position: relative;
    width: 100%;
    max-width: 750px;
}

.password-wrap .login-input,
.password-wrap .reset-input {
    max-width: none;
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 24px;
    height: 24px;
    padding: 2px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    cursor: pointer;
}

.password-eye-icon {
    display: block;
    width: 18px;
    height: 18px;
}

.field-errors {
    grid-column: 2;
    margin: -18px 0 4px;
    padding: 0;
    list-style: none;
    color: #a12622;
    font-size: 13px;
}

.actions-row {
    margin-top: 8px;
}

.actions-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-signin,
.btn-reset,
.btn-red,
.forgot-link,
.back-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 165px;
    height: 41px;
    padding: 0 18px;
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    font: inherit;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}

.btn-signin {
    background: #198754;
}

.btn-signin:hover,
.btn-signin:focus-visible {
    background: #157347;
}

.btn-reset,
.btn-red,
.forgot-link {
    background: var(--dilawri-red);
}

.btn-reset:hover,
.btn-red:hover,
.forgot-link:hover,
.btn-reset:focus-visible,
.btn-red:focus-visible,
.forgot-link:focus-visible {
    background: var(--dilawri-red-dark);
    color: #ffffff;
    text-decoration: none;
}

.back-login-link {
    min-width: 0;
    padding: 0 4px;
    background: transparent;
    color: var(--dilawri-red);
    font-size: 14px;
    font-weight: 600;
}

.back-login-link:hover {
    color: var(--dilawri-red-dark);
    text-decoration: underline;
}

.auth-help-text {
    max-width: 750px;
    margin: -16px 0 26px 248px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.55;
}

.flash-wrap {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 40px;
}

.alert {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 15px 0 20px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    border-color: #b7dfc2;
    background: #eaf7ee;
    color: #1f6b37;
}

.alert-danger {
    border-color: #f5c2c7;
    background: #fdecec;
    color: #a12622;
}

.alert-warning,
.alert-info {
    border-color: #f2d58a;
    background: #fff8e5;
    color: #8a6d1d;
}

.alert .close {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    opacity: 0.65;
}

@media (max-width: 700px) {

    .login-page,
    .reset-page {
        min-height: auto;
        padding: 32px 20px;
    }

    .login-title,
    .reset-title {
        margin-bottom: 28px;
        font-size: 24px;
    }

    .form-row {
        display: block;
        margin-bottom: 20px;
    }

    .form-row label {
        display: block;
        margin-bottom: 8px;
    }

    .login-input,
    .reset-input,
    .password-wrap {
        max-width: none;
    }

    .field-errors {
        margin: 7px 0 0;
    }

    .auth-help-text {
        margin: -8px 0 22px;
    }

    .actions-group {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-signin,
    .btn-reset,
    .btn-red,
    .forgot-link {
        width: 100%;
    }

    .flash-wrap {
        padding: 0 20px;
    }
}


.page-content {
    max-width: 1280px;
    margin: 36px auto;
    padding: 0 24px;
}

.page {
    width: 100%;
}

.card,
.result-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.09);
}

.card {
    max-width: 1050px;
    margin: 0 auto;
    padding: 38px;
}

.results-section {
    max-width: 1180px;
    margin: 34px auto 0;
}

.result-card {
    padding: 28px;
}

h1,
h2,
h3 {
    margin-top: 0;
    color: var(--text);
}

h1 {
    font-size: 34px;
    line-height: 1.2;
}

h2 {
    font-size: 22px;
    margin-bottom: 18px;
}

h3 {
    font-size: 16px;
}

.subtitle {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
    max-width: 720px;
    margin: 14px 0 28px;
}

.upload-grid {
    display: flex;
    gap: 28px;
    margin-top: 28px;
}

.drop-area {
    flex: 1;
    min-height: 235px;
    border: 2px dashed #d6dbe5;
    border-radius: 18px;
    background: #fafafa;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-align: center;
    transition: 0.2s ease;
}

.drop-area:hover {
    border-color: var(--dilawri-red);
    background: #fff5f5;
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.drop-area h3 {
    margin: 12px 0 8px;
    font-size: 18px;
}

.drop-area p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.drop-area input[type="file"] {
    width: auto;
    font-size: 13px;
}

.button-row {
    margin-top: 30px;
    text-align: center;
}

.button-row button {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--dilawri-red-dark), var(--dilawri-red));
    color: white;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(157, 11, 14, 0.24);
    transition: 0.2s ease;
}

.button-row button:hover {
    background: var(--dilawri-red-dark);
    transform: translateY(-1px);
}

.summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 22px 0;
}

.summary div {
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.summary h3 {
    font-size: 28px;
    margin: 0;
}

.summary p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin: 22px 0 18px;
}

.tab-btn {
    padding: 9px 18px;
    border: none;
    border-radius: 999px;
    background: #f1f5f9;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.tab-btn:hover {
    background: #e2e8f0;
}

.tab-btn.active {
    background: #111827;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.table-panel {
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: auto;
    max-height: 430px;
    background: white;
}

.recon-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.recon-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--soft);
    color: #374151;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: left;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
}

.recon-table tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
}

.recon-table tbody tr:hover {
    background: var(--soft);
}

.recon-table tbody tr:last-child td {
    border-bottom: none;
}

.stock-cell {
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.status-pill {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-pill.matched {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-pill.missing {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.dilawri-footer {
    margin-top: 60px;
    background: #ffffff;
    border-top: 1px solid var(--border);
}

.dilawri-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    color: #52607a;
}

.dilawri-footer a {
    color: var(--dilawri-red);
    text-decoration: none;
}

.dilawri-footer a:hover {
    text-decoration: underline;
}

.dilawri-footer-sep {
    color: #d1d5db;
}

.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 6px solid #e5e5e5;
    border-top: 6px solid #0056b3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.drop-area {
    position: relative;
    min-height: 240px;
    padding: 32px 24px;
    border: 2px dashed #b5bdc9;
    border-radius: 14px;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.drop-area:hover {
    border-color: #1d4f91;
    background: #f4f8fd;
    transform: translateY(-2px);
}

.drop-area.drag-over {
    border-color: #1d4f91;
    background: #eaf3ff;
    box-shadow: 0 0 0 4px rgba(29, 79, 145, 0.12);
}

.drop-area.file-added {
    border-style: solid;
    border-color: #198754;
    background: #f1fff7;
}

.drop-area.file-error {
    border-color: #dc3545;
    background: #fff5f5;
}

.drop-area input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.upload-icon {
    margin-bottom: 12px;
    font-size: 42px;
}

.drop-area h3 {
    margin: 0 0 8px;
}

.drop-area p {
    margin: 0 0 6px;
    color: #687386;
}

.browse-text {
    color: #1d4f91;
    font-weight: 600;
}

.selected-file {
    display: block;
    max-width: 100%;
    margin-top: 16px;
    padding: 8px 12px;
    border-radius: 7px;
    background: #edf0f4;
    color: #505c6c;
    font-size: 14px;
    word-break: break-word;
}

.drop-area.file-added .selected-file {
    background: #dff5e8;
    color: #146c43;
}

.drop-area.file-error .selected-file {
    background: #f8d7da;
    color: #842029;
}

.tab-content.active {
    display: block;
}

.email-button-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 22px 0 18px;
    gap: 24px;
}

.email-button-row form {
    margin: 0;
}

.send-email-btn {
    background: linear-gradient(135deg, var(--dilawri-red-dark), var(--dilawri-red));
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.download-report-btn {
    background: var(--soft);
    color: var(--dilawri-red);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.send-email-btn:hover {
    background-color: var(--dilawri-red-dark);
    transform: translateY(-1px);

}

.send-email-btn:active {
    transform: translateY(0);
}

.send-email-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.send-email-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.dealership-section {
    margin: 20px 0 24px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.dealership-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

.dealership-label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dealership-name {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
    font-weight: 750;
}

.dealership-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.dealership-status.matched {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.dealership-status.mismatch {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.dealership-file-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dealership-file-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.dealership-file-card strong {
    color: #0f172a;
    font-size: 15px;
}

.dealership-file-card span:not(.file-source) {
    color: #64748b;
    font-size: 13px;
}

.file-source {
    width: fit-content;
    padding: 4px 9px;
    color: #334155;
    background: #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.not-found {
    color: #b91c1c !important;
}

.dealership-message {
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.dealership-message.success {
    color: #166534;
    background: #dcfce7;
}

.dealership-message.error {
    color: #991b1b;
    background: #fee2e2;
}

.result-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.result-heading-row h2 {
    margin: 0;
}

.new-comparison-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--dilawri-red-dark), var(--dilawri-red));
    border-radius: 9px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.dealership-section {
    margin: 0 0 24px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.dealership-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

.dealership-label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dealership-name {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
    font-weight: 750;
}

.dealership-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.dealership-status.mismatch {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.dealership-file-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dealership-file-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.dealership-file-card strong {
    color: #0f172a;
    font-size: 15px;
}

.dealership-file-card span:not(.file-source) {
    color: #64748b;
    font-size: 13px;
}

.file-source {
    width: fit-content;
    padding: 4px 9px;
    color: #334155;
    background: #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.not-found {
    color: #b91c1c !important;
}

.dealership-message.error {
    margin-top: 14px;
    padding: 11px 14px;
    color: #991b1b;
    background: #fee2e2;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.summary-card {
    padding: 24px 18px;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
}

.summary-number {
    color: #0f172a;
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
}

.summary-label {
    margin-top: 10px;
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
}

.summary-card--matched {
    border-color: #bbf7d0;
}

.summary-card--missing {
    border-color: #fecaca;
}

.summary-card--warning {
    border-color: #fed7aa;
}


.compact-file-strip {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 16px 20px;
    margin: 20px 0 18px;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
}

.compact-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.compact-file-item>div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.compact-file-item strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.compact-file-item span:not(.compact-file-badge):not(.compact-meta-label) {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.compact-file-dealership {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-right: auto;
}

.compact-file-dealership strong {
    font-size: 20px;
}

.compact-meta-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.compact-file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.compact-file-badge--pdf {
    color: #9f1239;
    background: #ffe4e6;
}

.compact-file-badge--excel {
    color: #166534;
    background: #dcfce7;
}

.compact-file-divider {
    width: 1px;
    align-self: stretch;
    min-height: 42px;
    background: #dbe3ee;
}

.compact-file-meta {
    gap: 7px;
}

.compact-file-meta span {
    color: #64748b;
    font-size: 13px;
}

.compact-file-meta strong {
    font-size: 15px;
}

.compact-dealership-error {
    margin: -6px 0 18px;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    margin: 0 0 20px;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
}

.summary-strip-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 92px;
    padding: 14px 16px;
}

.summary-strip-item:not(:last-child) {
    border-right: 1px solid #dbe3ee;
}

.summary-strip-number {
    color: #0f172a;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.summary-strip-label {
    max-width: 118px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

.summary-strip-item--matched {
    background: #f4fbf6;
}

.summary-strip-item--missing {
    background: #fff7f7;
}

.summary-strip-item--warning {
    background: #fffaf5;
}

.summary-strip-item--matched .summary-strip-number {
    color: #15803d;
}

.summary-strip-item--missing .summary-strip-number {
    color: #b91c1c;
}

.summary-strip-item--warning .summary-strip-number {
    color: #c2410c;
}

.validation-alert {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    box-sizing: border-box;
    padding: 16px 48px 16px 16px;
    margin: 0 0 22px;
    border-radius: 10px;
    font-family: Arial, sans-serif;
}

.validation-alert-error {
    background: #fff4f4;
    border: 1px solid #e5a3a3;
    box-shadow: 0 4px 12px rgba(148, 30, 30, 0.08);
}

.validation-alert-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #b42318;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

.validation-alert-content {
    flex: 1;
    min-width: 0;
}

.validation-alert-title {
    margin-bottom: 4px;
    color: #8a1c16;
    font-size: 15px;
    font-weight: 700;
}

.validation-alert-text {
    color: #6f1d1b;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.validation-alert-close {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 4px 7px;
    border: 0;
    background: transparent;
    color: #8a1c16;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.validation-alert-close:hover {
    color: #4f0f0c;
}

.validation-alert-close:focus {
    outline: 2px solid #b42318;
    outline-offset: 2px;
    border-radius: 4px;
}

.upload-form .dealership-field {
    width: 100%;
    max-width: 420px;
    margin-bottom: 24px;
    text-align: left;
}

.upload-form .dealership-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.upload-form .dealership-field select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #c7c7c7;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font: inherit;
}

.upload-form .dealership-field select:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.upload-form .dealership-field p {
    margin: 8px 0 0;
    font-size: 13px;
    color: #595959;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .validation-alert {
        padding: 14px 42px 14px 14px;
    }

    .validation-alert-title {
        font-size: 14px;
    }

    .validation-alert-text {
        font-size: 13px;
    }
}

@media (max-width: 1150px) {
    .compact-file-strip {
        flex-wrap: wrap;
    }

    .compact-file-dealership {
        width: 100%;
        margin-right: 0;
    }

    .compact-file-divider {
        display: none;
    }

    .summary-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .summary-strip-item {
        border-right: 1px solid #dbe3ee;
        border-bottom: 1px solid #dbe3ee;
    }
}

@media (max-width: 720px) {
    .compact-file-strip {
        align-items: flex-start;
        gap: 14px;
    }

    .compact-file-item {
        width: 100%;
    }

    .summary-strip {
        grid-template-columns: 1fr;
    }

    .summary-strip-item {
        justify-content: flex-start;
        min-height: 72px;
        border-right: 0;
    }

    .summary-strip-label {
        max-width: none;
    }
}

@media (max-width: 1100px) {
    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}



@media (max-width: 700px) {

    .result-heading-row,
    .dealership-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dealership-file-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .dealership-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dealership-file-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .dilawri-header {
        position: static;
    }

    .dilawri-header-inner {
        height: auto;
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .dilawri-header-left,
    .dilawri-nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .dilawri-header-right {
        margin-left: 0;
    }

    .page-content {
        padding: 0 16px;
        margin: 24px auto;
    }

    .card,
    .result-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    h1 {
        font-size: 30px;
    }

    .upload-grid,
    .summary {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .summary {
        display: grid;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .dilawri-footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .dilawri-footer-sep {
        display: none;
    }
}


.compact-file-name {
    display: block;
    max-width: 230px;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-file-item .compact-file-name {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mismatch-state {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
    margin-top: 20px;
    background: #fff7f7;
    border: 1px solid #fecaca;
    border-radius: 14px;
}

.mismatch-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 20px;
    font-weight: 800;
}

.mismatch-state h3 {
    margin: 0 0 7px;
    color: #991b1b;
    font-size: 18px;
}

.mismatch-state p {
    margin: 3px 0;
    color: #7f1d1d;
    line-height: 1.5;
}

@media (max-width: 1150px) {
    .compact-file-item .compact-file-name {
        max-width: 300px;
    }
}

@media (max-width: 720px) {
    .compact-file-item .compact-file-name {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .mismatch-state {
        padding: 18px;
    }
}