.agent-terminal {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: rgba(10, 10, 15, 0.45);
    border: 1px solid rgba(196, 244, 59, 0.3);
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(196, 244, 59, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    font-family: var(--mono);
    transform: translateY(120%);
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.4s ease;
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    backdrop-filter: blur(24px) saturate(1.5);
}

.agent-terminal:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 50px rgba(196, 244, 59, 0.2);
    border-color: rgba(196, 244, 59, 0.6);
}

.agent-terminal.open {
    transform: translateY(0);
}

.at-header {
    background: rgba(196, 244, 59, 0.05);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--accent);
    cursor: pointer;
}

.at-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: bold;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(196, 244, 59, 0.5);
}

.at-status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s infinite;
}

.at-controls {
    display: flex;
    gap: 8px;
}

.at-btn {
    width: 12px;
    height: 12px;
    border: 1px solid var(--accent);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.at-minimize:hover {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* REMOVED MAXIMIZE BTN FOR CLEANER LOOK OR KEEP AS DECORATION */
.at-maximize {
    display: none;
}

.at-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.at-body::-webkit-scrollbar {
    width: 4px;
}

.at-body::-webkit-scrollbar-track {
    background: transparent;
}

.at-body::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.at-message {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
    opacity: 0;
    animation: fadeIn 0.3s forwards;
    border-left: 2px solid transparent;
    padding-left: 8px;
}

.at-message.system {
    color: var(--accent);
    border-left-color: var(--accent);
    text-shadow: 0 0 5px rgba(196, 244, 59, 0.3);
}

.at-message.user {
    color: var(--text-dim);
    text-align: right;
    border-left: none;
    border-right: 2px solid var(--text-dim);
    padding-left: 0;
    padding-right: 8px;
}

.at-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.at-option-btn {
    background: rgba(196, 244, 59, 0.05);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 12px;
    font-family: var(--mono);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 0;
    /* Square for terminal look */
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.at-option-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent);
}

/* MINIMIZED TRIGGER */
.agent-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #000;
    border: 1px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(196, 244, 59, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.agent-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(196, 244, 59, 0.6);
    background: rgba(196, 244, 59, 0.1);
}

.agent-trigger svg {
    width: 24px;
    height: 24px;
    fill: var(--accent);
    filter: drop-shadow(0 0 5px var(--accent));
}

.agent-trigger.hidden {
    transform: scale(0) rotate(180deg);
    opacity: 0;
    pointer-events: none;
}

/* CHAT INPUT FIELD */
.at-input-container {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: stretch;
}

.at-input-field,
.agent-terminal .at-input-field,
.at-body .at-input-field,
input.at-input-field {
    flex: 1;
    width: 100% !important;
    background: rgba(10, 10, 15, 0.8) !important;
    border: 1px solid rgba(196, 244, 59, 0.25) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    color: #ece9e2 !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.8rem !important;
    outline: none !important;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    line-height: 1.4;
}

.at-input-field:focus,
input.at-input-field:focus {
    border-color: rgba(196, 244, 59, 0.6) !important;
    box-shadow: 0 0 16px rgba(196, 244, 59, 0.12), inset 0 0 8px rgba(196, 244, 59, 0.04) !important;
    background: rgba(10, 10, 15, 0.95) !important;
}

.at-input-field::placeholder,
input.at-input-field::placeholder {
    color: rgba(255, 255, 255, 0.2) !important;
    font-style: italic;
}

.at-input-submit,
button.at-input-submit {
    background: #c4f43b !important;
    color: #050508 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 20px !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.at-input-submit:hover,
button.at-input-submit:hover {
    box-shadow: 0 0 24px rgba(196, 244, 59, 0.4);
    transform: translateY(-2px);
    background: #d4ff5b !important;
}

/* SYSTEM NOTIFICATIONS (VISUAL AGENTS) */
.sys-toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #000;
    border: 1px solid var(--accent);
    box-shadow: 0 0 15px rgba(196, 244, 59, 0.15);
    padding: 12px 20px;
    z-index: 9990;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
    transform: translateX(-150%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sys-toast.active {
    transform: translateX(0);
}

.sys-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(196, 244, 59, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px rgba(196, 244, 59, 0.2);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        box-shadow: 0 0 5px var(--accent);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 15px var(--accent);
    }

    100% {
        opacity: 0.5;
        box-shadow: 0 0 5px var(--accent);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ═══════════════════════════════════════════════════════════════════
   FORGE CHAT WIDGET — Conversational AI Assistant
   ═══════════════════════════════════════════════════════════════════ */

.forge-chat-bubble {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 58px;
    height: 58px;
    background: #0a0a0f;
    border: 1px solid rgba(196, 244, 59, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(196, 244, 59, 0.15);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, opacity 0.3s ease;
}

.forge-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6), 0 0 36px rgba(196, 244, 59, 0.3);
}

.forge-chat-bubble svg {
    width: 24px;
    height: 24px;
    color: #c4f43b;
    filter: drop-shadow(0 0 4px rgba(196, 244, 59, 0.5));
}

.forge-chat-bubble.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

/* Chat panel */
.forge-chat-panel {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 380px;
    height: 520px;
    background: #050508;
    border: 1px solid rgba(196, 244, 59, 0.2);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10001;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7), 0 0 40px rgba(196, 244, 59, 0.06);
    transform: translateY(110%) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.forge-chat-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Header */
.fcp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(196, 244, 59, 0.04);
    border-bottom: 1px solid rgba(196, 244, 59, 0.15);
    flex-shrink: 0;
}

.fcp-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fcp-status-dot {
    width: 8px;
    height: 8px;
    background: #c4f43b;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(196, 244, 59, 0.6);
    animation: pulse 2s infinite;
}

.fcp-title {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    color: #c4f43b;
    letter-spacing: 0.04em;
}

.fcp-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.fcp-close svg {
    width: 18px;
    height: 18px;
    color: rgba(236, 233, 226, 0.4);
    transition: color 0.2s;
}

.fcp-close:hover svg {
    color: #c4f43b;
}

/* Messages area */
.fcp-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 244, 59, 0.3) transparent;
}

.fcp-messages::-webkit-scrollbar {
    width: 4px;
}

.fcp-messages::-webkit-scrollbar-track {
    background: transparent;
}

.fcp-messages::-webkit-scrollbar-thumb {
    background: rgba(196, 244, 59, 0.3);
    border-radius: 4px;
}

/* Message bubbles */
.fcp-msg {
    display: flex;
    animation: fcpFadeIn 0.3s ease forwards;
}

.fcp-msg-assistant {
    justify-content: flex-start;
}

.fcp-msg-user {
    justify-content: flex-end;
}

.fcp-msg-content {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 12px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.88rem;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.fcp-msg-assistant .fcp-msg-content {
    background: rgba(196, 244, 59, 0.06);
    border: 1px solid rgba(196, 244, 59, 0.1);
    color: #ece9e2;
    border-bottom-left-radius: 4px;
}

.fcp-msg-user .fcp-msg-content {
    background: rgba(196, 244, 59, 0.15);
    border: 1px solid rgba(196, 244, 59, 0.2);
    color: #ece9e2;
    border-bottom-right-radius: 4px;
}

/* Typing indicator */
.fcp-typing .fcp-msg-content {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 18px;
}

.fcp-dot {
    width: 7px;
    height: 7px;
    background: rgba(196, 244, 59, 0.5);
    border-radius: 50%;
    animation: fcpBounce 1.4s ease-in-out infinite;
}

.fcp-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.fcp-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fcpBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Action buttons (demo offer) */
.fcp-action-btns {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.fcp-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.02em;
}

.fcp-action-yes {
    background: #c4f43b;
    color: #050508;
    border: none;
}

.fcp-action-yes:hover {
    background: #d4ff5b;
    box-shadow: 0 0 16px rgba(196, 244, 59, 0.4);
}

.fcp-action-no {
    background: transparent;
    color: rgba(236, 233, 226, 0.6);
    border: 1px solid rgba(236, 233, 226, 0.2);
}

.fcp-action-no:hover {
    border-color: rgba(236, 233, 226, 0.4);
    color: #ece9e2;
}

/* Input area */
.fcp-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid rgba(196, 244, 59, 0.1);
    background: rgba(5, 5, 8, 0.95);
    flex-shrink: 0;
}

.fcp-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(196, 244, 59, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    color: #ece9e2;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.fcp-input:focus {
    border-color: rgba(196, 244, 59, 0.4);
    box-shadow: 0 0 12px rgba(196, 244, 59, 0.08);
}

.fcp-input::placeholder {
    color: rgba(236, 233, 226, 0.25);
}

.fcp-send {
    width: 40px;
    height: 40px;
    background: #c4f43b;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.fcp-send:hover {
    background: #d4ff5b;
    box-shadow: 0 0 16px rgba(196, 244, 59, 0.35);
    transform: translateY(-1px);
}

.fcp-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.fcp-send svg {
    width: 18px;
    height: 18px;
    color: #050508;
}

/* Footer */
.fcp-footer {
    text-align: center;
    padding: 6px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: rgba(236, 233, 226, 0.2);
    letter-spacing: 0.06em;
    border-top: 1px solid rgba(196, 244, 59, 0.05);
    flex-shrink: 0;
}

@keyframes fcpFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .forge-chat-panel {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
    }

    .forge-chat-bubble {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .fcp-msg-content {
        max-width: 88%;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .forge-chat-panel {
        width: 340px;
        height: 480px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   END CHAT WIDGET
   ═══════════════════════════════════════════════════════════════════ */

/* ADMIN DASHBOARD STYLES (Moved from inline) */
body.admin-body {
    background-color: #000;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    padding: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.agent-card {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid var(--accent);
    padding: 2rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.agent-card h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px var(--accent);
}

.agent-card button {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.agent-card button:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent);
}

.agent-card input,
.agent-card textarea,
.agent-card select {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #33ff33;
    color: var(--accent);
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-family: inherit;
}

.log-output {
    margin-top: 1rem;
    background: #0a0a0a;
    border: 1px solid #333;
    padding: 1rem;
    font-size: 0.8rem;
    min-height: 100px;
    white-space: pre-wrap;
    color: #ccc;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 3rem;
}

.min-h-150 {
    min-height: 150px;
}

.whitespace-pre-wrap {
    white-space: pre-wrap;
}