/* =========================================
   MONETIX - LAYOUT & DESKTOP RULES
   Extracted from index.html <style> block
   ========================================= */

/* [CRITICAL FIX] GLOBAL APP LOCK: PREVENTS BODY SCROLLING */
html,
body {
    overflow: hidden;
    /* No scroll on main document */
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    position: fixed;
    /* Lock viewport */
}

/* [CRITICAL FIX] SCREEN CONTAINER: HANDLES INTERNAL SCROLL IF NEEDED */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    /* Scroll ONLY inside the screen container */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll mobile */
    padding-bottom: 20px;
    /* Safe padding for scroll */
}

/* REGLAS TABLET (768px-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {

    /* Allow dashboard screen to expand beyond the default 450px */
    #screen-client-dash {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* REGLAS PC */
@media (min-width: 1024px) {

    .animated-bg,
    .bg-texture {
        display: block !important;
    }

    .app-container {
        max-width: 1200px !important;
        margin: 0 auto;
        padding: 0 20px;
        background-color: transparent !important;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Dashboard screen also needs to expand on desktop */
    #screen-client-dash {
        width: 100vw !important;
        max-width: 100vw !important;
    }

    #screen-construction {
        display: none !important;
    }

    #screen-client-login .card-container,
    #screen-admin-login .card-container {
        max-width: 450px !important;
        margin: 0 auto;
        background: var(--glass-bg);
        color: var(--glass-text);
        backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        box-shadow: 0 30px 60px var(--glass-shadow);
        border-radius: 24px;
        padding: 50px 40px;
    }

    #screen-client-login p,
    #screen-admin-login p {
        color: var(--glass-text) !important;
        opacity: 0.8;
    }

    #screen-client-login .logo-text,
    #screen-admin-login .logo-text {
        color: var(--glass-title) !important;
    }

    #screen-investor {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding-top: 0;
    }

    #screen-investor .dash-header {
        width: 100%;
        max-width: 450px;
        margin: 0 !important;
        border-radius: 24px 24px 0 0 !important;
        z-index: 2;
        position: relative;
    }

    #screen-investor .card-container {
        width: 100%;
        max-width: 450px !important;
        margin: 0 !important;
        border-radius: 0 0 24px 24px !important;
        background: var(--glass-bg);
        color: var(--glass-text);
        border: 1px solid var(--glass-border);
        border-top: none;
        padding-top: 30px !important;
        box-shadow: 0 25px 50px var(--glass-shadow);
    }

    #screen-investor label {
        color: var(--glass-text) !important;
        opacity: 0.8;
    }

    #screen-admin-dash {
        justify-content: flex-start;
        padding-top: 20px;
    }

    #screen-admin-dash .dash-header {
        max-width: 100%;
        border-radius: 15px !important;
        margin-bottom: 20px !important;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    .admin-menu-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 0 !important;
    }

    .admin-option {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        color: var(--glass-text);
        box-shadow: 0 5px 15px var(--glass-shadow);
    }

    body.dark-mode .admin-option i {
        color: var(--brand-gold);
    }

    .app-footer {
        display: block;
        position: fixed;
        bottom: 15px;
        left: 0;
        width: 100%;
        text-align: center;
        color: rgba(255, 255, 255, 0.4);
        font-size: 13px;
        z-index: 5;
    }

    .footer-social i {
        margin: 0 12px;
        font-size: 20px;
        cursor: pointer;
        transition: 0.3s;
        color: rgba(255, 255, 255, 0.6);
    }

    .footer-social i:hover {
        color: #F4B400;
        transform: scale(1.2);
    }

    .modal-overlay {
        align-items: center !important;
        background: rgba(0, 0, 0, 0.85);
    }

    .modal-content {
        max-width: 500px !important;
        border-radius: 20px !important;
        background: var(--bg-card) !important;
    }
}