:root {
    --primary-color: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #4285f4;
    --secondary-color: #5f6368;
    --success-color: #34a853;
    --info-color: #4285f4;
    --warning-color: #fbbc05;
    --danger-color: #ea4335;
    --light-color: #f8f9fa;
    --dark-color: #202124;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f6fa;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
    padding: 0;
    transition: all 0.3s ease;
    overflow-x: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .logo span {
    display: none;
}

.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    padding: 2rem;
    background-color: #f8f9fa;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Títulos e Botões */
h1 {
    color: var(--dark-color);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0;
}

.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn i {
    font-size: 1rem;
}

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

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

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Tabelas */
.table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
    color: var(--dark-color);
    background-color: #f8f9fa;
    border-bottom-width: 1px;
    padding: 0.75rem;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    color: #495057;
    padding: 0.75rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Badges para Status */
.badge {
    font-size: 0.85rem;
    padding: 0.4em 0.8em;
    font-weight: 500;
}

.badge.em-transito {
    background-color: #17a2b8;
}

.badge.entregue {
    background-color: #28a745;
}

.badge.nao-entregue {
    background-color: #dc3545;
}

.badge.em-busca {
    background-color: #ffc107;
    color: #000;
}

.badge.devolvido-a-matriz {
    background-color: #6c757d;
}

.badge.extravio {
    background-color: #dc3545;
}

.badge.roubo {
    background-color: #dc3545;
}

/* Botões de Ação */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

.btn-sm i {
    font-size: 1rem;
}

/* Ocorrência Badge */
.occurrence-badge {
    min-width: 45px;
}

/* Formulários */
.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
}

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

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

#toggle-sidebar {
    width: 40px;
    height: 40px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background: var(--light-color);
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: background-color 0.2s;
}

#toggle-sidebar:hover {
    background-color: #e9ecef;
}

#toggle-sidebar i {
    font-size: 1.25rem;
    color: var(--dark-color);
}

.sidebar-header .logo i {
    margin-right: 0.75rem;
    font-size: 1.5rem;
}

.sidebar .nav {
    padding: 0.5rem 0;
}

.sidebar .nav-item {
    margin: 0.75rem 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 0 50px 50px 0;
    margin-right: 1rem;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.sidebar .nav-link i {
    width: 1.5rem;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .logo span {
    display: none;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .nav-link {
    color: var(--danger-color) !important;
    padding: 0.75rem 1.25rem;
}

.sidebar-footer .nav-link:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Card Styles */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
    border: none;
    border-radius: 0.5rem;
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
    padding: 1rem;
    border-bottom-width: 1px;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Status Colors */
.badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    border-radius: 4px;
    display: inline-block;
}

.badge.em-transito { 
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.entregue { 
    background-color: #198754 !important;
    color: #fff !important;
}

.badge.nao-entregue,
.badge.roubo,
.badge.extravio { 
    background-color: #dc3545 !important;
    color: #fff !important;
}

.badge.em-busca { 
    background-color: #0dcaf0 !important;
    color: #fff !important;
}

.badge.devolvido-a-matriz { 
    background-color: #6c757d !important;
    color: #fff !important;
}

/* Occurrence Colors */
.badge.ocorrencia-sim {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.badge.ocorrencia-nao {
    background-color: #6c757d !important;
    color: #fff !important;
}

/* Button Styles */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

.btn i {
    margin-right: 0.5rem;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

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

/* Modal Styles */
.modal-content {
    border-radius: 0.5rem;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar:not(.collapsed) {
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
        padding: 1rem;
    }
    
    .main-content.expanded {
        margin-left: var(--sidebar-width);
    }
    
    .table-responsive {
        margin-bottom: 0;
    }
}
