/* Custom CSS para Rede Confiança */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* Cores personalizadas que complementam o Tailwind */
:root {
    --primary-color: #FF6B35;
    --secondary-color: #2C3E50;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    --font-family: 'Montserrat', sans-serif;
}

/* Aplicar Montserrat globalmente */
* {
    font-family: var(--font-family);
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.6;
}

/* Heading styles com Montserrat */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.75rem; font-weight: 600; }
h4 { font-size: 1.5rem; font-weight: 500; }
h5 { font-size: 1.25rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

/* Typography utilities */
.font-light { font-weight: 300; }
.font-regular { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

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

/* Animações customizadas */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Hover effects para cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Status badges customizados */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-open {
    background-color: var(--primary-color);
    color: white;
}

.status-progress {
    background-color: #3B82F6;
    color: white;
}

.status-resolved {
    background-color: var(--success-color);
    color: white;
}

.status-closed {
    background-color: #6B7280;
    color: white;
}

/* Sidebar ativa */
.sidebar-active {
    background-color: var(--primary-color);
    color: white;
}

/* Form customizations */
.form-input {
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Button customizations */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #e55a2b;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #1e2a3a;
    transform: translateY(-1px);
}

/* Table customizations */
.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    /* Mobile sidebar adjustments */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px !important;
        max-width: 90vw;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    /* Header adjustments for mobile */
    .mobile-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Garantir visibilidade do botão hambúrguer */
    #headerMobileMenuToggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 44px !important;
        min-height: 44px !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Melhorar área de toque */
    #headerMobileMenuToggle i {
        pointer-events: none;
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    /* Smaller sidebar on very small screens */
    .sidebar {
        width: 260px !important;
    }
    
    /* Adjust font sizes */
    .sidebar .text-sm {
        font-size: 0.8rem;
    }
    
    .sidebar .text-xs {
        font-size: 0.7rem;
    }
}

/* Mobile overlay */
@media (max-width: 1023px) {
    #mobileOverlay {
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
}

/* Enhanced mobile responsiveness */
@media (max-width: 640px) {
    /* Hide desktop navigation in mobile */
    .desktop-nav {
        display: none;
    }
    
    /* Compact header */
    .mobile-compact {
        padding: 0.5rem 1rem;
    }
    
    /* Smaller text in sidebar */
    .sidebar {
        font-size: 0.9rem;
    }
    
    /* Garantir que o botão do menu hambúrguer seja sempre visível */
    #headerMobileMenuToggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1000 !important;
    }
}

/* Desktop optimizations */
@media (min-width: 1024px) {
    /* Ensure proper sidebar behavior on desktop */
    #sidebar {
        transform: translateX(0) !important;
    }
    
    /* Main content margin */
    #mainContent {
        margin-left: 16rem; /* 256px / 16 = 16rem */
    }
}

/* Smooth transitions */
.sidebar-transition {
    transition: all 0.3s ease-in-out;
}

/* Better scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1f2937;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Accessibility improvements */
.focus\:outline-primary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}
