/* Estilos gerais */
:root {
    --primary-color: #3B82F6;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --dark-color: #1F2937;
    --light-color: #F3F4F6;
    --gray-color: #6B7280;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 56px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.sidebar .nav-link {
    color: var(--dark-color);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin: 0.2rem 0.5rem;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    font-weight: 600;
    border-bottom: none;
    padding: 1rem 1.25rem;
    background-color: white;
    border-radius: 10px 10px 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* Dashboard cards */
.stat-card {
    color: white;
    border-radius: 10px;
}

.stat-card.primary {
    background-color: var(--primary-color);
}

.stat-card.success {
    background-color: var(--success-color);
}

.stat-card.warning {
    background-color: var(--warning-color);
}

.stat-card.danger {
    background-color: var(--danger-color);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Tabelas */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: var(--light-color);
    border-top: none;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Badges */
.badge-success {
    background-color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

/* Botões */
.btn {
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s;
}

.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-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Formulários */
.form-control {
    border-radius: 5px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Animações */
.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
        padding-bottom: 1rem;
    }
    
    .sidebar .nav-link {
        padding: 0.5rem 1rem;
        margin: 0.1rem 0.25rem;
    }
    
    main {
        margin-left: 0 !important;
    }
}

/* Login page */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.login-form {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 3rem;
    color: var(--primary-color);
}

/* Alerts */
.alert {
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Notificações */
.notification-dropdown {
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notification-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f1f1;
    white-space: normal;
    display: flex;
    align-items: flex-start;
}

.notification-dropdown .dropdown-item i {
    margin-top: 3px;
}

.notification-dropdown .dropdown-item:active,
.notification-dropdown .dropdown-item:focus {
    background-color: rgba(59, 130, 246, 0.1);
    color: inherit;
}

.notification-dropdown .dropdown-header {
    background-color: var(--light-color);
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.badge.rounded-pill {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.65rem;
}

/* Dashboard Widgets */
.stat-card {
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    position: relative;
    overflow: hidden;
}

.stat-card.primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
}

.stat-card.success {
    background: linear-gradient(135deg, #1cc88a 0%, #13855c 100%);
    color: white;
}

.stat-card.info {
    background: linear-gradient(135deg, #36b9cc 0%, #258391 100%);
    color: white;
}

.stat-card.warning {
    background: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%);
    color: white;
}

.stat-card.danger {
    background: linear-gradient(135deg, #e74a3b 0%, #be2617 100%);
    color: white;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0.8;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.4;
}

/* QR Code e Etiquetas */
.qrcode-container {
    text-align: center;
    margin: 20px 0;
}

.qrcode-img {
    border: 1px solid #ddd;
    padding: 5px;
    background-color: white;
}

.ativo-label {
    width: 300px;
    border: 1px solid #000;
    padding: 10px;
    margin: 20px auto;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    page-break-inside: avoid;
}

.ativo-label-header {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.ativo-label-qrcode {
    text-align: center;
    margin: 10px 0;
}

.ativo-label-info {
    text-align: center;
}

.ativo-label-nome {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.ativo-label-tag, .ativo-label-serie {
    font-size: 12px;
    margin-bottom: 3px;
}

.ativo-label-id {
    font-size: 10px;
    color: #666;
    margin-top: 5px;
}

@media print {
    body * {
        visibility: hidden;
    }
    
    .print-section, .print-section * {
        visibility: visible;
    }
    
    .print-section {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .no-print {
        display: none !important;
    }
}