* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

.page {
    padding: 30px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.card-small {
    max-width: 420px;
    margin: 80px auto;
}

h1 {
    margin-top: 0;
    font-size: 26px;
}

a {
    color: #1f2937;
}

a:hover {
    color: #000000;
}

.header {
    background: #111827;
    color: #ffffff;
    padding: 14px 30px;
    margin-bottom: 30px;
}

.header a {
    color: #ffffff;
    text-decoration: none;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-weight: bold;
}

.header-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 8px;
    border: 0;
    background: #111827;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
}

.btn:hover {
    background: #374151;
    color: #ffffff;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-secondary:hover {
    background: #d1d5db;
    color: #111827;
}

.btn-danger {
    background: #b91c1c;
}

.btn-danger:hover {
    background: #991b1b;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 11px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin-bottom: 20px;
}

.checkbox-line input {
    margin: 0;
}

small {
    color: #6b7280;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.success {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.table th,
.table td {
    border: 1px solid #e5e7eb;
    padding: 10px;
    text-align: left;
}

.table th {
    background: #f9fafb;
    font-weight: bold;
}

.table tr:hover {
    background: #f9fafb;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.text-danger {
    color: #b91c1c;
}

.text-muted {
    color: #6b7280;
}

.login-title {
    text-align: center;
}

@media (max-width: 700px) {
    .page {
        padding: 15px;
    }

    .header-inner {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .table {
        font-size: 14px;
    }

    .table th,
    .table td {
        padding: 8px;
    }
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 15px;
}

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-ko {
    background: #fee2e2;
    color: #991b1b;
}

.row-ok {
    background: #f0fdf4;
}

.row-ko {
    background: #fef2f2;
}

.table tr.row-ok:hover {
    background: #dcfce7;
}

.table tr.row-ko:hover {
    background: #fee2e2;
}

.section-title {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

.table-wrapper {
    overflow-x: auto;
}

.notes-input {
    width: 100%;
}

@media (max-width: 900px) {

    .criteria-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.badge-status {
    background: #e5e7eb;
    color: #374151;
}

.badge-status-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-status-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-status-estimate {
    background: #dbeafe;
    color: #1e40af;
}

.container-wide {
    max-width: 1400px;
}

.detail-table {
    max-width: 800px;
}

.detail-table th {
    width: 220px;
    background: #f9fafb;
}

.note-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    line-height: 1.5;
    white-space: normal;
}

.vehicles-table th:last-child,
.vehicles-table td:last-child {
    width: 115px;
    text-align: center;
}

.icon-actions {
    gap: 6px;
    justify-content: center;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #e5e7eb;
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
}

.icon-btn:hover {
    background: #d1d5db;
    text-decoration: none;
}

.icon-btn-danger {
    background: #fee2e2;
}

.icon-btn-danger:hover {
    background: #fecaca;
}

.header-separator {
    display: inline-block;
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.35);
    margin: 0 8px;
}

.header-user {
    color: #d1d5db;
    font-size: 13px;
    white-space: nowrap;
}

.mt-20 {
    margin-top: 20px;
}

.card-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.criteria-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.criteria-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
}

.criteria-label {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 4px;
}

.criteria-value {
    font-weight: bold;
    font-size: 15px;
}

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.45); 
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.is-visible {
    display: flex;
}

.modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 760px;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    border: 0;
    background: #e5e7eb;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

@media (max-width: 900px) {
    .criteria-summary {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 600px) {
    .criteria-summary {
        grid-template-columns: 1fr;
    }
}
.raw-api-details {
    margin-top: 20px;
}

.raw-api-details summary {
    cursor: pointer;
    color: #4b5563;
    font-size: 14px;
    margin-bottom: 10px;
}