
:root {
    --hims-primary: #19378F;
    --hims-primary-dark: #0B1D52;
    --hims-navy: #07183F;
    --hims-blue-mid: #2856C7;
    --hims-blue-bright: #3478FF;
    --hims-cyan: #00C8FF;
    --hims-success: #12B76A;
    --hims-warning: #F79009;
    --hims-error: #F04438;
    --hims-white: #FFFFFF;
    --hims-bg-soft: #F5F8FF;
    --hims-bg-light: #EEF4FF;
    --hims-border: #DCE5F5;
    --hims-border-dark: rgba(255, 255, 255, 0.1);
    --text-main: #101828;
    --text-sec: #667085;
    --text-light: rgba(255, 255, 255, 0.7);
    --max-width: 1280px;
    --pad-x: 80px;
    --pad-y: 50px;
    --gap-lg: 64px;
    --gap-md: 32px;
    --shadow-sm: 0 4px 12px rgba(25, 55, 143, 0.05);
    --shadow-md: 0 16px 32px rgba(25, 55, 143, 0.08);
    --shadow-lg: 0 24px 64px rgba(25, 55, 143, 0.12);
    --glow-primary: 0 0 40px rgba(25, 55, 143, 0.4);
    --glow-cyan: 0 0 20px rgba(0, 200, 255, 0.6);
    --rad-sm: 8px;
    --rad-md: 16px;
    --rad-lg: 24px;
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}


/* ==========================================================================
   GLOBAL VARIABLES (Aapke Root variables - Just for reference)
========================================================================== */
.bg-navy {
    background-color: var(--hims-navy);
    color: var(--hims-white);
}

/* ==========================================================================
   SECTION 01: CINEMATIC HIMS HERO (TOP SECTION)
========================================================================== */
.s01-hero-section {
    position: relative;
    /* Top me gap, bottom me gap kam kiya gaya hai taaki S02 natural lage */
    padding: 80px 0 40px;
    overflow: hidden;
}

/* BACKGROUND GRID (Subtle medical tech grid) */
.hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(var(--hims-border-dark) 1px, transparent 1px), linear-gradient(90deg, var(--hims-border-dark) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

/* RESPONSIVE GRID CONTAINER */
.l-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px; /* Mobile Side Padding */
    position: relative;
    z-index: 2;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr; /* Mobile 1 Column */
    gap: 40px;
    align-items: center;
}

/* TEXT CONTENT STYLING */
.s01-content {
    position: relative;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-cyan);
    background: rgba(0, 200, 255, 0.08);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(0, 200, 255, 0.2);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.h-hero {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.s01-hero-highlight {
    color: var(--hims-blue-bright);
    display: block;
    margin-top: 4px;
}

.t-lead {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-light);
    line-height: 1.6;
/*    max-width: 520px;*/
}

/* =========================================
   MODERN HIMS HERO SECTION
   ========================================= */

/* Base Section Styling */
.hims-hero-modern {
    background-color: #030b1c; /* Deep tech navy */
    background-image: radial-gradient(circle at 50% -20%, rgba(0, 210, 255, 0.1) 0%, transparent 50%), linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    padding: 100px 20px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #ffffff;
    overflow: hidden;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* --- LEFT CONTENT --- */
.hero-text-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #00d2ff;
    text-transform: uppercase;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: #00d2ff;
    border-radius: 50%;
    box-shadow: 0 0 8px #00d2ff;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    color: #ffffff;
}

.text-gradient {
    background: linear-gradient(90deg, #00d2ff, #2979ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 18px;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(90deg, #2979ff, #00d2ff);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 210, 255, 0.2);
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 25px rgba(0, 210, 255, 0.3);
    }

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.1);
    }

/* --- RIGHT VISUAL (GRID NETWORK) --- */
.hero-visual-content {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Draws the crosshair connecting lines behind the nodes */
.network-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: linear-gradient(to right, transparent 49.5%, rgba(0, 210, 255, 0.15) 49.5%, rgba(0, 210, 255, 0.15) 50.5%, transparent 50.5%), linear-gradient(to bottom, transparent 49.5%, rgba(0, 210, 255, 0.15) 49.5%, rgba(0, 210, 255, 0.15) 50.5%, transparent 50.5%);
    z-index: 0;
    pointer-events: none;
}

.network-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 30px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
}

/* Standard Nodes */
.network-node {
    background: rgba(10, 25, 55, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    white-space: nowrap; /* Prevents text breaking */
}

    .network-node:hover {
        background: rgba(15, 35, 75, 0.8);
        border-color: #00d2ff;
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 210, 255, 0.15);
    }

.node-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

    .node-indicator.green {
        background-color: #00e676;
        box-shadow: 0 0 8px #00e676;
    }

    .node-indicator.blue {
        background-color: #2979ff;
        box-shadow: 0 0 8px #2979ff;
    }

/* Center Core Node */
.network-core {
    background: #092147;
    border: 2px solid #00d2ff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.3), inset 0 0 20px rgba(0, 210, 255, 0.2);
    z-index: 2;
}

.core-text {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-align: center;
    z-index: 2;
}

/* Pulsing effect behind the core */
.core-pulse-ring {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #00d2ff;
    border-radius: 16px;
    animation: corePulse 2.5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
    z-index: 1;
}

@keyframes corePulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 42px;
    }

    .hero-container {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text-content {
        align-items: center;
    }

    .hero-description {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .network-grid {
        gap: 15px; /* Tighter grid on mobile */
    }

    .network-node {
        padding: 12px 8px;
        font-size: 11px; /* Slightly smaller text for mobile */
    }

    .core-text {
        font-size: 14px;
    }
}

/* ==========================================================================
   SECTION 02: SAAS METRICS (BOTTOM SECTION)
========================================================================== */
.s02-section {
    position: relative;
    /* Top padding kam kardi hai taaki S01 se natural flow bane */
    padding: 20px 0 60px;
    background-color: transparent; /* Changed to transparent so it blends with body/s01 background */
    z-index: 5;
}

    .s02-section::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        height: 100%;
        background: radial-gradient(ellipse at center, rgba(25, 55, 143, 0.2) 0%, transparent 70%);
        pointer-events: none;
        z-index: 0;
    }

.s02-heading-wrap {
    text-align: center;
    margin-bottom: 32px; /* Gap reduced for flow */
    position: relative;
    z-index: 2;
}

.h-sec {
    font-size: clamp(1.8rem, 5vw, 2.75rem);
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.5px;
}

    .h-sec::after {
        content: 'One Source of Truth.';
        display: block;
        color: transparent;
        background: linear-gradient(90deg, var(--hims-cyan), var(--hims-blue-bright));
        -webkit-background-clip: text;
        background-clip: text;
        font-weight: 800;
        margin-top: 8px;
    }

.twin-glass {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr; /* Mobile Default */
    gap: 16px; /* Gap thoda kam kiya for mobile */
    perspective: 1200px;
}

.twin-metric {
    position: relative;
    background: linear-gradient(145deg, rgb(18 31 67 / 86%), rgb(11 38 118));
    border: 1px solid rgba(25, 55, 143, 0.4);
    border-top: 1px solid rgba(0, 200, 255, 0.2);
    border-radius: var(--rad-lg);
    padding: 24px 16px; /* Mobile padding optimized */
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

    .twin-metric:hover {
        transform: translate3d(0, -8px, 20px) rotateX(4deg);
        border-top-color: var(--hims-cyan);
        border-bottom-color: var(--hims-primary);
        box-shadow: 0 20px 40px rgba(7, 24, 63, 0.8), 0 10px 20px rgba(25, 55, 143, 0.4), inset 0 0 20px rgba(0, 200, 255, 0.05);
    }

    .twin-metric .val {
        font-size: clamp(2rem, 6vw, 3.2rem);
        font-weight: 800;
        color: var(--hims-white);
        margin-bottom: 8px;
        letter-spacing: -1px;
        text-shadow: 0 4px 12px rgba(25, 55, 143, 0.6);
        transform: translateZ(20px);
    }

    .twin-metric .lbl {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-light);
        text-transform: uppercase;
        letter-spacing: 1.5px;
        transform: translateZ(10px);
    }

.s02-val-live {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--hims-success) !important;
    text-shadow: 0 0 15px rgba(18, 183, 106, 0.4) !important;
}

    .s02-val-live::before {
        content: '';
        display: block;
        width: 12px;
        height: 12px;
        background-color: var(--hims-success);
        border-radius: 50%;
        animation: livePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(18, 183, 106, 0.7);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(18, 183, 106, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(18, 183, 106, 0);
    }
}


/* ==========================================================================
   GLOBAL PAGE MEDIA QUERIES (Handling both sections together)
========================================================================== */

/* TABLET (iPad, etc) */
@media (min-width: 768px) {
    /* S01 Tablet */
    .s01-hero-section {
        padding: 100px 0 60px;
    }

    /* S02 Tablet */
    .s02-section {
        padding: 40px 0 80px;
    }

    .twin-glass {
        grid-template-columns: repeat(2, 1fr); /* 2x2 Grid */
        gap: 20px;
    }
}

/* DESKTOP (Laptops & Monitors) */
@media (min-width: 992px) {
    /* S01 Desktop */
    .s01-hero-section {
        padding: var(--pad-y) 0 80px;
    }
    /* Bottom padding reduced for flow */
    .l-container {
        padding: 0 var(--pad-x);
    }

    .grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: var(--gap-lg);
    }

    .s01-visual-container {
        margin-top: 0;
    }

    /* S02 Desktop */
    .s02-section {
        padding: 40px 0 var(--pad-y);
    }

    .s02-heading-wrap {
        margin-bottom: 64px;
    }

    .twin-glass {
        grid-template-columns: repeat(4, 1fr); /* 4 Columns */
        gap: 24px;
    }

    .twin-metric {
        padding: 40px 24px;
    }

    /* Staggered layout effect for desktop */
    .twin-glass .twin-metric:nth-child(even) {
        transform: translate3d(0, 20px, 0);
    }

        .twin-glass .twin-metric:nth-child(even):hover {
            transform: translate3d(0, 8px, 30px) rotateX(4deg);
        }
}
/*==========================================================================
   SECTION 03: THE DIGITAL EXPERIENCE (PATIENT JOURNEY)
   THEME: CLINICAL LIGHT (Glassmorphism on White/Soft Blue)
========================================================================== */

/* Light Theme Variables & Background */
.bg-white {
    /* Uses your root soft background for a premium clinical feel */
    background-color: var(--hims-bg-soft);
    color: var(--text-main);
}

.s03-section {
    position: relative;
    padding: 80px 0; /* Natural flow from the previous section */
    overflow: hidden;
    z-index: 5;
}

/* HEADING WRAPPER */
.s03-heading-wrap {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

    .s03-heading-wrap .eyebrow {
        display: inline-flex;
        align-items: center;
        color: var(--hims-blue-bright);
        background: rgba(52, 120, 255, 0.1); /* Soft blue pill */
        padding: 6px 16px;
        border-radius: 30px;
        border: 1px solid rgba(52, 120, 255, 0.2);
        font-size: 0.85rem;
        font-weight: 700;
        letter-spacing: 2px;
        margin-bottom: 20px;
        text-transform: uppercase;
    }

    .s03-heading-wrap .h-sec {
        font-size: clamp(2rem, 4.5vw, 3rem);
        line-height: 1.2;
        font-weight: 800;
        color: var(--hims-primary-dark);
        margin-bottom: 16px;
        letter-spacing: -0.5px;
    }

.s03-lead {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-sec);
    line-height: 1.6;
}

/* =========================================
   JOURNEY TRACK (MOBILE-FIRST VERTICAL)
========================================= */
.journey-track {
    position: relative;
    display: grid;
    grid-template-columns: 1fr; /* 1 Column for Mobile */
    gap: 24px;
    padding: 0 20px;
    max-width: 500px;
    margin: 0 auto;
    /* Initiates CSS Counter for 3D Watermarks */
    counter-reset: journey-step;
}

    /* THE DATA CONNECTION LINE (Vertical for Mobile) */
    .journey-track::before {
        content: '';
        position: absolute;
        top: 40px;
        bottom: 40px;
        left: 56px; /* Aligned with the center of the icons */
        width: 4px;
        background: rgba(25, 55, 143, 0.1);
        border-radius: 4px;
        z-index: 0;
    }

    /* THE ANIMATED DATA PARTICLE (Shows data flowing) */
    .journey-track::after {
        content: '';
        position: absolute;
        top: 40px;
        left: 56px;
        width: 4px;
        height: 120px;
        background: linear-gradient(to bottom, transparent, var(--hims-blue-bright), var(--hims-cyan));
        border-radius: 4px;
        z-index: 1;
        will-change: transform;
        animation: flowDataVertical 5s linear infinite;
    }

/* =========================================
   JOURNEY STEP CARDS (The 3D White Cards)
========================================= */
.j-step {
    position: relative;
    background: var(--hims-white);
    border-radius: var(--rad-lg);
    padding: 32px 24px 24px;
    box-shadow: 0 12px 24px rgba(25, 55, 143, 0.04);
    border: 1px solid var(--hims-border);
    z-index: 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Hardware acceleration for hover */
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
    /* Increments counter for watermark */
    counter-increment: journey-step;
}

    /* PREMIUM 3D WATERMARK NUMBER (01, 02, etc.) */
    .j-step::before {
        content: "0" counter(journey-step);
        position: absolute;
        top: -15px;
        right: -10px;
        font-size: 8rem;
        font-weight: 900;
        color: var(--hims-bg-soft); /* Very faint background color */
        opacity: 0.7;
        z-index: 0;
        pointer-events: none;
        transition: all 0.5s ease;
        letter-spacing: -5px;
    }

    /* 3D HOVER EFFECT */
    .j-step:hover {
        transform: translate3d(0, -10px, 20px);
        box-shadow: 0 24px 48px rgba(25, 55, 143, 0.1);
        border-color: var(--hims-cyan);
    }

        .j-step:hover::before {
            color: rgba(0, 200, 255, 0.05); /* Watermark turns slight cyan on hover */
            transform: scale(1.05) translate3d(-10px, 10px, 0);
        }

/* =========================================
   CARD CONTENTS
========================================= */
.j-icon {
    position: relative;
    z-index: 2;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hims-blue-bright), var(--hims-primary));
    color: var(--hims-white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
    box-shadow: 0 8px 16px rgba(52, 120, 255, 0.25);
}

.j-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--hims-primary-dark);
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    letter-spacing: -0.5px;
}

.j-desc {
    font-size: 0.95rem;
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    flex-grow: 1; /* Pushes the list to the bottom evenly */
}

/* FEATURES LIST */
.j-features {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
    border-top: 1px dashed var(--hims-border);
    padding-top: 20px;
}

    .j-features li {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-main);
        margin-bottom: 12px;
    }

        /* Highlight the checkmarks in Green */
        .j-features li i {
            color: var(--hims-success);
            font-size: 1.1rem;
            text-shadow: 0 0 8px rgba(18, 183, 106, 0.4); /* Subtle glowing checkmark */
        }


@keyframes flowDataVertical {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(800px);
        opacity: 0;
    }
}

@keyframes flowDataHorizontal {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateX(1200px);
        opacity: 0;
    }
    /* Shoots across desktop screen */
}


@media (min-width: 1024px) {
    .s03-section {
        padding: var(--pad-y) 0;
    }

    .journey-track {
        max-width: var(--max-width);
        grid-template-columns: repeat(5, 1fr); /* 5 Cards in one straight row */
        gap: 20px;
        padding: 40px 24px 0;
    }

        /* Transform the vertical line into a HORIZONTAL connection line */
        .journey-track::before {
            top: 72px; /* Centers line behind the 64px icons (40px pad + 32px half icon) */
            left: 24px;
            right: 24px;
            width: auto;
            height: 4px;
            background: linear-gradient(90deg, transparent, rgba(25,55,143,0.15) 10%, rgba(25,55,143,0.15) 90%, transparent);
        }

        /* Transform the data particle into a horizontal shooting beam */
        .journey-track::after {
            top: 72px;
            left: 0;
            width: 150px;
            height: 4px;
            background: linear-gradient(90deg, transparent, var(--hims-blue-bright), var(--hims-cyan));
            animation: flowDataHorizontal 4s linear infinite;
        }

    /* Refine card padding for desktop */
    .j-step {
        padding: 32px 20px 24px;
    }

        /* Custom hover effect for desktop - Cards pop UP and OUT */
        .j-step:hover {
            transform: translate3d(0, -15px, 30px);
        }
}
/*==========================================================================
   SECTION 04: INTELLIGENT OPD COMMAND CENTER (PROFESSIONAL CSS)
========================================================================== */

.bg-soft {
    background-color: var(--hims-bg-soft);
}

.s04-section {
    position: relative;
    padding: 60px 0 90px;
    overflow: hidden;
    z-index: 5;
}

/* RESPONSIVE GRID (Mobile First) */
.s04-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
    max-width: 100%; /* Ensure grid doesn't exceed screen */
}

/* =========================================
   LEFT SIDE: CONTENT & FEATURES
========================================= */
.s04-left {
    padding-right: 0;
    max-width: 100%;
}

.s04-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-primary);
    background: rgba(25, 55, 143, 0.08);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(25, 55, 143, 0.15);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.s04-title {
    font-size: clamp(1.8rem, 5vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.s04-lead {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* FEATURE LIST */
.s04-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s04-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border-radius: var(--rad-md);
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    box-shadow: 0 2px 8px rgba(25, 55, 143, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .s04-feature-item:hover {
        transform: translateX(4px);
        box-shadow: var(--shadow-sm);
        border-color: rgba(52, 120, 255, 0.3);
    }

.s04-feature-icon {
    color: var(--hims-blue-bright);
    background: rgba(52, 120, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.s04-feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: block;
    margin-bottom: 2px;
}

.s04-feature-desc {
    font-size: 0.85rem;
    color: var(--text-sec);
    line-height: 1.5;
}

/* BENEFIT BOX */
.s04-benefit-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--hims-white);
    padding: 16px 20px;
    border-radius: var(--rad-md);
    border: 1px solid var(--hims-border);
    border-left: 4px solid var(--hims-success);
    box-shadow: var(--shadow-sm);
}

.s04-benefit-icon-wrap {
    width: 40px;
    height: 40px;
    background: rgba(18, 183, 106, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.s04-benefit-icon {
    font-size: 20px;
    color: var(--hims-success);
}

.s04-benefit-text {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
}

/* =========================================
   RIGHT SIDE: SAAS DASHBOARD UI
========================================= */
.s04-right {
    position: relative;
    width: 100%;
    max-width: 100%; /* Prevent overflow */
}

.s04-dashboard {
    background: var(--hims-white);
    border-radius: 16px;
    border: 1px solid rgba(25, 55, 143, 0.15);
    box-shadow: 0 20px 40px -10px rgba(25, 55, 143, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    max-width: 100%; /* Force dashboard to stay inside screen */
}

/* MOBILE BOTTOM APP NAVIGATION */
.s04-sidebar {
    width: 100%;
    height: 56px;
    background: var(--hims-navy);
    padding: 0 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    order: 2;
}

.s04-main-content {
    order: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #FAFCFF;
    min-width: 0; /* CRITICAL FIX: Stops flex child from expanding screen */
    width: 100%;
}

.s04-sidebar-icon-active {
    width: 32px;
    height: 32px;
    background: var(--hims-cyan);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--hims-navy);
    font-size: 16px;
    box-shadow: 0 0 10px rgba(0,200,255,0.4);
}

.s04-sidebar-icon-soft, .s04-sidebar-icon-dim {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.s04-sidebar-icon-soft {
    background: rgba(255,255,255,0.1);
    color: var(--hims-white);
}

.s04-sidebar-icon-dim {
    color: rgba(255,255,255,0.4);
}

/* DASHBOARD HEADER */
.s04-header {
    padding: 14px 20px;
    background: var(--hims-white);
    border-bottom: 1px solid var(--hims-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.s04-header-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.s04-header-date {
    font-size: 0.7rem;
    color: var(--text-sec);
    font-weight: 500;
}

.s04-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(52, 120, 255, 0.1);
    border: 1px solid var(--hims-blue-bright);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    color: var(--hims-blue-bright);
    font-weight: 800;
}

.s04-content-area {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0; /* CRITICAL FIX */
    width: 100%;
    box-sizing: border-box;
}

/* KPI CARDS */
.s04-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px; /* Reduced gap for mobile */
}

.s04-kpi-card:last-child {
    grid-column: span 2;
}

.s04-kpi-card {
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    border-radius: 10px;
    padding: 10px 14px; /* Reduced padding for mobile */
    box-shadow: 0 2px 8px rgba(25, 55, 143, 0.02);
    min-width: 0;
}

.s04-kpi-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-sec);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s04-kpi-value-primary, .s04-kpi-value-wait, .s04-kpi-value-dark {
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.s04-kpi-value-primary {
    color: var(--hims-primary);
}

.s04-kpi-trend-down {
    font-size: 0.65rem;
    color: var(--hims-success);
    background: rgba(18,183,106,0.1);
    padding: 2px 6px;
    border-radius: 100px;
    display: flex;
    align-items: center;
}

.s04-kpi-sub {
    font-size: 0.85rem;
    color: var(--text-sec);
}

/* LIVE QUEUE TABLE */
.s04-queue-table {
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    border-radius: 10px;
    width: 100%;
    overflow-x: auto; /* Allow internal scrolling instead of expanding screen */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on mobile */
    box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.05);
}

/* CRITICAL FIX: Changed min-width from 400px to 340px for mobile */
.s04-table-header, .s04-table-row, .s04-table-row-last {
    display: flex;
    align-items: center;
    min-width: 340px;
    width: 100%;
}

.s04-table-header {
    background: var(--hims-bg-light);
    padding: 10px 14px;
    border-bottom: 1px solid var(--hims-border);
}

.s04-table-row, .s04-table-row-last {
    padding: 10px 14px;
    border-bottom: 1px solid var(--hims-border);
}

.s04-th-token {
    width: 20%;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-sec);
    text-transform: uppercase;
}

.s04-th-name {
    width: 35%;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-sec);
    text-transform: uppercase;
}

.s04-th-doctor {
    width: 25%;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-sec);
    text-transform: uppercase;
}

.s04-th-status {
    width: 20%;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-sec);
    text-transform: uppercase;
    text-align: right;
}

.s04-td-token {
    width: 20%;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-sec);
}

.s04-td-name {
    width: 35%;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.s04-td-doctor {
    width: 25%;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-sec);
}

.s04-td-status {
    width: 20%;
    text-align: right;
}

.s04-badge-consulting, .s04-badge-waiting, .s04-badge-vitals {
    padding: 4px 6px;
    border-radius: 100px;
    font-size: 0.6rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.s04-badge-consulting {
    background: rgba(52, 120, 255, 0.1);
    color: var(--hims-blue-bright);
}

.s04-badge-waiting {
    background: rgba(247, 144, 9, 0.1);
    color: var(--hims-warning);
}

.s04-badge-vitals {
    background: rgba(18, 183, 106, 0.1);
    color: var(--hims-success);
}

.s04-badge-dot {
    width: 5px;
    height: 5px;
    background: var(--hims-blue-bright);
    border-radius: 50%;
    animation: pulseOpacity 1.5s infinite;
}

@keyframes pulseOpacity {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* FLOATING AI PREDICTION CARD */
.s04-ai-card {
    position: relative;
    margin: -20px auto 0;
    background: rgba(7, 24, 63, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 200, 255, 0.4);
    border-radius: 14px;
    padding: 16px 20px;
    width: 90%;
    max-width: 320px; /* Cap width for larger phones */
    box-shadow: 0 15px 30px rgba(7, 24, 63, 0.3), inset 0 0 15px rgba(0, 200, 255, 0.1);
    z-index: 10;
    animation: floatAiCardMobile 6s ease-in-out infinite;
}

.s04-ai-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.s04-ai-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 200, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-cyan);
    font-size: 14px;
}

.s04-ai-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--hims-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.s04-ai-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

@keyframes floatAiCardMobile {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* =========================================
   DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 1024px) {
    .s04-section {
        padding: var(--pad-y) 0;
    }

    .s04-grid {
        grid-template-columns: 0.85fr 1.15fr;
        gap: 60px;
    }

    .s04-left {
        padding-right: 20px;
    }

    .s04-dashboard {
        flex-direction: row;
        height: 540px;
    }

    .s04-sidebar {
        width: 72px;
        height: 100%;
        padding: 24px 0;
        flex-direction: column;
        justify-content: flex-start;
        gap: 24px;
        order: 1;
    }

    .s04-main-content {
        order: 2;
    }

    .s04-sidebar-icon-active, .s04-sidebar-icon-soft, .s04-sidebar-icon-dim {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .s04-header {
        padding: 16px 32px;
    }

    .s04-header-title {
        font-size: 1rem;
    }

    .s04-header-date {
        font-size: 0.75rem;
    }

    .s04-avatar {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .s04-content-area {
        padding: 28px;
        gap: 20px;
    }

    /* KPI Desktop Reset */
    .s04-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .s04-kpi-card:last-child {
        grid-column: span 1;
    }

    .s04-kpi-card {
        padding: 18px 20px;
    }

    .s04-kpi-label {
        font-size: 0.75rem;
    }

    .s04-kpi-value-primary, .s04-kpi-value-wait, .s04-kpi-value-dark {
        font-size: 1.75rem;
    }

    /* Table Desktop Reset */
    .s04-table-header, .s04-table-row, .s04-table-row-last {
        min-width: 400px; /* Reset for desktop */
    }

    .s04-table-header {
        padding: 12px 24px;
    }

    .s04-table-row, .s04-table-row-last {
        padding: 14px 24px;
    }

        .s04-table-row:hover, .s04-table-row-last:hover {
            background-color: #F4F8FF;
        }

    .s04-th-token, .s04-th-name, .s04-th-doctor, .s04-th-status {
        font-size: 0.75rem;
    }

    .s04-td-token, .s04-td-doctor {
        font-size: 0.85rem;
    }

    .s04-td-name {
        font-size: 0.95rem;
    }

    /* Desktop Floating AI Card Position */
    .s04-ai-card {
        position: absolute;
        margin: 0;
        bottom: 40px;
        left: auto;
        right: -30px;
        width: 300px;
        padding: 20px;
        animation: floatAiCardDesktop 6s ease-in-out infinite;
    }

    @keyframes floatAiCardDesktop {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-15px);
        }
    }
}
/*==========================================================================
   SECTION 05: CONNECTED IPD (BED MANAGEMENT)
   THEME: CLEAN LIGHT SAAS (ALTERNATING LAYOUT)
========================================================================== */

.bg-white {
    background-color: var(--hims-white);
}

.s05-section {
    position: relative;
    padding: 60px 0 80px;
    overflow: hidden;
    z-index: 5;
}

/* =========================================
   MOBILE-FIRST GRID & TEXT CONTENT
========================================= */
.s05-grid {
    display: flex;
    flex-direction: column; /* Stack vertically on mobile */
    gap: 48px;
}

/* On mobile, bring the Text to the top for better UX */
.s05-right {
    order: 1;
    padding: 0;
}

.s05-left {
    order: 2;
    position: relative;
    width: 100%;
}

.s05-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-blue-bright);
    background: rgba(52, 120, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(52, 120, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.s05-title {
    font-size: clamp(1.8rem, 6vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.s05-lead {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* FEATURES LIST */
.s05-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s05-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--rad-md);
    background: var(--hims-bg-soft);
    border: 1px solid var(--hims-border);
    transition: all 0.3s ease;
}

    .s05-feature-item:hover {
        background: var(--hims-white);
        box-shadow: var(--shadow-sm);
        transform: translateX(5px);
    }

.s05-feature-icon {
    color: var(--hims-primary);
    background: rgba(25, 55, 143, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.s05-feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.s05-feature-desc {
    font-size: 0.85rem;
    color: var(--text-sec);
    line-height: 1.5;
}

/* BENEFIT BOX */
.s05-benefit-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--hims-white);
    padding: 16px;
    border-radius: var(--rad-md);
    border: 1px solid var(--hims-border);
    border-left: 4px solid var(--hims-blue-bright);
    box-shadow: var(--shadow-sm);
}

.s05-benefit-icon-wrap {
    width: 40px;
    height: 40px;
    background: rgba(52, 120, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.s05-benefit-icon {
    font-size: 18px;
    color: var(--hims-blue-bright);
}

.s05-benefit-text {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
}

/* =========================================
   LEFT SIDE: DASHBOARD UI (Mobile First)
========================================= */
.s05-dashboard {
    background: #FAFCFF;
    border-radius: 16px;
    border: 1px solid rgba(25, 55, 143, 0.15);
    box-shadow: 0 20px 40px -10px rgba(25, 55, 143, 0.15);
    display: flex;
    flex-direction: column; /* Stacked for Mobile */
    overflow: hidden;
    height: 500px; /* Fixed height for scrolling beds */
}

/* MOBILE BOTTOM TAB BAR */
.s05-sidebar {
    width: 100%;
    height: 60px;
    background: var(--hims-white);
    border-top: 1px solid var(--hims-border);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    order: 2; /* Pushes to bottom */
}

.s05-main-content {
    order: 1; /* Pushes to top */
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important for internal scroll */
}

.s05-sidebar-icon-active {
    width: 32px;
    height: 32px;
    background: var(--hims-primary);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--hims-white);
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(25, 55, 143, 0.4);
}

.s05-sidebar-icon-light {
    width: 32px;
    height: 32px;
    background: var(--hims-bg-light);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--hims-primary);
}

.s05-sidebar-icon-dim {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-sec);
}

/* DASHBOARD HEADER */
.s05-header {
    padding: 12px 16px;
    background: var(--hims-white);
    border-bottom: 1px solid var(--hims-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap; /* Wraps on very small screens */
    gap: 10px;
    flex-shrink: 0;
}

.s05-header-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.s05-header-sub {
    font-size: 0.7rem;
    color: var(--text-sec);
    font-weight: 600;
}

.s05-header-right {
    display: flex;
    gap: 8px;
}

.s05-badge-occupied, .s05-badge-available-header {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid;
}

.s05-badge-occupied {
    color: var(--text-main);
    background: var(--hims-bg-soft);
    border-color: var(--hims-border);
}

.s05-badge-available-header {
    color: var(--hims-success);
    background: rgba(18, 183, 106, 0.1);
    border-color: rgba(18, 183, 106, 0.2);
}

/* BED GRID AREA */
.s05-content-area {
    padding: 16px;
    flex: 1;
    overflow-y: auto; /* Allows scrolling inside the dashboard */
}

/* RESPONSIVE BED GRID */
.s05-bed-grid {
    display: grid;
    grid-template-columns: 1fr; /* MOBILE: 1 Column */
    gap: 12px;
}

/* BED CARDS */
.s05-bed-card-primary, .s05-bed-card-warning, .s05-bed-card-dashed, .s05-bed-card-cleaning {
    border-radius: 12px;
    padding: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.s05-bed-card-primary {
    background: var(--hims-white);
    border: 1px solid var(--hims-primary);
    box-shadow: 0 4px 10px rgba(25,55,143,0.08);
}

.s05-bed-card-warning {
    background: var(--hims-white);
    border: 1px solid var(--hims-warning);
    box-shadow: 0 4px 10px rgba(247,144,9,0.08);
}

.s05-bed-card-cleaning {
    background: var(--hims-bg-soft);
    border: 1px solid var(--hims-border);
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.s05-bed-card-dashed {
    background: transparent;
    border: 2px dashed var(--hims-border);
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    min-height: 100px;
}

.s05-bed-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.s05-bed-code-primary {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--hims-primary);
}

.s05-bed-code-dark {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-main);
}

.s05-bed-empty-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-sec);
    margin-bottom: 8px;
}

.s05-bed-patient-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 2px;
}

.s05-bed-doctor-name {
    font-size: 0.75rem;
    color: var(--text-sec);
    margin-bottom: 12px;
    font-weight: 500;
}

/* TAGS */
.s05-bed-tag-admitted, .s05-bed-tag-discharge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-self: flex-start;
}

.s05-bed-tag-admitted {
    background: rgba(25,55,143,0.1);
    color: var(--hims-primary);
}

.s05-bed-tag-discharge {
    background: rgba(247,144,9,0.1);
    color: var(--hims-warning);
}

.s05-badge-available-bed, .s05-badge-housekeeping {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.s05-badge-available-bed {
    background: rgba(18, 183, 106, 0.1);
    color: var(--hims-success);
}

.s05-badge-housekeeping {
    background: #E2E8F0;
    color: var(--text-sec);
}

/* LIVE PULSING DOTS */
.s05-bed-dot-primary-glow, .s05-bed-dot-primary-plain, .s05-bed-dot-warning {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.s05-bed-dot-primary-plain {
    background: var(--hims-primary);
    opacity: 0.5;
}

.s05-bed-dot-primary-glow {
    background: var(--hims-blue-bright);
    animation: pulseDotPrimary 2s infinite;
}

.s05-bed-dot-warning {
    background: var(--hims-warning);
    animation: pulseDotWarning 2s infinite;
}

@keyframes pulseDotPrimary {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 120, 255, 0.6);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(52, 120, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(52, 120, 255, 0);
    }
}

@keyframes pulseDotWarning {
    0% {
        box-shadow: 0 0 0 0 rgba(247, 144, 9, 0.6);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(247, 144, 9, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(247, 144, 9, 0);
    }
}

/* =========================================
   FLOATING AI CARD (Mobile Centered)
========================================= */
.s05-ai-card {
    position: relative;
    margin: -24px auto 0; /* Pulls it up over dashboard */
    background: rgba(7, 24, 63, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    width: 90%;
    box-shadow: 0 15px 30px rgba(7, 24, 63, 0.2);
    z-index: 10;
    animation: floatAiMobile 5s ease-in-out infinite;
}

.s05-ai-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.s05-ai-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 200, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-cyan);
    font-size: 14px;
}

.s05-ai-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--hims-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.s05-ai-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.5;
}

@keyframes floatAiMobile {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* =========================================
   TABLET RESPONSIVENESS
========================================= */
@media (min-width: 768px) {
    .s05-bed-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 Columns */
    }
}

/* =========================================
   DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 1024px) {
    .s05-section {
        padding: var(--pad-y) 0;
    }

    .s05-grid {
        display: grid;
        flex-direction: row;
        grid-template-columns: 1.2fr 0.8fr; /* Desktop: UI Left, Text Right */
        gap: 60px;
    }

    .s05-left {
        order: 1;
    }

    .s05-right {
        order: 2;
        padding-left: 20px;
    }

    .s05-feature-item {
        padding: 0;
        border: none;
        background: transparent;
    }

        .s05-feature-item:hover {
            background: transparent;
            box-shadow: none;
            transform: translateX(5px);
        }

    /* Reset Dashboard for Desktop */
    .s05-dashboard {
        flex-direction: row;
        height: 560px;
    }

    .s05-sidebar {
        width: 72px;
        height: 100%;
        border-top: none;
        border-right: 1px solid var(--hims-border);
        padding: 24px 0;
        flex-direction: column;
        justify-content: flex-start;
        gap: 24px;
        order: 1;
    }

    .s05-main-content {
        order: 2;
    }

    .s05-header {
        padding: 0 32px;
        height: 72px;
        flex-wrap: nowrap;
        align-items: center;
    }

    .s05-header-title {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .s05-header-sub {
        font-size: 0.75rem;
    }

    .s05-badge-occupied, .s05-badge-available-header {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .s05-content-area {
        padding: 32px;
    }

    /* Desktop 3-Column Bed Grid */
    .s05-bed-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .s05-bed-card-primary, .s05-bed-card-warning, .s05-bed-card-dashed, .s05-bed-card-cleaning {
        padding: 16px;
    }

    .s05-bed-patient-name {
        font-size: 1.05rem;
    }

    /* Floating AI Card Desktop */
    .s05-ai-card {
        position: absolute;
        top: 60px;
        left: -30px;
        margin: 0;
        width: 280px;
        padding: 20px;
        animation: floatAiDesktop 6s ease-in-out infinite;
    }

    @keyframes floatAiDesktop {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-15px);
        }
    }
}
/*==========================================================================
   SECTION 06: EMR & PATIENT TIMELINE (TRUE RESPONSIVE)
   THEME: SOFT BACKGROUND WITH DETAILED CLINICAL DASHBOARD
========================================================================== */

.bg-soft {
    background-color: var(--hims-bg-soft);
}

.s06-section {
    position: relative;
    padding: 60px 0 80px;
    overflow: hidden;
    z-index: 5;
}

/* SUBTLE BACKGROUND ACCENT */
.s06-bg-accent {
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 80vw;
    height: 80vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(25, 55, 143, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* =========================================
   MOBILE-FIRST GRID & TEXT CONTENT
========================================= */
.s06-grid {
    display: flex;
    flex-direction: column; /* Text on top for mobile */
    gap: 48px;
    position: relative;
    z-index: 1;
}

.s06-left {
    padding-right: 0;
}

.s06-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-blue-bright);
    background: rgba(52, 120, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(52, 120, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.s06-title {
    font-size: clamp(1.8rem, 6vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.s06-lead {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* FEATURES LIST */
.s06-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s06-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--rad-md);
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    box-shadow: var(--shadow-sm);
}

.s06-feature-icon {
    color: var(--hims-primary);
    background: rgba(25, 55, 143, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.s06-feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.s06-feature-desc {
    font-size: 0.85rem;
    color: var(--text-sec);
    line-height: 1.5;
}

/* BENEFIT BOX */
.s06-benefit-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--hims-white);
    padding: 16px;
    border-radius: var(--rad-md);
    border: 1px solid var(--hims-border);
    border-left: 4px solid var(--hims-primary);
    box-shadow: var(--shadow-sm);
}

.s06-benefit-icon-wrap {
    width: 40px;
    height: 40px;
    background: rgba(25, 55, 143, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.s06-benefit-icon {
    font-size: 18px;
    color: var(--hims-primary);
}

.s06-benefit-text {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
}

/* =========================================
   RIGHT SIDE: EMR DASHBOARD UI
========================================= */
.s06-right {
    position: relative;
    width: 100%;
}

.s06-dashboard {
    background: var(--hims-white);
    border-radius: 20px;
    border: 1px solid rgba(25, 55, 143, 0.15);
    box-shadow: 0 20px 40px -10px rgba(25, 55, 143, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 500px; /* Perfect height for scrolling timeline */
}

/* PATIENT PROFILE HEADER */
.s06-profile-header {
    background: #FAFCFF;
    padding: 20px 16px; /* Optimized for mobile */
    border-bottom: 1px solid var(--hims-border);
    display: flex;
    flex-wrap: wrap; /* Wraps cleanly on small screens */
    gap: 16px;
    align-items: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.s06-avatar {
    width: 56px;
    height: 56px; /* Slightly smaller for mobile */
    border-radius: 12px;
    background: linear-gradient(135deg, var(--hims-blue-bright), var(--hims-primary));
    color: var(--hims-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(25, 55, 143, 0.2);
    flex-shrink: 0;
}

.s06-profile-info {
    flex: 1;
    min-width: 200px;
}
/* Min-width forces wrap if too small */

.s06-profile-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.s06-patient-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
}

.s06-patient-meta {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-sec);
    display: block;
    margin-top: 2px;
}

.s06-allergy-badge {
    background: rgba(240, 68, 56, 0.1);
    color: var(--hims-error);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(240, 68, 56, 0.2);
}

.s06-vitals-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.s06-vital-chip {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--hims-white);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--hims-border);
}

/* =========================================
   PERFECTLY ALIGNED TIMELINE
========================================= */
.s06-timeline-area {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    position: relative;
    background: var(--hims-white);
}

/* The Vertical Line */
.s06-timeline-line {
    position: absolute;
    top: 24px;
    bottom: 0;
    left: 28px; /* Fixed anchor point */
    width: 2px;
    background: rgba(25, 55, 143, 0.1);
    z-index: 1;
}

/* Timeline Wrappers */
.s06-timeline-item, .s06-timeline-item-last {
    position: relative;
    margin-bottom: 32px;
    padding-left: 32px; /* Leaves space for the line & dot */
    z-index: 2;
}

.s06-timeline-item-last {
    margin-bottom: 0;
}
/* Remove margin on last item */

/* Perfectly Centered Dots (Math: Line is at 28px. Item padding is 32px. Dot needs to sit directly over the 2px line.) */
.s06-timeline-dot-primary, .s06-timeline-dot-warning, .s06-timeline-dot-sec {
    position: absolute;
    top: 2px;
    border-radius: 50%;
    z-index: 3;
}

/* Sizes and positions for perfect centering */
.s06-timeline-dot-primary {
    left: 0; /* Anchored exactly to the left edge of the padding */
    width: 10px;
    height: 10px;
    background: var(--hims-primary);
    box-shadow: 0 0 0 5px var(--hims-bg-light), 0 0 10px var(--hims-primary);
}

.s06-timeline-dot-warning {
    left: 1px;
    width: 8px;
    height: 8px;
    background: var(--hims-warning);
    box-shadow: 0 0 0 4px var(--hims-white), 0 0 8px rgba(247, 144, 9, 0.5);
}

.s06-timeline-dot-sec {
    left: 1px;
    width: 8px;
    height: 8px;
    background: var(--text-sec);
    box-shadow: 0 0 0 4px var(--hims-white);
}

/* Timeline Texts & Cards */
.s06-timeline-date-primary, .s06-timeline-date-sec {
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.s06-timeline-date-primary {
    color: var(--hims-primary);
}

.s06-timeline-date-sec {
    color: var(--text-sec);
}

.s06-timeline-card, .s06-timeline-card-plain {
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    border-radius: 12px;
    padding: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.s06-timeline-card {
    box-shadow: 0 4px 12px rgba(25, 55, 143, 0.04);
}

    .s06-timeline-card:hover {
        transform: translateY(-3px);
        border-color: rgba(52, 120, 255, 0.4);
    }

.s06-timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.s06-timeline-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
}

.s06-timeline-card-by {
    font-size: 0.75rem;
    color: var(--text-sec);
    font-weight: 600;
}

.s06-icon-primary-mr {
    color: var(--hims-primary);
    margin-right: 6px;
}

.s06-icon-warning-mr {
    color: var(--hims-warning);
    margin-right: 6px;
}

.s06-icon-sec-mr {
    color: var(--text-sec);
    margin-right: 6px;
}

.s06-timeline-card-desc, .s06-timeline-card-desc-tight {
    font-size: 0.85rem;
    color: var(--text-sec);
    line-height: 1.5;
}

.s06-timeline-card-desc {
    margin-bottom: 12px;
}

.s06-error-text {
    color: var(--hims-error);
    font-weight: 600;
}

.s06-action-chip, .s06-action-chip-plain {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid;
    transition: background 0.3s ease;
    cursor: pointer;
}

.s06-action-chip {
    background: rgba(52, 120, 255, 0.05);
    color: var(--hims-primary);
    border-color: rgba(52, 120, 255, 0.2);
}

    .s06-action-chip:hover {
        background: rgba(52, 120, 255, 0.15);
    }

.s06-action-chip-plain {
    background: var(--hims-white);
    color: var(--text-main);
    border-color: var(--hims-border);
}

    .s06-action-chip-plain:hover {
        background: var(--hims-bg-soft);
    }

.s06-pdf-icon {
    color: var(--hims-error);
}

.s06-triage-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.s06-triage-sub {
    font-size: 0.8rem;
    color: var(--text-sec);
}

/* =========================================
   FLOATING AI CARD (Mobile Centered)
========================================= */
.s06-ai-card {
    position: relative;
    margin: -30px auto 0; /* Pulls it up over dashboard */
    background: rgba(7, 24, 63, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 200, 255, 0.4);
    border-radius: 16px;
    padding: 16px 20px;
    width: 90%;
    box-shadow: 0 15px 30px rgba(7, 24, 63, 0.3), inset 0 0 15px rgba(0, 200, 255, 0.1);
    z-index: 10;
    animation: floatAiS06Mobile 6s ease-in-out infinite;
}

.s06-ai-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.s06-ai-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 200, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-cyan);
    font-size: 14px;
}

.s06-ai-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--hims-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.s06-ai-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

.s06-ai-highlight {
    color: #F04438;
    font-weight: 700;
    background: rgba(240, 68, 56, 0.15);
    padding: 0 4px;
    border-radius: 4px;
}

@keyframes floatAiS06Mobile {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}


/* =========================================
   DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 1024px) {
    .s06-section {
        padding: var(--pad-y) 0;
    }

    .s06-grid {
        display: grid;
        grid-template-columns: 0.85fr 1.15fr; /* Desktop 2-Column SaaS Layout */
        gap: 80px;
    }

    .s06-left {
        padding-right: 20px;
    }

    .s06-feature-item {
        padding: 0;
        border: none;
        background: transparent;
        box-shadow: none;
        transition: transform 0.3s ease;
    }

        .s06-feature-item:hover {
            background: transparent;
            box-shadow: none;
            transform: translateX(5px);
        }

    /* Dashboard adjustments */
    .s06-dashboard {
        height: 560px;
    }

    .s06-profile-header {
        padding: 24px 32px;
        flex-wrap: nowrap;
    }

    .s06-avatar {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }

    .s06-patient-name {
        font-size: 1.25rem;
    }

    /* Timeline adjustments */
    .s06-timeline-area {
        padding: 32px 32px 32px 40px;
    }

    .s06-timeline-line {
        left: 45px;
        top: 32px;
    }

    .s06-timeline-item, .s06-timeline-item-last {
        padding-left: 40px;
    }

    /* Re-align dots for desktop padding */
    .s06-timeline-dot-primary {
        left: -1px;
        width: 14px;
        height: 14px;
        top: 0;
    }

    .s06-timeline-dot-warning, .s06-timeline-dot-sec {
        left: 1px;
        width: 10px;
        height: 10px;
        top: 2px;
    }

    /* AI Card Desktop Position */
    .s06-ai-card {
        position: absolute;
        top: 120px;
        right: -40px; /* Floats off the dashboard to the right */
        left: auto;
        margin: 0;
        width: 300px;
        padding: 24px;
        animation: floatAiS06Desktop 6s ease-in-out infinite;
    }

    @keyframes floatAiS06Desktop {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-15px);
        }
    }
}

/*==========================================================================
   SECTION 07: SMARTER WORKSPACE FOR DOCTORS (DARK MODE EMR)
   THEME: DEEP NAVY SAAS WITH CYAN ACCENTS
========================================================================== */

/* Inheriting global dark background */
.bg-navy {
    background-color: var(--hims-navy);
}

.s07-section {
    position: relative;
    padding: 60px 0 80px;
    overflow: hidden;
    z-index: 5;
}

/* BACKGROUND GLOW EFFECT */
.s07-bg-glow {
    position: absolute;
    top: 10%;
    right: -10%;
    width: 80vw;
    height: 80vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* =========================================
   MOBILE-FIRST GRID & TEXT CONTENT
========================================= */
.s07-grid {
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    gap: 48px;
    position: relative;
    z-index: 1;
}

.s07-left {
    padding-right: 0;
}

.s07-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-cyan);
    background: rgba(0, 200, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(0, 200, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.s07-title {
    font-size: clamp(1.8rem, 6vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--hims-white);
    letter-spacing: -0.5px;
}

.s07-lead {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* FEATURES LIST */
.s07-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s07-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--rad-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

    .s07-feature-item:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(0, 200, 255, 0.2);
        transform: translateX(5px);
    }

.s07-feature-icon {
    color: var(--hims-cyan);
    background: rgba(0, 200, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.s07-feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--hims-white);
    display: block;
    margin-bottom: 4px;
}

.s07-feature-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* BENEFIT BOX */
.s07-benefit-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 200, 255, 0.05);
    padding: 16px;
    border-radius: var(--rad-md);
    border: 1px solid rgba(0, 200, 255, 0.2);
    border-left: 4px solid var(--hims-cyan);
}

.s07-benefit-icon-wrap {
    width: 40px;
    height: 40px;
    background: rgba(0, 200, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.s07-benefit-icon {
    font-size: 18px;
    color: var(--hims-cyan);
}

.s07-benefit-text {
    font-size: 0.85rem;
    color: var(--hims-white);
    line-height: 1.5;
    font-weight: 500;
}

/* =========================================
   RIGHT SIDE: DARK MODE DASHBOARD UI
========================================= */
.s07-right {
    position: relative;
    width: 100%;
}

.s07-dashboard {
    background: #0A1530; /* Deep premium blue */
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column; /* Mobile stack */
    overflow: hidden;
    height: 550px; /* Gives room for scrollable content */
}

/* MOBILE BOTTOM TAB BAR */
.s07-sidebar {
    width: 100%;
    height: 60px;
    background: #050D24; /* Even darker for contrast */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: row; /* Horizontal on mobile */
    align-items: center;
    justify-content: space-around;
    order: 2; /* Forces to bottom */
}

.s07-main-content {
    order: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Allows internal workspace scroll */
}

.s07-sidebar-icon-active {
    width: 32px;
    height: 32px;
    background: var(--hims-cyan);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0A1530;
    font-size: 16px;
    box-shadow: 0 0 12px rgba(0,200,255,0.4);
}

.s07-sidebar-icon-dim {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    border-radius: 8px;
    transition: all 0.2s;
}

    .s07-sidebar-icon-dim:hover {
        background: rgba(255,255,255,0.05);
        color: rgba(255,255,255,0.8);
    }

/* DASHBOARD HEADER (Patient Context) */
.s07-header {
    padding: 16px;
    background: #0D1C40;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; /* Safe wrapping for mobile */
    gap: 12px;
}

.s07-header-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.s07-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 200, 255, 0.1);
    color: var(--hims-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    border: 1px solid rgba(0,200,255,0.3);
    flex-shrink: 0;
}

.s07-patient-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--hims-white);
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.s07-patient-meta {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
}

.s07-vitals-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.s07-vital-chip {
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.8);
}

.s07-vital-label {
    color: var(--hims-cyan);
    font-weight: 700;
}

/* WORKSPACE BODY */
.s07-workspace-body {
    padding: 16px;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr; /* MOBILE: 1 Column */
    gap: 16px;
    overflow-y: auto; /* Scrollable internal area */
}

.s07-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* PANELS & CARDS */
.s07-card, .s07-card-flex {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px;
}

.s07-card-flex {
    flex: 1;
}

.s07-card-label, .s07-history-label, .s07-rx-label, .s07-template-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.s07-cc-text {
    font-size: 0.85rem;
    color: var(--hims-white);
    line-height: 1.5;
    background: #050D24;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* HISTORICAL TIMELINE (Perfect Alignment) */
.s07-history-track {
    position: relative;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

    /* The vertical line */
    .s07-history-track::before {
        content: '';
        position: absolute;
        top: 4px;
        bottom: 0;
        left: 4px;
        width: 2px;
        background: rgba(255,255,255,0.1);
    }

.s07-history-item {
    position: relative;
}

/* The dots locked onto the line */
.s07-history-dot-cyan, .s07-history-dot-dim {
    position: absolute;
    left: -20px;
    top: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.s07-history-dot-cyan {
    background: var(--hims-cyan);
    box-shadow: 0 0 10px var(--hims-cyan);
    animation: pulseS07Cyan 2s infinite;
}

.s07-history-dot-dim {
    background: rgba(255,255,255,0.2);
}

@keyframes pulseS07Cyan {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(0, 200, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 200, 255, 0);
    }
}

.s07-history-title {
    font-size: 0.85rem;
    color: var(--hims-white);
    font-weight: 600;
    margin-bottom: 2px;
}

.s07-history-date {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
}

/* e-PRESCRIPTION WRITER */
.s07-rx-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.s07-rx-add-btn {
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(0,200,255,0.1);
    color: var(--hims-cyan);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0,200,255,0.2);
    cursor: pointer;
    transition: background 0.3s;
}

    .s07-rx-add-btn:hover {
        background: rgba(0,200,255,0.2);
    }

.s07-med-card {
    background: #050D24;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 8px;
}

.s07-med-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.s07-med-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--hims-white);
}

.s07-med-close-icon {
    color: rgba(255,255,255,0.3);
    font-size: 1rem;
    cursor: pointer;
}

    .s07-med-close-icon:hover {
        color: var(--hims-error);
    }

.s07-med-dosage {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}

/* SMART TEMPLATES (Tags) */
.s07-template-block {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255,255,255,0.1);
}

.s07-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.s07-tag {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--hims-white);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s;
}

    .s07-tag:hover {
        background: rgba(255,255,255,0.1);
        border-color: var(--hims-cyan);
        color: var(--hims-cyan);
    }

/* SAVE BUTTON */
.s07-save-btn {
    background: var(--hims-cyan);
    color: #0A1530;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 200, 255, 0.2);
}

    .s07-save-btn:hover {
        background: #00b5e6;
        box-shadow: 0 6px 16px rgba(0, 200, 255, 0.4);
        transform: translateY(-2px);
    }


/* =========================================
   FLOATING AI CARD (Mobile Centered)
========================================= */
.s07-ai-card {
    position: relative;
    margin: -24px auto 0; /* Pulls it up over dashboard */
    background: rgba(25, 55, 143, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 16px 20px;
    width: 90%;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    z-index: 10;
    animation: floatAiS07Mobile 6s ease-in-out infinite;
}

.s07-ai-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.s07-ai-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-white);
    font-size: 14px;
}

.s07-ai-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--hims-white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.s07-ai-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

@keyframes floatAiS07Mobile {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* =========================================
   DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 1024px) {
    .s07-section {
        padding: var(--pad-y) 0;
    }

    .s07-grid {
        display: grid;
        grid-template-columns: 0.85fr 1.15fr; /* Crisp Desktop Split */
        gap: 80px;
    }

    .s07-feature-item {
        padding: 0;
        border: none;
        background: transparent;
    }

    /* Reverting Dashboard Layout to Left-Sidebar */
    .s07-dashboard {
        flex-direction: row;
        height: 600px;
    }

    .s07-sidebar {
        width: 72px;
        height: 100%;
        border-top: none;
        border-right: 1px solid rgba(255,255,255,0.05);
        padding: 24px 0;
        flex-direction: column;
        justify-content: flex-start;
        gap: 24px;
        order: 1;
    }

    .s07-main-content {
        order: 2;
    }

    .s07-sidebar-icon-active, .s07-sidebar-icon-dim {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .s07-header {
        padding: 20px 24px;
        flex-wrap: nowrap;
    }

    .s07-avatar {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .s07-patient-name {
        font-size: 1.15rem;
    }

    /* Workspace changes to 2-Column Desktop Grid */
    .s07-workspace-body {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        padding: 24px;
    }

    .s07-cc-text {
        font-size: 0.95rem;
    }

    /* Desktop AI Card Position */
    .s07-ai-card {
        position: absolute;
        top: 60px;
        right: -40px;
        left: auto;
        margin: 0;
        width: 280px;
        padding: 24px;
        animation: floatAiS07Desktop 6s ease-in-out infinite;
    }

    @keyframes floatAiS07Desktop {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-15px);
        }
    }
}

/*==========================================================================
   SECTION 08: HOSPITAL CORE (NURSING & APPOINTMENTS)
   THEME: BENTO GRID UI SHOWCASE (100% RESPONSIVE)
========================================================================== */

.bg-white {
    background-color: var(--hims-white);
}

.s08-section {
    position: relative;
    padding: 80px 0;
    z-index: 5;
    background: radial-gradient(circle at top center, rgba(52, 120, 255, 0.03) 0%, var(--hims-white) 100%);
}

/* =========================================
   HEADER
========================================= */
.s08-heading-wrap {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 16px;
}

.s08-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-primary);
    background: rgba(25, 55, 143, 0.08);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(25, 55, 143, 0.15);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.s08-heading-title {
    font-size: clamp(1.8rem, 5vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.s08-lead {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    color: var(--text-sec);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   BENTO GRID (Mobile First)
========================================= */
.s08-bento-grid {
    display: grid;
    grid-template-columns: 1fr; /* MOBILE: Stacked Layout */
    gap: 32px;
    align-items: stretch;
}

.s08-card {
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    border-radius: 20px;
    padding: 24px; /* Smaller padding for mobile */
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(25, 55, 143, 0.04);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    position: relative;
    /* Removed overflow: hidden so floating badges don't get cut off */
}

    .s08-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(25, 55, 143, 0.08);
        border-color: rgba(52, 120, 255, 0.3);
    }

/* TOP HOVER GLOW LINE */
.s08-hover-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--hims-primary), var(--hims-cyan));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* CSS fallback for hover (in case JS fails) */
.s08-card:hover .s08-hover-glow {
    opacity: 1 !important;
}

/* CARD CONTENT */
.s08-card-head {
    margin-bottom: 24px;
}

.s08-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 8px 0 12px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.s08-card-desc {
    font-size: 0.95rem;
    color: var(--text-sec);
    line-height: 1.6;
}

/* =========================================
   REALISTIC UI PANELS
========================================= */
.s08-ui-panel {
    background: #FAFCFF; /* Premium soft background */
    border: 1px solid rgba(25, 55, 143, 0.1);
    border-radius: 12px;
    padding: 16px;
    height: auto; /* Adapts to content on mobile */
    min-height: 250px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.s08-ui-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--hims-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.s08-ui-header-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.s08-icon-primary-mr {
    color: var(--hims-primary);
    margin-right: 8px;
    font-size: 1rem;
}

.s08-ui-header-tag, .s08-ui-header-tag-flex {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-sec);
    background: var(--hims-white);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--hims-border);
}

.s08-ui-header-tag-flex {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

    .s08-ui-header-tag-flex:hover {
        border-color: var(--hims-primary);
        color: var(--hims-primary);
    }

/* NURSING TASKS */
.s08-task-card, .s08-task-card-last {
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: transform 0.2s, border-color 0.2s;
}

.s08-task-card-last {
    margin-bottom: 0;
}

    .s08-task-card:hover, .s08-task-card-last:hover {
        transform: translateX(4px);
        border-color: rgba(52, 120, 255, 0.4);
    }

.s08-task-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.s08-task-bed {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-main);
}

.s08-task-tag-error {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--hims-error);
    background: rgba(240,68,56,0.1);
    padding: 4px 8px;
    border-radius: 100px;
}

.s08-task-tag-warning {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--hims-warning);
    background: rgba(247,144,9,0.1);
    padding: 4px 8px;
    border-radius: 100px;
}

.s08-task-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s08-task-desc {
    font-size: 0.75rem;
    color: var(--text-sec);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.s08-task-btn-primary {
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--hims-primary);
    color: var(--hims-white);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

    .s08-task-btn-primary:hover {
        background: var(--hims-blue-bright);
        box-shadow: 0 4px 10px rgba(52, 120, 255, 0.3);
    }

.s08-task-btn-outline {
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--hims-bg-light);
    color: var(--hims-primary);
    border: 1px solid var(--hims-primary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

    .s08-task-btn-outline:hover {
        background: var(--hims-primary);
        color: var(--hims-white);
    }

/* APPOINTMENT SLOTS */
.s08-calendar-slots {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.s08-slot-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.s08-slot-time {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-sec);
    width: 40px;
    text-align: right;
}

.s08-slot-booked-primary, .s08-slot-booked-warning, .s08-slot-available {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    transition: transform 0.2s;
}

    .s08-slot-booked-primary:hover, .s08-slot-booked-warning:hover, .s08-slot-available:hover {
        transform: translateX(4px);
    }

.s08-slot-booked-primary {
    background: var(--hims-white);
    border-left: 3px solid var(--hims-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.s08-slot-booked-warning {
    background: var(--hims-white);
    border-left: 3px solid var(--hims-warning);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.s08-slot-available {
    background: rgba(18, 183, 106, 0.05);
    border: 1px dashed rgba(18, 183, 106, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

    .s08-slot-available:hover {
        background: rgba(18, 183, 106, 0.1);
        border-color: var(--hims-success);
    }

.s08-slot-patient-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.s08-slot-sub-sec {
    font-size: 0.65rem;
    color: var(--text-sec);
    font-weight: 500;
    margin-left: 6px;
}

.s08-slot-sub-warning {
    font-size: 0.6rem;
    color: var(--hims-warning);
    font-weight: 700;
    background: rgba(247,144,9,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.s08-slot-available-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hims-success);
}

.s08-slot-book-btn {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--hims-success);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(18, 183, 106, 0.3);
}

/* =========================================
   FLOATING BADGES (Safely Positioned)
========================================= */
.s08-floating-badge {
    position: absolute;
    /* Keeps badge anchored safely to bottom right of UI Panel */
    bottom: -16px;
    right: 16px;
    background: var(--hims-navy);
    color: var(--hims-white);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(7, 24, 63, 0.4);
    border: 1px solid rgba(0, 200, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    animation: floatBadgeMobile 4s ease-in-out infinite;
}

.s08-bell-icon {
    color: var(--hims-warning);
    font-size: 0.85rem;
}

.s08-whatsapp-icon {
    color: #25D366;
    font-size: 0.85rem;
}

@keyframes floatBadgeMobile {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* =========================================
   BOTTOM FEATURE GRID
========================================= */
.s08-feature-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--hims-border);
}

.s08-feature-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr; /* 1 Col on Mobile */
    gap: 12px;
}

.s08-feature-item {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.s08-feature-check {
    color: var(--hims-primary);
    font-size: 1rem;
}

/* =========================================
   DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 992px) {
    .s08-section {
        padding: var(--pad-y) 0;
    }

    .s08-bento-grid {
        grid-template-columns: 1fr 1fr; /* Crisp 2-Column Desktop Grid */
        gap: 40px;
    }

    .s08-card {
        padding: 40px;
        border-radius: 24px;
    }

    .s08-card-head {
        margin-bottom: 40px;
    }

    /* Fixed UI panel height for exact bento symmetry */
    .s08-ui-panel {
        height: 290px;
        margin-bottom: 40px;
        padding: 20px;
    }

    /* 2-Column features on desktop */
    .s08-feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .s08-feature-item {
        font-size: 0.95rem;
    }

    /* Floating badges push out on desktop for 3D effect */
    .s08-floating-badge {
        right: -24px;
        bottom: 20px; /* Safely sticks out on big screens */
        padding: 10px 20px;
        font-size: 0.75rem;
        animation: floatBadgeDesktop 4s ease-in-out infinite;
    }

    @keyframes floatBadgeDesktop {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-10px);
        }
    }
}


/*==========================================================================
   SECTION 10: FINANCIAL WORKFLOW (BILLING DASHBOARD)
   THEME: CLEAN SAAS INVOICE (100% RESPONSIVE)
========================================================================== */

.bg-white {
    background-color: var(--hims-white);
}

.s10-section {
    position: relative;
    padding: 60px 0 80px;
    overflow: hidden;
    z-index: 5;
}

/* SUBTLE BACKGROUND ACCENT */
.s10-bg-graphic {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 80vw;
    height: 80vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(25, 55, 143, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* =========================================
   MOBILE-FIRST GRID & TEXT CONTENT
========================================= */
.s10-grid {
    display: flex;
    flex-direction: column; /* Stacked on mobile: Text on Top, UI on Bottom */
    gap: 48px;
    position: relative;
    z-index: 1;
}

.s10-right {
    order: 1; /* Content comes first on mobile */
    padding: 0;
}

.s10-left {
    order: 2; /* UI Dashboard comes second */
    position: relative;
    width: 100%;
}

.s10-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-blue-bright);
    background: rgba(52, 120, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(52, 120, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.s10-title {
    font-size: clamp(1.8rem, 6vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.s10-lead {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* FEATURES LIST */
.s10-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s10-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--rad-md);
    background: var(--hims-bg-soft);
    border: 1px solid var(--hims-border);
    transition: all 0.3s ease;
}

    .s10-feature-item:hover {
        background: var(--hims-white);
        box-shadow: var(--shadow-sm);
        transform: translateX(5px);
    }

.s10-feature-icon {
    color: var(--hims-primary);
    background: rgba(25, 55, 143, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.s10-feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.s10-feature-desc {
    font-size: 0.85rem;
    color: var(--text-sec);
    line-height: 1.5;
}

/* BENEFIT BOX */
.s10-benefit-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--hims-white);
    padding: 16px;
    border-radius: var(--rad-md);
    border: 1px solid var(--hims-border);
    border-left: 4px solid var(--hims-primary);
    box-shadow: var(--shadow-sm);
}

.s10-benefit-icon-wrap {
    width: 40px;
    height: 40px;
    background: rgba(25, 55, 143, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.s10-benefit-icon {
    font-size: 18px;
    color: var(--hims-primary);
}

.s10-benefit-text {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
}

/* =========================================
   LEFT SIDE: BILLING DASHBOARD UI
========================================= */
.s10-dashboard {
    background: var(--hims-white);
    border-radius: 20px;
    border: 1px solid var(--hims-border);
    box-shadow: 0 20px 40px -10px rgba(25, 55, 143, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: auto; /* Fluid on mobile */
    min-height: 500px;
}

/* TOP ACTION BAR */
.s10-action-bar {
    background: var(--hims-navy);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Wraps on very small phones */
    gap: 12px;
}

.s10-action-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--hims-white);
}

.s10-action-bar-icon {
    width: 32px;
    height: 32px;
    background: rgba(0,200,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-cyan);
    font-size: 14px;
}

.s10-action-bar-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.s10-action-bar-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Interactive Buttons */
.s10-btn-download, .s10-btn-print {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.s10-btn-download {
    background: rgba(255,255,255,0.1);
    color: var(--hims-white);
    border: 1px solid rgba(255,255,255,0.2);
}

    .s10-btn-download:hover {
        background: rgba(255,255,255,0.2);
        border-color: var(--hims-white);
    }

.s10-btn-print {
    background: var(--hims-primary);
    color: var(--hims-white);
    box-shadow: 0 4px 10px rgba(25, 55, 143, 0.4);
    border: 1px solid var(--hims-primary);
}

    .s10-btn-print:hover {
        background: var(--hims-blue-bright);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(52, 120, 255, 0.4);
    }

/* INVOICE PAPER CONTENT */
.s10-invoice-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px; /* Reduced for mobile */
    background: #FAFCFF; /* Slight off-white to look like paper */
    overflow-x: hidden;
    -ms-overflow-style: none; 
    scrollbar-width: none;
}

/* Invoice Header (Wraps cleanly) */
.s10-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; /* Crucial for mobile */
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 2px dashed rgba(25, 55, 143, 0.15);
    margin-bottom: 20px;
}

.s10-invoice-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
}

.s10-invoice-date {
    font-size: 0.75rem;
    color: var(--text-sec);
    margin-top: 6px;
    font-weight: 500;
}

.s10-invoice-patient-block {
    margin-top: 12px;
    background: var(--hims-white);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--hims-border);
}

.s10-invoice-patient-name {
    font-size: 0.85rem;
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.s10-invoice-patient-meta {
    font-size: 0.75rem;
    color: var(--text-sec);
    font-weight: 600;
}

.s10-invoice-header-right {
    text-align: left;
}
/* Reset text-align for mobile wrap */

.s10-paid-badge {
    background: rgba(18, 183, 106, 0.1);
    color: var(--hims-success);
    border: 1px solid rgba(18, 183, 106, 0.2);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(18, 183, 106, 0.1);
}

.s10-payment-method {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 8px;
}

/* ITEMIZED CHARGES */
.s10-items-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.s10-items-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--hims-border);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.s10-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 600;
    padding: 10px 8px;
    border-bottom: 1px dashed rgba(0,0,0,0.05);
    border-radius: 6px;
    transition: background 0.2s;
}

    .s10-item-row:hover {
        background: var(--hims-white);
        box-shadow: var(--shadow-sm);
    }

.s10-col-desc {
    flex: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.s10-col-amount {
    flex: 1;
    text-align: right;
    color: var(--text-sec);
}

.s10-col-amount-bold {
    flex: 1;
    text-align: right;
    font-weight: 700;
    color: var(--hims-primary-dark);
}

.s10-auto-posted-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--hims-blue-bright);
    background: rgba(52, 120, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* TOTAL CALCULATION BLOCK */
.s10-total-block {
    border-top: 2px solid var(--hims-border);
    padding-top: 16px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%; /* Full width on mobile */
    align-self: flex-end;
    background: var(--hims-white);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.s10-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-sec);
    font-weight: 600;
}

.s10-total-row-tpa {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--hims-warning);
    font-weight: 700;
}

.s10-total-row-final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    border-top: 1px dashed var(--hims-border);
    padding-top: 12px;
    margin-top: 4px;
}

.s10-total-amount {
    color: var(--hims-success);
    font-size: 1.3rem;
}
/* Green total indicates paid/cleared */

/* =========================================
   FLOATING AI CARD (Mobile Centered)
========================================= */
.s10-ai-card {
    position: relative;
    margin: -24px auto 0; /* Pulls it up over dashboard */
    background: rgba(7, 24, 63, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 200, 255, 0.4);
    border-radius: 16px;
    padding: 16px 20px;
    width: 90%;
    box-shadow: 0 15px 30px rgba(7, 24, 63, 0.3), inset 0 0 15px rgba(0, 200, 255, 0.1);
    z-index: 10;
    animation: floatAiS10Mobile 6s ease-in-out infinite;
}

.s10-ai-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.s10-ai-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 200, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-cyan);
    font-size: 14px;
}

.s10-ai-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--hims-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.s10-ai-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

@keyframes floatAiS10Mobile {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* =========================================
   DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 1024px) {
    .s10-section {
        padding: var(--pad-y) 0;
    }

    .s10-grid {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr; /* Desktop: UI Left, Text Right */
        gap: 60px;
    }

    .s10-left {
        order: 1;
    }

    .s10-right {
        order: 2;
        padding-left: 20px;
    }

    .s10-feature-item {
        padding: 0;
        border: none;
        background: transparent;
        box-shadow: none;
        transition: transform 0.3s ease;
    }

        .s10-feature-item:hover {
            background: transparent;
            box-shadow: none;
            transform: translateX(5px);
        }

    /* Dashboard Layout */
    .s10-dashboard {
        height: 560px;
    }

    .s10-action-bar {
        padding: 16px 24px;
        flex-wrap: nowrap;
    }

    .s10-action-bar-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .s10-action-bar-title {
        font-size: 1rem;
    }

    .s10-btn-download, .s10-btn-print {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

    /* Invoice Content */
    .s10-invoice-content {
        padding: 32px;
    }

    .s10-invoice-header {
        padding-bottom: 24px;
        margin-bottom: 24px;
        flex-wrap: nowrap;
    }

    .s10-invoice-number {
        font-size: 1.5rem;
    }

    .s10-invoice-header-right {
        text-align: right;
    }
    /* Right align for desktop */

    .s10-item-row {
        font-size: 0.95rem;
        padding: 12px 16px;
    }

    .s10-col-amount-bold {
        font-size: 1rem;
    }

    .s10-auto-posted-tag {
        font-size: 0.7rem;
        padding: 2px 8px;
    }

    /* Total block sits nicely on the right on desktop */
    .s10-total-block {
        width: 55%;
        padding: 20px;
        margin-top: 24px;
    }

    .s10-total-row, .s10-total-row-tpa {
        font-size: 0.95rem;
    }

    .s10-total-row-final {
        font-size: 1.25rem;
    }

    .s10-total-amount {
        font-size: 1.5rem;
    }

    /* Desktop AI Card Position */
    .s10-ai-card {
        position: absolute;
        bottom: 60px;
        left: -30px; /* Floats off the dashboard to the left */
        right: auto;
        margin: 0;
        width: 300px;
        padding: 24px;
        animation: floatAiS10Desktop 6s ease-in-out infinite;
    }

    @keyframes floatAiS10Desktop {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-15px);
        }
    }
}

/*==========================================================================
   SECTION 11: DIAGNOSTICS & PHARMACY ENGINE (BENTO GRID)
   THEME: CLEAN SAAS UI SHOWCASE (100% RESPONSIVE)
========================================================================== */

.bg-white {
    background-color: var(--hims-white);
}

.s11-section {
    position: relative;
    padding: 80px 0;
    z-index: 5;
    background: radial-gradient(circle at top center, rgba(52, 120, 255, 0.03) 0%, var(--hims-white) 100%);
}

/* =========================================
   HEADER
========================================= */
.s11-heading-wrap {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 16px;
}

.s11-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-primary);
    background: rgba(25, 55, 143, 0.08);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(25, 55, 143, 0.15);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.s11-heading-title {
    font-size: clamp(1.8rem, 5vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.s11-lead {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    color: var(--text-sec);
    line-height: 1.6;
    max-width: 650px;
    margin: 0 auto;
}

/* =========================================
   BENTO GRID (Mobile First)
========================================= */
.s11-bento-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stack vertically on mobile */
    gap: 32px;
    align-items: stretch;
}

.s11-card {
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    border-radius: 20px;
    padding: 24px; /* Reduced padding for mobile */
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(25, 55, 143, 0.04);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    position: relative;
    /* Removed overflow: hidden so floating badges stay visible */
}

    .s11-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(25, 55, 143, 0.08);
        border-color: rgba(52, 120, 255, 0.3);
    }

/* TOP HOVER GLOW LINE */
.s11-hover-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--hims-primary), var(--hims-cyan));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.s11-card:hover .s11-hover-glow {
    opacity: 1 !important;
}

/* CARD HEADERS */
.s11-card-head {
    margin-bottom: 24px;
}

.s11-module-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--hims-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.s11-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 8px 0 12px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.s11-card-desc {
    font-size: 0.95rem;
    color: var(--text-sec);
    line-height: 1.6;
}

/* =========================================
   REALISTIC UI PANELS
========================================= */
.s11-ui-panel {
    background: #FAFCFF; /* Soft premium background */
    border: 1px solid rgba(25, 55, 143, 0.1);
    border-radius: 12px;
    padding: 16px;
    height: auto;
    min-height: 250px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.s11-ui-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--hims-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px; /* Wraps cleanly on small screens */
}

.s11-ui-header-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.s11-icon-primary-mr {
    color: var(--hims-primary);
    margin-right: 8px;
    font-size: 1rem;
}

/* TAGS */
.s11-alert-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--hims-error);
    background: rgba(240,68,56,0.1);
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(240,68,56,0.2);
}

.s11-sync-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-main);
    background: var(--hims-white);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--hims-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.s11-sync-dot {
    width: 6px;
    height: 6px;
    background: var(--hims-success);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--hims-success);
    animation: pulseDotS11 2s infinite;
}

@keyframes pulseDotS11 {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* PHARMACY UI CARDS */
.s11-rx-card-primary, .s11-rx-card-warning {
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.s11-rx-card-primary {
    border-left: 3px solid var(--hims-primary);
}

.s11-rx-card-warning {
    border-left: 3px solid var(--hims-warning);
}

.s11-rx-card-primary:hover {
    transform: translateX(4px);
    border-color: rgba(52, 120, 255, 0.4);
}

.s11-rx-card-warning:hover {
    transform: translateX(4px);
    border-color: rgba(247, 144, 9, 0.4);
}

.s11-rx-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.s11-rx-patient {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-main);
}

.s11-rx-doctor {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-sec);
}

.s11-rx-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.s11-rx-med {
    font-size: 0.75rem;
    color: var(--text-sec);
    font-weight: 500;
}

.s11-rx-btn-primary, .s11-rx-btn-warning {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    text-align: center;
}

.s11-rx-btn-primary {
    background: var(--hims-primary);
    color: var(--hims-white);
    box-shadow: 0 2px 6px rgba(25, 55, 143, 0.2);
}

    .s11-rx-btn-primary:hover {
        background: var(--hims-blue-bright);
        transform: translateY(-1px);
    }

.s11-rx-btn-warning {
    background: rgba(247,144,9,0.1);
    color: var(--hims-warning);
}

    .s11-rx-btn-warning:hover {
        background: rgba(247,144,9,0.2);
        transform: translateY(-1px);
    }

/* LIS (LABORATORY) UI CARDS */
.s11-track-item, .s11-track-item-last {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.s11-track-item-last {
    margin-bottom: 0;
}

.s11-track-id {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-main);
    background: var(--hims-white);
    border: 1px dashed var(--hims-border);
    padding: 6px 8px;
    border-radius: 6px;
    margin-top: 2px;
}

.s11-track-card, .s11-track-card-error {
    flex: 1;
    background: var(--hims-white);
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: transform 0.3s;
}

.s11-track-card {
    border: 1px solid var(--hims-border);
    border-left: 3px solid var(--hims-primary);
}

.s11-track-card-error {
    border: 1px solid rgba(240,68,56,0.2);
    border-left: 3px solid var(--hims-error);
}

    .s11-track-card:hover, .s11-track-card-error:hover {
        transform: translateX(4px);
    }

.s11-track-row, .s11-track-row-tight {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.s11-track-row {
    margin-bottom: 8px;
}

.s11-track-row-tight {
    margin-bottom: 4px;
}

.s11-track-test-name {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-main);
}

.s11-track-status-processing, .s11-track-status-abnormal {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
}

.s11-track-status-processing {
    color: var(--hims-primary);
    background: rgba(52, 120, 255, 0.1);
}

.s11-track-status-abnormal {
    color: var(--hims-error);
    background: rgba(240,68,56,0.1);
}

/* Animated Progress Bar */
.s11-progress-track {
    width: 100%;
    height: 4px;
    background: var(--hims-bg-light);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.s11-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--hims-primary), var(--hims-cyan));
    width: 65%;
    animation: processingBar 2s infinite alternate ease-in-out;
}

@keyframes processingBar {
    0% {
        width: 40%;
    }

    100% {
        width: 85%;
    }
}

.s11-track-emr-note {
    font-size: 0.7rem;
    color: var(--text-sec);
    font-weight: 500;
}

/* =========================================
   FLOATING BADGES (Safely Positioned)
========================================= */
.s11-floating-badge {
    position: absolute;
    bottom: -16px;
    right: 16px; /* Safe mobile anchor inside the card */
    background: var(--hims-navy);
    color: var(--hims-white);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(7, 24, 63, 0.4);
    border: 1px solid rgba(0, 200, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    animation: floatBadgeS11Mobile 4s ease-in-out infinite;
}

.s11-badge-icon-cyan {
    color: var(--hims-cyan);
    font-size: 0.9rem;
}

.s11-badge-icon-success {
    color: var(--hims-success);
    font-size: 0.9rem;
}

@keyframes floatBadgeS11Mobile {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* =========================================
   BOTTOM FEATURE GRID
========================================= */
.s11-feature-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--hims-border);
}

.s11-feature-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr; /* 1 Col on Mobile */
    gap: 12px;
}

.s11-feature-item {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.s11-feature-check {
    color: var(--hims-primary);
    font-size: 1rem;
}


/* =========================================
   DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 992px) {
    .s11-section {
        padding: var(--pad-y) 0;
    }

    .s11-bento-grid {
        grid-template-columns: 1fr 1fr; /* Crisp 2-Column Desktop Grid */
        gap: 40px;
    }

    .s11-card {
        padding: 40px;
        border-radius: 24px;
    }

    .s11-card-head {
        margin-bottom: 40px;
    }

    /* Fixed UI panel height for exact bento symmetry */
    .s11-ui-panel {
        height: 320px;
        padding: 24px;
        margin-bottom: 40px;
    }

    /* 2-Column features on desktop */
    .s11-feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .s11-feature-item {
        font-size: 0.95rem;
    }

    /* Floating badges push out on desktop for 3D effect */
    .s11-floating-badge {
        right: -24px;
        bottom: 20px; /* Safely sticks out on big screens */
        padding: 10px 20px;
        font-size: 0.75rem;
        animation: floatBadgeS11Desktop 4s ease-in-out infinite;
    }

    @keyframes floatBadgeS11Desktop {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-10px);
        }
    }
}
/*==========================================================================
   SECTION 20: ABDM & DIGITAL HEALTH INTEGRATION
   THEME: CONNECTED WORKFLOW PANEL (100% RESPONSIVE)
========================================================================== */

.bg-soft {
    background-color: var(--hims-bg-soft);
}

.s20-section {
    position: relative;
    padding: 60px 0; /* Mobile padding */
    overflow: hidden;
    z-index: 5;
}

/* =========================================
   MAIN INTEGRATION PANEL
========================================= */
.s20-panel {
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    border-radius: 20px;
    padding: 40px 24px; /* Scaled down for mobile */
    text-align: center;
    box-shadow: 0 16px 40px rgba(25, 55, 143, 0.05);
    position: relative;
    overflow: hidden;
}

    /* Premium SaaS Top Glow Border */
    .s20-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, var(--hims-primary), var(--hims-cyan));
    }

    /* =========================================
   TYPOGRAPHY
========================================= */
    .s20-panel .eyebrow {
        display: inline-flex;
        align-items: center;
        color: var(--hims-primary);
        background: rgba(25, 55, 143, 0.08);
        padding: 6px 16px;
        border-radius: 30px;
        border: 1px solid rgba(25, 55, 143, 0.15);
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 1.5px;
        margin-bottom: 20px;
        text-transform: uppercase;
    }

    .s20-panel .h-mod {
        font-size: clamp(1.8rem, 5vw, 2.75rem);
        font-weight: 800;
        color: var(--text-main);
        margin-bottom: 16px;
        line-height: 1.2;
        letter-spacing: -0.5px;
    }

.s20-lead {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    color: var(--text-sec);
    max-width: 600px;
    margin: 0 auto 40px; /* Centered with bottom gap */
    line-height: 1.6;
}

/* =========================================
   MOBILE-FIRST INTEGRATION FLOW
========================================= */
.s20-flow-row {
    display: flex;
    flex-direction: column; /* Stack vertically on mobile */
    align-items: center;
    gap: 16px;
}

/* Standard Pills */
.s20-pill {
    width: 100%;
    max-width: 280px; /* Looks like uniform buttons on mobile */
    padding: 14px 24px;
    border: 2px dashed var(--hims-border);
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-sec);
    background: transparent;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

    /* Hover effect on inactive pills */
    .s20-pill:hover {
        border-style: solid;
        border-color: rgba(25, 55, 143, 0.3);
        color: var(--text-main);
        background: var(--hims-white);
        box-shadow: 0 4px 12px rgba(25, 55, 143, 0.05);
        transform: translateY(-2px);
    }

/* Active Highlighted Pill */
.s20-pill-active {
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    border: 2px solid var(--hims-primary);
    background: rgba(25, 55, 143, 0.04);
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--hims-primary);
    box-shadow: 0 8px 20px rgba(25, 55, 143, 0.1);
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

    /* Live Active Dot */
    .s20-pill-active::before {
        content: '';
        display: inline-block;
        width: 8px;
        height: 8px;
        background: var(--hims-primary);
        border-radius: 50%;
        margin-right: 8px;
        animation: pulseS20Dot 2s infinite;
    }

@keyframes pulseS20Dot {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 55, 143, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(25, 55, 143, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(25, 55, 143, 0);
    }
}

/* Connecting Arrows */
.s20-arrow {
    color: var(--hims-primary);
    font-size: 24px;
    /* CSS Trick: Rotates the right arrow to point DOWN on mobile */
    transform: rotate(90deg);
    opacity: 0.5;
    animation: flowDataDown 2s ease-in-out infinite;
}

/* Mobile Animation (Arrows move down) */
@keyframes flowDataDown {
    0%, 100% {
        transform: rotate(90deg) translateY(0);
        opacity: 0.3;
    }

    50% {
        transform: rotate(90deg) translateY(-5px);
        opacity: 1;
    }
}

/* Desktop Animation (Arrows move right) */
@keyframes flowDataRight {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.3;
    }

    50% {
        transform: translateX(6px);
        opacity: 1;
    }
}


/* =========================================
   TABLET & DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 768px) {
    .s20-section {
        padding: 80px 0;
    }

    .s20-panel {
        padding: 60px 40px;
    }

    .s20-flow-row {
        flex-direction: row; /* Horizontal layout for big screens */
        gap: 20px;
    }

    .s20-pill, .s20-pill-active {
        width: auto;
        max-width: none;
        padding: 16px 32px; /* Bigger buttons */
        font-size: 1.05rem;
    }

    .s20-arrow {
        font-size: 28px;
        transform: rotate(0deg); /* CSS Trick: Arrow points RIGHT again */
        animation: flowDataRight 2s ease-in-out infinite;
    }
}

@media (min-width: 1024px) {
    .s20-panel {
        padding: 80px;
        margin: 0 40px; /* Keeps the panel from touching the edges of the container */
    }

    .s20-flow-row {
        gap: 32px; /* More breathing room between pills */
    }
}


/*==========================================================================
   SECTION 21: AI-POWERED HIMS (ULTRA-PREMIUM REDESIGN)
   THEME: DEEP NAVY AI DASHBOARD (100% RESPONSIVE)
========================================================================== */

/* Inheriting global dark background */
.bg-navy {
    background-color: var(--hims-navy);
}

.s21-section {
    position: relative;
    padding: 60px 0 80px;
    overflow: hidden;
    z-index: 5;
}

/* DEEP FUTURISTIC GLOW */
.s21-bg-glow {
    position: absolute;
    top: 20%;
    right: -5%;
    width: 80vw;
    height: 80vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* =========================================
   MOBILE-FIRST GRID & TEXT CONTENT
========================================= */
.s21-grid {
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    gap: 48px;
    position: relative;
    z-index: 1;
}

.s21-left {
    padding-right: 0;
}

.s21-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-cyan);
    background: rgba(0, 200, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(0, 200, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.s21-title {
    font-size: clamp(1.8rem, 6vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--hims-white);
    letter-spacing: -0.5px;
}

.s21-lead {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* FEATURES LIST */
.s21-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s21-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--rad-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

    .s21-feature-item:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(0, 200, 255, 0.2);
        transform: translateX(5px);
    }

.s21-feature-icon {
    color: var(--hims-cyan);
    background: rgba(0, 200, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.s21-feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--hims-white);
    display: block;
    margin-bottom: 4px;
}

.s21-feature-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* BENEFIT BOX */
.s21-benefit-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 200, 255, 0.05);
    padding: 16px;
    border-radius: var(--rad-md);
    border: 1px solid rgba(0, 200, 255, 0.2);
    border-left: 4px solid var(--hims-cyan);
}

.s21-benefit-icon-wrap {
    width: 40px;
    height: 40px;
    background: rgba(0, 200, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.s21-benefit-icon {
    font-size: 18px;
    color: var(--hims-cyan);
}

.s21-benefit-text {
    font-size: 0.85rem;
    color: var(--hims-white);
    line-height: 1.5;
    font-weight: 500;
}

/* =========================================
   RIGHT SIDE: AI DASHBOARD UI
========================================= */
.s21-right {
    position: relative;
    width: 100%;
}

.s21-dashboard {
    background: #0A1530;
    border-radius: 16px;
    border: 1px solid rgba(0, 200, 255, 0.2);
    box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 200, 255, 0.05);
    display: flex;
    flex-direction: column; /* Mobile stack */
    overflow: hidden;
    height: auto; /* Fluid on mobile */
    min-height: 500px;
}

/* MOBILE BOTTOM TAB BAR */
.s21-sidebar {
    width: 100%;
    height: 60px;
    background: #050D24;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    order: 2; /* Pushes to bottom */
}

.s21-main-content {
    order: 1; /* Pushes to top */
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #07112A;
    overflow-x: hidden;
}

.s21-sidebar-icon-active {
    width: 32px;
    height: 32px;
    background: rgba(0, 200, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-cyan);
    font-size: 16px;
    border: 1px solid rgba(0,200,255,0.3);
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.2);
}

.s21-sidebar-icon-dim {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    border-radius: 8px;
    transition: all 0.2s;
}

    .s21-sidebar-icon-dim:hover {
        background: rgba(255,255,255,0.05);
        color: rgba(255,255,255,0.8);
    }

/* DASHBOARD HEADER */
.s21-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.s21-header-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.s21-header-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--hims-white);
    margin: 0;
    line-height: 1.2;
}

.s21-status-badge {
    background: rgba(18, 183, 106, 0.1);
    color: var(--hims-success);
    border: 1px solid rgba(18, 183, 106, 0.2);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.s21-status-dot {
    width: 6px;
    height: 6px;
    background: var(--hims-success);
    border-radius: 50%;
    animation: pulseS21 2s infinite;
}

@keyframes pulseS21 {
    0% {
        box-shadow: 0 0 0 0 rgba(18, 183, 106, 0.6);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(18, 183, 106, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(18, 183, 106, 0);
    }
}

/* CONTENT AREA */
.s21-content-area {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* NATURAL LANGUAGE SEARCH (Typing Effect) */
.s21-nl-search {
    background: #0D1C40;
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.s21-nl-search-icon {
    color: var(--hims-cyan);
    font-size: 16px;
}

.s21-nl-search-text {
    font-size: 0.8rem;
    color: var(--hims-white);
    font-family: 'Courier New', Courier, monospace;
    position: relative;
    display: inline-block;
}

    /* Typewriter Blinking Cursor */
    .s21-nl-search-text::after {
        content: '|';
        position: absolute;
        right: -8px;
        color: var(--hims-cyan);
        animation: blinkCursor 1s step-end infinite;
    }

@keyframes blinkCursor {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* DUAL GRID (Summary & Chart) */
.s21-dual-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stack on mobile */
    gap: 16px;
}

/* SUMMARY CARD */
.s21-summary-card, .s21-predictive-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.s21-summary-card-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s21-summary-patient-id {
    color: var(--hims-cyan);
}

.s21-summary-block-cyan, .s21-summary-block-warning {
    background: #050D24;
    padding: 12px;
    border-radius: 0 8px 8px 0;
}

.s21-summary-block-cyan {
    border-left: 3px solid var(--hims-cyan);
    margin-bottom: 8px;
}

.s21-summary-block-warning {
    border-left: 3px solid var(--hims-warning);
}

.s21-summary-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.5;
}

/* PREDICTIVE CHART CARD */
.s21-predictive-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.s21-predictive-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hims-white);
    line-height: 1;
    margin-bottom: 4px;
}

.s21-predictive-sub {
    font-size: 0.75rem;
    color: var(--hims-error);
    margin-bottom: 16px;
}

/* Animated CSS Chart */
.s21-mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 100px; /* Fixed height for animation frame */
    padding-top: 10px;
    margin-top: auto;
}

.s21-bar-h30, .s21-bar-h45, .s21-bar-h35, .s21-bar-h50, .s21-bar-highlight, .s21-bar-h60 {
    flex: 1;
    border-radius: 4px 4px 0 0;
    transform-origin: bottom;
    animation: growBar 1.5s ease-out forwards;
}

/* Individual Heights & Colors */
.s21-bar-h30 {
    height: 30%;
    background: rgba(255,255,255,0.1);
}

.s21-bar-h45 {
    height: 45%;
    background: rgba(255,255,255,0.1);
}

.s21-bar-h35 {
    height: 35%;
    background: rgba(255,255,255,0.1);
}

.s21-bar-h50 {
    height: 50%;
    background: rgba(255,255,255,0.1);
}

.s21-bar-h60 {
    height: 60%;
    background: rgba(255,255,255,0.1);
}

/* The AI Highlighted Bar */
.s21-bar-highlight {
    height: 85%;
    background: linear-gradient(180deg, var(--hims-cyan) 0%, rgba(0,200,255,0.2) 100%);
    position: relative;
    box-shadow: 0 0 15px rgba(0,200,255,0.2);
}

.s21-bar-label {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--hims-cyan);
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
}

@keyframes growBar {
    0% {
        transform: scaleY(0);
    }

    100% {
        transform: scaleY(1);
    }
}

/* =========================================
   FLOATING AI ANOMALY CARD
========================================= */
.s21-ai-card {
    position: relative;
    margin: -24px auto 0; /* Centered overlap on mobile */
    background: rgba(11, 29, 82, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(247, 144, 9, 0.4); /* Warning Orange Border */
    border-radius: 12px;
    padding: 16px;
    width: 90%;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5), inset 0 0 15px rgba(247, 144, 9, 0.05);
    z-index: 10;
    animation: floatAiS21Mobile 5s ease-in-out infinite;
}

.s21-ai-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.s21-ai-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(247, 144, 9, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-warning);
    font-size: 14px;
}

.s21-ai-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--hims-warning);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.s21-ai-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.5;
}

@keyframes floatAiS21Mobile {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* =========================================
   DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 1024px) {
    .s21-section {
        padding: var(--pad-y) 0;
    }

    .s21-grid {
        display: grid;
        grid-template-columns: 1fr 1.2fr; /* Crisp Desktop Split */
        gap: 80px;
    }

    .s21-feature-item {
        padding: 0;
        border: none;
        background: transparent;
    }

    /* Reverting Dashboard Layout to Left-Sidebar */
    .s21-dashboard {
        flex-direction: row;
        height: 560px;
        min-height: auto;
    }

    .s21-sidebar {
        width: 64px;
        height: 100%;
        border-top: none;
        border-right: 1px solid rgba(255,255,255,0.05);
        padding: 24px 0;
        flex-direction: column;
        justify-content: flex-start;
        gap: 24px;
        order: 1;
    }

    .s21-main-content {
        order: 2;
    }

    .s21-sidebar-icon-active, .s21-sidebar-icon-dim {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .s21-header {
        padding: 0 24px;
        height: 72px;
    }

    .s21-header-title {
        font-size: 1.15rem;
    }

    .s21-content-area {
        padding: 24px;
        gap: 20px;
    }

    .s21-nl-search {
        padding: 16px 20px;
        gap: 16px;
    }

    .s21-nl-search-icon {
        font-size: 18px;
    }

    .s21-nl-search-text {
        font-size: 0.9rem;
    }

    /* Dual Grid for Desktop */
    .s21-dual-grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 20px;
    }

    .s21-summary-card, .s21-predictive-card {
        padding: 20px;
    }

    .s21-summary-text {
        font-size: 0.85rem;
    }

    .s21-predictive-value {
        font-size: 2rem;
    }

    .s21-mini-chart {
        gap: 8px;
        padding-top: 15px;
    }

    /* Desktop Floating AI Card Position */
    .s21-ai-card {
        position: absolute;
        bottom: 40px;
        right: -30px;
        left: auto;
        margin: 0;
        width: 300px;
        padding: 24px;
        animation: floatAiS21Desktop 6s ease-in-out infinite;
    }

    @keyframes floatAiS21Desktop {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-15px);
        }
    }
}

/*==========================================================================
   SECTION 22 & 23: EXECUTIVE ANALYTICS COMMAND CENTER
   THEME: ULTRA-PREMIUM DARK MODE DASHBOARD (100% RESPONSIVE)
========================================================================== */

/* Outer Section */
.s22-section {
    background-color: #03091A; /* Deep Space Navy */
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 80px 0; /* Mobile padding */
    z-index: 5;
}

/* Futuristic Grid Background */
.s22-bg-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(25, 55, 143, 0.15) 1px, transparent 1px), linear-gradient(90deg, rgba(25, 55, 143, 0.15) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

/* Center Core Glow */
.s22-bg-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    height: 90vw;
    max-width: 800px;
    max-height: 800px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.05) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.s22-container {
    position: relative;
    z-index: 2;
}

/* =========================================
   SECTION HEADER
========================================= */
.s22-heading-wrap {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 16px;
}

.s22-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-cyan);
    background: rgba(0,200,255,0.1);
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(0,200,255,0.2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.s22-heading-title {
    color: var(--hims-white);
    margin-top: 20px;
    margin-bottom: 16px;
    font-size: clamp(2rem, 5vw, 3rem); /* Fluid sizing */
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.s22-lead {
    margin: 0 auto;
    color: rgba(255,255,255,0.7);
    max-width: 700px;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    line-height: 1.6;
}

/* =========================================
   THE DASHBOARD CONTAINER (Mobile First)
========================================= */
.s22-dashboard {
    background: #050D24;
    border-radius: 20px;
    border: 1px solid rgba(0, 200, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), inset 0 0 30px rgba(0,200,255,0.02);
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    overflow: hidden;
    height: auto;
    position: relative;
}

/* MOBILE BOTTOM APP NAV */
.s22-sidebar {
    width: 100%;
    height: 60px;
    background: #020612;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 0 16px;
    order: 2; /* Pushed to bottom */
}

.s22-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px; /* Reduced for mobile */
    order: 1; /* Pulled to top */
    overflow-x: hidden;
}

/* Sidebar Icons */
.s22-sidebar-icon-active, .s22-sidebar-icon-cyan, .s22-sidebar-icon-dim, .s22-sidebar-icon-dim-bottom {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.s22-sidebar-icon-active {
    background: var(--hims-primary);
    color: var(--hims-white);
    box-shadow: 0 0 15px rgba(25, 55, 143, 0.6);
}

.s22-sidebar-icon-cyan {
    background: rgba(0, 200, 255, 0.1);
    border: 1px solid rgba(0,200,255,0.3);
    color: var(--hims-cyan);
}

.s22-sidebar-icon-dim, .s22-sidebar-icon-dim-bottom {
    color: rgba(255,255,255,0.3);
}

    .s22-sidebar-icon-dim:hover {
        background: rgba(255,255,255,0.05);
        color: var(--hims-white);
    }

/* =========================================
   DASHBOARD HEADER
========================================= */
.s22-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; /* Wrap on small screens */
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 24px;
}

.s22-header-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--hims-white);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.s22-header-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
}

.s22-header-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.s22-date-pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--hims-white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

    .s22-date-pill:hover {
        background: rgba(255,255,255,0.1);
    }

.s22-chevron-dim {
    font-size: 10px;
    opacity: 0.5;
    margin-left: 4px;
}

.s22-live-pill {
    background: rgba(18, 183, 106, 0.1);
    border: 1px solid rgba(18, 183, 106, 0.2);
    color: var(--hims-success);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.s22-live-dot {
    width: 6px;
    height: 6px;
    background: var(--hims-success);
    border-radius: 50%;
    display: inline-block;
    animation: pulseLiveSync 2s infinite;
}

@keyframes pulseLiveSync {
    0% {
        box-shadow: 0 0 0 0 rgba(18,183,106,0.6);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(18,183,106,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(18,183,106,0);
    }
}

/* =========================================
   4 KPI CARDS (2x2 Grid on Mobile)
========================================= */
.s22-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile 2 columns */
    gap: 12px;
    margin-bottom: 24px;
}

.s22-kpi-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px;
    padding-bottom: 30px; /* Space for sparkline */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.s22-kpi-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 8px;
}

.s22-kpi-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    line-height: 1.3;
}

/* KPI Icons */
.s22-kpi-icon-cyan, .s22-kpi-icon-warning, .s22-kpi-icon-success, .s22-kpi-icon-error {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.s22-kpi-icon-cyan {
    background: rgba(0,200,255,0.1);
    color: var(--hims-cyan);
}

.s22-kpi-icon-warning {
    background: rgba(247,144,9,0.1);
    color: var(--hims-warning);
}

.s22-kpi-icon-success {
    background: rgba(18,183,106,0.1);
    color: var(--hims-success);
}

.s22-kpi-icon-error {
    background: rgba(240,68,56,0.1);
    color: var(--hims-error);
}

.s22-kpi-value, .s22-kpi-value-success {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    z-index: 2;
}

.s22-kpi-value {
    color: var(--hims-white);
}

.s22-kpi-value-success {
    color: var(--hims-success);
}

.s22-kpi-value-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.s22-kpi-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    z-index: 2;
}

.s22-kpi-trend-success {
    color: var(--hims-success);
    background: rgba(18,183,106,0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
}

.s22-kpi-trend-warning {
    color: var(--hims-warning);
    background: rgba(247,144,9,0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
}

.s22-kpi-trend-error {
    color: var(--hims-error);
    background: rgba(240,68,56,0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
}

.s22-kpi-sub-text {
    color: rgba(255,255,255,0.4);
}

/* Animated Sparkline inside KPI */
.s22-sparkline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 0 4px;
    opacity: 0.15;
    z-index: 1;
}

.s22-spark-bar {
    flex: 1;
    background: var(--hims-cyan);
    border-radius: 2px 2px 0 0;
    transform-origin: bottom;
    animation: growUp 1.5s ease-out forwards;
}

.s22-spark-h20 {
    height: 20%;
}

.s22-spark-h40 {
    height: 40%;
}

.s22-spark-h30 {
    height: 30%;
}

.s22-spark-h60 {
    height: 60%;
}

.s22-spark-h50 {
    height: 50%;
}

.s22-spark-h80 {
    height: 80%;
}


/* =========================================
   MAIN CHARTS AREA (Stacked on Mobile)
========================================= */
.s22-charts-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile stack */
    gap: 20px;
    flex: 1;
}

.s22-chart-card, .s22-dept-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* CHART 1: REVENUE TREND */
.s22-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.s22-chart-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hims-white);
}

.s22-legend {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
}

.s22-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.s22-legend-dot-cyan {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--hims-cyan);
}

.s22-legend-dot-primary {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--hims-primary);
}

/* Animated CSS Bar Chart */
.s22-bar-chart {
    flex: 1;
    min-height: 160px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.s22-chart-col {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
    position: relative;
    cursor: pointer;
}

    .s22-chart-col:hover {
        opacity: 0.8;
    }

/* Reusable animated segments */
.s22-seg-primary-h20, .s22-seg-cyan-h15, .s22-seg-primary-h35, .s22-seg-cyan-h25,
.s22-seg-primary-h50, .s22-seg-cyan-h30, .s22-seg-active-primary, .s22-seg-active-cyan {
    width: 100%;
    border-radius: 4px 4px 0 0;
    transform-origin: bottom;
    animation: growUp 1.5s ease-out forwards;
}

.s22-seg-primary-h20 {
    height: 20%;
    background: linear-gradient(0deg, rgba(25, 55, 143, 0.8), var(--hims-primary));
}

.s22-seg-cyan-h15 {
    height: 15%;
    background: linear-gradient(0deg, rgba(0, 200, 255, 0.6), var(--hims-cyan));
}

.s22-seg-primary-h35 {
    height: 35%;
    background: linear-gradient(0deg, rgba(25, 55, 143, 0.8), var(--hims-primary));
}

.s22-seg-cyan-h25 {
    height: 25%;
    background: linear-gradient(0deg, rgba(0, 200, 255, 0.6), var(--hims-cyan));
}

.s22-seg-primary-h50 {
    height: 50%;
    background: linear-gradient(0deg, rgba(25, 55, 143, 0.8), var(--hims-primary));
}

.s22-seg-cyan-h30 {
    height: 30%;
    background: linear-gradient(0deg, rgba(0, 200, 255, 0.6), var(--hims-cyan));
}

/* Highlighted Column */
.s22-seg-active-primary {
    height: 40%;
    background: linear-gradient(0deg, rgba(25, 55, 143, 1), var(--hims-blue-bright));
    box-shadow: 0 0 15px rgba(52, 120, 255, 0.5);
}

.s22-seg-active-cyan {
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 200, 255, 0.8), #4DF);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
    z-index: 2;
}

.s22-seg-dashed-h20 {
    width: 100%;
    height: 20%;
    background: rgba(255,255,255,0.05);
    border-radius: 4px 4px 0 0;
    border: 1px dashed rgba(255,255,255,0.1);
}

.s22-seg-dashed-h10 {
    width: 100%;
    height: 10%;
    background: rgba(255,255,255,0.05);
    border-radius: 4px 4px 0 0;
    border: 1px dashed rgba(255,255,255,0.1);
}

.s22-chart-x-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
}

.s22-chart-x-label-active {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--hims-white);
    font-weight: 700;
}

.s22-chart-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--hims-white);
    color: var(--hims-navy);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    animation: popIn 0.5s ease-out forwards;
}

@keyframes growUp {
    0% {
        transform: scaleY(0);
    }

    100% {
        transform: scaleY(1);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* CHART 2: DEPARTMENT LOAD */
.s22-dept-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hims-white);
    margin-bottom: 20px;
}

.s22-dept-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s22-dept-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 6px;
}

.s22-dept-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hims-white);
}

.s22-dept-value-error {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hims-error);
}

.s22-dept-value-warning {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hims-warning);
}

.s22-dept-value-success {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hims-success);
}

.s22-dept-pct {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
}

.s22-dept-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}

/* Animated Fill Bars */
.s22-dept-fill-error, .s22-dept-fill-warning, .s22-dept-fill-success {
    height: 100%;
    border-radius: 3px;
    transform-origin: left;
    animation: fillWidth 1.5s ease-out forwards;
}

.s22-dept-fill-error {
    width: 96%;
    background: var(--hims-error);
    box-shadow: 0 0 10px rgba(240,68,56,0.6);
}

.s22-dept-fill-warning {
    width: 85%;
    background: var(--hims-warning);
}

.s22-dept-fill-success {
    width: 60%;
    background: var(--hims-success);
}

@keyframes fillWidth {
    0% {
        transform: scaleX(0);
    }

    100% {
        transform: scaleX(1);
    }
}

/* LIVE OPERATIONS FEED */
.s22-live-feed {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.s22-live-feed-label {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 700;
}

.s22-live-feed-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.4;
}

.s22-live-feed-time {
    color: var(--hims-cyan);
    font-weight: 600;
    white-space: nowrap;
}

.s22-live-feed-dot {
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

/* =========================================
   FLOATING AI ALERT CARD
========================================= */
.s22-ai-card {
    position: relative;
    margin: -30px auto 0; /* Centered overlap on mobile */
    background: rgba(2, 6, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(247, 144, 9, 0.4);
    border-radius: 16px;
    padding: 16px 20px;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), inset 0 0 15px rgba(247, 144, 9, 0.05);
    z-index: 10;
    animation: floatAiAlertMobile 5s ease-in-out infinite;
}

.s22-ai-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.s22-ai-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(247, 144, 9, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-warning);
    font-size: 14px;
}

.s22-ai-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--hims-warning);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.s22-ai-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.5;
}

@keyframes floatAiAlertMobile {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* =========================================
   DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 992px) {
    .s22-section {
        padding: 140px 0;
    }

    .s22-heading-wrap {
        margin-bottom: 64px;
    }


    .s22-dashboard {
        flex-direction: row;
        min-height: 640px;
    }

    .s22-sidebar {
        width: 72px;
        height: 100%;
        border-top: none;
        border-right: 1px solid rgba(255,255,255,0.05);
        padding: 24px 0;
        flex-direction: column;
        justify-content: flex-start;
        gap: 24px;
        order: 1;
    }

    .s22-main-area {
        order: 2;
        padding: 24px 32px;
    }

    .s22-sidebar-icon-active, .s22-sidebar-icon-cyan, .s22-sidebar-icon-dim, .s22-sidebar-icon-dim-bottom {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .s22-sidebar-icon-dim-bottom {
        margin-top: auto;
    }
    /* Pushes gear icon to bottom */

    .s22-header {
        padding-bottom: 24px;
        margin-bottom: 24px;
        flex-wrap: nowrap;
    }

    .s22-header-title {
        font-size: 1.25rem;
    }

    /* 4-Column KPI Grid */
    .s22-kpi-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .s22-kpi-card {
        padding: 20px;
        padding-bottom: 30px;
    }

    /* 2-Column Charts Grid */
    .s22-charts-grid {
        grid-template-columns: 2fr 1.2fr;
        gap: 24px;
    }

    .s22-chart-card, .s22-dept-card {
        padding: 24px;
    }

    .s22-bar-chart {
        gap: 16px;
        padding-bottom: 20px;
    }

    /* Desktop Floating Alert Card */
    .s22-ai-card {
        position: absolute;
        top: 100px;
        right: -20px;
        left: auto;
        margin: 0;
        width: 300px;
        padding: 20px;
        animation: floatAiAlertDesktop 6s ease-in-out infinite;
    }

    @keyframes floatAiAlertDesktop {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-15px);
        }
    }
}


/*==========================================================================
   SECTION 25 & 26: ENTERPRISE CLOUD & SECURITY (3D ARCHITECTURE)
   THEME: ULTRA-PREMIUM SAAS WITH ISOMETRIC 3D (100% RESPONSIVE)
========================================================================== */

.bg-soft {
    background-color: var(--hims-bg-soft);
}

.s25-section {
    position: relative;
    padding: 60px 0 80px; /* Mobile padding */
    overflow: hidden;
    z-index: 5;
}

/* SUBTLE BACKGROUND ACCENT */
.s25-bg-accent {
    position: absolute;
    top: 0;
    left: -10%;
    width: 80vw;
    height: 80vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(25, 55, 143, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* =========================================
   MOBILE-FIRST GRID & TEXT CONTENT
========================================= */
.s25-grid {
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    gap: 48px;
    position: relative;
    z-index: 1;
}

.s25-left {
    padding-right: 0;
}

.s25-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--hims-blue-bright);
    background: rgba(52, 120, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(52, 120, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.s25-title {
    font-size: clamp(1.8rem, 6vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.s25-lead {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* FEATURES LIST */
.s25-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s25-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--rad-md);
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

    .s25-feature-item:hover {
        transform: translateX(5px);
        border-color: rgba(52, 120, 255, 0.3);
    }

.s25-feature-icon {
    color: var(--hims-primary);
    background: rgba(25, 55, 143, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.s25-feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.s25-feature-desc {
    font-size: 0.85rem;
    color: var(--text-sec);
    line-height: 1.5;
}

/* BENEFIT BOX */
.s25-benefit-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--hims-white);
    padding: 16px;
    border-radius: var(--rad-md);
    border: 1px solid var(--hims-border);
    border-left: 4px solid var(--hims-primary);
    box-shadow: var(--shadow-sm);
}

.s25-benefit-icon-wrap {
    width: 40px;
    height: 40px;
    background: rgba(25, 55, 143, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.s25-benefit-icon {
    font-size: 18px;
    color: var(--hims-primary);
}

.s25-benefit-text {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
}

/* =========================================
   RIGHT SIDE: 3D ARCHITECTURE VISUAL
========================================= */
.s25-right {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.s25-3d-wrapper {
    height: 400px; /* Scaled for mobile */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    position: relative;
    margin-bottom: 32px;
}

/* Isometric Rotation */
.s25-3d-stack {
    transform-style: preserve-3d;
    transform: rotateX(60deg) rotateZ(-45deg);
    width: 260px; /* Reduced for mobile */
    height: 260px;
    position: relative;
    animation: float3DStack 6s ease-in-out infinite;
}

@keyframes float3DStack {
    0%, 100% {
        transform: rotateX(60deg) rotateZ(-45deg) translateZ(0px);
    }

    50% {
        transform: rotateX(60deg) rotateZ(-45deg) translateZ(15px);
    }
}

/* CONNECTING DATA BEAM */
.s25-beam {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 260px;
    background: linear-gradient(180deg, var(--hims-cyan), var(--hims-primary));
    /* Pivot to center and stand upright relative to stack */
    transform: translate(-50%, -50%) rotateX(90deg);
    box-shadow: 0 0 15px var(--hims-cyan);
    z-index: 0;
    transform-style: preserve-3d;
}

/* GPU Accelerated Particles */
.s25-particle-down, .s25-particle-v {
    position: absolute;
    left: -2px;
    width: 8px;
    height: 8px;
    background: var(--hims-white);
    border-radius: 50%;
    box-shadow: 0 0 12px #fff, 0 0 20px var(--hims-cyan);
    will-change: transform;
}

.s25-particle-down {
    top: 0;
    animation: flowDownGPU 2s linear infinite;
}

.s25-particle-v {
    bottom: 0;
    animation: flowUpGPU 2.5s linear infinite;
}

@keyframes flowDownGPU {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(260px);
        opacity: 0;
    }
}

@keyframes flowUpGPU {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-260px);
        opacity: 0;
    }
}

/* =========================================
   3D LAYERS
========================================= */

/* LAYER 3: ENCRYPTED DATABASE (Bottom Layer) */
.s25-layer-db {
    position: absolute;
    inset: 0;
    transform: translateZ(-100px); /* Lower depth for mobile */
    background: rgba(11, 29, 82, 0.95);
    border: 2px solid var(--hims-primary);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 30px rgba(25, 55, 143, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--hims-white);
    z-index: 1;
}

.s25-layer-db-icon {
    font-size: 32px;
    color: var(--hims-primary);
    margin-bottom: 12px;
    text-shadow: var(--glow-primary);
}

.s25-layer-title {
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-align: center;
}

.s25-tag-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.s25-tag {
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
}

/* LAYER 2: HIMS APPLICATION (Middle Layer) */
.s25-layer-api {
    position: absolute;
    inset: 0;
    transform: translateZ(20px);
    background: rgba(25, 55, 143, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--hims-white);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    z-index: 2;
}

.s25-api-icons-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.s25-api-icon-white {
    background: var(--hims-white);
    color: var(--hims-primary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: var(--shadow-sm);
}

.s25-api-icon-cyan {
    background: var(--hims-cyan);
    color: var(--hims-navy);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: var(--glow-cyan);
}

.s25-layer-title-shadow {
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    text-align: center;
}

/* LAYER 1: SECURE ACCESS (Top Layer) */
.s25-layer-access {
    position: absolute;
    inset: 0;
    transform: translateZ(140px); /* Top depth */
    background: rgba(0, 200, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 2px dashed var(--hims-cyan);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--hims-primary);
    box-shadow: 0 10px 30px rgba(0, 200, 255, 0.1);
    z-index: 3;
}

.s25-access-icons-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.s25-access-pill {
    background: rgba(0,200,255,0.1);
    border: 1px solid var(--hims-cyan);
    color: var(--hims-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 9px;
    display: flex;
    gap: 4px;
    align-items: center;
}

.s25-layer-title-plain {
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1px;
    text-align: center;
}

/* =========================================
   FLOATING BADGES (Safely Stacked on Mobile)
========================================= */
.s25-badge-uptime, .s25-badge-compliance {
    position: relative; /* Fixed for mobile */
    background: var(--hims-white);
    border: 1px solid var(--hims-border);
    border-radius: 16px;
    padding: 16px 20px;
    width: 90%;
    max-width: 320px;
    margin: 0 auto 16px;
    box-shadow: 0 15px 30px rgba(25, 55, 143, 0.1);
    z-index: 10;
}

.s25-badge-compliance {
    background: var(--hims-navy);
    color: var(--hims-white);
    border: 1px solid var(--hims-primary);
    margin-bottom: 0;
}

/* Badge Contents */
.s25-badge-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.s25-badge-icon-success {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(18, 183, 106, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-success);
    font-size: 14px;
}

.s25-badge-icon-cyan {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 200, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hims-cyan);
    font-size: 14px;
}

.s25-badge-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-sec);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.s25-badge-label-cyan {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--hims-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.s25-badge-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1;
}

.s25-badge-desc {
    font-size: 0.85rem;
    color: var(--text-sec);
    margin: 0;
    line-height: 1.4;
}

.s25-compliance-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.s25-compliance-tag {
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.1);
}

/* =========================================
   DESKTOP RESPONSIVENESS
========================================= */
@media (min-width: 1024px) {
    .s25-section {
        padding: var(--pad-y) 0;
    }

    .s25-grid {
        display: grid;
        grid-template-columns: 0.8fr 1.2fr; /* Perfect SaaS Split */
        gap: 80px;
    }

    .s25-left {
        padding-right: 20px;
    }

    .s25-feature-item {
        padding: 0;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    /* 3D Desktop Enhancements */
    .s25-3d-wrapper {
        height: 600px;
        margin-bottom: 0;
    }

    .s25-3d-stack {
        width: 340px;
        height: 340px;
    }

    .s25-beam {
        height: 340px;
    }

    /* Desktop Depths */
    .s25-layer-db {
        transform: translateZ(-140px);
        border-radius: 32px;
    }

    .s25-layer-api {
        transform: translateZ(20px);
        border-radius: 32px;
    }

    .s25-layer-access {
        transform: translateZ(180px);
        border-radius: 32px;
    }

    .s25-layer-db-icon {
        font-size: 48px;
    }

    .s25-layer-title, .s25-layer-title-shadow, .s25-layer-title-plain {
        font-size: 16px;
    }

    .s25-api-icons-row {
        gap: 24px;
        margin-bottom: 20px;
    }

    .s25-api-icon-white, .s25-api-icon-cyan {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .s25-access-icons-row {
        gap: 16px;
        margin-bottom: 20px;
    }

    .s25-access-pill {
        padding: 8px 16px;
        font-size: 11px;
    }

    /* Desktop Badges turn into Floating Elements */
    .s25-badge-uptime, .s25-badge-compliance {
        position: absolute; /* Re-enable floating for desktop */
        margin: 0;
        width: 240px;
    }

    .s25-badge-uptime {
        top: 40px;
        right: -20px;
        animation: floatBadgeS25 6s ease-in-out infinite;
    }

    .s25-badge-compliance {
        bottom: 60px;
        left: -40px;
        animation: floatBadgeS25 5s ease-in-out infinite 1s;
    }

    .s25-badge-value {
        font-size: 2rem;
    }

    @keyframes floatBadgeS25 {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-15px);
        }
    }

    @keyframes flowDownGPU {
        0% {
            transform: translateY(0);
            opacity: 0;
        }

        10% {
            opacity: 1;
        }

        90% {
            opacity: 1;
        }

        100% {
            transform: translateY(340px);
            opacity: 0;
        }
    }

    @keyframes flowUpGPU {
        0% {
            transform: translateY(0);
            opacity: 0;
        }

        10% {
            opacity: 1;
        }

        90% {
            opacity: 1;
        }

        100% {
            transform: translateY(-340px);
            opacity: 0;
        }
    }
}