/* 📱 MOBILE.CSS - VERSÃO LIMPA E FUNCIONAL */

/* Reset global para mobile */
@media (max-width: 768px) {
    * {
        box-sizing: border-box;
    }
    
    body {
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }
    
    /* Container mobile - Layout flexível */
    .container {
        display: flex;
        height: 100vh;
        overflow: hidden;
    }
    
    /* === SIDEBAR LATERAL ESCONDIDO === */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 300px !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        background: linear-gradient(180deg, 
            rgba(0, 0, 0, 0.98) 0%, 
            rgba(26, 26, 26, 0.98) 50%,
            rgba(10, 10, 10, 0.98) 100%) !important;
        backdrop-filter: blur(20px) !important;
        border-right: 2px solid rgba(255, 215, 0, 0.5) !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;
        z-index: 9999 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Sidebar visível quando classe 'show' */
    .sidebar.show {
        transform: translateX(0) !important;
    }
    
    /* Overlay escuro - NÃO sobrepõe o sidebar */
    .sidebar-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 300px !important;
        width: calc(100vw - 300px) !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.7) !important;
        z-index: 9998 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        pointer-events: none !important;
    }
    
    .sidebar-overlay.show {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    /* === LOGO === */
    .logo {
        padding: 2rem 1.5rem 1.5rem !important;
        text-align: center !important;
        border-bottom: 2px solid rgba(255, 215, 0, 0.3) !important;
        margin-bottom: 0 !important;
        background: rgba(0, 0, 0, 0.2) !important;
        flex-shrink: 0 !important;
    }
    
    .logo h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        color: #c38924 !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* === NAVEGAÇÃO === */
    .nav-menu {
        display: flex !important;
        flex-direction: column !important;
        padding: 1.5rem !important;
        gap: 1rem !important;
        list-style: none !important;
        margin: 0 !important;
        flex: 1 !important;
        overflow-y: auto !important;
        min-height: 0 !important;
    }
    
    .nav-item {
        width: 100% !important;
        padding: 1.2rem 1.5rem !important;
        margin: 0 !important;
        border: 2px solid rgba(195, 137, 36, 0.3) !important;
        border-radius: 12px !important;
        background: rgba(0, 0, 0, 0.4) !important;
        backdrop-filter: blur(10px) !important;
        transition: all 0.3s ease !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        gap: 1rem !important;
        color: #ffffff !important;
        text-decoration: none !important;
        font-weight: 500 !important;
    }
    
    .nav-item .icon {
        font-size: 1.3rem !important;
        flex-shrink: 0 !important;
        color: #c38924 !important;
    }
    
    .nav-item span {
        font-size: 1rem !important;
        font-weight: 600 !important;
    }
    
    .nav-item:hover {
        background: rgba(255, 215, 0, 0.25) !important;
        border-color: rgba(255, 215, 0, 0.7) !important;
        transform: translateX(8px) !important;
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3) !important;
    }
    
    .nav-item.active {
        background: linear-gradient(135deg, 
            rgba(255, 215, 0, 0.9) 0%, 
            rgba(201, 169, 110, 0.9) 100%) !important;
        border-color: #FFD700 !important;
        color: #000000 !important;
        font-weight: 700 !important;
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5) !important;
        transform: translateX(5px) !important;
    }
    
    .nav-item.active .icon {
        color: #000000 !important;
    }
    
    /* === CONTEÚDO PRINCIPAL === */
    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        overflow-y: auto !important;
        padding: 1rem !important;
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%) !important;
        transition: none !important;
    }
    
    /* === SEÇÕES DE CALCULADORA === */
    .calculator-section {
        padding: 1.5rem !important;
        margin-bottom: 2rem !important;
        border-radius: 15px !important;
    }
    
    .calculator-section h2 {
        font-size: 1.4rem !important;
        margin-bottom: 1.2rem !important;
        text-align: center !important;
        color: #c38924 !important;
    }
    
    .calculator-container {
        display: block !important;
    }
    
    .inputs-section,
    .results-section {
        margin-bottom: 1.5rem !important;
        padding: 1.5rem !important;
        border-radius: 15px !important;
        background: rgba(16, 48, 106, 0.1) !important;
        border: 1px solid rgba(195, 137, 36, 0.2) !important;
    }
    
    .inputs-section h3,
    .results-section h3 {
        color: #c38924 !important;
        margin-bottom: 1rem !important;
    }
    
    /* === INPUTS === */
    .input-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .input-group {
        margin-bottom: 1rem !important;
        width: 100% !important;
    }
    
    .input-group label {
        display: block !important;
        margin-bottom: 0.5rem !important;
        font-size: 0.9rem !important;
        color: #ffffff !important;
        font-weight: 500 !important;
    }
    
    .input-group input,
    .futuristic-select {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 16px !important;
        border: 2px solid rgba(195, 137, 36, 0.3) !important;
        border-radius: 10px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        color: #ffffff !important;
        min-height: 48px !important;
        transition: all 0.3s ease !important;
    }
    
    .input-group input:focus,
    .futuristic-select:focus {
        border-color: #c38924 !important;
        box-shadow: 0 0 10px rgba(195, 137, 36, 0.3) !important;
        outline: none !important;
    }
    
    .calculate-btn {
        width: 100% !important;
        padding: 1.2rem !important;
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        background: linear-gradient(135deg, #FFD700 0%, #C9A96E 100%) !important;
        border: none !important;
        border-radius: 12px !important;
        color: white !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        min-height: 52px !important;
        margin-top: 1rem !important;
    }
    
    .calculate-btn:hover {
        background: linear-gradient(135deg, #B8860B 0%, #C9A96E 100%) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 20px rgba(195, 137, 36, 0.4) !important;
    }
    
    .calculate-btn:active {
        transform: translateY(0) !important;
    }
    
    /* === RESULTADOS === */
    .results-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .result-card {
        padding: 1.2rem !important;
        border-radius: 12px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        border: 1px solid rgba(195, 137, 36, 0.3) !important;
        text-align: center !important;
        min-height: 80px !important;
        transition: all 0.3s ease !important;
    }
    
    .result-card:hover {
        border-color: rgba(255, 215, 0, 0.6) !important;
        transform: translateY(-3px) !important;
        box-shadow: 0 6px 20px rgba(195, 137, 36, 0.2) !important;
    }
    
    .result-card h4 {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        color: #FFFFFF !important;
    }
    
    .result-card span {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
    }
    
    .result-card.highlight {
        background: linear-gradient(135deg, 
            rgba(195, 137, 36, 0.2) 0%, 
            rgba(212, 154, 46, 0.2) 100%) !important;
        border-color: #c38924 !important;
        box-shadow: 0 4px 15px rgba(195, 137, 36, 0.3) !important;
    }
    
    .result-card.highlight span {
        color: #c38924 !important;
    }
    
    /* === GRÁFICOS === */
    .chart-container {
        height: 350px !important;
        margin-top: 2rem !important;
        padding: 1.2rem !important;
        border-radius: 15px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        border: 1px solid rgba(195, 137, 36, 0.3) !important;
        position: relative !important;
    }
    
    .chart-container canvas {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* === TELAS PEQUENAS === */
@media (max-width: 480px) {
    .sidebar {
        width: 280px !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        bottom: 0 !important;
    }
    
    .sidebar-overlay {
        left: 280px !important;
        width: calc(100vw - 280px) !important;
    }
    
    .nav-item {
        padding: 1rem 1.2rem !important;
    }
    
    .nav-item span {
        font-size: 0.9rem !important;
    }
    
    .logo {
        padding: 1.5rem 1rem 1rem !important;
    }
    
    .logo h1 {
        font-size: 1.3rem !important;
    }
    
    .main-content {
        padding: 0.8rem !important;
    }
    
    .calculator-section {
        padding: 1rem !important;
    }
    
    .inputs-section,
    .results-section {
        padding: 1rem !important;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    }
    
    .chart-container {
        height: 280px !important;
    }
}

/* === BOTÃO DE MENU === */
.mobile-menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 99999;
    width: 55px;
    height: 55px;
            background: linear-gradient(135deg, #FFD700 0%, #C9A96E 100%);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: white;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.mobile-menu-toggle:hover {
    background: linear-gradient(135deg, #B8860B 0%, #C9A96E 100%);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(195, 137, 36, 0.6);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle.active {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.mobile-menu-toggle.active:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* Mostrar botão apenas no mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
}

/* === LANDSCAPE === */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 280px !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        bottom: 0 !important;
    }
    
    .sidebar-overlay {
        left: 280px !important;
        width: calc(100vw - 280px) !important;
    }
    
    .chart-container {
        height: 280px !important;
    }
    
    .mobile-menu-toggle {
        top: 15px !important;
        left: 15px !important;
        width: 50px !important;
        height: 50px !important;
    }
}

/* === ANIMAÇÕES === */
@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideOut {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/* === MELHORIAS TOUCH === */
@media (hover: none) and (pointer: coarse) {
    .nav-item:hover {
        transform: none !important;
        background: rgba(0, 0, 0, 0.4) !important;
    }
    
    .nav-item:active {
        background: rgba(195, 137, 36, 0.3) !important;
        transform: scale(0.98) !important;
    }
    
    .mobile-menu-toggle:hover {
        transform: none !important;
    }
    
    .mobile-menu-toggle:active {
        transform: scale(0.9) !important;
    }
    
    .result-card:hover {
        transform: none !important;
    }
    
    .calculate-btn:hover {
        transform: none !important;
    }
} 