/**
 * Estilos do Sidebar do Portal do Cliente
 * Gradiente Turquesa/Azul
 */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR COM GRADIENTE */
.sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    height: 100vh !important;
    background: linear-gradient(135deg, #00d2d3 0%, #54a0ff 100%) !important;
    padding: 15px !important;
    overflow-y: auto !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
    z-index: 1000 !important;
    font-size: 0.7rem !important;
}

.sidebar .logo {
    text-align: center !important;
    margin-bottom: 30px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.sidebar .logo-icon {
    font-size: 40px !important;
    margin-bottom: 10px !important;
}

.sidebar .logo h3 {
    font-size: 0.9rem !important;
    color: white !important;
    margin: 0 !important;
    font-weight: 600 !important;
}

.sidebar .nav-menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sidebar .nav-menu li {
    margin-bottom: 8px !important;
}

.sidebar .nav-menu li a {
    display: block !important;
    padding: 4px 6px !important;
    font-size: 0.65rem !important;
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
}

.sidebar .nav-menu li a.active {
    background: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-weight: 600 !important;
}

.sidebar .nav-menu li a:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* CONTEÚDO PRINCIPAL */
.main-content {
    margin-left: 180px !important;
    padding: 15px !important;
    width: calc(100% - 180px) !important;
    min-height: 100vh !important;
}

/* HEADER DAS PÁGINAS */
.page-header {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.page-header h1 {
    font-size: 1.2rem !important;
    margin-bottom: 4px;
}

.page-header p {
    opacity: 0.9;
    font-size: 0.8rem;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    /* Esconder sidebar desktop */
    .sidebar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 12px 10px !important;
        padding-bottom: 80px !important;
    }
    
    .page-header {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }
    
    .page-header h1 {
        font-size: 1.1rem !important;
    }
    
    .page-header p {
        font-size: 0.75rem !important;
    }

    /* Container adaptado */
    .container {
        flex-direction: column !important;
    }

    /* Botões touch-friendly */
    button, .btn, a.btn {
        min-height: 40px;
    }

    /* Inputs sem zoom no iOS */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Tabelas com scroll horizontal */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Grids genéricos colapsam */
    .form-grid, .form-row, .detail-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== MENU MOBILE FLUTUANTE ===== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.65rem;
    transition: all 0.2s ease;
    border-radius: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.mobile-nav-item i {
    font-size: 1.3rem;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: #00CED1;
    background: rgba(0,206,209,0.1);
}

@media (max-width: 768px) {
    .mobile-nav {
        display: block !important;
    }
}

/* ===== PROTEÇÃO DE IMAGENS ===== */
.protected-image,
.galeria-thumbnail img,
.foto-item img,
.lightbox img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

/* ===== OVERLAY DE PROTEÇÃO SCREENSHOT ===== */
.screenshot-protection {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-align: center;
    padding: 20px;
}

.screenshot-protection.active {
    display: flex;
}

