:root {
    --primary-orange: #f58a48;
    --light-orange: #fff5ee;
    --dark-orange: #c4510e;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-sub: #777777;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    padding: 20px;
    background-image: linear-gradient(135deg, #f37021 0%, #ff9a44 100%);
    min-height: 100vh;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-bottom: 5px solid var(--primary-orange);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-orange);
    margin-right: 20px;
    width: 60px;
    text-align: center;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-sub);
    font-weight: 600;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-orange);
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--text-sub);
}

/* Main Content Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.content-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.content-card h3 {
    margin-bottom: 15px;
    color: var(--text-main);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--light-orange);
    padding-bottom: 10px;
}

/* Section Header - NOVO */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: var(--text-main);
    font-size: 1.3rem;
}

.btn-add-vehicle {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-add-vehicle:hover {
    background: var(--dark-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Vehicle List */
.vehicles-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.vehicle-list {
    display: grid;
    gap: 12px;
}

.vehicle-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.vehicle-item:hover {
    background: var(--light-orange);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vehicle-item.sold {
    opacity: 0.6;
    background: #f5f5f5;
}

.vehicle-img {
    width: 80px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--dark-orange) 100%);
    border-radius: 8px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    overflow: hidden;
    flex-shrink: 0;
}

.vehicle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vehicle-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-main);
}

.vehicle-price {
    color: var(--primary-orange);
    font-weight: bold;
    font-size: 15px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-top: 5px;
}

.status-badge.sold {
    background: #dc3545;
    color: white;
}

.status-badge.reserved {
    background: #ffc107;
    color: #333;
}

.btn-details {
    font-size: 13px;
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-details:hover {
    background: var(--dark-orange);
    transform: scale(1.05);
}

/* Modal Styles - NOVO */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    padding: 25px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--dark-orange) 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 25px;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Form Styles - NOVO */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(245, 138, 72, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Image Preview - NOVO */
.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.preview-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    background: #f5f5f5;
}

.preview-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 14px;
}

.remove-image:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* Modal Actions - NOVO */
.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-orange);
    color: white;
}

.btn-primary:hover {
    background: var(--dark-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Expense List */
.expenses-section {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.expenses-section h3 {
    margin-bottom: 15px;
    color: var(--text-main);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--light-orange);
    padding-bottom: 10px;
}

.expense-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

.expense-item:hover {
    background: var(--light-orange);
}

.expense-icon {
    width: 45px;
    height: 45px;
    background: var(--light-orange);
    color: var(--primary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
}

.expense-desc {
    flex-grow: 1;
    font-size: 0.95rem;
    color: var(--text-main);
}

.expense-val {
    font-weight: bold;
    color: var(--primary-orange);
    font-size: 16px;
}

/* Charts */
.chart-section {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.chart-section h3 {
    margin-bottom: 15px;
    color: var(--text-main);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--light-orange);
    padding-bottom: 10px;
}

/* Bottom Grid */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.mini-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.mini-chart-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.mini-chart-card h4 {
    margin-bottom: 15px;
    color: var(--text-main);
    font-size: 1rem;
    border-bottom: 2px solid var(--light-orange);
    padding-bottom: 10px;
}

.bottom-stat {
    text-align: center;
    margin-bottom: 15px;
}

.large-value {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-orange);
}

.sub-label {
    color: var(--text-sub);
}

.chart-container {
    height: 250px;
    position: relative;
}

.mini-chart {
    height: 150px;
}

/* Responsive */
@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .bottom-grid {
        grid-template-columns: 1fr;
    }
    .mini-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

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

    .vehicle-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .vehicle-img {
        margin-right: 0;
        margin-bottom: 10px;
    }

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

    .btn-add-vehicle {
        justify-content: center;
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 10px auto;
    }

    .modal-body {
        padding: 20px;
        max-height: 60vh;
    }

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

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .image-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .vehicle-item {
        padding: 12px;
    }

    .btn-details {
        width: 100%;
        padding: 8px 16px;
    }
}