
:root {
    --primary-color: blue;
    --primary-color-light: #66a6ff;
    --primary-color-dark: #3a8bfd;

    --success-color: #90ee90;
   --success-color-light: green;
    --success-color-dark: #006400;

    --error-color:#FF0000;
    --error-color-light: #FF0000;
    --error-color-dark: #8b0000;

    --light-color:#ffffff;

    --secondary-color: #4C1D95;
    --bg-dark: #111827;
    --sidebar-dark: #1f2937;
    --border-dark: #374151;
}



body{   background: url('../../static/img/auth/auth.jfif') no-repeat center center;
    background-size: cover;
    background-position: center;

}

.truncate-text {
    white-space: nowrap;      /* Prevents text from wrapping to the next line */
    overflow: hidden;         /* Hides any content that overflows the element's box */
    text-overflow: ellipsis;  /* Displays an ellipsis (...) for clipped text */
}
.text-success{
    color: var(--success-color-light) !important;
}
.bg-primary{
    background-color: var(--primary-color) !important;
}
.bg-success{
    background-color: var(--success-color) !important;
}
.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary{
    background-color: var(--primary-color) !important;
    color: var(--light-color) !important;
    font-weight: bold !important;
}

.btn-primary:hover{
    background-color: var(--success-color-light) !important;
    color: var(--light-color) !important;
    font-weight: bold !important;
}

.btn-outline-primary{
    color: var(--primary-color) !important;
    font-weight: bold !important;
}
.btn-outline-primary:hover{
    background-color: var(--success-color-light) !important;
    color: var(--light-color) !important;
    font-weight: bold !important;
}
.nav-item{
    color: var(--light-color) !important;
}
body {
    background: url('../../static/img/auth/auth.jfif') no-repeat center center;
    display: block;          /* if you need flex layout */
    align-items: center;    /* vertical alignment */
    justify-content: center; /* horizontal alignment */

    background-size: cover;
    background-position: center;
}

.btn-success{background:var(--success-color) !important;}

/* Sidebar Logic */
#sidebar {

    width: 280px ;
    transition: transform 0.3s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    height: 100vh;


}

@media (max-width: 767px) {
    #sidebar {
        position: fixed;
        height: 100vh;
        transform: translateX(-100%);
        background-color: white;
        padding-left: 10px;
    }
    #sidebar.show {
        transform: translateX(0);
    }
}

/* Dark Mode Overrides */
.dark body { background-color: var(--bg-dark); color: #f3f4f6; }
.dark #sidebar { background-color: var(--sidebar-dark); border-color: var(--border-dark) !important; }
.dark header, .dark #input-area { border-color: var(--border-dark) !important; }
.dark .card { background-color: #1f2937; border-color: var(--border-dark); color: #e5e7eb; }
.dark .bg-light { background-color: #374151 !important; color: white !important; }

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--light-color);
}
.btn-primary-custom:hover {
    background:var(--success-color);
}

.typing::after {
    content: '.';
    display: inline-block;
    animation: dots 1s steps(3, end) infinite;
}
@keyframes dots {
    0% { content: '.'; } 33% { content: '..'; } 66% { content: '...'; } 100% { content: '.'; }
}



.markdown-body pre {
    background: #0d1117;
    color:white;
    padding: 1rem;
    border-radius: 8px;
    position: relative;
}

#themeToggle {
    width: 60px;
    height: 30px;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    background-color: #e5e7eb;
    border: none;
}

#toggleCircle {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark #themeToggle { background-color: var(--primary-color); }
.translate-x-8 { transform: translateX(30px); }

#messages {
    height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
}
#chatsList {
    flex: 1;              /* takes remaining space */
    overflow-y: auto;
    overflow-x: hidden;
}

#chatsList > div {
    overflow-y: auto;
}

textarea {
    resize: none;
}

.bg-red {
    background-color: var(--error-color)  !important;
    border-color: var(--error-color) !important;
    color: var(--light-color) !important;
}

/* Selection styling for provided script logic */
.group:hover .group-hover-visible {
    opacity: 1 !important;
}
.hr-text {
    display: flex;
    align-items: center;
    text-align: center;
    color: skyblue;
    margin: 20px 0;
}

.hr-text::before,
.hr-text::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid skyblue;
}

.hr-text:not(:empty)::before {
    margin-right: 10px;
}

.hr-text:not(:empty)::after {
    margin-left: 10px;
}
.profile-container {
    position: relative;
}

/* BUTTON */
.profile-btn {
    cursor: pointer;
    position: relative;
}

/* IMAGE AVATAR */
.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: none; /* hidden until valid */
}

/* LETTER AVATAR */
.avatar-letter {
    width: 40px;
    height: 40px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
}

/* DROPDOWN */
.profile-menu {
    position: absolute;
    top: 50px;
    right: 0;
    width: 160px;
    background: var(--bg-dark);
    border-radius: 8px;
    display: none;
    flex-direction: column;
    box-shadow: 0 5px 20px var(--bg-dark);
    z-index: 999;
}

.profile-menu.active {
    display: flex;
}

.menu-item {
    padding: 10px;
    color: var(--light-color);
    cursor: pointer;
}

.menu-item:hover {
    background: var(--success-color);
    color: var(--light-color);
}
.menu-icon {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.menu-item>i:hover {
    transform: rotate(90deg) scale(1.2);
    color: var(--light-color);
}
.pop-up-header {
    position: sticky;
    top: 0;             /* VERY IMPORTANT */
    z-index: 10;        /* so it stays above content */
    padding: 20px;
    border-bottom: 1px solid var(--light-color);
    background: var(--primary-color);
    color: var(--light-color);

    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pop-up-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    background: var(--light-color);
    backdrop-filter: blur(15px);
    border: 1px solid var(--light-color);
    border-radius: 20px 20px 20px 20px;
    z-index: 2000;
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 50px var(--bg-dark);
    overflow-y: auto;
}

@media (max-width: 767px) {
    .pop-up-container {
        top: 0;
        left: 0;
        transform: none;

        width: 100vw;
        height: 100dvh;

        border-radius: 0; /* full screen = no curves */
        margin: 0;
        padding: 10px;

        box-sizing: border-box;
    }
}

.pop-up-body {
    flex-grow: 1;
    padding: 5px;
    overflow-y: auto;
}
/* Overlay background */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;


    backdrop-filter: blur(4px);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.input-group-icon {
    position: relative;
}

.input-group-icon i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    z-index: 3;
    color: var(--primary-color);
}

.input-group-icon .form-control,
.input-group-icon .form-select {
    padding-left: 42px;
    height: calc(3.5rem + 2px);
}

.input-group-icon label {
    padding-left: 42px;
}

.auth-container {
      min-height: 100vh;

    background: url('../../static/img/auth/auth.jfif') no-repeat center center;

    display: flex;          /* if you need flex layout */
    align-items: center;    /* vertical alignment */
    justify-content: center; /* horizontal alignment */

    background-size: cover;
    background-position: center;
}

/* Image section */


/* Gradient overlay on image */


/* Text on image */
.auth-image-text {
    position: relative;
    z-index: 2;
    color: var(--bg-dark);
    text-align: center;
    animation: slideInText 1s ease 0.5s forwards;

}

.auth-image-text h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-image-text p {
    font-size: 1rem;
    font-weight: 500;
}

/* Form section */
.auth-form {

    padding: 3rem 2rem;
    border-radius: 1.5rem;

    transform: translateY(50px);
    opacity: 0;
    animation: slideUpForm 1s ease 0.7s forwards;
}

.auth-form .form-label {
    font-weight: 600;
}

.auth-form .input-group-text {
    background: var(--light-color);
    border: none;
    color: var(--primary-color-light);
}

.auth-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-color-light);
}

.btn-modern {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-dark));
    color: #fff;
    font-weight: 600;
    transition: 0.3s;
}

.btn-modern:hover {
    background: linear-gradient(90deg, var(--success-color), var(--success-color-dark));
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

@media (max-width: 767px) {
    .auth-image {
        border-radius: 1.5rem 1.5rem 0 0;
        min-height: 250px;
    }

    .auth-form {
        border-radius: 1.5rem;
    }
}

/* Animations */
@keyframes fadeZoom {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slideInText {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideUpForm {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}



.auth-container .row {
    align-items: stretch; /* make both sides same height */
}

/* Wrapper takes full height */
.auth-image-wrapper {
    position: relative;
    height: 100%;
    overflow: hidden;
}

/* Magic happens here */
.auth-image-wrapper img {
    height: calc(100% + 20px); /* max 20px bigger than form */
    max-height: calc(100% + 20px);
    width: 100%;
    object-fit: cover; /* prevents distortion */
    display: block;
}

/* Make sure form defines the height */
.auth-form {
    min-height: 100%;
}

.glass-div {
    background: rgba(255, 255, 255, 0.25); /* brighter glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);

    padding: 30px;

    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 0 10px rgba(255, 255, 255, 0.2);

    color: var(--bg-dark); /* dark text now (important!) */
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    color: var(--bg-dark);
}

.form-control::placeholder {
    color: var(--bg-dark);
}

.input-group-text {
    background: rgba(255, 255, 255, 0.5);
    border: none;
}
.code-input {
    width: 50px;
    height: 55px;
    font-size: 22px;
    font-weight: bold;
    border-radius: 10px;
}

.hover65:hover{
    background: linear-gradient(90deg, var(--success-color), var(--success-color-dark));
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: scale(1.05);
    color:var(--light-color);
}

/* ===== ROOT COLORS ===== */
:root {
    --primary: #87CEEB;
    --success: #22c55e;
    --error: #ef4444;
    --glass: rgba(255,255,255,0.1);
    --border: rgba(255,255,255,0.2);
}

/* ===== CONTAINER ===== */
.auth-box {
    max-width: 420px;
    width: 100%;
    padding: 30px;
    border-radius: 20px;

    backdrop-filter: blur(20px);
    background: var(--glass);
    border: 1px solid var(--border);
}


.hero-content {
    background: rgba(255, 255, 255, 0.05); /* keep glassy */
    backdrop-filter: blur(15px);
    border-radius: 1rem;
    padding: 2rem;

    /* 3D depth */
    transform-style: preserve-3d;
    perspective: 1000px;

    /* Shadow for depth */
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);

    /* Smooth animation */
    animation: float3D 8s ease-in-out infinite;
}

@keyframes float3D {
    0% {
        transform: translateZ(20px) rotateX(2deg) rotateY(-2deg);
    }
    25% {
        transform: translateZ(35px) rotateX(5deg) rotateY(5deg);
    }
    50% {
        transform: translateZ(20px) rotateX(-3deg) rotateY(3deg);
    }
    75% {
        transform: translateZ(30px) rotateX(4deg) rotateY(-4deg);
    }
    100% {
        transform: translateZ(20px) rotateX(2deg) rotateY(-2deg);
    }
}

/* Optional: subtle hover pop effect */
.hero-content:hover {
    transform: translateZ(40px) rotateX(6deg) rotateY(-6deg);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}
.hover6565:hover {
    color: var(--primary-color);

}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    display: none; /* hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: all; /* block clicks */
}

/* The spinning wheel */
#loadingWheel {
    border: 12px solid #f3f3f3;
    border-top: 12px solid #3498db;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
}

.hover652 :hover {
    background: white;
}



/* Spin animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.a54{
    animation: ease-in-out ;
}

/* Gradient button */
.btn-gradient-primary {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Scrollbar style */
#chat-box::-webkit-scrollbar {
    width: 6px;
}
#chat-box::-webkit-scrollbar-track {
    background: transparent;
}
#chat-box::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.4);
    border-radius: 3px;
}

/* Chat message bubbles */
.chat-message {

    padding: 10px 14px;
    border-radius: 20px;
    position: relative;
    word-wrap: break-word;
    font-size: 0.9rem;
}

.support-message {
    align-self: flex-start;
    background-color: grey;
    color: white;
    margin: 5px;
}

.user-message {
    align-self: flex-end;
    background-color: blue;
    color: #fff;
    margin: 5px;

}

/* Timestamps */
.chat-message small {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
}

/* Wrapper controls alignment */
.message-wrapper {
    display: flex;
    margin: 8px 0;
}

.message-wrapper.user {
    justify-content: flex-end;
}

.message-wrapper.support {
    justify-content: flex-start;
}

/* Chat bubble */
.chat-message {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* User vs Support colors */
.message-wrapper.user .chat-message {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 3px;
}

.message-wrapper.support .chat-message {
    background: #f1f1f1;
    color: #333;
    border-bottom-left-radius: 3px;
}

/* Message text */
.message-text {
    font-size: 14px;
    margin-bottom: 5px;
}

/* Timestamp */
.message-time {
    font-size: 10px;
    opacity: 0.7;
    text-align: right;
}

#customer-support {
    display: flex;
    flex-direction: column;
    height: 500px; /* Adjust to your desired height */
}

#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 12px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 12px;
}

/* Make input stick to bottom */
#customer-support .d-flex {
    margin-top: auto;
}