/* Root variables */
:root {
    --primary-color: #2196F3;
    --danger-color: #F44336;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --info-color: #00BCD4;
    --light-gray: #f5f5f5;
    --border-radius: 0.5rem;
}

/* General styles */
body {
    background-color: var(--light-gray);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

main {
    min-height: calc(100vh - 56px);
    background-color: var(--light-gray);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--light-gray);
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background-color: #1976D2;
    border-color: #1976D2;
}

.btn-sm {
    font-size: 0.875rem;
}

/* Tables */
.table {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead {
    background-color: var(--light-gray);
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #fafafa;
}

/* Status badges */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
}

.status-ok {
    background-color: var(--success-color);
    color: white;
}

.status-warning {
    background-color: var(--warning-color);
    color: white;
}

.status-expired {
    background-color: var(--danger-color);
    color: white;
}

/* Category colors */
.category-fuel {
    color: #FF9800;
}

.category-repair {
    color: #F44336;
}

.category-insurance {
    color: #2196F3;
}

.category-other {
    color: #9C27B0;
}

/* Dashboard */
.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-stat {
    text-align: center;
    padding: 1rem;
}

.dashboard-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.dashboard-stat-label {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

/* Modal */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background-color: var(--light-gray);
    border-bottom: 1px solid #e0e0e0;
}

.modal-title {
    font-weight: 600;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-stat {
        padding: 0.75rem;
    }

    .dashboard-stat-value {
        font-size: 1.5rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Loading spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner-border {
    color: var(--primary-color);
}

/* Alert */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

.alert-success {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.alert-danger {
    background-color: #FFEBEE;
    color: #C62828;
}

.alert-warning {
    background-color: #FFF3E0;
    color: #E65100;
}

.alert-info {
    background-color: #E0F2F1;
    color: #00695C;
}

/* Utility classes */
.text-muted-sm {
    font-size: 0.875rem;
    color: #999;
}

.mt-safe {
    margin-top: 1rem;
}

.mb-safe {
    margin-bottom: 1rem;
}

/* PWA specific */
@media (display-mode: standalone) {
    body {
        padding-top: 0;
    }
}
