/* ==============================================================================
   SARTHI: AI-Powered Business Intelligence Platform
   Enterprise Design System & Master Dashboard Stylesheet
   Direction: Premium Enterprise SaaS / High-Precision Analytics Dashboard
   Theme: Deep Executive Navy (#07111D) with Refined Cyan & Slate Accents
   ============================================================================== */

:root {
    /* Surface & Canvas System (Luxury Enterprise Midnight & Gold Palette) */
    --bg-canvas: #0B1220;
    --bg-surface: #111B2C;
    --bg-surface-elevated: #172438;
    --bg-surface-hover: #1E2D44;
    --bg-surface-active: #253752;
    --bg-card: rgba(17, 27, 44, 0.94);
    --bg-card-hover: rgba(23, 36, 56, 0.98);
    --bg-input: #0E1626;
    --bg-header: rgba(11, 18, 32, 0.96);
    --bg-overlay: rgba(7, 12, 22, 0.88);

    /* Subtle Luxury Borders */
    --border-subtle: #28364A;
    --border-default: #2D3D54;
    --border-hover: rgba(197, 160, 106, 0.45);
    --border-focus: #C5A06A;
    --border-color: #28364A;

    /* Luxury Brand Gold & Champagne Accents (from official SARTHI logo) */
    --brand-gold: #C5A06A;
    --brand-gold-hover: #D4AF77;
    --brand-gold-dim: #9E7D4E;
    --brand-gold-soft: rgba(197, 160, 106, 0.12);
    --brand-gold-glow: rgba(197, 160, 106, 0.22);
    --warm-beige: #D1B28A;
    --warm-champagne: #E4CFB2;

    /* Restrained Accent Teals (for active/telemetry states) */
    --teal-primary: #1D8B91;
    --teal-hover: #269FA6;
    --teal-soft: rgba(29, 139, 145, 0.14);
    --cyan: #C5A06A; /* Map primary accent to brand gold */
    --cyan-hover: #D4AF77;
    --cyan-dim: #9E7D4E;
    --cyan-soft: rgba(197, 160, 106, 0.10);
    --cyan-glow: rgba(197, 160, 106, 0.20);
    --cyan-light: #D1B28A;

    /* Semantic Functional Accents */
    --green: #3E9B79;
    --green-soft: rgba(62, 155, 121, 0.14);
    --green-border: rgba(62, 155, 121, 0.35);
    --amber: #D4A04C;
    --amber-soft: rgba(212, 160, 76, 0.14);
    --amber-border: rgba(212, 160, 76, 0.35);
    --red: #C66B6B;
    --red-soft: rgba(198, 107, 107, 0.14);
    --red-border: rgba(198, 107, 107, 0.35);
    --gold: #C5A06A;
    --gold-glow: rgba(197, 160, 106, 0.22);

    /* High-Contrast Typographic System */
    --text-primary: #F3F1EC;
    --text-secondary: #A6AFBD;
    --text-muted: #7E8C9F;
    --text-dim: #546377;
    --text-main: #F3F1EC;

    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Manrope', 'Inter', sans-serif;
    --font-display: 'Orbitron', 'Inter', monospace, sans-serif;
    --font-tech: 'Rajdhani', sans-serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Consolas', 'Courier New', monospace;

    /* Elevation & Multi-layer Shadows */
    --shadow-sm: 0 1px 3px rgba(3, 8, 17, 0.4);
    --shadow-md: 0 4px 16px -2px rgba(3, 8, 17, 0.6), 0 0 0 1px #28364A;
    --shadow-lg: 0 10px 30px -4px rgba(3, 8, 17, 0.75), 0 0 0 1px #28364A;
    --shadow-modal: 0 24px 64px -8px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(197, 160, 106, 0.25);

    /* Radii */
    --radius-xs: 3px;
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================================================================
   RESET & UNIVERSAL ELEMENTS
   ============================================================================== */

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

/* Professional Custom Scrollbars */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: rgba(7, 17, 29, 0.6);
}
::-webkit-scrollbar-thumb {
    background: rgba(125, 166, 196, 0.25);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

body {
    background-color: var(--bg-canvas);
    background-image: radial-gradient(ellipse 90% 80% at 50% -20%, rgba(22, 138, 154, 0.05) 0%, rgba(11, 18, 32, 0.98) 100%), url('/UI/bg2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-ui);
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtlest background texture */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 3px,
        rgba(22, 217, 232, 0.005) 4px
    );
    pointer-events: none;
    z-index: 99;
}

.hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-shadow: inset 0 0 100px rgba(3, 8, 17, 0.85);
    z-index: 98;
}

/* ==============================================================================
   HEADER COMPONENT (Enhanced with Sidebar Toggle Controls)
   ============================================================================== */

.hud-header {
    height: 52px;
    min-height: 52px;
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    gap: 12px;
}

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

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

/* Sidebar Toggle Buttons in Header */
.sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 23, 42, 0.7);
    border: 1px solid rgba(125, 166, 196, 0.22);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    padding: 6px 12px;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.7px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    flex-shrink: 0;
}

.sidebar-toggle-btn .lucide-icon {
    width: 15px;
    height: 15px;
    color: var(--cyan);
    transition: transform 0.25s ease, color 0.2s;
}

.sidebar-toggle-btn:hover {
    border-color: var(--cyan);
    color: #FFFFFF;
    background: rgba(22, 217, 232, 0.1);
    box-shadow: 0 0 12px rgba(22, 217, 232, 0.2);
}

.sidebar-toggle-btn.active {
    background: rgba(22, 217, 232, 0.16);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 14px rgba(22, 217, 232, 0.25);
}

.sidebar-toggle-btn.active .lucide-icon {
    color: #FFFFFF;
}

.sidebar-toggle-btn:focus-visible {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(22, 217, 232, 0.3);
}

.sarthi-brand-logo-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border: 1.5px solid rgba(204, 168, 129, 0.45);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.sarthi-brand-logo-wrap:hover {
    border-color: #CCA881;
    transform: scale(1.04);
}

.sarthi-header-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.reactor-mini {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--cyan);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #000;
}

.mini-arc {
    width: 125%;
    height: 125%;
    object-fit: cover;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand .logo-text {
    font-family: var(--font-heading), 'Inter', sans-serif;
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: 2.2px;
    color: #FFFFFF;
    line-height: 1.1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand .sub-text {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 1.4px;
    color: #CCA881;
    opacity: 0.95;
    text-transform: uppercase;
}

.header-center {
    display: flex;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-default);
    padding: 5px 14px;
    border-radius: var(--radius-xl);
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.status-badge:hover {
    border-color: var(--cyan);
    background: var(--bg-surface-hover);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--green);
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.4);
    animation: pulse-dot 2s infinite ease-in-out;
}

.status-badge.warning .status-dot {
    background-color: var(--amber);
    box-shadow: 0 0 5px rgba(245, 158, 11, 0.4);
}

.status-badge.offline .status-dot {
    background-color: var(--red);
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.4);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.telemetry-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chip-label {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.chip-value {
    font-family: var(--font-mono);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.chip-value.highlight {
    color: var(--cyan);
}

/* ==============================================================================
   MAIN 3-COLUMN LAYOUT (Viewport-Aware Vertical Hierarchy)
   ============================================================================== */

.hud-header {
    flex: 0 0 52px;
    height: 52px;
    padding: 0 16px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.hud-footer {
    flex: 0 0 22px;
    height: 22px;
    padding: 0 14px;
    background: var(--bg-header);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.64rem;
    color: var(--text-muted);
    z-index: 10;
}

/* ==============================================================================
   MAIN WORKSPACE & COLLAPSIBLE PANELS ARCHITECTURE
   ============================================================================== */

.hud-main {
    flex: 1 1 0%;
    min-height: 0;
    height: calc(100vh - 74px);
    display: flex;
    flex-direction: row;
    padding: 8px 12px;
    gap: 0;
    overflow: hidden;
    position: relative;
    background: transparent;
}

/* Left Panel (Operations Console) - Hidden by default */
.panel.left-panel {
    width: 270px;
    min-width: 270px;
    max-width: 270px;
    height: 100%;
    margin-left: -282px;
    margin-right: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                margin-right 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                visibility 0.3s;
    z-index: 30;
    background: linear-gradient(180deg, rgba(14, 23, 42, 0.95) 0%, rgba(9, 15, 29, 0.98) 100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
}

.hud-main.left-open .panel.left-panel {
    margin-left: 0;
    margin-right: 10px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Right Panel (Tactical Intel & Saved Data Library) - Hidden by default */
.panel.right-panel {
    width: 350px;
    min-width: 350px;
    max-width: 350px;
    height: 100%;
    margin-right: -362px;
    margin-left: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: margin-right 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                visibility 0.3s;
    z-index: 30;
    background: linear-gradient(180deg, rgba(14, 23, 42, 0.95) 0%, rgba(9, 15, 29, 0.98) 100%);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35);
}

.hud-main.right-open .panel.right-panel {
    margin-right: 0;
    margin-left: 10px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Central Primary Workspace (Neural Console) - Expands to 100% when sidebars are collapsed */
.center-core {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    overflow: hidden;
    transition: flex 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

/* Panel Header Title Group & Close Control */
.panel-header-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header-title-group .lucide-icon {
    width: 15px;
    height: 15px;
    color: var(--cyan);
}

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

.panel-close-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.panel-close-btn:hover {
    color: var(--cyan);
    border-color: rgba(22, 217, 232, 0.3);
    background: rgba(22, 217, 232, 0.1);
}

/* Floating Edge Toggles */
.floating-edge-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(180deg, rgba(14, 23, 42, 0.95) 0%, rgba(8, 14, 26, 0.98) 100%);
    border: 1px solid rgba(22, 217, 232, 0.3);
    color: var(--cyan);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 10px rgba(22, 217, 232, 0.15);
    cursor: pointer;
    z-index: 40;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    user-select: none;
}

.left-edge-toggle {
    left: 4px;
}

.right-edge-toggle {
    right: 4px;
}

.floating-edge-toggle:hover {
    background: var(--cyan);
    color: #0b172a;
    box-shadow: 0 0 16px rgba(22, 217, 232, 0.45);
    border-color: var(--cyan);
}

.floating-edge-toggle:hover .lucide-icon {
    color: #0b172a;
}

.hud-main.left-open .left-edge-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-120%);
}

.hud-main.right-open .right-edge-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(120%);
}

/* Backdrop for Mobile / Tablet Drawers */
.sidebar-backdrop {
    display: none;
}

/* Universal Panel Base */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.panel:hover {
    border-color: var(--border-default);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 6px;
    flex-shrink: 0;
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.panel-tag {
    font-family: var(--font-display);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    background: var(--cyan-soft);
    border: 1px solid rgba(22, 217, 232, 0.3);
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    color: var(--cyan);
}

/* ==============================================================================
   LEFT SIDEBAR: NAVIGATION & OPERATIONS (Phase 3.2)
   ============================================================================== */

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

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-group-title {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding-left: 4px;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.action-btn {
    width: 100%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 7px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-fast);
    text-align: left;
}

.action-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateX(2px);
}

.action-btn:focus-visible {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px var(--cyan-soft);
    color: var(--text-primary);
}

.action-btn.active {
    background: rgba(22, 217, 232, 0.12);
    border-color: var(--cyan);
    color: var(--cyan);
}

.btn-icon {
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product & Stock KPI Summary Card */
.catalogue-hud-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    transition: border-color var(--transition-fast);
}

.catalogue-hud-card:hover {
    border-color: var(--border-default);
}

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

.cat-hud-title {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-open-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--cyan);
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cat-open-btn:hover {
    background: var(--cyan-soft);
    border-color: var(--cyan);
}

.cat-hud-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.cat-hud-stat {
    background: var(--bg-surface);
    border: 1px solid rgba(125, 166, 196, 0.08);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cat-stat-label {
    font-family: var(--font-sans);
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cat-stat-val {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cat-stat-val.cyan { color: var(--cyan); }
.cat-stat-val.amber { color: var(--amber); }
.cat-stat-val.red { color: var(--red); }
.cat-stat-val.green { color: var(--green); }

/* Local AI Neural Core Card */
.local-ai-hud-card {
    border-left: 2px solid var(--cyan);
}

.ai-pulse-dot {
    color: var(--green);
    font-size: 0.8rem;
}

.ai-pulse-dot.online { color: var(--green); }
.ai-pulse-dot.busy { color: var(--cyan); }
.ai-pulse-dot.amber, .ai-pulse-dot.standby { color: var(--amber); }
.ai-pulse-dot.red, .ai-pulse-dot.offline { color: var(--red); }

.llm-model-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    background: var(--cyan-soft);
    color: var(--cyan);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(22, 217, 232, 0.25);
}

/* Hardware Telemetry Gauges */
.gauge-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px;
}

.gauge-header-title {
    font-family: var(--font-sans);
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.gauge-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gauge-header {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-bar {
    height: 5px;
    background: rgba(125, 166, 196, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284C7, var(--cyan));
    transition: width 0.4s ease;
    border-radius: 3px;
}

.bar-fill.cyan {
    background: linear-gradient(90deg, #0EA5E9, #10B981);
}

.bar-fill.gold {
    background: linear-gradient(90deg, #D97706, var(--amber));
}

/* Compact Radar Deck */
.hud-radar-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    flex-shrink: 0;
}

.ring-radar {
    width: 68px;
    height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px var(--cyan-glow));
    opacity: 0.9;
}

.radar-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--cyan);
    margin-top: 4px;
}

/* ==============================================================================
   CENTER CORE: VISUAL ARTWORK & AI NEURAL CONSOLE (Phases 4 & 5)
   ============================================================================== */

.center-core {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Center Hero Workspace: Arc Reactor Visualizer (Left) + Business Data Import (Right) */
.center-hero-workspace {
    display: grid;
    grid-template-columns: 285px minmax(0, 1fr);
    gap: 10px;
    height: 138px;
    min-height: 138px;
    max-height: 138px;
    flex-shrink: 0;
}

/* Left Side: Compact Visual Hero Deck (Separated Reactor & Iron Man, Phase 2) */
.hologram-stage {
    height: 100%;
    background: radial-gradient(ellipse 70% 80% at 30% 50%, rgba(22, 138, 154, 0.12) 0%, rgba(17, 30, 48, 0.95) 85%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    position: relative;
}

/* Interactive Reactor Column (Left Sub-col) */
.reactor-interaction-col {
    position: relative;
    width: 140px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.holo-ring {
    position: absolute;
    left: 50%;
    top: 44%;
    transform: translate(-50%, -50%);
    width: 105px;
    height: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.38;
}

.circle-hud {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.arc-core-interactive {
    position: relative;
    z-index: 5;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-fast);
}

.arc-core-interactive:hover {
    transform: scale(1.05);
}

.central-reactor {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(22, 217, 232, 0.2));
}

.pulse-indicator {
    margin-top: 3px;
    font-family: var(--font-display);
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--cyan);
    background: var(--cyan-soft);
    border: 1px solid rgba(22, 217, 232, 0.35);
    padding: 2px 6px;
    border-radius: var(--radius-xl);
    white-space: nowrap;
    animation: glow-pulse 2s infinite ease-in-out;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 2px var(--cyan-glow); }
    50% { box-shadow: 0 0 8px rgba(22, 217, 232, 0.35); }
}

/* Iron Man Visual Accent (Right Sub-col, Unobstructed, Phase 2) */
.ironman-avatar-box {
    position: relative;
    height: 100%;
    width: 110px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    flex-shrink: 0;
}

.ironman-armor {
    height: 100%;
    max-height: 126px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(22, 138, 154, 0.25));
}

/* Prominent Executive AI Neural Console (Phase 6 Viewport-Aware) */
.terminal-container {
    flex: 1 1 0%;
    min-height: 0;
    height: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.terminal-header {
    flex: 0 0 32px;
    height: 32px;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.terminal-log {
    flex: 1 1 0%;
    min-height: 0;
    padding: 8px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Prominent Executive AI Neural Console (Phase 4) */
.terminal-container {
    flex: 1 1 0%;
    min-height: 280px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.terminal-header {
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
    padding: 9px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.term-title {
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 6px;
}

.term-status {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--amber);
}

/* Conversation Stream (Phase 4.1) */
.terminal-log {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: break-word;
}

.log-entry {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    border-radius: var(--radius-md);
    padding: 8px 12px;
    transition: background var(--transition-fast);
}

/* System notice */
.log-entry.system {
    color: var(--text-muted);
    font-size: 0.78rem;
    background: rgba(125, 166, 196, 0.05);
    border-left: 2px solid var(--text-dim);
    border-radius: var(--radius-xs);
    padding: 4px 10px;
    font-family: var(--font-mono);
}

/* User prompt block */
.log-entry.user {
    color: #FFFFFF;
    background: var(--bg-surface-elevated);
    border: 1px solid rgba(22, 217, 232, 0.3);
    border-left: 3px solid var(--cyan);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* VANTIQ assistant response */
.log-entry.jarvis, .log-entry.vantiq, .log-entry.sarthi {
    color: var(--text-primary);
    background: #0E1E31;
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--cyan-light);
    box-shadow: var(--shadow-sm);
}

.log-entry.error {
    color: #FCA5A5;
    background: var(--red-soft);
    border: 1px solid var(--red-border);
    border-left: 3px solid var(--red);
}

/* Input Composer (Phase 6 Anchored and Visible) */
.command-bar {
    flex: 0 0 44px;
    height: 44px;
    padding: 4px 10px;
    background: var(--bg-surface-elevated);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.prompt-arrow {
    color: var(--cyan);
    font-weight: 900;
    font-size: 1rem;
    flex-shrink: 0;
}

#commandInput {
    flex: 1;
    min-width: 0;
    height: 32px;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 4px 12px;
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    outline: none;
    transition: all var(--transition-fast);
}

#commandInput:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px var(--cyan-soft);
}

#commandInput::placeholder {
    color: var(--text-muted);
}

.mic-toggle-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    font-size: 0.85rem;
}

.mic-toggle-btn:hover {
    border-color: var(--cyan);
    background: var(--cyan-soft);
}

.mic-toggle-btn.listening {
    background: var(--red-soft);
    border-color: var(--red);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
    animation: mic-pulse 1.2s infinite;
}

@keyframes mic-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.send-btn {
    height: 32px;
    background: linear-gradient(135deg, #0EA5E9, #16D9E8);
    border: none;
    color: #030811;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    box-shadow: 0 0 10px var(--cyan-glow);
    transform: translateY(-1px);
}

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

.send-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Console Guidance & Example Queries (Phase 9 Business Intelligence Polish) */
.console-guidance-bar {
    flex: 0 0 28px;
    height: 28px;
    padding: 0 12px;
    background: #060D17;
    border-top: 1px solid rgba(22, 217, 232, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.72rem;
    overflow: hidden;
    user-select: none;
}

.guidance-helper-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.guidance-icon {
    font-size: 0.78rem;
    line-height: 1;
}

.guidance-example-rotator {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.example-rotator-label {
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: 0.6px;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.example-rotator-query {
    color: #93C5FD;
    text-decoration: underline dotted rgba(147, 197, 253, 0.4);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    transition: opacity 0.22s ease, color 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.example-rotator-query:hover {
    color: var(--cyan-light);
    text-decoration: underline;
}

/* ==============================================================================
   RIGHT PANEL: TACTICAL INTEL & DATA LIBRARY (Phase 3 & Phase 8)
   ============================================================================== */

/* ==============================================================================
   RIGHT PANEL: TACTICAL INTEL & DATA LIBRARY (Phase 5 & Phase 4)
   ============================================================================== */

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 10px 12px;
}

/* Dynamic Intel Card Viewport (Phase 5 — Clear, Spacious Content Area) */
.intel-viewport {
    flex: 1 1 58%;
    min-height: 0;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.intel-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.intel-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Enhanced Table Container with Horizontal Scroll within Intel Viewport */
.intel-viewport .table-responsive,
.intel-viewport .cat-table-wrapper,
.intel-viewport .intel-table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-top: 3px;
}

.intel-viewport table,
.intel-viewport .cat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
    min-width: 270px;
}

.intel-viewport th {
    background: var(--bg-surface-hover);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.60rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 5px 8px;
    border-bottom: 1px solid var(--border-default);
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.intel-viewport td {
    padding: 5px 8px;
    border-bottom: 1px solid rgba(148, 170, 190, 0.08);
    color: var(--text-primary);
    font-size: 0.72rem;
    vertical-align: middle;
    word-break: break-word;
}

.intel-viewport tr:hover td {
    background: rgba(22, 138, 154, 0.06);
}

.intel-viewport td.num,
.intel-viewport td.val-num {
    font-family: var(--font-mono);
    text-align: right;
    color: var(--cyan);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--cyan);
    text-transform: uppercase;
}

.card-desc {
    font-size: 0.70rem;
    color: var(--text-muted);
    margin-bottom: 2px;
    line-height: 1.3;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid rgba(148, 170, 190, 0.08);
    font-size: 0.73rem;
}

.data-row:last-child {
    border-bottom: none;
}

.data-row .label { color: var(--text-muted); font-size: 0.70rem; }
.data-row .val { color: var(--text-primary); font-weight: 600; font-size: 0.73rem; }
.data-row .val.cyan { color: var(--cyan); }

/* Business Data Import Module (Phase 3 — Compact 138px Card) */
.import-module-box {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-surface-elevated);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 138px;
    max-height: 138px;
    overflow: hidden;
    transition: border-color var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.import-module-box:hover {
    border-color: var(--border-default);
}

.import-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.import-title {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.format-badges {
    display: flex;
    gap: 3px;
}

.format-badge {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: var(--radius-xs);
    background: rgba(22, 138, 154, 0.15);
    border: 1px solid rgba(22, 138, 154, 0.35);
    color: var(--cyan);
}

.import-desc {
    display: none; /* Hide verbose text to ensure perfect 138px height */
}

/* Compact Horizontal Drag & Drop Zone */
.drop-zone {
    border: 1.5px dashed rgba(22, 138, 154, 0.35);
    border-radius: var(--radius-md);
    background: rgba(22, 138, 154, 0.03);
    padding: 6px 10px;
    height: 50px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--cyan);
    background: var(--cyan-soft);
    box-shadow: 0 0 10px var(--cyan-glow);
}

.drop-zone-content {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    width: 100%;
}

.drop-icon {
    font-size: 1.2rem;
    line-height: 1;
    color: var(--cyan);
}

.drop-text-col {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: left;
}

.drop-text {
    font-size: 0.72rem;
    color: var(--text-primary);
    font-weight: 500;
}

.browse-link {
    color: var(--cyan);
    text-decoration: underline;
    font-weight: 600;
}

.drop-subtext {
    font-size: 0.60rem;
    color: var(--text-muted);
}

.hidden-file-input {
    display: none;
}

/* Selected File Card */
.selected-file-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
}

.file-icon-badge {
    font-size: 1.2rem;
}

.file-info-col {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.selected-file-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-file-meta {
    font-size: 0.66rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-dot { color: var(--cyan); }
.status-indicator-text { color: var(--cyan); }

.remove-file-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    transition: all var(--transition-fast);
}

.remove-file-btn:hover {
    color: var(--red);
    background: var(--red-soft);
}

/* Import Action Buttons */
.import-actions-row {
    display: flex;
    gap: 8px;
}

.import-btn {
    flex: 1;
    background: linear-gradient(135deg, #0284C7, #16D9E8);
    border: none;
    color: #030811;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.import-btn:hover:not(:disabled) {
    box-shadow: 0 0 12px var(--cyan-glow);
    transform: translateY(-1px);
}

.import-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.cancel-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cancel-btn:hover {
    color: #FFFFFF;
    background: var(--bg-surface-hover);
}

/* Processing Spinner */
.import-processing {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--cyan-soft);
    border: 1px solid rgba(22, 217, 232, 0.25);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
}

.tactical-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(22, 217, 232, 0.25);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-text {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--cyan);
}

/* Error Banner */
.import-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--red-soft);
    border: 1px solid var(--red-border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 0.72rem;
    color: #FCA5A5;
    line-height: 1.35;
}

.error-icon { font-size: 0.85rem; }

/* Result Viewport & Tables */
.import-result-viewport {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}

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

.result-title {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--amber);
}

.result-header-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-catalogue-btn {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-hover);
    color: var(--cyan);
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.map-catalogue-btn:hover {
    background: var(--cyan-soft);
    border-color: var(--cyan);
}

.launch-bi-btn {
    background: linear-gradient(135deg, rgba(22, 217, 232, 0.25), rgba(14, 165, 233, 0.4));
    border: 1px solid var(--cyan);
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.launch-bi-btn:hover {
    background: var(--cyan);
    color: #030811;
}

.close-preview-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    cursor: pointer;
}

.close-preview-btn:hover {
    color: #FFFFFF;
    border-color: var(--border-default);
}

.result-summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.68rem;
    color: var(--text-muted);
    background: var(--bg-surface-elevated);
    padding: 5px 8px;
    border-radius: var(--radius-xs);
}

.summary-metric {
    display: flex;
    gap: 4px;
}

.summary-metric .metric-val {
    color: var(--cyan);
    font-weight: 700;
}

.result-sheets-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 3px;
}

.sheet-tab-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    white-space: nowrap;
}

.sheet-tab-btn.active, .sheet-tab-btn:hover {
    background: var(--cyan-soft);
    color: var(--cyan);
    border-color: var(--cyan);
}

.result-preview-content {
    overflow-x: auto;
    max-height: 140px;
}

/* ==========================================================================
   SARTHI UI — SVG ICON SYSTEM & VECTOR ASSETS
   ========================================================================== */
.lucide-icon, .btn-svg-icon, .ds-file-icon, .meta-icon, .delete-icon, .library-title-icon {
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    flex-shrink: 0;
}

.icon-xs {
    width: 11px;
    height: 11px;
}

.icon-sm {
    width: 13px;
    height: 13px;
}

.icon-lg {
    width: 20px;
    height: 20px;
}

.btn-icon .lucide-icon {
    width: 16px;
    height: 16px;
    color: var(--cyan);
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.action-btn:hover .btn-icon .lucide-icon {
    transform: scale(1.08);
    color: #FFFFFF;
}

.mic-svg {
    width: 16px;
    height: 16px;
    color: var(--cyan);
}

.mic-toggle-btn.listening .mic-svg {
    color: var(--red);
    animation: micPulse 1.2s infinite ease-in-out;
}

@keyframes micPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

.bi-reactor-glow .lucide-icon {
    width: 16px;
    height: 16px;
    color: var(--cyan);
}

.bi-close-btn .lucide-icon {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   SAVED DATA LIBRARY MODULE — ENTERPRISE DATA MANAGEMENT
   ========================================================================== */
.library-module-box {
    border: 1px solid rgba(125, 166, 196, 0.16);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(14, 23, 42, 0.9) 0%, rgba(9, 15, 29, 0.96) 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 42%;
    max-height: 42%;
    min-height: 0;
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.library-module-box:hover {
    border-color: rgba(22, 217, 232, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.library-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(125, 166, 196, 0.12);
}

.library-title-group {
    display: flex;
    align-items: center;
    gap: 7px;
}

.library-title-icon {
    width: 14px;
    height: 14px;
    color: var(--cyan);
}

.library-title {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.library-badge {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    background: rgba(22, 217, 232, 0.1);
    color: var(--cyan);
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(22, 217, 232, 0.28);
    letter-spacing: 0.4px;
}

/* Toolbar: Search + Filter + Refresh */
.library-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.search-input-wrapper {
    position: relative;
    flex: 1 1 62%;
    min-width: 0;
    display: flex;
    align-items: center;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 8px;
    width: 12px;
    height: 12px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.library-search-input {
    width: 100%;
    min-width: 0;
    background: rgba(8, 14, 26, 0.75);
    border: 1px solid rgba(125, 166, 196, 0.2);
    border-radius: var(--radius-sm);
    padding: 6px 8px 6px 26px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.library-search-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(22, 217, 232, 0.15), 0 0 8px rgba(22, 217, 232, 0.12);
}

.library-search-input:focus + .search-icon,
.search-input-wrapper:focus-within .search-icon {
    color: var(--cyan);
}

.library-search-input::placeholder {
    color: var(--text-muted);
}

.library-filter-select {
    flex: 0 0 26%;
    min-width: 76px;
    background: rgba(8, 14, 26, 0.75);
    border: 1px solid rgba(125, 166, 196, 0.2);
    border-radius: var(--radius-sm);
    padding: 6px 6px;
    font-family: var(--font-sans);
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--text-secondary);
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.library-filter-select:focus,
.library-filter-select:hover {
    border-color: var(--cyan);
    color: var(--text-primary);
}

.library-refresh-btn {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    background: rgba(8, 14, 26, 0.75);
    border: 1px solid rgba(125, 166, 196, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.library-refresh-btn .refresh-icon {
    width: 13px;
    height: 13px;
    transition: transform 0.35s ease;
}

.library-refresh-btn:hover {
    color: var(--cyan);
    border-color: var(--cyan);
    background: rgba(22, 217, 232, 0.08);
}

.library-refresh-btn:hover .refresh-icon {
    transform: rotate(180deg);
}

/* Datasets Viewport */
.library-list-viewport {
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
    overflow-y: auto;
    padding-right: 3px;
}

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

.library-list-viewport::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
}

.library-list-viewport::-webkit-scrollbar-thumb {
    background: rgba(125, 166, 196, 0.25);
    border-radius: 4px;
}

.library-list-viewport::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

/* Individual Dataset Card */
.library-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(125, 166, 196, 0.14);
    border-radius: var(--radius-sm);
    padding: 7px 9px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.library-card:hover {
    border-color: rgba(22, 217, 232, 0.35);
    background: rgba(18, 29, 52, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.library-card.active-dataset {
    border-left: 3px solid var(--cyan);
    background: rgba(22, 217, 232, 0.06);
    border-color: rgba(22, 217, 232, 0.4);
}

.library-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.library-card-title-group {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    flex: 1;
}

.ds-file-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.ds-file-icon.sheet {
    color: #10b981;
}

.ds-file-icon.pdf {
    color: #f59e0b;
}

.library-card-name {
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.library-card-name:hover {
    color: var(--cyan);
}

.library-type-badge {
    font-family: var(--font-mono);
    font-size: 0.54rem;
    padding: 1px 4px;
    border-radius: var(--radius-xs);
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.library-type-badge.xlsx, .library-type-badge.xls, .library-type-badge.csv {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.library-type-badge.pdf {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Status Pill Micro Badges */
.ds-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.ds-status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
}

.ds-status-pill.indexed {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.ds-status-pill.indexed .ds-status-dot {
    background: #10b981;
    box-shadow: 0 0 5px #10b981;
}

.ds-status-pill.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.ds-status-pill.warning .ds-status-dot {
    background: #f59e0b;
}

.ds-status-pill.failed {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.ds-status-pill.failed .ds-status-dot {
    background: #ef4444;
}

.ds-status-pill.indexing {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.35);
}

.ds-status-pill.indexing .ds-status-dot.pulse {
    background: #06b6d4;
    animation: statusPulse 1.2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

.ds-status-pill.unindexed {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.ds-status-pill.unindexed .ds-status-dot {
    background: #94a3b8;
}

/* Metadata Row */
.library-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.63rem;
    color: var(--text-muted);
}

.library-card-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.library-card-meta .meta-icon {
    width: 11px;
    height: 11px;
    color: var(--text-muted);
}

/* Action Controls (Open, Index, Report, Reanalyze, Delete) */
.library-card-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 3px;
    border-top: 1px solid rgba(125, 166, 196, 0.1);
    padding-top: 5px;
}

.lib-action-btn {
    background: rgba(8, 14, 26, 0.7);
    border: 1px solid rgba(125, 166, 196, 0.18);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 3px 2px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    white-space: nowrap;
    text-transform: uppercase;
}

.lib-action-btn:hover {
    background: rgba(22, 217, 232, 0.12);
    border-color: var(--cyan);
    color: var(--cyan);
}

.lib-action-btn.delete-btn {
    padding: 3px 5px;
    color: var(--text-muted);
    border-color: rgba(239, 68, 68, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lib-action-btn.delete-btn .delete-icon {
    width: 11px;
    height: 11px;
}

.lib-action-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.14);
    color: var(--red);
    border-color: var(--red);
}

/* Polished Empty State */
.library-empty-state {
    padding: 22px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: auto 0;
}

.empty-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(14, 23, 42, 0.7);
    border: 1px solid rgba(125, 166, 196, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.empty-icon-wrap.error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}

.empty-illustration-svg {
    width: 32px;
    height: 32px;
    color: var(--cyan);
    opacity: 0.85;
}

.empty-title {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin: 0;
}

.empty-text {
    font-size: 0.68rem;
    line-height: 1.4;
    color: var(--text-muted);
    max-width: 240px;
    margin: 0;
}

.empty-import-action {
    margin-top: 6px;
    background: rgba(22, 217, 232, 0.08);
    border: 1px solid rgba(22, 217, 232, 0.3);
    border-radius: var(--radius-xs);
    color: var(--cyan);
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 4px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.empty-import-action:hover {
    background: var(--cyan);
    color: #0b172a;
    box-shadow: 0 0 10px rgba(22, 217, 232, 0.4);
}

/* Loading & Error States */
.library-loading-state {
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: auto 0;
}

.library-loading-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(22, 217, 232, 0.15);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: libSpin 0.75s linear infinite;
}

@keyframes libSpin {
    to { transform: rotate(360deg); }
}

.library-loading-text {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--cyan);
    letter-spacing: 0.5px;
}

.library-retry-btn {
    margin-top: 4px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-xs);
    color: var(--red);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.library-retry-btn:hover {
    background: var(--red);
    color: #FFFFFF;
}


/* =========================================================================
   Table Action Buttons for Catalogue & Inventory Management
   ========================================================================= */
.cat-actions-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.tbl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 28, 48, 0.9);
    border: 1px solid rgba(2, 132, 199, 0.35);
    border-radius: var(--radius-sm, 4px);
    color: #C5D5E8;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 4px 8px;
    margin: 1px 2px;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s ease);
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
}

.tbl-btn:hover {
    background: rgba(2, 132, 199, 0.22);
    border-color: var(--cyan);
    color: #FFFFFF;
    box-shadow: 0 0 8px rgba(22, 217, 232, 0.3);
    transform: translateY(-1px);
}

.tbl-btn:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 1px;
}

.tbl-btn.adjust {
    border-color: rgba(245, 158, 11, 0.4);
    color: #FCD34D;
    background: rgba(245, 158, 11, 0.1);
}

.tbl-btn.adjust:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: #F59E0B;
    color: #FFFFFF;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.35);
}

.tbl-btn.deactivate {
    border-color: rgba(239, 68, 68, 0.35);
    color: #F87171;
    background: rgba(239, 68, 68, 0.1);
}

.tbl-btn.deactivate:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #EF4444;
    color: #FFFFFF;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.cat-table td.cat-actions-cell,
.cat-table td:last-child {
    white-space: nowrap;
    min-width: 220px;
}

@media (max-width: 768px) {
    .tbl-btn {
        padding: 4px 6px;
        font-size: 0.60rem;
    }
    .cat-table td:last-child {
        min-width: 190px;
    }
}

/* Pagination Bar */
.library-pagination-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(125, 166, 196, 0.12);
    padding-top: 6px;
    flex-shrink: 0;
}

.lib-page-btn {
    background: rgba(8, 14, 26, 0.7);
    border: 1px solid rgba(125, 166, 196, 0.2);
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.lib-page-btn:hover:not(:disabled) {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(22, 217, 232, 0.08);
}

.lib-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.lib-page-indicator {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* Bottom Audio Wave Visualizer */
.hud-audio-wave {
    height: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.45;
    flex-shrink: 0;
}

.wave-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==============================================================================
   FOOTER (Phase 3.1)
   ============================================================================== */

.hud-footer {
    height: 32px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-family: var(--font-sans);
    font-size: 0.66rem;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    z-index: 10;
}

.footer-left .separator {
    color: var(--cyan);
    margin: 0 6px;
}

.footer-right {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    color: var(--cyan);
}

/* ==============================================================================
   MODALS & DRAWERS (Phase 6 & 10)
   ============================================================================== */

/* Modal Backdrop */
.bi-modal-overlay, .cat-submodal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-overlay);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    animation: modal-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-fade-in {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Main Modal Windows */
.bi-modal-container {
    width: 95vw;
    max-width: 1350px;
    height: 90vh;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.catalogue-container {
    width: 96vw;
    max-width: 1400px;
    height: 92vh;
}

/* Sub-modal Cards */
.cat-submodal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    width: 90vw;
    max-width: 640px;
    max-height: 88vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

.cat-submodal-card.detail-card {
    max-width: 780px;
}

.cat-submodal-card.mapping-card {
    max-width: 880px;
}

/* Modal Headers */
.bi-modal-header, .cat-submodal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface-elevated);
    flex-shrink: 0;
}

.bi-header-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bi-reactor-glow {
    font-size: 1.2rem;
    color: var(--cyan);
}

.bi-title {
    font-family: var(--font-sans);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #FFFFFF;
    margin: 0;
}

.bi-meta-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.bi-badge {
    background: var(--cyan-soft);
    border: 1px solid rgba(22, 217, 232, 0.3);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    text-transform: uppercase;
}

.bi-meta-text {
    font-size: 0.7rem;
    color: var(--text-muted);
}

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

.export-group {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-surface);
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.export-label {
    font-size: 0.64rem;
    color: var(--text-muted);
    font-weight: 600;
}

.export-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--cyan);
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.export-btn:hover {
    background: var(--cyan);
    color: #030811;
}

.bi-close-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.95rem;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.bi-close-btn:hover {
    background: var(--red-soft);
    color: var(--red);
    border-color: var(--red-border);
}

/* Modal KPI Top Grid */
.bi-kpi-grid, .cat-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.bi-kpi-card, .cat-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: all var(--transition-fast);
}

.bi-kpi-card:hover, .cat-kpi-card:hover {
    border-color: var(--border-default);
    transform: translateY(-1px);
}

.kpi-label, .bi-kpi-label {
    font-family: var(--font-sans);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.kpi-val, .bi-kpi-val, .bi-kpi-value {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.kpi-val.cyan, .bi-kpi-card.cyan .bi-kpi-value { color: var(--cyan); }
.kpi-val.amber, .bi-kpi-card.amber .bi-kpi-value, .bi-kpi-card.gold .bi-kpi-value { color: var(--amber); }
.kpi-val.red, .bi-kpi-card.red .bi-kpi-value { color: var(--red); }
.kpi-val.green, .bi-kpi-card.green .bi-kpi-value { color: var(--green); }
.kpi-val.muted { color: var(--text-muted); }

/* Navigation Tab Bar */
.bi-nav-tabs {
    display: flex;
    gap: 4px;
    padding: 6px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
    flex-shrink: 0;
}

.bi-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.bi-tab-btn:hover {
    color: #FFFFFF;
}

.bi-tab-btn.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

/* Modal Content Panes */
.bi-tab-content-area, .cat-content-pane {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Business Insights Tab Pane Visibility Lifecycle */
.bi-tab-pane {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.bi-tab-pane.active {
    display: flex;
}

/* Business Insights Section Card */
.bi-section-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bi-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(125, 166, 196, 0.08);
}

.bi-section-title {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--cyan);
    text-transform: uppercase;
}

.bi-section-subtitle {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Data Quality Circular Meter */
.quality-meter-box {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 4px;
}

.quality-circle-container {
    position: relative;
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quality-circle-svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.quality-circle-bg {
    fill: none;
    stroke: rgba(148, 170, 190, 0.15);
    stroke-width: 6;
}

.quality-circle-bar {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}

.quality-circle-text {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
}

/* Procedural SVG Chart Containers */
.bi-chart-container {
    width: 100%;
    max-height: 280px;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(3, 8, 17, 0.45);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(125, 166, 196, 0.08);
    padding: 10px 14px;
    box-sizing: border-box;
}

.bi-svg-chart {
    width: 100%;
    max-width: 680px;
    height: auto;
    max-height: 240px;
    display: block;
}

/* Information & Notice Boxes */
.bi-notice-box {
    background: rgba(0, 240, 255, 0.04);
    border-left: 3px solid var(--cyan);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    color: #a0c4df;
    line-height: 1.45;
}

.bi-notice-box.warning {
    border-left-color: var(--amber);
    background: rgba(245, 158, 11, 0.06);
    color: #FDE68A;
}

/* Data Preview and Issues Tables */
.bi-issues-table, .data-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 0.74rem;
    text-align: left;
}

.bi-issues-table thead, .data-preview-table thead {
    background: var(--bg-surface-elevated);
    position: sticky;
    top: 0;
    z-index: 2;
}

.bi-issues-table th, .data-preview-table th {
    padding: 8px 10px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
    text-transform: uppercase;
}

.bi-issues-table td, .data-preview-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(125, 166, 196, 0.08);
    color: var(--text-primary);
    white-space: nowrap;
}

.bi-issues-table tbody tr:hover, .data-preview-table tbody tr:hover {
    background: var(--bg-surface-hover);
}

.cell-null {
    color: var(--text-muted);
    font-style: italic;
    font-family: var(--font-mono);
    font-size: 0.70rem;
}

/* Severity Badges */
.severity-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    text-transform: uppercase;
    display: inline-block;
}

.severity-badge.critical, .severity-badge.error, .severity-badge.high {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.severity-badge.warning, .severity-badge.medium {
    background: var(--amber-soft);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}

.severity-badge.info, .severity-badge.low {
    background: var(--cyan-soft);
    color: var(--cyan);
    border: 1px solid rgba(22, 217, 232, 0.3);
}

/* Insights Feed Cards */
.bi-insights-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bi-insight-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.bi-insight-title {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 700;
    color: #FFFFFF;
}

.bi-insight-desc {
    font-size: 0.76rem;
    color: #a0c4df;
    line-height: 1.45;
}

.bi-insight-footer {
    display: flex;
    gap: 16px;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 2px;
}

/* PDF Raw Text Preview */
.pdf-text-preview {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #c5e3f6;
    background: var(--bg-terminal);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
    overflow-y: auto;
    max-height: 400px;
    line-height: 1.5;
}

/* Catalogue Controls Toolbar */
.cat-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cat-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.cat-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-search-input {
    min-width: 260px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    color: #FFFFFF;
    outline: none;
}

.cat-search-input:focus {
    border-color: var(--cyan);
}

.cat-select {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-family: var(--font-sans);
    font-size: 0.74rem;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
}

.cat-select:focus {
    border-color: var(--cyan);
}

.sort-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Professional Tables */
.cat-table-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: auto;
    max-height: 540px;
}

.cat-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    text-align: left;
}

.cat-table thead {
    background: var(--bg-surface-elevated);
    position: sticky;
    top: 0;
    z-index: 2;
}

.cat-table th {
    padding: 9px 12px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
    text-transform: uppercase;
}

.cat-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(125, 166, 196, 0.08);
    color: var(--text-primary);
    white-space: nowrap;
}

.cat-table tbody tr:hover {
    background: var(--bg-surface-hover);
}

.cat-table .mono {
    font-family: var(--font-mono);
}

.cat-table-wrapper.mini {
    max-height: 220px;
}

.cat-table.mini-table th {
    padding: 6px 8px;
    font-size: 0.62rem;
}

.cat-table.mini-table td {
    padding: 5px 8px;
    font-size: 0.7rem;
}

/* Pagination Bar */
.cat-pagination-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px;
    margin-top: 6px;
}

/* Buttons in Modals */
.cat-btn-primary {
    background: linear-gradient(135deg, #0284C7, #16D9E8);
    border: none;
    color: #030811;
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cat-btn-primary:hover {
    box-shadow: 0 0 12px var(--cyan-glow);
    transform: translateY(-1px);
}

.cat-btn-secondary {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cat-btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
}

.cat-btn-danger {
    background: var(--red-soft);
    border: 1px solid var(--red-border);
    color: var(--red);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cat-btn-danger:hover {
    background: var(--red);
    color: #FFFFFF;
}

.cat-btn-cancel {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.cat-btn-cancel:hover {
    color: #FFFFFF;
    border-color: var(--border-default);
}

.cat-btn-submit {
    background: linear-gradient(135deg, #0284C7, #16D9E8);
    border: none;
    color: #030811;
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.cat-btn-submit:hover {
    box-shadow: 0 0 12px var(--cyan-glow);
}

.cat-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.form-group input, .form-group textarea, .form-group select {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: #FFFFFF;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--cyan);
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-surface-elevated);
    border-top: 1px solid var(--border-subtle);
}

/* Stock Movement Adjust Box */
.adjust-header-banner {
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adjust-prod-name {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    color: #FFFFFF;
}

.adjust-stock-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cyan);
    background: var(--cyan-soft);
    padding: 3px 8px;
    border-radius: var(--radius-xs);
}

.adjust-preview-box {
    margin: 0 20px 14px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.adjust-preview-box strong {
    color: var(--cyan);
}

/* Product Detail Drawer Elements */
.detail-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.detail-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}

.detail-kpi {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-kpi .label {
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--text-muted);
}

.detail-kpi .val {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
}

.detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-surface-elevated);
    border-top: 1px solid var(--border-subtle);
}

.pending-feature-banner {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid var(--amber-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.72rem;
    color: #FDE68A;
}

/* Spreadsheet Mapping Sub-modal */
.mapping-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: 60vh;
}

.mapping-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mapping-field-row {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mapping-field-label {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.strategy-selector-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.strategy-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.mapping-counts-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.count-pill {
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
}

.count-pill.valid { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-border); }
.count-pill.duplicate { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-border); }
.count-pill.invalid { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-border); }
.count-pill.total { background: var(--cyan-soft); color: var(--cyan); border: 1px solid rgba(22, 217, 232, 0.3); }

/* ==============================================================================
   RESPONSIVE DESIGN (Phase 7 — Fluid Workspace & Overlay Drawers)
   Breakpoints: 1024px (overlay drawers), 768px (compact mobile)
   ============================================================================== */

@media (max-width: 1440px) {
    .panel.left-panel {
        width: 250px;
        min-width: 250px;
        max-width: 250px;
    }
    .panel.right-panel {
        width: 320px;
        min-width: 320px;
        max-width: 320px;
    }
}

@media (max-width: 1024px) {
    .hud-main {
        display: flex;
        padding: 6px 8px;
    }

    .panel.left-panel {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        width: 290px;
        max-width: 85vw;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.85);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    }

    .hud-main.left-open .panel.left-panel {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .panel.right-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        width: 360px;
        max-width: 90vw;
        margin-right: 0 !important;
        margin-left: 0 !important;
        transform: translateX(100%);
        z-index: 1000;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    }

    .hud-main.right-open .panel.right-panel {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(4, 8, 16, 0.72);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 900;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s;
    }

    .sidebar-backdrop.visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .toggle-btn-label {
        display: none;
    }

    .sidebar-toggle-btn {
        padding: 6px 8px;
    }

    .center-hero-workspace {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .hud-header {
        padding: 0 10px;
    }

    .brand .logo-text {
        font-size: 1.1rem;
    }

    .brand .sub-text {
        display: none;
    }

    .status-badge {
        display: none;
    }

    .center-hero-workspace {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
        max-height: none;
    }

    .hologram-stage {
        height: 110px;
    }

    .ironman-avatar-box {
        display: none;
    }

    .import-module-box {
        height: auto;
        max-height: none;
    }

    .floating-edge-toggle {
        display: none;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .pulse-indicator, .status-dot, .ai-pulse-dot {
        animation: none !important;
    }
}

/* ==========================================================================
   SARTHI CONVERSATIONAL AI & ENTERPRISE DESIGN SYSTEM
   ========================================================================== */

/* Header New Chat Button */
.header-new-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.28);
    border-radius: 20px;
    color: var(--cyan);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-new-chat-btn:hover {
    background: rgba(0, 243, 255, 0.18);
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.3);
    transform: translateY(-1px);
}

/* Sidebar Top Actions */
.sidebar-top-actions {
    padding: 12px 14px 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-new-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.15) 0%, rgba(37, 99, 235, 0.2) 100%);
    border: 1px solid rgba(0, 243, 255, 0.35);
    border-radius: 8px;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-new-chat-btn:hover {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.25) 0%, rgba(37, 99, 235, 0.35) 100%);
    border-color: var(--cyan);
    box-shadow: 0 2px 10px rgba(0, 243, 255, 0.25);
}

.sidebar-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(11, 21, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 10px;
    color: #94a3b8;
}

.sidebar-search-box:focus-within {
    border-color: rgba(0, 243, 255, 0.4);
    box-shadow: 0 0 0 1px rgba(0, 243, 255, 0.15);
}

.sidebar-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 12px;
    width: 100%;
}

.sidebar-search-box input::placeholder {
    color: #64748b;
}

/* Sidebar History Section */
.sidebar-history-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 120px;
    max-height: 240px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.sidebar-sub-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    padding: 0 4px;
}

.clear-history-link {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 10px;
    cursor: pointer;
    padding: 2px 4px;
}

.clear-history-link:hover {
    color: #ef4444;
}

.conversation-history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.history-item.active {
    background: rgba(0, 243, 255, 0.08);
    border-color: rgba(0, 243, 255, 0.2);
    color: var(--cyan);
}

.history-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.history-item-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 170px;
}

.history-item-delete {
    opacity: 0;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    color: #ef4444;
}

.history-empty-text {
    font-size: 11.5px;
    color: #475569;
    padding: 10px 4px;
    text-align: center;
    font-style: italic;
}

/* Sidebar Telemetry Accordion */
.sidebar-telemetry-accordion {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(8, 14, 26, 0.5);
}

.telemetry-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    list-style: none;
}

.telemetry-accordion-summary::-webkit-details-marker {
    display: none;
}

.telemetry-accordion-summary .chevron-svg {
    transition: transform 0.2s ease;
}

.sidebar-telemetry-accordion[open] .telemetry-accordion-summary .chevron-svg {
    transform: rotate(180deg);
}

.telemetry-accordion-body {
    padding: 0 10px 10px 10px;
    max-height: 320px;
    overflow-y: auto;
}

/* ==========================================================================
   CENTER CORE: STATE A (LANDING) & STATE B (ACTIVE CONVERSATION)
   ========================================================================== */

.center-core {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 15%, rgba(14, 30, 60, 0.35) 0%, rgba(7, 13, 25, 0.98) 70%);
}

/* State A: Landing Container */
.landing-hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 30px 24px 20px 24px;
    overflow-y: auto;
    animation: fadeInLanding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.landing-welcome-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 28px;
}

.landing-logo-emblem {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.15) 0%, rgba(11, 21, 40, 0.8) 75%);
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.landing-emblem-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.landing-welcome-title {
    font-size: 30px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    line-height: 1.25;
}

.landing-welcome-sub {
    font-size: 14.5px;
    color: #94a3b8;
    max-width: 580px;
    line-height: 1.5;
    margin: 0;
}

.landing-composer-slot {
    width: 100%;
    max-width: 760px;
    margin-bottom: 28px;
}

/* Suggested Business Queries Section */
.suggested-queries-section {
    width: 100%;
    max-width: 760px;
}

.suggested-queries-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-left: 2px;
}

.suggested-queries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.query-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 13px 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.query-card:hover {
    background: rgba(22, 36, 64, 0.85);
    border-color: rgba(0, 243, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.query-card-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
}

.query-card-icon.amber {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.25);
    color: #f59e0b;
}

.query-card-icon.cyan {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.25);
    color: #06b6d4;
}

.query-card-icon.green {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    color: #10b981;
}

.query-card-icon.purple {
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.25);
    color: #c084fc;
}

.query-card-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.query-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 2px;
}

.query-sub {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.35;
}

/* ==========================================================================
   STATE B: CONVERSATION WORKSPACE
   ========================================================================== */

.conversation-workspace {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
    animation: fadeInWorkspace 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.chat-workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    background: rgba(7, 13, 25, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    z-index: 10;
}

.chat-title-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.chat-model-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--cyan);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
}

.chat-current-title {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 480px;
}

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

.chat-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 11.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

/* Conversation Scroll Stream */
.conversation-stream {
    flex: 1 1 0%;
    overflow-y: auto;
    padding: 24px 20px 40px 20px;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

/* Chat Messages */
.chat-msg {
    display: flex;
    width: 100%;
    animation: msgEntrance 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.chat-msg-user {
    justify-content: flex-end;
}

.chat-user-bubble {
    max-width: 80%;
    background: #182642;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 16px 16px 4px 16px;
    padding: 12px 18px;
    color: #f8fafc;
    font-size: 14px;
    line-height: 1.55;
    word-break: break-word;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.chat-user-attachment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 6px;
    font-size: 11.5px;
    color: var(--cyan);
    margin-bottom: 8px;
}

.chat-msg-sarthi {
    justify-content: flex-start;
    gap: 14px;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: #0b1528;
    border: 1px solid rgba(0, 243, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.chat-body {
    flex: 1;
    min-width: 0;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.65;
    color: #f1f5f9;
}

.chat-markdown h3, .chat-markdown h4 {
    color: #ffffff;
    font-weight: 600;
    margin: 12px 0 6px 0;
}

.chat-markdown h3:first-child, .chat-markdown h4:first-child {
    margin-top: 0;
}

.chat-markdown p {
    margin: 0 0 10px 0;
}

.chat-markdown p:last-child {
    margin-bottom: 0;
}

.chat-markdown ul, .chat-markdown ol {
    margin: 6px 0 10px 0;
    padding-left: 20px;
}

.chat-markdown li {
    margin-bottom: 4px;
}

.chat-markdown code {
    background: rgba(0, 0, 0, 0.4);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12.5px;
}

.chat-markdown pre {
    background: #060b14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    margin: 10px 0;
}

.chat-table-wrap {
    overflow-x: auto;
    margin: 14px 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-markdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.chat-markdown-table th {
    background: #0f1c34;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--cyan);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-markdown-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.chat-markdown-table tr:last-child td {
    border-bottom: none;
}

.chat-markdown-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Chat Actions Row (Reports, Catalogue links) */
.chat-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.25);
    border-radius: 6px;
    color: var(--cyan);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chat-action-pill:hover {
    background: rgba(0, 243, 255, 0.18);
    border-color: var(--cyan);
}

/* Follow-up Chips */
.chat-followups-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.chat-followup-label {
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.04em;
}

.chat-followup-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chat-followup-chip {
    padding: 6px 12px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
    max-width: 100%;
    white-space: normal;
    text-align: left;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.chat-followup-chip:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--cyan);
    color: #ffffff;
}

/* Chat Meta Row */
.chat-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 11px;
    color: #64748b;
}

.chat-meta-tag {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-ctrl-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-ctrl-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.chat-ctrl-btn:hover {
    color: var(--cyan);
}

/* Thinking Indicator */
.chat-thinking-indicator {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
    padding: 12px 20px;
}

.thinking-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #0b1528;
    border: 1px solid rgba(0, 243, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.thinking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thinking-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.thinking-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    animation: pulseThinkingDot 1.4s infinite ease-in-out both;
}

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

@keyframes pulseThinkingDot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.1); opacity: 1; }
}

.thinking-label {
    font-size: 12.5px;
    color: #94a3b8;
    font-style: italic;
}

/* ==========================================================================
   THE UNIFIED PROMPT COMPOSER
   ========================================================================== */

.prompt-composer-container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 20;
}

.bottom-composer-slot {
    width: 100%;
    padding: 10px 20px 20px 20px;
    background: linear-gradient(180deg, rgba(7, 13, 25, 0) 0%, rgba(7, 13, 25, 0.95) 25%, #070d19 100%);
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
}

.composer-form {
    background: #0e192f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    padding: 10px 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.composer-form:focus-within {
    border-color: rgba(0, 243, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(0, 243, 255, 0.12), 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Composer Attachment Pill */
.composer-attachment-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.25);
    border-radius: 8px;
    padding: 6px 12px;
    margin-bottom: 8px;
}

.pill-file-icon {
    color: var(--cyan);
    display: flex;
    align-items: center;
}

.pill-file-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    min-width: 0;
}

.pill-filename {
    font-weight: 600;
    color: #ffffff;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 220px;
}

.pill-filesize {
    color: #94a3b8;
}

.pill-status {
    padding: 1px 6px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 4px;
    color: #10b981;
    font-size: 10px;
    font-weight: 600;
}

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

.pill-import-btn {
    padding: 3px 8px;
    background: var(--cyan);
    color: #070d19;
    border: none;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
}

.pill-remove-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}

.pill-remove-btn:hover {
    color: #ef4444;
}

/* Textarea */
.composer-input-row {
    width: 100%;
}

.composer-textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 14.5px;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
    resize: none;
    min-height: 38px;
    max-height: 160px;
    padding: 4px 0 6px 0;
    overflow-y: auto;
}

.composer-textarea::placeholder {
    color: #64748b;
    font-weight: 400;
}

/* Composer Controls Row */
.composer-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.composer-controls-left, .composer-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.composer-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
}

.composer-icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.attach-btn-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.voice-status-text {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 500;
    display: none;
}

.mic-btn.active {
    color: #ef4444 !important;
    animation: micPulse 1.2s infinite ease-in-out;
}

@keyframes micPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.composer-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--cyan);
    color: #070d19;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.composer-send-btn:hover {
    background: #38bdf8;
    transform: scale(1.05);
}

.composer-send-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.send-svg {
    width: 16px;
    height: 16px;
}

/* Audio wave visualizer in Tactical Intel */
.audio-wave-visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 24px;
}

.wave-bar {
    width: 3px;
    height: 8px;
    background: var(--cyan);
    border-radius: 2px;
    opacity: 0.7;
    animation: audioWave 1.2s infinite ease-in-out;
}

.wave-bar:nth-child(2) { animation-delay: 0.2s; height: 16px; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; height: 22px; }
.wave-bar:nth-child(4) { animation-delay: 0.1s; height: 14px; }
.wave-bar:nth-child(5) { animation-delay: 0.3s; height: 10px; }

@keyframes audioWave {
    0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .suggested-queries-grid {
        grid-template-columns: 1fr;
    }
    .landing-welcome-title {
        font-size: 24px;
    }
    .landing-welcome-sub {
        font-size: 13.5px;
    }
    .chat-user-bubble {
        max-width: 90%;
    }
}

/* ==========================================================================
   REFINED COMPOSER & PROFESSIONAL VOICE ASSISTANT DESIGN SYSTEM
   ========================================================================== */

/* Remove floating edge toggles */
.floating-edge-toggle {
    display: none !important;
}

/* Prompt Composer Main Container */
.prompt-composer-container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 25;
}

.bottom-composer-slot {
    width: 100%;
    padding: 10px 20px 18px 20px;
    background: linear-gradient(180deg, rgba(7, 13, 25, 0) 0%, rgba(7, 13, 25, 0.92) 20%, #070d19 100%);
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
}

.composer-form {
    background: rgba(13, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    padding: 12px 14px 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(12px);
    transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.composer-form:focus-within {
    border-color: rgba(0, 243, 255, 0.45);
    box-shadow: 0 0 0 2px rgba(0, 243, 255, 0.12), 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Compact Attachment Pill */
.composer-attachment-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.22);
    border-radius: 8px;
    padding: 5px 10px;
    margin-bottom: 2px;
}

.pill-file-badge {
    color: var(--cyan);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.pill-file-details {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

.pill-filename {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 220px;
}

.pill-filesize {
    font-size: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}

.pill-status-tag {
    font-size: 10px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 4px;
    padding: 1px 6px;
    flex-shrink: 0;
}

.pill-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pill-import-action-btn {
    font-size: 10.5px;
    font-weight: 700;
    background: var(--cyan);
    color: #070d19;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.pill-import-action-btn:hover {
    background: #38bdf8;
}

.pill-remove-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.pill-remove-btn:hover {
    color: #ef4444;
}

/* Multiline Textarea */
.composer-input-row {
    width: 100%;
}

.composer-textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-size: 14.5px;
    line-height: 1.5;
    font-family: 'Inter', -apple-system, sans-serif;
    resize: none;
    min-height: 38px;
    max-height: 160px;
    padding: 4px 2px;
    overflow-y: auto;
}

.composer-textarea::placeholder {
    color: #64748b;
    font-weight: 400;
}

/* Bottom Action Row */
.composer-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    gap: 10px;
}

.composer-action-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.composer-action-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Base Icon Buttons */
.composer-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    padding: 0;
}

.composer-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

.composer-attach-btn:hover {
    color: var(--cyan);
    border-color: rgba(0, 243, 255, 0.35);
    background: rgba(0, 243, 255, 0.08);
}

/* Microphone Control & Visual States */
.composer-mic-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.composer-mic-btn:hover {
    color: var(--cyan);
    border-color: rgba(0, 243, 255, 0.35);
    background: rgba(0, 243, 255, 0.08);
}

.composer-mic-btn.listening {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    animation: micListeningPulse 1.2s infinite ease-in-out;
}

@keyframes micListeningPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* Voice Assistant State Indicator Badge */
.voice-state-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    color: #94a3b8;
    user-select: none;
    max-width: 220px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.voice-state-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: #64748b;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.voice-state-indicator.state-idle .voice-state-dot {
    background: var(--cyan);
    box-shadow: 0 0 6px rgba(0, 243, 255, 0.4);
}

.voice-state-indicator.state-listening {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.voice-state-indicator.state-listening .voice-state-dot {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: dotPulse 1s infinite;
}

.voice-state-indicator.state-speaking {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.voice-state-indicator.state-speaking .voice-state-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

.voice-state-indicator.state-processing {
    background: rgba(0, 243, 255, 0.08);
    border-color: rgba(0, 243, 255, 0.3);
    color: var(--cyan);
}

.voice-state-indicator.state-processing .voice-state-dot {
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
}

.voice-state-indicator.state-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

/* Sound Waves Animation */
.voice-live-waves {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 12px;
}

.v-wave {
    width: 2px;
    height: 4px;
    background: currentColor;
    border-radius: 1px;
    animation: vWaveAnim 0.8s infinite ease-in-out;
}

.v-wave:nth-child(2) { animation-delay: 0.15s; height: 8px; }
.v-wave:nth-child(3) { animation-delay: 0.3s; height: 11px; }
.v-wave:nth-child(4) { animation-delay: 0.1s; height: 6px; }

@keyframes vWaveAnim {
    0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Stop Speaking Button */
.stop-speaking-btn {
    height: 28px !important;
    width: auto !important;
    padding: 0 8px !important;
    border-radius: 6px !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    color: #ef4444 !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    gap: 4px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.stop-speaking-btn:hover {
    background: rgba(239, 68, 68, 0.25) !important;
}

/* Execute Button: Fully Visible, No Text Overflow */
.composer-execute-btn {
    height: 32px;
    min-width: 98px;
    padding: 0 14px;
    border-radius: 8px;
    background: var(--cyan);
    color: #070d19;
    border: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 243, 255, 0.25);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.composer-execute-btn:hover {
    background: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 243, 255, 0.35);
}

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

.composer-execute-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.execute-btn-label {
    white-space: nowrap;
    overflow: visible;
}

.execute-svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}


/* ==============================================================================
   SARTHI LUXURY ENTERPRISE UI & WAKE-WORD STYLES
   ============================================================================== */

/* Landing Page Spacious Vertical Alignment */
.landing-hero-container {
    padding: 70px 24px 50px 24px !important;
    max-width: 800px !important;
    gap: 32px !important;
}

.landing-welcome-title {
    color: #F3F1EC !important;
    font-size: 32px !important;
    letter-spacing: -0.02em !important;
}

.landing-welcome-sub {
    color: #A6AFBD !important;
    font-size: 15px !important;
    max-width: 580px !important;
}

/* Warm Champagne Gold Focus Ring for Composer */
.composer-form:focus-within {
    border-color: rgba(197, 160, 106, 0.55) !important;
    box-shadow: 0 0 0 2px rgba(197, 160, 106, 0.15), 0 8px 32px rgba(0, 0, 0, 0.55) !important;
}

/* Hands-Free Wake-Word Toggle Button */
.wake-word-toggle-btn {
    height: 32px !important;
    width: auto !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    color: #A6AFBD !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em !important;
    gap: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.wake-word-toggle-btn:hover {
    color: #C5A06A !important;
    border-color: rgba(197, 160, 106, 0.35) !important;
    background: rgba(197, 160, 106, 0.08) !important;
}

.wake-word-toggle-btn.active {
    background: rgba(197, 160, 106, 0.16) !important;
    border-color: #C5A06A !important;
    color: #C5A06A !important;
    box-shadow: 0 0 12px rgba(197, 160, 106, 0.25) !important;
}

.wake-btn-label {
    white-space: nowrap !important;
}

/* Refined Voice Assistant State Badges */
.voice-state-indicator.state-wake_standby {
    background: rgba(212, 160, 76, 0.10) !important;
    border-color: rgba(212, 160, 76, 0.35) !important;
    color: #D4A04C !important;
}

.voice-state-indicator.state-wake_standby .voice-state-dot {
    background: #D4A04C !important;
    box-shadow: 0 0 8px rgba(212, 160, 76, 0.6) !important;
    animation: dotPulse 1.4s infinite !important;
}

.voice-state-indicator.state-wake_detected {
    background: rgba(197, 160, 106, 0.20) !important;
    border-color: #C5A06A !important;
    color: #C5A06A !important;
}

.voice-state-indicator.state-wake_detected .voice-state-dot {
    background: #C5A06A !important;
    box-shadow: 0 0 12px #C5A06A !important;
    animation: dotPulse 0.5s infinite !important;
}

.voice-state-indicator.state-idle .voice-state-dot {
    background: #C5A06A !important;
    box-shadow: 0 0 6px rgba(197, 160, 106, 0.4) !important;
}

/* Execute Button Luxury Styling */
.composer-execute-btn {
    background: #C5A06A !important;
    color: #0B1220 !important;
    box-shadow: 0 2px 10px rgba(197, 160, 106, 0.25) !important;
}

.composer-execute-btn:hover {
    background: #D4AF77 !important;
    box-shadow: 0 4px 16px rgba(197, 160, 106, 0.38) !important;
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* Specific Visual Styles for All 9 Voice Automation States */
.voice-state-indicator.state-initializing {
    background: rgba(197, 160, 106, 0.08) !important;
    border-color: rgba(197, 160, 106, 0.25) !important;
    color: #D1B28A !important;
}

.voice-state-indicator.state-transcription_finalizing {
    background: rgba(212, 160, 76, 0.12) !important;
    border-color: rgba(212, 160, 76, 0.4) !important;
    color: #D4A04C !important;
}

.voice-state-indicator.state-transcription_finalizing .voice-state-dot {
    background: #D4A04C !important;
    box-shadow: 0 0 10px #D4A04C !important;
    animation: dotPulse 0.6s infinite !important;
}

.voice-state-indicator.state-capturing_query {
    background: rgba(197, 160, 106, 0.12) !important;
    border-color: rgba(197, 160, 106, 0.45) !important;
    color: #F3F1EC !important;
}

.voice-state-indicator.state-capturing_query .voice-state-dot {
    background: #C5A06A !important;
    box-shadow: 0 0 10px #C5A06A !important;
    animation: dotPulse 0.8s infinite !important;
}

.voice-state-indicator.state-executing_query {
    background: rgba(29, 139, 145, 0.14) !important;
    border-color: rgba(29, 139, 145, 0.4) !important;
    color: #38bdf8 !important;
}

.voice-state-indicator.state-speaking_response {
    background: rgba(62, 155, 121, 0.12) !important;
    border-color: rgba(62, 155, 121, 0.4) !important;
    color: #3E9B79 !important;
}

.voice-state-indicator.state-speaking_response .voice-state-dot {
    background: #3E9B79 !important;
    box-shadow: 0 0 8px #3E9B79 !important;
}


/* ==============================================================================
   SARTHI RESPONSIVE ARCHITECTURE — CROSS-DEVICE & VIEWPORT OPTIMIZATION
   Breakpoints:
     - Large Desktop: 1280px+ (Preserves exact current luxury styling)
     - Small Desktop / Laptop: 1024px – 1279px
     - Tablet Portrait & Landscape: 768px – 1023px
     - Large Mobile: 481px – 767px
     - Standard Mobile: 375px – 480px
     - Small Mobile: 320px – 374px
     - Mobile Landscape: max-height 500px
   ============================================================================== */

/* Fluid Viewport & Mobile Safe Areas */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

html, body.sarthi-app-body {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    box-sizing: border-box;
}

/* Base Safeguards: Prevent fixed-width overflow & flex compression bugs */
*, *::before, *::after {
    box-sizing: border-box;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
}

/* Ensure central container and conversation stream never overflow horizontally */
.hud-main {
    height: calc(100vh - 52px);
    height: calc(100dvh - 52px);
    max-height: calc(100dvh - 52px);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.center-core {
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.conversation-workspace {
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.conversation-stream {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

/* Message Bubble & Content Wrapping */
.chat-user-bubble {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: min(85%, 650px);
}

.chat-body {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
    max-width: 100%;
}

.chat-markdown {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Responsive Table & Code Block Scroll Containers */
.chat-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 12px 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-markdown-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
}

.chat-markdown pre {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   1. SMALL DESKTOP / LAPTOP (1024px – 1279px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) and (max-width: 1279px) {
    .panel.left-panel {
        width: 240px;
        min-width: 240px;
        max-width: 240px;
    }
    .panel.right-panel {
        width: 310px;
        min-width: 310px;
        max-width: 310px;
    }
    .prompt-composer-container {
        max-width: 700px;
    }
    .brand .sub-text {
        font-size: 0.65rem;
    }
}

/* --------------------------------------------------------------------------
   2. TABLET PORTRAIT & LANDSCAPE (768px – 1023px)
   Overlay Drawers, Full-Width Central Workspace, Fluid Composer
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    .hud-main {
        display: flex;
        padding: 4px 6px;
    }

    /* Left Drawer: Overlay, does NOT squeeze central workspace */
    .panel.left-panel {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        width: min(320px, 82vw) !important;
        max-width: 82vw !important;
        margin: 0 !important;
        transform: translateX(-100%) !important;
        z-index: 1000 !important;
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.88) !important;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
        background: #090f1d !important;
    }

    .hud-main.left-open .panel.left-panel {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Right Drawer: Overlay, does NOT squeeze central workspace */
    .panel.right-panel {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        width: min(380px, 88vw) !important;
        max-width: 88vw !important;
        margin: 0 !important;
        transform: translateX(100%) !important;
        z-index: 1000 !important;
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.88) !important;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
        background: #090f1d !important;
    }

    .hud-main.right-open .panel.right-panel {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Overlay Backdrop */
    .sidebar-backdrop {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(4, 8, 16, 0.72) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        z-index: 950 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity 0.22s ease, visibility 0.22s !important;
    }

    .sidebar-backdrop.visible {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Central Core occupies full available space without lateral compression */
    .center-core {
        width: 100% !important;
        flex: 1 1 100% !important;
        margin: 0 !important;
    }

    .toggle-btn-label {
        display: none !important;
    }

    .sidebar-toggle-btn {
        padding: 6px 9px !important;
        min-width: 36px !important;
        height: 36px !important;
        justify-content: center !important;
    }

    .prompt-composer-container {
        max-width: 100% !important;
        padding: 0 4px !important;
    }

    .bottom-composer-slot {
        padding: 8px 14px 14px 14px !important;
    }

    .landing-hero-container {
        padding: clamp(30px, 6vh, 60px) 16px 30px 16px !important;
        gap: clamp(20px, 4vh, 32px) !important;
    }
}

/* --------------------------------------------------------------------------
   3. LARGE MOBILE (481px – 767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .hud-header {
        height: 50px !important;
        min-height: 50px !important;
        padding: 0 10px !important;
        gap: 8px !important;
    }

    .header-left {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        gap: 8px !important;
    }

    .header-right {
        flex: 0 0 auto !important;
        gap: 8px !important;
    }

    .brand {
        min-width: 0 !important;
    }

    .brand .sub-text {
        display: none !important;
    }

    .brand .logo-text {
        font-size: 1.15rem !important;
        white-space: nowrap !important;
    }

    .sarthi-header-logo {
        width: 28px !important;
        height: 28px !important;
    }

    .sarthi-brand-logo-wrap {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
    }

    .header-new-chat-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 8px !important;
    }

    .header-new-chat-btn span {
        display: none !important;
    }

    .sidebar-toggle-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 8px !important;
    }

    /* Status badge: Pulsing dot only */
    .status-badge {
        display: inline-flex !important;
        padding: 6px !important;
        min-width: 28px !important;
        height: 28px !important;
        border-radius: 50% !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0 !important;
    }

    #statusText {
        display: none !important;
    }

    /* Workspace Header Compact */
    .chat-workspace-header {
        height: 42px !important;
        min-height: 42px !important;
        padding: 6px 12px !important;
    }

    .chat-current-title {
        display: none !important;
    }

    .chat-action-btn span {
        display: none !important;
    }

    .chat-action-btn {
        padding: 4px 8px !important;
        min-width: 28px !important;
        height: 28px !important;
        justify-content: center !important;
    }

    .hud-main {
        height: calc(100dvh - 70px) !important;
    }

    .panel.left-panel {
        width: min(300px, 86vw) !important;
        max-width: 86vw !important;
    }

    .panel.right-panel {
        width: min(350px, 90vw) !important;
        max-width: 90vw !important;
    }

    .landing-hero-container {
        padding: clamp(24px, 5vh, 44px) 14px 20px 14px !important;
        gap: 20px !important;
    }

    .landing-welcome-title {
        font-size: clamp(23px, 5.5vw, 28px) !important;
        text-align: center !important;
    }

    .landing-welcome-sub {
        font-size: clamp(13px, 3vw, 14.5px) !important;
        text-align: center !important;
        max-width: 480px !important;
    }

    .conversation-stream {
        padding: 14px 12px 28px 12px !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .chat-user-bubble {
        max-width: 90% !important;
        font-size: 13.5px !important;
        padding: 10px 14px !important;
    }

    .chat-body {
        padding: 12px 14px !important;
        font-size: 13.5px !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    .chat-avatar {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
    }

    .chat-table-wrap,
    .chat-markdown pre {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Suggested Next Inquiries */
    .chat-followup-chips {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px 8px !important;
        width: 100% !important;
    }

    .chat-followup-chip {
        border-radius: 6px !important;
        padding: 6px 10px !important;
        font-size: 11.5px !important;
        line-height: 1.4 !important;
        max-width: 100% !important;
        white-space: normal !important;
        text-align: left !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    /* Composer Compact Tuning */
    .bottom-composer-slot {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 20 !important;
        padding: 6px 10px calc(10px + env(safe-area-inset-bottom, 0px)) 10px !important;
    }

    .composer-form {
        padding: 10px 12px 8px 12px !important;
        border-radius: 14px !important;
    }

    .composer-action-row {
        gap: 6px !important;
        padding-top: 6px !important;
    }

    .composer-action-left {
        gap: 6px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .composer-action-right {
        gap: 6px !important;
        flex: 0 0 auto !important;
    }

    .wake-word-toggle-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 8px !important;
    }

    .wake-btn-label {
        display: none !important;
    }

    .voice-state-indicator {
        max-width: 120px !important;
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    .composer-execute-btn {
        min-width: 84px !important;
        height: 32px !important;
        padding: 0 10px !important;
        font-size: 11px !important;
    }

    /* Footer Compact Tuning */
    .hud-footer {
        flex: 0 0 20px !important;
        height: 20px !important;
        min-height: 20px !important;
        max-height: 20px !important;
        padding: 0 8px !important;
        justify-content: center !important;
    }

    .footer-right {
        display: none !important;
    }

    .footer-left {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: 0.60rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    #footerRepo,
    #footerStatus {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

/* --------------------------------------------------------------------------
   4. STANDARD MOBILE (375px – 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .hud-header {
        height: 48px !important;
        min-height: 48px !important;
        padding: 0 8px !important;
        gap: 6px !important;
    }

    .header-left {
        gap: 6px !important;
    }

    .header-right {
        gap: 6px !important;
    }

    .brand .logo-text {
        font-size: 1.05rem !important;
    }

    .sarthi-header-logo {
        width: 26px !important;
        height: 26px !important;
    }

    .sarthi-brand-logo-wrap {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }

    .header-new-chat-btn {
        padding: 0 !important;
        border-radius: 8px !important;
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        justify-content: center !important;
    }

    .sidebar-toggle-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        padding: 0 !important;
        border-radius: 6px !important;
        justify-content: center !important;
    }

    .status-badge {
        padding: 4px !important;
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
    }

    .hud-main {
        height: calc(100dvh - 68px) !important;
    }

    .panel.left-panel {
        width: min(290px, 90vw) !important;
        max-width: 90vw !important;
    }

    .panel.right-panel {
        width: min(340px, 94vw) !important;
        max-width: 94vw !important;
    }

    .landing-hero-container {
        padding: clamp(16px, 4vh, 32px) 12px 16px 12px !important;
        gap: 16px !important;
    }

    .landing-welcome-title {
        font-size: 22px !important;
    }

    .landing-welcome-sub {
        font-size: 12.5px !important;
        line-height: 1.45 !important;
    }

    .landing-emblem-img {
        width: 46px !important;
        height: auto !important;
    }

    .conversation-stream {
        padding: 10px 8px 20px 8px !important;
        gap: 12px !important;
    }

    .chat-user-bubble {
        max-width: 92% !important;
        font-size: 13px !important;
        padding: 8px 12px !important;
    }

    .chat-body {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    .chat-msg-sarthi {
        gap: 8px !important;
    }

    .chat-avatar {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        padding: 2px !important;
    }

    /* Composer Precision Fitting for 375px–480px */
    .bottom-composer-slot {
        padding: 4px 6px calc(8px + env(safe-area-inset-bottom, 0px)) 6px !important;
    }

    .composer-form {
        padding: 8px 10px 6px 10px !important;
        border-radius: 12px !important;
        gap: 6px !important;
    }

    .composer-textarea {
        font-size: 13.5px !important;
        min-height: 34px !important;
        padding: 2px 0 !important;
    }

    .composer-action-row {
        gap: 5px !important;
        padding-top: 5px !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }

    .composer-action-left {
        gap: 5px !important;
    }

    .composer-action-right {
        gap: 5px !important;
    }

    .composer-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }

    /* Wake button: sleek compact icon-only representation */
    .wake-word-toggle-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        padding: 0 !important;
        justify-content: center !important;
    }

    .wake-btn-label {
        display: none !important;
    }

    .voice-state-indicator {
        max-width: 100px !important;
        font-size: 9.5px !important;
        padding: 2px 6px !important;
        gap: 4px !important;
    }

    .composer-execute-btn {
        height: 30px !important;
        min-width: 76px !important;
        padding: 0 8px !important;
        font-size: 10.5px !important;
        gap: 4px !important;
    }

    .execute-svg {
        width: 12px !important;
        height: 12px !important;
    }
}

/* --------------------------------------------------------------------------
   5. SMALL MOBILE (320px – 374px)
   Zero Collision, Wrapped Controls, Full Viewport Fit
   -------------------------------------------------------------------------- */
@media (max-width: 374px) {
    .hud-header {
        height: 46px !important;
        min-height: 46px !important;
        padding: 0 6px !important;
        gap: 4px !important;
    }

    .status-badge {
        display: none !important;
    }

    .brand .logo-text {
        font-size: 0.96rem !important;
    }

    .sarthi-brand-logo-wrap {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
    }

    .sarthi-header-logo {
        width: 22px !important;
        height: 22px !important;
    }

    .header-left {
        gap: 4px !important;
    }

    .header-right {
        gap: 4px !important;
    }

    .sidebar-toggle-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        padding: 0 !important;
        justify-content: center !important;
    }

    .header-new-chat-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        padding: 0 !important;
        justify-content: center !important;
    }

    .hud-main {
        height: calc(100dvh - 66px) !important;
    }

    .panel.left-panel {
        width: 92vw !important;
        max-width: 92vw !important;
    }

    .panel.right-panel {
        width: 95vw !important;
        max-width: 95vw !important;
    }

    .landing-welcome-title {
        font-size: 19px !important;
    }

    .landing-welcome-sub {
        font-size: 12px !important;
    }

    .landing-emblem-img {
        width: 40px !important;
    }

    /* Smallest Mobile Composer: Wrap gracefully to 2 micro rows */
    .composer-action-row {
        flex-wrap: wrap !important;
        gap: 6px !important;
        justify-content: space-between !important;
    }

    .composer-action-left {
        flex: 1 1 100% !important;
        justify-content: space-between !important;
        min-width: 0 !important;
    }

    .composer-action-right {
        flex: 1 1 100% !important;
        justify-content: flex-end !important;
        gap: 6px !important;
    }

    .voice-state-indicator {
        max-width: 150px !important;
        font-size: 9px !important;
        padding: 2px 6px !important;
    }

    .composer-execute-btn {
        min-width: 72px !important;
        height: 28px !important;
        font-size: 10px !important;
        padding: 0 6px !important;
    }

    .chat-user-bubble {
        max-width: 96% !important;
        font-size: 12.5px !important;
    }

    .chat-body {
        padding: 8px 10px !important;
        font-size: 12.5px !important;
    }
}

/* --------------------------------------------------------------------------
   6. MOBILE LANDSCAPE ORIENTATION (max-height: 500px)
   -------------------------------------------------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
    .hud-header {
        height: 42px !important;
        min-height: 42px !important;
    }

    .hud-main {
        height: calc(100dvh - 58px) !important;
    }

    .landing-hero-container {
        padding: 10px 16px !important;
        gap: 10px !important;
    }

    .landing-welcome-title {
        font-size: 18px !important;
    }

    .landing-welcome-sub {
        display: none !important;
    }

    .landing-emblem-img {
        width: 32px !important;
    }

    .bottom-composer-slot {
        padding: 4px 12px 6px 12px !important;
    }

    .composer-textarea {
        min-height: 28px !important;
        max-height: 70px !important;
    }
}

/* --------------------------------------------------------------------------
   7. MODAL DIALOGS RESPONSIVENESS (All Screen Sizes)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .bi-modal-container,
    .cat-submodal-card {
        width: 96vw !important;
        max-width: 96vw !important;
        max-height: 92dvh !important;
        padding: 12px !important;
        border-radius: 10px !important;
    }

    .bi-modal-header {
        gap: 6px !important;
    }

    .bi-modal-header h2,
    .bi-modal-header h3 {
        font-size: 14px !important;
    }

    .cat-modal-tabs {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .cat-tab-btn {
        padding: 6px 10px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    .cat-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-width: 100% !important;
    }

    .cat-table {
        min-width: 520px !important;
    }
}


/* ============================================================== */
/* SARTHI DEDICATED DESTINATIONS: REPORTS, DATASETS, DOCS CSS     */
/* ============================================================== */

.reports-container,
.datasets-container,
.docs-container {
    max-width: 1200px;
    width: 95vw;
    height: 88vh;
    max-height: 900px;
}

.empty-dossier-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    color: var(--text-secondary);
    border: 1px dashed rgba(0, 243, 255, 0.2);
    border-radius: 8px;
    margin: 20px 0;
    background: rgba(10, 16, 26, 0.4);
}

.empty-dossier-state .empty-icon {
    color: var(--gold-champagne);
    opacity: 0.7;
    margin-bottom: 16px;
}

.empty-dossier-state h3 {
    font-family: var(--font-header);
    font-size: 15px;
    letter-spacing: 1.5px;
    color: #fff;
    margin-bottom: 8px;
}

.empty-dossier-state p {
    font-size: 12px;
    max-width: 480px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.tbl-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 3px;
    text-transform: uppercase;
}

.tbl-badge.indexed,
.tbl-badge.active,
.tbl-badge.verified,
.tbl-badge.success {
    background: rgba(0, 255, 157, 0.12);
    color: #00ff9d;
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.tbl-badge.unindexed,
.tbl-badge.pending,
.tbl-badge.warning {
    background: rgba(255, 184, 0, 0.12);
    color: #ffb800;
    border: 1px solid rgba(255, 184, 0, 0.3);
}

.tbl-badge.error,
.tbl-badge.failed,
.tbl-badge.inactive {
    background: rgba(255, 75, 75, 0.12);
    color: #ff4b4b;
    border: 1px solid rgba(255, 75, 75, 0.3);
}

.tbl-badge.format,
.tbl-badge.cyan {
    background: rgba(0, 243, 255, 0.12);
    color: var(--cyan);
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.tbl-badge.gold {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-champagne);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.bi-dataset-selector-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chunk-card {
    background: rgba(14, 22, 36, 0.75);
    border: 1px solid rgba(0, 243, 255, 0.15);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    font-family: var(--font-mono);
}

.chunk-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 11px;
    color: var(--gold-champagne);
}

.chunk-body {
    font-size: 11px;
    color: #cbd5e1;
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
    background: rgba(6, 11, 20, 0.6);
    padding: 8px;
    border-radius: 3px;
}
