.badge {
    --ins-badge-padding-x: 0.4em;
    --ins-badge-padding-y: 0.25em;
    --ins-badge-font-size: 0.85em;
}

.card-title {
    font-size: 1em;
    font-weight: 700;
    align-content: center !important;
    vertical-align: middle !important;
}

.card-header {
    padding: var(--ins-card-cap-padding-y) var(--ins-card-cap-padding-x);
}

/* =============================================
   TOPBAR BRAND - Customização
   ============================================= */

.logo-topbar {
    border-bottom: 1px solid #e5e7eb;
}

.logo-topbar .avatar-title {
    background: transparent !important;
    color: #ffffff !important;
}

.logo-topbar .logo-text {
    color: #1f2937 !important;
    letter-spacing: -0.3px;
}

/* =============================================
   SIDEBAR USER HEADER
   ============================================= */

.sidebar-user-header {
    padding: 1.25rem 0rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.625rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.user-profile-card:hover {
    background: #f9fafb;
}

/* Avatar */
.user-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #f3f4f6;
}

.user-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    border: 2px solid #f3f4f6;
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 11px;
    height: 11px;
    background: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

/* User Info */
.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.375rem 0;
    color: #1f2937;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-role,
.user-branch {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
}

.user-role i,
.user-branch i {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* =============================================
   VERSÃO COMPACTA
   ============================================= */

.sidebar-user-header.compact {
    padding: 1rem;
}

.sidebar-user-header.compact .user-avatar,
.sidebar-user-header.compact .user-avatar-placeholder {
    width: 42px;
    height: 42px;
}

.sidebar-user-header.compact .user-name {
    font-size: 0.875rem;
}

.sidebar-user-header.compact .user-role,
.sidebar-user-header.compact .user-branch {
    font-size: 0.6875rem;
}

/* =============================================
   VERSÃO MINIMALISTA (Apenas Avatar e Nome)
   ============================================= */

.sidebar-user-header.minimal .user-profile-card {
    padding: 0.5rem;
}

.sidebar-user-header.minimal .user-meta {
    display: none;
}

.sidebar-user-header.minimal .user-avatar,
.sidebar-user-header.minimal .user-avatar-placeholder {
    width: 40px;
    height: 40px;
}

.sidebar-user-header.minimal .user-name {
    font-size: 0.875rem;
    margin: 0;
}

/* =============================================
   RESPONSIVO
   ============================================= */

@media (max-width: 768px) {
    .sidebar-user-header {
        padding: 1rem;
    }
    
    .user-avatar,
    .user-avatar-placeholder {
        width: 42px;
        height: 42px;
    }
    
    .user-name {
        font-size: 0.875rem;
    }
    
    .user-role,
    .user-branch {
        font-size: 0.6875rem;
    }
}

/* =============================================
   LINK PARA PERFIL (Opcional)
   ============================================= */

.sidebar-user-header a {
    text-decoration: none;
    color: inherit;
}

.sidebar-user-header a:hover .user-name {
    color: #6bbc47;
}

.small, small {
    font-size: 1em !important;
}

/* static/css/loan_invoice_upload.css */

/* ============================================================================
   UPLOAD AREA
   ============================================================================ */

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.upload-area:hover {
    border-color: #6bbc47;
    background: #f0fdf4;
}

.upload-area.dragover {
    border-color: #6bbc47;
    background: #e6f7e6;
    transform: scale(1.02);
}

.upload-placeholder {
    padding: 1.5rem;
}

.upload-placeholder i {
    color: #9ca3af;
}

.upload-placeholder p {
    color: #374151;
    margin: 0;
}

/* ============================================================================
   UPLOAD PREVIEW
   ============================================================================ */

.upload-preview {
    padding: 1.5rem;
}

.file-icon {
    width: 56px;
    height: 56px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon.pdf {
    background: #fef2f2;
    color: #dc2626;
}

.file-icon.image {
    background: #eff6ff;
    color: #2563eb;
}

.file-icon.doc {
    background: #eff6ff;
    color: #1d4ed8;
}

#fileName {
    font-size: 0.9375rem;
    color: #111827;
}

#fileSize {
    font-size: 0.8125rem;
    color: #6b7280;
}

#imagePreviewContainer {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

#imagePreview {
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

/* ============================================================================
   INVOICE SUMMARY
   ============================================================================ */

#invoiceSummary {
    background: #f0fdf4;
    padding: 1rem;
    border-radius: 8px;
}

#invoiceIconSummary i {
    color: #6bbc47;
}

#noInvoiceMessage {
    background: #fef3c7;
    padding: 0.75rem;
    border-radius: 6px;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-preview {
    animation: slideIn 0.3s ease-out;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .upload-area {
        padding: 1.5rem 1rem;
    }
    
    .upload-placeholder {
        padding: 1rem;
    }
    
    .upload-placeholder i {
        width: 36px !important;
        height: 36px !important;
    }
    
    .file-icon {
        width: 48px;
        height: 48px;
    }
}

.notification-dropdown-item.unread .notification-item {
    background-color: #f0fdf4;
}

.notification-dropdown-item .notification-item:hover {
    background-color: #f9fafb;
}

.btn-mark-read-dropdown {
    opacity: 0;
    transition: opacity 0.2s;
}

.notification-dropdown-item:hover .btn-mark-read-dropdown {
    opacity: 1;
}

.btn-mark-read-dropdown:hover {
    color: #dc3545 !important;
}

#notification-badge {
    transition: all 0.3s ease;
}

#notification-badge.pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Indicador de notificação não lida */
.notification-dropdown-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background-color: #6bbc47;
    border-radius: 0 2px 2px 0;
}

.notification-dropdown-item {
    position: relative;
}

.notification-item {
    border-bottom: 1px solid #e9ecef !important;
    padding: 0.75rem 1rem !important;
}

.notification-item:last-child {
    border-bottom: none;
}