:root {
    --bg-color: #0d0d0d;
    --card-bg: #1a1a1a;
    --text-color: #ffffff;
    --text-muted: #b0b0b0;
    --accent-cyan: #00f3ff;
    --accent-magenta: #ff00ff;
    --accent-yellow: #fcee0a;
    --border-color: #333;
    --brand-green: #00ff66;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Rajdhani', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Typography Overrides */
.text-muted {
    color: var(--text-muted) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
}

/* Navbar */
.navbar {
    background-color: rgba(13, 13, 13, 0.95) !important;
    border-bottom: 1px solid var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.navbar-brand {
    color: var(--brand-green) !important;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 5px var(--brand-green);
}

.nav-link {
    color: var(--text-color) !important;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-magenta) !important;
    text-shadow: 0 0 5px var(--accent-magenta);
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
    transform: translateY(-2px);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--accent-cyan);
    color: #000;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan);
}

.btn-outline-primary {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.btn-outline-primary:hover {
    background-color: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* AI Agent Chatbot */
#ai-agent-fab {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--brand-green);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 255, 102, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #fff;
}

#ai-agent-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 255, 102, 0.6);
}

#ai-agent-fab i {
    font-size: 28px;
    color: #000;
}

#ai-agent-chat-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

#ai-agent-chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    background-color: rgba(0, 255, 102, 0.1);
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    color: var(--brand-green);
    font-weight: 700;
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.chat-close:hover {
    color: #fff;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.message.ai {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background-color: var(--brand-green);
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.2);
}

.chat-input {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 15px;
    color: #fff;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input:focus {
    border-color: var(--brand-green);
}

.chat-send {
    background-color: var(--brand-green);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-send:hover {
    transform: scale(1.1);
}

@media (max-width: 576px) {
    #ai-agent-chat-window {
        width: calc(100% - 40px);
        bottom: 100px;
        height: 60vh;
    }

    #ai-agent-fab {
        bottom: 80px;
    }
}

/* Full Page AI Agent */
.chat-container {
    height: calc(100vh - 100px); /* Adjust based on navbar/footer */
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
}

.chat-history-sidebar {
    height: calc(100vh - 100px);
    overflow-y: auto;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
}

.chat-main-area {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.full-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.full-chat-input-area {
    padding: 20px;
    background-color: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border-color);
}

.full-chat-input-wrapper {
    position: relative;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 10px 20px;
    display: flex;
    align-items: flex-end; /* For multiline textarea if needed */
}

.full-chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    resize: none;
    min-height: 24px;
    max-height: 200px;
    line-height: 1.5;
}

.full-chat-send-btn {
    background-color: var(--brand-green);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    margin-left: 10px;
}

.full-chat-send-btn:hover {
    transform: scale(1.1);
}

.history-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.history-item:hover, .history-item.active {
    background-color: rgba(0, 255, 102, 0.1);
}

.history-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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


.btn-danger {
    background-color: transparent;
    border: 1px solid var(--accent-magenta);
    color: var(--accent-magenta);
}

.btn-danger:hover {
    background-color: var(--accent-magenta);
    color: #000;
    box-shadow: 0 0 15px var(--accent-magenta);
}

/* Custom Cyan Button */
.btn-cyan {
    background-color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    color: #000; /* Set text color to black for contrast */
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cyan:hover {
    background-color: transparent;
    color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan);
}

.btn-outline-cyan {
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    transition: all 0.3s ease;
}

.btn-outline-cyan:hover {
    background-color: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 10px var(--accent-cyan);
}


/* Forms */
.form-control {
    background-color: #000;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.form-control:focus {
    background-color: #050505;
    border-color: var(--accent-cyan);
    color: var(--text-color);
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
}

/* Tables */
.table {
    color: var(--text-color);
}

.table-dark {
    background-color: transparent;
}

.table thead th {
    border-bottom: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.table td, .table th {
    border-top: 1px solid var(--border-color);
}

/* Utilities */
.text-cyan {
    color: var(--accent-cyan) !important;
}

.text-magenta {
    color: var(--accent-magenta) !important;
}

.text-danger {
    color: var(--accent-magenta) !important;
}

.text-yellow {
    color: var(--accent-yellow) !important;
}

.text-brand-green {
    color: var(--brand-green) !important;
    text-shadow: 0 0 6px rgba(0, 255, 102, 0.6);
}

.bg-cyan {
    background-color: var(--accent-cyan) !important;
    color: #000 !important;
}

/* Bottom Navigation */
.bottom-nav {
    border-top: 1px solid var(--border-color);
    background-color: rgba(13, 13, 13, 0.98) !important;
    padding: 0 !important; /* Reset padding */
    height: 70px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
    z-index: 1040;
}

.bottom-nav .container-fluid {
    height: 100%;
}

.bottom-nav .nav-link {
    color: var(--text-muted) !important;
    font-size: 0.75rem;
    padding: 0.5rem;
    flex: 1; /* Distribute space */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-shadow: none !important;
}

.bottom-nav .nav-link:hover, 
.bottom-nav .nav-link.active {
    color: var(--accent-cyan) !important;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.4) !important;
}

.bottom-nav .bi {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

/* Center Floating Button */
.nav-item-center-wrap {
    position: relative;
    width: 70px; /* Slightly wider space */
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Align bottom */
}

.nav-item-center {
    position: absolute;
    bottom: 25px; /* Push up */
    width: 56px;
    height: 56px;
    background: var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    border: 4px solid var(--bg-color); /* Cutout effect */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1050;
    text-decoration: none;
}

.nav-item-center:hover {
    transform: scale(1.1);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.nav-item-center .bi {
    font-size: 1.6rem;
    margin: 0;
}
