/* Reset e Estilos Gerais */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    padding-top: 56px;
}

/* Header */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 250px;
    z-index: 99;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-brand i {
    color: #0d6efd;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    width: 250px;
    background-color: #f8f9fa;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: .5rem 1rem;
    margin: 0.2rem 0;
    border-radius: 0.25rem;
}

.sidebar .nav-link:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 1rem;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, .075);
    margin-bottom: 1rem;
}

.card:hover {
    box-shadow: 0 0 15px rgba(0,0,0,.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
}

.card-body {
    padding: 20px;
}

/* Tabelas */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Botões */
.btn {
    font-weight: 500;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Formulários */
.form-control {
    border-radius: 5px;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

/* Alertas */
.alert {
    margin-bottom: 1rem;
    border: none;
    border-radius: 0.25rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Responsividade */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
        padding-top: 0;
        width: 100%;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .navbar {
        position: relative;
        left: 0;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .sidebar-sticky {
        height: auto;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Utilitários */
.text-primary { color: #0d6efd !important; }
.bg-primary { background-color: #0d6efd !important; }

/* Dropdowns */
.dropdown-menu {
    border: none;
    box-shadow: 0 0 10px rgba(0,0,0,.1);
    border-radius: 10px;
    padding: 10px 0;
}

.dropdown-item {
    padding: 8px 20px;
    color: #212529;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Notificações */
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    background-color: #dc3545;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
}

/* Perfil do Usuário */
.user-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Tooltips */
.tooltip {
    font-size: 0.875rem;
}

/* Paginação */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border: none;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 5px;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Campos de Busca */
.search-input {
    border-radius: 20px;
    padding-left: 15px;
    padding-right: 15px;
    background-color: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
}

.search-input::placeholder {
    color: rgba(255,255,255,.7);
}

/* Status Badges */
.badge-success {
    background-color: #198754;
    color: #fff;
}

.badge-danger {
    background-color: #dc3545;
    color: #fff;
}

.badge-warning {
    background-color: #ffc107;
    color: #000;
}

/* Botões de Ação */
.action-buttons .btn {
    padding: 4px 8px;
    font-size: 0.875rem;
}

.action-buttons .btn + .btn {
    margin-left: 5px;
}

/* Validação de Formulários */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linecap='round' d='M6 4V8'/%3e%3cpath stroke-linecap='round' d='M6 10.5V10'/%3e%3c/svg%3e");
}

/* Modals */
.modal-content {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Utilitários */
.text-truncate {
    max-width: 200px;
}

/* Estilos para imagens de usuário */
.user-image {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #fff !important;
    box-shadow: 0 0 4px rgba(0,0,0,0.2) !important;
}

.user-image-lg {
    width: 150px !important;
    height: 150px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #fff !important;
    box-shadow: 0 0 8px rgba(0,0,0,0.2) !important;
}

.user-image-container {
    position: relative !important;
    display: inline-block !important;
    margin: 10px !important;
}

.user-image-remove {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    width: 24px !important;
    height: 24px !important;
    background-color: #dc3545 !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 14px !important;
    border: 2px solid #fff !important;
    box-shadow: 0 0 4px rgba(0,0,0,0.2) !important;
    z-index: 1 !important;
}

.user-image-remove:hover {
    background-color: #c82333 !important;
}

/* Imagem padrão do sistema */
.system-logo {
    max-width: 200px;
    height: auto;
}

/* Container de imagem do usuário */
.user-image-container {
    position: relative;
    display: inline-block;
}

.user-image-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    border: none;
    padding: 0;
}

.user-image-remove:hover {
    background: #c82333;
} 