/* Bright & Modern Theme */

:root {
    /* Bright Color Palette */
    --primary-blue: #4D13D1;
    --primary-blue-light: #00AAFF;
    --primary-blue-dark: #002283;
    --accent-green: #00cc66;
    --accent-orange: #ff8500;
    --light-blue: #e6f3ff;
    --soft-grey: #f5f7fa;
    --medium-grey: #8892a0;
    --dark-grey: #4a5568;
    --pure-white: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --border-light: #e2e8f0;
    --shadow: rgba(0, 102, 255, 0.1);
    --shadow-hover: rgba(0, 102, 255, 0.15);
    --primary-black: #1a202c;
    --light-grey: #cbd5e0;
    

    /* Bootstrap overrides */
    --bs-primary: var(--primary-blue);
    --bs-secondary: var(--medium-grey);
    --bs-success: var(--accent-green);
    --bs-info: var(--primary-blue-light);
    --bs-warning: var(--accent-orange);
    --bs-danger: #ff4757;
    --bs-light: var(--soft-grey);
    --bs-dark: var(--dark-grey);
    --bs-body-bg: var(--light-blue);
    --bs-body-color: var(--text-primary);
    --bs-secondary-bg: var(--soft-grey);
    --bs-border-color: var(--border-light);
}

/* Global body styling */
body {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--pure-white) 100%);
    min-height: 100vh;
    box-sizing: border-box;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    transition: all 0.3s ease;
}

/* Navigation styling */
.navbar {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%) !important;
    border-bottom: none;
    box-shadow: 0 2px 20px var(--shadow);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    color: var(--pure-white) !important;
    font-weight: 700;
    font-size: 1.4rem;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: var(--light-blue) !important;
}

/* Custom logo styling */
.navbar-logo {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    transition: all 0.2s ease;
}

.login-logo {
    height: 72px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    margin-bottom: 8px;
    transition: all 0.2s ease
}

/* .navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
    filter: brightness(1.1);
} */

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 0 4px;
}

.navbar-nav .nav-link:hover {
    color: var(--pure-white) !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.dropdown-menu {
    background-color: var(--pure-white);
    border: 1px solid var(--light-grey);
}

.dropdown-item {
    color: var(--primary-black);
}

.dropdown-item:hover {
    background-color: var(--off-white);
    color: var(--primary-black);
}

.dropdown-divider {
    border-color: var(--light-grey);
}

/* Sidebar styling */
.sidebar {
    background: linear-gradient(180deg, var(--pure-white) 0%, var(--soft-grey) 100%) !important;
    border-right: 1px solid var(--border-light) !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-sticky {
    width: 20vw;
    position: fixed;
    top: 10vh;
    left: 0;
}

.sidebar .nav-link {
    color: var(--text-secondary);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    padding: 12px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.sidebar .nav-link:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    transform: translateX(8px);
}

.sidebar .nav-link:hover::before {
    left: 100%;
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--pure-white);
    box-shadow: 0 4px 15px var(--shadow);
    transform: translateX(8px);
}

.sidebar h6 {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.sidebar hr {
    border-color: var(--border-light);
    opacity: 0.6;
}

/* Card styling */
.card {
    background-color: var(--pure-white);
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.08);
    border-radius: 16px;
    /* transition: all 0.3s ease; */
    transition: none;
    overflow: hidden;
}

.card:hover {
    /* transform: translateY(-4px); */
    box-shadow: 0 15px 35px rgba(0, 102, 255, 0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--soft-grey) 0%, var(--pure-white) 100%);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
}

.ai-bot-card-header {
    background: linear-gradient(135deg, var(--soft-grey) 0%, var(--pure-white) 100%);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.25rem 1.25rem;
}

.card-body {
    background-color: var(--pure-white);
    color: var(--text-primary);
    padding: 1.5rem;
}

/* Button styling */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border: none;
    color: var(--pure-white);
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover);
    color: var(--pure-white);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--medium-grey) 0%, var(--dark-grey) 100%);
    border: none;
    color: var(--pure-white);
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover, .btn-secondary:focus {
    background: linear-gradient(135deg, var(--dark-grey) 0%, var(--medium-grey) 100%);
    color: var(--pure-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--medium-grey);
    border-color: var(--medium-grey);
    background-color: transparent;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    background-color: var(--medium-grey);
    border-color: var(--medium-grey);
    color: var(--pure-white);
}

.btn-outline-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-black);
    border-color: var(--primary-black);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary-black);
    border-color: var(--primary-black);
    color: var(--pure-white);
}

.btn-outline-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-black);
    border-color: var(--primary-black);
}

.btn-outline-danger:hover, .btn-outline-danger:focus {
    background-color: var(--primary-black);
    border-color: var(--primary-black);
    color: var(--pure-white);
}

.btn-success {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--dark-grey);
    border-color: var(--dark-grey);
    color: var(--pure-white);
}

.btn-success:hover, .btn-success:focus {
    background-color: var(--primary-black);
    border-color: var(--primary-black);
    color: var(--pure-white);
}

/* Form controls */
.form-control {
    background-color: var(--pure-white);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.form-control:focus {
    background-color: var(--pure-white);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem var(--shadow);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

/* Table styling */
.table {
    color: var(--primary-black);
}

.table thead th {
    background-color: var(--off-white);
    border-bottom: 2px solid var(--light-grey);
    color: var(--primary-black);
}

.table tbody tr:hover {
    background-color: var(--off-white);
}

/* Alert styling */
.alert {
    min-width: 20rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff !important;
}
.alert-message {
    margin: 0;
    padding: 0;
}
.alert-btn-close {
    position: initial !important;
    padding: 0 !important;
}
.alert-success {
    background-color: var(--off-white);
    border-color: var(--light-grey);
    color: var(--primary-black);
}

.alert-danger {
    background-color: var(--off-white);
    border-color: var(--medium-grey);
    color: var(--primary-black);
}

.alert-info {
    background-color: var(--off-white);
    border-color: var(--light-grey);
    color: var(--primary-black);
}

.alert-warning {
    background-color: var(--off-white);
    border-color: var(--medium-grey);
    color: var(--primary-black);
}

/* Modal styling */
.modal-content {
    background-color: var(--pure-white);
    border: 1px solid var(--light-grey);
}

.modal-header {
    background-color: var(--off-white);
    border-bottom: 1px solid var(--light-grey);
    color: var(--primary-black);
}

.modal-body {
    background-color: var(--pure-white);
    color: var(--primary-black);
}

.modal-footer {
    background-color: var(--off-white);
    border-top: 1px solid var(--light-grey);
}

/* Chat interface styling */
#chatMessages {
    background-color: var(--off-white);
    /* border: 1px solid var(--light-grey); */
    color: var(--primary-black);
}

.message.user .bg-primary {
    background-color: var(--primary-black) !important;
    color: var(--pure-white);
}

.message.bot .bg-secondary {
    background-color: var(--medium-grey) !important;
    color: var(--pure-white);
}

/* SOW content styling */
#sowContent {
    background-color: var(--off-white) !important;
    color: var(--primary-black);
    font-family: 'Georgia', serif;
    line-height: 1.6;
    border: 1px solid var(--light-grey);
}

/* Loading overlay */
.loading-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* List group styling */
.list-group-item {
    background-color: var(--pure-white);
    border-color: var(--light-grey);
    color: var(--primary-black);
    transition: background-color 0.15s ease-in-out;
}

.list-group-item:hover {
    background-color: var(--off-white) !important;
}

.list-group-item-action:hover {
    background-color: var(--off-white);
    color: var(--primary-black);
}

/* Text colors */
.text-muted {
    color: var(--medium-grey) !important;
}

.text-success {
    color: var(--dark-grey) !important;
}

.text-warning {
    color: var(--medium-grey) !important;
}

/* Background utilities */
.bg-body-secondary {
    background-color: var(--off-white) !important;
}

.bg-secondary {
    background-color: var(--medium-grey) !important;
}

.bg-dark {
    background-color: var(--dark-grey) !important;
}

/* Border utilities */
.border-bottom {
    border-bottom: 1px solid var(--light-grey) !important;
}

.border-end {
    border-right: 1px solid var(--light-grey) !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .col-lg-6 {
        margin-bottom: 1.5rem;
    }

    #chatMessages {
        min-height: 250px;
        max-height: 300px;
    }
}

/* Animation for loading states */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Slide in animation */
.slide-in {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Bounce animation for interactive elements */
@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.bounce:hover {
    animation: bounce 0.5s ease-in-out;
}

/* Typing dots animation */
.typing-dots {
    display: inline-flex;
    align-items: center;
}

.typing-dots span {
    height: 8px;
    width: 8px;
    background-color: var(--medium-grey);
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Additional utilities for the monochrome theme */
.h-100 {
    display: flex;
    flex-direction: column;
}

.h-100 .card-body {
    flex: 1;
}

.btn {
    border-radius: 0.375rem;
}

/* Icon colors and animations */
[data-feather] {
    color: inherit;
    transition: all 0.2s ease;
}

.nav-link:hover [data-feather] {
    transform: scale(1.1);
}

.btn [data-feather] {
    transition: transform 0.2s ease;
}

.btn:hover [data-feather] {
    transform: rotate(5deg) scale(1.1);
}

/* Profile icon positioning - bottom left */
.profile-icon {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1050;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pure-white);
    box-shadow: 0 8px 25px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 3px solid var(--pure-white);
}

.profile-icon:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 30px var(--shadow-hover);
    background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-blue) 100%);
    color: var(--pure-white);
    text-decoration: none;
}

.profile-icon [data-feather] {
    width: 24px;
    height: 24px;
}

/* Profile dropdown positioned near profile icon */
.profile-dropdown {
    inset: unset !important;
    height: max-content;
    position: fixed !important;
    bottom: 90px !important;
    left: 30px !important;
    transform: none !important;
    z-index: 1040;
    background: var(--pure-white);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 102, 255, 0.15);
    border: 1px solid var(--border-light);
    min-width: 220px;
    padding: 8px;
}

.profile-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 12px 16px;
    margin: 2px 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-dropdown .dropdown-item:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    transform: translateX(4px);
}

.profile-dropdown .dropdown-item [data-feather] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

/* Interactive elements */
.interactive-element {
    transition: all 0.2s ease;
    cursor: pointer;
}

.interactive-element:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.1);
}

/* Ensure proper contrast for all text */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p {
    color: var(--text-primary);
}

/* File upload styling */
.form-control[type="file"] {
    padding: 0.375rem 0.75rem;
    background-color: var(--pure-white);
    border: 1px solid var(--light-grey);
}

/* Flash Messages - Bottom Right Fixed Position */
.flash-messages-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1060;
    max-width: 350px;
    width: auto;
}

.flash-message {
    margin-bottom: 10px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.15);
    border: 1px solid var(--border-light);
    animation: slideInFromRight 0.4s ease-out;
    font-size: 0.9rem;
    padding: 12px 16px;
}

/* Slide in animation from right */
@keyframes slideInFromRight {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}