/* Smart Bootstrap Utility Overrides - Theme-Aware Text Classes */
[data-theme="light"] .text-white {
    color: #212529 !important; /* Dark text instead of white */
}

[data-theme="light"] .text-dark {
    color: #6c757d !important; /* Light gray instead of black */
}

/* Placeholder text - theme-aware */
[data-theme="light"] .form-control::placeholder,
[data-theme="light"] .form-select::placeholder,
[data-theme="light"] textarea.form-control::placeholder {
    color: #6c757d !important; /* Darker placeholder for light theme */
    opacity: 1;
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .form-select::placeholder,
[data-theme="dark"] textarea.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7) !important; /* Lighter placeholder for dark theme */
    opacity: 1;
}

[data-theme="default"] .form-control::placeholder,
[data-theme="default"] .form-select::placeholder,
[data-theme="default"] textarea.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7) !important; /* Default vapor theme placeholder */
    opacity: 1;
}

/* Preserve Native Bootstrap Button Styles Across All Themes */
 .btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#6f42c1;--bs-btn-border-color:#6f42c1;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5e38a4;--bs-btn-hover-border-color:#59359a;--bs-btn-focus-shadow-rgb:133,94,202;--bs-btn-active-color:#fff;--bs-btn-active-bg:#59359a;--bs-btn-active-border-color:#533291;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6f42c1;--bs-btn-disabled-border-color:#6f42c1}
 .btn-outline-primary{--bs-btn-color:#6f42c1;--bs-btn-border-color:#6f42c1;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6f42c1;--bs-btn-hover-border-color:#6f42c1;--bs-btn-focus-shadow-rgb:111,66,193;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6f42c1;--bs-btn-active-border-color:#6f42c1;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#6f42c1;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6f42c1;--bs-gradient:none}
.btn-secondary {
    border-color: #FF00FF !important;
    --bs-btn-bg: #ea39b8;
    --bs-btn-border-color: #ea39b8;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #c7309c;
    --bs-btn-hover-border-color: #bb2e93;
    --bs-btn-focus-shadow-rgb: 237,87,195;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #bb2e93;
    --bs-btn-active-border-color: #b02b8a;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #ea39b8;
    --bs-btn-disabled-border-color: #ea39b8
}
.btn-outline-secondary {
    --bs-btn-color: #ea39b8;
    border-color: #FF00FF !important;
    --bs-btn-border-color: #ea39b8;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #ea39b8;
    --bs-btn-hover-border-color: #ea39b8;
    --bs-btn-focus-shadow-rgb: 234,57,184;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #ea39b8;
    --bs-btn-active-border-color: #ea39b8;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #ea39b8;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #ea39b8;
    --bs-gradient: none
}
 .btn-success{--bs-btn-bg:#3cf281;--bs-btn-border-color:#3cf281;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#33ce6e;--bs-btn-hover-border-color:#30c267;--bs-btn-focus-shadow-rgb:89,244,148;--bs-btn-active-color:#fff;--bs-btn-active-bg:#30c267;--bs-btn-active-border-color:#2db661;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#3cf281;--bs-btn-disabled-border-color:#3cf281}
 .btn-outline-success{--bs-btn-color:#3cf281;--bs-btn-border-color:#3cf281;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#3cf281;--bs-btn-hover-border-color:#3cf281;--bs-btn-focus-shadow-rgb:60,242,129;--bs-btn-active-color:#fff;--bs-btn-active-bg:#3cf281;--bs-btn-active-border-color:#3cf281;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#3cf281;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#3cf281;--bs-gradient:none}
.btn-info{--bs-btn-bg:#1ba2f6;--bs-btn-border-color:#1ba2f6;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#178ad1;--bs-btn-hover-border-color:#1682c5;--bs-btn-focus-shadow-rgb:61,176,247;--bs-btn-active-color:#fff;--bs-btn-active-bg:#1682c5;--bs-btn-active-border-color:#147ab9;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#1ba2f6;--bs-btn-disabled-border-color:#1ba2f6}
.btn-outline-info{--bs-btn-color:#1ba2f6;--bs-btn-border-color:#1ba2f6;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#1ba2f6;--bs-btn-hover-border-color:#1ba2f6;--bs-btn-focus-shadow-rgb:27,162,246;--bs-btn-active-color:#fff;--bs-btn-active-bg:#1ba2f6;--bs-btn-active-border-color:#1ba2f6;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#1ba2f6;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#1ba2f6;--bs-gradient:none}
 .btn-warning{--bs-btn-bg:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#d9a406;--bs-btn-hover-border-color:#cc9a06;--bs-btn-focus-shadow-rgb:255,202,44;--bs-btn-active-color:#fff;--bs-btn-active-bg:#cc9a06;--bs-btn-active-border-color:#bf9105;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#ffc107;--bs-btn-disabled-border-color:#ffc107}
 .btn-outline-warning{--bs-btn-color:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#ffc107;--bs-btn-hover-border-color:#ffc107;--bs-btn-focus-shadow-rgb:255,193,7;--bs-btn-active-color:#fff;--bs-btn-active-bg:#ffc107;--bs-btn-active-border-color:#ffc107;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#ffc107;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#ffc107;--bs-gradient:none}
 .btn-danger{--bs-btn-bg:#e44c55;--bs-btn-border-color:#e44c55;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#c24148;--bs-btn-hover-border-color:#b63d44;--bs-btn-focus-shadow-rgb:232,103,111;--bs-btn-active-color:#fff;--bs-btn-active-bg:#b63d44;--bs-btn-active-border-color:#ab3940;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#e44c55;--bs-btn-disabled-border-color:#e44c55}
 .btn-outline-danger{--bs-btn-color:#e44c55;--bs-btn-border-color:#e44c55;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#e44c55;--bs-btn-hover-border-color:#e44c55;--bs-btn-focus-shadow-rgb:228,76,85;--bs-btn-active-color:#fff;--bs-btn-active-bg:#e44c55;--bs-btn-active-border-color:#e44c55;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#e44c55;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#e44c55;--bs-gradient:none}
 .btn-light{--bs-btn-bg:#44d9e8;--bs-btn-border-color:#44d9e8;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#3ab8c5;--bs-btn-hover-border-color:#36aeba;--bs-btn-focus-shadow-rgb:96,223,235;--bs-btn-active-color:#fff;--bs-btn-active-bg:#36aeba;--bs-btn-active-border-color:#33a3ae;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#44d9e8;--bs-btn-disabled-border-color:#44d9e8}
 .btn-outline-light{--bs-btn-color:#44d9e8;--bs-btn-border-color:#44d9e8;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#44d9e8;--bs-btn-hover-border-color:#44d9e8;--bs-btn-focus-shadow-rgb:68,217,232;--bs-btn-active-color:#fff;--bs-btn-active-bg:#44d9e8;--bs-btn-active-border-color:#44d9e8;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#44d9e8;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#44d9e8;--bs-gradient:none}
 .btn-dark{--bs-btn-bg:#170229;--bs-btn-border-color:#170229;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#3a2849;--bs-btn-hover-border-color:#2e1b3e;--bs-btn-focus-shadow-rgb:58,40,73;--bs-btn-active-color:#fff;--bs-btn-active-bg:#453554;--bs-btn-active-border-color:#2e1b3e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#170229;--bs-btn-disabled-border-color:#170229}
 .btn-outline-dark{--bs-btn-color:#170229;--bs-btn-border-color:#170229;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#170229;--bs-btn-hover-border-color:#170229;--bs-btn-focus-shadow-rgb:23,2,41;--bs-btn-active-color:#fff;--bs-btn-active-bg:#170229;--bs-btn-active-border-color:#170229;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#170229;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#170229;--bs-gradient:none}


footer {
    padding: 10px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
}
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
    margin-bottom: 60px;
    min-height: 100vh;
}

/* Main content area styling for better readability over gradient */
main {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 1rem;
    backdrop-filter: blur(10px);
}

/* Header styling for gradient background */
header {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    margin: 1rem;
    backdrop-filter: blur(10px);
}

/* Ensure CRUD boxes, cards, containers, and panels have solid backgrounds */
.card, .card-body, .card-header, .card-footer {
    background-color: rgba(255, 255, 255, .01) !important;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.container, .container-fluid {
    background-color: transparent;
}

/* Admin panels and content areas */
.admin-panel, .admin-panels, .panel, .panel-body, .panel-header, .panel-footer {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

/* Form containers and input groups */
.form-control, .input-group, .form-group {
    background-color: transparent !important;
    border: 1px solid rgba(157, 0, 255, 0.3) !important;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

/* Checkboxes and radio buttons */
.form-check-input {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Form switches */
.form-switch .form-check-input {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.form-switch .form-check-input:checked {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Form floating elements */
.form-floating .form-control {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.form-floating .form-control:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

.form-floating label {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Button hover effects - text changes to outline color */
.btn-outline-primary:hover {
    color: rebeccapurple !important; /* Bootstrap primary purple */
}

.btn-outline-secondary:hover {
    color: hotpink !important; /* Bootstrap secondary gray */
}

.forceHover:hover {
    color: #0dcaf0 !important; /* Bootstrap info cyan */
}

.btn-outline-info:hover {
    color: #0dcaf0 !important; /* Bootstrap info cyan */
}

.btn-outline-success:hover {
    color: #198754 !important; /* Bootstrap success green */
}

.btn-outline-warning:hover {
    color: #fd7e14 !important; /* Bootstrap warning orange */
}

.btn-outline-danger:hover {
    color: #dc3545 !important; /* Bootstrap danger red */
}

/* Ensure smooth transitions for all buttons */
.btn {
    transition: all 0.3s ease-in-out;
}

/* Labels */
label, .control-label, .form-label {
    background-color: transparent !important;
    color: rgb(68,217,232) !important;
}

/* Form validation messages */
.text-danger, .field-validation-error {
    background-color: transparent !important;
    color: #ff6b6b !important;
}

.text-success, .field-validation-valid {
    background-color: transparent !important;
    color: #51cf66 !important;
}

/* Placeholder text styling */
.form-control::placeholder, 
.form-select::placeholder,
textarea.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1;
}

/* Ensure form groups don't have backgrounds */
.form-group {
    background-color: transparent !important;
}

/* Tables */
.table, .table-striped, .table-bordered {
    background-color: transparent !important;
}

    .table thead th, .table tbody td {
        background-color: transparent !important;
    }

/* Table responsive container should be transparent */
.table-responsive {
    background-color: transparent !important;
}

/* Specific overrides for table elements */
table.accordion, table.display, table.table-striped {
    background-color: transparent !important;
}

    table.accordion thead th, table.accordion tbody td,
    table.display thead th, table.display tbody td,
    table.table-striped thead th, table.table-striped tbody td {
        background-color: transparent !important;
    }

/* Override any inline styles */
table[style*="background-color"] {
    background-color: transparent !important;
}

/* Bootstrap components */
.alert, .btn {
    background-color: inherit !important;
}

.modal {
    z-index: 99999 !important;
}

.modal-backdrop {
    z-index: 1 !important;
}


.dropdown-menu, .dropdown-item {
}

.list-group, .list-group-item {
}

.nav-tabs .nav-link {
    background-color: #ffffff !important;
}

.tab-content, .tab-pane {
    
}

/* Ensure proper contrast for text
.card, .card-body, .card-header, .card-footer,
.admin-panel, .admin-panels, .panel, .panel-body, .panel-header, .panel-footer, .table, .modal-content, .dropdown-menu, .list-group {
    color: #333333 !important;
}
    /*

/* Ensure the page content wrapper extends full height */
.flex-fill {
    min-height: 100vh;
}

label {
    padding: 0 0 0 10px;
}

/* Sidebar Logo Styling */
.sidebar-logo {
    padding: 0.5rem 0;
}

.sidebar-logo .logo-container {
    transition: transform 0.2s ease;
}

.sidebar-logo:hover .logo-container {
}

.sidebar-logo .logo-icon {
    max-height: 40px;
    width: auto;
    filter: brightness(1.1);
}

.sidebar-logo .logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    transition: all 0.3s ease;
}

.sidebar-logo .logo-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.sidebar-logo .logo-subtitle {
    font-size: 0.75rem;
    color: #b0b0b0;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

/* Hover effects for logo text */
.sidebar-logo:hover .logo-title {
    color: deepskyblue !important;
}

.sidebar-logo:hover .logo-subtitle {
    color: #ffffff !important;
}

.sidebar-logo:hover .logo-icon {
    filter: brightness(1.3);
}

/* Responsive adjustments for sidebar logo */
@media (max-width: 768px) {
    .sidebar-logo .logo-title {
        font-size: 1rem;
    }
    
    .sidebar-logo .logo-subtitle {
        font-size: 0.65rem;
    }
    
    .sidebar-logo .logo-icon {
        max-height: 35px;
    }
}

.sidebar .nav-link {
    border-radius: 0.375rem; /* Rounded corners */
    padding: 0.5rem 0.75rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

    .sidebar .nav-link:hover {
        background-color: rgba(rgb(48, 25, 52), 0.15);
        color: deepskyblue !important; /* Bootstrap warning color for highlight */
    }

    .sidebar .nav-link.active {
        background-color: rgb(48, 25, 52) !important;
        color: deepskyblue !important; /* Dark text on highlight */
        font-weight: 600;
    }

/* Theme-aware sidebar active nav link styling */
[data-theme="light"] .sidebar .nav-link.active {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important; /* Light blue gradient */
    color: #1565c0 !important; /* Dark blue text */
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.2) !important;
}

[data-theme="dark"] .sidebar .nav-link.active {
    background: linear-gradient(135deg, #424242 0%, #616161 100%) !important; /* Dark gray gradient */
    color: #ffffff !important; /* White text */
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Theme-aware persona action button hover states */
[data-theme="light"] .persona-actions .btn-outline-primary:hover {
    color: #212529 !important;
    background: linear-gradient(135deg, #6f42c1 0%, #bbdefb 100%) !important; /* Light blue gradient for light theme */
    border-color: #2196f3 !important;
}

[data-theme="dark"] .persona-actions .btn-outline-primary:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #6f42c1 0%, #616161 100%) !important; /* Medium purple to gray gradient for dark theme */
    border-color: #5e35b1 !important;
}

[data-theme="light"] .persona-actions .btn-outline-success:hover {
    color: #212529 !important;
    background: linear-gradient(135deg, #34b70b 0%, #c8e6c9 100%) !important; /* Light green gradient for light theme */
    border-color: #4caf50 !important;
}

[data-theme="dark"] .persona-actions .btn-outline-success:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2e7d32 0%, #616161 100%) !important; /* Dark green gradient for dark theme */
    border-color: #2e7d32 !important;
}

[data-theme="light"] .persona-actions .btn-outline-danger:hover {
    color: #212529 !important;
    background: linear-gradient(135deg, #e44c55 0%, #f8bbd9 100%) !important; /* Light pink gradient for light theme */
    border-color: #f44336 !important;
}

[data-theme="dark"] .persona-actions .btn-outline-danger:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #b71c1c 0%, #616161 100%) !important; /* Dark red gradient for dark theme */
    border-color: #b71c1c !important;
}

[data-theme="light"] .persona-actions .btn-outline-info:hover {
    color: #212529 !important;
    background: linear-gradient(135deg, #1ba2f6 0%, #b2dfdb 100%) !important; /* Light teal gradient for light theme */
    border-color: #009688 !important;
}

[data-theme="dark"] .persona-actions .btn-outline-info:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #1ba2f6 0%, #616161 100%) !important; /* Dark teal gradient for dark theme */
    border-color: #00695c !important;
}

[data-theme="light"] .persona-actions .btn-outline-secondary:hover {
    color: #212529 !important;
    background: linear-gradient(135deg, #ea39b8 0%, #e0e0e0 100%) !important; /* Light gray gradient for light theme */
    border-color: #9e9e9e !important;
}

[data-theme="dark"] .persona-actions .btn-outline-secondary:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ea39b8 0%, #616161 100%) !important; /* Medium purple to gray gradient for dark theme */
    border-color: #757575 !important;
}

[data-theme="light"] .persona-actions .btn-outline-warning:hover {
    color: #212529 !important;
    background: linear-gradient(135deg, #ffc107 0%, #ffe0b2 100%) !important; /* Light orange gradient for light theme */
    border-color: #ff9800 !important;
}

[data-theme="dark"] .persona-actions .btn-outline-warning:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ffc107 0%, #f57c00 100%) !important; /* Dark orange gradient for dark theme */
    border-color: #e65100 !important;
}

/* Theme-aware persona and join index add buttons */
.persona-index-add-btn, .join-index-add-btn {
    font-size: 1.15rem;
    font-weight: 600;
    padding: 0.85rem 2.2rem;
    border-radius: 12px;
    color: #fff !important;
    border: none;
    box-shadow: 0 4px 16px rgba(102,126,234,0.10);
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

[data-theme="light"] .persona-index-add-btn {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important; /* Light blue gradient for light theme */
    color: #1565c0 !important;
}

[data-theme="light"] .persona-index-add-btn:hover, [data-theme="light"] .persona-index-add-btn:focus {
    background: linear-gradient(135deg, #bbdefb 0%, #e3f2fd 100%) !important;
    color: #1565c0 !important;
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 8px 32px rgba(102,126,234,0.18);
}

[data-theme="dark"] .persona-index-add-btn {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%) !important; /* Dark blue gradient for dark theme */
    color: #ffffff !important;
}

[data-theme="dark"] .persona-index-add-btn:hover, [data-theme="dark"] .persona-index-add-btn:focus {
    background: linear-gradient(135deg, #3949ab 0%, #1a237e 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 8px 32px rgba(102,126,234,0.18);
}

[data-theme="default"] .persona-index-add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; /* Original purple gradient */
    color: #fff !important;
}

[data-theme="default"] .persona-index-add-btn:hover, [data-theme="default"] .persona-index-add-btn:focus {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    color: #fff !important;
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 8px 32px rgba(102,126,234,0.18);
}

[data-theme="light"] .join-index-add-btn {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%) !important; /* Light teal gradient for light theme */
    color: #00695c !important;
}

[data-theme="light"] .join-index-add-btn:hover, [data-theme="light"] .join-index-add-btn:focus {
    background: linear-gradient(135deg, #b2dfdb 0%, #e0f2f1 100%) !important;
    color: #00695c !important;
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 8px 32px rgba(102,126,234,0.18);
}

[data-theme="dark"] .join-index-add-btn {
    background: linear-gradient(135deg, #00695c 0%, #00897b 100%) !important; /* Dark teal gradient for dark theme */
    color: #ffffff !important;
}

[data-theme="dark"] .join-index-add-btn:hover, [data-theme="dark"] .join-index-add-btn:focus {
    background: linear-gradient(135deg, #00897b 0%, #00695c 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 8px 32px rgba(102,126,234,0.18);
}

[data-theme="default"] .join-index-add-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #764ba2 100%) !important; /* Original teal-purple gradient */
    color: #fff !important;
}

[data-theme="default"] .join-index-add-btn:hover, [data-theme="default"] .join-index-add-btn:focus {
    background: linear-gradient(135deg, #764ba2 0%, #17a2b8 100%) !important;
    color: #fff !important;
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 8px 32px rgba(102,126,234,0.18);
}

/* Default theme preserves original purple hover effects - no changes needed for default, uses inline styles */

/* Theme-aware sidebar hover nav link styling */
[data-theme="light"] .sidebar .nav-link:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important; /* Light blue gradient */
    color: #1565c0 !important; /* Dark blue text */
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.0) !important;
}

[data-theme="dark"] .sidebar .nav-link:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.125) 0%, #616161 100%) !important; /* Dark gray gradient */
    color: #ffffff !important; /* White text */
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.0) !important;
}

/* Theme-aware sidebar active nav link styling */
[data-theme="light"] .sidebar .nav-link:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important; /* Light blue gradient */
    color: #1565c0 !important; /* Dark blue text */
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.0) !important;
}

[data-theme="dark"] .sidebar .nav-link:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.125) 0%, #616161 100%) !important; /* Dark gray gradient */
    color: #ffffff !important; /* White text */
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.0) !important;
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
    /* Sidebar mobile behavior */
    .sidebar {
        transform: translateX(-100%);
        width: 250px !important;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    /* Main content adjustment for mobile */
    #mainContent {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Mobile toggle button */
    #sidebarToggle {
        display: block !important;
    }
    
    /* Mobile overlay when sidebar is open */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1025;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 767.98px) {
    /* Small mobile devices */
    .container, .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Mobile-friendly tables */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th, .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }
    
    /* Mobile button groups */
    .d-flex.flex-wrap.gap-2 {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .btn {
        margin-bottom: 0.25rem;
    }
    
    /* Mobile form adjustments */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .row .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Mobile logo adjustments */
    .logo-text {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-title {
        font-size: 1.2rem !important;
    }
    
    .logo-subtitle {
        font-size: 0.9rem !important;
    }
    
    /* Mobile padding adjustments */
    main {
        padding: 1rem !important;
    }
    
    /* Mobile footer adjustments */
    footer {
        font-size: 0.875rem;
    }
    
    footer small {
        display: block;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 575.98px) {
    /* Extra small devices */
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .table th, .table td {
        padding: 0.25rem 0.125rem;
        font-size: 0.8rem;
    }
    
    /* Stack all columns on very small screens */
    .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Mobile-friendly headings */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Mobile-friendly buttons */
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Mobile-friendly forms */
    .form-control {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Mobile-friendly DataTables */
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .dataTables_wrapper .dataTables_length select,
    .dataTables_wrapper .dataTables_filter input {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Mobile-friendly DataTables */
@media (max-width: 767.98px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: left !important;
        margin-bottom: 0.5rem;
    }
    
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: center !important;
        margin-top: 0.5rem;
    }
    
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.25rem 0.5rem;
        margin: 0 0.125rem;
        font-size: 0.8rem;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px; /* iOS recommended minimum */
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    /* Increase touch targets */
    .btn, .nav-link, .form-control, input[type="checkbox"], input[type="radio"] {
    }
}

/* Landscape mobile adjustments */
@media (max-width: 991.98px) and (orientation: landscape) {
    .sidebar {
        width: 250px !important;
    }
    
    main {
        padding: 0.75rem !important;
    }
    
    .table-responsive {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Hide scroll bars on tables */
.table-responsive::-webkit-scrollbar {
    display: none;
}

.table-responsive {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scroll bars on DataTables */
.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar {
    display: none;
}

.dataTables_wrapper .dataTables_scrollBody {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hide scroll bars on any table with overflow */
table::-webkit-scrollbar {
    display: none;
}

table {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mobile Toggle Button Styling - Top Left */
#sidebarToggle {
    transition: all 0.3s ease;
    background: linear-gradient(339deg, #523283 0%, #27014d 90%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
}

    #sidebarToggle:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
        background: linear-gradient(339deg, #523283 0%, #27014d 90%)
    }

#sidebarToggle:active {
}

/* Mobile Toggle Button Animation */
#sidebarToggle i {
    transition: transform 0.3s ease;
    font-size: 1.1rem;
}

#sidebarToggle:hover i {
    transform: rotate(90deg);
}

/* Ensure button doesn't interfere with content */
@media (max-width: 991.98px) {
    #sidebarToggle {
        left: -5px;
        top: 10px;
        transform: none;
    }
    
    #sidebarToggle:hover {
        transform: scale(1.1);
    }
    
    #sidebarToggle:active {
    }
    
    /* Add padding to main content to avoid button overlap */
    main {
        padding-top: 60px !important;
    }
}

/* Mobile Toggle Button Styling - Vertical Left Side Bar */
.sidebar-toggle-bar {
    transition: all 0.3s ease !important;
    background: linear-gradient(339deg, #523283 0%, #27014d 90%);
    border: none;
    color: white;
    border-radius: 0;
    padding: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    transform: translateX(0) !important;
}

    .sidebar-toggle-bar:hover {
        background: linear-gradient(339deg, #523283 0%, #27014d 90%);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.4);
        transform: translateX(5px) !important;
    }

.sidebar-toggle-bar:active {
    transform: translateX(2px) !important;
}

/* Sidebar Open State - Button Pushed Right */
body.sidebar-open .sidebar-toggle-bar {
    transform: translateX(250px) !important;
    transition: transform 0.3s ease !important;
}

/* Alternative selector for sidebar open state */
.sidebar.show ~ .sidebar-toggle-bar,
.sidebar.show + #mainContent ~ .sidebar-toggle-bar {
    transform: translateX(250px) !important;
    transition: transform 0.3s ease !important;
}

/* Mobile Toggle Button Animation */
.sidebar-toggle-bar i {
    transition: all 0.3s ease;
    font-size: 1.2rem;
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-toggle-bar:hover i {
    transform: translateY(-50%) rotate(90deg);
}

/* Icon Rotation for Sidebar Open State */
body.sidebar-open .sidebar-toggle-bar i {
    transform: translateY(-50%) rotate(180deg) !important;
}

/* Alternative icon rotation selectors */
.sidebar.show ~ .sidebar-toggle-bar i,
.sidebar.show + #mainContent ~ .sidebar-toggle-bar i {
    transform: translateY(-50%) rotate(180deg) !important;
}

/* Ensure consistent button styling */
.sidebar-toggle-bar {
    border: none !important;
    background: linear-gradient(339deg, #523283 0%, #27014d 90%) !important;
}

/* Ensure button doesn't interfere with content */
@media (max-width: 991.98px) {
    .sidebar-toggle-bar {
        top: 0;
        height: 100vh;
        width: 40px;
        transform: translateX(0) !important;
    }
    
    .sidebar-toggle-bar:hover {
        transform: translateX(5px) !important;
    }
    
    .sidebar-toggle-bar:active {
        transform: translateX(2px) !important;
    }
    
    /* Sidebar Open State - Button Pushed Right */
    body.sidebar-open .sidebar-toggle-bar {
        transform: translateX(250px) !important;
    }
    
    /* Alternative selector for sidebar open state */
    .sidebar.show ~ .sidebar-toggle-bar,
    .sidebar.show + #mainContent ~ .sidebar-toggle-bar {
        transform: translateX(250px) !important;
    }
    
    /* Add left margin to main content to avoid button overlap */
    main {
        margin-left: 40px !important;
        padding-top: 20px !important;
    }
}

/* Sidebar Mobile Behavior */
.sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar.show {
    transform: translateX(0);
}

/* Desktop sidebar behavior */
@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }
}

/* File Input Button Styling */
input[type="file"] {
    background-color: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(157, 0, 255, 0.3) !important;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    background-color: rgba(157, 0, 255, 0.1) !important;
    border-color: rgba(157, 0, 255, 0.6) !important;
    color: #ffffff !important;
}

input[type="file"]:focus {
    outline: none;
    border-color: rgba(157, 0, 255, 0.8) !important;
    box-shadow: 0 0 0 2px rgba(157, 0, 255, 0.2);
}

/* File Upload Button Styling */
.btn-upload {
    background-color: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(157, 0, 255, 0.3) !important;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background-color: rgba(157, 0, 255, 0.1) !important;
    border-color: rgba(157, 0, 255, 0.6) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(157, 0, 255, 0.3);
}

.btn-upload:active {
    transform: translateY(0);
}

/* Custom File Input Styling */
.custom-file-input {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.custom-file-input input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.custom-file-label {
    display: inline-block;
    padding: 8px 16px;
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(157, 0, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-file-label:hover {
    background-color: rgba(157, 0, 255, 0.1);
    border-color: rgba(157, 0, 255, 0.6);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(157, 0, 255, 0.3);
}

/* Bootstrap Button Overrides for File Upload */
.btn-outline-primary {
    background-color: transparent !important;
    border: 1px solid rgba(157, 0, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-outline-primary:hover {
    background-color: rgba(157, 0, 255, 0.1) !important;
    border-color: rgba(157, 0, 255, 0.6) !important;
    color: rgb(157, 0, 255) !important;
    transform: translateY(-2px) scale(0.95) !important;
    box-shadow: 0 4px 8px rgba(157, 0, 255, 0.3);
}

.btn-outline-primary:focus {
    background-color: rgba(157, 0, 255, 0.1) !important;
    border-color: rgba(157, 0, 255, 0.8) !important;
    color: rgb(157, 0, 255) !important;
    box-shadow: 0 0 0 0.2rem rgba(157, 0, 255, 0.25);
}

.btn-success {
    background-color: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(157, 0, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-success:hover {
    background-color: forestgreen !important;
    border-color: forestgreen !important;
    color: white !important;
    transform: translateY(-2px) scale(0.95) !important;
    box-shadow: 0 4px 8px rgba(157, 0, 255, 0.3);
}

.btn-success:focus {
    background-color: forestgreen !important;
    border-color: forestgreen !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(157, 0, 255, 0.25);
}

/* Add shrinking effect to all other button classes */
.btn-outline-secondary {
    transition: all 0.3s ease !important;
}

.btn-outline-secondary:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

    .btn-outline-success:hover {
        transform: translateY(-2px) scale(0.95) !important;
    }

.btn-outline-info {
    transition: all 0.3s ease !important;
}

.btn-outline-info:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

.btn-outline-warning {
    transition: all 0.3s ease !important;
}

.btn-outline-warning:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

.btn-outline-danger {
    transition: all 0.3s ease !important;
}

.btn-outline-danger:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

.btn-outline-dark {
    transition: all 0.3s ease !important;
}

.btn-outline-dark:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

.btn-primary {
    transition: all 0.3s ease !important;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

.btn-secondary {
    transition: all 0.3s ease !important;
}

.btn-secondary:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

.btn-info {
    transition: all 0.3s ease !important;
}

.btn-info:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

.btn-warning {
    transition: all 0.3s ease !important;
}

.btn-warning:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

.btn-danger {
    transition: all 0.3s ease !important;
}

.btn-danger:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

.btn-dark {
    transition: all 0.3s ease !important;
}

.btn-dark:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

.btn-light {
    transition: all 0.3s ease !important;
}

.btn-light:hover {
    transform: translateY(-2px) scale(0.95) !important;
}

/* Specific targeting for file upload buttons */
.input-group .btn-outline-primary,
.input-group .btn-success {
    background-color: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(157, 0, 255, 0.3) !important;
}

.input-group .btn-outline-primary:hover,
.input-group .btn-success:hover {
    background-color: rgba(157, 0, 255, 0.1) !important;
    border-color: rgba(157, 0, 255, 0.6) !important;
    color: rgb(157, 0, 255) !important;
    transform: translateY(-2px) scale(0.95) !important;
    box-shadow: 0 4px 8px rgba(157, 0, 255, 0.3);
}

/* Authentication Pages Styling */
.auth-container {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s ease;
}

.persona-cell {
    transition: all 0.3s ease;
}

    .persona-cell:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
    }

.auth-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
}

.auth-body {
    padding: 2rem !important;
}

.auth-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.auth-subtitle {
    font-size: 1rem;
    margin-bottom: 0;
}

.auth-input {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgb(167 0 177 / 30%) !important;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.auth-input:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(157, 0, 255, 0.6) !important;
    box-shadow: 0 0 0 0.2rem rgba(157, 0, 255, 0.25) !important;
    transform: translateY(-2px);
}

.auth-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff !important;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-warn-btn {
    background: linear-gradient(135deg, #D1004B 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff !important;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    transform: translateY(-2px) scale(0.95) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
    color: #ffffff !important;
}

.auth-btn:focus {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    box-shadow: 0 0 0 0.2rem rgba(157, 0, 255, 0.25) !important;
    color: #ffffff !important;
}

.auth-warn-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #D1004B 100%) !important;
    transform: translateY(-2px) scale(0.95) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
    color: #ffffff !important;
}

.auth-warn-btn:focus {
    background: linear-gradient(135deg, #764ba2 0%, #D1004B 100%) !important;
    box-shadow: 0 0 0 0.2rem rgba(157, 0, 255, 0.25) !important;
    color: #ffffff !important;
}

.auth-links {
    margin-top: 1.5rem;
}

.auth-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0.25rem 0;
}

.auth-link:hover {
    color: #ffffff !important;
    text-decoration: none;
    transform: translateX(5px);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-check-label {
    font-size: 0.9rem;
}

.form-check-input:checked {
    background-color: rgba(157, 0, 255, 0.8) !important;
    border-color: rgba(157, 0, 255, 0.8) !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(157, 0, 255, 0.25) !important;
}

/* Mobile responsiveness for auth pages */
@media (max-width: 767.98px) {
    .auth-container {
        margin: 1rem;
    }
    
    .auth-body {
        padding: 1.5rem !important;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    .auth-input {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    
    .auth-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .auth-container {
        margin: 0.5rem;
    }
    
    .auth-body {
        padding: 1rem !important;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-input {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .auth-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Clinginess Slider Styling */
.clinginess-slider-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.clinginess-slider {
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.clinginess-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.clinginess-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.clinginess-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.clinginess-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.clinginess-labels {
    margin-top: 0.5rem;
}

.clinginess-description {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.75rem;
    border-left: 3px solid rgba(157, 0, 255, 0.6);
}

/* Persona Form Enhancements */
.form-range {
    background: transparent;
}

.form-range::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    height: 8px;
}

.form-range::-moz-range-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    height: 8px;
    border: none;
}

/* Alert styling for SMS info */
.alert-info {
    background: rgba(13, 202, 240, 0.1) !important;
    border-color: rgba(13, 202, 240, 0.3) !important;
}


/* Form section headers */
.auth-container h5 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Enhanced form text */
.form-text {
    font-size: 0.85rem;
    font-style: italic;
}

/* Select dropdown styling */
.auth-input option {
    background-color: #2c3e50;
    color: #ffffff;
}

/* Mobile responsiveness for persona form */
@media (max-width: 767.98px) {
    .clinginess-slider-container {
        padding: 1rem;
    }
    
    .clinginess-slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
    
    .clinginess-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }
    
    .auth-container h5 {
        font-size: 1.1rem;
    }
}

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

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 50px);
    }

    .message {
        max-width: 85%;
    }

    .chat-header h4 {
        font-size: 1.1rem;
    }

    @media (max-width: 768px) {
        .chatlog-bubble {
            max-width: 90%;
            font-size: 0.95rem;
        }

        .chatlog-header h4 {
            font-size: 1.1rem;
        }
    }
}

/* Manage Navigation Styling */
.manage-nav-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.manage-nav {
    gap: 0.5rem;
}

.manage-nav-link {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    position: relative !important;
    overflow: hidden !important;
}

.manage-nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.manage-nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* Individual link color themes */
.manage-nav-link[id="profile"] {
    border-left: 4px solid #667eea !important;
}

.manage-nav-link[id="profile"]:hover,
.manage-nav-link[id="profile"].active {
    border-left-color: #667eea !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(102, 126, 234, 0.1) 100%) !important;
}

.manage-nav-link[id="email"] {
    border-left: 4px solid #17a2b8 !important;
}

.manage-nav-link[id="email"]:hover,
.manage-nav-link[id="email"].active {
    border-left-color: #17a2b8 !important;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.2) 0%, rgba(23, 162, 184, 0.1) 100%) !important;
}

.manage-nav-link[id="change-password"] {
    border-left: 4px solid #28a745 !important;
}

.manage-nav-link[id="change-password"]:hover,
.manage-nav-link[id="change-password"].active {
    border-left-color: #28a745 !important;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2) 0%, rgba(40, 167, 69, 0.1) 100%) !important;
}

.manage-nav-link[id="external-login"] {
    border-left: 4px solid #ffc107 !important;
}

.manage-nav-link[id="external-login"]:hover,
.manage-nav-link[id="external-login"].active {
    border-left-color: #ffc107 !important;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 193, 7, 0.1) 100%) !important;
}

    .manage-nav-link[id="two-factor"] {
        border-left: 4px solid #6f42c1 !important;
    }

        .manage-nav-link[id="two-factor"]:hover,
        .manage-nav-link[id="two-factor"].active {
            border-left-color: #6f42c1 !important;
            background: linear-gradient(135deg, rgba(111, 66, 193, 0.2) 0%, rgba(111, 66, 193, 0.1) 100%) !important;
        }

    .manage-nav-link[id="personal-data"] {
        border-left: 4px solid #dc3545 !important;
    }

        .manage-nav-link[id="personal-data"]:hover,
        .manage-nav-link[id="personal-data"].active {
            border-left-color: #dc3545 !important;
            background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(220, 53, 69, 0.1) 100%) !important;
        }

    .manage-nav-link[id="billing"] {
        border-left: 4px solid #FFA500 !important;
    }

        .manage-nav-link[id="billing"]:hover,
        .manage-nav-link[id="billing"].active {
            border-left-color: #FFA500 !important;
            background: linear-gradient(135deg, rgba(255, 165, 0, 0.2) 0%, rgba(220, 53, 69, 0.1) 100%) !important;
        }

    .manage-nav-link[id="themes"] {
        border-left: 4px solid #FF27A5 !important;
    }

        .manage-nav-link[id="themes"]:hover,
        .manage-nav-link[id="themes"].active {
            border-left-color: #FF27A5 !important;
            background: linear-gradient( 135deg, rgba(255, 39, 165, 0.3) 0%, rgba(128, 128, 128, 0.1) 100% ) !important;
        }

/* Icon styling */
.manage-nav-link i {
    transition: transform 0.3s ease !important;
}

.manage-nav-link:hover i {
    transform: scale(1.1) !important;
}

.manage-nav-link.active i {
    transform: scale(1.1) !important;
}

/* Mobile responsiveness for manage nav */
@media (max-width: 768px) {
    .manage-nav-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .manage-nav-link {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.9rem !important;
    }
    
    .manage-nav-link i {
        font-size: 0.9rem !important;
    }
}

/* Animation for nav items */
.manage-nav-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767.98px) {
    .persona-index-header {
        padding: 1.2rem 0.5rem 1rem 0.5rem;
    }

    .persona-table-container {
        padding: 1rem 0.2rem;
    }

    .persona-table thead th, .persona-table td {
        font-size: 0.98rem;
        padding: 0.6rem 0.3rem;
    }

    .persona-actions .btn {
        min-width: 36px;
        min-height: 36px;
        font-size: 0.98rem;
    }
}

@media (max-width: 768px) {
    .plan-card {
        padding: 1.5rem;
    }

    .plan-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .plan-price {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .stat-card {
        min-height: 140px;
    }
}
.persona-index-header {
    background: rgba(255,255,255,0.10);
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.10);
    padding: 2.5rem 2rem 1.5rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    backdrop-filter: blur(8px);
}

    .persona-index-header h1 {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        letter-spacing: 1px;
    }
.manage-nav-item:nth-child(1) { animation-delay: 0.1s; }
.manage-nav-item:nth-child(2) { animation-delay: 0.2s; }
.manage-nav-item:nth-child(3) { animation-delay: 0.3s; }
.manage-nav-item:nth-child(4) { animation-delay: 0.4s; }
.manage-nav-item:nth-child(5) { animation-delay: 0.5s; }
.manage-nav-item:nth-child(6) { animation-delay: 0.6s; }

/* Chat page mobile optimizations */
@media (max-width: 767.98px) {
    /* Full screen chat experience */
    body.chat-page {
        overflow: hidden;
    }
    
    /* Hide footer on chat page for mobile */
    body.chat-page footer {
        display: none !important;
    }
    
    /* Hide sidebar completely on chat page */
        body.chat-page .sidebar {
            display: none !important;
            transform: translateX(-500%) !important;
        }
    
    /* Hide sidebar toggle on chat page */
    body.chat-page .sidebar-toggle-bar {
        display: none !important;
        width: 0 !important;
        left: -1000px !important;
    }
    
    /* Hide sidebar overlay on chat page */
    body.chat-page .sidebar-overlay {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Ensure main content takes full height and width on chat page */
    body.chat-page #mainContent {
        margin-left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    body.chat-page main {
        padding: 0 !important;
        margin: 0 !important;
        height: 100% !important;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    /* Ensure chat container takes full viewport */
    body.chat-page .chat-container {
        height: 100vh !important;
        height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        border-radius: 0 !important;
        margin: 0 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 1000 !important;
    }
}

/* Landscape orientation for chat page */
@media (max-width: 767.98px) and (orientation: landscape) {
    body.chat-page .chat-header {
        padding: 0.25rem 0.5rem !important;
    }
    
    body.chat-page .chat-input {
        padding: 0.25rem 0.5rem !important;
    }
    
    body.chat-page .chat-body {
        padding: 0.25rem !important;
    }
}

/* High DPI displays for chat */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .chat-container {
        border-width: 0.5px;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .chat-container {
        height: 100vh !important;
        height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 1000 !important;
        padding-top: env(safe-area-inset-top) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
        transform: translateZ(0) !important; /* Force hardware acceleration */
        will-change: transform !important; /* Optimize for animations */
    }

    /* Ensure no margins or padding interfere */
    body.chat-page {
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        height: 100vh !important;
    }

    body.chat-page main {
        margin: 0 !important;
        padding: 0 !important;
    }

    body.chat-page .container-fluid {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Hide footer on chat page */
    body.chat-page footer {
        display: none !important;
    }
}

    @media (max-width: 767.98px) {
        .chat-body {
            padding: 0.5rem;
        }
    }

    @media (max-width: 767.98px) {
        .chat-messages {
            gap: 0.5rem;
        }
    }

@media (max-width: 767.98px) {
    .message-row {
        gap: 0.25rem;
    }
}

@media (max-width: 767.98px) {
    .message {
        max-width: 90%;
        padding: 0.5rem 0.75rem;
        border-radius: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .message-content p {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .message-content small {
        font-size: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .chat-input-field {
        padding: 0.5rem 1rem !important;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 1.25rem !important;
        transform: translateZ(0) !important; /* Force hardware acceleration */
        will-change: height !important; /* Optimize for height changes */
    }
}

@media (max-width: 767.98px) {
    .typing-indicator {
        padding: 0.5rem 0.75rem;
        border-radius: 0.75rem;
        min-width: 50px;
    }
}

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

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile-specific improvements */
@media (max-width: 767.98px) {
    /* Better touch targets */
    .btn {
        min-height: 30px;
        min-width: 30px;
    }
    
    /* Prevent text selection on messages */
    .message {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Allow text selection on input */
    .chat-input-field {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 767.98px) and (orientation: landscape) {
    .chat-container {
        height: 100vh !important;
        height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 1000 !important;
    }

    .chat-header {
        padding: 0.5rem 0.75rem !important;
    }

    .chat-input {
        padding: 0.5rem 0.75rem !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .message {
        border: 0.5px solid rgba(255, 255, 255, 0.1);
    }
}

/* Base chat container styling */
.chat-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Safe area support for notched devices */
@supports (padding: max(0px)) {
    .chat-container {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Mobile optimizations for persona\index */
@media (max-width: 768px) {
    .persona-cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .persona-card {
        padding: 1rem;
    }

    .persona-name {
        font-size: 1.2rem;
    }

    .persona-actions {
        flex-direction: column;
    }

    .persona-actions .btn {
        max-width: none !important;
    }

    .pagination-container {
        flex-direction: column;
        gap: 0.5rem;
    }

}

/* CRITICAL: Chat page full-screen override - must be at the end for highest priority */

body.chat-page {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height for mobile */
    width: 100vw !important;
    position: relative !important;
}

body.chat-page * {
    box-sizing: border-box !important;
}

body.chat-page #mainContent {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

body.chat-page main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    position: relative !important;
}

body.chat-page .container-fluid {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    position: relative !important;
}

body.chat-page .row {
    margin: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    --bs-gutter-x: 0 !important;
    --bs-gutter-y: 0 !important;
}

body.chat-page .col-12 {
    padding: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
}

body.chat-page .chat-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    z-index: 9999 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

body.chat-page footer {
    display: none !important;
}

body.chat-page .sidebar,
body.chat-page #sidebar {
    display: none !important;
}

body.chat-page .sidebar-toggle-bar,
body.chat-page #sidebarToggle {
    display: none !important;
}

body.chat-page .sidebar-overlay,
body.chat-page #sidebarOverlay {
    display: none !important;
}

/* Ensure chat components take full space */
body.chat-page .chat-header {
    flex-shrink: 0 !important;
    width: 100% !important;
}

body.chat-page .chat-body {
    flex: 1 !important;
    overflow-y: auto !important;
    width: 100% !important;
    height: auto !important;
}

body.chat-page .chat-input {
    flex-shrink: 0 !important;
    width: 100% !important;
}

/* Mobile-specific adjustments using dvh for dynamic viewport */
@media (max-width: 768px) {
    body.chat-page .chat-container {
        height: 100dvh !important;
        padding-top: env(safe-area-inset-top) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
        padding-left: env(safe-area-inset-left) !important;
        padding-right: env(safe-area-inset-right) !important;
    }
    
    body.chat-page #mainContent,
    body.chat-page main,
    body.chat-page .container-fluid,
    body.chat-page .row,
    body.chat-page .col-12 {
        height: 100dvh !important;
    }
}

/* Desktop specific fixes */
@media (min-width: 768px) {
    #installPrompt {
        width: 400px !important;
        max-width: 400px !important;
        max-height: 200px !important
    }
}

/* Mobile specific fixes */
@media (max-width: 767px) {
    #installPrompt {
        width: 90% !important;
        max-width: 350px !important;
    }
}

@keyframes pulse-purple {
    0% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7); /* Vibrant purple */
    }

    70% {
        box-shadow: 0 0 0 10px rgba(168, 85, 247, 0); /* Fade out */
    }

    100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
    }
}

    @media (max-width: 768px) {
        .hero-title {
            font-size: 2.5rem;
        }
    
        .section-title {
            font-size: 2rem;
        }
    
        .cta-title {
            font-size: 2rem;
        }
    
        .pricing-card.featured {
            transform: none;
        }
    }

/* Theme-Aware Chat Interface */
[data-theme="light"] .chat-body {
    background: #f0f0f0 !important; /* Light grey for light mode */
}

[data-theme="light"] .chat-header {
    background: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2) !important;
}

[data-theme="light"] .chat-input {
    background: rgba(255, 255, 255, 0.1) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.2) !important;
}

[data-theme="light"] .ai-message {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%) !important; /* Light blue gradient for AI in light mode */
    color: #1a237e !important; /* Dark blue text for contrast */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .user-message {
    background: linear-gradient(135deg, #dcedc8 0%, #c5e1a5 100%) !important; /* Light green gradient for user in light mode */
    color: #2e7d32 !important; /* Dark green text for contrast */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .chat-input-field {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    color: #495057 !important;
}

[data-theme="light"] .chat-input-field:focus {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: #666666 !important;
    color: #212529 !important;
}

[data-theme="light"] .chat-input-field::placeholder {
    color: rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .chat-body {
    background: #000000 !important; /* Black for dark mode */
}

[data-theme="dark"] .chat-header {
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .chat-input {
    background: rgba(0, 0, 0, 0.3) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .ai-message {
    background: linear-gradient(to right, #424242 0%, #757575 100%) !important; /* Dark grey on left to lighter grey on right for AI */
    color: #ffffff !important; /* White text */
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .user-message {
    color: #ffffff !important; /* White text */
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15) !important;
}

[data-theme="default"] .chat-body {
    background: rgba(26, 9, 51, 0.95) !important; /* Vapor purple background */
}

[data-theme="default"] .chat-header {
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="default"] .chat-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="default"] .chat-input-field {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

[data-theme="default"] .chat-input-field:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #667eea !important;
    color: white !important;
}

/* Ensure dropdown menus have proper backgrounds in themes */
[data-theme="dark"] .dropdown-menu {
    box-shadow: 0 0 2rem rgba(125, 85, 199, 0.4), 0 0 8rem rgba(125, 85, 199, 0.3) !important;
}

[data-theme="light"] .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.2) !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .landing-header .navbar-collapse {
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        border-radius: 10px;
        margin-top: 1rem;
        padding: 1rem;
    }

    .landing-header .nav-link {
        margin: 0.2rem 0;
        text-align: center;
    }
}

/* Map ASP.NET MVC validation to Bootstrap validation styles */
.input-validation-error {
    border-color: #dc3545 !important; /* Bootstrap danger color */
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right calc(0.375em + 0.1875rem) center !important;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
    padding-right: calc(1.5em + 0.75rem) !important;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
