/* ==========================================================================
   ADGRAM IRIS - AUTONOMOUS GLOWING VOICE ORB EXPERIENCE
   ========================================================================== */

:root {
    --bg-dark: #07090e;
    --bg-card: rgba(16, 22, 36, 0.75);
    --bg-input: rgba(12, 17, 28, 0.85);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --cyan: #00d2ff;
    --cyan-glow: rgba(0, 210, 255, 0.5);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.5);
    --warning: #f59e0b;
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-malayalam: 'Noto Sans Malayalam', sans-serif;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.voice-orb-experience {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Atmospheric Ambient Background Mesh */
.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.22;
    animation: orbMeshFloat 20s infinite alternate ease-in-out;
}

.orb-primary {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #00d2ff 0%, #1d4ed8 70%);
    top: -150px;
    left: 20%;
}

.orb-secondary {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8b5cf6 0%, #6d28d9 70%);
    bottom: -150px;
    right: 15%;
    animation-delay: -6s;
}

.orb-accent {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #10b981 0%, #047857 70%);
    top: 45%;
    left: 40%;
    animation-delay: -11s;
    opacity: 0.15;
}

@keyframes orbMeshFloat {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(40px) scale(1.1); }
}

/* Minimalist Responsive Glass Header */
.app-header {
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(7, 9, 14, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.28rem;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.accent-text {
    color: var(--cyan);
}

.iris-badge {
    background: linear-gradient(135deg, #00d2ff, #8b5cf6);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    letter-spacing: 0.06em;
    box-shadow: 0 0 12px var(--cyan-glow);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 600px) {
    .app-header {
        padding: 10px 14px;
    }

    .header-actions {
        gap: 6px;
    }

    .header-actions .control-btn {
        padding: 5px 8px;
        font-size: 0.72rem;
        gap: 4px;
        white-space: nowrap;
    }

    .header-actions .voice-toggle {
        width: 30px;
        height: 30px;
        padding: 0 !important;
    }

    .whatsapp-popover {
        right: 12px;
        top: 50px;
        width: min(290px, calc(100vw - 24px));
    }
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: var(--transition);
    flex-shrink: 0;
}

.control-btn.active {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.voice-toggle {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    flex-shrink: 0;
}

.voice-toggle .icon-speaker {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    display: block;
}

.auto-talk-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.auto-talk-toggle .live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #64748b;
}

.auto-talk-toggle.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 14px var(--success-glow);
}

.auto-talk-toggle.active .live-dot {
    background: #10b981;
}

.live-dot.pulsing {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* WhatsApp Status & Logout Menu */
.whatsapp-control-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.whatsapp-status-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: var(--transition);
}

.whatsapp-status-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(37, 211, 102, 0.4);
}

.wa-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #64748b;
    transition: var(--transition);
    pointer-events: none;
}

.wa-btn-label {
    pointer-events: none;
}

.wa-status-dot.connected {
    background: #25d366;
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.8);
    animation: livePulse 2s infinite;
}

.wa-status-dot.waiting {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
    animation: livePulse 1.5s infinite;
}

.whatsapp-popover {
    position: fixed;
    top: 56px;
    right: 24px;
    width: 270px;
    background: rgba(13, 17, 23, 0.96);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.3);
    padding: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeInDown 0.18s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.wa-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.wa-popover-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
}

.wa-status-pill {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.wa-status-pill.connected {
    background: rgba(37, 211, 102, 0.18);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.4);
}

.wa-status-pill.waiting {
    background: rgba(245, 158, 11, 0.18);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.wa-field {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    line-height: 1.4;
}

.wa-field-label {
    color: var(--text-muted);
}

.wa-field-val {
    color: #ffffff;
    font-weight: 600;
}

.wa-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.35;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.wa-logout-btn {
    width: 100%;
    padding: 7px 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.wa-logout-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.35);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.wa-logout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Center Stage: The Autonomous Glowing Voice Orb Experience */
.orb-stage-layout {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    padding: 6px 16px 12px 16px;
    height: calc(100vh - 58px);
    height: calc(100dvh - 58px);
}

.orb-center-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* Grand Glowing Iris Orb */
.orb-halo-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-bottom: 24px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.orb-ambient-aura {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.35) 0%, rgba(139, 92, 246, 0.25) 50%, transparent 75%);
    filter: blur(35px);
    transition: var(--transition);
    animation: auraBreath 4s infinite alternate ease-in-out;
}

.orb-outer-ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow: inset 0 0 20px rgba(0, 210, 255, 0.1);
    animation: outerRingRotate 24s linear infinite;
}

.iris-core-orb {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #00e5ff 0%, #3b82f6 45%, #7c3aed 80%, #0f172a 100%);
    box-shadow: 0 0 50px rgba(0, 210, 255, 0.5), inset 0 0 35px rgba(255, 255, 255, 0.5);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.orb-inner-wave {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
    animation: innerWaveSpin 12s linear infinite;
}

.orb-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    opacity: 0;
}

/* Dynamic State Animations for the Orb */
/* 1. IDLE STATE */
.iris-core-orb.idle {
    animation: orbIdlePulse 3.5s infinite alternate ease-in-out;
}

@keyframes orbIdlePulse {
    0% { transform: scale(0.97); box-shadow: 0 0 35px rgba(0, 210, 255, 0.35); }
    100% { transform: scale(1.03); box-shadow: 0 0 55px rgba(139, 92, 246, 0.5); }
}

/* 2. LISTENING STATE (Vibrant Emerald & Cyan Pulse) */
.iris-core-orb.listening {
    background: radial-gradient(circle at 35% 35%, #34d399 0%, #10b981 45%, #00d2ff 85%, #064e3b 100%);
    box-shadow: 0 0 70px rgba(16, 185, 129, 0.7), inset 0 0 40px rgba(255, 255, 255, 0.7);
    animation: orbListeningPulse 1.2s infinite alternate ease-in-out;
}

.iris-core-orb.listening + .orb-pulse {
    animation: pulseRing 1.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes orbListeningPulse {
    0% { transform: scale(1.02); }
    100% { transform: scale(1.12); box-shadow: 0 0 85px rgba(16, 185, 129, 0.85); }
}

/* 3. THINKING STATE (Swirling Violet & Ultraviolet Nebula) */
.iris-core-orb.thinking {
    background: radial-gradient(circle at 35% 35%, #c084fc 0%, #8b5cf6 50%, #3b82f6 85%, #1e1b4b 100%);
    box-shadow: 0 0 75px rgba(139, 92, 246, 0.8);
    animation: orbThinkingRotate 2.5s infinite linear;
}

@keyframes orbThinkingRotate {
    0% { transform: rotate(0deg) scale(0.98); }
    50% { transform: rotate(180deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(0.98); }
}

/* 4. SPEAKING STATE (Luminous Audio Wave Oscillation) */
.iris-core-orb.speaking {
    background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #00d2ff 45%, #8b5cf6 85%, #0c4a6e 100%);
    box-shadow: 0 0 80px rgba(0, 210, 255, 0.8), inset 0 0 45px rgba(255, 255, 255, 0.75);
    animation: orbSpeakingBounce 0.6s infinite alternate ease-in-out;
}

@keyframes orbSpeakingBounce {
    0% { transform: scale(1.04); }
    100% { transform: scale(1.15); box-shadow: 0 0 95px rgba(0, 210, 255, 0.95); }
}

@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

@keyframes auraBreath {
    0% { transform: scale(0.95); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 0.9; }
}

@keyframes outerRingRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes innerWaveSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status & Telemetry */
.orb-telemetry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.orb-status-text {
    font-size: 0.92rem;
    font-weight: 500;
    color: #93c5fd;
    letter-spacing: 0.01em;
    text-align: center;
}

/* Audio Waveform */
.audio-waveform-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 24px;
}

.waveform-bars {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 20px;
}

.waveform-bars .bar {
    width: 3px;
    height: 6px;
    background: var(--cyan);
    border-radius: var(--radius-full);
    animation: soundWave 0.8s infinite alternate ease-in-out;
}

.waveform-bars .bar.b1 { animation-delay: 0.1s; }
.waveform-bars .bar.b2 { animation-delay: 0.3s; }
.waveform-bars .bar.b3 { animation-delay: 0.5s; }
.waveform-bars .bar.b4 { animation-delay: 0.2s; }
.waveform-bars .bar.b5 { animation-delay: 0.4s; }
.waveform-bars .bar.b6 { animation-delay: 0.6s; }
.waveform-bars .bar.b7 { animation-delay: 0.25s; }
.waveform-bars .bar.b8 { animation-delay: 0.45s; }

@keyframes soundWave {
    0% { height: 4px; }
    100% { height: 22px; background: #8b5cf6; }
}

/* Simple Textual Guidance & Instructional Elements */
.iris-intro-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 4px auto 12px auto;
    max-width: 540px;
    animation: fadeIn 0.3s ease;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.iris-avatar-mini {
    background: linear-gradient(135deg, #00d2ff, #8b5cf6);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 9999px;
    letter-spacing: 0.04em;
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

.hero-chip-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: -0.01em;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 3px;
}

.iris-text-gradient {
    background: linear-gradient(135deg, #00d2ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 6px;
    margin-bottom: 6px;
}

.quick-guide-strip {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.guide-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    color: #cbd5e1;
    backdrop-filter: blur(8px);
}

.guide-step strong {
    color: #ffffff;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(0, 210, 255, 0.2);
    color: var(--cyan);
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
}

/* Live Dialogue & Speech Feedback Card */
.live-dialogue-card {
    width: 100%;
    max-width: 520px;
    background: rgba(13, 17, 26, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px 18px;
    margin-top: 4px;
    margin-bottom: 10px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    animation: fadeIn 0.3s ease;
}

.dialogue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dialogue-speaker-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dialogue-speaker-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    transition: var(--transition);
}

.dialogue-speaker {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition);
}

.dialogue-hint {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.dialogue-text {
    font-size: 0.92rem;
    line-height: 1.5;
    color: #f1f5f9;
}

/* Suggested Question Starter Chips */
.starter-chips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 540px;
    margin-bottom: 8px;
}

.chips-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 2px;
}

.chip-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 5px 11px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.chip-btn:hover {
    background: rgba(0, 210, 255, 0.14);
    border-color: rgba(0, 210, 255, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.15);
}

.chip-btn:active {
    transform: translateY(0);
}

/* Thinking / Listening Status Pill */
.thinking-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(13, 19, 32, 0.78);
    border: 1px solid rgba(0, 243, 255, 0.28);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 7px 18px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(0, 243, 255, 0.15);
    margin: 8px auto;
    width: fit-content;
    animation: fadeIn 0.3s ease;
}

.thinking-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.thinking-dots span {
    width: 6px;
    height: 6px;
    background: #00f3ff;
    border-radius: 50%;
    animation: thinkingBounce 1.4s infinite ease-in-out both;
    box-shadow: 0 0 6px #00f3ff;
}

.thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots span:nth-child(2) { animation-delay: -0.16s; }
.thinking-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes thinkingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
    40% { transform: scale(1.15); opacity: 1; }
}

.thinking-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}

/* Meeting Confirmed Alert Pill */
.meeting-success-card {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 20px;
    padding: 14px 20px;
    margin-top: 16px;
    width: 100%;
    max-width: 520px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

.success-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.success-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--success);
    color: #07090e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.success-title {
    font-size: 1rem;
    font-weight: 700;
    color: #34d399;
}

.success-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.slot-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.25);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-top: 6px;
}

/* 1. Default Primary Stage: Continuous Text Chat View */
.chat-stage-view {
    flex: 1;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding: 0 12px;
    min-height: 0;
    animation: fadeIn 0.25s ease-out;
}

/* 2. Autonomous Voice Agent Stage (Loaded on button press) */
.voice-stage-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    padding: 16px;
    animation: fadeIn 0.3s ease-out;
}

.voice-mode-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.3);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #00d2ff;
    margin-bottom: 24px;
    box-shadow: 0 0 16px rgba(0, 210, 255, 0.2);
}

.voice-pulse-ring {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00d2ff;
    box-shadow: 0 0 10px #00d2ff;
    animation: livePulse 1.8s infinite;
}

.back-to-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 18px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.back-to-chat-btn:hover {
    background: rgba(0, 210, 255, 0.16);
    border-color: var(--cyan);
    color: #ffffff;
    box-shadow: 0 0 16px var(--cyan-glow);
    transform: translateY(-1px);
}

.voice-agent-toggle-btn.active {
    background: rgba(0, 210, 255, 0.22) !important;
    border-color: #00d2ff !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.4);
}

.messages-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 10px 16px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
    min-height: 0;
}

.messages-scroll-area::-webkit-scrollbar {
    width: 5px;
}

.messages-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.messages-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* =========================================================================
   MESSENGER CHAT LAYOUT (MATCHING REFERENCE IMAGE 3)
   ========================================================================= */

.message-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    animation: fadeIn 0.22s ease-out;
}

.message-group.bot-group {
    align-items: flex-start;
}

.message-group.user-group {
    align-items: flex-end;
}

/* Header Row Above Speech Bubble (matches reference image: Avatar + Name + Time) */
.msg-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    user-select: none;
}

.msg-header-row.bot-header {
    padding-left: 2px;
}

.msg-header-row.user-header {
    padding-right: 2px;
}

.msg-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.msg-avatar.iris-avatar {
    background: linear-gradient(135deg, #00d2ff, #8b5cf6);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.45);
}

.msg-avatar.user-avatar {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.msg-author {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: -0.01em;
}

.msg-time {
    font-size: 0.72rem;
    font-weight: 400;
    color: #94a3b8;
}

/* Speech Bubbles (Clean, rounded, no inner borders or clutter) */
.msg-bubble {
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.55;
    font-size: 0.9rem;
    word-break: break-word;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    max-width: min(580px, 75%);
}

.msg-bubble.bot-bubble {
    background: rgba(22, 30, 48, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-top-left-radius: 4px;
    color: #f1f5f9;
    position: relative;
    transition: var(--transition);
}

.msg-bubble.bot-bubble.is-speaking {
    border-color: rgba(0, 210, 255, 0.55);
    box-shadow: 0 4px 20px rgba(0, 210, 255, 0.22), inset 0 0 12px rgba(0, 210, 255, 0.08);
    cursor: pointer;
}

.bubble-speaker-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 3px 8px;
    background: rgba(0, 210, 255, 0.12);
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    color: #38bdf8;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.bubble-speaker-tag:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

.speaking-wave {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 10px;
}

.speaking-wave span {
    display: inline-block;
    width: 2.5px;
    height: 100%;
    background: #00d2ff;
    border-radius: 2px;
    animation: waveBounce 0.8s ease-in-out infinite alternate;
}

.speaking-wave span:nth-child(2) {
    animation-delay: 0.2s;
}

.speaking-wave span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes waveBounce {
    0% { height: 3px; }
    100% { height: 10px; }
}

.msg-bubble.user-bubble {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.22), rgba(59, 130, 246, 0.28));
    border: 1px solid rgba(0, 210, 255, 0.45);
    border-top-right-radius: 4px;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 210, 255, 0.16);
}

.msg-bubble p {
    margin: 0 0 6px 0;
}

.msg-bubble p:last-child {
    margin-bottom: 0;
}

/* Compatibility aliases */
.message-row { display: flex; width: 100%; animation: fadeIn 0.2s ease; }
.message-row.user-row { justify-content: flex-end; }
.message-row.bot-row { justify-content: flex-start; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 0.88rem; }

.bubble-content strong {
    color: #ffffff;
    font-weight: 600;
}

.bubble-content.has-malayalam {
    font-family: var(--font-malayalam), var(--font-body);
    line-height: 1.7;
    font-size: 0.94rem;
}

.wa-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 211, 102, 0.16);
    border: 1px solid rgba(37, 211, 102, 0.45);
    color: #25d366 !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    margin: 6px 0 2px 0;
    transition: all 0.2s ease;
}

.wa-action-link:hover {
    background: rgba(37, 211, 102, 0.3);
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.4);
    transform: translateY(-1px);
}

/* Bottom Ambient Control Deck */
.orb-control-deck {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.chat-form {
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    padding: 5px 8px 5px 6px;
    backdrop-filter: blur(16px);
    transition: var(--transition);
}

.chat-form:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.25);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.92rem;
    padding: 8px 12px;
    outline: none;
}

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

.mic-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 229, 255, 0.45);
    background: radial-gradient(circle at 35% 35%, rgba(0, 229, 255, 0.35) 0%, rgba(59, 130, 246, 0.28) 60%, rgba(124, 58, 237, 0.2) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.35), inset 0 0 10px rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: visible;
}

.mic-btn:hover {
    transform: scale(1.08);
    border-color: rgba(0, 229, 255, 0.85);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.6), inset 0 0 14px rgba(255, 255, 255, 0.4);
}

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

.mic-btn .icon-mic {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
    stroke-width: 2;
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.8));
    transition: all 0.25s ease;
}

.mic-btn.recording {
    border-color: rgba(52, 211, 153, 0.95) !important;
    background: radial-gradient(circle at 35% 35%, rgba(52, 211, 153, 0.55) 0%, rgba(16, 185, 129, 0.45) 60%, rgba(6, 78, 59, 0.3) 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.85), inset 0 0 14px rgba(255, 255, 255, 0.4) !important;
    animation: micActivePulse 1.2s infinite alternate ease-in-out;
}

.mic-btn.recording .icon-mic {
    stroke: #ffffff !important;
    filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.95)) !important;
}

@keyframes micActivePulse {
    0% { transform: scale(1.02); box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
    100% { transform: scale(1.14); box-shadow: 0 0 36px rgba(16, 185, 129, 0.95); }
}

.send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.send-btn:hover {
    background: var(--cyan);
    color: #07090e;
}

.deck-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
}

.deck-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: var(--transition);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    user-select: none;
}

.deck-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

.deck-btn.active {
    background: rgba(0, 210, 255, 0.16);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 14px var(--cyan-glow);
}

.deck-icon {
    display: block;
    stroke: currentColor;
    flex-shrink: 0;
}

.transcript-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 210, 255, 0.22);
    color: #00f3ff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 210, 255, 0.35);
    min-width: 18px;
    height: 18px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.reset-chat-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
}

.reset-chat-icon-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive Mobile Scaling */
@media (max-width: 600px) {
    .app-header {
        padding: 8px 12px;
    }

    .header-actions {
        gap: 5px;
    }

    .header-actions .control-btn {
        padding: 4px 8px;
        font-size: 0.72rem;
        gap: 4px;
    }

    .reset-chat-icon-btn {
        padding: 6px;
        width: 32px;
        height: 32px;
        justify-content: center;
        border-radius: 50%;
    }

    .reset-chat-icon-btn .reset-text {
        display: none;
    }

    .auto-talk-toggle,
    .voice-toggle {
        display: none !important;
    }

    .chat-stage-view {
        padding: 0 4px;
    }

    .messages-scroll-area {
        padding: 6px 8px 12px 8px;
        gap: 10px;
    }

    .message-row .bubble {
        max-width: 92%;
        padding: 9px 12px;
        font-size: 0.85rem;
    }

    .orb-stage-layout {
        padding: 2px 8px 6px 8px;
    }

    .orb-control-deck {
        padding-bottom: max(6px, env(safe-area-inset-bottom));
        gap: 4px;
    }

    .chat-form {
        padding: 3px 6px 3px 4px;
    }

    .iris-core-orb {
        width: 140px;
        height: 140px;
    }

    .orb-ambient-aura {
        width: 200px;
        height: 200px;
    }

    .orb-outer-ring {
        width: 175px;
        height: 175px;
    }

    .caption-bubble {
        padding: 12px 16px;
    }

    .caption-text {
        font-size: 0.92rem;
    }

    .chat-input {
        font-size: 0.88rem;
        padding: 6px 8px;
    }

    .mic-btn {
        width: 38px;
        height: 38px;
    }

    .send-btn {
        width: 34px;
        height: 34px;
    }
}

/* =========================================================================
   TRON PROTOCOL MASTER AUTH & AI TRAINING SUITE
   ========================================================================= */

/* Keyword Master Authentication Bar */
.master-auth-form {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(8, 14, 24, 0.95);
    border: 1px solid rgba(0, 243, 255, 0.45);
    box-shadow: 0 0 24px rgba(0, 243, 255, 0.22), 0 8px 32px rgba(0, 0, 0, 0.6);
    border-radius: 40px;
    padding: 5px 10px;
    width: 100%;
    max-width: 560px;
    box-sizing: border-box;
    animation: tronPulseBorder 2.5s infinite alternate, slideUp 0.3s ease;
}

@keyframes tronPulseBorder {
    0% { border-color: rgba(0, 243, 255, 0.35); box-shadow: 0 0 16px rgba(0, 243, 255, 0.15); }
    100% { border-color: rgba(0, 243, 255, 0.85); box-shadow: 0 0 28px rgba(0, 243, 255, 0.38); }
}

.master-auth-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 243, 255, 0.12);
    border: 1px solid rgba(0, 243, 255, 0.3);
    padding: 5px 9px;
    border-radius: 16px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tron-live-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00f3ff;
    box-shadow: 0 0 8px #00f3ff;
    animation: blink 1.2s infinite ease-in-out;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.tron-badge-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #00f3ff;
    letter-spacing: 0.06em;
}

.master-input-container {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.master-pwd-input {
    width: 100%;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 6px 8px;
    box-sizing: border-box;
}

.master-pwd-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: normal;
    font-weight: 400;
    font-size: 0.82rem;
}

.master-unlock-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #00d2ff 0%, #0077ff 100%);
    border: none;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 7px 14px;
    border-radius: 18px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.4);
    transition: var(--transition);
}

.master-unlock-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.7);
}

.master-cancel-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.master-cancel-btn:hover {
    background: rgba(255, 80, 80, 0.2);
    color: #ff5555;
}

/* Master Session Pill */
.master-pill-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.35);
    color: #00f3ff;
    padding: 6px 14px;
    border-radius: 24px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    margin-top: 8px;
    backdrop-filter: blur(12px);
    transition: var(--transition);
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.18);
}

.master-pill-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: #00f3ff;
    box-shadow: 0 0 24px rgba(0, 243, 255, 0.4);
}

.master-pill-gem {
    color: #ffcc00;
    filter: drop-shadow(0 0 6px #ffcc00);
}

/* TRON MASTER MODAL OVERLAY */
.tron-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    background: rgba(3, 7, 14, 0.88);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
}

.tron-modal-glass {
    width: 100%;
    max-width: 880px;
    max-height: 94dvh;
    height: auto;
    background: rgba(11, 16, 27, 0.96);
    border: 1px solid rgba(0, 243, 255, 0.35);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 243, 255, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tron-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(14, 21, 35, 0.6);
    flex-shrink: 0;
}

.tron-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.tron-logo-gem {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.25);
}

.tron-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tron-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.04em;
    margin: 0;
}

.tron-version-tag {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    background: rgba(0, 243, 255, 0.15);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: #00f3ff;
    border-radius: 10px;
    letter-spacing: 0.06em;
}

.tron-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 2px 0 0 0;
    line-height: 1.3;
}

.tron-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 4px;
    transition: var(--transition);
}

.tron-close-btn:hover {
    background: rgba(255, 80, 80, 0.2);
    color: #ff5555;
    border-color: rgba(255, 80, 80, 0.4);
}

/* Tabs */
.tron-tab-bar {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(8, 12, 20, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
}

.tron-tab-bar::-webkit-scrollbar {
    display: none;
}

.tron-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.tron-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.tron-tab-btn.active {
    background: rgba(0, 243, 255, 0.12);
    border-color: rgba(0, 243, 255, 0.35);
    color: #00f3ff;
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.15);
}

/* Body & Panes */
.tron-modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 20px;
}

.tron-tab-pane {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tron-tab-pane.active {
    display: block;
}

.tron-section-header {
    margin-bottom: 14px;
}

.tron-sec-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 3px 0;
}

.tron-sec-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Persona Cards */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.persona-card {
    position: relative;
    cursor: pointer;
}

.persona-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.persona-card-inner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.persona-card:hover .persona-card-inner {
    border-color: rgba(0, 243, 255, 0.3);
    background: rgba(0, 243, 255, 0.04);
}

.persona-card input[type="radio"]:checked + .persona-card-inner {
    border-color: #00f3ff;
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.22);
}

.persona-badge {
    font-size: 0.6rem;
    font-weight: 800;
    color: #00f3ff;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.persona-icon {
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.persona-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 5px 0;
}

.persona-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.custom-persona-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
}

.custom-persona-header {
    margin-bottom: 6px;
}

.custom-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
}

.tron-textarea, .tron-prompt-area {
    width: 100%;
    background: rgba(5, 9, 16, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.82rem;
    padding: 8px 10px;
    line-height: 1.5;
    outline: none;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    transition: var(--transition);
}

.tron-textarea:focus, .tron-prompt-area:focus {
    border-color: #00f3ff;
    box-shadow: 0 0 14px rgba(0, 243, 255, 0.2);
}

.tron-prompt-area {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.76rem;
    line-height: 1.5;
    background: rgba(4, 7, 13, 0.92);
}

/* 2-Column Mode Layout */
.tron-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mode-select-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mode-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.mode-option:hover {
    border-color: rgba(0, 243, 255, 0.3);
    background: rgba(0, 243, 255, 0.04);
}

.mode-option input[type="radio"]:checked ~ .mode-info .mode-title {
    color: #00f3ff;
}

.mode-option input[type="radio"]:checked {
    accent-color: #00f3ff;
}

.mode-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.mode-sub {
    font-size: 0.71rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Hyperparameters */
.hyperparam-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.slider-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
}

.slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.slider-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
}

.slider-val {
    font-size: 0.8rem;
    font-weight: 800;
    color: #00f3ff;
    background: rgba(0, 243, 255, 0.12);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.tron-slider {
    width: 100%;
    accent-color: #00f3ff;
    cursor: pointer;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.rule-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 243, 255, 0.06);
    border: 1px solid rgba(0, 243, 255, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
}

.rule-icon {
    font-size: 1.2rem;
}

.rule-text {
    font-size: 0.76rem;
    color: #cbd5e1;
    line-height: 1.45;
}

/* Sandbox Section */
.tron-sandbox-section {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
}

.sandbox-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #00f3ff;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.sandbox-input-row {
    display: flex;
    gap: 8px;
}

.sandbox-input {
    flex: 1;
    min-width: 0;
    background: rgba(4, 7, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    padding: 8px 10px;
    font-size: 0.8rem;
    outline: none;
    box-sizing: border-box;
}

.sandbox-input:focus {
    border-color: #00f3ff;
}

.sandbox-btn {
    background: rgba(0, 243, 255, 0.15);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: #00f3ff;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.sandbox-btn:hover {
    background: rgba(0, 243, 255, 0.28);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.3);
}

.sandbox-output {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.4);
    border-left: 3px solid #00f3ff;
    border-radius: 6px;
}

.sandbox-output-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: #00f3ff;
    display: block;
    margin-bottom: 3px;
}

.sandbox-output-content {
    font-size: 0.8rem;
    color: #f1f5f9;
    line-height: 1.45;
}

/* Modal Footer */
.tron-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 12, 20, 0.9);
    flex-shrink: 0;
    gap: 10px;
}

.tron-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tron-btn-logout {
    background: rgba(255, 68, 68, 0.12);
    border: 1px solid rgba(255, 68, 68, 0.35);
    color: #ff6b6b;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tron-btn-logout:hover {
    background: rgba(255, 68, 68, 0.25);
    color: #ffffff;
}

.tron-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tron-status-msg {
    font-size: 0.76rem;
    font-weight: 700;
    color: #10b981;
}

.tron-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tron-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.tron-btn-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #00d2ff 0%, #0077ff 100%);
    border: none;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 8px 18px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(0, 210, 255, 0.35);
    transition: var(--transition);
    white-space: nowrap;
}

.tron-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(0, 210, 255, 0.6);
}

/* Mobile Media Queries for Tron Suite */
@media (max-width: 600px) {
    .tron-modal-overlay {
        padding: 4px;
    }

    .tron-modal-glass {
        max-height: 96dvh;
        border-radius: 14px;
    }

    .tron-modal-header {
        padding: 10px 12px;
    }

    .tron-title {
        font-size: 0.92rem;
    }

    .tron-subtitle {
        display: none;
    }

    .tron-tab-bar {
        padding: 6px 10px;
        gap: 4px;
    }

    .tron-tab-btn {
        padding: 5px 10px;
        font-size: 0.73rem;
    }

    .tron-modal-body {
        padding: 10px 12px;
    }

    .persona-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tron-grid-2col {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hyperparam-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sandbox-input-row {
        flex-direction: column;
    }

    .sandbox-btn {
        width: 100%;
        padding: 9px;
        justify-content: center;
        text-align: center;
    }

    .tron-modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
        padding: 10px 12px;
    }

    .tron-footer-left {
        width: 100%;
        display: flex;
        gap: 6px;
    }

    .tron-footer-left button {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 8px 4px;
        font-size: 0.73rem;
    }

    .tron-footer-right {
        width: 100%;
        flex-direction: column;
        gap: 4px;
    }

    .tron-btn-primary {
        width: 100%;
        justify-content: center;
        padding: 9px;
    }

    .master-auth-form {
        padding: 4px 6px;
        gap: 4px;
        border-radius: 30px;
    }

    .master-auth-badge {
        padding: 4px 6px;
    }

    .master-pwd-input {
        font-size: 0.84rem;
        padding: 6px 4px;
    }

    .master-unlock-btn {
        padding: 6px 10px;
        font-size: 0.68rem;
    }

    .master-cancel-btn {
        width: 28px;
        height: 28px;
        font-size: 0.78rem;
    }
}

/* =========================================================================
   LEGAL FOOTER STRIP & PRIVACY MODAL
   ========================================================================= */
.minimal-privacy-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 4px;
    padding: 2px 0;
}

.minimal-privacy-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.72rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    user-select: none;
}

.minimal-privacy-btn:hover,
.minimal-privacy-btn:focus-visible {
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.08);
}

.minimal-privacy-btn .privacy-lock-icon {
    font-size: 0.74rem;
    opacity: 0.8;
}

/* Legal Modal */
.legal-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.25s ease-out;
}

.legal-modal-glass {
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 14, 28, 0.98));
    border: 1px solid rgba(0, 210, 255, 0.25);
    border-radius: 20px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), 0 0 30px rgba(0, 210, 255, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-modal-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-badge-icon {
    font-size: 1.4rem;
}

.legal-title {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.legal-subtitle {
    margin: 2px 0 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.legal-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.legal-modal-close:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.5);
}

.legal-modal-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.legal-tab-btn {
    flex: 1;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.legal-tab-btn:hover {
    color: #e2e8f0;
}

.legal-tab-btn.active {
    color: #00f3ff;
    border-bottom-color: #00f3ff;
    background: rgba(0, 243, 255, 0.04);
}

.legal-modal-body {
    padding: 22px;
    overflow-y: auto;
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.legal-callout-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.22);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.84rem;
}

.legal-callout-card .callout-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.legal-section {
    margin-bottom: 18px;
}

.legal-h4 {
    margin: 0 0 6px 0;
    font-size: 0.94rem;
    color: #f1f5f9;
    font-weight: 600;
}

.legal-p {
    margin: 0 0 8px 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.legal-list {
    margin: 0;
    padding-left: 20px;
    color: #cbd5e1;
    font-size: 0.84rem;
}

.legal-list li {
    margin-bottom: 6px;
}

/* Data Erasure Form */
.erasure-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.erasure-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.erasure-label {
    font-size: 0.82rem;
    color: #e2e8f0;
    font-weight: 500;
}

.erasure-input {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 10px 14px;
    color: #f8fafc;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.erasure-input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
}

.btn-delete-data {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-delete-data:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}

.erasure-status {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.4;
}
.erasure-status.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}
.erasure-status.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
}

/* ========================================================
   Self-Improving AI Engine Dashboard Styles
======================================================== */
.learning-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .learning-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.learning-metric-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.learning-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
}

.learning-metric-card.highlight-cyan::before {
    background: linear-gradient(90deg, #00e5ff, #0284c7);
}

.learning-metric-card.highlight-green::before {
    background: linear-gradient(90deg, #34d399, #059669);
}

.learning-metric-card.highlight-amber::before {
    background: linear-gradient(90deg, #fbbf24, #d97706);
}

.learning-metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.l-metric-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-mono, monospace);
    line-height: 1.2;
}

.highlight-cyan .l-metric-val {
    color: #00e5ff;
    text-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.highlight-green .l-metric-val {
    color: #34d399;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

.highlight-amber .l-metric-val {
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.l-metric-label {
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.evolution-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.evolution-box {
    background: rgba(10, 15, 29, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(8px);
}

.evolution-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.evolution-box-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
}

.evolution-box-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 12px;
}

.evolution-box-badge {
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: #00e5ff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.evolution-box-badge.badge-green {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.3);
    color: #34d399;
}

.evolution-box-badge.badge-amber {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.evolution-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.evolution-list::-webkit-scrollbar {
    width: 4px;
}

.evolution-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.evolution-empty {
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
    padding: 12px 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.evolution-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s ease;
}

.evolution-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.2);
}

.evolution-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.evolution-item-category {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #00e5ff;
}

.evolution-item-rule {
    font-size: 0.82rem;
    color: #f1f5f9;
    line-height: 1.4;
    word-break: break-word;
}

.evolution-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 2px;
}

.btn-delete-insight {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.btn-delete-insight:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* ========================================================
   Interactive Consultation Schedule Slots (In-Chat & Ambient)
======================================================== */
.chat-schedule-deck {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(0, 229, 255, 0.22);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 8px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(0, 229, 255, 0.05);
    animation: fadeInSlideUp 0.3s ease;
}

.schedule-deck-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.schedule-deck-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.schedule-deck-icon {
    font-size: 0.9rem;
}

.schedule-deck-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}

.schedule-deck-tag {
    font-size: 0.65rem;
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.schedule-deck-slots {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.schedule-deck-slots::-webkit-scrollbar {
    height: 4px;
}
.schedule-deck-slots::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.25);
    border-radius: 2px;
}

.quick-slot-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    color: #f1f5f9;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.quick-slot-chip:hover {
    background: rgba(0, 229, 255, 0.18);
    border-color: #00e5ff;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.quick-slot-chip.selected {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.35), rgba(16, 185, 129, 0.35));
    border-color: #34d399;
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.5);
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00e5ff;
    box-shadow: 0 0 6px #00e5ff;
}

.chip-time {
    font-family: var(--font-mono, monospace);
    font-weight: 700;
}

.chip-day {
    font-size: 0.68rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 5px;
    border-radius: 6px;
}

/* In-Chat Message Bubble Slot Picker */
.chat-slot-picker {
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(10, 15, 29, 0.92);
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 0 14px rgba(0, 229, 255, 0.06);
    animation: fadeInSlideUp 0.3s ease;
}

.slot-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.slot-picker-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.02em;
}

.slot-picker-sync-tag {
    font-size: 0.64rem;
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.slot-picker-desc {
    font-size: 0.76rem;
    color: #cbd5e1;
    line-height: 1.4;
}

.slot-picker-icon {
    font-size: 0.95rem;
}

.slot-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.slot-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 10px;
    padding: 8px 14px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.slot-pill-btn:hover {
    background: rgba(0, 229, 255, 0.22);
    border-color: #00e5ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 229, 255, 0.45);
}

.slot-pill-btn:active {
    transform: scale(0.97);
}

.slot-pill-btn.selected {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.4), rgba(52, 211, 153, 0.4));
    border-color: #34d399;
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.6);
}

.slot-tag-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px #34d399;
}

.slot-pill-time {
    font-family: var(--font-mono, monospace);
    font-weight: 700;
}

.slot-pill-tag {
    font-size: 0.7rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
}



