/* AutoMecânicaPro - Main Stylesheet */
:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
}

* {
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
    position: fixed;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar .nav-link {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar .nav-link.active {
    background: var(--primary);
    color: white !important;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 8px;
    text-align: center;
}

/* Page Content */
#page-content-wrapper {
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
}

body.sidebar-collapsed #page-content-wrapper {
    margin-left: 0;
}

/* Cards */
.card {
    border-radius: 12px;
    transition: transform 0.2s ease;
}

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

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.15rem rgba(13,110,253,0.15);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* Status Colors */
.status-aberta { background-color: #0d6efd; }
.status-aguardando { background-color: #ffc107; color: #000; }
.status-em_manutencao { background-color: #17a2b8; }
.status-finalizada { background-color: #28a745; }
.status-entregue { background-color: #6f42c1; }
.status-cancelada { background-color: #dc3545; }

/* Dashboard KPI */
.card .h2, .card .h3, .card .h4 {
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    .sidebar.show {
        margin-left: 0;
    }
    #page-content-wrapper {
        margin-left: 0;
    }
    .container-fluid {
        padding: 1rem !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Print Styles */
@media print {
    .sidebar, .navbar, .btn, .no-print {
        display: none !important;
    }
    #page-content-wrapper {
        margin-left: 0 !important;
    }
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Quick Search */
.quick-search {
    position: relative;
}

.quick-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.quick-search-results.show {
    display: block;
}

.quick-search-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

.quick-search-item:hover {
    background: #f8f9fa;
}
