/* ================= HEADER MOBILE FIX ================= */

@media (max-width: 767px) {

    .top-nav {
        padding: 8px 0 !important;
    }

    /* LOGO */
    .brand-logo {
        height: 38px !important;
    }

    .brand-text span {
        font-size: 13px;
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* NAVBAR FLEX  */
    .navbar .container-fluid {
        flex-wrap: nowrap !important;
        overflow: hidden;
    }

    /* LEFT SECTION FIX */
    .top-nav .d-flex.align-items-center.gap-2 {
        min-width: 0;
    }

    /* RIGHT SECTION FIX */
    .top-nav .d-flex.align-items-center.gap-2:last-child {
        flex-shrink: 0;
        gap: 6px !important;
    }

    /* BUTTONS */
    .top-nav .btn {
        padding: 5px 8px !important;
        font-size: 12px !important;
    }

    /* THEME BUTTON */
    .theme-btn {
        padding: 5px 8px !important;
        font-size: 11px !important;
    }

    /* HIDE TEXT ON SMALL */
    .theme-btn span {
        display: none;
    }

    /* USER NAME HIDE */
    .user-chip {
        display: none !important;
    }

    /* LOGOUT BUTTON FIX (MAIN ISSUE) */
    .logout-btn {
        width: 34px !important;
        height: 34px !important;
        flex-shrink: 0;
        /*  prevents overflow */
    }
}





/* ===== MOBILE SIDEBAR STYLE ===== */

.mobile-link {
    display: block;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #0f172a;
    background: #f1f5f9;
    transition: all 0.3s ease;
}

.mobile-link:hover {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
}

/* better sidebar look */
.sidebar-canvas {
    width: 260px !important;
}

/* smooth animation */
.offcanvas {
    transition: transform 0.3s ease-in-out;
}


/* ===== MOBILE HEADER FIX ===== */

@media (max-width: 767px) {

    /*  SHOW TEXT IN 2 LINES */
    .brand-text span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;

        overflow: hidden;
        white-space: normal;
        line-height: 1.2;
        font-size: 13px;
        max-width: 130px;
    }

    /* reduce logo size */
    .brand-logo {
        height: 38px !important;
    }

    /* hide theme text only */
    .theme-btn span {
        display: none;
    }

    /* fix logout button */
    .logout-btn {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }

    /* spacing fix */
    .top-nav .container-fluid {
        flex-wrap: nowrap;
    }
}



/* ================= FULL TEXT UNDER LOGO ================= */

@media (max-width: 767px) {

    .brand-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-logo {
        height: 36px;
        margin-bottom: 2px;
    }

    .brand-text span {
        font-size: 12px;
        line-height: 1.2;

        white-space: normal;
        overflow: visible;
        max-width: 160px;
    }
}

/* ================= MOBILE SIDEBAR FIX ================= */

/* normal item */
.sidebar-canvas .side-link {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: all 0.25s ease;
}

/* ACTIVE  */
.sidebar-canvas .side-link.active {
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* icon */
.sidebar-canvas .side-link.active i {
    color: #ffffff !important;
}

/* hover */
.sidebar-canvas .side-link:hover {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff !important;
}

/* ================= FORCE ACTIVE (MOBILE) ================= */

.sidebar-canvas .side-link.active {
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    color: #fff !important;
    font-weight: 600;
}

.sidebar-canvas .side-link.active i {
    color: #fff !important;
}

/* =============== user table mobile responsive=========== */


@media (max-width: 767px) {

    .custom-table thead {
        display: none !important;
    }

    .custom-table,
    .custom-table tbody,
    .custom-table tr {
        display: block;
        width: 100%;
    }

    .custom-table tr {
        margin-bottom: 14px;
        padding: 14px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(10px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .custom-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border: none;
        font-size: 13px;
    }

    .custom-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6366f1;
    }

    .custom-table td:last-child {
        justify-content: flex-end;
    }

    .table-responsive {
        overflow: visible !important;
    }
}

/* ================= DEPARTMENT TABLE MOBILE ================= */

@media (max-width: 767px) {

    .custom-table thead {
        display: none !important;
    }

    .custom-table,
    .custom-table tbody,
    .custom-table tr {
        display: block;
        width: 100%;
    }

    /* card style */
    .custom-table tr {
        margin-bottom: 14px;
        padding: 14px;
        border-radius: 16px;

        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(10px);

        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    /* fields */
    .custom-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;

        padding: 6px 0;
        border: none;
        font-size: 13px;
    }

    /* labels */
    .custom-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6366f1;
    }

    /* action align */
    .custom-table td:last-child {
        justify-content: flex-end;
    }

    /* remove scroll */
    .table-responsive {
        overflow: visible !important;
    }
}


/* ================= TICKET TABLE MOBILE ================= */

@media (max-width: 767px) {

    .custom-table thead {
        display: none !important;
    }

    .custom-table,
    .custom-table tbody,
    .custom-table tr {
        display: block;
        width: 100%;
    }

    .custom-table tr {
        margin-bottom: 14px;
        padding: 14px;
        border-radius: 16px;

        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(10px);

        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .custom-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;

        padding: 6px 0;
        border: none;
        font-size: 13px;
    }

    .custom-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6366f1;
    }

    .custom-table td:last-child {
        justify-content: flex-end;
    }

    .table-responsive {
        overflow: visible !important;
    }
}


/* =========================== agent dashboard ============================ */

.stat-card {
    padding: 18px;
    border-radius: 16px;
    overflow: hidden;
}

/* TEXT FIX */
.stat-label {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
}

/* ICON FIX */
.stat-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 22px;
}

/* ===== MOBILE FIX ===== */
@media (max-width: 767px) {

    .stat-card {
        padding: 14px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 18px;
    }

}

/* ===== MOBILE TABLE FIX ===== */
@media (max-width: 767px) {

    .custom-table thead {
        display: none;
    }

    .custom-table tbody tr {
        display: block;
        margin-bottom: 12px;
        background: var(--surface);
        border-radius: 12px;
        padding: 12px;
    }

    /* NORMAL CELLS */
    .custom-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border: none;
    }

    /* LABEL TEXT */
    .custom-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-soft);
    }

    /*  FIX BADGES */
    .custom-table tbody td span,
    .custom-table tbody td .badge {
        display: inline-block !important;
        width: auto !important;
    }

    /*  FIX PRIORITY / STATUS ALIGN */
    .custom-table tbody td[data-label="Priority"],
    .custom-table tbody td[data-label="Status"] {
        justify-content: space-between;
    }

    /*  FIX BUTTON COLUMN */
    .custom-table tbody td[data-label="View"] {
        display: block;
        text-align: right;
    }
}


/* =====AGENT CLIENT TABLE MOBILE TABLE RESPONSIVE ===== */

@media (max-width: 767px) {

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: 12px;
        background: var(--surface);
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    }

    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border: none;
        font-size: 13px;
    }

    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-soft);
    }

    /* ACTION BUTTON FIX */
    .table tbody td[data-label="Action"] {
        display: block;
        text-align: right;
        margin-top: 8px;
    }

    .action-btns {
        justify-content: flex-end;
    }

    /* EMAIL TRUNCATE */
    .text-truncate {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ====== AGENT NAVBAR LINK ======= */

.nav-btn {
    background: #111;
    color: #fff;
    border-radius: 12px;
    padding: 6px 14px;
    font-weight: 500;
    transition: 0.3s;
}

.nav-btn:hover {
    background: #222;
    color: #fff;
}

/* ACTIVE BUTTON */
.nav-btn.active {
    background: linear-gradient(135deg, #0ea5e9, #7c3aed);
    color: #fff;
}


/* ================= MOBILE TABLE FIX ================= */
@media (max-width: 768px) {

    .custom-table tbody tr {
        display: block;
        background: #fff;
        margin-bottom: 12px;
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

    .custom-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 6px 0;
        border: none;
        font-size: 13px;
    }

    .custom-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        margin-right: 10px;
        min-width: 90px;
    }

    /*  SUBJECT FIX */
    .custom-table tbody td[data-label="Subject"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .custom-table tbody td[data-label="Subject"]::before {
        margin-bottom: 4px;
    }

    .custom-table .fw-semibold {
        font-size: 14px;
        font-weight: 600;
        color: #1e293b;
        line-height: 1.4;
        word-break: break-word;
    }

    .state-ticketid {
        font-size: 12px;
        color: #94a3b8;
        word-break: break-all;
    }

    /* BUTTON FIX */
    .custom-table td[data-label="Action"] {
        justify-content: flex-start;
        margin-top: 6px;
    }

    .custom-table td[data-label="Action"] button {
        width: auto;
        padding: 5px 12px;
        font-size: 12px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
    }
}



/* ALIGN BUTTON + SELECT */
.page-toolbar .btn {
    height: 42px;
    display: flex;
    align-items: center;
}

/* MATCH SELECT HEIGHT */
.custom-refresh-select {
    height: 42px;
    min-width: 110px;
}

/* FIX LABEL SPACE */
.refresh-control-box label {
    font-size: 12px;
}

.refresh-control-box .form-floating > .custom-refresh-select {
    height: 58px;
    min-width: 170px;
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
    line-height: 3.00;
}

.refresh-control-box .form-floating > label {
    padding: 0.85rem 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
}


/* ================= CLIENT CHAT LAYOUT ================= */

.ticket-chat-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* CHAT BOX */
.chat-box {
    flex: 1;
    overflow-y: auto;
    max-height: 420px;
    padding-right: 6px;
}

/* REPLY PANEL */
.reply-panel {
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
}

/* FILE + BUTTON ALIGN */
.reply-panel .row {
    align-items: center;
}

/* TEXTAREA */
#clientReplyEditor {
    margin-top: 10px;
}

/* MOBILE FIX */
@media (max-width: 768px) {
    .chat-box {
        max-height: 300px;
    }
}

/* ===== profile navbar icon ==== */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.user-avatar-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}
.user-profile {
   border: 0.2px solid #d9d0d0;
    padding: 13px;
    border-redius: 20px;
    border-radius: 20px;
    box-shadow: 3px 3px 13px #b3c1f0;
}

.role-text {
    color: #2563eb;
    /* nice blue */
    font-weight: 600;
    font-size: 12px;
}


/* Gradient text highlight */
.ticket-subject-active {
    font-weight: 700;
    background: linear-gradient(135deg, #cd2a43fa, #ef4444);

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    display: inline-block;
}

.msg-icon {
    margin-left: 6px;
    font-size: 20px;
    cursor: pointer;
    display: inline-block;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: bellShake 1.5s ease-in-out infinite,
        bellGlowRed 2s ease-in-out infinite;
}

@keyframes bellGlowRed {
    0% {
        text-shadow:
            0 0 2px rgba(239, 68, 68, 0.25);
    }

    50% {
        text-shadow:
            0 0 6px rgba(239, 68, 68, 0.5),
            0 0 10px rgba(220, 38, 38, 0.35);
    }

    100% {
        text-shadow:
            0 0 2px rgba(239, 68, 68, 0.25);
    }
}

/*  Smooth shake */
@keyframes bellShake {

    0%,
    60%,
    100% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(12deg);
    }

    20% {
        transform: rotate(-10deg);
    }

    30% {
        transform: rotate(8deg);
    }

    40% {
        transform: rotate(-6deg);
    }

    50% {
        transform: rotate(4deg);
    }
}


/* GLOW + PULSE EFFECT */
/* @keyframes glowPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0px rgba(37, 99, 235, 0.4);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 12px rgba(37, 99, 235, 0.8);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0px rgba(37, 99, 235, 0.4);
    }
} */

/* VIEW BUTTON GLOW */
.view-glow {
    position: relative;
    z-index: 1;
    animation: softPulse 1.5s ease-in-out infinite;
}

/* light scale only */
@keyframes softPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }

    100% {
        transform: scale(1);
    }
}

/* soft outer wave */
.view-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: -1;

    animation: softWave 1.8s ease-out infinite;
}

@keyframes softWave {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
        opacity: 0.8;
    }

    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0.15);
        opacity: 0.4;
    }

    100% {
        box-shadow: 0 0 0 14px rgba(37, 99, 235, 0);
        opacity: 0;
    }
}

.table-scroll-x {
    overflow-x: hidden;
}

/*  ONLY DESKTOP SCROLL */
@media (min-width: 992px) {
    .table-scroll-x {
        overflow-x: auto;
        white-space: nowrap;
    }

    .table-scroll-x table {
        min-width: 900px;
    }
}

/* ========== assign to column image ========== */
.agent-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-avatar-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====  THEME TOGGLE ===== */

.theme-switch {
    position: relative;
    width: 62px;
    height: 34px;
    display: inline-block;
    margin-left: 10px;
}

.theme-switch input {
    display: none;
}

.theme-slider {
    position: absolute;
    inset: 0;
    border-radius: 50px;
    cursor: pointer;
    transition: all .4s ease;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

/* DARK BACKGROUND */
body.dark-mode .theme-slider {
    background: linear-gradient(135deg, #020617, #0f172a);
}

/* TOGGLE CIRCLE */
.toggle-icon {
    position: absolute;
    height: 26px;
    width: 26px;
    left: 4px;
    top: 4px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ICONS */
.toggle-icon i {
    position: absolute;
    font-size: 14px;
    transition: .3s;
}

/* SUN */
.sun {
    color: #facc15;
    opacity: 1;
}

/* MOON */
.moon {
    color: #cbd5f5;
    opacity: 0;
}

/* ACTIVE (DARK MODE) */
#input:checked+.theme-slider .toggle-icon {
    transform: translateX(28px);
    background: #0f172a;
}

#input:checked+.theme-slider .sun {
    opacity: 0;
}

#input:checked+.theme-slider .moon {
    opacity: 1;
}

/* GLOW EFFECT */
.theme-switch:hover .theme-slider {
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
}

/* ===== GLITTER EFFECT (DARK MODE) ===== */

.glitter {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* DOTS */
.dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #38bdf8;
    border-radius: 50%;
    opacity: 0;
}

/* DOT POSITIONS */
.d1 {
    top: 6px;
    left: 10px;
}

.d2 {
    top: 20px;
    left: 18px;
}

.d3 {
    top: 10px;
    left: 32px;
}

.d4 {
    top: 18px;
    left: 42px;
}

/* SHOW ONLY IN DARK MODE */
#input:checked+.theme-slider .dot {
    opacity: 1;
    animation: glitter 1.5s infinite ease-in-out;
}

/* DIFFERENT DELAYS */
.d1 {
    animation-delay: 0s;
}

.d2 {
    animation-delay: 0.3s;
}

.d3 {
    animation-delay: 0.6s;
}

.d4 {
    animation-delay: 0.9s;
}

/* ANIMATION */
@keyframes glitter {
    0% {
        transform: scale(0.6);
        opacity: 0.2;
        box-shadow: 0 0 0px #38bdf8;
    }

    50% {
        transform: scale(1.4);
        opacity: 1;
        box-shadow: 0 0 8px #38bdf8;
    }

    100% {
        transform: scale(0.6);
        opacity: 0.2;
        box-shadow: 0 0 0px #38bdf8;
    }
}

/* ===== Login page css ===== */
.auth-split {
    display: flex;
    height: 100dvh;
    overflow: hidden;
    width: 100%;
    background-color: none; ;
}

.auth-split {
    height: calc(90vh - 70px);
}

/* ===== LEFT SIDE ===== */
.auth-left {
    width: 50%;
    position: relative;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ===== BLOBS ===== */
.blob {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}

/*  TOP LEFT  */
.blob-top {
    width: 180px;
    height: 180px;

    background: linear-gradient(135deg, #2dd4bf, #14b8a6);

    top: 125px;
    left: 141px;
}

.blob-bottom-right {
    width: 180px;
    height: 180px;

    background: linear-gradient(135deg, #2dd4bf, #14b8a6);

    bottom: 130px;
    right: 200px;

    z-index: 1;
}

/* ===== LOGIN CARD ===== */
.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;

    padding: 40px;

    border-radius: 18px;

    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(14px);

    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
}

/* ===== INPUT ===== */
.input-modern {
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #e5e7eb;
}

.input-modern:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ===== BUTTON ===== */
.btn-gradient {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: white;
    border-radius: 10px;
    padding: 12px;
    font-weight: 500;
}

.btn-gradient:hover {
    opacity: 0.9;
}

/* ===== RIGHT SIDE ===== */
.auth-right {
    width: 50%;
    position: relative;
    /* background: linear-gradient(135deg, #6366f1, #7c3aed); */
    background: linear-gradient(135deg, #8dc9ea, #7c3aedb8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 53px 22px 0px;
    border-radius: 20px;
}

/* ===== RIGHT CONTENT ===== */
.right-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

/* ===== IMAGE ===== */
.right-img {
    width: 100%;
    max-width: 460px;
    animation: float 6s ease-in-out infinite;
}

/* FLOAT */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ===== MOBILE ===== */
@media (max-width: 991px) {
    .auth-split {
        flex-direction: column;
    }

    .auth-left {
        width: 100%;
        height: 100%;
    }

    .auth-right {
        display: none;
    }
}

/* ===== DARK MODE ===== */
body.dark-mode .auth-left {
    background: #020617;
}

body.dark-mode .login-card {
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
}

body.dark-mode .input-modern {
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}


/* 

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-radius: 6px 6px 0 0;
    margin-right: 6px;
    color: #6b7280;
    background: transparent !important;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    background: #fff !important;
    border: 2px solid var(--bs-nav-tabs-link-active-border-color) !important;
    border-bottom: 2px solid #fff !important;

   color: var(--bs-nav-tabs-link-active-border-color) !important;
    font-weight: 700;

    position: relative;
    margin-bottom: -1px;

    z-index: 2;
}

\
.custom-ticket-tabs .nav-link.active {
    transform: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.nav-tabs {
    position: relative;
    border-bottom: none !important; 
}


.nav-tabs::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: #dee2e6;
    z-index: 1;
}


.nav-tabs:has(.tab-recent.active)::after {
    background: #2563eb;
}
.nav-tabs:has(.tab-open.active)::after {
    background: #0891b2;
}
.nav-tabs:has(.tab-close.active)::after {
    background: #475569;
}
.nav-tabs:has(.tab-resolve.active)::after {
    background: #16a34a;
}
.nav-tabs:has(.tab-pending.active)::after {
    background: #d97706;
}
.nav-tabs:has(.tab-all.active)::after {
    background: #4f46e5 ;
}

.tab-recent.active {
    --bs-nav-tabs-link-active-border-color: #2563eb;
}

.tab-open.active {
    --bs-nav-tabs-link-active-border-color: #0891b2;
}

.tab-close.active {
    --bs-nav-tabs-link-active-border-color: #475569;
}

.tab-resolve.active {
    --bs-nav-tabs-link-active-border-color: #16a34a;
}

.tab-pending.active {
    --bs-nav-tabs-link-active-border-color: #d97706;
}

.tab-all.active {
    --bs-nav-tabs-link-active-border-color: #4f46e5;
} */



.tooltip-inner {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    font-size: 12px;
    border-radius: 6px;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #4f46e5;
}









.ticket-tabs-scroll {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    padding: 3px;
}

.ticket-tabs-scroll::-webkit-scrollbar {
    display: none;
}

/* BASE TAB */
#ticketTabs .nav-link {
    border: none;
    border-radius: 12px;
    margin-right: 8px;
    padding: 10px 18px;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    transition: all 0.3s ease;
}

/* HOVER */
#ticketTabs .nav-link:hover {
    transform: translateY(-2px);
}

/* ACTIVE COMMON */
#ticketTabs .nav-link.active {
    color: #fff !important;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}


/* SMOOTH ANIMATION */
#ticketTabs .nav-link {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*  FIX SCROLL (MAIN FIX) */
#ticketTabs {
    margin-left: 5px;
    display: inline-flex !important;
    width: max-content !important;
}

#ticketTabs .nav-item {
    flex: 0 0 auto;
}

#ticketTabs .nav-link {
    min-width: 140px;
    /*  forces overflow */
    white-space: nowrap;
}


#ticketTabs .nav-link {
    border-radius: 12px !important;
    /* keep your shape */
    padding: 10px 18px;
    font-weight: 600;
    border: 1px solid transparent;

}

.nav-link.active {
    background-color: transparent !important;
}


/*  GRADIENT COLORS */
.tab-recent.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}

.tab-open.active {
    background: linear-gradient(135deg, #0891b2, #0e7490) !important;
}

.tab-close.active {
    background: linear-gradient(135deg, #475569, #334155) !important;
}

.tab-resolve.active {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
}

.tab-pending.active {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
}

.tab-all.active {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
}


#ticketTabs .nav-link.active {
    background: none !important;
    /* reset bootstrap */
}

/*  FORCE GRADIENT ON TOP */
#ticketTabs .nav-link.tab-recent.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}

#ticketTabs .nav-link.tab-open.active {
    background: linear-gradient(135deg, #0891b2, #0e7490) !important;
}

#ticketTabs .nav-link.tab-close.active {
    background: linear-gradient(135deg, #475569, #334155) !important;
}

#ticketTabs .nav-link.tab-resolve.active {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
}

#ticketTabs .nav-link.tab-pending.active {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
}

#ticketTabs .nav-link.tab-all.active {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
}


#ticketTabs .tab-recent.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #fff !important;

    border: none !important;
    outline: none !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;

    background-clip: padding-box;
}

/* 🌙 DARK MODE - BASE TAB */
body.dark-mode .custom-ticket-tabs .nav-link {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    color: #cbd5f5 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* 🌙 DARK MODE ACTIVE */
body.dark-mode .custom-ticket-tabs .nav-link.active {
    color: #fff !important;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.6) !important;
}

/* 🌙 DARK MODE INDIVIDUAL TABS */

body.dark-mode .tab-recent.active {
    background: linear-gradient(135deg, #1e40af, #1d4ed8) !important;
}

body.dark-mode .tab-open.active {
    background: linear-gradient(135deg, #0e7490, #155e75) !important;
}

body.dark-mode .tab-close.active {
    background: linear-gradient(135deg, #334155, #1e293b) !important;
}

body.dark-mode .tab-resolve.active {
    background: linear-gradient(135deg, #15803d, #14532d) !important;
}

body.dark-mode .tab-pending.active {
    background: linear-gradient(135deg, #b45309, #92400e) !important;
}

body.dark-mode .tab-all.active {
    background: linear-gradient(135deg, #4338ca, #312e81) !important;
}

/* 🌙 DARK MODE RIGHT PANEL FIX */
body.dark-mode .auth-right {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
}

body.dark-mode .right-img {
    filter: brightness(0.85) contrast(1.1);
}

body.dark-mode .auth-right h3,
body.dark-mode .auth-right p {
    color: #e2e8f0 !important;
}


/* ============================= */
/*  DARK MODE FIX  */
/* ============================= */

/* PAGE BACKGROUND */
body.dark-mode {
    background: #020617 !important;
    color: #e2e8f0 !important;
}

/* ALL CARDS / BOXES */
body.dark-mode .glass-card,
body.dark-mode .ticket-action-box,
body.dark-mode .ticket-info-item,
body.dark-mode .ticket-subject-box,
body.dark-mode .chat-box,
body.dark-mode .message-bubble,
body.dark-mode .card {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* TOP HEAD SECTION */
body.dark-mode .page-toolbar {
    background: transparent !important;
}

/* HEADINGS */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5 {
    color: #e2e8f0 !important;
}

/* LABEL TEXT */
body.dark-mode label,
body.dark-mode span {
    color: #94a3b8 !important;
}

/* STRONG TEXT */
body.dark-mode strong {
    color: #e2e8f0 !important;
}

/* INPUTS */
body.dark-mode .form-control,
body.dark-mode .form-select {
    background: #020617 !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* CHAT BUBBLE */
body.dark-mode .message-bubble {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

/* RIGHT CHAT PANEL */
body.dark-mode .ticket-chat-card {
    background: #020617 !important;
}

/* BUTTONS */
body.dark-mode .btn {
    color: #fff !important;
}

/* FIX WHITE SECTIONS  */
body.dark-mode .bg-white,
body.dark-mode .bg-light {
    background: #0f172a !important;
}

/* REMOVE FADED LOOK */
body.dark-mode * {
    opacity: 1 !important;
}

/* SCROLLBAR */
body.dark-mode ::-webkit-scrollbar-thumb {
    background: #334155;
}

/* SMOOTH TRANSITION */
body {
    transition: all 0.3s ease;
}









.btn-dark {
    background: linear-gradient(135deg, #1e1e1e, #828181) !important;
    border: none !important;
    transition: all 0.3s ease;
}

.btn-dark:hover {
    background: linear-gradient(135deg, #000000, #585858) !important;
    transform: translateY(-2px);
}