* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #222;
}


/* =====================================
   HEADER
===================================== */

.app-header {
    background: #111827;
    color: white;
    padding: 25px 40px;
}

.app-header h1 {
    font-size: 28px;
}

.app-header p {
    margin-top: 5px;
    color: #cbd5e1;
}


/* =====================================
   MAIN
===================================== */

main {
    max-width: 1250px;
    margin: auto;
    padding: 30px;
}


/* =====================================
   DASHBOARD
===================================== */

.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card h2 {
    font-size: 15px;
    color: #64748b;
}

.card p {
    font-size: 34px;
    font-weight: bold;
    margin-top: 10px;
}

.active-card {
    border-left: 5px solid #16a34a;
}

.repair-card {
    border-left: 5px solid #eab308;
}

.grounded-card {
    border-left: 5px solid #dc2626;
}

.alert-card {
    border-left: 5px solid #eab308;
}


/* =====================================
   TABS
===================================== */

.main-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.tab-button {
    background: #e2e8f0;
    color: #334155;
}

.tab-button:hover {
    background: #cbd5e1;
}

.active-tab {
    background: #2563eb;
    color: white;
}

.active-tab:hover {
    background: #1d4ed8;
}


/* =====================================
   SECTIONS
===================================== */

.main-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-subtitle {
    color: #64748b;
    margin-top: 5px;
}


/* =====================================
   BUTTONS
===================================== */

button {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    background: #2563eb;
    color: white;
}

button:hover {
    background: #1d4ed8;
}

.secondary-button {
    background: #64748b;
}

.secondary-button:hover {
    background: #475569;
}


/* =====================================
   VEHICLES
===================================== */

.vehicle-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.vehicle-card h3 {
    margin-bottom: 8px;
}

.vehicle-card p {
    margin: 5px 0;
    color: #64748b;
}

.vehicle-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}


/* =====================================
   STATUS INDICATOR
===================================== */

.status-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-green {
    background: #16a34a;
}

.status-yellow {
    background: #eab308;
}

.status-red {
    background: #dc2626;
}

.vehicle-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    margin-bottom: 10px;
}

.status-text-active {
    color: #15803d;
}

.status-text-repair {
    color: #a16207;
}

.status-text-grounded {
    color: #b91c1c;
}


/* =====================================
   PLATE ALERT
===================================== */

.plate-warning {
    color: #a16207;
    font-weight: bold;
    margin-top: 8px;
}

.plate-expired {
    color: #b91c1c;
    font-weight: bold;
    margin-top: 8px;
}


/* =====================================
   MODALS
===================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    margin: 5% auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    background: transparent;
    color: #64748b;
    font-size: 28px;
    padding: 4px 10px;
}

.modal-close:hover {
    background: transparent;
    color: #111827;
}


/* =====================================
   FORMS
===================================== */

.modal-content label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    font-weight: bold;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 14px;
}

.modal-content textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-content > button:last-child {
    margin-top: 20px;
    width: 100%;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-buttons button {
    flex: 1;
}


/* =====================================
   VEHICLE INFORMATION
===================================== */

.vehicle-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.info-box {
    padding: 15px;
    border-radius: 8px;
    background: #f8fafc;
}

.info-box strong {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 5px;
}

.vehicle-status-large {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: bold;
    margin: 15px 0;
}

.vehicle-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.vehicle-actions button {
    flex: 1;
}


/* =====================================
   DAMAGE HISTORY
===================================== */

.history-title {
    margin-top: 30px;
    margin-bottom: 15px;
}

.damage-report {
    padding: 18px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.damage-report h4 {
    margin-bottom: 10px;
}

.damage-report p {
    margin: 6px 0;
    color: #475569;
}

.damage-report-status {
    font-weight: bold;
    margin-top: 10px;
}


/* =====================================
   DAMAGE PHOTOS
===================================== */

.damage-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.damage-photos img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}


/* =====================================
   INVENTORY SUMMARY
===================================== */

.inventory-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.inventory-summary-card {
    padding: 18px;
    background: #f8fafc;
    border-radius: 10px;
}

.inventory-summary-card span {
    display: block;
    color: #64748b;
    font-size: 14px;
}

.inventory-summary-card strong {
    display: block;
    font-size: 28px;
    margin-top: 5px;
}


/* =====================================
   INVENTORY ITEMS
===================================== */

.inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.inventory-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inventory-item h3 {
    margin-bottom: 5px;
}

.inventory-item p {
    color: #64748b;
    margin: 3px 0;
}

.inventory-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.inventory-green {
    color: #15803d;
}

.inventory-yellow {
    color: #a16207;
}

.inventory-red {
    color: #b91c1c;
}

.inventory-buttons {
    display: flex;
    gap: 8px;
}

.movement-item-name {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
}

.automatic-date {
    margin-top: 15px;
    color: #64748b;
    font-size: 13px;
}


/* =====================================
   MOBILE
===================================== */

@media (max-width: 750px) {

    main {
        padding: 15px;
    }

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .vehicle-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .vehicle-buttons {
        width: 100%;
        flex-direction: column;
    }

    .vehicle-buttons button {
        width: 100%;
    }

    .vehicle-info {
        grid-template-columns: 1fr;
    }

    .vehicle-actions {
        flex-direction: column;
    }

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

    .inventory-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .inventory-buttons {
        width: 100%;
        flex-direction: column;
    }

    .inventory-buttons button {
        width: 100%;
    }

    .damage-photos {
        grid-template-columns: repeat(2, 1fr);
    }

}