/* ========================================
   AUTOMATIC IA - PREMIUM DARK LUXURY
   Final Polish v6.0
   ======================================== */

/* === 1. CSS VARIABLES === */
:root {
    /* Core Palette */
    --color-bg-deep: #050505;
    --color-bg-card: rgba(18, 18, 18, 0.85);
    --color-text-primary: #F5F5F5;
    --color-text-muted: #9A9A9A;

    /* METALLIC BRONZE - Deep to Bright */
    --gradient-metallic-bronze: linear-gradient(135deg, #8B5A2B 0%, #CD7F32 35%, #edcbb3 50%, #CD7F32 65%, #8B5A2B 100%);
    --gradient-bronze-glow: linear-gradient(135deg, #CD7F32 0%, #E8B87A 50%, #CD7F32 100%);
    --color-bronze-base: #CD7F32;
    --color-bronze-light: #edcbb3;
    --color-bronze-dark: #8B5A2B;

    /* VERY LIGHT Overlay (Shows marble veins) */
    --gradient-dark-overlay: linear-gradient(180deg, rgba(10, 10, 10, 0.3) 0%, rgba(10, 10, 10, 0.45) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);

    /* Typography */
    --font-primary: 'Montserrat', sans-serif;

    /* Sizing */
    --header-height: 80px;
    --section-padding: 120px;
    --container-max: 1400px;
    --hero-padding-left: 8%;
    --border-radius-lg: 24px;
    --border-radius-md: 20px;
    --border-radius-sm: 14px;

    /* Glow Effects */
    --glow-bronze: drop-shadow(0 0 15px rgba(205, 127, 50, 0.5));
    --glow-bronze-intense: drop-shadow(0 0 25px rgba(205, 127, 50, 0.65));
}

/* === 2. RESET & BASE === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    background-color: #050505 !important;
    color: var(--color-text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    /* Prevent horizontal scroll from SVG bleed */
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* === 3. HEADER - 100% TRANSPARENT === */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: transparent;
    /* 100% transparent */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-container {
    max-width: var(--container-max);
    width: 100%;
    padding: 0 var(--hero-padding-left);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 1.2rem;
    background: var(--gradient-metallic-bronze);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: var(--glow-bronze);
}

.logo i {
    font-size: 1.5rem;
    background: var(--gradient-metallic-bronze);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav ul {
    display: flex;
    gap: 2.5rem;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-primary);
    transition: all 0.3s ease;
}

.main-nav a:hover {
    background: var(--gradient-metallic-bronze);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-header {
    padding: 0.65rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--gradient-metallic-bronze);
    color: var(--color-bg-deep);
    border: none;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    filter: var(--glow-bronze);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btn-header:hover {
    transform: scale(1.03);
    filter: var(--glow-bronze-intense);
}

/* === 4. HERO SECTION === */
.hero {
    min-height: 100vh;
    padding: calc(var(--header-height) + 40px) 2rem 60px;
    padding-left: var(--hero-padding-left);
    display: flex;
    align-items: center;
    background-image:
        var(--gradient-dark-overlay),
        url('../assets/img/marble-main.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-container {
    position: relative;
    /* For absolute SVG positioning */
    display: block;
    /* Single column layout */
    max-width: 1600px;
    width: 100%;
    min-height: 50vh;
}

.hero-text {
    position: relative;
    z-index: 20;
    width: 38vw;
    /* Reduced to avoid overlap */
    max-width: 550px;
    margin-right: auto;
    text-align: left;
}

/* HEADLINE - Standard Block (Clean & Natural) */
.hero-headline {
    font-size: clamp(1.5rem, 2.8vw, 2.5rem);
    font-weight: 500;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    background: var(--gradient-metallic-bronze);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: var(--glow-bronze);
    transition: filter 0.3s ease;
}

.hero-subheadline {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 420px;
    line-height: 1.7;
}

/* === 5. SHIMMER BUTTON - FIT CONTENT === */
.btn-shimmer {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
    /* COMPACT - hugs text */
    padding: 1rem 2rem;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--gradient-metallic-bronze);
    color: var(--color-bg-deep);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: var(--glow-bronze);
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 100%;
    }
}

.btn-shimmer:hover {
    transform: translateY(-3px);
    filter: var(--glow-bronze-intense);
}

.btn-shimmer i {
    font-size: 1.1rem;
}

/* === 6. SVG AI FLOW - INFINITE BLEED (65vw, right:-12%) === */
.hero-visual {
    position: absolute;
    right: -12%;
    /* Bleed past screen edge */
    top: 50%;
    transform: translateY(-50%);
    width: 65vw;
    /* Infinite effect */
    max-width: none;
    z-index: 1;
    overflow: visible;
}

.ai-flow-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Node Styling */
.node-bg {
    fill: rgba(25, 22, 20, 0.8);
    stroke: #CD7F32;
    stroke-width: 1.5px;
    transition: all 0.3s ease;
    filter: var(--glow-bronze);
}

.node-bg.main-node {
    stroke-width: 2.5px;
    fill: rgba(30, 26, 22, 0.9);
}

.node-bg.infinity-bar {
    stroke-width: 1.5px;
}

.node-group:hover .node-bg {
    filter: var(--glow-bronze-intense);
}

.node-icon-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--color-bronze-light);
    font-size: 1.8rem;
    gap: 4px;
}

.node-icon-wrap span {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-bronze-light);
}

.node-icon-wrap.small {
    font-size: 1.4rem;
}

.node-icon-wrap.small i {
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.node-group:hover .node-icon-wrap.small i {
    color: var(--color-bronze-light);
}

/* AI Text - Metallic */
.ai-text {
    font-family: var(--font-primary);
    font-size: 42px;
    font-weight: 700;
    fill: #CD7F32;
    filter: var(--glow-bronze);
}

/* Connection Lines */
.connection-line {
    stroke: #CD7F32;
    stroke-opacity: 0.5;
    stroke-width: 2;
    fill: none;
}

/* Pulse Lines (Animated) */
.pulse-line {
    stroke: var(--color-bronze-light);
    stroke-width: 2.5;
    fill: none;
    stroke-dasharray: 20 300;
    stroke-linecap: round;
    opacity: 0.8;
    filter: var(--glow-bronze);
}

/* Infinity Inner Bars */
.infinity-inner {
    fill: rgba(205, 127, 50, 0.35);
}

/* === 7. VIDEO SECTION WITH YOUTUBE EMBED === */
.video-section {
    background: var(--color-bg-deep);
    padding: var(--section-padding) 2rem;
}

.video-wrapper {
    max-width: 900px;
    margin: 0 auto 2rem;
}

.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(205, 127, 50, 0.2);
    box-shadow: 0 0 30px rgba(205, 127, 50, 0.15);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-caption {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    text-align: center;
}

.section-container {
    max-width: var(--container-max);
    margin: 0 auto;
    text-align: center;
}

.btn-outline {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border: 1px solid rgba(205, 127, 50, 0.4);
    border-radius: var(--border-radius-sm);
    color: var(--color-bronze-light);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--gradient-metallic-bronze);
    color: var(--color-bg-deep);
    border-color: transparent;
}

/* === 8. SECTION STYLING === */
section {
    background-color: #050505 !important;
    padding: var(--section-padding) 2rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, #FFF 0%, #AAA 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 4rem;
}

/* === 9. BENTO GRID === */
.bottlenecks-section {
    background: #050505 !important;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 220px);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.bento-cell {
    background: var(--gradient-glass);
    border: 1px solid rgba(205, 127, 50, 0.12);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    transition: transform 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
}

.bento-cell:hover {
    transform: translateY(-5px);
    border-color: var(--color-bronze-base);
    filter: var(--glow-bronze);
}

/* === 9. HIGH-END TECH BENTO GRID === */
/* ==========================================================================
   MINERAL TECH & DARK LUXURY REDESIGN (Step 2253+)
   ========================================================================== */

/* === 9. MINERAL GRID (Entry Point) === */
.mineral-section {
    position: relative;
    padding: 100px 2rem;
    background: #050505;
    background-image: radial-gradient(circle at 50% 0%, rgba(205, 127, 50, 0.05) 0%, transparent 70%);
}

.section-title {
    color: #fff;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

.mineral-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.mineral-box {
    position: relative;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.6s ease;
    background: #0a0a0a;
}

.mineral-box:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

/* MARBLE TEXTURES */
.mineral-box.amethyst {
    background: url('../assets/img/marble-purple.jpg') center/cover;
}

.mineral-box.gold {
    background: url('../assets/img/marble-yellow.jpg') center/cover;
}

.mineral-box.ruby {
    background: url('../assets/img/marble-red.jpg') center/cover;
}

.mineral-box.emerald {
    background: url('../assets/img/marble-green.jpg') center/cover;
}

.mineral-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.mineral-box:hover .mineral-content {
    transform: translateY(0);
}

.mineral-content i {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.mineral-content h3 {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* OVERLAY REVEAL */
.mineral-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.4s ease;
}

.mineral-box:hover .mineral-overlay {
    background: rgba(0, 0, 0, 0);
}

/* ==========================================================================
   LUXURY iPAD PRO MODAL
   ========================================================================== */
.luxury-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.luxury-modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
    /* Semantic hide */
}

/* CHASSIS HARDWARE */
.luxury-ipad-pro {
    position: relative;
    width: 90vw;
    max-width: 1100px;
    height: 75vh;
    min-height: 600px;
    background: #000;
    border-radius: 30px;
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.9),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    /* Bezel reflection */
    border: 4px solid #1a1a1a;
    /* Frame */
    display: flex;
    flex-direction: column;
}

/* HARDWARE BUTTONS */
.ipad-bezel {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.hw-btn {
    pointer-events: auto;
    position: absolute;
    background: #222;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.1s;
}

.hw-btn:active {
    transform: scale(0.95);
}

.power-btn {
    top: -4px;
    right: 60px;
    /* Top Edge */
    width: 50px;
    height: 4px;
    border-radius: 4px 4px 0 0;
}

.volume-rocker {
    position: absolute;
    right: -4px;
    top: 80px;
    /* Right Edge */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hw-btn.volume-up,
.hw-btn.volume-down {
    width: 4px;
    height: 40px;
    border-radius: 0 4px 4px 0;
}

.camera-notch {
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 40px;
    /* Magnetic connector look-alike or camera on landscape */
    background: #111;
    border-radius: 0 4px 4px 0;
}

/* SYSTEM OS (SCREEN) */
.ipad-screen {
    width: 100%;
    height: 100%;
    background: #0f0b1a;
    /* Deep OS Background */
    border-radius: 26px;
    /* Inner radius */
    overflow: hidden;
    position: relative;
    display: flex;
    padding: 0 !important;
    /* FULL BLEED CRITICAL */
}

/* SYSTEM OVERLAYS */
.screen-off {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 999;
}

.screen-off.hidden {
    display: none;
}

.volume-ui {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 500;
    color: #fff;
    width: 200px;
    transition: opacity 0.3s;
}

.volume-ui.hidden {
    opacity: 0;
}

.vol-bar {
    flex: 1;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

.vol-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
}

/* SIDEBAR */
.ipad-sidebar {
    width: 80px;
    height: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    /* Glass separator */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    z-index: 10;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* CONTENT AREA */
.ipad-content {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;
    background: url('../assets/img/marble-purple.jpg') center/cover;
}

/* VIEWS */
.view-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(15, 11, 26, 0.85);
    /* Dark tint over marble */
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.view-container.active {
    opacity: 1;
    pointer-events: auto;
}

/* CHAT VIEW */
.chat-header {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-meta {
    display: flex;
    flex-direction: column;
}

.chat-title {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

.chat-status {
    font-size: 0.8rem;
    color: #2ecc71;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-status .dot {
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 8px #2ecc71;
}

.close-app-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.close-app-btn:hover {
    background: #e74c3c;
}

.chat-history {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* CRITICAL ALIGNMENT */
    gap: 15px;
}

.chat-input-bar {
    height: 80px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 25px;
    background: rgba(20, 20, 20, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 15px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

#chat-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.send-btn {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #007aff;
    /* Apple Blue */
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

.send-btn:hover {
    transform: scale(1.05);
}

/* MESSAGES */
.msg {
    max-width: 70%;
    display: flex;
    gap: 10px;
    animation: popIn 0.3s ease;
}

.msg-ai {
    align-self: flex-start;
}

.msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg .avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #c084fc, #6366f1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.msg.msg-user .avatar {
    display: none;
}

/* User avatar hidden in chat bubble style usually */

.msg .text {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.msg-ai .text {
    background: rgba(255, 255, 255, 0.1);
    color: #eee;
    border-bottom-left-radius: 4px;
}

.msg-user .text {
    background: #007aff;
    color: #fff;
    border-bottom-right-radius: 4px;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PROFILE VIEW */
.profile-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.profile-avatar-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.profile-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.field-group label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 5px;
}

.luxury-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.1rem;
    padding: 5px 0;
}

.luxury-input:focus {
    outline: none;
    border-color: #fff;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: #2ecc71;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 28px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 16px;
    color: #fff;
}


.bento-grid-luxury {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    /* More air */
    max-width: 1000px;
    margin: 4rem auto 0;
}

.tech-card {
    position: relative;
    height: 280px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle border */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.tech-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.04);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.02);
}

/* Metallic Gradients & Glows per Card */

/* AMETHYST CARD - Full Marble Texture */
.card-amethyst {
    background:
        linear-gradient(135deg, rgba(45, 27, 78, 0.7) 0%, rgba(155, 89, 182, 0.3) 100%),
        url('../assets/img/marble-purple.jpg');
    background-size: cover;
    background-position: center;
    border-color: rgba(155, 89, 182, 0.5);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-amethyst:hover {
    transform: translateY(-8px) scale(1.03);
    filter: brightness(1.2);
    border-color: rgba(192, 132, 252, 0.9);
    /* PRESERVE MARBLE TEXTURE ON HOVER */
    background:
        linear-gradient(135deg, rgba(45, 27, 78, 0.5) 0%, rgba(155, 89, 182, 0.2) 100%),
        url('../assets/img/marble-purple.jpg');
    background-size: cover;
    background-position: center;
    box-shadow:
        0 25px 50px rgba(155, 89, 182, 0.4),
        0 0 40px rgba(192, 132, 252, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.card-amethyst .card-glow {
    background: radial-gradient(circle at top right, rgba(192, 132, 252, 0.5), transparent 60%);
}

.card-gold {
    border-color: rgba(241, 196, 15, 0.3);
}

.card-gold:hover {
    border-color: rgba(241, 196, 15, 0.8);
    box-shadow: 0 0 30px rgba(241, 196, 15, 0.15);
}

.card-gold .card-glow {
    background: radial-gradient(circle at top right, rgba(241, 196, 15, 0.4), transparent 60%);
}

.card-ruby {
    border-color: rgba(231, 76, 60, 0.3);
}

.card-ruby:hover {
    border-color: rgba(231, 76, 60, 0.8);
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.15);
}

.card-ruby .card-glow {
    background: radial-gradient(circle at top right, rgba(231, 76, 60, 0.4), transparent 60%);
}

.card-emerald {
    border-color: rgba(46, 204, 113, 0.3);
}

.card-emerald:hover {
    border-color: rgba(46, 204, 113, 0.8);
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.15);
}

.card-emerald .card-glow {
    background: radial-gradient(circle at top right, rgba(46, 204, 113, 0.4), transparent 60%);
}

.card-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    filter: blur(60px);
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.tech-card:hover .card-glow {
    opacity: 0.8;
}

.tech-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 2;
}

.tech-content i {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.tech-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

/* === MINERAL VAULT MODALS === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    /* Solid dark */
    overflow-y: auto;
    /* Scrollable overlay */
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Align top for scrolling */
}

.modal-overlay.hidden {
    display: none;
    pointer-events: none;
}

.vault-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    min-height: 500px;
    background: #0a0a0a;
    border-radius: 24px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mineral Texture Borders - Enhanced */
.vault-border-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    pointer-events: none;
    border: 2px solid transparent;
    z-index: 10;
}

.theme-amethyst~.vault-border-glow {
    border-color: #9b59b6;
    box-shadow: inset 0 0 20px rgba(155, 89, 182, 0.2);
}

.theme-gold~.vault-border-glow {
    border-color: #f1c40f;
    box-shadow: inset 0 0 20px rgba(241, 196, 15, 0.2);
}

.theme-ruby~.vault-border-glow {
    border-color: #e74c3c;
    box-shadow: inset 0 0 20px rgba(231, 76, 60, 0.2);
}

.theme-emerald~.vault-border-glow {
    border-color: #2ecc71;
    box-shadow: inset 0 0 20px rgba(46, 204, 113, 0.2);
}

.vault-interface {
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 30px;
    background: #0a0a0a;
    /* Solid dark background for clarity */
}

/* CRITICAL: Hide non-active vault interfaces */
.vault-interface.hidden {
    display: none !important;
}

/* Simple Color Headers (No Marble) */
.vault-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.theme-amethyst .vault-header {
    background: linear-gradient(135deg, #9b59b6 0%, #6c3483 100%);
    border-bottom-color: #9b59b6;
}

.theme-gold .vault-header {
    background: linear-gradient(135deg, #f1c40f 0%, #d4ac0d 100%);
    border-bottom-color: #f1c40f;
}

.theme-ruby .vault-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-bottom-color: #e74c3c;
}

.theme-emerald .vault-header {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border-bottom-color: #2ecc71;
}

.vault-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 2;
}

/* ============================================
   iPAD PRO CHASSIS (Hyper-Realistic Hardware)
   ============================================ */

/* iPad Outer Frame - Landscape 4:3 */
/* iPad Outer Frame - Landscape Custom - FIXED OVERRIDE */
.ipad-chassis {
    position: relative !important;
    /* Reverting to relative for scrolling */
    width: 95% !important;
    max-width: 1000px !important;
    /* LEGACY STANDARD */
    height: 85vh !important;
    min-height: 600px !important;
    /* LEGACY STANDARD */
    margin: 2% auto !important;
    /* LEGACY STANDARD */
    padding: 20px !important;
    background: #121212;
    border-radius: 40px;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.9),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    display: block !important;
    border: 4px solid #2a2a2a;
    z-index: 10002 !important;
}

.glass-card {
    min-height: 120px;
    margin-bottom: 10px;
}

/* Hardware Buttons - MOVED TO LEFT & TOP as per user feedback */
.hw-btn {
    position: absolute;
    background: #333;
    border: 1px solid #444;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.hw-btn:hover {
    background: #444;
    transform: scale(1.05);
}

.hw-btn:active {
    background: #555;
    transform: scale(0.95);
}

/* Power Button (Left Top Edge) */
.power-btn {
    left: -10px;
    /* Protruding Left */
    top: 60px;
    width: 10px;
    height: 50px;
    border-radius: 5px 0 0 5px;
    background: #c0392b;
    /* Red accent for visibility */
}

/* Volume Buttons (Left Side, below Power) */
.volume-up {
    left: -10px;
    top: 140px;
    width: 10px;
    height: 60px;
    border-radius: 5px 0 0 5px;
}

.volume-down {
    left: -10px;
    top: 210px;
    width: 10px;
    height: 60px;
    border-radius: 5px 0 0 5px;
}

/* Screen Off Overlay */
.screen-off-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    background: #000;
    border-radius: 20px;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.ipad-chassis.screen-off .screen-off-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Volume Toast Notification */
.volume-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 20px 40px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.volume-toast:not(.hidden) {
    opacity: 1;
}

.volume-toast i {
    font-size: 1.8rem;
    color: #c084fc;
}

/* iPad Screen (Inner Content) */
/* iPad Screen (Inner Content) - FULL BLEED FLEXBOX */
.ipad-screen {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(45, 27, 78, 0.95) 0%, rgba(20, 10, 35, 0.98) 100%),
        url('../assets/img/marble-purple.jpg');
    background-size: cover;
    border-radius: 20px;
    display: flex;
    /* Flexbox as requested */
    flex-direction: row;
    overflow: hidden;
}

/* iPad Main Content Area */
/* iPad Main Content Area - FLEX GROW */
.ipad-main {
    flex: 1;
    /* Eat all remaining space */
    height: 100%;
    padding: 0 !important;
    /* FULL BLEED - Touching edges */
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

/* View Switching - FORCE HIDE/SHOW */
/* View Switching - FORCE HIDE/SHOW */
.ipad-view {
    display: none !important;
    width: 100%;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    /* Anchor for absolute input */
}

.ipad-view.active {
    display: flex !important;
    /* Force show when active */
}

/* Integrated Close Button (Top Right of Chassis) */
.btn-close-ipad {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #333;
    border: 1px solid #444;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    transition: all 0.2s;
}

.btn-close-ipad:hover {
    background: #c0392b;
    transform: rotate(90deg);
}

/* HIDE REDUNDANT GLOBAL CLOSE BUTTON */
.modal-close {
    display: none !important;
}

/* ========== VIEW A: PROFILE ========== */
/* ... existing profile styles ... */

/* Toggle Switch Fix - Center Alignment */
.toggle-switch {
    position: relative;
    display: flex;
    align-items: center;
    /* Vertical Center */
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Sidebar Styling Adjustment for 80px */
/* Sidebar Styling Adjustment for 80px - STRICT FIXED */
.tablet-sidebar {
    width: 80px !important;
    min-width: 80px !important;
    flex-shrink: 0;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 !important;
    box-sizing: border-box;
    margin: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: center;
}

.sidebar-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    transition: all 0.3s;
    cursor: pointer;
}

.sidebar-icon.active {
    background: rgba(192, 132, 252, 0.2);
    color: #c084fc;
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.3);
}

.sidebar-icon:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* === EMERALD SPLIT LAYOUT === */
.workflow-split {
    display: flex;
    gap: 30px;
    height: calc(100% - 60px);
    /* Adjust for header */
}

.task-list {
    width: 30%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    overflow-y: auto;
}

.terminal-log {
    width: 70%;
    background: #0a0a0a;
    border-radius: 12px;
    padding: 15px;
    font-family: monospace;
    overflow-y: auto;
}

/* === RUBY INSTAGRAM LAYOUT === */
.instagram-layout {
    display: flex;
    flex-direction: row;
    gap: 30px;
    height: 100%;
}

.insta-left {
    width: 50%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.insta-right {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prompt-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
}

.comments-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.comments-section h4 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comment-list {
    flex: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 10px;
}

.comment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-content {
    display: flex;
    flex-direction: column;
}

.comment-content .user {
    font-weight: bold;
    color: #ff0055;
    font-size: 0.85rem;
}

.comment-content .text {
    font-size: 0.9rem;
    color: #ddd;
}

.btn-xs-auto {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-xs-auto:hover {
    background: #ff0055;
}

/* ========== VIEW A: PROFILE ========== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin-bottom: 25px;
}

.profile-avatar {
    position: relative;
    width: 100px;
    height: 100px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(192, 132, 252, 0.5);
}

.online-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    background: #2ecc71;
    border-radius: 50%;
    border: 3px solid #1a1a1a;
}

.profile-info {
    flex-grow: 1;
}

.input-borderless {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    width: 100%;
    padding: 8px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.input-borderless:focus {
    outline: none;
    border-bottom-color: rgba(192, 132, 252, 0.5);
}

.name-input {
    font-size: 1.5rem;
    font-weight: 600;
}

.desc-input {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.profile-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-card span {
    font-size: 1rem;
    color: #fff;
}

.masked-phone {
    font-family: monospace;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2rem !important;
    font-weight: 700;
    color: #c084fc !important;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
}

.toggle-switch input {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-inner {
    width: 50px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    position: relative;
    transition: background 0.3s ease;
}

.toggle-inner::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch input:checked+.toggle-label .toggle-inner {
    background: #2ecc71;
}

.toggle-switch input:checked+.toggle-label .toggle-inner::after {
    transform: translateX(22px);
}

.toggle-text {
    font-size: 0.9rem;
    display: none;
}

.toggle-switch input:checked+.toggle-label .toggle-text.on,
.toggle-switch input:not(:checked)+.toggle-label .toggle-text.off {
    display: inline;
}

/* ========== VIEW B: CHAT (iMessage Style) ========== */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    /* Fixed padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
    /* Remove margin, let flex gap handle or padding */
    flex-shrink: 0;
    /* Don't shrink */
    height: 60px;
    /* Fixed height as requested */
    box-sizing: border-box;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.chat-title i {
    color: #c084fc;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse-glow 2s infinite;
}

.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    padding-bottom: 90px;
    /* Space for absolute input */
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.msg {
    display: flex;
    gap: 10px;
    max-width: 80%;
}

.msg-ai {
    align-self: flex-start;
}

.msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #9b59b6, #6c3483);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.msg-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.msg-ai .msg-content {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.msg-user .msg-content {
    background: linear-gradient(135deg, #007AFF, #0051D5);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.typing-indicator:not(.hidden) {
    display: flex;
}

.chat-input-bar {
    display: flex;
    gap: 10px;
    padding: 20px;
    /* Increased padding */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    /* Absolute force */
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.95);
    /* Ensure background covers text */
    backdrop-filter: blur(10px);
    z-index: 10;
    margin: 0;
    box-sizing: border-box;
}

.chat-input-ipad {
    flex-grow: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input-ipad:focus {
    border-color: rgba(192, 132, 252, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.chat-input-ipad::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.btn-send-ipad {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #007AFF, #0051D5);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send-ipad:hover {
    transform: scale(1.08);
    box-shadow: 0 5px 20px rgba(0, 122, 255, 0.4);
}

/* ========== VIEW C: HISTORY ========== */
.section-header {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.section-header i {
    color: #c084fc;
}

.history-list,
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item,
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #fff;
    transition: background 0.2s ease;
}

.history-item:hover,
.setting-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.history-item .time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.badge {
    background: #2ecc71;
    color: #fff;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Sidebar Navigation */
/* DUPLICATE .tablet-sidebar REMOVED (Defined above with !important) */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 10px;
}

.sidebar-icon {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-icon:hover {
    background: rgba(192, 132, 252, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-icon.active {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(192, 132, 252, 0.3));
    color: #CD7F32;
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.3);
}

.sidebar-footer {
    display: flex;
    justify-content: center;
    padding: 10px;
}

.ai-status-dot {
    width: 12px;
    height: 12px;
    background: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 10px #2ecc71;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 10px #2ecc71;
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 20px #2ecc71;
    }
}

/* Main Dashboard Area */
.tablet-main {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto;
}

.tablet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-greeting h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.header-greeting p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 5px 0 0;
}

.status-active {
    color: #2ecc71;
    font-weight: 600;
}

.btn-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon-circle:hover {
    background: rgba(192, 132, 252, 0.2);
    border-color: rgba(192, 132, 252, 0.5);
}

/* Dashboard Widgets Grid */
.dashboard-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    flex-grow: 1;
}

/* Glass Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(192, 132, 252, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.glass-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 15px;
}

/* Sentiment Card */
.sentiment-card {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.sentiment-card .card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #9b59b6, #e74c3c);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.sentiment-card .card-content {
    flex-grow: 1;
}

.sentiment-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.sentiment-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.sentiment-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.sentiment-label strong {
    color: #2ecc71;
}

/* Actions Card */
.actions-card {
    grid-column: 2;
    grid-row: 1;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(192, 132, 252, 0.15);
    border-color: rgba(192, 132, 252, 0.4);
}

.action-btn.accent {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(192, 132, 252, 0.2));
    border-color: rgba(205, 127, 50, 0.4);
}

.action-btn.accent:hover {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(192, 132, 252, 0.3));
}

/* Chat Card */
.chat-card {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
}

.chat-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.chat-preview {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    max-height: 100px;
    overflow-y: auto;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    max-width: 80%;
}

.chat-bubble.client {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    align-self: flex-start;
}

.chat-bubble.ai {
    background: linear-gradient(135deg, #9b59b6, #6c3483);
    color: #fff;
    align-self: flex-end;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-input-row {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex-grow: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: rgba(192, 132, 252, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.btn-send-tablet {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #9b59b6, #6c3483);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send-tablet:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(155, 89, 182, 0.4);
}

/* === INTERFACE SPECIFICS === */

/* Amethyst (Chat) */
.chat-area {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-message.bot .avatar {
    width: 32px;
    height: 32px;
    background: #9b59b6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.msg-bubble {
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 12px 0;
    max-width: 70%;
    font-size: 0.95rem;
    line-height: 1.4;
}

.chat-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #9b59b6;
    border-radius: 50%;
    margin: 0 2px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.chat-typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.chat-typing span:nth-child(2) {
    animation-delay: -0.16s;
}

/* Gold (Dashboard) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.kpi-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 5px;
}

.text-gold {
    color: #f1c40f;
}

/* Ruby (Marketing) */
.creative-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.prompt-bar {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    color: #ccc;
}

.btn-automate {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.4);
    transition: transform 0.2s;
}

.btn-automate:hover {
    transform: scale(1.05);
}

/* Emerald (Processes) */
.workflow-split {
    display: flex;
    gap: 30px;
    height: 300px;
}

.task-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.task-item.completed {
    border-left-color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
    color: #fff;
}

.terminal-log {
    flex: 1;
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    font-family: monospace;
    color: #2ecc71;
    font-size: 0.85rem;
    overflow: hidden;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .bento-grid-luxury {
        grid-template-columns: 1fr;
    }

    .vault-container {
        width: 95%;
        min-height: 600px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .workflow-split {
        flex-direction: column;
    }
}

.mineral-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Hover Overlay */
.mineral-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mineral-card:hover .mineral-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .bento-grid-minerals {
        grid-template-columns: 1fr;
    }

    .mineral-card {
        height: 220px;
    }
}

/* === MODAL & MINI-APPS === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
    pointer-events: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1;
}

.modal-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    padding: 30px;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mini App Styles */
.mini-app {
    width: 100%;
}

.mini-app.hidden {
    display: none;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.app-header i {
    font-size: 1.5rem;
    color: var(--color-bronze-base);
}

.app-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

/* Chat Interface */
.chat-interface {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-bubble {
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 80%;
}

.chat-bubble.user {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.chat-bubble.bot {
    align-self: flex-start;
    background: rgba(138, 79, 255, 0.2);
    color: #e0d0ff;
    border: 1px solid rgba(138, 79, 255, 0.3);
}

/* Dashboard Interface */
.dashboard-interface {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #fff;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--color-bronze-base);
    border-radius: 4px;
}

/* Default styling for others */
.gen-interface,
.terminal-interface {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 12px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #0f0;
}

.gen-input {
    color: #fff;
    margin-bottom: 10px;
}

.code-line {
    margin-bottom: 5px;
    color: #ccc;
}

.text-success {
    color: #50ffce;
}

/* === 10. PHASES === */
.how-it-works-section {
    background: #050505 !important;
}

.phases-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.phase-card {
    background: var(--gradient-glass);
    border: 1px solid rgba(205, 127, 50, 0.12);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem 2rem;
    text-align: left;
    transition: transform 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
}

.phase-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-bronze-base);
    filter: var(--glow-bronze);
}

.phase-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    background: var(--gradient-metallic-bronze);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    display: block;
}

.phase-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.phase-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* === 11. TESTIMONIALS === */
.success-section {
    background: #050505 !important;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--gradient-glass);
    border: 1px solid rgba(205, 127, 50, 0.12);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    text-align: left;
    transition: transform 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-bronze-base);
    filter: var(--glow-bronze);
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-metallic-bronze);
    color: var(--color-bg-deep);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    filter: var(--glow-bronze);
}

.testimonial-card blockquote {
    font-size: 1.05rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-card cite {
    font-style: normal;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* === 12. METRICS === */
.results-section {
    background: #050505 !important;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.metric-card {
    background: var(--gradient-glass);
    border: 1px solid rgba(205, 127, 50, 0.12);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-bronze-base);
    filter: var(--glow-bronze);
}

.metric-value {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-metallic-bronze);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* === 13. GUARANTEE === */
.guarantee-section {
    background: var(--color-bg-deep);
    padding: 80px 2rem;
}

.guarantee-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.guarantee-content i {
    font-size: 3.5rem;
    background: var(--gradient-metallic-bronze);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    display: block;
    filter: var(--glow-bronze);
}

.guarantee-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.guarantee-content p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

/* === 14. CTA FINAL === */
.cta-final-section {
    background: #050505 !important;
    padding: 140px 2rem;
}

.cta-question {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 600;
    max-width: 750px;
    margin: 0 auto 3rem;
}

.btn-cta-large {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.3rem 2.8rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--gradient-metallic-bronze);
    color: var(--color-bg-deep);
    border-radius: var(--border-radius-md);
    transition: transform 0.3s ease, filter 0.3s ease;
    position: relative;
    overflow: hidden;
    filter: var(--glow-bronze);
}

.btn-cta-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: shimmer 2s infinite;
}

.btn-cta-large:hover {
    transform: scale(1.05);
    filter: var(--glow-bronze-intense);
}

.btn-cta-large i {
    font-size: 1.4rem;
}

/* === 15. FOOTER === */
.main-footer {
    background: var(--color-bg-deep);
    border-top: 1px solid rgba(205, 127, 50, 0.1);
    padding: 70px 2rem 35px;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(205, 127, 50, 0.08);
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-col h4 {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.3rem;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul li {
    margin-bottom: 0.7rem;
}

.footer-col ul a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-col ul a:hover {
    background: var(--gradient-metallic-bronze);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-links a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(205, 127, 50, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--gradient-metallic-bronze);
    border-color: transparent;
    color: var(--color-bg-deep);
}

.footer-bottom {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-top: 1.5rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* === 16. RESPONSIVE === */
@media (max-width: 1024px) {
    :root {
        --hero-padding-left: 5%;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-subheadline {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        position: relative;
        /* Override absolute for mobile */
        order: 2;
        width: 100%;
        max-width: 100%;
        margin: 2rem auto 0;
        right: unset;
        top: unset;
        transform: scale(0.7);
        transform-origin: center center;
    }

    .ai-flow-svg {
        min-width: unset;
        width: 100%;
    }

    .bento-grid,
    .phases-container,
    .testimonials-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .bento-large,
    .bento-wide {
        grid-column: span 1;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .main-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
        --hero-padding-left: 1.5rem;
    }

    .hero {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* MOBILE: Show FULL SVG scaled to fit */
    .hero-visual {
        overflow: visible !important;
        margin-right: 0 !important;
        transform: scale(0.5) !important;
        transform-origin: center center;
        width: 100%;
        max-width: 100vw;
        margin-top: 1rem;
    }

    .ai-flow-svg {
        min-width: unset;
        width: 100%;
    }

    /* Hide desktop breaks on mobile */
    .desktop-break {
        display: none;
    }

    .video-embed {
        border-radius: var(--border-radius-md);
    }

    .header-container {
        padding: 0 1.5rem;
    }

    .btn-header {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* ==========================================================================
   CLEANUP & STABILITY (Step 2185 - RESTORED)
   ========================================================================== */
    /* Override Step 2038 Absolute Positioning */
    .chat-input-bar {
        position: relative !important;
        margin-top: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        border-radius: 0 !important;
        background: rgba(18, 18, 18, 0.6);
        backdrop-filter: blur(10px);
        display: flex;
        /* Ensure display is set */
    }

    /* Ensure Chat View is Column */
    .chat-messages {
        justify-content: flex-start !important;
        padding-bottom: 20px !important;
    }

    .ipad-view {
        flex-direction: column !important;
    }
}

/* === HERO ANIMATION FORCE FIX (APPENDED) === */
.pulse-line {
    stroke-dasharray: 15, 25 !important;
    animation: flowLinesForce 2s linear infinite !important;
    opacity: 0.8 !important;
}

@keyframes flowLinesForce {
    0% {
        stroke-dashoffset: 40;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

/* =================================================================
   🔥 HERO NUCLEAR OVERRIDE (MOBILE & ANIMATION FIX)
   ================================================================= */

/* 1. MOBILE LAYOUT RESET (PANTALLAS PEQUEÑAS) */
@media screen and (max-width: 991px) {
    html body .hero-container {
        flex-direction: column-reverse !important;
        /* Gráfico arriba o abajo según prefiera, aquí apilamos */
        padding: 120px 20px 60px 20px !important;
        height: auto !important;
        min-height: auto !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 40px !important;
    }

    html body .hero-text {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    html body .hero-headline {
        font-size: 2.5rem !important;
        /* Grande pero legible */
        line-height: 1.2 !important;
        margin-bottom: 20px !important;
    }

    html body .hero-subheadline {
        font-size: 1.1rem !important;
        margin-bottom: 30px !important;
        padding: 0 10px !important;
    }

    /* Botón centrado a la fuerza */
    html body .hero-text .btn-shimmer {
        margin-left: auto !important;
        margin-right: auto !important;
        display: inline-flex !important;
        width: auto !important;
    }

    /* Visual Ajustado */
    html body .hero-visual {
        width: 100% !important;
        height: 350px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        overflow: visible !important;
        /* Dejar que las líneas brillen */
    }

    html body .ai-flow-svg {
        width: 100% !important;
        height: 100% !important;
        transform: scale(1.1) !important;
        /* Zoom para llenar espacio */
    }
}

/* 2. ANIMACIÓN "RÍO ORGÁNICO" (FLUIDEZ NATURAL) */
/* Reset total de las líneas */
html body .pulse-line {
    stroke-dasharray: 400 1200 !important;
    /* Trazos largos con mucho espacio vacío */
    stroke-linecap: round !important;
    stroke-width: 3px !important;
    fill: none !important;
    opacity: 0.6;
}

/* Animación Base - Flujo Lento */
@keyframes naturalFlow {
    0% {
        stroke-dashoffset: 1600;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

/* === VARIABILIDAD CAÓTICA (La clave para que no sea robótico) === */
/* Seleccionamos líneas alternas y les damos velocidades distintas */

/* Línea 1, 4, 7... (Rápidas y Brillantes) */
html body .pulse-line:nth-child(3n+1) {
    stroke: #ffd700 !important;
    /* Oro */
    animation: naturalFlow 4s linear infinite !important;
    opacity: 0.9 !important;
    stroke-width: 4px !important;
}

/* Línea 2, 5, 8... (Lentas y Sutiles) */
html body .pulse-line:nth-child(3n+2) {
    stroke: #cd7f32 !important;
    /* Bronce */
    animation: naturalFlow 9s ease-in-out infinite !important;
    /* Ritmo variable */
    opacity: 0.4 !important;
    stroke-dasharray: 200 800 !important;
    /* Más cortas */
}

/* Línea 3, 6, 9... (Velocidad Media y Retrasadas) */
html body .pulse-line:nth-child(3n+3) {
    stroke: #ffae42 !important;
    /* Naranja */
    animation: naturalFlow 6s linear infinite !important;
    animation-delay: 1s !important;
    /* Desfase */
    opacity: 0.7 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MÓVIL) - ESCUDO DE SEGURIDAD (FASE 1)
   ========================================================================== */
@media (max-width: 768px) {

    /* 1. HEADER Y NAVEGACIÓN */
    nav,
    header {
        flex-wrap: wrap !important;
        padding: 15px 10px !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .logo-container h3,
    .logo-text,
    .header-container .logo span {
        display: none !important;
    }

    .btn-contacto,
    a[href="#agendar-auditoria"] {
        padding: 8px 12px !important;
        font-size: 0.75rem !important;
        letter-spacing: 0 !important;
        margin-top: 0 !important;
    }

    /* 2. HERO Y LIMPIEZA VISUAL */
    /* Ocultar los nodos de Diagnóstico y Optimización en móvil */
    .nodos-container,
    .nodo-01,
    .nodo-03,
    .piramide-base .nodo-lux {
        display: none !important;
    }

    /* 1. SEPARACIÓN FÍSICA DEL BOTÓN Y EL VIDEO */
    /* Obligamos al contenedor del Hero a apilar todo como una torre */
    #metodologia-fusion {
        padding-top: 130px !important;
    }

    #metodologia-fusion>div {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .video-lux,
    .piramide-base {
        width: 100% !important;
        margin-top: 20px !important;
        transform: none !important;
        position: relative !important;
        z-index: 10 !important;
        margin-bottom: 0px !important;
        /* Quitado margen para evitar doble espacio */
    }

    /* 1. DESATASCO DEL BOTÓN WHATSAPP */
    .piramide-container {
        padding-bottom: 80px !important;
        /* Dar espacio fisico real en la base de la pirámide */
        display: flex !important;
        flex-direction: column !important;
    }

    /* Target THE EXACT CLASS from index.html WITH HIGHEST SPECIFICITY */
    #metodologia-fusion button.btn-lux-shimmer {
        position: relative !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        margin-top: 40px !important;
        /* BULLDOZE inline -60px !important */
        margin-bottom: 40px !important;
        z-index: 9999 !important;
        width: 100% !important;
        max-width: 300px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        clear: both !important;
    }

    /* 1. FORZAR LA ESTRUCTURA DE 4 COLUMNAS VERTICALES */
    .card-container,
    .mineral-section div[style*="grid"],
    .mineral-section .section-container .mineral-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        /* Mantiene las 4 columnas */
        grid-auto-flow: row !important;
        /* Asegura que fluyan como columnas */
        gap: 2px !important;
        align-items: end !important;
        /* Mantiene el efecto Skyline pegado al suelo */
        height: 600px !important;
        /* Fuerza una altura al contenedor para que quepan */
        padding: 0 !important;
        width: 100% !important;
    }

    /* 2. RESTAURAR LOS MONOLITOS (TARJETAS ALTAS) */
    .mineral-card,
    .mineral-box,
    .mineral-section .mineral-grid .mineral-box {
        position: relative !important;
        /* Necesario para los hijos absolutos */
        display: block !important;
        /* Cancela flexbox */
        width: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        box-sizing: border-box !important;
        min-height: auto !important;
        height: auto !important;
    }

    /* Alturas Skyline (Versión Móvil ligeramente escalada) */
    .mineral-card:nth-child(1),
    .mineral-card:nth-child(3),
    .mineral-box:nth-child(1),
    .mineral-box:nth-child(3),
    .mineral-section .mineral-grid .mineral-box:nth-child(1),
    .mineral-section .mineral-grid .mineral-box:nth-child(3) {
        height: 550px !important;
    }

    .mineral-card:nth-child(2),
    .mineral-card:nth-child(4),
    .mineral-box:nth-child(2),
    .mineral-box:nth-child(4),
    .mineral-section .mineral-grid .mineral-box:nth-child(2),
    .mineral-section .mineral-grid .mineral-box:nth-child(4) {
        height: 480px !important;
    }

    /* 3. POSICIONAMIENTO QUIRÚRGICO (SEPARAR ICONO Y TEXTO) */
    /* Liberar los hijos directos del Wrapper Content para Anclaje Físico */
    .mineral-section .mineral-grid .mineral-box .mineral-content {
        position: static !important;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Ícono/Emoji arriba */
    .mineral-card i,
    .mineral-card .card-icon,
    .mineral-card img,
    .mineral-box i,
    .mineral-content i,
    .mineral-section .mineral-grid .mineral-box i {
        position: absolute !important;
        top: 8% !important;
        /* Anclado arriba */
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        font-size: 1.5rem !important;
        z-index: 5 !important;
    }

    /* Texto vertical abajo */
    .mineral-card h3,
    .mineral-card .card-title,
    .mineral-box h3,
    .mineral-content h3,
    .mineral-section .mineral-grid .mineral-box h3 {
        position: absolute !important;
        bottom: 15% !important;
        /* Anclado abajo */
        left: 50% !important;
        /* Gira el texto y centra su punto de anclaje */
        transform: translateX(-50%) rotate(180deg) !important;
        writing-mode: vertical-rl !important;
        margin: 0 !important;
        font-size: 0.85rem !important;
        /* Letra fina para que quepa */
        letter-spacing: 3px !important;
        white-space: nowrap !important;
        text-align: center !important;
        z-index: 5 !important;
        width: auto !important;
        top: auto !important;
    }

    /* 4. CASOS DE ÉXITO Y FOOTER */
    .testimonio-card {
        width: 280px !important;
        /* Tarjetas más pequeñas para la pantalla */
        padding: 25px 20px !important;
    }

    .testimonio-quote {
        font-size: 0.95rem !important;
    }

    /* 3. FOOTER FULL CENTRADO FORZADO */
    footer {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    footer>div,
    footer .row,
    footer .container,
    footer [style*="display: flex"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 30px !important;
        text-align: center !important;
    }

    footer div,
    footer p,
    footer ul,
    footer li,
    footer h4,
    footer h3 {
        text-align: center !important;
        align-items: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        justify-content: center !important;
    }

    footer ul {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        gap: 15px !important;
    }

    .social-links {
        justify-content: center !important;
        display: flex !important;
    }

    /* FRANCOTIRADOR PARA MODALES REBELDES (FASE 3.5) */
    /* 1. Destrucción de Columnas (Reemplazando Grids/Flex horizontales de los 3 Modales) */
    #modal-marketing .universal-pane-full>div[style*="display: flex"],
    #modal-marketing .universal-pane-full>div[style*="display:flex"],
    #modal-marketing .universal-pane-full>div[style*="grid"],
    #modal-visibility .universal-pane-full>div[style*="display: flex"],
    #modal-visibility .universal-pane-full>div[style*="grid"],
    #modal-processes .universal-pane-full>div[style*="display: flex"],
    #modal-processes .universal-pane-full>div[style*="display:flex"],
    #modal-processes .universal-pane-full>div[style*="grid"],
    #modal-marketing .gallery-scroll,
    #modal-visibility .gallery-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        height: auto !important;
        gap: 25px !important;
    }

    /* 2. FIX ESPECÍFICO PARA GRÁFICAS DE VISIBILIDAD/MARKETING */
    /* Captura el gráfico de barras flex-end de Visibilidad para evitar desbordes */
    .universal-pane-full>div[style*="align-items: flex-end"] {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        /* Permite deslizar con el dedo si es muy ancha */
        padding: 5px !important;
        display: flex !important;
        flex-direction: row !important;
        /* Mantener la gráfica horizontal, pero scrolleable */
    }

    /* 3. FIX ESPECÍFICO PARA GALERÍAS Y MAGIC CARDS (MARKETING) */
    /* Fuerza a que las imágenes/cards bajen una a una */
    .gallery-scroll .ad-card,
    #modal-marketing .magic-card {
        width: 100% !important;
        max-width: 320px !important;
        height: 350px !important;
        margin-bottom: 15px !important;
        display: block !important;
        flex: none !important;
    }

    /* FRANCOTIRADOR FASE 4 (SCROLL NATIVO Y UI DE CHAT) */
    /* 1. SCROLLBAR VISIBLE Y FLUIDO PARA TODOS LOS PANELES */
    .universal-pane-full,
    .luxury-ipad-pro,
    .ipad-screen {
        max-height: 85vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        /* Scroll fluido en iOS */
        padding-bottom: 30px !important;
        /* Espacio extra al final */
    }

    /* Diseñar la barra de scroll para que sea evidente en móvil */
    .universal-pane-full::-webkit-scrollbar,
    .luxury-ipad-pro::-webkit-scrollbar,
    .ipad-screen::-webkit-scrollbar {
        width: 6px !important;
    }

    .universal-pane-full::-webkit-scrollbar-track,
    .luxury-ipad-pro::-webkit-scrollbar-track,
    .ipad-screen::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.5) !important;
        border-radius: 10px !important;
    }

    .universal-pane-full::-webkit-scrollbar-thumb,
    .luxury-ipad-pro::-webkit-scrollbar-thumb,
    .ipad-screen::-webkit-scrollbar-thumb {
        background: #d4af37 !important;
        /* Barra dorada/cobre */
        border-radius: 10px !important;
    }

    /* 2. REESTRUCTURACIÓN DEL CHAT (VISIBILIDAD) */
    /* Aseguramos que el contenedor general del chat tenga altura */
    #pane-data-visibility {
        height: 550px !important;
        max-height: 75vh !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
    }

    /* Comprimir el Header del Chat */
    #modal-visibility #pane-data-visibility>div:nth-of-type(1) {
        padding: 10px 15px !important;
        flex-shrink: 0 !important;
        /* Evita que se aplaste */
        min-height: auto !important;
        flex-direction: row !important;
        /* Recuperado de Fase 3.5 */
        align-items: center !important;
        justify-content: space-between !important;
    }

    #modal-visibility #pane-data-visibility>div:nth-of-type(1) h3 {
        margin: 0 !important;
        font-size: 1rem !important;
        text-align: left !important;
    }

    #modal-visibility #pane-data-visibility>div:nth-of-type(1) span {
        margin: 0 !important;
    }

    /* Expandir la Zona de Mensajes */
    #modal-visibility #chat-feed-visibility {
        flex-grow: 1 !important;
        /* Absorbe todo el espacio disponible */
        overflow-y: auto !important;
        padding: 15px !important;
        height: auto !important;
    }

    /* Comprimir la Barra de Escribir (Input) */
    #modal-visibility #pane-data-visibility>div:nth-of-type(3) {
        padding: 10px 15px !important;
        flex-shrink: 0 !important;
        min-height: auto !important;
        gap: 10px !important;
        flex-direction: row !important;
        /* Recuperado de Fase 3.5 */
        align-items: center !important;
    }

    #modal-visibility #chat-input-visibility {
        padding: 10px 15px !important;
        font-size: 0.9rem !important;
        flex: 1 !important;
        width: auto !important;
    }

    #modal-visibility #pane-data-visibility button {
        width: 45px !important;
        height: 45px !important;
        border-radius: 50% !important;
        flex: none !important;
        padding: 0 !important;
    }

    /* FRANCOTIRADOR FASE 5 (ESTRUCTURA INTERNA Y VISIBILIDAD) */

    /* 1. SCROLLBAR SUTIL (Gris Oscuro) */
    .universal-pane-full::-webkit-scrollbar-thumb,
    .luxury-ipad-pro::-webkit-scrollbar-thumb,
    .ipad-screen::-webkit-scrollbar-thumb {
        background: #333333 !important;
        /* Gris oscuro sutil */
    }

    /* 2. FIX DEL BUG DE FONDO TRANSPARENTE (Paneles superpuestos) */
    /* Asegura que el panel activo tenga fondo sólido y cubra a los demás */
    .universal-pane-full,
    .universal-pane-full.active {
        background-color: #000000 !important;
        /* Fondo negro sólido */
        z-index: 10 !important;
    }

    /* 3. LEY DE GRAVEDAD UNIVERSAL (Arregla títulos cortados) */
    /* Fuerza a los contenidos a alinearse desde arriba, evitando que se salgan cuando hay scroll */
    .universal-pane-full[style*="display: flex"],
    .universal-pane-full[style*="display:flex"] {
        justify-content: flex-start !important;
        padding-top: 40px !important;
        /* Un pequeño respiro superior */
    }

    /* Resetea márgenes negativos que puedan estar subiendo los títulos y evita que se aplasten */
    .universal-pane-full h2,
    .universal-pane-full h3,
    .universal-pane-full p {
        margin-top: 0 !important;
        flex-shrink: 0 !important;
        /* Evita que se aplasten */
    }

    /* 4. RESCATE DEL BOTÓN DE CHAT (Visibilidad) */
    /* Evita que el botón de chat caiga a una segunda fila */
    #modal-visibility #pane-data-visibility>div:nth-of-type(3) {
        flex-wrap: nowrap !important;
    }

    #modal-visibility #pane-data-visibility>div:nth-of-type(3) input {
        flex-grow: 1 !important;
        width: auto !important;
    }

    #modal-visibility #pane-data-visibility>div:nth-of-type(3) button {
        flex-shrink: 0 !important;
        /* El botón NO se puede encoger */
        width: 45px !important;
        margin: 0 !important;
    }

    /* FRANCOTIRADOR FASE 6 (TABS, SCROLL LIBRE Y SUPABASE) */

    /* 1. RESURRECCIÓN DE CONTENIDO MÓVIL (ROLLBACK QUIRÚRGICO) */
    /* Restaurar el comportamiento de columna base a los paneles visualizados */
    .universal-pane-full[style*="display: flex"],
    .universal-pane-full[style*="display:flex"] {
        display: flex !important;
        flex-direction: column !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10 !important;
    }

    /* 2. FIX QUIRÚRGICO DEL CHAT Y PESTAÑAS (SIGUIENDO INSTRUCCIÓN) */
    /* En lugar de ocultar todo por defecto, solo ocultamos radicalmente lo que el JS manda a ocultar */
    .universal-pane-full[style*="display: none"],
    .universal-pane-full[style*="display:none"],
    #pane-data-visibility[style*="display: none"] {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        z-index: -1 !important;
    }

    /* 2. LIBERACIÓN DEL SCROLL (MARKETING - VARIANTES VISUALES) */
    /* Permite que el panel completo scrollee, arrastrando el título con él */
    #pane-gallery-marketing {
        overflow-y: auto !important;
        max-height: 80vh !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #pane-gallery-marketing .gallery-scroll {
        overflow-y: visible !important;
        max-height: none !important;
        height: auto !important;
    }

    /* 3. FIX DE LA TABLA HORIZONTAL (PROCESOS - SUPABASE) */
    /* Envuelve la tabla en un contenedor deslizable horizontalmente */
    #modal-processes table {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        border: 1px solid rgba(46, 204, 113, 0.3) !important;
    }

    /* ========================================================= */
    /* TRANSICIÓN APP NATIVA: Eliminación de Simulación iPad     */
    /* ========================================================= */

    /* 1. Resetear el Envoltorio Principal (Wrapper) */
    .ipad-wrapper-v2 {
        display: block !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    /* Ocultar botones físicos simulados de hardware del iPad */
    .hw-btn,
    .power-btn,
    .volume-rocker,
    .vol-btn {
        display: none !important;
    }

    /* 2. Reposicionar Botón de Cierre (✕ CERRAR) Seguro dentro de pantalla */
    .ipad-wrapper-v2>div[onclick^="close"] {
        top: 15px !important;
        right: 15px !important;
        background: rgba(0, 0, 0, 0.7) !important;
        padding: 8px 15px !important;
        border-radius: 20px !important;
        font-size: 14px !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        z-index: 2147483647 !important;
    }

    /* 3. Chasis del iPad (Luxury Pro) destrozado a límites nativos */
    .luxury-ipad-pro {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        display: block !important;
        background: #000 !important;
    }

    /* 4. Pantalla del iPad (Contenedor Interno) a Scroll Cúbico */
    .ipad-screen {
        border: none !important;
        border-radius: 0 !important;
        width: 100% !important;
        height: 100% !important;
        flex-direction: column !important;
        /* Stack Mobile */
        overflow-y: auto !important;
        /* SCROLL INFINITO HABILITADO */
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 60px !important;
        /* Safe area bottom 60px para el flujo visual */
    }

    /* 5. Sidebar reubicado a un Fixed/Sticky Nav Top Bar */
    .ipad-sidebar {
        width: 100% !important;
        height: auto !important;
        flex-direction: row !important;
        /* Botonera Horizontal */
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 55px 15px 15px 15px !important;
        /* Espacio superior vital para el botón cerrar y status bar */
        justify-content: flex-start !important;
        gap: 25px !important;
        background: rgba(10, 10, 10, 0.95) !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
        overflow-x: auto !important;
        /* Scroll horizontal de tabs si hay muchos */
    }

    #marketing-stack,
    #processes-stack,
    #visibility-stack,
    #atencion-stack {
        height: auto !important;
        min-height: 100% !important;
        overflow: visible !important;
        padding-bottom: 30px !important;
    }

    /* Quitar absolutismo a los paneles hijos para respetar overflow en padre */
    .universal-pane-full[style*="display: flex"],
    .universal-pane-full[style*="display:flex"] {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
    }

    /* ========================================================= */
    /* TRANSICIÓN APP NATIVA (FASE 2): DIMENSIONES Y FLUJO       */
    /* ========================================================= */

    /* 1. Eliminación de Alturas Fijas en Paneles */
    .universal-pane-full {
        height: auto !important;
        max-height: none !important;
    }

    /* 2. Espaciado de Métricas (Grillas a Columnas) */
    .universal-pane-full div[style*="display:grid"],
    .universal-pane-full div[style*="display: grid"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        margin-bottom: 30px !important;
    }

    .universal-pane-full div[style*="display:grid"]>div,
    .universal-pane-full div[style*="display: grid"]>div {
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 25px !important;
    }

    /* 3. Visibilidad de Títulos */
    .universal-pane-full h2 {
        padding-top: 40px !important;
        margin-top: 0 !important;
        margin-bottom: 20px !important;
        text-align: center !important;
        position: relative !important;
        z-index: 5 !important;
    }

    /* 4. Flujo de Bloques Independientes (Prohibición Absoluta) */
    .universal-pane-full>div {
        position: relative !important;
        /* Adiós a los absolutos huérfanos */
        display: block;
        /* Stack orgánico */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 25px !important;
        /* Aire entre cada elemento de la App */
    }

    /* 4.5. Destrucción explícita de Absolutos en internos */
    .universal-pane-full div {
        position: relative !important;
    }

    /* Restaurar estático/fijo para el chat feed dentro del modal, si aplica */
    #chat-feed-visibility {
        position: relative !important;
    }

    /* Apilamos contenedores Flex en Marketing (Magic Studio) */
    #pane-magic-marketing>div[style*="display:flex"] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 30px !important;
    }

    /* Apilamos contenedores Flex en Arquitecto (Cerebro) */
    #pane-brain-marketing>div[style*="display: flex"],
    #pane-home-processes>div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: center !important;
        height: auto !important;
        /* Desbloquear altura fija que pueda tener la arquitectura */
    }

    /* 5. Barra de Navegación Lateral (Top nav más limpio) */
    .ipad-sidebar {
        gap: 40px !important;
        /* Más espacio para no clickear mal */
        justify-content: center !important;
        padding-top: 60px !important;
        /* Safe area superior del cel */
        padding-bottom: 15px !important;
    }

    .ipad-sidebar .nav-icon {
        font-size: 1.1rem !important;
        /* Más pequeños */
        width: 38px !important;
        height: 38px !important;
    }

    /* 6. Desbloqueo Genérico de Altura (Directriz Directa) */
    .modal-content,
    .ipad-frame,
    .modal-body {
        height: auto !important;
        max-height: none !important;
        padding-bottom: 60px !important;
    }

    /* ========================================================= */
    /* FASE 3: OPTIMIZACIÓN DE CHAT Y AMPLITUD (PRO MAX)         */
    /* ========================================================= */

    /* 7. Bloqueo de Vista para Interfaces de Chat (Visibilidad/Atención) */
    /* Solo aplicaremos la asfixia de scroll global si el chat está activo */
    .ipad-screen:has(#pane-data-visibility[style*="display: flex"]),
    .ipad-screen:has(#pane-data-visibility[style*="display:flex"]),
    .ipad-screen:has(#pane-chat-atencion[style*="display: flex"]),
    .ipad-screen:has(#pane-chat-atencion[style*="display:flex"]) {
        height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
        padding-bottom: 0 !important;
        /* El input tomará su espacio al fondo */
    }

    /* Aseguramos que los stacks obedezcan el límite de 100vh */
    #visibility-stack:has(#pane-data-visibility.active),
    #visibility-stack:has(#pane-data-visibility.active),
    #atencion-stack:has(#pane-chat-atencion.active),
    #atencion-stack:has(#pane-chat-atencion.active) {
        height: 100% !important;
        flex: 1 !important;
        overflow: hidden !important;
        padding-bottom: 0 !important;
    }

    /* Estructurar el Chat a pantalla completa */
    #pane-data-visibility,
    #pane-chat-atencion {
        height: 100% !important;
        max-height: 100% !important;
        /* Removido `display: flex !important;` para permitir su ocultación real por JS */
        flex-direction: column !important;
        overflow: hidden !important;
        margin-bottom: 0 !important;
    }

    /* El input wrapper debe fijarse al fondo */
    #pane-data-visibility>div:last-child,
    #pane-chat-atencion>div:last-child {
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
    }

    /* FASE 6.3: ANIQUILACIÓN DE HERENCIA VERTICAL (Misión 1 - ABSOLUTA) */
    #modal-atencion .ipad-wrapper-v2,
    #modal-atencion .luxury-ipad-pro,
    #modal-atencion .ipad-screen,
    #atencion-stack,
    #pane-chat-atencion {
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        width: 100% !important;
    }

    #pane-chat-atencion {
        flex-direction: column !important;
        position: relative !important;
        padding-bottom: 90px !important;
        /* Espacio estricto base */
    }

    #chat-feed-atencion {
        flex-grow: 1 !important;
        height: calc(100% - 90px) !important;
        max-height: calc(100% - 90px) !important;
        overflow-y: auto !important;
        padding: 20px !important;
    }

    /* Anclaje Absoluto Sticky del Input Footer (Beso al Borde) */
    #pane-chat-atencion>div:last-child {
        position: absolute !important;
        bottom: 15px !important;
        left: 0 !important;
        width: 100% !important;
        display: flex !important;
        z-index: 999999 !important;
        height: 90px !important;
        padding: 0 25px !important;
        background: rgba(20, 5, 30, 0.95) !important;
        pointer-events: auto !important;
    }

    /* Rescate Chat Visibilidad */
    #chat-feed-visibility {
        flex-grow: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 0 !important;
    }

    #visibility-stack {
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* 8. Ajustes Finos iPhone 14 Pro Max / Pantallas Amplias */
    /* Destruir márgenes falsos del iPad Chassis original en celulares anchos */
    .luxury-ipad-pro {
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        width: 100vw !important;
        /* Fix de vacío de pantalla inferior */
        height: 100vh !important;
        height: 100dvh !important;
        /* Obligar amplitud máxima (borde a borde) */
        margin: 0 !important;
        max-width: none !important;
    }
}