/* Liquid Glass Dashboard Additions (Overrides & specific layout) */

body.lg-theme {
    margin: 0;
    overflow: hidden;
    color: var(--lg-text-main);
    background-color: var(--lg-bg-base);
}

body[data-page="dashboard"] {
    --dash-intro-duration: 920ms;
    --dash-intro-stagger: 90ms;
    --dash-intro-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    pointer-events: none;
    opacity: 0;
    overflow: hidden;
}

.dashboard-intro-grid,
.dashboard-intro-beam,
.dashboard-intro-core {
    position: absolute;
}

.dashboard-intro-grid {
    inset: -20%;
    background-image:
        linear-gradient(rgba(29, 125, 242, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 125, 242, 0.15) 1px, transparent 1px);
    background-size: 120px 120px;
    mix-blend-mode: screen;
    opacity: 0;
    transform: scale(1.16) rotate(-10deg);
}

.dashboard-intro-beam {
    inset: -35% -15%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.9) 42%,
            rgba(144, 196, 255, 0.6) 50%,
            transparent 58%);
    filter: blur(16px);
    opacity: 0;
    transform: translateX(-72%) skewX(-18deg);
}

.dashboard-intro-core {
    top: 50%;
    left: 50%;
    width: min(38vw, 520px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(186, 220, 255, 0.78) 12%,
            rgba(29, 125, 242, 0.34) 28%,
            rgba(29, 125, 242, 0) 70%);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
}

[data-intro-piece] {
    position: relative;
    isolation: isolate;
    transform-origin: var(--intro-origin, center center);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    opacity: 0;
}

body.dashboard-intro-playing .dashboard-container {
    perspective: 1800px;
}

body.dashboard-intro-playing .sky-bg-layer {
    animation: none;
}

body.dashboard-intro-playing .dashboard-intro-overlay {
    animation: dashboard-overlay-fade 1.55s ease forwards;
}

body.dashboard-intro-playing .dashboard-intro-grid {
    animation: dashboard-grid-sweep 1.55s var(--dash-intro-ease) forwards;
}

body.dashboard-intro-playing .dashboard-intro-beam {
    animation: dashboard-beam-sweep 1.08s var(--dash-intro-ease) forwards;
}

body.dashboard-intro-playing .dashboard-intro-core {
    animation: dashboard-core-pulse 1.08s var(--dash-intro-ease) forwards;
}

body.dashboard-intro-playing [data-intro-piece] {
    will-change: transform, opacity;
    animation: dashboard-piece-assemble var(--dash-intro-duration) var(--dash-intro-ease) both;
    animation-delay: calc(110ms + (var(--intro-order, 0) * var(--dash-intro-stagger)));
}

body.dashboard-intro-playing [data-intro-piece]::after {
    content: none;
}

@keyframes dashboard-bg-settle {
    0% {
        transform: scale(1.02);
        opacity: 0.92;
    }

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

@keyframes dashboard-overlay-fade {
    0% {
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes dashboard-grid-sweep {
    0% {
        opacity: 0;
        transform: scale(1.16) rotate(-10deg);
    }

    22% {
        opacity: 0.42;
    }

    100% {
        opacity: 0;
        transform: scale(1) rotate(-3deg);
    }
}

@keyframes dashboard-beam-sweep {
    0% {
        opacity: 0;
        transform: translateX(-72%) skewX(-18deg);
    }

    18% {
        opacity: 0.95;
    }

    100% {
        opacity: 0;
        transform: translateX(72%) skewX(-18deg);
    }
}

@keyframes dashboard-core-pulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.42);
    }

    38% {
        opacity: 0.72;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.08);
    }
}

@keyframes dashboard-piece-assemble {
    0% {
        opacity: 0;
        transform:
            translate3d(var(--intro-x, 0px), var(--intro-y, 0px), 0)
            scale(var(--intro-scale, 0.96));
    }

    58% {
        opacity: 1;
    }

    78% {
        opacity: 1;
        transform:
            translate3d(0, -2px, 0)
            scale(1.01);
    }

    100% {
        opacity: 1;
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }
}

@keyframes dashboard-piece-sheen {
    0% {
        opacity: 0;
        transform: translateX(-55%) rotate(10deg);
    }

    40% {
        opacity: 0.48;
    }

    100% {
        opacity: 0;
        transform: translateX(55%) rotate(10deg);
    }
}

.dashboard-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 10;
}

/* Sidebar */
.dashboard-sidebar {
    width: 260px;
    height: calc(100% - 40px);
    margin: 20px 0 20px 20px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    background: rgba(255, 255, 255, 0.48);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    padding: 0 10px;
}

.sidebar-logo img {
    height: 32px;
}

.sidebar-logo span {
    font-weight: 700;
    font-size: 1.08rem;
    letter-spacing: -0.03em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    padding-bottom: 16px;
}

/* ── Apple-style nav groups ── */
.sidebar-nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-nav-group + .sidebar-nav-group {
    margin-top: 16px;
}
.sidebar-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lg-text-dim, rgba(19, 33, 59, 0.46));
    padding: 0 12px;
    margin: 0 0 6px;
    user-select: none;
}

/* ── Tinted icon wraps (SF Symbols style) ── */
.nav-icon-wrap {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.04);
    transition: background 0.2s ease, transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}
.nav-icon-wrap i {
    font-size: 0.92rem;
    line-height: 1;
}
.sidebar-nav .nav-item:hover .nav-icon-wrap {
    background: rgba(29, 125, 242, 0.1);
    transform: scale(1.04);
}
.sidebar-nav .nav-item.active .nav-icon-wrap {
    background: rgba(29, 125, 242, 0.14);
    color: var(--lg-accent-primary);
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: transparent;
    color: var(--lg-text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
                color 0.22s ease;
    position: relative;
}

.sidebar-nav .nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-nav .nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--lg-text-main);
}

.sidebar-nav .nav-item.active {
    background: rgba(29, 125, 242, 0.1);
    color: var(--lg-accent-primary);
    font-weight: 600;
    border-color: transparent;
}

.sidebar-nav .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    border-radius: 0 3px 3px 0;
    background: var(--lg-accent-primary);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--lg-glass-border);
}

.sidebar-footer .nav-item.logout {
    color: var(--status-closed);
}

.sidebar-footer .nav-item.logout:hover {
    background: rgba(255, 69, 58, 0.1);
}

/* Main Area */
.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    overflow: hidden;
}

.dashboard-topbar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    margin-bottom: 20px;
}

.topbar-left h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-profile-dropdown:hover {
    background: rgba(255, 255, 255, 0.6);
}

.avatar-small {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.profile-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-text .username {
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-text .role {
    font-size: 0.7rem;
    color: var(--lg-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 600;
}

/* Content Area */
.dashboard-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding-bottom: 20px;
}

.dashboard-tab {
    display: none;
}

.dashboard-tab.active {
    display: block;
}

.welcome-banner {
    padding: 30px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(0, 122, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg, 24px);
    position: relative;
    overflow: hidden;
}

.welcome-banner h3 {
    margin: 0 0 5px 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--lg-text-main);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dash-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.dash-card h4 {
    margin: 0 0 20px 0;
    color: var(--lg-text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credit-count .count-big {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--lg-accent-primary);
    text-shadow: 0 0 20px var(--lg-accent-glow);
    display: block;
    line-height: 1;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--lg-text-muted);
}

.dash-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-ticket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--lg-glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dash-ticket-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--lg-accent-primary);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Utilities */
.w-full {
    width: 100%;
    text-decoration: none;
}

.muted {
    color: var(--lg-text-muted);
}

.text-sm {
    font-size: 0.85rem;
}

.font-semibold {
    font-weight: 600;
}

.mb-5 {
    margin-bottom: 5px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mt-5 {
    margin-top: 5px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.d-block {
    display: block;
}

/* Dashboard Ticket Layout */
.ticket-dashboard-wrapper {
    height: 100%;
    min-height: 0;
}

.dashboard-ticket-layout {
    display: grid;
    grid-template-columns: 300px 1fr 270px;
    gap: 0;
    height: 100%;
}

.ticket-sidebar {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.ticket-section-header {
    padding: 10px 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--lg-text-muted);
    font-weight: 600;
}

.ticket-section-header h4 {
    margin: 0;
}

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 10px;
}

.ticket-list-item {
    padding: 12px 15px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ticket-list-item:hover {
    background: var(--lg-glass-bg);
}

.ticket-list-item.active {
    background: var(--lg-glass-bg);
    border-color: var(--lg-accent-primary);
    box-shadow: 0 0 10px var(--lg-accent-glow);
}

.ticket-list-item.unread .item-title {
    font-weight: 700;
}

.ticket-list-item.closed {
    opacity: 0.6;
}

/* Ticket Chat Bubbles */
.ticket-msg {
    display: flex;
    margin-bottom: 15px;
    max-width: 80%;
}

.ticket-msg.self {
    align-self: flex-end;
    margin-left: auto;
}

.ticket-msg.admin {
    align-self: flex-start;
}

.ticket-msg-inner {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.85);
    position: relative;
    backdrop-filter: var(--lg-blur);
    border: 1px solid var(--lg-glass-border);
}

.ticket-msg.self .ticket-msg-inner {
    background: linear-gradient(135deg, var(--lg-accent-primary), #005bb5);
    border: none;
}

/* Context Menu Hover */
.context-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Aurora bg override */
.aurora-bg {
    background: linear-gradient(45deg, rgba(0, 122, 255, 0.1), rgba(255, 0, 150, 0.05), rgba(0, 255, 128, 0.05));
    animation: aurora 15s ease infinite;
    background-size: 400% 400%;
}

@keyframes aurora {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

@media (max-width: 900px) {
    .dashboard-container {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: auto;
        height: auto;
        flex-direction: row;
        margin: 10px;
        padding: 5px 15px;
        gap: 10px;
        overflow-x: auto;
    }

    .sidebar-logo span,
    .sidebar-nav .nav-item span {
        display: none;
    }

    .sidebar-footer {
        border: none;
        padding: 0;
    }

    .dashboard-ticket-layout {
        grid-template-columns: 1fr;
    }

    .ticket-sidebar {
        max-height: 250px;
    }

    .mobile-only {
        display: block !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-intro-overlay {
        display: none !important;
    }

    body.dashboard-intro-playing .sky-bg-layer,
    body.dashboard-intro-playing [data-intro-piece],
    body.dashboard-intro-playing [data-intro-piece]::after {
        animation: none !important;
    }
}

.mobile-only {
    display: none;
}

.my-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.7);
}

.gallery-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.85);
    padding: 8px 10px;
    color: #64748b;
}

.gallery-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #0f172a;
    font-size: 0.86rem;
}

.gallery-toolbar-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.gallery-sort-select {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 600;
}

.gallery-meta {
    font-weight: 600;
}

.my-gallery-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--lg-glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.my-gallery-preview {
    width: 100%;
    height: 190px;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

.my-gallery-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.my-gallery-title {
    margin: 0;
    font-weight: 700;
    font-size: 0.95rem;
}

.my-gallery-date {
    margin: 0;
    font-size: 0.82rem;
    color: var(--lg-text-muted);
}

.my-gallery-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-viewer-card {
    width: min(980px, 92vw);
    max-height: 90vh;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-viewer-card img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
}

.gallery-viewer-meta {
    padding: 2px 2px 8px;
}

/* =============================================
   SETTINGS v3 — Discord-style 3-column layout
   ============================================= */

/* The tab fills the entire dashboard-content area */
#tab-settings.active {
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

.sett-layout {
    display: grid;
    grid-template-columns: 188px 1fr 268px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* ── Left sidebar nav ── */
.sett-sidebar {
    background: rgba(255, 255, 255, 0.42);
    border-right: 1px solid rgba(255, 255, 255, 0.52);
    padding: 28px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sett-sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sett-sidebar-label {
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.38);
    padding: 0 8px;
    margin: 0 0 5px;
}

.sett-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 7px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(15, 23, 42, 0.58);
    transition: background 0.12s, color 0.12s;
    text-align: left;
    line-height: 1;
}

.sett-sidebar-item i {
    width: 15px;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.72;
    flex-shrink: 0;
}

.sett-sidebar-item:hover {
    background: rgba(29, 125, 242, 0.08);
    color: var(--accent-blue, #1d7df2);
}

.sett-sidebar-item.active {
    background: rgba(29, 125, 242, 0.12);
    color: var(--accent-blue, #1d7df2);
    font-weight: 600;
}

.sett-sidebar-item.active i {
    opacity: 1;
}

/* ── Center content area ── */
.sett-content {
    overflow-y: auto;
    padding: 36px 44px;
}

.sett-pane {
    display: none;
    animation: sett-pane-in 0.17s ease-out both;
}

.sett-pane.active {
    display: block;
}

@keyframes sett-pane-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sett-pane-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin: 0 0 26px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    letter-spacing: -0.01em;
}

/* Sections within a pane */
.sp-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.sp-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sp-section-title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.48);
    margin: 0 0 12px;
}

/* ── Profile hero banner + avatar ── */
.sp-hero {
    margin-bottom: 28px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.sp-hero-banner {
    height: 104px;
    background: linear-gradient(135deg, #5b8def, #ffa276);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.sp-hero-banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.sp-hero-banner:hover .sp-hero-banner-overlay,
.sp-hero-banner:focus-visible .sp-hero-banner-overlay {
    opacity: 1;
}

.sp-hero-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px 14px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
}

.sp-hero-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 4px solid #fff;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    margin-top: -34px;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
    transition: transform 0.15s ease;
}

.sp-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.sp-hero-avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.sp-hero-avatar:hover .sp-hero-avatar-overlay,
.sp-hero-avatar:focus-visible .sp-hero-avatar-overlay {
    opacity: 1;
}

.sp-hero-avatar:hover {
    transform: scale(1.06);
}

.sp-hero-name-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 8px;
}

.sp-hero-name {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.sp-hero-tag {
    font-size: 0.78rem;
    color: #6b7280;
}

.sp-hero-change-btn {
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: 2px;
}

/* ── Form controls ── */
.sett-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.76);
    font-size: 0.9rem;
    color: var(--text-primary, #0f172a);
    outline: none;
    transition: border-color 0.17s, box-shadow 0.17s, background 0.17s;
    box-sizing: border-box;
    font-family: inherit;
}

.sett-input:focus {
    border-color: var(--accent-blue, #1d7df2);
    box-shadow: 0 0 0 3px rgba(29, 125, 242, 0.14);
    background: rgba(255, 255, 255, 0.95);
}

.sett-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sett-textarea-wrap {
    position: relative;
}

.sett-textarea {
    width: 100%;
    min-height: 96px;
    padding: 10px 14px 26px;
    border-radius: 8px;
    border: 1.5px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.76);
    font-size: 0.88rem;
    color: var(--text-primary, #0f172a);
    outline: none;
    resize: vertical;
    font-family: inherit;
    line-height: 1.55;
    transition: border-color 0.17s, box-shadow 0.17s, background 0.17s;
    box-sizing: border-box;
}

.sett-textarea:focus {
    border-color: var(--accent-blue, #1d7df2);
    box-shadow: 0 0 0 3px rgba(29, 125, 242, 0.14);
    background: rgba(255, 255, 255, 0.95);
}

.sett-textarea-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.72rem;
    color: rgba(15, 23, 42, 0.38);
    pointer-events: none;
    user-select: none;
}

.sett-hint {
    font-size: 0.82rem;
    color: rgba(15, 23, 42, 0.52);
    margin: 5px 0 10px;
    line-height: 1.55;
}

.sett-field-status {
    display: block;
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.4);
    margin: 6px 0 0;
    min-height: 18px;
    line-height: 1.4;
    transition: color 0.2s;
}

/* ── Buttons ── */
.sett-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    background: var(--accent-blue, #1d7df2);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(29, 125, 242, 0.3);
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    font-family: inherit;
}

.sett-btn-primary:hover {
    background: #0b64d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(29, 125, 242, 0.38);
}

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

.sett-btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 7px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.68);
    color: rgba(15, 23, 42, 0.6);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
    font-family: inherit;
    line-height: 1;
}

.sett-btn-inline:hover {
    background: rgba(29, 125, 242, 0.09);
    color: var(--accent-blue, #1d7df2);
    border-color: rgba(29, 125, 242, 0.24);
}

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

/* Gradient picker */
.sp-gradient-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.sp-gradient-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.sp-gradient-swatch span {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.42);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sett-color-input {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    padding: 3px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s, box-shadow 0.15s;
    background: transparent;
}

.sett-color-input::-webkit-color-swatch-wrapper { padding: 0; border-radius: 7px; overflow: hidden; }
.sett-color-input::-webkit-color-swatch { border: none; border-radius: 7px; }
.sett-color-input:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18); }

.sp-gradient-preview-bar {
    flex: 1;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #5b8def, #ffa276);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.45);
    transition: background 0.25s ease;
}

/* Save actions row */
.sp-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

/* Account stats */
.sp-stat-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.sp-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 14px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.55);
    text-align: center;
}

.sp-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
}

.sp-stat-label {
    font-size: 0.7rem;
    color: rgba(15, 23, 42, 0.44);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Toggle list (notifications) */
.sett-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.52);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
    cursor: pointer;
}

.settings-toggle-row + .settings-toggle-row {
    margin-top: 12px;
}

.settings-toggle-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-toggle-title {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
}

.settings-toggle-sub {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}

.settings-switch {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    width: 60px;
    height: 34px;
}

.settings-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.settings-switch-slider {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
    transition: background 0.22s ease, box-shadow 0.22s ease;
}

.settings-switch-slider::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(226, 232, 240, 0.94));
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    transition: transform 0.22s ease;
}

.settings-switch input:checked + .settings-switch-slider {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.92), rgba(37, 99, 235, 0.88));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.settings-switch input:checked + .settings-switch-slider::before {
    transform: translateX(26px);
}

.settings-notification-foot {
    margin-top: 15px;
}

.settings-notification-status {
    margin-top: 8px;
    min-height: 20px;
}

.settings-notification-status[data-state="error"] {
    color: #b91c1c;
}

.settings-notification-status[data-state="success"] {
    color: #0f766e;
}

/* ── Right: Live preview panel ── */
.sett-preview {
    border-left: 1px solid rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(14px);
    padding: 28px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.sett-preview-label {
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.38);
    margin: 0 0 14px;
    align-self: flex-start;
}

.sett-preview-hint {
    font-size: 0.72rem;
    color: rgba(15, 23, 42, 0.34);
    margin: 10px 0 0;
    text-align: center;
}

/* ── Discord-dark settings preview card ── */
.sett-preview-card {
    width: 100%;
    max-width: 232px;
    background: #232428;
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.18),
        0 1px 4px rgba(0, 0, 0, 0.1);
}

.sett-prev-banner {
    height: 70px;
    background: linear-gradient(135deg, #5b8def, #ffa276);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px 10px 0 0;
    transition: background-image 0.2s ease;
    position: relative;
}

.sett-prev-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.2));
    pointer-events: none;
}

.sett-prev-avatar-wrap {
    padding: 0 12px;
}

.sett-prev-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid #232428;
    overflow: hidden;
    margin-top: -26px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.sett-prev-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sett-prev-body {
    padding: 6px 14px 14px;
}

.sett-prev-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1px;
    word-break: break-word;
}

.sett-prev-tag {
    font-size: 0.74rem;
    color: #b5bac1;
    margin-bottom: 8px;
}

.sett-prev-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.sett-prev-role {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #2b2d31;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ddd;
}

.sett-prev-role::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5865f2;
    flex-shrink: 0;
}

.sett-prev-bio-section {
    background: #111214;
    border-radius: 6px;
    padding: 8px 10px;
}

.sett-prev-section-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b5bac1;
    margin-bottom: 4px;
}

.sett-prev-bio {
    font-size: 0.78rem;
    line-height: 1.5;
    color: #dbdee1;
    word-break: break-word;
    white-space: pre-wrap;
}

/* ── Settings preview: connections row ── */
.sett-prev-connections-section {
    padding: 8px 10px;
    background: #111214;
    border-radius: 6px;
    margin-top: 8px;
}

.sett-prev-connections {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sett-prev-conn-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.72rem;
}

.sett-prev-conn-icon.conn-yt { background: #FF0000; }
.sett-prev-conn-icon.conn-tw { background: #000; }
.sett-prev-conn-icon.conn-tt { background: #000; }
.sett-prev-conn-icon.conn-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }

/* =============================================
   SIDEBAR USER PANEL (Discord-style bottom bar)
   ============================================= */

.sidebar-user-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.52);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    transition: background 0.14s ease;
    cursor: default;
    margin-top: auto;
    position: relative;
}

/* Subtle gradient separator above the panel */
.sidebar-user-panel::after {
    content: '';
    position: absolute;
    top: -9px;
    left: 14px;
    right: 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.2), transparent);
    pointer-events: none;
}

.sidebar-user-panel:hover {
    background: rgba(255, 255, 255, 0.65);
}

.sup-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.sup-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sup-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #23a55a;
    border: 2.5px solid #fff;
}

.sup-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sup-name {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sup-tag {
    font-size: 0.68rem;
    color: rgba(15, 23, 42, 0.44);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sup-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.sup-action {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(15, 23, 42, 0.46);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.14s ease, color 0.14s ease;
}

.sup-action:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary, #0f172a);
}

.sup-logout:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

/* ── Connections settings pane ── */
.conn-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: linear-gradient(145deg, var(--glass-surface-strong, rgba(255,255,255,0.84)), var(--glass-surface, rgba(255,255,255,0.72)));
    border: 1px solid var(--glass-outline, rgba(148,163,184,0.22));
    border-radius: var(--radius-md, 16px);
    transition: border-color 0.2s;
}

.conn-item:hover {
    border-color: rgba(29, 125, 242, 0.24);
}

.conn-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.conn-item-icon.conn-yt { background: #FF0000; }
.conn-item-icon.conn-tw { background: #000; }
.conn-item-icon.conn-tt { background: #000; }
.conn-item-icon.conn-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }

.conn-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.conn-item-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary, rgba(8,15,29,0.9));
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.conn-input {
    width: 100%;
    font-size: 0.84rem;
}

/* Make sidebar use flex-column so panel stays at bottom */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex: 1;
}

/* =============================
   Ticket Sidebar (Dashboard)
   ============================= */
body[data-page="dashboard"] #tab-tickets .ticket-sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.74));
    border: 1px solid rgba(255, 255, 255, 0.65);
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-top {
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.8);
}

body[data-page="dashboard"] #tab-tickets .ticket-filter-pills {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    gap: 8px;
    padding: 12px 14px 10px;
    background: rgba(250, 252, 255, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

body[data-page="dashboard"] #tab-tickets .ticket-filter-pill {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .16s ease;
}

body[data-page="dashboard"] #tab-tickets .ticket-filter-pill:hover {
    border-color: rgba(14, 165, 233, 0.4);
    color: #0369a1;
}

body[data-page="dashboard"] #tab-tickets .ticket-filter-pill.active {
    color: #035b9c;
    border-color: rgba(14, 165, 233, 0.48);
    background: linear-gradient(180deg, rgba(224, 242, 254, 0.95), rgba(224, 242, 254, 0.75));
    box-shadow: 0 8px 18px rgba(14, 116, 144, 0.14);
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-tools,
body[data-page="dashboard"] #tab-support .ticket-sidebar-tools {
    padding: 0 14px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(248, 251, 255, 0.84);
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-search,
body[data-page="dashboard"] #tab-support .ticket-sidebar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.86);
    padding: 8px 10px;
    color: #64748b;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-search input,
body[data-page="dashboard"] #tab-support .ticket-sidebar-search input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #0f172a;
    font-size: 0.84rem;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-meta,
body[data-page="dashboard"] #tab-support .ticket-sidebar-meta {
    margin-top: 7px;
    font-weight: 600;
    color: #64748b;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 10px;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar .ticket-section-header {
    padding: 10px 14px;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-list {
    padding: 0 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    padding: 10px;
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.36);
    box-shadow: 0 14px 26px rgba(14, 116, 144, 0.12);
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card.active {
    border-color: rgba(56, 189, 248, 0.66);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18), 0 14px 26px rgba(14, 116, 144, 0.14);
}

body[data-page="dashboard"] #tab-tickets .ticket-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.25);
    flex-shrink: 0;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-avatar i {
    color: #64748b;
    font-size: 0.95rem;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-time {
    font-size: 0.7rem;
    color: #64748b;
    white-space: nowrap;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-ticket-id {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-status {
    width: fit-content;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-status.status-open {
    color: #0f766e;
    background: rgba(110, 231, 183, 0.25);
}

body[data-page="dashboard"] #tab-tickets .ticket-card-status.status-pending {
    color: #92400e;
    background: rgba(251, 191, 36, 0.28);
}

body[data-page="dashboard"] #tab-tickets .ticket-card-status.status-closed {
    color: #475569;
    background: rgba(203, 213, 225, 0.45);
}

body[data-page="dashboard"] #tab-tickets .ticket-card-preview {
    font-size: 0.75rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-right {
    align-self: flex-start;
    padding-top: 2px;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-unread {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(180deg, #38bdf8, #0284c7);
    box-shadow: 0 8px 16px rgba(2, 132, 199, 0.35);
}

body[data-page="dashboard"] #tab-tickets .ticket-status-badge.status-open {
    background: rgba(110, 231, 183, 0.25);
    color: #0f766e;
    border: 1px solid rgba(45, 212, 191, 0.34);
}

body[data-page="dashboard"] #tab-tickets .ticket-status-badge.status-pending {
    background: rgba(254, 240, 138, 0.5);
    color: #92400e;
    border: 1px solid rgba(251, 191, 36, 0.42);
}

body[data-page="dashboard"] #tab-tickets .ticket-status-badge.status-closed {
    background: rgba(226, 232, 240, 0.75);
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

/* =============================
   Ticket Chat Layout (Dashboard)
   ============================= */
body[data-page="dashboard"] #tab-tickets #ticket-chat-panel.hidden {
    display: none !important;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-panel {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.58);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.09);
}

body[data-page="dashboard"] #tab-tickets .ticket-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.7);
}

body[data-page="dashboard"] #tab-tickets .ticket-chat-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

/* ── Right side of ticket header: claimed bar + status badge ── */
body[data-page="dashboard"] #tab-tickets .ticket-chat-head-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Claimed-by pill */
body[data-page="dashboard"] .ticket-claimed-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px 4px 5px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    font-size: 0.75rem;
    color: #4338ca;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
}

body[data-page="dashboard"] .ticket-claimed-bar.hidden {
    display: none !important;
}

body[data-page="dashboard"] .ticket-claimed-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body[data-page="dashboard"] .ticket-claimed-avatar:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
}

body[data-page="dashboard"] .ticket-claimed-text {
    overflow: hidden;
    text-overflow: ellipsis;
    color: #4338ca;
    font-weight: 500;
}

body[data-page="dashboard"] .ticket-claimed-text strong {
    font-weight: 700;
    color: #3730a3;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-title {
    margin: 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-meta {
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
}

body[data-page="dashboard"] #tab-tickets .ticket-chat-compose {
    position: sticky;
    bottom: 0;
    z-index: 4;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 251, 255, 0.96));
    backdrop-filter: blur(14px);
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-new-messages {
    position: absolute;
    left: 50%;
    bottom: 118px;
    transform: translateX(-50%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(255, 255, 255, 0.92);
    color: #0369a1;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.79rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(14, 116, 144, 0.14);
    z-index: 5;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-new-messages.hidden {
    display: none;
}

/* =============================
   Reply Styles
   ============================= */
body[data-page="dashboard"] #tab-tickets .ticket-reply-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(240, 249, 255, 0.75);
}

body[data-page="dashboard"] #tab-tickets .ticket-reply-preview.hidden {
    display: none;
}

body[data-page="dashboard"] #tab-tickets .ticket-reply-preview-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body[data-page="dashboard"] #tab-tickets .ticket-reply-preview-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0369a1;
    font-size: 0.8rem;
    font-weight: 700;
}

body[data-page="dashboard"] #tab-tickets .ticket-reply-preview-text {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

body[data-page="dashboard"] #tab-tickets .ticket-reply-cancel {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.94);
    color: #475569;
    border-radius: 999px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

body[data-page="dashboard"] #tab-tickets .msg-reply-context {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    padding: 6px 8px;
    border-left: 3px solid rgba(14, 165, 233, 0.75);
    border-radius: 9px;
    background: rgba(224, 242, 254, 0.66);
    color: #0f4c81;
    font-size: 0.76rem;
    line-height: 1.35;
    cursor: pointer;
    overflow-wrap: anywhere;
    user-select: text;
    -webkit-user-select: text;
}

body[data-page="dashboard"] #tab-tickets .msg-reply-context:hover {
    background: rgba(224, 242, 254, 0.9);
}

@keyframes ticket-message-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.42);
    }

    100% {
        box-shadow: 0 0 0 12px rgba(56, 189, 248, 0);
    }
}

body[data-page="dashboard"] #tab-tickets .msg-target-highlight .ticket-msg-inner {
    animation: ticket-message-pulse 1.2s ease;
}

/* =============================
   Input Styles
   ============================= */
body[data-page="dashboard"] #tab-tickets .ticket-closed-overlay {
    padding: 12px 14px;
    text-align: center;
    background: rgba(254, 242, 242, 0.96);
    border-bottom: 1px solid rgba(248, 113, 113, 0.2);
}

body[data-page="dashboard"] #tab-tickets .ticket-closed-overlay p {
    margin: 0;
    color: #b91c1c;
    font-size: 0.86rem;
    font-weight: 600;
}

body[data-page="dashboard"] #tab-tickets .ticket-chat-form {
    padding: 12px 14px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
}

body[data-page="dashboard"] #tab-tickets .ticket-chat-form.is-disabled {
    opacity: 0.62;
}

body[data-page="dashboard"] #tab-tickets .ticket-chat-attach {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-input {
    width: 100%;
    min-height: 40px;
    border-radius: 14px;
    padding: 10px 14px;
}

body[data-page="dashboard"] #tab-tickets .ticket-chat-send {
    min-width: 44px;
    height: 40px;
    border-radius: 999px;
    padding: 0 14px;
}

body[data-page="dashboard"] #tab-tickets .sky-img-preview {
    margin: 10px 14px 0;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.78);
}

body[data-page="dashboard"] #tab-tickets .sky-drop-active {
    box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.35);
    background: rgba(224, 242, 254, 0.35);
}

/* =============================
   Bubble Styles
   ============================= */
body[data-page="dashboard"] #tab-tickets .msg-row,
body[data-page="dashboard"] #tab-tickets .ticket-msg {
    width: 100%;
    display: flex;
    margin: 0;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--them {
    justify-content: flex-start;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--me {
    justify-content: flex-end;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: min(520px, 72%);
    margin-left: 0;
    margin-right: 0;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-inner {
    border-color: rgba(56, 189, 248, 0.28);
    background: linear-gradient(145deg, rgba(224, 242, 254, 0.95), rgba(186, 230, 253, 0.95));
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 36px;
    margin-bottom: 6px;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-header {
    justify-content: flex-end;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-avatar img,
body[data-page="dashboard"] #tab-tickets .ticket-msg-avatar-fallback {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: cover;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(226, 232, 240, 0.95);
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-avatar {
    display: none;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-meta {
    align-items: flex-end;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    user-select: text;
    -webkit-user-select: text;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-name {
    color: #0f4c81;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-time {
    font-size: 0.71rem;
    color: #64748b;
    user-select: text;
    -webkit-user-select: text;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-role {
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 7px;
    letter-spacing: .04em;
    width: fit-content;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-role.role-client {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-role.role-artist {
    background: rgba(56, 189, 248, 0.18);
    color: #075985;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-role.role-admin {
    background: rgba(244, 114, 182, 0.18);
    color: #9d174d;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-text {
    margin: 0;
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.46;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    user-select: text;
    -webkit-user-select: text;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-text {
    color: #0f172a;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-text a,
body[data-page="dashboard"] #tab-tickets .ticket-msg a {
    color: #0369a1;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-image {
    margin-top: 8px;
    max-width: 100%;
    border-radius: 12px;
    display: block;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-file {
    margin-top: 8px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(248, 250, 252, 0.95);
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner .msg-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity .12s ease, transform .12s ease;
    pointer-events: none;
    z-index: 2;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner:hover .msg-actions,
body[data-page="dashboard"] #tab-tickets .ticket-msg-inner:focus-within .msg-actions {
    opacity: 1;
    transform: translateY(0);
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner .msg-actions .msg-reply-btn {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.92));
    color: #0f4c81;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(8px);
    cursor: pointer;
    pointer-events: auto;
    display: grid;
    place-items: center;
    transition: transform .12s ease, border-color .12s ease, background .12s ease, color .12s ease;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner .msg-actions .msg-reply-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.52);
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.98), rgba(224, 242, 254, 0.95));
    color: #075985;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner .msg-actions .msg-reply-btn svg {
    width: 15px;
    height: 15px;
    display: block;
    stroke: currentColor;
    pointer-events: none;
}

@media (max-width: 900px) {
    .settings-v2-id-row {
        grid-template-columns: 1fr;
    }

    .settings-v2-avatar-bio-row {
        grid-template-columns: 1fr;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-sidebar-top {
        padding: 10px;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-filter-pills {
        padding: 10px;
        overflow-x: auto;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-filter-pill {
        flex: 0 0 auto;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-sidebar-list {
        padding: 0 8px 10px;
    }

    body[data-page="dashboard"] #tab-tickets #ticket-chat-panel {
        min-height: 58vh;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-msg-inner {
        max-width: 90%;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-chat-form {
        grid-template-columns: auto 1fr auto;
        padding: 10px;
    }

    body[data-page="dashboard"] #tab-tickets #ticket-chat-new-messages {
        bottom: 112px;
    }
}

/* =========================================================
   Liquid Glass Pass - Dashboard (Light Only)
   ========================================================= */

body[data-page="dashboard"] {
  color: var(--text-primary);
}

body[data-page="dashboard"] .dashboard-sidebar,
body[data-page="dashboard"] .dashboard-topbar,
body[data-page="dashboard"] .dash-card,
body[data-page="dashboard"] .welcome-banner,
body[data-page="dashboard"] .ticket-sidebar,
body[data-page="dashboard"] .ticket-main,
body[data-page="dashboard"] .settings-v2-wrap,
body[data-page="dashboard"] .gallery-viewer-card,
body[data-page="dashboard"] .context-menu {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.84), rgba(247, 251, 255, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 36px rgba(110, 139, 186, 0.18);
}

body[data-page="dashboard"] .sidebar-nav .nav-item {
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: 14px;
}

body[data-page="dashboard"] .sidebar-nav .nav-item.active {
  color: var(--accent-blue-strong);
  border-color: rgba(29, 125, 242, 0.34);
  background: linear-gradient(145deg, rgba(29, 125, 242, 0.18), rgba(29, 125, 242, 0.08));
}

body[data-page="dashboard"] #tab-tickets .ticket-filter-pill {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text-secondary);
}

body[data-page="dashboard"] #tab-tickets .ticket-filter-pill.active {
  color: var(--accent-blue-strong);
  border-color: rgba(29, 125, 242, 0.36);
  background: rgba(29, 125, 242, 0.15);
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.74));
  border: 1px solid rgba(148, 163, 184, 0.28);
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card.active {
  border-color: rgba(29, 125, 242, 0.4);
  box-shadow: inset 0 0 0 1px rgba(29, 125, 242, 0.2), 0 12px 24px rgba(29, 125, 242, 0.14);
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-panel {
  background: transparent;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  align-items: stretch;
  padding: 16px;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg,
body[data-page="dashboard"] #tab-tickets .msg-row {
  width: 100%;
  display: flex;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--them {
  justify-content: flex-start;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--me {
  justify-content: flex-end;
}

/* Updated bubble background: glass gradient for incoming messages */
body[data-page="dashboard"] #tab-tickets .ticket-msg-inner {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 255, 0.8));
  box-shadow: 0 10px 22px rgba(114, 146, 196, 0.16);
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-inner {
  background: linear-gradient(145deg, rgba(29, 125, 242, 0.18), rgba(29, 125, 242, 0.08));
  border-color: rgba(29, 125, 242, 0.3);
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-text,
body[data-page="dashboard"] #tab-tickets .ticket-msg,
body[data-page="dashboard"] #tab-tickets .ticket-msg a {
  overflow-wrap: anywhere;
  user-select: text;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-image {
  border-radius: 12px;
  max-width: 100%;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner .msg-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner:hover .msg-actions,
body[data-page="dashboard"] #tab-tickets .ticket-msg-inner:focus-within .msg-actions {
  opacity: 1;
  transform: translateY(0);
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner .msg-actions .msg-reply-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(245, 250, 255, 0.82));
  box-shadow: 0 8px 16px rgba(119, 149, 197, 0.2);
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner .msg-actions .msg-reply-btn:hover {
  border-color: rgba(29, 125, 242, 0.4);
  transform: translateY(-1px);
}

body[data-page="dashboard"] #tab-tickets .ticket-chat-compose {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.8), rgba(246, 251, 255, 0.96));
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body[data-page="dashboard"] #tab-tickets .ticket-reply-preview,
body[data-page="dashboard"] #tab-tickets .msg-reply-context {
  background: linear-gradient(145deg, rgba(29, 125, 242, 0.13), rgba(255, 255, 255, 0.76));
  border: 1px solid rgba(29, 125, 242, 0.28);
}

body[data-page="dashboard"] #tab-tickets .ticket-chat-form {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-input {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-new-messages {
  background: linear-gradient(145deg, var(--accent-blue), var(--accent-blue-strong));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 20px rgba(29, 125, 242, 0.28);
}

body[data-page="dashboard"] .settings-v2-wrap .settings-banner-preview,
body[data-page="dashboard"] .settings-v2-wrap .settings-avatar-preview {
  border: 1px dashed rgba(29, 125, 242, 0.3);
  background: rgba(255, 255, 255, 0.64);
}

body[data-page="dashboard"] .modal-overlay {
  background: linear-gradient(rgba(244, 250, 255, 0.56), rgba(231, 241, 255, 0.74));
}

@media (max-width: 900px) {
    body[data-page="dashboard"] #tab-tickets .ticket-msg-inner {
        max-width: 90%;
    }

    .settings-notification-card__head,
    .settings-toggle-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-switch {
        align-self: flex-end;
    }

    body[data-page="dashboard"] .dashboard-sidebar,
    body[data-page="dashboard"] .dashboard-topbar {
        border-radius: 18px;
    }
}

/* =========================================================
   Ticket Chat Alignment Guardrails (dashboard only)
   ========================================================= */
body[data-page="dashboard"] #tab-tickets #ticket-chat-messages {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row {
  width: 100%;
  display: flex;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row.outgoing {
  justify-content: flex-end;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row.incoming {
  justify-content: flex-start;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg {
  width: auto;
  margin: 0;
  display: block;
  flex: 0 1 auto;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .ticket-msg-inner {
  margin: 0;
  max-width: min(520px, 72%);
}

@media (max-width: 900px) {
  body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .ticket-msg-inner {
    max-width: 90%;
  }
}

/* Final ticket bubble sizing/wrapping guardrails: keep bubbles normal, never vertical. */
body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg {
  display: block;
  width: auto;
  max-width: min(520px, 72%);
  min-width: 180px;
  margin: 0;
  flex: 0 1 auto;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .message-bubble,
body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .ticket-msg-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 18px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.35;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .ticket-msg-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .ticket-msg-text,
body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .ticket-msg-name,
body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .ticket-msg-time,
body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .ticket-msg-role,
body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .ticket-msg-text a {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.35;
}

body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .msg-reply-context {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 260px;
  padding: 6px 10px;
  border-radius: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.35;
}

@media (max-width: 900px) {
  body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg {
    max-width: 90%;
    min-width: 0;
  }

  body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .message-bubble,
  body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .ticket-msg-inner {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg .msg-reply-context {
    max-width: 200px;
  }
}

/* ── 3-column ticket layout tweaks ── */
body[data-page="dashboard"] #tab-tickets .ticket-sidebar {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  border-right: 1px solid rgba(148, 163, 184, 0.18);
}
body[data-page="dashboard"] #tab-tickets .ticket-main {
  border-radius: 0;
  border-right: none;
}
/* Wrap the ticket layout group so the addon sidebar shares the same card look */
body[data-page="dashboard"] #tab-tickets .ticket-layout {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(30, 64, 175, 0.06), 0 1px 3px rgba(30, 64, 175, 0.04);
}
body[data-page="dashboard"] #tab-tickets .addon-right-sidebar {
  background: linear-gradient(160deg, rgba(250,252,255,0.82) 0%, rgba(242,248,255,0.70) 100%);
}

/* =========================================
   SUPPORT TICKET LAYOUT (2-column, no addon sidebar)
   ========================================= */
.support-ticket-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: 100%;
}

@media (max-width: 900px) {
  .support-ticket-layout {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   Support Chat Parity (Dashboard Support Tab)
   ========================================= */
body[data-page="dashboard"] #tab-support .ticket-filter-pill {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text-secondary);
}

body[data-page="dashboard"] #tab-support .ticket-filter-pill.active {
  color: var(--accent-blue-strong);
  border-color: rgba(29, 125, 242, 0.36);
  background: rgba(29, 125, 242, 0.15);
}

body[data-page="dashboard"] #tab-support .ticket-sidebar-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.74));
  border: 1px solid rgba(148, 163, 184, 0.28);
}

body[data-page="dashboard"] #tab-support .ticket-sidebar-card.active {
  border-color: rgba(29, 125, 242, 0.4);
  box-shadow: inset 0 0 0 1px rgba(29, 125, 242, 0.2), 0 12px 24px rgba(29, 125, 242, 0.14);
}

body[data-page="dashboard"] #tab-support #support-chat-panel.hidden {
  display: none !important;
}

body[data-page="dashboard"] #tab-support #support-chat-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  background: transparent;
}

body[data-page="dashboard"] #tab-support .ticket-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.7);
}

body[data-page="dashboard"] #tab-support .ticket-chat-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body[data-page="dashboard"] #tab-support #support-chat-title {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="dashboard"] #tab-support #support-chat-meta {
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="dashboard"] #tab-support #support-chat-messages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  width: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

body[data-page="dashboard"] #tab-support .ticket-chat-compose {
  position: sticky;
  bottom: 0;
  z-index: 4;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.8), rgba(246, 251, 255, 0.96));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body[data-page="dashboard"] #tab-support #support-chat-new-messages {
  position: absolute;
  left: 50%;
  bottom: 118px;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.79rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  z-index: 5;
  background: linear-gradient(145deg, var(--accent-blue), var(--accent-blue-strong));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 20px rgba(29, 125, 242, 0.28);
}

body[data-page="dashboard"] #tab-support #support-chat-new-messages.hidden {
  display: none;
}

body[data-page="dashboard"] #tab-support .ticket-reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(145deg, rgba(29, 125, 242, 0.13), rgba(255, 255, 255, 0.76));
  border: 1px solid rgba(29, 125, 242, 0.28);
  border-left: 0;
  border-right: 0;
}

body[data-page="dashboard"] #tab-support .ticket-reply-preview.hidden {
  display: none;
}

body[data-page="dashboard"] #tab-support .ticket-reply-preview-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body[data-page="dashboard"] #tab-support .ticket-reply-preview-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0369a1;
  font-size: 0.8rem;
  font-weight: 700;
}

body[data-page="dashboard"] #tab-support .ticket-reply-preview-text {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
}

body[data-page="dashboard"] #tab-support .ticket-reply-cancel {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.94);
  color: #475569;
  border-radius: 999px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

body[data-page="dashboard"] #tab-support .ticket-closed-overlay {
  padding: 12px 14px;
  text-align: center;
  background: rgba(254, 242, 242, 0.96);
  border-bottom: 1px solid rgba(248, 113, 113, 0.2);
}

body[data-page="dashboard"] #tab-support .ticket-closed-overlay p {
  margin: 0;
  color: #b91c1c;
  font-size: 0.86rem;
  font-weight: 600;
}

body[data-page="dashboard"] #tab-support .ticket-chat-form {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
}

body[data-page="dashboard"] #tab-support .ticket-chat-form.is-disabled {
  opacity: 0.62;
}

body[data-page="dashboard"] #tab-support .ticket-chat-attach {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

body[data-page="dashboard"] #tab-support #support-chat-input {
  width: 100%;
  min-height: 40px;
  border-radius: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

body[data-page="dashboard"] #tab-support .ticket-chat-send {
  min-width: 44px;
  height: 40px;
  border-radius: 999px;
  padding: 0 14px;
}

body[data-page="dashboard"] #tab-support .msg-row,
body[data-page="dashboard"] #tab-support .ticket-msg {
  width: 100%;
  display: flex;
  margin: 0;
}

body[data-page="dashboard"] #tab-support .ticket-msg--them {
  justify-content: flex-start;
}

body[data-page="dashboard"] #tab-support .ticket-msg--me {
  justify-content: flex-end;
}

body[data-page="dashboard"] #tab-support .ticket-msg-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  width: auto;
  max-width: min(520px, 72%);
  margin: 0;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 255, 0.8));
  box-shadow: 0 10px 22px rgba(114, 146, 196, 0.16);
  gap: 8px;
}

body[data-page="dashboard"] #tab-support .ticket-msg--me .ticket-msg-inner {
  background: linear-gradient(145deg, rgba(29, 125, 242, 0.18), rgba(29, 125, 242, 0.08));
  border-color: rgba(29, 125, 242, 0.3);
}

body[data-page="dashboard"] #tab-support .ticket-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 36px;
  min-width: 0;
}

body[data-page="dashboard"] #tab-support .ticket-msg--me .ticket-msg-header {
  justify-content: flex-end;
}

body[data-page="dashboard"] #tab-support .ticket-msg-avatar img,
body[data-page="dashboard"] #tab-support .ticket-msg-avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(226, 232, 240, 0.95);
}

body[data-page="dashboard"] #tab-support .ticket-msg--me .ticket-msg-avatar {
  display: none;
}

body[data-page="dashboard"] #tab-support .ticket-msg-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

body[data-page="dashboard"] #tab-support .ticket-msg--me .ticket-msg-meta {
  align-items: flex-end;
}

body[data-page="dashboard"] #tab-support .ticket-msg-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

body[data-page="dashboard"] #tab-support .ticket-msg--me .ticket-msg-name {
  color: #0f4c81;
}

body[data-page="dashboard"] #tab-support .ticket-msg-time {
  font-size: 0.71rem;
  color: #64748b;
}

body[data-page="dashboard"] #tab-support .ticket-msg-role {
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
  letter-spacing: .04em;
  width: fit-content;
}

body[data-page="dashboard"] #tab-support .ticket-msg-role.role-client {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
}

body[data-page="dashboard"] #tab-support .ticket-msg-role.role-admin {
  background: rgba(244, 114, 182, 0.18);
  color: #9d174d;
}

body[data-page="dashboard"] #tab-support .ticket-msg-text,
body[data-page="dashboard"] #tab-support .ticket-msg,
body[data-page="dashboard"] #tab-support .ticket-msg a {
  margin: 0;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.46;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  user-select: text;
  -webkit-user-select: text;
}

body[data-page="dashboard"] #tab-support .ticket-msg-image {
  margin-top: 8px;
  max-width: 100%;
  border-radius: 12px;
  display: block;
}

body[data-page="dashboard"] #tab-support .ticket-msg-file {
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(248, 250, 252, 0.95);
}

body[data-page="dashboard"] #tab-support .msg-reply-context {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 260px;
  margin-bottom: 0;
  padding: 6px 10px;
  border-radius: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  background: linear-gradient(145deg, rgba(29, 125, 242, 0.13), rgba(255, 255, 255, 0.76));
  border: 1px solid rgba(29, 125, 242, 0.28);
}

body[data-page="dashboard"] #tab-support .msg-reply-context:hover {
  background: linear-gradient(145deg, rgba(29, 125, 242, 0.18), rgba(255, 255, 255, 0.9));
}

body[data-page="dashboard"] #tab-support .msg-target-highlight .ticket-msg-inner {
  animation: ticket-message-pulse 1.2s ease;
}

body[data-page="dashboard"] #tab-support .ticket-msg-inner .msg-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

body[data-page="dashboard"] #tab-support .ticket-msg-inner:hover .msg-actions,
body[data-page="dashboard"] #tab-support .ticket-msg-inner:focus-within .msg-actions {
  opacity: 1;
  transform: translateY(0);
}

body[data-page="dashboard"] #tab-support .ticket-msg-inner .msg-actions .msg-reply-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(245, 250, 255, 0.82));
  box-shadow: 0 8px 16px rgba(119, 149, 197, 0.2);
  color: #0f4c81;
  cursor: pointer;
  display: grid;
  place-items: center;
}

body[data-page="dashboard"] #tab-support .ticket-msg-inner .msg-actions .msg-reply-btn:hover {
  border-color: rgba(29, 125, 242, 0.4);
  transform: translateY(-1px);
}

body[data-page="dashboard"] #tab-support .ticket-msg-inner .msg-actions .msg-reply-btn svg {
  width: 15px;
  height: 15px;
  display: block;
  stroke: currentColor;
}

body[data-page="dashboard"] #tab-support #support-chat-messages > .msg-row {
  width: 100%;
  display: flex;
}

body[data-page="dashboard"] #tab-support #support-chat-messages > .msg-row.outgoing {
  justify-content: flex-end;
}

body[data-page="dashboard"] #tab-support #support-chat-messages > .msg-row.incoming {
  justify-content: flex-start;
}

body[data-page="dashboard"] #tab-support #support-chat-messages > .msg-row > .ticket-msg {
  display: block;
  width: auto;
  max-width: min(520px, 72%);
  min-width: 180px;
  flex: 0 1 auto;
  margin: 0;
}

body[data-page="dashboard"] #tab-support #support-chat-messages > .msg-row > .ticket-msg .message-bubble,
body[data-page="dashboard"] #tab-support #support-chat-messages > .msg-row > .ticket-msg .ticket-msg-inner {
  width: fit-content;
  max-width: 100%;
  min-width: 180px;
}

@media (max-width: 900px) {
  body[data-page="dashboard"] #tab-support #support-chat-panel {
    min-height: 58vh;
  }

  body[data-page="dashboard"] #tab-support .ticket-msg-inner,
  body[data-page="dashboard"] #tab-support #support-chat-messages > .msg-row > .ticket-msg,
  body[data-page="dashboard"] #tab-support #support-chat-messages > .msg-row > .ticket-msg .message-bubble,
  body[data-page="dashboard"] #tab-support #support-chat-messages > .msg-row > .ticket-msg .ticket-msg-inner {
    max-width: 90%;
    min-width: 0;
    width: 100%;
  }

  body[data-page="dashboard"] #tab-support .ticket-chat-form {
    grid-template-columns: auto 1fr auto;
    padding: 10px;
  }

  body[data-page="dashboard"] #tab-support #support-chat-new-messages {
    bottom: 112px;
  }

  body[data-page="dashboard"] #tab-support .msg-reply-context {
    max-width: 200px;
  }
}

/* ================================================
   Home Tab V2
   ================================================ */

/* Welcome Banner */
body[data-page="dashboard"] .welcome-banner.home-welcome-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    margin-bottom: 16px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.88) 0%,
        rgba(213, 232, 255, 0.72) 100%);
    overflow: hidden;
    position: relative;
}

body[data-page="dashboard"] .welcome-banner.home-welcome-v2::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 85% 50%, rgba(29, 125, 242, 0.1) 0%, transparent 65%);
    pointer-events: none;
    animation: welcomeGlowPulse 4s ease-in-out infinite alternate;
}

@keyframes welcomeGlowPulse {
    0% { opacity: 0.7; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1.05); }
}

.home-welcome-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1;
    position: relative;
}

.home-welcome-eyebrow {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    color: var(--lg-accent-primary);
}

.home-welcome-title {
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    font-weight: 800;
    margin: 0 0 4px;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--lg-text-main);
    font-family: 'Poppins', sans-serif;
}

.home-welcome-title span {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #6450dc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.home-welcome-sub {
    margin: 0 0 14px;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
}

.home-welcome-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.home-welcome-deco {
    font-size: clamp(3.5rem, 7vw, 5.5rem);
    color: rgba(29, 125, 242, 0.13);
    flex-shrink: 0;
    z-index: 1;
    position: relative;
    filter: drop-shadow(0 8px 24px rgba(29, 125, 242, 0.1));
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s ease;
    user-select: none;
}

body[data-page="dashboard"] .welcome-banner.home-welcome-v2:hover .home-welcome-deco {
    color: rgba(29, 125, 242, 0.26);
    transform: scale(1.08) rotate(10deg);
}

/* Stats Strip */
.home-stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    transition: opacity 0.5s ease;
}

body.dashboard-intro-playing .home-stats-strip {
    opacity: 0;
}

.home-stat-pill {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    cursor: default;
    border-radius: 14px !important;
}

.home-stat-pill-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.home-stat-icon-blue {
    background: linear-gradient(135deg, rgba(29, 125, 242, 0.08), rgba(29, 125, 242, 0.18));
    color: var(--accent-blue);
}

.home-stat-icon-purple {
    background: linear-gradient(135deg, rgba(100, 80, 220, 0.08), rgba(100, 80, 220, 0.18));
    color: #6450dc;
}

.home-stat-icon-amber {
    background: linear-gradient(135deg, rgba(211, 131, 0, 0.08), rgba(211, 131, 0, 0.18));
    color: var(--warning);
}

.home-stat-icon-green {
    background: linear-gradient(135deg, rgba(15, 159, 95, 0.08), rgba(15, 159, 95, 0.18));
    color: var(--success);
}

.home-stat-pill-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.home-stat-pill-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lg-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

.home-stat-pill-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Home Content Grid */
.home-content-grid {
    grid-template-columns: 1fr 300px;
    align-items: start;
}

/* Card Header with Icon */
.dash-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.dash-card-head-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    flex-shrink: 0;
}

.dash-card-head h4 {
    margin: 0;
}

.dash-card-head-text {
    flex: 1;
    min-width: 0;
}

.dash-card-sub {
    font-size: 0.78rem;
    margin: 1px 0 0;
}

.dash-card-see-all {
    font-size: 0.78rem;
    padding: 5px 12px;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.home-tickets-card .dash-list {
    min-height: 120px;
}

/* Home dash ticket items */
#dash-my-tickets-list .dash-ticket-item {
    width: 100%;
    text-align: left;
}

.dash-ticket-item-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.dash-ticket-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--lg-text-main);
}

.dash-ticket-preview {
    font-size: 0.8rem;
    color: var(--lg-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.dash-ticket-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 12px;
}

.dash-ticket-time {
    font-size: 0.72rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .home-stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body[data-page="dashboard"] .welcome-banner.home-welcome-v2 {
        padding: 22px 20px;
        gap: 0;
    }

    .home-welcome-deco {
        display: none;
    }

    .home-welcome-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .home-stats-strip {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   Intro Loading Veil
   ================================================ */

.dash-intro-veil {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-base, #eef4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.dash-veil-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    animation: dash-veil-pulse 1.1s ease-in-out infinite;
    filter: drop-shadow(0 6px 18px rgba(29, 125, 242, 0.22));
}

@keyframes dash-veil-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.1); }
}

.dash-intro-veil.is-fading {
    transition: opacity 0.45s ease;
    opacity: 0;
    pointer-events: none;
}

/* =====================================================
   MOBILE EXCELLENCE — DASHBOARD IMPROVEMENTS
   ===================================================== */

/* Sidebar icon-only nav — bigger tap targets + centered icons */
@media (max-width: 900px) {
    .dashboard-sidebar {
        /* Tighter pill shape, slight shadow */
        margin: 8px 10px 0;
        padding: 6px 10px;
        gap: 4px;
        border-radius: 20px;
        /* Smooth horizontal scroll, hide bar */
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .dashboard-sidebar::-webkit-scrollbar { display: none; }

    /* Flatten nav groups for horizontal layout */
    .sidebar-nav-label { display: none !important; }
    .sidebar-nav-group { display: contents; }
    .sidebar-nav-group + .sidebar-nav-group { margin-top: 0; }
    .nav-icon-wrap { width: auto; height: auto; background: transparent !important; border-radius: 0; }
    .sidebar-nav .nav-item.active::before { display: none; }
    .sidebar-user-panel { display: none !important; }
    .sidebar-user-panel::after { display: none; }

    /* Icon-only nav items — bigger square tap targets */
    .sidebar-nav {
        flex-direction: row;
        gap: 2px;
    }

    .sidebar-nav .nav-item {
        min-width: 48px;
        min-height: 48px;
        padding: 0;
        width: 48px;
        height: 48px;
        border-radius: 16px;
        justify-content: center;
        align-items: center;
        gap: 0;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .sidebar-nav .nav-item i {
        font-size: 1.2rem;
        width: auto;
    }

    /* Sidebar logo — compact icon-only on mobile */
    .sidebar-logo {
        padding: 0;
        min-width: 44px;
        height: 48px;
        justify-content: center;
        flex-shrink: 0;
    }
    .sidebar-logo img { height: 30px; }

    /* Sidebar footer inline */
    .sidebar-footer {
        margin-left: auto;
        padding: 0;
        border: none;
        display: flex;
        flex-direction: row;
        gap: 2px;
    }
    .sidebar-footer .nav-item {
        min-width: 48px;
        min-height: 48px;
        width: 48px;
        height: 48px;
        padding: 0;
        border-radius: 16px;
        justify-content: center;
    }

    /* Dashboard content: full height minus compact sidebar */
    .dashboard-content {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* Ticket layout on mobile — smoother two-pane toggle */
@media (max-width: 900px) {
    body[data-page="dashboard"] #tab-tickets .ticket-sidebar {
        max-height: 38vh;
        min-height: 160px;
    }

    body[data-page="dashboard"] #tab-tickets #ticket-chat-panel {
        /* dvh fallback */
        min-height: 55vh;
    }

    /* Use dvh if supported */
    @supports (height: 100dvh) {
        body[data-page="dashboard"] #tab-tickets #ticket-chat-panel {
            min-height: 55dvh;
        }
    }

    /* Chat form stays at bottom with safe area */
    body[data-page="dashboard"] #tab-tickets .ticket-chat-form {
        position: sticky;
        bottom: 0;
        background: var(--lg-glass-bg, rgba(255,255,255,0.9));
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        z-index: 10;
    }

    /* Filter pills — horizontal scroll with momentum */
    body[data-page="dashboard"] #tab-tickets .ticket-filter-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        padding: 10px 12px;
    }
    body[data-page="dashboard"] #tab-tickets .ticket-filter-pills::-webkit-scrollbar { display: none; }

    body[data-page="dashboard"] #tab-tickets .ticket-filter-pill {
        flex-shrink: 0;
        min-height: 36px;
    }

    /* Ticket list items — bigger touch target */
    .ticket-card {
        min-height: 64px;
    }
}

/* Home tab welcome strip — stack actions on small screens */
@media (max-width: 600px) {
    .home-welcome-actions {
        flex-direction: column;
        gap: 10px;
    }
    .home-welcome-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .home-stats-strip {
        gap: 10px;
    }
    .dash-stat-card {
        padding: 16px;
    }
}

/* Settings modal — full-screen on mobile with safe areas */
@media (max-width: 600px) {
    .settings-v2-wrap {
        border-radius: 20px 20px 0 0;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .settings-tabs-row {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding-bottom: 4px;
    }
    .settings-tabs-row::-webkit-scrollbar { display: none; }

    .settings-tab-btn {
        flex-shrink: 0;
        min-height: 40px;
    }
}

/* Gallery grid — 2 columns on mobile */
@media (max-width: 600px) {
    .gallery-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .gallery-sort-select {
        flex: 1;
    }

    .my-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .my-gallery-preview {
        height: 140px;
    }
}
@media (max-width: 380px) {
    .my-gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    body[data-page="dashboard"] {
        overflow: auto;
        min-height: 100vh;
    }

    @supports (height: 100dvh) {
        body[data-page="dashboard"] {
            min-height: 100dvh;
        }
    }

    body[data-page="dashboard"] .dashboard-container {
        height: auto;
        min-height: 100vh;
        width: 100%;
    }

    @supports (height: 100dvh) {
        body[data-page="dashboard"] .dashboard-container {
            min-height: 100dvh;
        }
    }

    body[data-page="dashboard"] .dashboard-sidebar {
        width: auto;
        height: auto;
        margin: 12px 12px 0;
        padding: 14px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        overflow: visible;
    }

    body[data-page="dashboard"] .sidebar-logo {
        grid-column: 1 / -1;
        margin: 0;
        padding: 0;
    }

    body[data-page="dashboard"] .sidebar-logo span,
    body[data-page="dashboard"] .sidebar-nav .nav-item > span:not(.lg-badge),
    body[data-page="dashboard"] .sidebar-footer .nav-item > span {
        display: block;
    }

    body[data-page="dashboard"] .sidebar-nav .nav-item .lg-badge {
        display: inline-flex;
        margin-left: auto;
    }

    body[data-page="dashboard"] .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    body[data-page="dashboard"] .sidebar-nav .nav-item,
    body[data-page="dashboard"] .sidebar-footer .nav-item {
        width: 100%;
        height: auto;
        min-height: 52px;
        padding: 12px 14px;
        justify-content: flex-start;
        gap: 10px;
    }

    body[data-page="dashboard"] .sidebar-footer {
        grid-column: 1 / -1;
        margin-left: 0;
        padding-top: 0;
        border-top: none;
        display: block;
    }

    body[data-page="dashboard"] .dashboard-main {
        height: auto;
        padding: 0 12px 12px;
        overflow: visible;
    }

    body[data-page="dashboard"] .dashboard-topbar {
        margin-bottom: 12px;
        padding: 14px 16px;
        min-height: 72px;
        flex-wrap: wrap;
        gap: 10px;
    }

    body[data-page="dashboard"] .dashboard-content {
        overflow: visible;
        padding-bottom: 0;
    }

    body[data-page="dashboard"] .ticket-dashboard-wrapper {
        height: auto;
        min-height: 0;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-layout,
    body[data-page="dashboard"] #tab-support .ticket-layout {
        grid-template-columns: 1fr;
        gap: 12px;
        height: auto;
        overflow: visible;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-sidebar-scroll,
    body[data-page="dashboard"] #tab-support .ticket-sidebar-scroll {
        max-height: min(42vh, 360px);
        overflow: auto;
    }

    @supports (height: 100dvh) {
        body[data-page="dashboard"] #tab-tickets .ticket-sidebar-scroll,
        body[data-page="dashboard"] #tab-support .ticket-sidebar-scroll {
            max-height: min(42dvh, 360px);
        }
    }

    body[data-page="dashboard"] #tab-tickets .ticket-main,
    body[data-page="dashboard"] #tab-support .ticket-main {
        min-height: min(64vh, 820px);
    }

    @supports (height: 100dvh) {
        body[data-page="dashboard"] #tab-tickets .ticket-main,
        body[data-page="dashboard"] #tab-support .ticket-main {
            min-height: min(64dvh, 820px);
        }
    }

    body[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active .ticket-sidebar,
    body[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active .ticket-sidebar {
        display: none;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active .ticket-main,
    body[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active .ticket-main {
        min-height: min(72vh, 880px);
    }

    @supports (height: 100dvh) {
        body[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active .ticket-main,
        body[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active .ticket-main {
            min-height: min(72dvh, 880px);
        }
    }

    body[data-page="dashboard"] #ticket-mobile-back,
    body[data-page="dashboard"] #support-mobile-back {
        display: inline-flex !important;
    }

    body[data-page="dashboard"] .ticket-chat-header {
        align-items: flex-start;
    }

    body[data-page="dashboard"] .ticket-chat-head-left,
    body[data-page="dashboard"] .topbar-right {
        min-width: 0;
    }
}

@media (max-width: 620px) {
    body[data-page="dashboard"] .dashboard-sidebar,
    body[data-page="dashboard"] .sidebar-nav {
        grid-template-columns: 1fr;
    }

    body[data-page="dashboard"] .profile-text .role {
        display: none;
    }

    body[data-page="dashboard"] .home-welcome-actions .lg-btn,
    body[data-page="dashboard"] .action-buttons .lg-btn,
    body[data-page="dashboard"] .action-buttons a {
        width: 100%;
        justify-content: center;
    }
}

/* =====================================================
   MOBILE OVERHAUL — cascades last, wins all conflicts
   ===================================================== */

/* ── Tablet (≤ 900px): fixed-height app shell + icon sidebar ── */
@media (max-width: 900px) {
    /* App shell: fixed full-screen, no page scroll */
    body[data-page="dashboard"] {
        overflow: hidden !important;
        min-height: unset !important;
    }

    body[data-page="dashboard"] .dashboard-container {
        display: flex !important;
        flex-direction: column !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: unset !important;
    }

    /* Sidebar: compact icon bar at top */
    body[data-page="dashboard"] .dashboard-sidebar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: auto !important;
        height: auto !important;
        margin: 8px 12px 0 !important;
        padding: 5px 8px !important;
        border-radius: 18px !important;
        gap: 2px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        flex-shrink: 0 !important;
        grid-template-columns: unset !important;
    }
    body[data-page="dashboard"] .dashboard-sidebar::-webkit-scrollbar { display: none; }

    body[data-page="dashboard"] .sidebar-logo {
        display: flex !important;
        flex-direction: row !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        min-width: 40px !important;
        height: 44px !important;
        justify-content: center !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        grid-column: unset !important;
    }
    body[data-page="dashboard"] .sidebar-logo img { height: 26px; }

    body[data-page="dashboard"] .sidebar-logo span,
    body[data-page="dashboard"] .sidebar-nav .nav-item > span:not(.lg-badge),
    body[data-page="dashboard"] .sidebar-footer .nav-item > span {
        display: none !important;
    }

    body[data-page="dashboard"] .sidebar-nav {
        display: flex !important;
        flex-direction: row !important;
        gap: 2px !important;
        grid-template-columns: unset !important;
    }

    body[data-page="dashboard"] .sidebar-nav .nav-item,
    body[data-page="dashboard"] .sidebar-footer .nav-item {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        border-radius: 12px !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0 !important;
        flex-shrink: 0 !important;
        position: relative;
    }
    body[data-page="dashboard"] .sidebar-nav .nav-item i { font-size: 1.15rem; width: auto; }

    body[data-page="dashboard"] .sidebar-nav .nav-item .lg-badge {
        display: inline-flex !important;
        position: absolute;
        top: 3px; right: 3px;
        margin: 0 !important;
        min-width: 16px; height: 16px;
        font-size: 0.6rem;
        padding: 0 4px;
    }

    body[data-page="dashboard"] .sidebar-footer {
        display: flex !important;
        flex-direction: row !important;
        margin-left: auto !important;
        padding: 0 !important;
        border: none !important;
        grid-column: unset !important;
        gap: 2px !important;
    }

    /* Main area */
    body[data-page="dashboard"] .dashboard-main {
        flex: 1 !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 8px 12px 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    body[data-page="dashboard"] .dashboard-topbar {
        height: 56px !important;
        min-height: 0 !important;
        margin-bottom: 8px !important;
        padding: 0 14px !important;
        flex-wrap: nowrap !important;
        border-radius: 16px !important;
    }

    body[data-page="dashboard"] .dashboard-content {
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow: visible !important;
        overscroll-behavior: contain;
        padding-bottom: 12px !important;
    }

    /* Ticket wrapper fills remaining space */
    body[data-page="dashboard"] .ticket-dashboard-wrapper {
        height: 100% !important;
        min-height: 0 !important;
    }

    /* Ticket/support layout: flex column, fills height */
    body[data-page="dashboard"] #tab-tickets .ticket-layout,
    body[data-page="dashboard"] #tab-support .ticket-layout {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        gap: 0 !important;
        overflow: hidden !important;
        border-radius: 16px !important;
    }

    /* List sidebar: fills all space when no chat */
    body[data-page="dashboard"] #tab-tickets .ticket-sidebar,
    body[data-page="dashboard"] #tab-support .ticket-sidebar {
        flex: 1 !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden;
        border-radius: 16px !important;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-sidebar-scroll,
    body[data-page="dashboard"] #tab-support .ticket-sidebar-scroll {
        max-height: none !important;
    }

    /* Ticket main: naturally sized when stacked below list */
    body[data-page="dashboard"] #tab-tickets .ticket-main,
    body[data-page="dashboard"] #tab-support .ticket-main {
        min-height: 0 !important;
        flex-shrink: 0;
    }

    /* Addon sidebar: always hidden on mobile */
    .addon-right-sidebar { display: none !important; }

    /* mobile-chat-active: hide list, show chat full height */
    body[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active,
    body[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active {
        height: 100% !important;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active .ticket-sidebar,
    body[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active .ticket-sidebar {
        display: none !important;
    }

    body[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active .ticket-main,
    body[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active .ticket-main {
        flex: 1 !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden;
    }

    /* Back buttons visible */
    body[data-page="dashboard"] #ticket-mobile-back,
    body[data-page="dashboard"] #support-mobile-back {
        display: inline-flex !important;
    }

    /* Chat/support panel fills height when active */
    body[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active #ticket-chat-panel,
    body[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active #support-chat-panel {
        height: 100% !important;
        min-height: 0 !important;
        border-radius: 16px !important;
    }

    /* Filter pills: horizontal scroll, no wrap */
    body[data-page="dashboard"] #tab-tickets .ticket-filter-pills,
    body[data-page="dashboard"] #tab-support .ticket-filter-pills {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    body[data-page="dashboard"] #tab-tickets .ticket-filter-pills::-webkit-scrollbar,
    body[data-page="dashboard"] #tab-support .ticket-filter-pills::-webkit-scrollbar { display: none; }

    body[data-page="dashboard"] #tab-tickets .ticket-filter-pill,
    body[data-page="dashboard"] #tab-support .ticket-filter-pill {
        flex-shrink: 0 !important;
        min-height: 34px;
    }

    /* Bubble width: wider on tablet */
    body[data-page="dashboard"] #tab-tickets .ticket-msg-inner,
    body[data-page="dashboard"] #tab-support .ticket-msg-inner {
        max-width: 86% !important;
    }
}

/* ── Phone (≤ 600px): bottom tab bar + full-screen panel ── */
@media (max-width: 600px) {
    /* BOTTOM NAV BAR */
    body[data-page="dashboard"] .dashboard-sidebar {
        order: 10;
        position: fixed !important;
        bottom: 0 !important; left: 0 !important; right: 0 !important; top: auto !important;
        width: 100% !important;
        height: 60px !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(28px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.07) !important;
        z-index: 100 !important;
        overflow: visible !important;
        justify-content: space-around !important;
        align-items: stretch !important;
        gap: 0 !important;
    }

    body[data-page="dashboard"] .sidebar-logo { display: none !important; }
    body[data-page="dashboard"] .sidebar-nav .nav-item.active::before { display: none !important; }
    body[data-page="dashboard"] .nav-icon-wrap { background: transparent !important; width: auto; height: auto; border-radius: 0; }
    body[data-page="dashboard"] .sidebar-nav-label { display: none !important; }
    body[data-page="dashboard"] .sidebar-nav-group { display: contents; }

    body[data-page="dashboard"] .sidebar-nav {
        flex: 1 !important;
        justify-content: space-around !important;
        align-items: stretch !important;
        gap: 0 !important;
        height: 100%;
    }

    body[data-page="dashboard"] .sidebar-nav .nav-item,
    body[data-page="dashboard"] .sidebar-footer .nav-item {
        flex: 1 !important;
        flex-direction: column !important;
        width: auto !important;
        height: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: 80px;
        padding: 6px 2px !important;
        border-radius: 0 !important;
        gap: 3px !important;
        position: relative;
    }

    body[data-page="dashboard"] .sidebar-nav .nav-item > span:not(.lg-badge) {
        display: block !important;
        font-size: 0.61rem !important;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
        max-width: 100%;
    }

    body[data-page="dashboard"] .sidebar-nav .nav-item i { font-size: 1.1rem !important; }

    body[data-page="dashboard"] .sidebar-nav .nav-item.active {
        color: var(--lg-accent-primary, #1d7df2) !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    body[data-page="dashboard"] .sidebar-nav .nav-item.active::after {
        content: '';
        position: absolute;
        top: 0; left: 22%; right: 22%;
        height: 2.5px;
        border-radius: 0 0 4px 4px;
        background: var(--lg-accent-primary, #1d7df2);
    }

    body[data-page="dashboard"] .sidebar-nav .nav-item .lg-badge {
        top: 6px !important; right: 14px !important;
    }

    body[data-page="dashboard"] .sidebar-footer {
        align-items: stretch !important;
        margin-left: 0 !important;
        gap: 0 !important;
    }

    body[data-page="dashboard"] .sidebar-footer .nav-item span {
        display: block !important;
        font-size: 0.6rem !important;
    }

    /* Main: room for bottom bar */
    body[data-page="dashboard"] .dashboard-main {
        height: calc(100vh - 60px) !important;
        height: calc(100dvh - 60px) !important;
        padding: 8px 8px 0 !important;
        margin-bottom: 60px !important;
    }

    /* Topbar: compact */
    body[data-page="dashboard"] .dashboard-topbar {
        height: 48px !important;
        padding: 0 10px !important;
        margin-bottom: 6px !important;
        border-radius: 14px !important;
    }

    body[data-page="dashboard"] .topbar-left h2 { font-size: 0.95rem !important; }
    body[data-page="dashboard"] .profile-text { display: none !important; }
    body[data-page="dashboard"] .avatar-small { width: 28px !important; height: 28px !important; }

    /* Ticket wrapper height: dvh minus nav + topbar */
    body[data-page="dashboard"] .ticket-dashboard-wrapper {
        height: calc(100vh - 60px - 54px - 14px) !important;
        height: calc(100dvh - 60px - 54px - 14px) !important;
    }

    /* Chat active: full-screen fixed overlay */
    body[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active .ticket-main,
    body[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active .ticket-main {
        position: fixed !important;
        inset: 0 !important;
        bottom: 60px !important;
        z-index: 90 !important;
        border-radius: 0 !important;
        flex: unset !important;
    }

    /* Home tab */
    body[data-page="dashboard"] .welcome-banner.home-welcome-v2 {
        padding: 16px 18px !important;
        margin-bottom: 8px;
    }
    body[data-page="dashboard"] .home-welcome-title { font-size: 1.1rem !important; }

    .home-stats-strip {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin-bottom: 8px;
    }

    .home-stat-pill { padding: 12px 10px !important; gap: 10px !important; }

    .home-content-grid,
    .dashboard-grid { grid-template-columns: 1fr !important; gap: 10px !important; }

    /* Settings single-column */
    .settings-v2-id-row { grid-template-columns: 1fr !important; }
    .settings-v2-avatar-bio-row { grid-template-columns: 1fr !important; }
    .settings-v2-wrap { padding: 14px !important; }

    /* Bubbles: wider on small screens */
    body[data-page="dashboard"] #tab-tickets .ticket-msg-inner,
    body[data-page="dashboard"] #tab-support .ticket-msg-inner { max-width: 90% !important; }

    body[data-page="dashboard"] #tab-tickets #ticket-chat-messages > .msg-row > .ticket-msg,
    body[data-page="dashboard"] #tab-support #support-chat-messages > .msg-row > .ticket-msg {
        max-width: 92% !important;
        min-width: 0 !important;
    }

    /* Create panel: scrollable on small screens */
    body[data-page="dashboard"] .ticket-create-panel {
        overflow-y: auto;
        padding: 14px !important;
    }
}

/* ══════════════════════════════════════════════════════
   KEYBOARD OPEN STATE  (body.vkb-open, toggled by JS)
   When the on-screen keyboard appears on mobile ≤600px:
   - Instantly hide the bottom nav bar (frees 60px)
   - Remove the nav's margin from the main area
   - Snap the chat panel to the very bottom of the screen
     so the compose bar sits directly above the keyboard
   ══════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    /* 1. Hide bottom nav immediately — no transition so there's no flash */
    body.vkb-open[data-page="dashboard"] .dashboard-sidebar {
        transform: translateY(100%) !important;
        transition: none !important;
        pointer-events: none !important;
        box-shadow: none !important;
        visibility: hidden !important;
    }

    /* 2. Reclaim the 60px the nav was occupying */
    body.vkb-open[data-page="dashboard"] .dashboard-main {
        margin-bottom: 0 !important;
        height: 100dvh !important;
    }

    /* 3. Stretch chat overlay to fill right to the visual viewport bottom
          (iOS pushes fixed elements above keyboard automatically) */
    body.vkb-open[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active .ticket-main,
    body.vkb-open[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active .ticket-main {
        bottom: 0 !important;
        inset: 0 !important;
    }

    /* 4. Make sure the compose bar itself is always fully visible */
    body.vkb-open[data-page="dashboard"] .ticket-chat-compose {
        position: relative !important;
        z-index: 5 !important;
    }

    /* 5. Restore transition on the nav when keyboard closes */
    body[data-page="dashboard"] .dashboard-sidebar {
        transition: transform 0.2s ease !important;
    }
}

/* =====================================================
   COMPOSE ANCHOR — message input always pinned to bottom
   Replaces unreliable position:sticky with flex chain.
   Cascades last so it wins all earlier conflicting rules.
   ===================================================== */

/* ticket-main: flex column so chat panel can fill it */
body[data-page="dashboard"] #tab-tickets .ticket-main,
body[data-page="dashboard"] #tab-support .ticket-main {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
}

/* Chat panels: flex column, fill ticket-main */
body[data-page="dashboard"] #tab-tickets #ticket-chat-panel,
body[data-page="dashboard"] #tab-support #support-chat-panel {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Header: never shrink */
body[data-page="dashboard"] #tab-tickets .ticket-chat-header,
body[data-page="dashboard"] #tab-support .ticket-chat-header {
    flex-shrink: 0 !important;
}

/* Messages: grow to fill, scroll internally */
body[data-page="dashboard"] #tab-tickets #ticket-chat-messages,
body[data-page="dashboard"] #tab-support #support-chat-messages {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Compose: anchored at bottom — never shrinks */
body[data-page="dashboard"] #tab-tickets .ticket-chat-compose,
body[data-page="dashboard"] #tab-support .ticket-chat-compose {
    flex-shrink: 0 !important;
    position: relative !important;
    bottom: unset !important;
    z-index: 4 !important;
}

/* =====================================================
   TICKET SECTION — STRUCTURAL FIXES
   Cascades last to win all earlier conflicts.
   ===================================================== */

/* ── Desktop: lock the content area so only messages scroll ── */
/*
  dashboard-content has overflow-y:auto by default so non-ticket tabs
  (Home, Gallery, Settings) can scroll normally.  When the ticket or
  support tab is active the panel must NOT scroll — only the inner
  #ticket-chat-messages / #support-chat-messages should.
  :has() is supported in all modern browsers (Chrome 105+, Safari 15.4+, FF 121+).
*/
body[data-page="dashboard"] .dashboard-content:has(#tab-tickets.dashboard-tab.active),
body[data-page="dashboard"] .dashboard-content:has(#tab-support.dashboard-tab.active) {
    overflow: hidden !important;
    padding-bottom: 0 !important;
    /* display:flex + flex-direction:column lets height:100% propagate down */
    display: flex !important;
    flex-direction: column !important;
}

/* Active ticket/support tab: fill the flex column */
body[data-page="dashboard"] #tab-tickets.dashboard-tab.active,
body[data-page="dashboard"] #tab-support.dashboard-tab.active {
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Wrapper now fills 100% of the tab (changed from calc(100vh - 120px)) */
body[data-page="dashboard"] #tab-tickets .ticket-dashboard-wrapper,
body[data-page="dashboard"] #tab-support .ticket-dashboard-wrapper {
    height: 100% !important;
    min-height: 0 !important;
}

/* ── Desktop: force grid row to fill wrapper height ── */
/* Without grid-template-rows: 1fr, the auto row only grows
   to content height, not the wrapper's fixed height.       */
body[data-page="dashboard"] .dashboard-ticket-layout {
    grid-template-rows: 1fr !important;
}

/* ticket-main: must have a height so flex: 1 on chat-panel works */
body[data-page="dashboard"] #tab-tickets .ticket-main,
body[data-page="dashboard"] #tab-support .ticket-main {
    height: 100% !important;
}

/* ticket-active-empty: center in flex ticket-main */
body[data-page="dashboard"] .ticket-active-empty {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 0 !important;
}

/* ticket-create-panel: fill ticket-main, scroll if content overflows */
body[data-page="dashboard"] .ticket-create-panel {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
}

/* messages: extra bottom padding so last bubble clears compose bar */
body[data-page="dashboard"] #tab-tickets #ticket-chat-messages,
body[data-page="dashboard"] #tab-support #support-chat-messages {
    padding-bottom: 12px !important;
}

/* ── Mobile (≤ 900px): fix height chain ──
   dashboard-tab.active is display:block — height:100% on wrapper
   won't reference the right container. Fix by making dashboard-content
   a flex column and the active tab a flex item.                        */
@media (max-width: 900px) {
    body[data-page="dashboard"] .dashboard-content {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    body[data-page="dashboard"] .dashboard-tab.active {
        flex: 1 !important;
        min-height: 0 !important;
    }

    /* Non-ticket tabs: restore own scrolling */
    body[data-page="dashboard"] #tab-home.dashboard-tab.active,
    body[data-page="dashboard"] #tab-gallery.dashboard-tab.active,
    body[data-page="dashboard"] #tab-settings.dashboard-tab.active {
        overflow-y: auto !important;
    }

    /* Ticket/support wrappers: fill their tab via flex */
    body[data-page="dashboard"] #tab-tickets .ticket-dashboard-wrapper,
    body[data-page="dashboard"] #tab-support .ticket-dashboard-wrapper {
        flex: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    /* chat-panel fills ticket-main when active */
    body[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active #ticket-chat-panel,
    body[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active #support-chat-panel {
        flex: 1 !important;
        height: 100% !important;
        min-height: 0 !important;
    }
}

/* ── Phone (≤ 600px): compose bar visibility + safe-area ── */
@media (max-width: 600px) {
    body[data-page="dashboard"] #tab-tickets .ticket-layout.mobile-chat-active .ticket-main,
    body[data-page="dashboard"] #tab-support .ticket-layout.mobile-chat-active .ticket-main {
        bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Compose area: strong visible background so it doesn't disappear */
    body[data-page="dashboard"] #tab-tickets .ticket-chat-compose,
    body[data-page="dashboard"] #tab-support .ticket-chat-compose {
        padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
        background: rgba(255, 255, 255, 0.98) !important;
        border-top: 1.5px solid rgba(148, 163, 184, 0.35) !important;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06) !important;
        flex-shrink: 0 !important;
        min-height: 64px !important;
    }

    /* Form itself: clear white card so input is always readable */
    body[data-page="dashboard"] #tab-tickets .ticket-chat-form,
    body[data-page="dashboard"] #tab-support .ticket-chat-form {
        padding: 10px 12px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        gap: 8px !important;
    }

    /* Input: solid white with a clearly visible border */
    body[data-page="dashboard"] #tab-tickets #ticket-chat-input,
    body[data-page="dashboard"] #tab-support #support-chat-input {
        background: #fff !important;
        border: 1.5px solid rgba(99, 113, 148, 0.35) !important;
        border-radius: 22px !important;
        min-height: 42px !important;
        font-size: 0.95rem !important;
        color: #1e293b !important;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06) !important;
    }

    body[data-page="dashboard"] #tab-tickets #ticket-chat-input:focus,
    body[data-page="dashboard"] #tab-support #support-chat-input:focus {
        border-color: rgba(29, 125, 242, 0.55) !important;
        box-shadow: 0 0 0 3px rgba(29, 125, 242, 0.12) !important;
        background: #fff !important;
    }
}

body[data-page="dashboard"] #tab-tickets .ticket-alert-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 12px 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(239, 68, 68, 0.18);
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.92), rgba(255, 241, 242, 0.98));
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.12);
}

body[data-page="dashboard"] #tab-tickets .ticket-alert-strip__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

body[data-page="dashboard"] #tab-tickets .ticket-alert-strip__label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b91c1c;
}

body[data-page="dashboard"] #tab-tickets .ticket-alert-strip__count {
    font-size: 0.92rem;
    font-weight: 700;
    color: #7f1d1d;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card.has-unread {
    border-color: rgba(239, 68, 68, 0.26);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.96));
    box-shadow: 0 16px 30px rgba(239, 68, 68, 0.08);
}

body[data-page="dashboard"] #tab-tickets .ticket-card-name-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

body[data-page="dashboard"] #tab-tickets .ticket-card-unread-dot,
.dash-ticket-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
    flex-shrink: 0;
}

.dash-ticket-item.has-unread {
    border-color: rgba(239, 68, 68, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(254, 242, 242, 0.88));
    box-shadow: 0 14px 26px rgba(239, 68, 68, 0.08);
}

.dash-ticket-label-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dash-ticket-unread-badge {
    align-self: flex-end;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(180deg, #ef4444, #dc2626);
    box-shadow: 0 12px 22px rgba(220, 38, 38, 0.22);
}

body[data-page="dashboard"] #tab-tickets .msg-img-wrap {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body[data-page="dashboard"] #tab-tickets .msg-img-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body[data-page="dashboard"] #tab-tickets .msg-img-dl-btn,
body[data-page="dashboard"] #tab-tickets .msg-img-save-btn {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    padding: 6px 12px;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

body[data-page="dashboard"] #tab-tickets .msg-img-dl-btn:hover,
body[data-page="dashboard"] #tab-tickets .msg-img-save-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.34);
    box-shadow: 0 10px 18px rgba(14, 165, 233, 0.12);
}

body[data-page="dashboard"] #tab-tickets .msg-img-save-btn.is-saved,
.my-gallery-action-group .is-saved {
    border-color: rgba(16, 185, 129, 0.22);
    background: rgba(236, 253, 245, 0.95);
    color: #047857;
}

.my-gallery-action-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.saved-gallery-section {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.saved-gallery-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.saved-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.saved-gallery-card {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(248, 250, 252, 0.94));
    overflow: hidden;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.saved-gallery-card__image {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: rgba(226, 232, 240, 0.55);
}

.saved-gallery-card__body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.saved-gallery-card__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
}

.saved-gallery-card__meta {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.45;
}

.saved-gallery-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.saved-gallery-card__remove {
    color: #b91c1c;
}

@media (max-width: 720px) {
    body[data-page="dashboard"] #tab-tickets .ticket-alert-strip {
        flex-direction: column;
        align-items: stretch;
    }

    .saved-gallery-section__head,
    .my-gallery-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .my-gallery-action-group,
    .saved-gallery-card__actions {
        justify-content: stretch;
    }
}


/* ═══════════════════════════════════════════════════════════════
   APPLE-GRADE LIQUID GLASS POLISH PASS
   Comprehensive dashboard design upgrade
   ═══════════════════════════════════════════════════════════════ */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
    --dash-spring: cubic-bezier(0.23, 1, 0.32, 1);
    --dash-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --dash-accent: #1D7DF2;
    --dash-accent2: #6450dc;
    --dash-glass-bg: rgba(255, 255, 255, 0.72);
    --dash-glass-border: rgba(148, 163, 184, 0.18);
    --dash-glass-blur: blur(20px) saturate(140%);
    --dash-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --dash-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
    --dash-shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.08);
    --dash-shadow-glow: 0 0 20px rgba(29, 125, 242, 0.12);
}


/* ── Topbar polish ──────────────────────────────────────────── */

.dashboard-topbar {
    backdrop-filter: var(--dash-glass-blur) !important;
    -webkit-backdrop-filter: var(--dash-glass-blur) !important;
    border-bottom: 1px solid var(--dash-glass-border) !important;
    box-shadow: var(--dash-shadow-sm) !important;
}

.topbar-left h2 {
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

.user-profile-dropdown {
    transition: transform 0.25s var(--dash-spring),
                box-shadow 0.25s var(--dash-spring) !important;
}

.user-profile-dropdown:hover {
    transform: translateY(-1px);
    box-shadow: var(--dash-shadow-md) !important;
}

.avatar-small {
    transition: transform 0.25s var(--dash-spring),
                box-shadow 0.25s ease !important;
}

.avatar-small:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(29, 125, 242, 0.15);
}


/* Online dot pulse */
.sup-status-dot {
    animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}


/* ── Stat Pills — Enhanced ──────────────────────────────────── */

.home-stat-pill {
    transition: transform 0.3s var(--dash-spring),
                box-shadow 0.3s var(--dash-spring),
                border-color 0.3s ease !important;
}

.home-stat-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--dash-shadow-md) !important;
    border-color: rgba(29, 125, 242, 0.2) !important;
}

.home-stat-pill-icon {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
    font-size: 1.1rem !important;
    transition: transform 0.3s var(--dash-spring),
                box-shadow 0.3s ease;
}

.home-stat-pill:hover .home-stat-pill-icon {
    transform: scale(1.08);
}

/* Stronger icon backgrounds */
.home-stat-icon-blue {
    background: rgba(29, 125, 242, 0.15) !important;
    box-shadow: 0 4px 12px rgba(29, 125, 242, 0.1);
}

.home-stat-icon-purple {
    background: rgba(100, 80, 220, 0.15) !important;
    box-shadow: 0 4px 12px rgba(100, 80, 220, 0.1);
}

.home-stat-icon-amber {
    background: rgba(211, 131, 0, 0.15) !important;
    box-shadow: 0 4px 12px rgba(211, 131, 0, 0.1);
}

.home-stat-icon-green {
    background: rgba(15, 159, 95, 0.15) !important;
    box-shadow: 0 4px 12px rgba(15, 159, 95, 0.1);
}

.home-stat-pill-num {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}


/* ── Dashboard Cards — Glass depth ──────────────────────────── */

.dash-card.lg-glass-card {
    border: 1px solid var(--dash-glass-border) !important;
    box-shadow: var(--dash-shadow-md) !important;
    transition: transform 0.3s var(--dash-spring),
                box-shadow 0.3s var(--dash-spring),
                border-color 0.3s ease !important;
}

.dash-card.lg-glass-card:hover {
    box-shadow: var(--dash-shadow-lg) !important;
    border-color: rgba(29, 125, 242, 0.15) !important;
}

.dash-card-head h4 {
    color: var(--lg-text-main) !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
}

.dash-card-head-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s var(--dash-spring);
}

.dash-card:hover .dash-card-head-icon {
    transform: scale(1.06);
}

.dash-card-see-all {
    transition: transform 0.2s var(--dash-spring),
                box-shadow 0.2s ease,
                background 0.2s ease !important;
}

.dash-card-see-all:hover {
    transform: translateY(-1px);
    box-shadow: var(--dash-shadow-sm) !important;
}


/* ── Ticket Sidebar Cards — Status borders + depth ──────────── */

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card {
    border-left: 4px solid transparent !important;
    transition: transform 0.25s var(--dash-spring),
                border-color 0.25s ease,
                box-shadow 0.25s var(--dash-spring) !important;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1) !important;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card.active {
    border-left-color: var(--dash-accent) !important;
    box-shadow: 0 0 0 2px rgba(29, 125, 242, 0.15),
                0 12px 32px rgba(15, 23, 42, 0.1) !important;
}

/* Status color on sidebar card left border */
body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="open"],
body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="claimed"],
body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="in_progress"] {
    border-left-color: var(--success, #22c55e) !important;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="pending"],
body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="review"] {
    border-left-color: var(--warning, #f59e0b) !important;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="closed"],
body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="completed"] {
    border-left-color: rgba(148, 163, 184, 0.4) !important;
}


/* ── Chat Messages — Apple-grade polish ─────────────────────── */

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner {
    border-radius: 18px !important;
    padding: 14px 18px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
    transition: box-shadow 0.2s ease;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1) !important;
}

/* User messages — refined blue gradient */
body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-inner {
    background: linear-gradient(145deg,
        rgba(29, 125, 242, 0.12) 0%,
        rgba(56, 189, 248, 0.08) 100%) !important;
    border-color: rgba(29, 125, 242, 0.18) !important;
}

/* Admin messages — crisp white glass */
body[data-page="dashboard"] #tab-tickets .ticket-msg--them .ticket-msg-inner {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}

/* Message entrance animation */
@keyframes msgSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body[data-page="dashboard"] #tab-tickets .ticket-msg {
    animation: msgSlideIn 0.25s var(--dash-ease) both;
}

/* Avatar ring */
body[data-page="dashboard"] #tab-tickets .ticket-msg-avatar img,
body[data-page="dashboard"] #tab-tickets .ticket-msg-avatar-fallback {
    border: 2px solid rgba(29, 125, 242, 0.15) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Compose area polish */
body[data-page="dashboard"] #tab-tickets .ticket-compose-wrap {
    border-top: 1px solid var(--dash-glass-border);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body[data-page="dashboard"] #tab-tickets .ticket-compose-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-page="dashboard"] #tab-tickets .ticket-compose-input:focus {
    border-color: rgba(29, 125, 242, 0.35) !important;
    box-shadow: 0 0 0 3px rgba(29, 125, 242, 0.08) !important;
}


/* ── Ticket Filter Pills ────────────────────────────────────── */

body[data-page="dashboard"] .ticket-filter-pill {
    transition: transform 0.2s var(--dash-spring),
                background 0.2s ease,
                box-shadow 0.2s ease,
                border-color 0.2s ease !important;
}

body[data-page="dashboard"] .ticket-filter-pill:hover {
    transform: translateY(-1px);
    box-shadow: var(--dash-shadow-sm);
}

body[data-page="dashboard"] .ticket-filter-pill.active {
    box-shadow: 0 4px 16px rgba(29, 125, 242, 0.2) !important;
    transform: scale(1.03);
}


/* ── Addon Panel polish ─────────────────────────────────────── */

.ads-usage-numbers {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

.glass-progress-bar {
    transition: width 0.6s var(--dash-spring) !important;
}

.ads-addon-item {
    transition: transform 0.2s var(--dash-spring),
                box-shadow 0.2s ease !important;
}

.ads-addon-item:hover {
    transform: scale(1.02);
    box-shadow: var(--dash-shadow-sm) !important;
}

.ads-addon-use-btn {
    transition: transform 0.15s var(--dash-spring),
                background 0.15s ease,
                box-shadow 0.15s ease !important;
}

.ads-addon-use-btn:hover {
    transform: scale(1.05);
}

.ads-addon-use-btn:active {
    transform: scale(0.96);
}

.ads-section-label {
    font-size: 0.73rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
}


/* ── Gallery Card polish ────────────────────────────────────── */

.my-gallery-card {
    transition: transform 0.3s var(--dash-spring),
                box-shadow 0.3s var(--dash-spring),
                border-color 0.3s ease !important;
}

.my-gallery-card:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12) !important;
    border-color: rgba(29, 125, 242, 0.2) !important;
}

.my-gallery-card img {
    transition: transform 0.4s var(--dash-spring);
}

.my-gallery-card:hover img {
    transform: scale(1.04);
}


/* ── Settings polish ────────────────────────────────────────── */

.sett-sidebar {
    background: rgba(255, 255, 255, 0.55) !important;
}

.sett-sidebar-item {
    transition: background 0.2s ease,
                color 0.2s ease,
                transform 0.2s var(--dash-spring) !important;
}

.sett-sidebar-item:hover {
    transform: translateX(2px);
}

.sett-sidebar-item.active {
    background: rgba(29, 125, 242, 0.08) !important;
    box-shadow: inset 3px 0 0 var(--dash-accent);
}

.sett-preview {
    background: rgba(255, 255, 255, 0.45) !important;
    box-shadow: var(--dash-shadow-sm);
}

/* Settings input focus glow */
.sett-input:focus,
.sett-textarea:focus {
    border-color: rgba(29, 125, 242, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(29, 125, 242, 0.08) !important;
}

/* Settings toggle row */
.settings-toggle-row {
    transition: background 0.2s ease,
                box-shadow 0.2s ease !important;
}

.settings-toggle-row:hover {
    box-shadow: var(--dash-shadow-sm) !important;
}

/* Profile avatar hover */
.sp-hero-avatar:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
}


/* ── Buttons — Universal spring + glow ──────────────────────── */

.lg-btn-primary {
    transition: transform 0.2s var(--dash-spring),
                box-shadow 0.2s var(--dash-spring),
                filter 0.2s ease !important;
}

.lg-btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(29, 125, 242, 0.3) !important;
}

.lg-btn-primary:active {
    transform: translateY(0) scale(0.97) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12) !important;
}

.lg-btn-glass {
    transition: transform 0.2s var(--dash-spring),
                box-shadow 0.2s ease,
                background 0.2s ease,
                border-color 0.2s ease !important;
}

.lg-btn-glass:hover {
    transform: translateY(-1px) !important;
    box-shadow: var(--dash-shadow-sm) !important;
}


/* ── Empty states ───────────────────────────────────────────── */

.empty-text,
.dash-list .empty-text {
    text-align: center;
    padding: 24px 16px !important;
    color: var(--lg-text-muted) !important;
    font-size: 0.85rem;
}


/* ── Scrollbar refinement ───────────────────────────────────── */

body[data-page="dashboard"] ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

body[data-page="dashboard"] ::-webkit-scrollbar-track {
    background: transparent;
}

body[data-page="dashboard"] ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 999px;
}

body[data-page="dashboard"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.4);
}


/* ── Alert strip entrance ───────────────────────────────────── */

@keyframes alertSlideDown {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 1; transform: translateY(0); }
}

.ticket-alert-strip {
    animation: alertSlideDown 0.3s var(--dash-ease) both;
}


/* ── Stagger reveal for dashboard items ─────────────────────── */

@keyframes dashReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-stat-pill {
    animation: dashReveal 0.4s var(--dash-ease) both;
}

.home-stat-pill:nth-child(1) { animation-delay: 0ms; }
.home-stat-pill:nth-child(2) { animation-delay: 60ms; }
.home-stat-pill:nth-child(3) { animation-delay: 120ms; }
.home-stat-pill:nth-child(4) { animation-delay: 180ms; }

.home-content-grid > .dash-card {
    animation: dashReveal 0.5s var(--dash-ease) both;
}

.home-content-grid > .dash-card:nth-child(1) { animation-delay: 200ms; }
.home-content-grid > .dash-card:nth-child(2) { animation-delay: 280ms; }


/* ═══════════════════════════════════════════════════════════════
   VISUAL OVERHAUL — Ticket Panel + Dashboard Home
   Apple-grade liquid glass, depth, micro-interactions
   ═══════════════════════════════════════════════════════════════ */

/* ── Ticket Sidebar: Premium glass surface ────────────────── */

body[data-page="dashboard"] .ticket-sidebar {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(245, 250, 255, 0.82) 100%) !important;
    border: 1px solid rgba(148, 163, 184, 0.14) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 12px 36px rgba(15, 23, 42, 0.06) !important;
}

body[data-page="dashboard"] .ticket-sidebar-top {
    background: rgba(255, 255, 255, 0.6) !important;
    border-bottom-color: rgba(148, 163, 184, 0.12) !important;
    padding: 16px 16px 12px !important;
}

/* New Ticket button — stronger glow */
body[data-page="dashboard"] #ticket-new-btn {
    border-radius: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 24px rgba(29, 125, 242, 0.25) !important;
    transition: transform 0.25s var(--dash-spring),
                box-shadow 0.25s var(--dash-spring) !important;
}

body[data-page="dashboard"] #ticket-new-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 32px rgba(29, 125, 242, 0.35) !important;
}

body[data-page="dashboard"] #ticket-new-btn:active {
    transform: translateY(0) scale(0.97) !important;
}

/* Filter pills — Refined glass pills */
body[data-page="dashboard"] .ticket-filter-pills {
    background: rgba(248, 251, 255, 0.85) !important;
    padding: 10px 16px 10px !important;
    gap: 6px !important;
}

body[data-page="dashboard"] .ticket-filter-pill {
    border-radius: 10px !important;
    padding: 7px 14px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    border: 1.5px solid rgba(148, 163, 184, 0.2) !important;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s var(--dash-spring) !important;
}

body[data-page="dashboard"] .ticket-filter-pill:hover {
    background: rgba(29, 125, 242, 0.06) !important;
    border-color: rgba(29, 125, 242, 0.3) !important;
    color: var(--dash-accent) !important;
    transform: translateY(-1px);
}

body[data-page="dashboard"] .ticket-filter-pill.active {
    background: linear-gradient(145deg,
        rgba(29, 125, 242, 0.12) 0%,
        rgba(29, 125, 242, 0.06) 100%) !important;
    border-color: rgba(29, 125, 242, 0.4) !important;
    color: var(--dash-accent) !important;
    box-shadow: 0 4px 14px rgba(29, 125, 242, 0.15) !important;
    transform: scale(1.02);
}

/* Search input — Refined */
body[data-page="dashboard"] .ticket-sidebar-search {
    border-radius: 12px !important;
    border: 1.5px solid rgba(148, 163, 184, 0.18) !important;
    background: rgba(255, 255, 255, 0.7) !important;
    padding: 9px 12px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-page="dashboard"] .ticket-sidebar-search:focus-within {
    border-color: rgba(29, 125, 242, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(29, 125, 242, 0.08) !important;
}

/* Sidebar ticket cards — Premium glass cards */
body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card {
    border-radius: 16px !important;
    border: 1.5px solid rgba(148, 163, 184, 0.15) !important;
    border-left: 4px solid rgba(148, 163, 184, 0.15) !important;
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 6px 20px rgba(15, 23, 42, 0.05) !important;
    padding: 12px !important;
    gap: 12px !important;
    transition: transform 0.3s var(--dash-spring),
                border-color 0.3s ease,
                box-shadow 0.3s var(--dash-spring) !important;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card:hover {
    transform: translateY(-3px) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 16px 40px rgba(15, 23, 42, 0.1) !important;
    border-color: rgba(29, 125, 242, 0.25) !important;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card.active {
    border-left-color: var(--dash-accent) !important;
    border-color: rgba(29, 125, 242, 0.3) !important;
    border-left-color: var(--dash-accent) !important;
    background: rgba(29, 125, 242, 0.04) !important;
    box-shadow:
        0 0 0 1px rgba(29, 125, 242, 0.1),
        0 16px 40px rgba(15, 23, 42, 0.1) !important;
}

/* Avatar — Larger, glowing ring */
body[data-page="dashboard"] #tab-tickets .ticket-card-avatar {
    width: 44px !important;
    height: 44px !important;
    border: 2px solid rgba(29, 125, 242, 0.15) !important;
    box-shadow: 0 2px 8px rgba(29, 125, 242, 0.08);
    transition: transform 0.25s var(--dash-spring),
                box-shadow 0.25s ease;
}

body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card:hover .ticket-card-avatar {
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(29, 125, 242, 0.15);
}

/* Ticket card name — Bolder */
body[data-page="dashboard"] #tab-tickets .ticket-card-name {
    font-size: 0.86rem !important;
    font-weight: 800 !important;
}

/* Unread badge — Pulse */
body[data-page="dashboard"] #tab-tickets .ticket-card-unread {
    animation: unreadPulse 2s ease-in-out infinite;
}

@keyframes unreadPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3); }
    50% { box-shadow: 0 4px 12px rgba(2, 132, 199, 0.5), 0 0 0 4px rgba(56, 189, 248, 0.1); }
}

/* Status badge — More refined */
body[data-page="dashboard"] .ticket-card-status {
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    padding: 3px 8px !important;
}


/* ── Chat Panel: Premium glass surface ────────────────────── */

body[data-page="dashboard"] #ticket-chat-panel {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(248, 251, 255, 0.6) 100%) !important;
    border: 1px solid rgba(148, 163, 184, 0.12) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 18px 48px rgba(15, 23, 42, 0.08) !important;
}

/* Chat header — Frosted glass bar */
body[data-page="dashboard"] .ticket-chat-header {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15) !important;
    padding: 16px 20px !important;
}

body[data-page="dashboard"] #ticket-chat-title {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
}

/* Status badge in header */
body[data-page="dashboard"] #ticket-status-badge {
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    padding: 4px 12px !important;
    border-radius: 999px !important;
}

/* Messages area — Better spacing */
body[data-page="dashboard"] #ticket-chat-messages {
    padding: 20px !important;
    gap: 14px !important;
}

/* Message bubbles — Apple iMessage quality */
body[data-page="dashboard"] #tab-tickets .ticket-msg-inner {
    border-radius: 20px !important;
    padding: 14px 18px !important;
    border: 1.5px solid rgba(148, 163, 184, 0.16) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 6px 20px rgba(15, 23, 42, 0.06) !important;
    transition: box-shadow 0.25s ease, transform 0.25s var(--dash-spring);
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-inner:hover {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 10px 30px rgba(15, 23, 42, 0.09) !important;
    transform: translateY(-1px);
}

/* User messages — Blue glass tint */
body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-inner {
    background: linear-gradient(145deg,
        rgba(29, 125, 242, 0.08) 0%,
        rgba(56, 189, 248, 0.05) 100%) !important;
    border-color: rgba(29, 125, 242, 0.2) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 6px 20px rgba(29, 125, 242, 0.06) !important;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-inner:hover {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 10px 30px rgba(29, 125, 242, 0.1) !important;
}

/* Message avatar — Larger, ring effect */
body[data-page="dashboard"] #tab-tickets .ticket-msg-avatar img,
body[data-page="dashboard"] #tab-tickets .ticket-msg-avatar-fallback {
    width: 32px !important;
    height: 32px !important;
    border: 2px solid rgba(29, 125, 242, 0.12) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}

/* Name — Bolder */
body[data-page="dashboard"] #tab-tickets .ticket-msg-name {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
}

/* Role badges — More polished */
body[data-page="dashboard"] #tab-tickets .ticket-msg-role {
    font-size: 0.6rem !important;
    font-weight: 800 !important;
    padding: 2px 8px !important;
    letter-spacing: 0.06em !important;
}

/* Message text — Better readability */
body[data-page="dashboard"] #tab-tickets .ticket-msg-text {
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
}

/* Images in messages — Premium rounded */
body[data-page="dashboard"] #tab-tickets .ticket-msg-image {
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s var(--dash-spring),
                box-shadow 0.25s ease;
}

body[data-page="dashboard"] #tab-tickets .ticket-msg-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}

/* Reply context — Glass accent */
body[data-page="dashboard"] .msg-reply-context {
    border-radius: 12px !important;
    background: rgba(29, 125, 242, 0.05) !important;
    border-left: 3px solid rgba(29, 125, 242, 0.5) !important;
    padding: 8px 10px !important;
}

/* Reply button — Glass circle */
body[data-page="dashboard"] .msg-reply-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    border: 1.5px solid rgba(148, 163, 184, 0.25) !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s var(--dash-spring) !important;
}

body[data-page="dashboard"] .msg-reply-btn:hover {
    background: rgba(29, 125, 242, 0.08) !important;
    border-color: rgba(29, 125, 242, 0.3) !important;
    transform: scale(1.08) !important;
}


/* ── Compose Area: Frosted glass ──────────────────────────── */

body[data-page="dashboard"] .ticket-chat-compose {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.75) 0%,
        rgba(248, 251, 255, 0.92) 100%) !important;
    backdrop-filter: blur(16px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
    border-top: 1px solid rgba(148, 163, 184, 0.12) !important;
}

body[data-page="dashboard"] .ticket-chat-form {
    padding: 14px 16px !important;
    gap: 10px !important;
}

body[data-page="dashboard"] #ticket-chat-input {
    border-radius: 16px !important;
    padding: 11px 16px !important;
    font-size: 0.9rem !important;
    border: 1.5px solid rgba(99, 113, 148, 0.3) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #1e293b !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease,
                background 0.2s ease !important;
}

body[data-page="dashboard"] #ticket-chat-input:focus {
    background: #fff !important;
    border-color: rgba(29, 125, 242, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(29, 125, 242, 0.1) !important;
}

/* Attach button — Glass circle */
body[data-page="dashboard"] .ticket-chat-attach {
    width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
    border: 1.5px solid rgba(148, 163, 184, 0.18) !important;
    background: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.2s var(--dash-spring) !important;
}

body[data-page="dashboard"] .ticket-chat-attach:hover {
    background: rgba(29, 125, 242, 0.06) !important;
    border-color: rgba(29, 125, 242, 0.3) !important;
    transform: scale(1.05);
}

/* Send button — Glow */
body[data-page="dashboard"] .ticket-chat-send {
    min-width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(29, 125, 242, 0.2) !important;
    transition: transform 0.2s var(--dash-spring),
                box-shadow 0.2s var(--dash-spring) !important;
}

body[data-page="dashboard"] .ticket-chat-send:hover {
    transform: scale(1.06) !important;
    box-shadow: 0 8px 24px rgba(29, 125, 242, 0.3) !important;
}

/* Reply preview bar */
body[data-page="dashboard"] .ticket-reply-preview {
    background: rgba(29, 125, 242, 0.04) !important;
    border-bottom: 1px solid rgba(29, 125, 242, 0.1) !important;
}

/* New messages pill — Floating glass */
body[data-page="dashboard"] #ticket-chat-new-messages {
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1.5px solid rgba(29, 125, 242, 0.3) !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12) !important;
    transition: transform 0.2s var(--dash-spring),
                box-shadow 0.2s ease !important;
}

body[data-page="dashboard"] #ticket-chat-new-messages:hover {
    transform: translateX(-50%) translateY(-2px) !important;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16) !important;
}


/* ── Empty State: Polished ────────────────────────────────── */

body[data-page="dashboard"] .ticket-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: rgba(29, 125, 242, 0.08);
    border: 1.5px solid rgba(29, 125, 242, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.6rem;
    color: var(--dash-accent);
    box-shadow: 0 8px 24px rgba(29, 125, 242, 0.08);
}

body[data-page="dashboard"] #ticket-active-empty h3 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}


/* ── Create Ticket Form: Glass panel ──────────────────────── */

body[data-page="dashboard"] .ticket-create-panel {
    padding: 32px !important;
}

body[data-page="dashboard"] .ticket-create-panel .ticket-panel-header h3 {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

body[data-page="dashboard"] .ticket-form-inner .lg-input {
    border-radius: 14px !important;
    border: 1.5px solid rgba(148, 163, 184, 0.2) !important;
    background: rgba(255, 255, 255, 0.65) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

body[data-page="dashboard"] .ticket-form-inner .lg-input:focus {
    border-color: rgba(29, 125, 242, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(29, 125, 242, 0.08) !important;
    background: rgba(255, 255, 255, 0.85) !important;
}


/* ── Addon Right Sidebar: Glass upgrade ───────────────────── */

body[data-page="dashboard"] .addon-right-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.2) transparent;
}

body[data-page="dashboard"] .addon-right-sidebar .glass-panel {
    border: 1.5px solid rgba(148, 163, 184, 0.14) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 4px 16px rgba(15, 23, 42, 0.04) !important;
}

body[data-page="dashboard"] .ads-usage-title {
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.02em;
}

body[data-page="dashboard"] .glass-progress-wrap {
    border-radius: 8px !important;
    height: 8px !important;
    overflow: hidden;
}

body[data-page="dashboard"] .glass-progress-bar {
    border-radius: 8px !important;
    height: 100% !important;
}

/* Addon items — Better interactive states */
body[data-page="dashboard"] .ads-addon-item {
    border-radius: 14px !important;
    padding: 10px 12px !important;
    border: 1.5px solid rgba(148, 163, 184, 0.12) !important;
    transition: transform 0.25s var(--dash-spring),
                border-color 0.25s ease,
                box-shadow 0.25s ease !important;
}

body[data-page="dashboard"] .ads-addon-item:hover {
    border-color: rgba(29, 125, 242, 0.2) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
    transform: translateY(-1px) !important;
}

body[data-page="dashboard"] .ads-addon-use-btn {
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    padding: 5px 12px !important;
}


/* ── Home Tab: Ticket list items ──────────────────────────── */

body[data-page="dashboard"] #dash-my-tickets-list .dash-ticket-item {
    border-radius: 14px !important;
    border: 1.5px solid rgba(148, 163, 184, 0.12) !important;
    padding: 12px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    transition: transform 0.25s var(--dash-spring),
                border-color 0.25s ease,
                box-shadow 0.25s ease !important;
}

body[data-page="dashboard"] #dash-my-tickets-list .dash-ticket-item:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(29, 125, 242, 0.2) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}


/* ── Section headers in ticket sidebar ────────────────────── */

body[data-page="dashboard"] .ticket-section-header h4 {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.4);
}


/* ── Alert Strip: Refined ─────────────────────────────────── */

body[data-page="dashboard"] .ticket-alert-strip {
    border-radius: 14px !important;
    margin: 8px 10px !important;
    border: 1.5px solid rgba(29, 125, 242, 0.2) !important;
    background: rgba(29, 125, 242, 0.04) !important;
    padding: 10px 14px !important;
}


/* ── Closed ticket overlay ────────────────────────────────── */

body[data-page="dashboard"] .ticket-closed-overlay {
    border-radius: 0 !important;
    background: rgba(254, 226, 226, 0.6) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(248, 113, 113, 0.15) !important;
}


/* ── Image preview — Glass card ───────────────────────────── */

body[data-page="dashboard"] .sky-img-preview {
    border-radius: 16px !important;
    border: 1.5px solid rgba(148, 163, 184, 0.18) !important;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* ── Drag & drop active state ─────────────────────────────── */

body[data-page="dashboard"] .sky-drop-active {
    box-shadow: inset 0 0 0 2px rgba(29, 125, 242, 0.3) !important;
    background: rgba(29, 125, 242, 0.04) !important;
}


/* ═══════════════════════════════════════════════════════════════
   DARK MODE — Visual Overhaul counterparts
   ═══════════════════════════════════════════════════════════════ */

html[data-theme='dark'] body[data-page="dashboard"] .ticket-sidebar {
    background: linear-gradient(180deg,
        rgba(22, 34, 53, 0.88) 0%,
        rgba(14, 22, 36, 0.8) 100%) !important;
    border-color: rgba(96, 123, 168, 0.18) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 12px 36px rgba(2, 8, 20, 0.35) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-sidebar-top {
    background: rgba(22, 34, 53, 0.6) !important;
    border-bottom-color: rgba(96, 123, 168, 0.15) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-filter-pills {
    background: rgba(18, 29, 45, 0.85) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-filter-pill {
    background: rgba(22, 34, 53, 0.7) !important;
    border-color: rgba(96, 123, 168, 0.22) !important;
    color: var(--theme-text-muted) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-filter-pill:hover {
    background: rgba(74, 168, 255, 0.08) !important;
    border-color: rgba(74, 168, 255, 0.3) !important;
    color: #4aa8ff !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-filter-pill.active {
    background: linear-gradient(145deg,
        rgba(74, 168, 255, 0.18) 0%,
        rgba(74, 168, 255, 0.08) 100%) !important;
    border-color: rgba(74, 168, 255, 0.4) !important;
    color: #4aa8ff !important;
    box-shadow: 0 4px 14px rgba(74, 168, 255, 0.12) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-sidebar-search {
    background: rgba(22, 34, 53, 0.6) !important;
    border-color: rgba(96, 123, 168, 0.2) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-sidebar-search input {
    color: var(--theme-text-strong) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-sidebar-search:focus-within {
    border-color: rgba(74, 168, 255, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(74, 168, 255, 0.08) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card {
    background: rgba(22, 34, 53, 0.7) !important;
    border-color: rgba(96, 123, 168, 0.16) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.02) inset,
        0 6px 20px rgba(2, 8, 20, 0.25) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card:hover {
    border-color: rgba(74, 168, 255, 0.25) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.02) inset,
        0 16px 40px rgba(2, 8, 20, 0.4) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card.active {
    background: rgba(74, 168, 255, 0.06) !important;
    border-color: rgba(74, 168, 255, 0.3) !important;
    border-left-color: #4aa8ff !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-card-name {
    color: var(--theme-text-strong) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-section-header h4 {
    color: rgba(168, 185, 214, 0.45) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #ticket-chat-panel {
    background: linear-gradient(180deg,
        rgba(22, 34, 53, 0.82) 0%,
        rgba(14, 22, 36, 0.65) 100%) !important;
    border-color: rgba(96, 123, 168, 0.15) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.02) inset,
        0 18px 48px rgba(2, 8, 20, 0.35) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-chat-header {
    background: rgba(22, 34, 53, 0.7) !important;
    border-bottom-color: rgba(96, 123, 168, 0.15) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-msg-inner {
    background: rgba(22, 34, 53, 0.7) !important;
    border-color: rgba(96, 123, 168, 0.16) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.02) inset,
        0 6px 20px rgba(2, 8, 20, 0.2) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-inner {
    background: linear-gradient(145deg,
        rgba(74, 168, 255, 0.15) 0%,
        rgba(20, 41, 72, 0.85) 100%) !important;
    border-color: rgba(74, 168, 255, 0.25) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-chat-compose {
    background: linear-gradient(180deg,
        rgba(22, 34, 53, 0.7) 0%,
        rgba(14, 22, 36, 0.9) 100%) !important;
    border-top-color: rgba(96, 123, 168, 0.15) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #ticket-chat-input {
    background: rgba(22, 34, 53, 0.6) !important;
    border-color: rgba(96, 123, 168, 0.2) !important;
    color: var(--theme-text-strong) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #ticket-chat-input:focus {
    background: rgba(22, 34, 53, 0.8) !important;
    border-color: rgba(74, 168, 255, 0.4) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-chat-attach {
    background: rgba(22, 34, 53, 0.5) !important;
    border-color: rgba(96, 123, 168, 0.2) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .msg-reply-btn {
    background: rgba(22, 34, 53, 0.8) !important;
    border-color: rgba(96, 123, 168, 0.25) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .msg-reply-context {
    background: rgba(74, 168, 255, 0.06) !important;
    border-left-color: rgba(74, 168, 255, 0.5) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-reply-preview {
    background: rgba(74, 168, 255, 0.04) !important;
    border-bottom-color: rgba(74, 168, 255, 0.1) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #ticket-chat-new-messages {
    background: rgba(22, 34, 53, 0.9) !important;
    border-color: rgba(74, 168, 255, 0.3) !important;
    color: #4aa8ff !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-alert-strip {
    background: rgba(74, 168, 255, 0.06) !important;
    border-color: rgba(74, 168, 255, 0.2) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-closed-overlay {
    background: rgba(127, 29, 29, 0.2) !important;
    border-bottom-color: rgba(248, 113, 113, 0.15) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-form-inner .lg-input {
    background: rgba(22, 34, 53, 0.6) !important;
    border-color: rgba(96, 123, 168, 0.2) !important;
    color: var(--theme-text-strong) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-form-inner .lg-input:focus {
    background: rgba(22, 34, 53, 0.8) !important;
    border-color: rgba(74, 168, 255, 0.4) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .addon-right-sidebar .glass-panel {
    border-color: rgba(96, 123, 168, 0.14) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.02) inset,
        0 4px 16px rgba(2, 8, 20, 0.2) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ads-addon-item {
    border-color: rgba(96, 123, 168, 0.12) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .ads-addon-item:hover {
    border-color: rgba(74, 168, 255, 0.2) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #dash-my-tickets-list .dash-ticket-item {
    background: rgba(22, 34, 53, 0.5) !important;
    border-color: rgba(96, 123, 168, 0.12) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #dash-my-tickets-list .dash-ticket-item:hover {
    border-color: rgba(74, 168, 255, 0.2) !important;
    box-shadow: 0 8px 24px rgba(2, 8, 20, 0.3) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] .sky-img-preview {
    background: rgba(22, 34, 53, 0.6) !important;
    border-color: rgba(96, 123, 168, 0.18) !important;
}


/* ═══════════════════════════════════════════════════════════════
   DARK MODE FIXES — Override light polish rules for dark theme
   ═══════════════════════════════════════════════════════════════ */

html[data-theme='dark'] .dashboard-topbar {
    border-bottom-color: rgba(96, 123, 168, 0.2) !important;
    box-shadow: 0 2px 12px rgba(2, 8, 20, 0.3) !important;
}

html[data-theme='dark'] .user-profile-dropdown:hover {
    box-shadow: 0 8px 24px rgba(2, 8, 20, 0.4) !important;
}

html[data-theme='dark'] .avatar-small:hover {
    box-shadow: 0 0 0 3px rgba(74, 168, 255, 0.2);
}

/* Stat pill icon backgrounds — darker variants */
html[data-theme='dark'] .home-stat-icon-blue {
    background: rgba(74, 168, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(74, 168, 255, 0.08);
}

html[data-theme='dark'] .home-stat-icon-purple {
    background: rgba(138, 156, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(138, 156, 255, 0.08);
}

html[data-theme='dark'] .home-stat-icon-amber {
    background: rgba(255, 159, 10, 0.15) !important;
    box-shadow: 0 4px 12px rgba(255, 159, 10, 0.08);
}

html[data-theme='dark'] .home-stat-icon-green {
    background: rgba(48, 209, 88, 0.15) !important;
    box-shadow: 0 4px 12px rgba(48, 209, 88, 0.08);
}

html[data-theme='dark'] .home-stat-pill-num {
    color: var(--theme-text-strong) !important;
}

html[data-theme='dark'] .home-stat-pill:hover {
    border-color: rgba(74, 168, 255, 0.25) !important;
    box-shadow: 0 8px 24px rgba(2, 8, 20, 0.35) !important;
}

/* Dash cards — dark glass surfaces */
html[data-theme='dark'] .dash-card.lg-glass-card {
    border-color: rgba(96, 123, 168, 0.2) !important;
    box-shadow: 0 8px 24px rgba(2, 8, 20, 0.3) !important;
}

html[data-theme='dark'] .dash-card.lg-glass-card:hover {
    border-color: rgba(74, 168, 255, 0.2) !important;
    box-shadow: 0 16px 48px rgba(2, 8, 20, 0.4) !important;
}

html[data-theme='dark'] .dash-card-head h4 {
    color: var(--theme-text-strong) !important;
}

/* Ticket sidebar cards — dark bg */
html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card {
    background: var(--theme-surface-soft) !important;
    border-color: rgba(96, 123, 168, 0.22) !important;
    color: var(--theme-text-strong) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card:hover {
    box-shadow: 0 12px 32px rgba(2, 8, 20, 0.4) !important;
    border-color: rgba(74, 168, 255, 0.3) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card.active {
    border-color: rgba(74, 168, 255, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(74, 168, 255, 0.15),
                0 12px 32px rgba(2, 8, 20, 0.4) !important;
}

/* Status colors persist in dark mode — keep left border colors */
html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="open"],
html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="claimed"],
html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="in_progress"] {
    border-left-color: #30D158 !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="pending"],
html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-sidebar-card[data-status="review"] {
    border-left-color: #FF9F0A !important;
}

/* Chat messages — dark glass */
html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-msg-inner {
    background: var(--theme-surface-soft) !important;
    border-color: rgba(96, 123, 168, 0.22) !important;
    box-shadow: 0 4px 16px rgba(2, 8, 20, 0.25) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-msg-inner:hover {
    box-shadow: 0 8px 24px rgba(2, 8, 20, 0.35) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-msg--me .ticket-msg-inner {
    background: linear-gradient(145deg, rgba(74, 168, 255, 0.22), rgba(20, 41, 72, 0.88)) !important;
    border-color: rgba(74, 168, 255, 0.34) !important;
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-msg--them .ticket-msg-inner {
    background: var(--theme-surface-soft) !important;
    border-color: rgba(96, 123, 168, 0.22) !important;
}

/* Avatar ring in dark mode */
html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-msg-avatar img,
html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-msg-avatar-fallback {
    border-color: rgba(74, 168, 255, 0.2) !important;
    box-shadow: 0 2px 8px rgba(2, 8, 20, 0.3);
}

/* Compose area */
html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-compose-wrap {
    border-top-color: rgba(96, 123, 168, 0.2);
    background: rgba(14, 23, 37, 0.5);
}

html[data-theme='dark'] body[data-page="dashboard"] #tab-tickets .ticket-compose-input:focus {
    border-color: rgba(74, 168, 255, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(74, 168, 255, 0.12) !important;
}

/* Filter pills */
html[data-theme='dark'] body[data-page="dashboard"] .ticket-filter-pill:hover {
    box-shadow: 0 2px 8px rgba(2, 8, 20, 0.3);
}

html[data-theme='dark'] body[data-page="dashboard"] .ticket-filter-pill.active {
    box-shadow: 0 4px 16px rgba(74, 168, 255, 0.18) !important;
}

/* Gallery cards */
html[data-theme='dark'] .my-gallery-card:hover {
    box-shadow: 0 16px 40px rgba(2, 8, 20, 0.45) !important;
    border-color: rgba(74, 168, 255, 0.25) !important;
}

/* Settings */
html[data-theme='dark'] .sett-sidebar {
    background: rgba(18, 28, 45, 0.55) !important;
    border-right-color: rgba(96, 123, 168, 0.2) !important;
}

html[data-theme='dark'] .sett-sidebar-label {
    color: rgba(168, 185, 214, 0.5) !important;
}

html[data-theme='dark'] .sett-sidebar-item {
    color: rgba(207, 220, 243, 0.7) !important;
}

html[data-theme='dark'] .sett-sidebar-item:hover {
    background: rgba(74, 168, 255, 0.1) !important;
    color: #4aa8ff !important;
}

html[data-theme='dark'] .sett-sidebar-item.active {
    background: rgba(74, 168, 255, 0.14) !important;
    color: #4aa8ff !important;
    box-shadow: inset 3px 0 0 #4aa8ff;
}

html[data-theme='dark'] .sett-sidebar-item.active i {
    opacity: 1;
    color: #4aa8ff;
}

html[data-theme='dark'] .sett-preview {
    background: rgba(18, 28, 45, 0.45) !important;
    box-shadow: 0 2px 8px rgba(2, 8, 20, 0.3);
}

html[data-theme='dark'] .sett-input:focus,
html[data-theme='dark'] .sett-textarea:focus {
    border-color: rgba(74, 168, 255, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(74, 168, 255, 0.12) !important;
}

/* Buttons in dark mode */
html[data-theme='dark'] .lg-btn-primary:hover {
    box-shadow: 0 8px 24px rgba(74, 168, 255, 0.25) !important;
}

html[data-theme='dark'] .lg-btn-glass:hover {
    box-shadow: 0 2px 8px rgba(2, 8, 20, 0.3) !important;
}

/* Scrollbar in dark mode */
html[data-theme='dark'] body[data-page="dashboard"] ::-webkit-scrollbar-thumb {
    background: rgba(96, 123, 168, 0.2);
}

html[data-theme='dark'] body[data-page="dashboard"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 123, 168, 0.35);
}

/* Addon panel in dark mode */
html[data-theme='dark'] .ads-addon-item:hover {
    box-shadow: 0 2px 8px rgba(2, 8, 20, 0.3) !important;
}

/* Nav sidebar hover in dark */
html[data-theme='dark'] .sidebar-nav .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

html[data-theme='dark'] .sidebar-nav .nav-item:hover .nav-icon-wrap {
    background: rgba(74, 168, 255, 0.12);
}

html[data-theme='dark'] .sidebar-nav .nav-item.active {
    background: rgba(74, 168, 255, 0.1);
}

html[data-theme='dark'] .sidebar-nav .nav-item.active .nav-icon-wrap {
    background: rgba(74, 168, 255, 0.18);
    color: #4aa8ff;
}

html[data-theme='dark'] .sidebar-nav .nav-item.active::before {
    background: #4aa8ff;
}

html[data-theme='dark'] .sidebar-nav-label {
    color: rgba(168, 185, 214, 0.5);
}

html[data-theme='dark'] .nav-icon-wrap {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme='dark'] .sidebar-user-panel {
    background: rgba(20, 31, 49, 0.55);
    border-color: rgba(96, 123, 168, 0.2);
}

html[data-theme='dark'] .sidebar-user-panel::after {
    background: linear-gradient(90deg, transparent, rgba(96, 123, 168, 0.15), transparent);
}

html[data-theme='dark'] .sup-avatar {
    border-color: rgba(96, 123, 168, 0.3);
}

html[data-theme='dark'] .sup-status-dot {
    border-color: #0a1220;
}

/* Empty text */
html[data-theme='dark'] .empty-text,
html[data-theme='dark'] .dash-list .empty-text {
    color: var(--theme-text-muted) !important;
}


/* ── Reduced motion ─────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .home-stat-pill,
    .home-content-grid > .dash-card,
    body[data-page="dashboard"] #tab-tickets .ticket-msg,
    .ticket-alert-strip {
        animation: none !important;
    }

    .sup-status-dot {
        animation: none !important;
    }
}
