/**
 * Responsive CSS - RH NetSulwel
 * Torna todas as páginas responsivas para mobile
 */

/* ========================================
   1. LAYOUT GERAL
   ======================================== */

/* Container responsivo */
.container,
.max-w-7xl,
.max-w-6xl,
.max-w-5xl,
.max-w-4xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 768px) {

    .container,
    .max-w-7xl,
    .max-w-6xl,
    .max-w-5xl,
    .max-w-4xl {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* ========================================
   2. CARDS E CONTAINERS
   ======================================== */

@media (max-width: 767px) {

    /* Cards em mobile */
    .card,
    .bg-white.rounded-xl,
    .bg-white.rounded-lg {
        border-radius: 0.75rem !important;
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    /* Grids responsivos */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Flex em coluna */
    .flex:not(.flex-col):not(.items-center) {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .flex.items-center.justify-between {
        flex-direction: row !important;
    }
}

/* ========================================
   3. TABELAS RESPONSIVAS
   ======================================== */

@media (max-width: 767px) {

    /* Wrapper para scroll horizontal */
    .table-wrapper,
    .overflow-x-auto {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    /* Tabelas com scroll horizontal */
    table {
        min-width: 100%;
        font-size: 0.75rem !important;
        display: table;
    }

    table th {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.65rem !important;
        white-space: nowrap;
        background: #f9fafb !important;
    }

    table td {
        padding: 0.75rem !important;
        font-size: 0.75rem !important;
    }

    /* Ocultar colunas menos importantes em mobile */
    table th:nth-child(3),
    table td:nth-child(3),
    table th:nth-child(4),
    table td:nth-child(4),
    table th:nth-child(6),
    table td:nth-child(6) {
        display: none;
    }

    /* Ajustar coluna de nome */
    table td:first-child .flex {
        flex-direction: row !important;
        align-items: center !important;
    }

    table td:first-child .flex-shrink-0 {
        width: 2rem !important;
        height: 2rem !important;
    }

    table td:first-child .flex-shrink-0 div {
        width: 2rem !important;
        height: 2rem !important;
        font-size: 0.625rem !important;
    }

    table td:first-child .ml-4 {
        margin-left: 0.5rem !important;
    }

    table td:first-child .text-sm {
        font-size: 0.75rem !important;
    }

    /* Badges menores */
    table .px-3 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        font-size: 0.625rem !important;
    }

    /* Dropdown de ações em mobile - posicionamento fixo */
    [id^="actionMenu"] {
        position: fixed !important;
        min-width: 180px !important;
        max-width: calc(100vw - 20px) !important;
        z-index: 9999 !important;
    }

    /* Tabelas em cards (alternativa) */
    .table-card-mobile {
        display: block !important;
    }

    .table-card-mobile thead {
        display: none !important;
    }

    .table-card-mobile tbody {
        display: block !important;
    }

    .table-card-mobile tr {
        display: block !important;
        margin-bottom: 1rem !important;
        background: white !important;
        border-radius: 0.75rem !important;
        padding: 1rem !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }

    .table-card-mobile td {
        display: flex !important;
        justify-content: space-between !important;
        padding: 0.5rem 0 !important;
        border: none !important;
    }

    .table-card-mobile td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
    }
}

/* ========================================
   4. FORMULÁRIOS
   ======================================== */

@media (max-width: 767px) {

    /* Inputs e selects */
    .form-input,
    .form-select,
    .form-textarea,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
        /* Previne zoom no iOS */
        padding: 0.75rem !important;
    }

    /* Labels */
    label {
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Form groups */
    .form-group,
    .mb-4,
    .mb-6 {
        margin-bottom: 1rem !important;
    }

    /* Botões de formulário */
    .form-actions,
    .flex.gap-4 {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .form-actions button,
    .form-actions a {
        width: 100% !important;
    }
}

/* ========================================
   5. BOTÕES
   ======================================== */

@media (max-width: 767px) {

    .btn,
    button,
    a.btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        width: 100%;
        justify-content: center;
    }

    .btn-group {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .btn-group .btn {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Grupos de botões */
    .btn-group,
    .flex.space-x-2,
    .flex.space-x-3,
    .flex.space-x-4,
    .flex.gap-2,
    .flex.gap-3,
    .flex.gap-4 {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .btn-group>*,
    .flex.space-x-2>button,
    .flex.space-x-3>button,
    .flex.gap-2>button {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* ========================================
   6. MODAIS
   ======================================== */

@media (max-width: 767px) {

    .modal,
    [role="dialog"] {
        max-width: 100% !important;
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem !important;
    }

    .modal-footer {
        flex-direction: column-reverse !important;
        gap: 0.5rem !important;
    }

    .modal-footer button {
        width: 100% !important;
    }
}

/* ========================================
   7. TIPOGRAFIA
   ======================================== */

@media (max-width: 767px) {
    h1 {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
        line-height: 1.75rem !important;
    }

    h3 {
        font-size: 1.125rem !important;
        line-height: 1.5rem !important;
    }

    h4,
    h5,
    h6 {
        font-size: 1rem !important;
        line-height: 1.5rem !important;
    }

    p,
    span,
    div {
        font-size: 0.875rem !important;
    }
}

/* ========================================
   8. ESPAÇAMENTOS
   ======================================== */

@media (max-width: 767px) {

    /* Padding */
    .p-6 {
        padding: 1rem !important;
    }

    .p-8 {
        padding: 1.5rem !important;
    }

    .px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .py-6 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .px-8 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .py-8 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    /* Margin */
    .m-6 {
        margin: 1rem !important;
    }

    .m-8 {
        margin: 1.5rem !important;
    }

    .mx-6 {
        margin-left: 1rem !important;
        margin-right: 1rem !important;
    }

    .my-6 {
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .mx-8 {
        margin-left: 1.5rem !important;
        margin-right: 1.5rem !important;
    }

    .my-8 {
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* Gap */
    .gap-6 {
        gap: 1rem !important;
    }

    .gap-8 {
        gap: 1.5rem !important;
    }

    .space-x-6>*+* {
        margin-left: 1rem !important;
    }

    .space-y-6>*+* {
        margin-top: 1rem !important;
    }
}

/* ========================================
   9. STATS E CARDS DE DASHBOARD
   ======================================== */

@media (max-width: 767px) {

    .stats-grid,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-card {
        padding: 1rem !important;
    }

    .stat-card h3 {
        font-size: 0.875rem !important;
    }

    .stat-card .stat-value {
        font-size: 1.5rem !important;
    }
}

/* ========================================
   10. NAVEGAÇÃO E BREADCRUMBS
   ======================================== */

@media (max-width: 767px) {
    .breadcrumb {
        font-size: 0.75rem !important;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .breadcrumb::-webkit-scrollbar {
        display: none;
    }
}

/* ========================================
   11. IMAGENS E AVATARES
   ======================================== */

@media (max-width: 767px) {
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    .avatar-lg {
        width: 3rem !important;
        height: 3rem !important;
    }

    .avatar-xl {
        width: 4rem !important;
        height: 4rem !important;
    }
}

/* ========================================
   12. DROPDOWNS E MENUS
   ======================================== */

@media (max-width: 767px) {
    .dropdown-menu {
        position: fixed !important;
        left: 1rem !important;
        right: 1rem !important;
        width: auto !important;
        max-width: none !important;
    }
}

/* ========================================
   13. CHARTS E GRÁFICOS
   ======================================== */

@media (max-width: 767px) {
    canvas {
        max-height: 250px !important;
    }

    .chart-container {
        height: 250px !important;
        overflow: hidden;
    }
}

/* ========================================
   14. BADGES E TAGS
   ======================================== */

@media (max-width: 767px) {

    .badge,
    .tag {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* ========================================
   15. LISTAS
   ======================================== */

@media (max-width: 767px) {

    ul,
    ol {
        padding-left: 1.25rem !important;
    }

    li {
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* ========================================
   16. SCROLLBAR CUSTOMIZADA (MOBILE)
   ======================================== */

@media (max-width: 767px) {

    /* Esconder scrollbar mas manter funcionalidade */
    .overflow-x-auto::-webkit-scrollbar,
    .overflow-y-auto::-webkit-scrollbar {
        height: 4px;
        width: 4px;
    }

    .overflow-x-auto::-webkit-scrollbar-thumb,
    .overflow-y-auto::-webkit-scrollbar-thumb {
        background: rgba(168, 85, 247, 0.3);
        border-radius: 2px;
    }
}

/* ========================================
   17. UTILITÁRIOS MOBILE
   ======================================== */

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    .text-mobile-center {
        text-align: center !important;
    }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }

    .show-desktop {
        display: block !important;
    }
}

/* ========================================
   18. TOUCH FRIENDLY
   ======================================== */

@media (max-width: 767px) {

    /* Aumentar área de toque */
    a,
    button,
    input,
    select,
    textarea {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remover hover em touch devices */
    @media (hover: none) {
        *:hover {
            background-color: inherit !important;
        }
    }
}

/* ========================================
   19. SAFE AREA (iOS)
   ======================================== */

@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 767px) {
        body {
            padding-bottom: env(safe-area-inset-bottom);
        }

        #mainNav {
            padding-bottom: calc(0.5rem + env(safe-area-inset-bottom)) !important;
        }
    }
}

/* ========================================
   20. ORIENTAÇÃO LANDSCAPE
   ======================================== */

@media (max-width: 767px) and (orientation: landscape) {
    #mainNav {
        height: 3.5rem !important;
    }

    .nav-item-icon {
        padding: 0.25rem !important;
    }

    .nav-item-icon .nav-label {
        font-size: 0.5rem !important;
    }
}

/* ===
=====================================
   21. PÁGINA DE FUNCIONÁRIOS - RESPONSIVA
   ======================================== */

@media (max-width: 767px) {

    /* Header da página */
    .mb-8 .flex.items-center.justify-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .mb-8 .flex.items-center.justify-between>div:first-child {
        width: 100%;
    }

    .mb-8 .flex.items-center.justify-between h1 {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }

    .mb-8 .flex.items-center.justify-between p {
        font-size: 0.875rem !important;
    }

    .mb-8 .flex.items-center.justify-between a {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Cards de estatísticas */
    .grid.grid-cols-1.md\:grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .bg-gradient-to-br {
        padding: 1rem !important;
    }

    .bg-gradient-to-br p:first-child {
        font-size: 0.75rem !important;
    }

    .bg-gradient-to-br .text-3xl {
        font-size: 1.75rem !important;
    }

    .bg-gradient-to-br .text-2xl {
        font-size: 1.25rem !important;
    }

    .bg-gradient-to-br .bg-white.bg-opacity-20 {
        padding: 0.5rem !important;
    }

    .bg-gradient-to-br .bg-white.bg-opacity-20 i {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }

    /* Filtros de busca */
    .grid.grid-cols-1.md\:grid-cols-4.gap-4 {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .grid.grid-cols-1.md\:grid-cols-4.gap-4>div {
        width: 100% !important;
    }

    .grid.grid-cols-1.md\:grid-cols-4.gap-4 label {
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
    }

    .grid.grid-cols-1.md\:grid-cols-4.gap-4 input,
    .grid.grid-cols-1.md\:grid-cols-4.gap-4 select {
        font-size: 16px !important;
        /* Previne zoom no iOS */
        padding: 0.75rem !important;
    }

    /* Mensagens de sucesso/erro */
    .mb-6.p-4.rounded-lg {
        padding: 0.75rem !important;
        font-size: 0.875rem !important;
    }

    .mb-6.p-4.rounded-lg i {
        width: 1rem !important;
        height: 1rem !important;
    }

    /* Container da tabela */
    .bg-white.rounded-xl.shadow.border {
        border-radius: 0.75rem !important;
        margin: 0 !important;
    }

    .bg-white.rounded-xl.shadow.border .px-6.py-4 {
        padding: 1rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .bg-white.rounded-xl.shadow.border h3 {
        font-size: 1rem !important;
    }

    .bg-white.rounded-xl.shadow.border #resultCount {
        font-size: 0.75rem !important;
    }

    /* Tabela específica de funcionários */
    #funcionariosTable {
        font-size: 0.75rem !important;
    }

    #funcionariosTable thead th {
        padding: 0.5rem 0.5rem !important;
        font-size: 0.625rem !important;
    }

    #funcionariosTable tbody td {
        padding: 0.5rem !important;
    }

    /* Coluna de nome - ajustes específicos */
    #funcionariosTable tbody td:first-child {
        min-width: 150px !important;
    }

    #funcionariosTable tbody td:first-child .flex-shrink-0 {
        width: 2rem !important;
        height: 2rem !important;
    }

    #funcionariosTable tbody td:first-child .h-10.w-10 {
        width: 2rem !important;
        height: 2rem !important;
        font-size: 0.625rem !important;
    }

    #funcionariosTable tbody td:first-child .ml-4 {
        margin-left: 0.5rem !important;
    }

    #funcionariosTable tbody td:first-child .text-sm {
        font-size: 0.75rem !important;
        line-height: 1rem !important;
    }

    /* BI */
    #funcionariosTable tbody td:nth-child(2) {
        font-size: 0.625rem !important;
        min-width: 100px !important;
    }

    /* Salário */
    #funcionariosTable tbody td:nth-child(5) {
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        min-width: 90px !important;
    }

    /* Badges */
    #funcionariosTable .px-3.py-1 {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.625rem !important;
    }

    #funcionariosTable .px-3.py-1 i {
        width: 0.75rem !important;
        height: 0.75rem !important;
    }

    /* Botão de ações */
    #funcionariosTable tbody td:last-child button {
        width: 2rem !important;
        height: 2rem !important;
    }

    #funcionariosTable tbody td:last-child button i {
        width: 1rem !important;
        height: 1rem !important;
    }

    /* Empty state */
    #funcionariosTable #emptyRow td,
    #funcionariosTable #noResultsRow td {
        padding: 2rem 1rem !important;
    }

    #funcionariosTable #emptyRow i,
    #funcionariosTable #noResultsRow i {
        width: 3rem !important;
        height: 3rem !important;
    }

    #funcionariosTable #emptyRow p,
    #funcionariosTable #noResultsRow p {
        font-size: 0.875rem !important;
    }

    /* Modal de alteração de role */
    #roleModal>div {
        width: calc(100% - 2rem) !important;
        max-width: 100% !important;
        margin: 1rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    #roleModal h3 {
        font-size: 1rem !important;
    }

    #roleModal p {
        font-size: 0.875rem !important;
    }

    #roleModal label {
        font-size: 0.875rem !important;
    }

    #roleModal select {
        font-size: 16px !important;
        /* Previne zoom no iOS */
        padding: 0.75rem !important;
    }

    #roleModal .flex.items-center.justify-end {
        flex-direction: column-reverse !important;
        gap: 0.5rem !important;
    }

    #roleModal button {
        width: 100% !important;
    }

    /* Dropdown de ações - mobile */
    [id^="actionMenu"] {
        min-width: 160px !important;
        max-width: 200px !important;
    }

    [id^="actionMenu"] a,
    [id^="actionMenu"] button {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.8125rem !important;
    }

    [id^="actionMenu"] i {
        width: 0.875rem !important;
        height: 0.875rem !important;
        margin-right: 0.5rem !important;
    }

    /* Garantir que o dropdown não saia da tela */
    #funcionariosTable tbody td:last-child {
        position: relative !important;
    }
}

/* Ajustes para telas muito pequenas */
@media (max-width: 374px) {
    #funcionariosTable {
        font-size: 0.625rem !important;
    }

    #funcionariosTable thead th {
        padding: 0.375rem 0.25rem !important;
        font-size: 0.5rem !important;
    }

    #funcionariosTable tbody td {
        padding: 0.375rem 0.25rem !important;
    }

    #funcionariosTable tbody td:first-child {
        min-width: 120px !important;
    }

    #funcionariosTable .px-3.py-1 {
        padding: 0.125rem 0.375rem !important;
        font-size: 0.5rem !important;
    }
}

/* Landscape mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .mb-8 {
        margin-bottom: 1rem !important;
    }

    .grid.grid-cols-1.md\:grid-cols-4.gap-6 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .bg-gradient-to-br {
        padding: 0.75rem !important;
    }

    .bg-gradient-to-br .text-3xl {
        font-size: 1.5rem !important;
    }
}


/* ========================================
   22. HEADER E NAVEGAÇÃO COMPACTOS
   ======================================== */

/* Desktop - Header e Nav elegantes */
@media (min-width: 768px) {
    header {
        height: 58px !important;
        border-bottom: none !important;
    }
    
    #mainNav {
        height: 48px !important;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
    }
    
    /* Ajustar padding do conteúdo */
    main {
        padding-top: 7rem !important;
    }
}

/* Mobile - Header e Nav modernos */
@media (max-width: 767px) {
    header {
        height: 52px !important;
        border-bottom: none !important;
    }
    
    #mainNav {
        height: 68px !important;
        bottom: 0 !important;
        border-top: 1px solid #f3f4f6 !important;
        box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.1), 0 -1px 2px 0 rgba(0, 0, 0, 0.06) !important;
    }
    
    /* Ajustar padding do conteúdo */
    main {
        padding-top: 3.5rem !important;
        padding-bottom: 5.5rem !important;
    }
}

/* Safe area para dispositivos com notch */
@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 767px) {
        #mainNav {
            padding-bottom: calc(0.625rem + env(safe-area-inset-bottom)) !important;
        }
        
        main {
            padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important;
        }
    }
}


/* ========================================
   23. HEADER MOBILE MINIMALISTA
   ======================================== */

@media (max-width: 767px) {
    /* Header super compacto - apenas logo e hambúrguer */
    header {
        height: 48px !important;
        padding: 0 1rem !important;
        display: flex !important;
        align-items: center !important;
    }
    
    header > div {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Logo com texto */
    header h1 {
        display: block !important;
        font-size: 1rem !important;
        line-height: 1.25rem !important;
        font-weight: 700 !important;
    }
    
    /* Ocultar subtítulo e outros textos */
    header p,
    header .text-right,
    header .hidden.lg\:block {
        display: none !important;
    }
    
    header .flex.items-center {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
    }
    
    header .w-9,
    header .w-10 {
        width: 2rem !important;
        height: 2rem !important;
        border-radius: 0.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    header .w-9 i,
    header .w-10 i {
        width: 1rem !important;
        height: 1rem !important;
    }
    
    /* Menu hambúrguer */
    #mobileMenuToggle {
        display: flex !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 0.5rem !important;
        flex-shrink: 0 !important;
    }
    
    #mobileMenuToggle i {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    
    /* Ajustar navegação */
    #mainNav {
        top: 48px !important;
    }
    
    /* Ajustar conteúdo */
    main {
        padding-top: 6.5rem !important;
    }
    
    /* Menu lateral mobile */
    #mobileMenu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
        z-index: 9999;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }
    
    #mobileMenu.open {
        right: 0;
    }
    
    #mobileMenuOverlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    #mobileMenuOverlay.open {
        opacity: 1;
        visibility: visible;
    }
}


/* ========================================
   24. PÁGINA DE NOTIFICAÇÕES - MOBILE RESPONSIVO
   ======================================== */

/* Estilos gerais para notificações */
.filter-btn {
    background: white;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
}

.filter-btn.active {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.notification-item.unread {
    background: linear-gradient(to right, #faf5ff 0%, white 100%);
    border-left: 3px solid #a855f7;
}

.notification-item {
    transition: all 0.2s ease;
}

.notification-item:active {
    transform: scale(0.98);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Scrollbar hide para filtros */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

@media (max-width: 767px) {
    /* Container principal */
    .max-w-4xl {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Header de notificações */
    .max-w-4xl > div:first-child {
        margin-bottom: 1rem !important;
    }
    
    /* Stats cards mobile */
    .max-w-4xl .grid.grid-cols-3 {
        gap: 0.5rem !important;
    }
    
    .max-w-4xl .grid.grid-cols-3 > div {
        padding: 0.75rem !important;
        border-radius: 0.75rem !important;
    }
    
    .max-w-4xl .grid.grid-cols-3 p:first-of-type {
        font-size: 0.625rem !important;
        line-height: 1rem !important;
        letter-spacing: 0.025em !important;
    }
    
    .max-w-4xl .grid.grid-cols-3 .text-2xl {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }
    
    /* Filtros mobile */
    .filter-btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
        border-radius: 0.5rem !important;
    }
    
    .filter-btn i {
        width: 0.875rem !important;
        height: 0.875rem !important;
    }
    
    /* Notificações mobile */
    .notification-item {
        padding: 0.875rem !important;
        border-radius: 0.875rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .notification-item .flex-shrink-0 > div {
        width: 2.75rem !important;
        height: 2.75rem !important;
        border-radius: 0.75rem !important;
    }
    
    .notification-item .flex-shrink-0 i {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
    
    .notification-item h3 {
        font-size: 0.875rem !important;
        line-height: 1.25rem !important;
        font-weight: 700 !important;
    }
    
    .notification-item p {
        font-size: 0.8125rem !important;
        line-height: 1.375rem !important;
    }
    
    .notification-item .text-xs {
        font-size: 0.6875rem !important;
    }
    
    /* Botões de ação mobile */
    .notification-item button,
    .notification-item a {
        padding: 0.5rem !important;
        border-radius: 0.5rem !important;
        min-width: 2rem !important;
        min-height: 2rem !important;
    }
    
    .notification-item button i,
    .notification-item a i {
        width: 0.875rem !important;
        height: 0.875rem !important;
    }
    
    /* Badge de tempo */
    .notification-item .bg-gray-50 {
        padding: 0.25rem 0.5rem !important;
        border-radius: 0.375rem !important;
    }
    
    /* Empty state mobile */
    #notificationsList > div:only-child {
        padding: 3rem 1rem !important;
        border-radius: 1rem !important;
    }
    
    #notificationsList > div:only-child .w-16 {
        width: 3.5rem !important;
        height: 3.5rem !important;
    }
    
    #notificationsList > div:only-child i {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    /* Animação de pulse para não lidas */
    @keyframes pulse {
        0%, 100% {
            opacity: 1;
        }
        50% {
            opacity: 0.5;
        }
    }
    
    .animate-pulse {
        animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }
    
    /* Touch feedback */
    .notification-item:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .filter-btn:active {
        transform: scale(0.95);
    }
    
    /* Scroll suave para filtros */
    .overflow-x-auto {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ajuste para botão "Marcar todas como lidas" */
    button[onclick="markAllAsRead()"] {
        padding: 0.625rem 1rem !important;
        font-size: 0.8125rem !important;
        border-radius: 0.75rem !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Gradientes mais vibrantes em mobile */
    .bg-gradient-to-br {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
}

/* Telas muito pequenas */
@media (max-width: 374px) {
    .max-w-4xl .grid.grid-cols-3 p:first-of-type {
        font-size: 0.5625rem !important;
    }
    
    .max-w-4xl .grid.grid-cols-3 .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .notification-item h3 {
        font-size: 0.8125rem !important;
    }
    
    .notification-item p {
        font-size: 0.75rem !important;
    }
}

/* Landscape mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .max-w-4xl .grid.grid-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .notification-item {
        padding: 0.75rem !important;
    }
}

/* Dark mode support (opcional) */
@media (prefers-color-scheme: dark) {
    .notification-item {
        background: #1f2937;
        border-color: #374151;
    }
    
    .notification-item.unread {
        background: linear-gradient(to right, #312e81 0%, #1f2937 100%);
    }
    
    .filter-btn {
        background: #1f2937;
        color: #9ca3af;
        border-color: #374151;
    }
    
    .filter-btn:hover {
        background: #374151;
        color: #d1d5db;
    }
}
