/* ================================================================
   AURA AI — Core Design System & Holographic Animated UI
   Color Palette: Deep Black / Cyber Lime Green / Glassmorphism
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* ── Core Cyber / Autonomous AI Palette ── */
    --bg-void: #030708;
    --bg-primary: #050b0a;
    --bg-secondary: #081210;
    --bg-tertiary: #0c1a17;
    --bg-elevated: #112420;
    --bg-card: rgba(8, 20, 17, 0.75);

    /* ── Glassmorphism ── */
    --bg-glass: rgba(6, 15, 13, 0.7);
    --bg-glass-heavy: rgba(4, 10, 9, 0.88);
    --bg-glass-light: rgba(57, 255, 20, 0.03);
    --bg-glass-hover: rgba(57, 255, 20, 0.08);
    --bg-glass-active: rgba(57, 255, 20, 0.15);

    /* ── Neon Electric Green & Accents ── */
    --aura-green: #39ff14;
    --aura-green-bright: #4df826;
    --aura-green-glow: rgba(57, 255, 20, 0.45);
    --aura-green-soft: rgba(57, 255, 20, 0.12);
    --aura-green-dim: #1f8a10;
    --aura-emerald: #10b981;
    --aura-cyan: #00f0ff;
    --aura-cyan-glow: rgba(0, 240, 255, 0.35);

    /* ── Typography & Neutrals ── */
    --text-primary: #f0fdf4;
    --text-secondary: #a7c4ba;
    --text-tertiary: #5d7c72;
    --text-muted: #3a5049;
    --text-dim: #233630;

    /* ── Gradients ── */
    --gradient-aura: linear-gradient(135deg, #39ff14 0%, #00f0ff 100%);
    --gradient-aura-dark: linear-gradient(135deg, #112920 0%, #081512 100%);
    --gradient-glow: radial-gradient(circle, rgba(57, 255, 20, 0.25) 0%, rgba(0, 240, 255, 0.08) 50%, transparent 80%);
    --gradient-hud: linear-gradient(180deg, rgba(57, 255, 20, 0.08) 0%, transparent 100%);

    /* ── Borders & Outlines ── */
    --border-subtle: rgba(57, 255, 20, 0.1);
    --border-medium: rgba(57, 255, 20, 0.22);
    --border-bright: rgba(57, 255, 20, 0.55);
    --border-glow: 0 0 12px rgba(57, 255, 20, 0.35);

    /* ── Shadows & Holograms ── */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.9);
    --shadow-aura-glow: 0 0 35px rgba(57, 255, 20, 0.25);
    --shadow-aura-heavy: 0 0 60px rgba(57, 255, 20, 0.4);

    /* ── Typography Stack ── */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* ── Radii ── */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

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

/* ── Global Reset & Setup ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Ambient Background Canvas / HUD Grid ── */
.ambient-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hud-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(57, 255, 20, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(57, 255, 20, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.scanline-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    background-size: 100% 4px, 6px 100%;
    opacity: 0.4;
    pointer-events: none;
}

/* ── App Container ── */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* ── Left Sidebar ── */
.sidebar {
    width: 290px;
    min-width: 290px;
    height: 100%;
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: transform var(--transition-normal), width var(--transition-normal);
    position: relative;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
}

.sidebar-header {
    padding: 20px 18px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, rgba(57, 255, 20, 0.03) 0%, transparent 100%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo-wrap {
    width: 40px;
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 0 10px var(--aura-green-glow));
    animation: auraLogoBreathe 5s ease-in-out infinite;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-shadow: 0 0 12px rgba(57, 255, 20, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--aura-green);
    box-shadow: 0 0 8px var(--aura-green);
    animation: auraStatusPulse 2s infinite ease-in-out;
}

.brand-tagline {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.btn-new-chat {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass-light);
    border: 1px solid var(--border-subtle);
    color: var(--aura-green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-new-chat:hover {
    background: var(--bg-glass-hover);
    border-color: var(--aura-green);
    box-shadow: 0 0 16px rgba(57, 255, 20, 0.35);
    transform: translateY(-1px) scale(1.04);
}

/* ── Sidebar Search ── */
.sidebar-search {
    margin: 12px 14px 6px;
    padding: 9px 12px;
    background: rgba(4, 12, 10, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-fast);
}

.sidebar-search:focus-within {
    border-color: var(--aura-green);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.25);
    background: rgba(6, 18, 14, 0.8);
}

.sidebar-search svg {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.sidebar-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    width: 100%;
}

.sidebar-search input::placeholder {
    color: var(--text-tertiary);
}

/* ── Sidebar Nav / Chat History ── */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(57, 255, 20, 0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(57, 255, 20, 0.2);
    border-radius: 4px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    padding: 10px 10px 4px;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 3px;
    position: relative;
}

.chat-item:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-subtle);
}

.chat-item.active {
    background: linear-gradient(90deg, rgba(57, 255, 20, 0.12) 0%, rgba(0, 240, 255, 0.04) 100%);
    border-color: var(--aura-green);
    box-shadow: inset 0 0 14px rgba(57, 255, 20, 0.15), 0 0 12px rgba(57, 255, 20, 0.2);
}

.chat-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--aura-green);
    box-shadow: 0 0 8px var(--aura-green);
}

.chat-item-icon {
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.chat-item:hover .chat-item-icon,
.chat-item.active .chat-item-icon {
    color: var(--aura-green);
}

.chat-item-text {
    flex: 1;
    min-width: 0;
}

.chat-item-title {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-date {
    font-size: 10.5px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.chat-item-delete {
    opacity: 0;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.chat-item:hover .chat-item-delete {
    opacity: 0.8;
}

.chat-item-delete:hover {
    opacity: 1;
    color: #ff4757;
    background: rgba(255, 71, 87, 0.15);
}

/* ── Sidebar Footer & Controls ── */
.sidebar-footer {
    padding: 14px 12px 16px;
    border-top: 1px solid var(--border-subtle);
    background: linear-gradient(0deg, rgba(57, 255, 20, 0.03) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.sidebar-btn svg {
    color: var(--aura-green);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(4, 12, 10, 0.7);
    border: 1px solid var(--border-subtle);
    margin-top: 4px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--aura-green) 0%, #059669 100%);
    color: #030708;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    font-size: 10.5px;
    color: var(--aura-green);
    letter-spacing: 0.5px;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-xs);
    transition: all var(--transition-fast);
}

.btn-logout:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.15);
}

/* ── Main Layout ── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    background: radial-gradient(ellipse at 50% 10%, rgba(57, 255, 20, 0.04) 0%, transparent 65%), var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* ── Mobile & Top Header ── */
.main-header {
    height: 56px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 20;
}

/* ── Dynamic NVIDIA Model Selector ── */
.model-selector-wrap {
    position: relative;
    z-index: 50;
}

.btn-model-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(8, 24, 20, 0.75);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-model-selector:hover {
    border-color: var(--aura-green);
    background: rgba(12, 32, 26, 0.95);
    box-shadow: 0 0 14px rgba(57, 255, 20, 0.25);
}

.model-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--aura-green);
    box-shadow: 0 0 8px var(--aura-green);
}

.model-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 420px;
    background: #040c0a;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(57, 255, 20, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: fadeInSmooth 0.2s ease-out;
}

.model-dropdown-menu.active {
    display: flex;
}

.model-dropdown-header {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(8, 24, 20, 0.5);
}

.model-dropdown-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--aura-green);
}

.btn-refresh-models {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-refresh-models:hover {
    color: var(--aura-green);
    border-color: var(--aura-green);
    background: rgba(57, 255, 20, 0.1);
}

.model-search-box {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(2, 6, 5, 0.6);
}

.model-search-box svg {
    color: var(--text-tertiary);
}

.model-search-box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-primary);
}

.model-list-scroll {
    overflow-y: auto;
    max-height: 340px;
    padding: 6px;
}

.model-provider-group {
    margin-bottom: 8px;
}

.model-provider-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--aura-green);
    padding: 6px 8px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
}

.model-provider-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
    margin-left: 4px;
}

.model-item-option {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.model-item-option:hover {
    background: rgba(57, 255, 20, 0.08);
    border-color: var(--border-subtle);
}

.model-item-option.selected {
    background: rgba(57, 255, 20, 0.15);
    border-color: var(--aura-green);
}

.model-item-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.model-item-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-tertiary);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-item-tag span.badge-pill {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(57, 255, 20, 0.08);
    color: var(--aura-green);
    font-size: 9px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--aura-green-glow));
    animation: auraLogoBreathe 5s infinite ease-in-out;
}

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

.header-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-primary);
}

.system-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid var(--border-medium);
    font-size: 11px;
    font-weight: 600;
    color: var(--aura-green);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.system-status-pill .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--aura-green);
    box-shadow: 0 0 6px var(--aura-green);
    animation: auraStatusPulse 1.8s infinite;
}

/* ── Settings Modal / Panel ── */
.settings-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.settings-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.settings-modal {
    width: 90%;
    max-width: 580px;
    background: var(--bg-card);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--border-bright);
    box-shadow: var(--shadow-aura-heavy), var(--shadow-lg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transform: scale(0.94) translateY(12px);
    transition: transform var(--transition-normal);
}

.settings-modal-backdrop.active .settings-modal {
    transform: scale(1) translateY(0);
}

.settings-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(57, 255, 20, 0.06) 0%, transparent 100%);
}

.settings-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-modal-title svg {
    color: var(--aura-green);
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-close-modal:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.settings-modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.setting-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

.setting-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.setting-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Custom Cyber Toggle Switch */
.cyber-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

.cyber-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: 26px;
    transition: var(--transition-fast);
}

.cyber-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-tertiary);
    border-radius: 50%;
    transition: var(--transition-fast);
}

.cyber-switch input:checked + .cyber-slider {
    background-color: rgba(57, 255, 20, 0.2);
    border-color: var(--aura-green);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.cyber-switch input:checked + .cyber-slider::before {
    transform: translateX(22px);
    background-color: var(--aura-green);
    box-shadow: 0 0 8px var(--aura-green);
}

.cyber-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.cyber-select:focus {
    border-color: var(--aura-green);
    box-shadow: 0 0 8px var(--aura-green-glow);
}

.settings-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(4, 12, 10, 0.5);
}

.btn-cyber-primary {
    padding: 9px 20px;
    background: var(--aura-green);
    color: #030708;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 0 16px rgba(57, 255, 20, 0.4);
}

.btn-cyber-primary:hover {
    background: var(--aura-green-bright);
    box-shadow: 0 0 24px rgba(57, 255, 20, 0.6);
    transform: translateY(-1px);
}

.btn-cyber-secondary {
    padding: 9px 18px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-cyber-secondary:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
    border-color: var(--text-tertiary);
}

/* ── Mobile Sidebar Drawer Backdrop ── */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 35;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

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

/* ── Responsive Rules & Adaptive Breakpoints ── */

/* Tablet & Compact Desktop (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 240px;
        min-width: 240px;
    }
    .main-header {
        padding: 0 16px;
    }
    .model-dropdown-menu {
        width: 280px;
    }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
    html, body {
        height: 100%;
        height: 100dvh;
    }

    .app-container {
        height: 100dvh;
        width: 100vw;
        overflow: hidden;
    }

    /* Mobile Drawer Sidebar */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 82vw;
        max-width: 320px;
        min-width: 260px;
        transform: translateX(-100%);
        z-index: 50;
        box-shadow: none;
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
        padding-left: env(safe-area-inset-left, 0);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 16px 0 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(57, 255, 20, 0.15);
    }

    /* Mobile Header */
    .main-header {
        height: 52px;
        padding: 0 12px;
        padding-top: env(safe-area-inset-top, 0);
        position: sticky;
        top: 0;
    }

    .btn-toggle-sidebar {
        display: flex !important;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
    }

    .header-logo {
        width: 24px;
        height: 24px;
    }

    .header-title {
        font-size: 15px;
    }

    /* Compact Model Selector */
    .btn-model-selector {
        padding: 5px 10px;
        font-size: 11px;
        max-width: 150px;
    }

    .model-selected-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 95px;
    }

    .model-dropdown-menu {
        position: fixed;
        top: 56px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 60vh;
    }

    /* System Settings Modal Mobile */
    .settings-modal {
        width: 95%;
        max-height: 88vh;
        margin: 10px;
    }

    .settings-modal-body {
        padding: 16px;
        gap: 14px;
    }

    .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Small Mobile Devices (<= 480px) */
@media (max-width: 480px) {
    .main-header {
        padding: 0 8px;
    }

    .header-title-wrap .system-status-pill {
        display: none;
    }

    .btn-model-selector {
        max-width: 120px;
        padding: 4px 8px;
    }

    .model-selected-label {
        max-width: 70px;
    }

    .canvas-workspace-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-back-chat {
        width: 100%;
        justify-content: center;
    }
}

/* ── Google Imagen / Gemini Style "Create Images" Studio View ── */
.google-create-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    background: radial-gradient(circle at 50% 15%, rgba(57, 255, 20, 0.04) 0%, transparent 60%), #0a0e0c;
    padding: 20px 24px;
    animation: fadeInSmooth 0.25s ease-out;
}

.google-create-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 860px;
    width: 100%;
    margin: 0 auto 12px auto;
}

.btn-google-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a8c4b2;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-google-back:hover {
    background: rgba(57, 255, 20, 0.12);
    border-color: #39ff14;
    color: #fff;
}

.google-create-top-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #39ff14;
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

.google-create-center-container {
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.google-create-hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.google-create-logo-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 224, 102, 0.1);
    border: 1px solid rgba(255, 224, 102, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(255, 224, 102, 0.15);
}

.google-create-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #f1f8f3;
    margin: 0;
}

.google-create-desc {
    font-size: 13px;
    color: #8dafa0;
    margin: 0;
}

/* Signature Capsule Prompt Box */
.google-prompt-capsule {
    width: 100%;
    max-width: 760px;
    background: #151d18;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 14px 18px 10px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.google-prompt-capsule:focus-within {
    border-color: #39ff14;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2), 0 8px 30px rgba(0, 0, 0, 0.5);
}

.google-prompt-input-area {
    width: 100%;
}

.google-prompt-textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    line-height: 1.45;
    min-height: 48px;
}

.google-prompt-textarea::placeholder {
    color: #6d8e7d;
}

.google-prompt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 8px;
}

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

.btn-google-tool-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a8c4b2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-google-tool-icon:hover {
    background: rgba(57, 255, 20, 0.15);
    border-color: #39ff14;
    color: #fff;
}

.google-aspect-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 5px 12px;
    color: #c5e3d1;
    font-size: 12px;
    cursor: pointer;
    position: relative;
}

.google-aspect-select {
    background: transparent;
    border: none;
    color: #c5e3d1;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.google-aspect-select option {
    background: #151d18;
    color: #fff;
}

.google-model-select-pill {
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: #39ff14;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    padding: 6px 12px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.google-model-select-pill:hover {
    background: rgba(57, 255, 20, 0.15);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.google-model-select-pill option {
    background: #121915;
    color: #fff;
}

.btn-google-generate {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #39ff14 0%, #178a2a 100%);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
    transition: all 0.2s;
}

.btn-google-generate:hover {
    transform: scale(1.05);
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.5);
}

.btn-google-generate.generating {
    background: linear-gradient(135deg, #ff4757 0%, #c2185b 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 16px rgba(255, 71, 87, 0.6) !important;
    animation: pulseStop 1.5s infinite ease-in-out;
}

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

.btn-google-stop-synthesis {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 60, 60, 0.12);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: #ff8888;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-google-stop-synthesis:hover {
    background: rgba(255, 60, 60, 0.25);
    border-color: #ff4d4d;
    color: #fff;
    transform: scale(1.03);
}

/* Collapsible Advanced Drawer */
.google-advanced-drawer {
    background: rgba(0, 0, 0, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px;
    margin-top: 6px;
}

.google-advanced-row {
    display: flex;
    gap: 12px;
}

.google-advanced-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.google-advanced-field label {
    font-size: 11px;
    font-weight: 700;
    color: #799a87;
    text-transform: uppercase;
}

.google-advanced-input, .google-advanced-select {
    background: #0d1410;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
}

.google-advanced-input:focus, .google-advanced-select:focus {
    border-color: #39ff14;
}

/* Style Cards Carousel */
.google-style-carousel {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 760px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.google-style-card {
    width: 90px;
    height: 115px;
    border-radius: 16px;
    background: #16201b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    padding: 8px;
    transition: all 0.2s ease;
}

.google-style-card:hover {
    transform: translateY(-2px);
    border-color: rgba(57, 255, 20, 0.4);
}

.google-style-card.active {
    border-color: #39ff14;
    box-shadow: 0 0 14px rgba(57, 255, 20, 0.35);
}

.google-card-bg {
    position: absolute;
    inset: 0;
    opacity: 0.85;
    background-size: cover;
    background-position: center;
    transition: opacity 0.2s;
}

.google-card-bg.style-auto { background: linear-gradient(135deg, #1b3829 0%, #0d1e15 100%); }
.google-card-bg.style-studio { background: linear-gradient(135deg, #3d4a5d 0%, #1e2633 100%); }
.google-card-bg.style-clay { background: linear-gradient(135deg, #7c4a32 0%, #442617 100%); }
.google-card-bg.style-origami { background: linear-gradient(135deg, #84683a 0%, #3e3019 100%); }
.google-card-bg.style-dappled { background: linear-gradient(135deg, #6e6730 0%, #3a3617 100%); }
.google-card-bg.style-mural { background: linear-gradient(135deg, #2d5a6b 0%, #132e38 100%); }
.google-card-bg.style-anime { background: linear-gradient(135deg, #6d3368 0%, #331430 100%); }
.google-card-bg.style-cyber { background: linear-gradient(135deg, #115354 0%, #082929 100%); }

.google-card-label {
    position: relative;
    z-index: 2;
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* Synthesis Output Area */
.google-output-container {
    width: 100%;
    max-width: 760px;
    display: flex;
    justify-content: center;
}

.google-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px;
    text-align: center;
}

.google-pulse-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(57, 255, 20, 0.2);
    border-top-color: #39ff14;
    animation: spin 0.8s linear infinite;
}

.google-loading-title {
    font-size: 14px;
    font-weight: 800;
    color: #39ff14;
    letter-spacing: 1px;
}

.google-error-state {
    background: rgba(45, 12, 16, 0.8);
    border: 1px solid rgba(255, 51, 102, 0.35);
    border-radius: 16px;
    padding: 20px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 480px;
}

.google-result-card {
    background: #111a15;
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
    animation: fadeInSmooth 0.3s ease;
}

.google-image-wrapper img {
    max-width: 100%;
    max-height: 520px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.google-image-actions {
    display: flex;
    gap: 10px;
}

.btn-google-action {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #c5e3d1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-google-action:hover {
    border-color: #39ff14;
    background: rgba(57, 255, 20, 0.12);
    color: #fff;
}

.google-enhancement-details {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: #9abfb0;
}

.google-enhancement-details summary {
    cursor: pointer;
    font-weight: 700;
    color: #39ff14;
}


/* ── Image Canvas Modal (FLUX.1-dev) ── */
.image-canvas-modal {
    width: 900px;
    max-width: 95vw;
    background: #040c0a;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 35px rgba(57, 255, 20, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-canvas-body {
    display: flex;
    flex-direction: row;
    gap: 24px;
    padding: 24px;
    max-height: 75vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .image-canvas-body {
        flex-direction: column;
    }
}

.image-canvas-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.image-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.image-field-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}

.image-textarea {
    width: 100%;
    padding: 12px;
    background: rgba(8, 24, 20, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13.5px;
    resize: none;
    outline: none;
    transition: all var(--transition-fast);
}

.image-textarea:focus, .image-input:focus {
    border-color: var(--aura-green);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.2);
}

.image-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(8, 24, 20, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    transition: all var(--transition-fast);
}

.image-options-row {
    display: flex;
    gap: 12px;
}

.btn-generate-image {
    margin-top: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
}

.image-canvas-display {
    flex: 1.2;
    background: rgba(2, 6, 5, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    position: relative;
    overflow: hidden;
}

.image-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px;
    gap: 8px;
}

.image-empty-icon {
    font-size: 40px;
    margin-bottom: 6px;
    filter: drop-shadow(0 0 15px rgba(57, 255, 20, 0.4));
}

.image-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.image-empty-desc {
    font-size: 12.5px;
    color: var(--text-tertiary);
    max-width: 280px;
    line-height: 1.5;
}

.image-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px;
    text-align: center;
}

.image-loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(57, 255, 20, 0.15);
    border-top-color: var(--aura-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.image-loading-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--aura-green);
}

.image-loading-sub {
    font-size: 11.5px;
    color: var(--text-tertiary);
    letter-spacing: 0.5px;
}

.image-result-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 12px;
}

.generated-image-preview {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-medium);
    box-shadow: 0 0 25px rgba(57, 255, 20, 0.25);
}

.image-result-actions {
    display: flex;
    gap: 10px;
}

.btn-img-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 12px;
}

.btn-send.generating {
    background: rgba(255, 71, 87, 0.25) !important;
    border: 1px solid rgba(255, 71, 87, 0.6) !important;
    color: #ff4757 !important;
    cursor: pointer !important;
    opacity: 1 !important;
    animation: pulseStop 1.2s infinite alternate;
}

.byok-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.byok-modal-card {
    background: rgba(6, 14, 10, 0.96);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(57, 255, 20, 0.15);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.byok-providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 14px;
    padding: 18px 20px;
    overflow-y: auto;
}

.byok-unified-card {
    max-width: 580px !important;
    border-radius: 18px;
    background: rgba(8, 18, 14, 0.98);
    border: 1px solid rgba(57, 255, 20, 0.35);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 35px rgba(57, 255, 20, 0.2);
}

.byok-unified-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.byok-unified-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.byok-single-input-box {
    display: flex;
    align-items: center;
    background: rgba(4, 12, 8, 0.9);
    border: 1.5px solid rgba(57, 255, 20, 0.35);
    border-radius: 12px;
    padding: 6px 14px;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
}

.byok-single-input-box:focus-within {
    border-color: #39ff14;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3), inset 0 2px 6px rgba(0,0,0,0.6);
}

.byok-input-prefix {
    font-size: 18px;
    margin-right: 10px;
    user-select: none;
}

.byok-unified-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13.5px;
    padding: 10px 0;
}

.byok-unified-input::placeholder {
    color: rgba(140, 175, 155, 0.6);
    font-size: 12.5px;
}

.byok-detection-pill-wrap {
    display: flex;
    align-items: center;
}

.byok-detection-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(57, 255, 20, 0.12);
    border: 1px solid rgba(57, 255, 20, 0.3);
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    color: #39ff14;
    letter-spacing: 0.4px;
    animation: fadeIn 0.2s ease;
}

.btn-byok-connect-main {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    border: 1px solid rgba(57, 255, 20, 0.6);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 13px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-byok-connect-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(57, 255, 20, 0.45);
    background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
}

.btn-byok-connect-main.syncing {
    opacity: 0.7;
    pointer-events: none;
}

.byok-sync-banner {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
    animation: fadeIn 0.2s ease;
}

.byok-sync-banner.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(57, 255, 20, 0.4);
    color: #d1fae5;
}

.byok-sync-banner.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.byok-active-keys-section {
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
    margin-top: 4px;
}

.byok-active-keys-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.btn-byok-refresh-link {
    background: transparent;
    border: none;
    color: var(--aura-green);
    font-size: 11px;
    cursor: pointer;
    opacity: 0.8;
}

.btn-byok-refresh-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.byok-active-keys-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
}

.byok-key-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(12, 26, 18, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 12px;
}

.byok-key-provider-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.btn-byok-disconnect {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ef4444;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-byok-disconnect:hover {
    background: rgba(239, 68, 68, 0.25);
}

.byok-model-chip {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    color: #cbe7d5;
}
