/* ═══════════════════════════════════════════════════════
   AI CHATBOT — Full-Screen Glassmorphism UI
   ═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --ai-bg: #0a0e1a;
    --ai-surface: rgba(20, 27, 50, 0.85);
    --ai-glass: rgba(255,255,255,0.06);
    --ai-glass-border: rgba(255,255,255,0.1);
    --ai-primary: #6c5ce7;
    --ai-primary-glow: rgba(108,92,231,0.4);
    --ai-accent: #00cec9;
    --ai-accent-glow: rgba(0,206,201,0.3);
    --ai-gradient: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%);
    --ai-text: #e8e8f0;
    --ai-text-dim: #8b8ba3;
    --ai-user-bubble: linear-gradient(135deg, #6c5ce7 0%, #a855f7 100%);
    --ai-bot-bubble: rgba(255,255,255,0.07);
    --ai-danger: #ff6b6b;
    --ai-success: #51cf66;
    --ai-radius: 16px;
    --ai-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Floating Launch Button ── */
#ai-chatbot-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99990;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--ai-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 30px var(--ai-primary-glow), 0 0 60px var(--ai-accent-glow);
    transition: all 0.35s cubic-bezier(.34,1.56,.64,1);
    animation: ai-fab-pulse 2.5s ease-in-out infinite;
}
#ai-chatbot-fab:hover {
    transform: scale(1.12) rotate(5deg);
    box-shadow: 0 8px 40px var(--ai-primary-glow);
}
#ai-chatbot-fab svg {
    width: 28px;
    height: 28px;
    fill: white;
}
#ai-chatbot-fab .ai-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--ai-danger);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
}
@keyframes ai-fab-pulse {
    0%, 100% { box-shadow: 0 6px 30px var(--ai-primary-glow), 0 0 0 0 rgba(108,92,231,0.2); }
    50% { box-shadow: 0 6px 30px var(--ai-primary-glow), 0 0 0 18px rgba(108,92,231,0); }
}

/* ── Full-Screen Overlay ── */
#ai-chatbot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999 !important;
    background: #0a0e1a !important;
    display: none;
    flex-direction: column;
    font-family: var(--ai-font);
    color: var(--ai-text);
    overflow: hidden;
    opacity: 1 !important;
}
#ai-chatbot-overlay.active {
    display: flex;
    animation: ai-slide-in 0.4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes ai-slide-in {
    from { opacity: 0; transform: scale(0.92) translateY(30px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Animated background particles ── */
#ai-chatbot-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(108,92,231,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0,206,201,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(168,85,247,0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ── Header ── */
.ai-chat-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--ai-surface);
    border-bottom: 1px solid var(--ai-glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.ai-chat-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ai-chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--ai-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.ai-chat-avatar svg {
    width: 22px;
    height: 22px;
    fill: white;
}
.ai-chat-avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: var(--ai-success);
    border-radius: 50%;
    border: 2px solid var(--ai-bg);
}
.ai-chat-title {
    font-size: 17px;
    font-weight: 600;
    background: var(--ai-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ai-chat-subtitle {
    font-size: 12px;
    color: var(--ai-text-dim);
    margin-top: 2px;
}
.ai-chat-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-header-btn {
    background: var(--ai-glass);
    border: 1px solid var(--ai-glass-border);
    color: var(--ai-text-dim);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.ai-header-btn:hover {
    background: rgba(255,255,255,0.12);
    color: var(--ai-text);
    transform: translateY(-1px);
}
.ai-header-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ── Messages Area ── */
.ai-chat-messages {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    scroll-behavior: smooth;
}
.ai-chat-messages::-webkit-scrollbar { width: 5px; }
.ai-chat-messages::-webkit-scrollbar-track { background: transparent; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }

/* Message Bubble */
.ai-msg {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: ai-msg-in 0.35s ease-out;
    max-width: 85%;
}
.ai-msg.user {
    flex-direction: row-reverse;
    margin-left: auto;
}
@keyframes ai-msg-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ai-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.ai-msg.bot .ai-msg-avatar { background: var(--ai-gradient); }
.ai-msg.user .ai-msg-avatar { background: rgba(108,92,231,0.3); border: 1px solid rgba(108,92,231,0.5); }

.ai-msg-bubble {
    padding: 14px 18px;
    border-radius: var(--ai-radius);
    line-height: 1.6;
    font-size: 14px;
    word-wrap: break-word;
    position: relative;
}
.ai-msg.bot .ai-msg-bubble {
    background: var(--ai-bot-bubble);
    border: 1px solid var(--ai-glass-border);
    border-top-left-radius: 4px;
    backdrop-filter: blur(10px);
}
.ai-msg.user .ai-msg-bubble {
    background: var(--ai-user-bubble);
    border-top-right-radius: 4px;
    color: #fff;
}
.ai-msg-time {
    font-size: 11px;
    color: var(--ai-text-dim);
    margin-top: 6px;
    opacity: 0.7;
}
.ai-msg.user .ai-msg-time { text-align: right; }

/* Typing Indicator */
.ai-typing {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    max-width: 85%;
}
.ai-typing-bubble {
    background: var(--ai-bot-bubble);
    border: 1px solid var(--ai-glass-border);
    border-radius: var(--ai-radius);
    border-top-left-radius: 4px;
    padding: 16px 22px;
    display: flex;
    gap: 5px;
    align-items: center;
}
.ai-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ai-accent);
    animation: ai-typing-bounce 1.4s ease-in-out infinite;
}
.ai-typing-dot:nth-child(2) { animation-delay: 0.16s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.32s; }
@keyframes ai-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* ── Suggestion Chips ── */
.ai-suggestions {
    position: relative;
    z-index: 2;
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: transparent;
    max-height: 140px;
    overflow-y: auto;
}
.ai-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--ai-glass);
    border: 1px solid var(--ai-glass-border);
    color: var(--ai-text);
    font-size: 13px;
    font-family: var(--ai-font);
    cursor: pointer;
    transition: all 0.25s;
    max-width: 260px;
    white-space: normal;
    text-align: left;
    line-height: 1.35;
}
.ai-chip:hover {
    background: var(--ai-primary);
    border-color: var(--ai-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--ai-primary-glow);
}

/* ── Input Area ── */
.ai-chat-input-area {
    position: relative;
    z-index: 2;
    padding: 16px 20px 20px;
    background: var(--ai-surface);
    border-top: 1px solid var(--ai-glass-border);
    backdrop-filter: blur(20px);
}
.ai-chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: var(--ai-glass);
    border: 1px solid var(--ai-glass-border);
    border-radius: 18px;
    padding: 6px 8px 6px 18px;
    transition: border-color 0.3s;
}
.ai-chat-input-row:focus-within {
    border-color: var(--ai-primary);
    box-shadow: 0 0 20px var(--ai-primary-glow);
}
#ai-chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ai-text);
    font-size: 15px;
    font-family: var(--ai-font);
    padding: 10px 0;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
}
#ai-chat-input::placeholder { color: var(--ai-text-dim); }

/* Input Buttons */
.ai-input-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    flex-shrink: 0;
}
.ai-input-btn svg { width: 20px; height: 20px; fill: currentColor; }

.ai-btn-mic {
    background: transparent;
    color: var(--ai-text-dim);
}
.ai-btn-mic:hover { color: var(--ai-accent); }
.ai-btn-mic.recording {
    background: var(--ai-danger);
    color: #fff;
    animation: ai-mic-pulse 1s ease-in-out infinite;
}
@keyframes ai-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(255,107,107,0); }
}

.ai-btn-send {
    background: var(--ai-gradient);
    color: #fff;
}
.ai-btn-send:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 20px var(--ai-primary-glow);
}
.ai-btn-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ── Status Bar ── */
.ai-status-bar {
    position: relative;
    z-index: 2;
    padding: 6px 20px;
    font-size: 11px;
    color: var(--ai-text-dim);
    display: flex;
    justify-content: space-between;
    background: rgba(10, 14, 26, 0.5);
}
.ai-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ai-success);
    margin-right: 5px;
    vertical-align: middle;
}
.ai-status-dot.offline { background: var(--ai-danger); }

/* ── Action Cards ── */
.ai-action-card {
    margin-top: 10px;
    padding: 12px 16px;
    background: rgba(108,92,231,0.1);
    border: 1px solid rgba(108,92,231,0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}
.ai-action-card:hover {
    background: rgba(108,92,231,0.2);
    transform: translateX(4px);
}

/* Time-limited full report (snapshot page) */
.ai-action-card--report {
    background: rgba(0, 206, 201, 0.12);
    border-color: rgba(0, 206, 201, 0.45);
}
.ai-action-card--report:hover {
    background: rgba(0, 206, 201, 0.22);
    border-color: rgba(0, 206, 201, 0.65);
}
.ai-action-card--report .ai-action-icon {
    background: linear-gradient(135deg, #00cec9 0%, #6c5ce7 100%);
}
.ai-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--ai-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ai-action-icon svg { width: 16px; height: 16px; fill: #fff; }
.ai-action-label {
    font-size: 13px;
    font-weight: 500;
}

/* Dual options: chat-inline vs ERP page (navigate actions) */
.ai-action-dual {
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.28);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}
.ai-action-dual--report {
    background: rgba(0, 206, 201, 0.1);
    border-color: rgba(0, 206, 201, 0.4);
}
.ai-action-dual--report .ai-action-icon {
    background: linear-gradient(135deg, #00cec9 0%, #6c5ce7 100%);
}
.ai-action-dual-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ai-action-dual-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ai-action-subbtn {
    flex: 1;
    min-width: 128px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.22);
    color: var(--ai-text);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--ai-font);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.ai-action-subbtn--chat {
    border-color: rgba(0, 206, 201, 0.45);
    background: rgba(0, 206, 201, 0.12);
}
.ai-action-subbtn--chat:hover {
    border-color: rgba(0, 206, 201, 0.75);
    box-shadow: 0 4px 14px rgba(0, 206, 201, 0.2);
}
.ai-action-subbtn--erp {
    border-color: rgba(108, 92, 231, 0.45);
    background: rgba(108, 92, 231, 0.14);
}
.ai-action-subbtn--erp:hover {
    border-color: rgba(108, 92, 231, 0.75);
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.25);
}
.ai-action-subbtn:hover {
    transform: translateY(-1px);
}
.ai-action-subbtn:active {
    transform: translateY(0);
}

/* Snapshot report embedded in chat (Chat में देखें on report card) */
.ai-snapshot-embed-hint {
    font-size: 12px;
    color: var(--ai-text-dim);
    margin-bottom: 6px;
}
.ai-snapshot-embed-wrap {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--ai-glass-border);
    background: rgba(255, 255, 255, 0.04);
    min-height: 180px;
    max-height: min(55vh, 520px);
}
.ai-snapshot-embed {
    width: 100%;
    height: min(55vh, 520px);
    border: none;
    display: block;
    background: #fff;
}

/* ── Voice Waveform ── */
.ai-voice-wave {
    display: none;
    gap: 3px;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
}
.ai-voice-wave.active { display: flex; }
.ai-wave-bar {
    width: 3px;
    border-radius: 3px;
    background: var(--ai-accent);
    animation: ai-wave 0.6s ease-in-out infinite alternate;
}
.ai-wave-bar:nth-child(1) { height: 8px; animation-delay: 0.0s; }
.ai-wave-bar:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.ai-wave-bar:nth-child(3) { height: 20px; animation-delay: 0.2s; }
.ai-wave-bar:nth-child(4) { height: 14px; animation-delay: 0.3s; }
.ai-wave-bar:nth-child(5) { height: 8px; animation-delay: 0.4s; }
@keyframes ai-wave {
    from { height: 4px; }
    to   { height: 22px; }
}

/* ── Data Table in Chat (force readable colors — admin CSS often sets dark text on tables) ── */
#ai-chatbot-overlay .ai-data-table-wrap {
    margin-top: 12px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(17, 24, 39, 0.92);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

#ai-chatbot-overlay .ai-data-table {
    width: 100%;
    min-width: 520px;
    margin: 0;
    border-collapse: collapse;
    font-size: 13px;
    font-family: var(--ai-font);
    color: #e8eaf2 !important;
}

#ai-chatbot-overlay .ai-data-table th {
    background: rgba(108, 92, 231, 0.45) !important;
    color: #ffffff !important;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}

#ai-chatbot-overlay .ai-data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #e8eaf2 !important;
    vertical-align: top;
    line-height: 1.45;
}

#ai-chatbot-overlay .ai-data-table tr:hover td {
    background: rgba(255, 255, 255, 0.06) !important;
}

#ai-chatbot-overlay .ai-data-table tr:last-child td {
    border-bottom: none;
}

#ai-chatbot-overlay .ai-data-table-more {
    font-size: 12px;
    color: var(--ai-text-dim) !important;
    margin-top: 8px;
    padding-left: 2px;
}

/* Parsed fee payment JSON */
#ai-chatbot-overlay .ai-pay-block {
    min-width: 220px;
    max-width: 420px;
}

#ai-chatbot-overlay .ai-pay-total {
    font-size: 12px;
    color: #a5b4fc !important;
    margin-bottom: 6px;
}

#ai-chatbot-overlay .ai-pay-total strong {
    color: #5eead4 !important;
    font-weight: 700;
}

#ai-chatbot-overlay .ai-pay-list {
    margin: 0;
    padding-left: 18px;
    color: #cbd5e1 !important;
    font-size: 12px;
}

#ai-chatbot-overlay .ai-pay-list li {
    margin-bottom: 4px;
}

#ai-chatbot-overlay .ai-cell-muted {
    color: #94a3b8 !important;
    font-size: 11px;
    word-break: break-word;
}

#ai-chatbot-overlay .ai-cell-empty {
    color: #64748b !important;
}

#ai-chatbot-overlay .ai-td-action {
    white-space: nowrap;
    width: 1%;
}

#ai-chatbot-overlay .ai-row-action-btn {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    color: #0f172a !important;
    background: linear-gradient(135deg, #a5b4fc 0%, #5eead4 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#ai-chatbot-overlay .ai-row-action-btn:hover {
    filter: brightness(1.08);
    color: #020617 !important;
}

/* Rate-limit retry countdown + large wait GIF */
#ai-chatbot-overlay .ai-countdown-block {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 14px;
    margin-top: 12px;
    max-width: 100%;
}

#ai-chatbot-overlay .ai-countdown-gif-wrap {
    flex: 0 0 auto;
    width: min(380px, 100%);
    max-width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 206, 201, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    background: rgba(15, 23, 42, 0.6);
    line-height: 0;
}

#ai-chatbot-overlay .ai-countdown-gif {
    display: block;
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 360px;
    object-fit: contain;
    vertical-align: top;
}

#ai-chatbot-overlay .ai-countdown-wrap {
    flex: 1 1 200px;
    min-width: 0;
    align-self: center;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(0, 206, 201, 0.12);
    border: 1px solid rgba(0, 206, 201, 0.35);
    font-size: 13px;
    color: #e2e8f0 !important;
}

#ai-chatbot-overlay .ai-countdown-num {
    font-family: ui-monospace, monospace;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    color: #5eead4 !important;
}

#ai-chatbot-overlay .ai-countdown-num.ai-countdown-done {
    color: #86efac !important;
}

#ai-chatbot-overlay .ai-countdown-ready {
    color: #86efac !important;
    font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .ai-chat-header { padding: 12px 16px; }
    .ai-chat-messages { padding: 16px 12px; }
    .ai-msg { max-width: 92%; }
    .ai-chat-input-area { padding: 12px 12px 16px; }
    .ai-suggestions { padding: 8px 12px; }
    .ai-chat-title { font-size: 15px; }
    #ai-chatbot-overlay .ai-countdown-block {
        flex-direction: column;
    }
    #ai-chatbot-overlay .ai-countdown-gif-wrap {
        width: 100%;
    }
    #ai-chatbot-overlay .ai-countdown-gif {
        max-height: 300px;
    }
}

/* ── Confirm Dialog ── */
.ai-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Must sit above #ai-chatbot-overlay (z-index 999999) */
    z-index: 10000000;
    backdrop-filter: blur(5px);
}
.ai-confirm-box {
    background: var(--ai-surface);
    border: 1px solid var(--ai-glass-border);
    border-radius: 20px;
    padding: 30px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    animation: ai-msg-in 0.3s ease-out;
}
.ai-confirm-box h3 {
    font-size: 18px;
    margin-bottom: 12px;
    background: var(--ai-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ai-confirm-box p {
    font-size: 14px;
    color: var(--ai-text-dim);
    margin-bottom: 24px;
    line-height: 1.6;
}
.ai-confirm-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.ai-confirm-btn {
    padding: 10px 28px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--ai-font);
}
.ai-confirm-btn.yes {
    background: var(--ai-gradient);
    color: #fff;
}
.ai-confirm-btn.no {
    background: var(--ai-glass);
    border: 1px solid var(--ai-glass-border);
    color: var(--ai-text);
}
.ai-confirm-btn:hover { transform: translateY(-2px); }

/* ── Student panel: Study Buddy (teal / education) ── */
#ai-chatbot-overlay.student-edu-theme {
    --ai-bg: #0a1214;
    --ai-surface: rgba(12, 55, 58, 0.88);
    --ai-primary: #1a9e9e;
    --ai-primary-glow: rgba(26, 158, 158, 0.45);
    --ai-accent: #5eead4;
    --ai-accent-glow: rgba(94, 234, 212, 0.25);
    --ai-gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 55%, #5eead4 100%);
    --ai-user-bubble: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}
#ai-chatbot-overlay.student-edu-theme::before {
    background:
        radial-gradient(ellipse at 15% 40%, rgba(13, 148, 136, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 20%, rgba(94, 234, 212, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(20, 184, 166, 0.08) 0%, transparent 45%);
}
.student-edu-avatar {
    background: linear-gradient(145deg, #0d9488, #0f766e) !important;
    border-radius: 14px !important;
}
.student-edu-avatar svg {
    width: 22px;
    height: 22px;
    fill: #ecfeff;
}
#ai-chatbot-fab.student-edu-fab {
    background: linear-gradient(145deg, #0d9488, #14b8a6);
    box-shadow: 0 8px 28px rgba(13, 148, 136, 0.45), 0 0 0 0 rgba(20, 184, 166, 0.25);
    animation: ai-fab-pulse-teal 2.6s ease-in-out infinite;
}
#ai-chatbot-fab.student-edu-fab svg {
    fill: #f0fdfa;
}
@keyframes ai-fab-pulse-teal {
    0%, 100% { box-shadow: 0 8px 28px rgba(13, 148, 136, 0.45), 0 0 0 0 rgba(45, 212, 191, 0.25); }
    50% { box-shadow: 0 8px 32px rgba(13, 148, 136, 0.55), 0 0 0 14px rgba(45, 212, 191, 0); }
}
