/* ========================================
   CORREÇÕES ESPECÍFICAS PARA TELAS PEQUENAS
   Notebooks 13-14" e similares
======================================== */

/* Telas de Notebooks Pequenos (1366x768, 1440x900) */
@media (max-width: 1440px) and (max-height: 900px) {
    /* Reduzir padding geral */
    .container {
        padding: 10px !important;
    }
    
    /* Header mais compacto */
    .header {
        padding: 15px 20px !important;
        margin-bottom: 15px !important;
    }
    
    .header h1 {
        font-size: 1.8rem !important;
        margin-bottom: 5px !important;
    }
    
    .header p {
        font-size: 0.9rem !important;
    }
    
    /* User header compacto */
    .user-header {
        padding: 10px 15px !important;
        margin-bottom: 15px !important;
    }
    
    .welcome {
        font-size: 0.9rem !important;
    }
    
    /* Stats grid mais compacto */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
        gap: 10px !important;
        margin-bottom: 15px !important;
    }
    
    .stat-card {
        padding: 12px !important;
    }
    
    .stat-title {
        font-size: 0.7rem !important;
    }
    
    .stat-count {
        font-size: 1.6rem !important;
    }
    
    .stat-value {
        font-size: 1.8rem !important;
        display: flex !important;
        align-items: baseline !important;
        justify-content: flex-start !important;
        letter-spacing: -0.3px !important;
    }
    
    .stat-value .currency-symbol {
        margin-right: 0.15em !important;
    }
    
    /* Upload section compacta */
    .upload-section-compact {
        padding: 12px !important;
        margin: 10px 0 !important;
    }
    
    .upload-header h3 {
        font-size: 1rem !important;
    }
    
    .upload-compact {
        padding: 10px !important;
    }
    
    .upload-icon-small {
        font-size: 1.8rem !important;
    }
    
    .upload-text {
        font-size: 0.85rem !important;
    }
    
    .upload-subtext {
        font-size: 0.75rem !important;
    }
    
    /* Filtros compactos */
    .filters-section {
        padding: 12px !important;
        margin-bottom: 15px !important;
    }
    
    .filters-grid {
        gap: 8px !important;
    }
    
    .filter-group input,
    .filter-group select {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
    }
    
    /* Tabela otimizada para notebooks */
    .table-section {
        margin-bottom: 15px !important;
    }
    
    .table-header {
        padding: 10px 15px !important;
    }
    
    .table-title {
        font-size: 1.1rem !important;
    }
    
    table {
        font-size: 0.8rem !important;
    }
    
    th, td {
        padding: 6px 4px !important;
    }
    
    /* Colunas otimizadas para notebooks */
    th:nth-child(1), td:nth-child(1) { width: 50px !important; min-width: 50px !important; }
    th:nth-child(2), td:nth-child(2) { width: 130px !important; min-width: 130px !important; }
    th:nth-child(3), td:nth-child(3) { width: 160px !important; min-width: 160px !important; }
    th:nth-child(4), td:nth-child(4) { width: 85px !important; min-width: 85px !important; }
    th:nth-child(5), td:nth-child(5) { width: 85px !important; min-width: 85px !important; }
    th:nth-child(6), td:nth-child(6) { width: 90px !important; min-width: 90px !important; }
    th:nth-child(7), td:nth-child(7) { width: 80px !important; min-width: 80px !important; }
    th:nth-child(8), td:nth-child(8) { width: 90px !important; min-width: 90px !important; }
    
    /* Botões de ação compactos */
    .btn-sm {
        padding: 4px 6px !important;
        font-size: 0.7rem !important;
    }
    
    .action-buttons {
        gap: 2px !important;
    }
    
    /* Status badges compactos */
    .status-badge {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
    }
    
    .banco-badge {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
        max-width: 120px !important;
    }
}

/* Telas ainda menores (netbooks, tablets landscape) */
@media (max-width: 1366px) and (max-height: 768px) {
    html {
        font-size: 13px !important;
    }
    
    .container {
        padding: 8px !important;
    }
    
    .header {
        padding: 12px 15px !important;
        margin-bottom: 12px !important;
    }
    
    .header h1 {
        font-size: 1.6rem !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    
    .stat-card {
        padding: 10px !important;
    }
    
    .stat-count {
        font-size: 1.4rem !important;
    }
    
    .stat-value {
        font-size: 1.6rem !important;
        display: flex !important;
        align-items: baseline !important;
        justify-content: flex-start !important;
        letter-spacing: -0.2px !important;
    }
    
    .stat-value .currency-symbol {
        margin-right: 0.12em !important;
    }
    
    table {
        font-size: 0.75rem !important;
    }
    
    th, td {
        padding: 4px 3px !important;
    }
    
    /* Colunas extra compactas */
    th:nth-child(1), td:nth-child(1) { width: 45px !important; }
    th:nth-child(2), td:nth-child(2) { width: 110px !important; }
    th:nth-child(3), td:nth-child(3) { width: 140px !important; }
    th:nth-child(4), td:nth-child(4) { width: 75px !important; }
    th:nth-child(5), td:nth-child(5) { width: 75px !important; }
    th:nth-child(6), td:nth-child(6) { width: 80px !important; }
    th:nth-child(7), td:nth-child(7) { width: 70px !important; }
    th:nth-child(8), td:nth-child(8) { width: 80px !important; }
}

/* Correções específicas para login em telas pequenas */
@media (max-width: 1440px) and (max-height: 900px) {
    .login-container {
        max-width: 350px !important;
        padding: 30px 25px !important;
    }
    
    .login-header h1 {
        font-size: 1.6rem !important;
    }
    
    .form-group {
        margin-bottom: 20px !important;
    }
    
    .input-group input {
        padding: 12px 45px 12px 12px !important;
        font-size: 0.9rem !important;
    }
    
    .login-btn {
        padding: 12px !important;
        font-size: 1rem !important;
    }
    
    .default-credentials {
        padding: 15px !important;
        margin-top: 20px !important;
    }
    
    .default-credentials h4 {
        font-size: 0.8rem !important;
    }
    
    .default-credentials p {
        font-size: 0.8rem !important;
    }
}

/* Admin dashboard responsivo para notebooks */
@media (max-width: 1440px) and (max-height: 900px) {
    .admin-dashboard {
        padding: 10px !important;
    }
    
    .dashboard-header {
        padding: 15px 20px !important;
        margin-bottom: 20px !important;
    }
    
    .dashboard-header h1 {
        font-size: 1.8rem !important;
    }
    
    .stats-globais {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }
    
    .stat-global {
        padding: 15px !important;
    }
    
    .stat-global-number {
        font-size: 1.8rem !important;
    }
    
    .stat-global-icon {
        font-size: 2rem !important;
    }
    
    .usuarios-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
        gap: 15px !important;
    }
    
    .usuario-card {
        min-width: 300px !important;
    }
    
    .usuario-header {
        padding: 15px !important;
    }
    
    .usuario-nome {
        font-size: 1.2rem !important;
    }
    
    .usuario-body {
        padding: 15px !important;
    }
    
    .stats-usuario {
        gap: 10px !important;
    }
    
    .stat-numero {
        font-size: 1.4rem !important;
    }
}

/* Admin table responsivo */
@media (max-width: 1440px) and (max-height: 900px) {
    .admin-container-full {
        padding: 10px !important;
    }
    
    .admin-card {
        margin-bottom: 15px !important;
    }
    
    .card-header {
        padding: 12px 15px !important;
    }
    
    .card-header h3 {
        font-size: 1.1rem !important;
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    .admin-table {
        font-size: 0.8rem !important;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 6px 4px !important;
    }
    
    /* Colunas admin table compactas */
    .admin-page .admin-table th:nth-child(1) { width: 50px !important; }
    .admin-page .admin-table th:nth-child(2) { width: 120px !important; }
    .admin-page .admin-table th:nth-child(3) { width: 200px !important; }
    .admin-page .admin-table th:nth-child(4) { width: 80px !important; }
    .admin-page .admin-table th:nth-child(5) { width: 90px !important; }
    .admin-page .admin-table th:nth-child(6) { width: 120px !important; }
    .admin-page .admin-table th:nth-child(7) { width: 130px !important; }
}

/* Detalhes usuário responsivo */
@media (max-width: 1440px) and (max-height: 900px) {
    .detalhes-container {
        padding: 10px !important;
    }
    
    .usuario-header-detalhes {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .usuario-nome-detalhes {
        font-size: 2rem !important;
    }
    
    .tabs-container {
        margin-bottom: 20px !important;
    }
    
    .tab-content {
        padding: 20px !important;
    }
    
    .stats-detalhadas {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
    
    .stat-detalhada {
        padding: 15px !important;
    }
    
    .stat-detalhada-numero {
        font-size: 1.6rem !important;
    }
    
    .boletos-table {
        font-size: 0.8rem !important;
    }
    
    .boletos-table th,
    .boletos-table td {
        padding: 6px 4px !important;
    }
}

/* Correções para modal em telas pequenas */
@media (max-width: 1440px) and (max-height: 900px) {
    .modal-content {
        width: 90% !important;
        max-width: 500px !important;
        max-height: 80vh !important;
        margin: 10% auto !important;
        padding: 20px !important;
    }
    
    .modal-header {
        padding: 15px !important;
    }
    
    .modal-title {
        font-size: 1.3rem !important;
    }
    
    .modern-modal {
        width: 90% !important;
        max-width: 450px !important;
    }
    
    .modern-body {
        padding: 15px !important;
    }
    
    .modern-input,
    .modern-select {
        padding: 10px !important;
        font-size: 0.9rem !important;
    }
}

/* Correções para action toolbar */
@media (max-width: 1440px) and (max-height: 900px) {
    .action-toolbar {
        padding: 10px !important;
        gap: 8px !important;
    }
    
    .action-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }
    
    .action-btn i {
        font-size: 0.9rem !important;
    }
}

/* Scroll suave para tabelas em notebooks */
.table-container {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Otimizações de performance para telas pequenas */
@media (max-width: 1440px) {
    * {
        transition-duration: 0.2s !important;
        animation-duration: 0.2s !important;
    }
    
    .stat-card:hover {
        transform: translateY(-2px) !important;
    }
    
    .btn:hover {
        transform: translateY(-1px) !important;
    }
}

/* Tema escuro para telas pequenas */
@media (max-width: 1440px) and (max-height: 900px) {
    .dark-theme .container,
    .dark-theme .header,
    .dark-theme .user-header,
    .dark-theme .upload-section-compact,
    .dark-theme .filters-section,
    .dark-theme .table-section,
    .dark-theme .stat-card,
    .dark-theme .admin-card {
        border-color: #404040 !important;
    }
    
    .dark-theme .modal-content {
        background: #2d3748 !important;
        border-color: #4a5568 !important;
    }
} 