/* ============================================
   MODERN ADMIN PANEL DESIGN - TOTEM VPN
   Primary Color: #00A0FF
   Secondary Color: #8E08FC
   ============================================ */

/* CSS Variables for Easy Color Management */
:root {
    --primary-color: #00A0FF;
    --secondary-color: #8E08FC;
    --primary-rgb: 0, 160, 255;
    --secondary-rgb: 142, 8, 252;
    --primary-dark: #0088d4;
    --primary-light: #33b3ff;
    --secondary-dark: #7506d4;
    --secondary-light: #a533ff;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-primary-soft: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--secondary-rgb), 0.1) 100%);
    --sidebar-bg: #1a1d29;
    --sidebar-hover: #242836;
    --card-shadow: 0 8px 25px rgba(0, 160, 255, 0.15);
    --card-shadow-hover: 0 12px 35px rgba(0, 160, 255, 0.25);
}

/* Modern Sidebar Styling */
.leftside-menu.vpn-leftside-menu {
    background: var(--sidebar-bg) !important;
    border-right: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.vpn-side-nav .side-nav-title.vpn-side-nav-title {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 25px;
    margin-bottom: 15px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    padding-bottom: 8px;
}

.vpn-side-nav .side-nav-link.vpn-sidebar-link {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 12px 20px;
    margin: 2px 10px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

/* Active/Current Page State */
.vpn-side-nav .side-nav-link.vpn-sidebar-link.active,
.vpn-side-nav .side-nav-item.menuitem-active > .vpn-sidebar-link {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
    border: 2px solid rgba(var(--primary-rgb), 0.3) !important;
    border-radius: 12px !important;
    transform: translateX(5px);
}

/* Hover State */
.vpn-side-nav .side-nav-link.vpn-sidebar-link:hover {
    background: var(--gradient-primary) !important;
    color: white !important;
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
    border: 2px solid rgba(var(--primary-rgb), 0.2) !important;
    border-radius: 12px !important;
}

/* Click/Focus State */
.vpn-side-nav .side-nav-link.vpn-sidebar-link:focus,
.vpn-side-nav .side-nav-link.vpn-sidebar-link:active {
    background: var(--gradient-primary) !important;
    color: white !important;
    transform: scale(0.98) translateX(5px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.5) !important;
    border: 2px solid var(--primary-color) !important;
    border-radius: 12px !important;
    outline: none !important;
}

/* Ripple Effect on Click */
.vpn-side-nav .side-nav-link.vpn-sidebar-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
    opacity: 0;
}

.vpn-side-nav .side-nav-link.vpn-sidebar-link:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: width 0.3s ease, height 0.3s ease, opacity 0.1s ease;
}

/* Current Page Indicator */
.vpn-side-nav .side-nav-item.menuitem-active .vpn-sidebar-link::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 10%;
    width: 4px;
    height: 80%;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
    animation: pulse 2s infinite;
}

.vpn-side-nav .side-nav-link.vpn-sidebar-link iconify-icon {
    margin-right: 12px;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.vpn-side-nav .side-nav-link.vpn-sidebar-link:hover iconify-icon {
    transform: scale(1.1);
}

/* Modern Navbar Styling */
.navbar-custom {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.topbar-menu .nav-link {
    color: var(--primary-color) !important;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.topbar-menu .nav-link:hover {
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-2px);
}

/* Modern Card Design */
.card {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: var(--card-shadow) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover) !important;
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    padding: 20px 25px 15px;
}

.card-body {
    padding: 25px;
}

/* Modern Statistics Cards */
.card.-info,
.card.-primary,
.card.-success,
.card.-warning {
    position: relative;
    overflow: hidden;
}

.card.-info::before {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0088d4 100%);
}

.card.-primary::before {
    background: var(--gradient-primary);
}

.card.-success::before {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.card.-warning::before {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Modern Buttons */
.btn {
    border-radius: 12px !important;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::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;
}

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

.btn-primary,
[style*="background: #00417B"] {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover,
[style*="background: #00417B"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

/* Modern Progress Bars */
.progress {
    height: 8px !important;
    border-radius: 10px !important;
    background-color: rgba(var(--primary-rgb), 0.1) !important;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-primary) !important;
    border-radius: 10px !important;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 30px;
    }
}

/* Modern Badges */
.badge {
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-weight: 500 !important;
    font-size: 11px !important;
    letter-spacing: 0.5px;
}

/* Color Updates */
[style*="color: #00417B"] {
    color: var(--primary-color) !important;
}

[style*="background: #00417B"] {
    background: var(--gradient-primary) !important;
}

[style*="border-left: 4px solid #00417B"] {
    border-left: 4px solid var(--primary-color) !important;
}

[style*="background: rgba(0, 65, 123, 0.1)"] {
    background: rgba(var(--primary-rgb), 0.1) !important;
}

/* Modern Alert Styling */
.alert {
    border: none !important;
    border-radius: 12px !important;
    border-left: 4px solid var(--primary-color) !important;
    background: rgba(var(--primary-rgb), 0.05) !important;
    color: var(--primary-color) !important;
}

/* Modern Avatar Styling */
.avatar-sm, .avatar-xs {
    border-radius: 12px !important;
    background: var(--gradient-primary) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s ease;
}

.avatar-sm:hover, .avatar-xs:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

/* User Card Headers */
.user-card-header,
.user-card-email {
    /* Ensure the container doesn't get too wide */
    max-width: 100%;
    overflow: hidden;
}

}

/* Dark Mode Modern Styling */
html[data-bs-theme="dark"] {
    --sidebar-bg: #0f1419;
    --sidebar-hover: #1a1f2e;
    --card-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 12px 35px rgba(0, 0, 0, 0.4);
}

html[data-bs-theme="dark"] .navbar-custom {
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.95) 0%, rgba(26, 31, 46, 0.98) 100%) !important;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.2);
}

html[data-bs-theme="dark"] .card {
    background: linear-gradient(135deg, #1a1f2e 0%, #1e2330 100%) !important;
    box-shadow: var(--card-shadow) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.1) !important;
}

html[data-bs-theme="dark"] .card-header {
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.2) !important;
}

/* Modern Input Styling */
.form-control {
    border: 2px solid rgba(var(--primary-rgb), 0.1) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
    background: rgba(255, 255, 255, 0.8) !important;
}

.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1) !important;
    background: white !important;
    transform: translateY(-1px);
}

html[data-bs-theme="dark"] .form-control {
    background: rgba(26, 31, 46, 0.8) !important;
    border-color: rgba(var(--primary-rgb), 0.2) !important;
    color: white !important;
}

html[data-bs-theme="dark"] .form-control:focus {
    background: rgba(26, 31, 46, 1) !important;
}

/* Modern Dropdown Styling */
.dropdown-menu {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(20px);
    padding: 8px !important;
}

.dropdown-item {
    border-radius: 8px !important;
    padding: 10px 15px !important;
    margin: 2px 0 !important;
    transition: all 0.3s ease !important;
}

.dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.1) !important;
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

/* Modern Table Styling */
.table {
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

.table thead th {
    background: var(--gradient-primary-soft) !important;
    border: none !important;
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 1px !important;
    padding: 15px !important;
}

.table tbody tr {
    border: none !important;
    transition: all 0.3s ease !important;
}

.table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.05) !important;
    transform: scale(1.01);
}

.table tbody td {
    border: none !important;
    padding: 15px !important;
    vertical-align: middle !important;
}

html[data-bs-theme="dark"] .table thead th {
    background: rgba(var(--primary-rgb), 0.1) !important;
    color: var(--primary-light) !important;
}

html[data-bs-theme="dark"] .table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.1) !important;
}

/* Modern Modal Styling */
.modal-content {
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(20px);
}

.modal-header {
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    border-radius: 20px 20px 0 0 !important;
    background: var(--gradient-primary-soft) !important;
    padding: 25px !important;
}

.modal-body {
    padding: 30px !important;
}

.modal-footer {
    border-top: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    border-radius: 0 0 20px 20px !important;
    padding: 20px 30px !important;
}

/* Enhanced Notification Styling */
.notify-item {
    border-radius: 12px !important;
    margin: 4px 8px !important;
    padding: 12px !important;
    transition: all 0.3s ease !important;
}

.notify-item:hover {
    background: rgba(var(--primary-rgb), 0.05) !important;
    transform: translateX(5px);
}

.notify-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 12px !important;
}

/* Modern Search Bar */
.form-control[type="search"] {
    background: rgba(var(--primary-rgb), 0.05) !important;
    border: 2px solid transparent !important;
    padding-left: 45px !important;
    position: relative;
}

.form-control[type="search"]:focus {
    background: white !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1) !important;
}

/* Loading States */
.btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.spinner-border {
    width: 1rem !important;
    height: 1rem !important;
}

/* Modern Toast Notifications */
.toast {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(20px);
}

.toast-header {
    background: var(--gradient-primary-soft) !important;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    border-radius: 12px 12px 0 0 !important;
    color: var(--primary-color) !important;
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .card {
        margin-bottom: 15px !important;
        border-radius: 12px !important;
    }
    
    .card-body {
        padding: 20px !important;
    }
    
    .btn {
        padding: 8px 16px !important;
        font-size: 14px !important;
    }
    
    .vpn-side-nav .side-nav-link.vpn-sidebar-link {
        margin: 2px 5px !important;
        padding: 10px 15px !important;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 15px !important;
    }
    
    .modal-body {
        padding: 20px !important;
    }
    
    .modal-header {
        padding: 20px !important;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.user-card-header .user-card-name {
    display: inline-block;
    max-width: 320px;
    /* Adjust as needed or use a responsive unit */
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card-email {
    display: inline-block;
    max-width: 250px;
    /* Adjust as needed */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

@media (max-width: 576px) {

    .user-card-header .user-card-name,
    .user-card-email {
        max-width: 160px;
    }
}

.plan-billing,
.plan-dates {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-bs-theme="light"] .plan-box {
    background: #f4f9ff;
    border-radius: 0.65rem;
    border: 1px solid #e3ecfa;
}

[data-bs-theme="light"] .plan-title {
    color: #212529;
}

[data-bs-theme="light"] .plan-billing,
[data-bs-theme="light"] .plan-dates {
    color: #6c757d !important;
}

[data-bs-theme="light"] .plan-price {
    color: #222 !important;
}

/* Dark mode styles */
[data-bs-theme="dark"] .plan-box {
    background: #18202c;
    border-radius: 0.65rem;
    border: 1px solid #25304b;
}

[data-bs-theme="dark"] .plan-title {
    color: #fff;
}

[data-bs-theme="dark"] .plan-billing,
[data-bs-theme="dark"] .plan-dates {
    color: #a6b1c3 !important;
}

[data-bs-theme="dark"] .plan-price {
    color: #fff !important;
}

.rounded-card-header {
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
}

.tab-link {
    cursor: pointer !important;
}

.tab-link.active {
    cursor: default !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

.dropdown-card {
    max-height: 250px;
    overflow-y: auto;
}

/*Chat box*/

.chat-wrapper {

    width: auto;

    border-radius: 0.25rem;

    box-shadow: 0 0.1rem 0.7rem rgba(0, 0, 0, .10);

}

.chat-content {

    padding: 15px 15px 15px 15px;

}

.chat-header {

    height: 70px;
    padding: 15px;

    border-top-right-radius: 0.25rem;

    z-index: 1;

}

.chat-footer {

    left: 0px;

    right: 0;

    bottom: 0;

    padding: 15px;

    border-radius: 20px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;

}

.chat-footer textarea {
    resize: none;
}

.chat-footer-menu a {

    display: inline-block;

    width: 40px;

    height: 40px;

    line-height: 40px;

    font-size: 18px;

    color: #ffffff;

    text-align: center;

    border-radius: 50%;

    margin: 3px;

    background-color: rgb(255 255 255 / 14%);

    border: 1px solid rgb(255 255 255 / 20%);

}

.chat-tab-menu li a.nav-link {

    padding: .3rem 0.2rem;

    line-height: 1.2;

    color: rgb(255 255 255 / 63%);

}

.chat-tab-menu .nav-pills .nav-link.active,

.chat-tab-menu .nav-pills .show>.nav-link {

    color: #ffffff;

    background-color: rgb(255 255 255 / 0%);

}

.chat-title {

    font-size: 16px;
    text-transform: capitalize;

}

.chat-msg {

    font-size: 14px;

    color: rgb(255 255 255 / 63%);

}

.chat-time {

    font-size: 13px;

}

.chat-top-header-menu button {
    line-height: 40px;
    font-size: 16px;
    text-align: center;
    border-radius: 12px;
}

.chat-content {

    width: auto;
    height: 400px;
    overflow-y: scroll;

    scroll-behavior: smooth;

}

.chat-content-leftside .chat-left-msg {

    width: fit-content;

    padding: 0.80rem;

    border-radius: 12px;

    max-width: 480px;

    text-align: left;

    border-top-left-radius: 0;

}

.chat-content-rightside .chat-right-msg {

    width: fit-content;

    padding: 0.80rem;

    border-radius: 12px;

    float: right;

    max-width: 480px;

    text-align: left;

    border-bottom-right-radius: 0;

}

.btn-rounded {
    border-radius: 50% !important;
    padding: 5px;
}

.transparent {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
}

.dropdown-menu.chat-action {
    min-width: 6rem;
}


/* Modern ChatBox Footer */
.chat-footer {
    border-top: 1px solid #86898b;
    padding: 16px 20px;
    background: white;
}

.image-attachments {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.image-attachments .actions {
    display: flex;
    gap: 12px;
}

.image-attachments a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.image-attachments a:hover {
    text-decoration: underline;
}

.image-attachments .text-danger {
    color: #dc3545 !important;
}

.input-container {
    position: relative;
    background: #e9e9e9;
    border-radius: 24px;
    padding: 4px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.input-container:focus-within {
    border-color: #007bff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.message-input {
    border: none !important;
    background: transparent !important;
    resize: none;
    outline: none !important;
    box-shadow: none !important;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.4;
    width: 100%;
    max-height: 120px;
    min-height: 44px;
    overflow-y: auto;
    font-family: inherit;
}

.message-input::placeholder {
    color: #6c757d;
}

.message-input::-webkit-scrollbar {
    width: 4px;
}

.message-input::-webkit-scrollbar-track {
    background: transparent;
}

.message-input::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 2px;
}

.message-input::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.input-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 12px 12px 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.send-btn {
    background: #007bff !important;
    color: white !important;
}

.send-btn:hover {
    background: #0056b3 !important;
}

.send-btn:disabled {
    background: #dee2e6 !important;
    color: #6c757d !important;
    cursor: not-allowed;
}

.spinner-border-sm {
    width: 16px;
    height: 16px;
}

/* Dark Mode Styles */
html[data-bs-theme=dark] .chat-footer {
    border-top: 1px solid #495057;
    background: #212529;
}

html[data-bs-theme=dark] .image-attachments {
    background: #343a40;
    color: #adb5bd;
}

html[data-bs-theme=dark] .image-attachments a {
    color: #6ea8fe;
}

html[data-bs-theme=dark] .image-attachments .text-danger {
    color: #ea868f !important;
}

html[data-bs-theme=dark] .input-container {
    background: #343a40;
    border-color: transparent;
}

html[data-bs-theme=dark] .input-container:focus-within {
    border-color: #6ea8fe;
    background: #495057;
    box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.15);
}

html[data-bs-theme=dark] .message-input {
    color: #f8f9fa;
}

html[data-bs-theme=dark] .message-input::placeholder {
    color: #adb5bd;
}

html[data-bs-theme=dark] .message-input::-webkit-scrollbar-thumb {
    background: #6c757d;
}

html[data-bs-theme=dark] .message-input::-webkit-scrollbar-thumb:hover {
    background: #868e96;
}

html[data-bs-theme=dark] .action-btn {
    color: #adb5bd;
}

html[data-bs-theme=dark] .action-btn:hover {
    background: #495057;
    color: #f8f9fa;
}

html[data-bs-theme=dark] .send-btn {
    background: #6ea8fe !important;
    color: #000 !important;
}

html[data-bs-theme=dark] .send-btn:hover {
    background: #3d8bfd !important;
    color: #fff !important;
}

html[data-bs-theme=dark] .send-btn:disabled {
    background: #495057 !important;
    color: #6c757d !important;
}

/* Image Previews Container */
.image-previews-container {
    margin-bottom: 16px;
}

.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.image-preview-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
}

.image-preview-item:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #dc3545;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.remove-image-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.image-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #6c757d;
}

.image-count {
    display: flex;
    align-items: center;
    gap: 6px;
}

.clear-all-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.clear-all-btn:hover {
    background: rgba(220, 53, 69, 0.1);
}

html[data-bs-theme=dark] .image-preview-item {
    background: #343a40;
    border-color: #495057;
}

html[data-bs-theme=dark] .image-preview-item:hover {
    border-color: #6ea8fe;
}

html[data-bs-theme=dark] .remove-image-btn {
    background: #ea868f;
}

html[data-bs-theme=dark] .remove-image-btn:hover {
    background: #dc3545;
}

html[data-bs-theme=dark] .image-info {
    background: #343a40;
    color: #adb5bd;
}

html[data-bs-theme=dark] .clear-all-btn {
    color: #ea868f;
}

html[data-bs-theme=dark] .clear-all-btn:hover {
    background: rgba(234, 134, 143, 0.2);
}

/* Alpine-friendly visibility */
[x-cloak] {
    display: none !important;
}

.image-preview-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

/* Reduce image size so it's not too big */
.preview-full {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Content wrapper */
.image-preview-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Close button inside modal */
.close-preview-btn {
    position: absolute;
    top: -45px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
}

.close-preview-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Navigation buttons and counter */
.preview-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(8px);
}

.nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-counter {
    color: white;
    font-size: 14px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

html[data-bs-theme=dark] .btn.active {
    color: #000;
}

.ql-editor {
    max-height: 250px;
}

.scrollable {
    max-height: 250px;
    overflow-y: auto;
}

/* Custom Stylish Scrollbars */
/* Webkit browsers (Chrome, Safari, Edge) */
.scrollable::-webkit-scrollbar,
.users-list::-webkit-scrollbar,
.chat-content::-webkit-scrollbar,
.dropdown-card::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.scrollable::-webkit-scrollbar-track,
.users-list::-webkit-scrollbar-track,
.chat-content::-webkit-scrollbar-track,
.dropdown-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin: 2px;
}

.scrollable::-webkit-scrollbar-thumb,
.users-list::-webkit-scrollbar-thumb,
.chat-content::-webkit-scrollbar-thumb,
.dropdown-card::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.scrollable::-webkit-scrollbar-thumb:hover,
.users-list::-webkit-scrollbar-thumb:hover,
.chat-content::-webkit-scrollbar-thumb:hover,
.dropdown-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.scrollable::-webkit-scrollbar-corner,
.users-list::-webkit-scrollbar-corner,
.chat-content::-webkit-scrollbar-corner,
.dropdown-card::-webkit-scrollbar-corner {
    background: transparent;
}

/* Dark mode scrollbars */
html[data-bs-theme="dark"] .scrollable::-webkit-scrollbar-track,
html[data-bs-theme="dark"] .users-list::-webkit-scrollbar-track,
html[data-bs-theme="dark"] .chat-content::-webkit-scrollbar-track,
html[data-bs-theme="dark"] .dropdown-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .scrollable::-webkit-scrollbar-thumb,
html[data-bs-theme="dark"] .users-list::-webkit-scrollbar-thumb,
html[data-bs-theme="dark"] .chat-content::-webkit-scrollbar-thumb,
html[data-bs-theme="dark"] .dropdown-card::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #6ea8fe, #3d8bfd);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] .scrollable::-webkit-scrollbar-thumb:hover,
html[data-bs-theme="dark"] .users-list::-webkit-scrollbar-thumb:hover,
html[data-bs-theme="dark"] .chat-content::-webkit-scrollbar-thumb:hover,
html[data-bs-theme="dark"] .dropdown-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #3d8bfd, #0d6efd);
}

/* Firefox scrollbars */
.scrollable,
.users-list,
.chat-content,
.dropdown-card {
    scrollbar-width: thin;
    scrollbar-color: #007bff rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .scrollable,
[data-bs-theme="dark"] .users-list,
[data-bs-theme="dark"] .chat-content,
[data-bs-theme="dark"] .dropdown-card {
    scrollbar-color: #6ea8fe rgba(255, 255, 255, 0.08);
}

/* Smooth scrolling behavior */
.scrollable,
.users-list,
.chat-content,
.dropdown-card {
    scroll-behavior: smooth;
}

/* Alternative colorful scrollbar styles */
.scrollable.rainbow::-webkit-scrollbar-thumb,
.users-list.rainbow::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
    background-size: 300% 300%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Success/Error themed scrollbars */
.scrollable.success::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.scrollable.warning::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
}

.scrollable.danger::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
}

/* ============================================
   MODERN LOGIN CARD DESIGN - TOTEM VPN
   ============================================ */

/* Modern Login Card */
.modern-login-card {
    border-radius: 20px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 10px 20px rgba(var(--primary-rgb), 0.15),
        0 5px 10px rgba(var(--secondary-rgb), 0.1) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-login-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.15),
        0 16px 32px rgba(var(--primary-rgb), 0.2),
        0 8px 16px rgba(var(--secondary-rgb), 0.15) !important;
}

/* Card Gradient Accent */
.login-card-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    z-index: 1;
}

/* Modern Brand Section */
.modern-brand-section {
    background: var(--gradient-primary-soft) !important;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    position: relative;
    z-index: 2;
}

.brand-logo-wrapper {
    display: inline-block;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    margin-bottom: 16px;
    border: 2px solid rgba(var(--primary-rgb), 0.1);
    transition: all 0.3s ease;
}

.brand-logo-wrapper:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(var(--primary-rgb), 0.2);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.15);
}

.modern-auth-title {
    color: var(--primary-color) !important;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Form Section */
.modern-form-section {
    background: rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 2;
}

.modern-subtitle {
    font-size: 15px !important;
    color: #64748b !important;
    font-weight: 500;
}

/* Modern Labels */
.modern-label {
    display: flex !important;
    align-items: center !important;
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
}

.label-icon {
    color: var(--primary-color);
    font-size: 16px;
}

/* Modern Inputs */
.modern-input {
    border: 2px solid rgba(var(--primary-rgb), 0.15) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.modern-input:focus {
    border-color: var(--primary-color) !important;
    background: rgba(255, 255, 255, 1) !important;
    box-shadow: 
        0 0 0 4px rgba(var(--primary-rgb), 0.1),
        0 4px 12px rgba(var(--primary-rgb), 0.15) !important;
    transform: translateY(-2px);
}

/* Modern Input Group */
.modern-input-group {
    position: relative;
}

.modern-input-addon {
    border: 2px solid rgba(var(--primary-rgb), 0.15) !important;
    border-left: none !important;
    background: rgba(var(--primary-rgb), 0.05) !important;
    border-radius: 0 12px 12px 0 !important;
    transition: all 0.3s ease !important;
}

.modern-input-group:focus-within .modern-input-addon {
    border-color: var(--primary-color) !important;
    background: rgba(var(--primary-rgb), 0.1) !important;
}

.modern-input-addon:hover {
    background: rgba(var(--primary-rgb), 0.1) !important;
    color: var(--primary-color) !important;
}

/* Modern Checkbox */
.modern-checkbox-container {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 8px 0 !important;
}

.modern-checkbox {
    width: 18px !important;
    height: 18px !important;
    border-radius: 6px !important;
    border: 2px solid rgba(var(--primary-rgb), 0.3) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
}

.modern-checkbox:checked {
    background: var(--gradient-primary) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3) !important;
}

.modern-checkbox-label {
    color: #475569 !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    margin: 0 !important;
    cursor: pointer !important;
}

/* Modern Login Button */
.modern-login-button {
    background: var(--gradient-primary) !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: white !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3) !important;
}

.btn-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.btn-icon {
    font-size: 18px !important;
    transition: transform 0.3s ease;
}

.btn-shimmer {
    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.6s ease;
}

.modern-login-button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 32px rgba(var(--primary-rgb), 0.4) !important;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%) !important;
}

.modern-login-button:hover .btn-shimmer {
    left: 100%;
}

.modern-login-button:hover .btn-icon {
    transform: translateX(3px);
}

.modern-login-button:active {
    transform: translateY(-1px) !important;
    transition: transform 0.1s ease !important;
}

/* Error Messages Enhancement */
.text-danger {
    font-size: 13px !important;
    font-weight: 500 !important;
    margin-top: 6px !important;
}

/* Dark Mode Support for Login Card */
html[data-bs-theme="dark"] .modern-login-card {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-bs-theme="dark"] .modern-brand-section {
    background: rgba(var(--primary-rgb), 0.1) !important;
    border-bottom-color: rgba(var(--primary-rgb), 0.2) !important;
}

html[data-bs-theme="dark"] .brand-logo-wrapper {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(var(--primary-rgb), 0.2);
}

html[data-bs-theme="dark"] .modern-form-section {
    background: rgba(15, 23, 42, 0.5);
}

html[data-bs-theme="dark"] .modern-subtitle {
    color: #94a3b8 !important;
}

html[data-bs-theme="dark"] .modern-input {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(var(--primary-rgb), 0.3) !important;
    color: white !important;
}

html[data-bs-theme="dark"] .modern-input:focus {
    background: rgba(15, 23, 42, 1) !important;
}

html[data-bs-theme="dark"] .modern-input-addon {
    background: rgba(var(--primary-rgb), 0.1) !important;
    border-color: rgba(var(--primary-rgb), 0.3) !important;
}

html[data-bs-theme="dark"] .modern-checkbox {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(var(--primary-rgb), 0.4) !important;
}

html[data-bs-theme="dark"] .modern-checkbox-label {
    color: #e2e8f0 !important;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .modern-login-card {
        border-radius: 16px !important;
        margin: 16px !important;
    }
    
    .modern-auth-title {
        font-size: 1.5rem;
    }
    
    .modern-input {
        padding: 10px 14px !important;
        font-size: 14px !important;
    }
    
    .modern-login-button {
        padding: 12px 20px !important;
        font-size: 15px !important;
    }
}