/* css/pwa.css - Estilos específicos para PWA */

/* Melhorias de responsividade */
@media (max-width: 768px) {
    .main-content {
        padding: 10px;
        margin-left: 0;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        font-size: 0.9em;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .form-control {
        padding: 10px;
    }
    
    /* Ajustes para formulários em mobile */
    .form-group {
        margin-bottom: 15px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 5px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .table-responsive {
        font-size: 0.8em;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 0.8em;
    }
    
    /* Ocultar colunas menos importantes em telas muito pequenas */
    .table .d-none-mobile {
        display: none !important;
    }
}

/* Estilos para modo standalone (PWA instalada) */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .main-content {
        padding-top: 20px;
    }
    
    /* Adicionar indicador visual de que é uma PWA */
    .sidebar-brand::after {
        content: " PWA";
        font-size: 0.6em;
        color: var(--text-muted, #c0c0c0);
        vertical-align: super;
    }
}

/* Melhorias de touch para dispositivos móveis */
.btn, .sidebar-nav-link, .table tbody tr {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.btn {
    touch-action: manipulation;
}

/* Indicador de carregamento offline */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ff9800;
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.offline-indicator.show {
    transform: translateY(0);
}

/* Animações suaves */
.card, .btn, .form-control {
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Melhorias para acessibilidade */
.btn:focus, .form-control:focus, .sidebar-nav-link:focus {
    outline: 2px solid var(--primary-color, #ff3366);
    outline-offset: 2px;
}

/* Estilos para notificações push */
.notification-permission {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 20px;
    text-align: center;
}

.notification-permission .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    margin: 5px;
}

.notification-permission .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Estilos para modo escuro automático */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1f2b;
        --text-color: #ffffff;
        --text-muted: #c0c0c0;
        --border-color: #333;
        --card-bg: #2a2f3b;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .card {
        background-color: var(--card-bg);
        border-color: var(--border-color);
    }
    
    .form-control {
        background-color: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-color);
    }
    
    .table {
        color: var(--text-color);
    }
    
    .table-striped tbody tr:nth-of-type(odd) {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

/* Animação de splash screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.splash-screen.hide {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.splash-title {
    color: white;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.splash-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2em;
}

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

