
/* ===== index.html ===== */

        /* Color and spacing tokens make future style updates quick and consistent */
        :root {
            --supportix-primary: #2563eb;
            --supportix-primary-dark: #1d4ed8;
            --supportix-bg: #f4f7fb;
            --supportix-surface: #ffffff;
            --supportix-muted: #64748b;
            --supportix-border: #e2e8f0;
            --supportix-radius: 1.15rem;
            --sidebar-width: 248px;
            --sidebar-collapsed-width: 88px;
            --sidebar-bg: #12264f;
            --sidebar-bg-soft: #183164;
            --sidebar-border: #2a477f;
            --sidebar-text: #dbe7ff;
            --sidebar-title: #9eb4df;
        }

        /* Base body setup so all sections share the same clean typography */
        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            background-color: var(--supportix-bg);
            color: #0f172a;
            letter-spacing: -0.01em;
        }

        /* Login page styles keep the template look while using Bootstrap controls. */
        .login-page {
            background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
            min-height: 100vh;
        }

        .login-card {
            max-width: 540px;
            padding: clamp(1.5rem, 4vw, 2.5rem);
            border: 1px solid var(--supportix-border);
            border-radius: 1.75rem;
            background: #ffffff;
            box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
        }

        .login-logo {
            width: min(100%, 320px);
            height: auto;
        }

        .fw-black {
            font-weight: 800;
        }

        /* Desktop sidebar area with sticky behavior for quick access */
        .desktop-sidebar {
            background: linear-gradient(180deg, var(--sidebar-bg) 0%, #10224a 100%);
            border-right: 1px solid var(--sidebar-border);
            width: var(--sidebar-width);
            min-width: var(--sidebar-width);
            max-width: var(--sidebar-width);
            transition: width 0.25s ease, min-width 0.25s ease, max-width 0.25s ease;
            overflow: visible;
        }

        .sidebar-inner {
            min-height: 100vh;
            overflow: visible;
        }

        /* Sidebar header row now holds only the logo for a cleaner brand area */
        .sidebar-top {
            display: block;
        }

        /* Topbar collapse button controls desktop sidebar without covering the logo */
        .topbar-collapse-btn {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.8rem;
            border-color: #dbe5f3;
            color: #334155;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #ffffff;
        }

        .topbar-collapse-btn i {
            font-size: 1.05rem;
        }

        .topbar-collapse-btn:hover,
        .topbar-collapse-btn:focus {
            background: #f8fbff;
            border-color: #bfdbfe;
            color: #1d4ed8;
        }

        /* Reusable brand badge matching the login page style */
        .brand-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.9rem;
            border-radius: 0.95rem;
            background: #ffffff;
            color: var(--supportix-primary);
            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
            font-weight: 800;
            width: 100%;
            max-width: 100%;
            flex: 1 1 auto;
        }

        /* Brand image comes from assets folder for consistent logo usage */
        .brand-image {
            display: block;
            width: 100%;
            max-width: 100%;
            height: auto;
        }

        .brand-logo {
            width: 2rem;
            height: 2rem;
            border-radius: 0.7rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--supportix-primary);
            color: #fff;
        }

        /* Sidebar links use pill styling for active and hover states */
        .menu-link {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            border-radius: 0.85rem;
            color: var(--sidebar-text);
            padding: 0.7rem 0.85rem;
            text-decoration: none;
            transition: all 0.2s ease;
            position: relative;
        }

        /* Menu text now matches regular table row typography (like the "Customer" values) */
        .menu-text {
            font-size: 1rem;
            font-weight: 400;
            line-height: 1.5;
        }

        .menu-link:hover,
        .menu-link:focus {
            background: rgba(59, 130, 246, 0.18);
            color: #ffffff;
        }

        .menu-link.active {
            background: var(--supportix-primary);
            color: #ffffff;
            box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
        }

        .menu-link-badge {
            margin-left: auto;
            border-radius: 999px;
            min-width: 1.45rem;
            min-height: 1.45rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            font-size: 0.7rem;
            font-weight: 700;
            padding: 0 0.42rem;
            box-shadow: 0 6px 16px rgba(239, 68, 68, 0.22);
        }

        .sidebar-collapsed .desktop-sidebar .menu-link-badge {
            position: absolute;
            right: 0.55rem;
            top: 50%;
            transform: translateY(-50%);
        }

        /* Content panel is flexible while sidebar stays fixed width */
        .main-pane {
            min-width: 0;
            flex: 1 1 auto;
        }

        /* Collapsed sidebar styles: compact icon mode for desktop */
        .sidebar-collapsed .desktop-sidebar {
            width: var(--sidebar-collapsed-width);
            min-width: var(--sidebar-collapsed-width);
            max-width: var(--sidebar-collapsed-width);
        }

        /* In compact mode hide the top logo row so nav icons move up */
        .sidebar-collapsed .desktop-sidebar .sidebar-top {
            display: none;
        }

        .sidebar-collapsed .desktop-sidebar .brand-badge,
        .sidebar-collapsed .desktop-sidebar .menu-title,
        .sidebar-collapsed .desktop-sidebar .menu-text {
            display: none !important;
        }

        .sidebar-collapsed .desktop-sidebar .sidebar-inner {
            padding-left: 0.5rem !important;
            padding-right: 0.5rem !important;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link {
            justify-content: center;
            padding: 0.75rem;
        }

        /* Tooltip bubble appears only in collapsed icon mode */
        .sidebar-collapsed .desktop-sidebar .menu-link::after {
            content: attr(data-title);
            position: absolute;
            left: calc(100% + 0.75rem);
            top: 50%;
            transform: translateY(-50%) translateX(-8px);
            background: #0f172a;
            color: #ffffff;
            border: 1px solid rgba(148, 163, 184, 0.35);
            border-radius: 0.6rem;
            font-size: 0.75rem;
            font-weight: 600;
            white-space: nowrap;
            padding: 0.4rem 0.6rem;
            opacity: 0;
            pointer-events: none;
            transition: all 0.18s ease;
            z-index: 1050;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link::before {
            content: "";
            position: absolute;
            left: calc(100% + 0.4rem);
            top: 50%;
            transform: translateY(-50%);
            border: 6px solid transparent;
            border-right-color: #0f172a;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.18s ease;
            z-index: 1049;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link:hover::after,
        .sidebar-collapsed .desktop-sidebar .menu-link:hover::before {
            opacity: 1;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link:hover::after {
            transform: translateY(-50%) translateX(0);
        }

        /* Small helper text for group labels */
        .menu-title {
            color: var(--sidebar-title);
            font-size: 0.72rem;
            letter-spacing: 0.14em;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 0.55rem;
        }

        /* Topbar profile menu styles keep account actions grouped and easy to find */
        .topbar-profile-btn {
            border: 1px solid #dbe5f3;
            border-radius: 0.85rem;
            background: #ffffff;
            padding: 0.35rem 0.5rem;
        }

        .topbar-profile-btn:hover {
            border-color: #bfdbfe;
            background: #f8fbff;
        }

        /* Topbar layout helpers keep header controls wrapping cleanly on smaller screens */
        .topbar-shell {
            gap: 0.75rem 1rem;
            flex-wrap: wrap;
        }

        .topbar-left {
            display: flex;
            align-items: center;
            gap: 0.5rem 0.75rem;
            flex: 1 1 640px;
            min-width: 0;
        }

        .topbar-right {
            display: flex;
            align-items: center;
            gap: 0.5rem 0.75rem;
            flex: 0 1 auto;
            margin-left: auto;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        /* Search wrapper grows and shrinks safely without causing horizontal overflow */
        .topbar-search {
            flex: 1 1 320px;
            width: min(100%, 780px);
            max-width: 780px;
            min-width: 0;
        }

        /* Brand selector sits beside search and keeps long page widths in check */
        .topbar-brand-selector {
            flex: 0 1 220px;
            width: min(100%, 220px);
            min-width: 150px;
            max-width: 240px;
        }

        .topbar-search .form-control {
            min-width: 0;
        }

        .topbar-avatar {
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #2563eb;
            color: #ffffff;
            font-weight: 700;
            font-size: 0.8rem;
            line-height: 1;
        }

        .profile-menu {
            min-width: 260px;
            max-width: 92vw;
            border-radius: 0.85rem;
            overflow: visible;
        }

        /* Notification menu stays inside viewport on very narrow devices */
        .topbar-notification-menu {
            width: min(92vw, 320px);
            min-width: 0;
            border-radius: 0.85rem;
        }

        /* Long notification subjects wrap inside the dropdown instead of stretching it. */
        .topbar-notification-item {
            white-space: normal;
            min-width: 0;
        }

        .topbar-notification-title {
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: break-word;
            line-height: 1.35;
        }

        /* Generic card style used for panels and metric blocks */
        .panel-card {
            border: 1px solid var(--supportix-border);
            border-radius: var(--supportix-radius);
            background: var(--supportix-surface);
            box-shadow: 0 14px 35px rgba(15, 23, 42, 0.05);
        }

        /* Smooth motion on cards and buttons makes interactions feel more polished */
        .panel-card,
        .btn {
            transition: transform 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease, color 0.24s ease;
        }

        /* Theme button styles keep all key actions visually consistent */
        .btn-theme-solid {
            background: #2563eb;
            border: 1px solid #2563eb;
            color: #ffffff;
            border-radius: 0.65rem;
            box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
        }

        .btn-theme-solid:hover,
        .btn-theme-solid:focus {
            background: #1d4ed8;
            border-color: #1d4ed8;
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
        }

        .btn-theme-outline {
            background: #ffffff;
            border: 1px solid #3b82f6;
            color: #2563eb;
            border-radius: 0.6rem;
            font-weight: 600;
        }

        .btn-theme-outline:hover,
        .btn-theme-outline:focus {
            background: #eff6ff;
            border-color: #2563eb;
            color: #1d4ed8;
            transform: translateY(-1px);
        }

        .panel-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
        }

        /* Ticket row hover uses one soft color so the highlight does not flash bright first. */
        .ticket-table > tbody > tr > * {
            --bs-table-bg-state: transparent;
            transition: background-color 0.12s ease, color 0.12s ease;
        }

        .ticket-table > tbody > tr:hover > * {
            --bs-table-bg-state: #f8fbff;
            background-color: #f8fbff !important;
        }

        /* Hero card introduces page context and quick status overview */
        .hero-card {
            background: #1e3a8a;
            border: 0;
            color: #ffffff;
            border-radius: 1.35rem;
            overflow: hidden;
            position: relative;
        }

        .hero-card::after {
            content: "";
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 42%);
            pointer-events: none;
        }

        /* Metric icon badge keeps numbers easy to scan quickly */
        .metric-icon {
            width: 2.6rem;
            height: 2.6rem;
            border-radius: 0.85rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(37, 99, 235, 0.12);
            color: var(--supportix-primary);
            font-size: 1.15rem;
        }

        /* Priority dots make status meaning visible at a glance */
        .status-dot {
            width: 0.65rem;
            height: 0.65rem;
            border-radius: 50%;
            display: inline-block;
            margin-right: 0.45rem;
        }

        .status-open { background: #ef4444; }
        .status-progress { background: #f59e0b; }
        .status-resolved { background: #10b981; }

        /* Mobile spacing tweaks keep layout comfortable on small screens */
        @media (max-width: 991.98px) {
            .page-content {
                padding: 1.15rem;
            }
        }

        /* This breakpoint lets topbar controls stack before they get cramped */
        @media (max-width: 1199.98px) {
            .topbar-left,
            .topbar-right {
                flex: 1 1 100%;
                margin-left: 0;
            }

            .topbar-right {
                justify-content: flex-end;
            }

            .topbar-brand-selector {
                width: 100%;
                max-width: none;
            }

            .topbar-search {
                width: 100%;
                max-width: none;
            }
        }

        /* Extra-small phones need more forgiving button and action spacing */
        @media (max-width: 575.98px) {
            .topbar-right {
                justify-content: flex-start;
            }

            .topbar-profile-btn {
                padding: 0.35rem 0.45rem;
            }
        }
    

/* ===== tickets.html ===== */

        /* Shared design tokens keep page colors and spacing consistent with index.html */
        :root {
            --supportix-primary: #2563eb;
            --supportix-primary-dark: #1d4ed8;
            --supportix-bg: #f4f7fb;
            --supportix-surface: #ffffff;
            --supportix-muted: #64748b;
            --supportix-border: #e2e8f0;
            --supportix-radius: 1.15rem;
            --sidebar-width: 248px;
            --sidebar-collapsed-width: 88px;
            --sidebar-bg: #12264f;
            --sidebar-bg-soft: #183164;
            --sidebar-border: #2a477f;
            --sidebar-text: #dbe7ff;
            --sidebar-title: #9eb4df;
        }

        /* Base page setup for typography and neutral app background */
        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            background-color: var(--supportix-bg);
            color: #0f172a;
            letter-spacing: -0.01em;
        }

        /* Desktop sidebar keeps navigation visible for quick movement between pages */
        .desktop-sidebar {
            background: linear-gradient(180deg, var(--sidebar-bg) 0%, #10224a 100%);
            border-right: 1px solid var(--sidebar-border);
            width: var(--sidebar-width);
            min-width: var(--sidebar-width);
            max-width: var(--sidebar-width);
            transition: width 0.25s ease, min-width 0.25s ease, max-width 0.25s ease;
            overflow: visible;
        }

        .sidebar-inner {
            min-height: 100vh;
            overflow: visible;
        }

        /* This top area holds the logo and the collapse button */
        .sidebar-top {
            position: relative;
            display: block;
        }

        /* The button toggles desktop sidebar compact mode */
        .sidebar-toggle-btn {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.8rem;
            border-color: rgba(191, 219, 254, 0.35);
            color: var(--sidebar-text);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            position: absolute;
            top: 50%;
            right: -0.5rem;
            transform: translateY(-50%);
            z-index: 3;
        }

        .sidebar-toggle-btn i {
            font-size: 1.05rem;
        }

        .sidebar-toggle-btn:hover,
        .sidebar-toggle-btn:focus {
            background: rgba(59, 130, 246, 0.24);
            border-color: rgba(59, 130, 246, 0.55);
            color: #ffffff;
        }

        /* Brand block matches dashboard branding */
        .brand-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.9rem;
            border-radius: 0.95rem;
            background: #ffffff;
            color: var(--supportix-primary);
            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
            font-weight: 800;
            width: 100%;
            max-width: 100%;
            flex: 1 1 auto;
        }

        .brand-image {
            display: block;
            width: 100%;
            max-width: 100%;
            height: auto;
        }

        /* Menu links use pill shape and support active states */
        .menu-link {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            border-radius: 0.85rem;
            color: var(--sidebar-text);
            padding: 0.7rem 0.85rem;
            text-decoration: none;
            transition: all 0.2s ease;
            position: relative;
        }

        .menu-text {
            font-size: 1rem;
            font-weight: 400;
            line-height: 1.5;
        }

        .menu-link:hover,
        .menu-link:focus {
            background: rgba(59, 130, 246, 0.18);
            color: #ffffff;
        }

        .menu-link.active {
            background: var(--supportix-primary);
            color: #ffffff;
            box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
        }

        /* Group labels make sidebar categories easier to scan */
        .menu-title {
            color: var(--sidebar-title);
            font-size: 0.72rem;
            letter-spacing: 0.14em;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 0.55rem;
        }

        .main-pane {
            min-width: 0;
            flex: 1 1 auto;
        }

        /* Topbar layout helpers prevent search and action buttons from colliding on smaller widths */
        .topbar-shell {
            gap: 0.75rem 1rem;
            flex-wrap: wrap;
        }

        .topbar-left {
            display: flex;
            align-items: center;
            gap: 0.5rem 0.75rem;
            flex: 1 1 640px;
            min-width: 0;
        }

        .topbar-right {
            display: flex;
            align-items: center;
            gap: 0.5rem 0.75rem;
            flex: 0 1 auto;
            margin-left: auto;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        /* Search wrapper expands on desktop and shrinks safely on phones */
        .topbar-search {
            flex: 1 1 320px;
            width: min(100%, 780px);
            max-width: 780px;
            min-width: 0;
        }

        /* Brand selector keeps the active workspace visible while filtering rows */
        .topbar-brand-selector {
            flex: 0 1 220px;
            width: min(100%, 220px);
            min-width: 150px;
            max-width: 240px;
        }

        .topbar-search .form-control {
            min-width: 0;
        }

        /* Topbar profile and notification styling matches the dashboard header style */
        .topbar-profile-btn {
            border: 1px solid #dbe5f3;
            border-radius: 0.85rem;
            background: #ffffff;
            padding: 0.35rem 0.5rem;
        }

        .topbar-profile-btn:hover {
            border-color: #bfdbfe;
            background: #f8fbff;
        }

        .topbar-avatar {
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #2563eb;
            color: #ffffff;
            font-weight: 700;
            font-size: 0.8rem;
            line-height: 1;
        }

        .profile-menu {
            min-width: 260px;
            max-width: 92vw;
            border-radius: 0.85rem;
            overflow: visible;
        }

        .topbar-notification-menu {
            width: min(92vw, 320px);
            min-width: 0;
            border-radius: 0.85rem;
        }

        /* Shared card style for hero panel, filters, and table container */
        .panel-card {
            border: 1px solid var(--supportix-border);
            border-radius: var(--supportix-radius);
            background: var(--supportix-surface);
            box-shadow: 0 14px 35px rgba(15, 23, 42, 0.05);
            transition: transform 0.24s ease, box-shadow 0.24s ease;
        }

        .panel-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
        }

        /* Status dots improve scan speed in the ticket table */
        .status-dot {
            width: 0.6rem;
            height: 0.6rem;
            border-radius: 50%;
            display: inline-block;
            margin-right: 0.4rem;
        }

        .status-open { background: #ef4444; }
        .status-progress { background: #f59e0b; }
        .status-pending { background: #6366f1; }
        .status-resolved { background: #10b981; }

        /* Row hover state helps users track across wide tables without a bright flash */
        .ticket-table > tbody > tr > * {
            --bs-table-bg-state: transparent;
            transition: background-color 0.12s ease, color 0.12s ease;
        }

        .ticket-table > tbody > tr:hover > * {
            --bs-table-bg-state: #f8fbff;
            background-color: #f8fbff !important;
        }

        /* Compact avatar badges are used for assignee initials */
        .agent-avatar {
            width: 1.8rem;
            height: 1.8rem;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.72rem;
            font-weight: 700;
            color: #ffffff;
            background: #2563eb;
        }

        /* Reply bubbles make ticket conversations easy to scan on desktop and mobile */
        .reply-thread {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
            max-height: 760px;
            overflow-y: auto;
            padding: 0.25rem;
        }

        .reply-row {
            display: flex;
            width: 100%;
        }

        .reply-row-agent {
            justify-content: flex-end;
        }

        .reply-row-customer {
            justify-content: flex-start;
        }

        .reply-bubble {
            width: min(96%, 1040px);
            max-width: 1040px;
            border-radius: 1rem;
            padding: 0.9rem 1rem;
            overflow-wrap: anywhere;
        }

        .reply-bubble-agent {
            background: var(--supportix-primary);
            color: #ffffff;
            border-bottom-right-radius: 0.35rem;
        }

        .reply-bubble-customer {
            background: #f8fafc;
            border: 1px solid var(--supportix-border);
            color: #0f172a;
            border-bottom-left-radius: 0.35rem;
        }

        .reply-message p:last-child,
        .reply-message ul:last-child,
        .reply-message ol:last-child,
        .reply-message blockquote:last-child {
            margin-bottom: 0;
        }

        .reply-message blockquote {
            border-left: 3px solid currentColor;
            margin: 0;
            padding-left: 0.75rem;
            opacity: 0.9;
        }

        .reply-image {
            display: block;
            width: min(100%, 420px);
            max-height: 320px;
            object-fit: contain;
            border-radius: 0.75rem;
            border: 1px solid rgba(15, 23, 42, 0.12);
            background: #ffffff;
        }

        .reply-attachments {
            display: grid;
            gap: 0.5rem;
        }

        .reply-attachment-link {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            max-width: 100%;
            padding: 0.7rem 0.8rem;
            border: 1px solid rgba(15, 23, 42, 0.12);
            border-radius: 0.65rem;
            background: rgba(255, 255, 255, 0.78);
            color: inherit;
            text-decoration: none;
        }

        .reply-attachment-link:hover {
            border-color: rgba(13, 110, 253, 0.45);
            color: #0d6efd;
        }

        .reply-attachment-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.1rem;
            height: 2.1rem;
            flex: 0 0 auto;
            border-radius: 0.55rem;
            background: #eef4ff;
            color: #0d6efd;
        }

        .reply-attachment-name,
        .reply-attachment-meta {
            display: block;
            overflow-wrap: anywhere;
        }

        .reply-attachment-name {
            font-weight: 700;
            line-height: 1.25;
        }

        .reply-attachment-meta {
            color: var(--supportix-muted);
            font-size: 0.82rem;
        }

        .rich-reply-editor {
            min-height: 150px;
            height: auto;
            overflow-y: auto;
            outline: none;
        }

        .rich-reply-editor:empty::before {
            content: attr(data-placeholder);
            color: var(--supportix-muted);
        }

        .reply-toolbar .btn {
            min-width: 2.25rem;
        }

        .reply-dropzone {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            min-height: 132px;
            padding: 1rem;
            border: 1.5px dashed #9db7e8;
            border-radius: 0.9rem;
            background: #f8fbff;
            color: #0f172a;
            cursor: pointer;
            text-align: center;
            transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
        }

        .reply-dropzone:hover,
        .reply-dropzone.is-dragover {
            border-color: var(--supportix-primary);
            background: #eff6ff;
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
        }

        .reply-dropzone.has-file {
            border-style: solid;
            border-color: #10b981;
            background: #f0fdf4;
        }

        .reply-dropzone-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 50%;
            background: #e8f0ff;
            color: var(--supportix-primary);
            font-size: 1.25rem;
        }

        .reply-dropzone-name {
            color: var(--supportix-muted);
            font-size: 0.85rem;
        }

        /* Ticket rating stars keep feedback visible without adding visual noise. */
        .ticket-rating-stars {
            display: inline-flex;
            align-items: center;
            gap: 0.12rem;
        }

        .latest-ratings-table {
            min-width: 1100px;
        }

        /* Latest ratings table gets denser layout and stronger hierarchy for quick scanning. */
        .latest-ratings-wrap {
            border: 1px solid #e2e8f0;
            border-radius: 0.95rem;
            overflow: hidden;
            background: #ffffff;
        }

        .latest-ratings-table thead th {
            font-weight: 700;
            letter-spacing: 0.01em;
            background: #f8fbff;
            border-bottom: 1px solid #dbe5f3;
            padding-top: 0.85rem;
            padding-bottom: 0.85rem;
        }

        .latest-ratings-table tbody td {
            vertical-align: middle;
            padding-top: 0.8rem;
            padding-bottom: 0.8rem;
        }

        .latest-ratings-table tbody tr:hover td {
            background: #f8fbff;
        }

        .latest-rating-ticket {
            display: inline-flex;
            flex-direction: column;
            gap: 0.12rem;
            max-width: 33rem;
        }

        .latest-rating-ticket-number {
            font-weight: 800;
            color: #0f172a;
            line-height: 1.2;
        }

        .latest-rating-ticket-subject {
            font-weight: 650;
            color: #1f2937;
            line-height: 1.28;
        }

        .latest-rating-customer {
            display: inline-flex;
            align-items: center;
            gap: 0.55rem;
            min-width: 0;
            max-width: 18rem;
        }

        .latest-rating-customer-meta {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 0.12rem;
        }

        .latest-rating-customer-name {
            font-weight: 700;
            color: #111827;
            line-height: 1.2;
            overflow-wrap: anywhere;
        }

        .latest-rating-customer-email {
            font-size: 0.78rem;
            color: #64748b;
            line-height: 1.2;
            overflow-wrap: anywhere;
        }

        .latest-rating-score {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            padding: 0.32rem 0.55rem;
            border: 1px solid #e5edf7;
            border-radius: 999px;
            background: #ffffff;
        }

        .latest-rating-score-value {
            font-weight: 700;
            color: #0f172a;
            line-height: 1;
        }

        .latest-rating-remarks {
            color: #334155;
            line-height: 1.4;
            overflow-wrap: anywhere;
            max-width: 38rem;
        }

        .latest-rating-date {
            font-weight: 600;
            color: #1f2937;
            min-width: 11rem;
        }

        .latest-rating-open-btn {
            border-radius: 0.7rem;
            width: 2.2rem;
            height: 2.2rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .latest-rating-open-btn i {
            font-size: 1.1rem;
            line-height: 1;
        }

.rating-page-body {
    min-height: 100vh;
    color: #0f172a;
    background: #f5f7fb;
}

/* The rating page shell keeps the minimal form vertically comfortable on all screens. */
.rating-page-shell {
    min-height: 100vh;
}

.rating-minimal-card {
    width: min(100%, 680px);
    padding: clamp(1.25rem, 4vw, 2.25rem);
    border: 1px solid #e5eaf2;
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.rating-minimal-logo {
    display: block;
    width: min(220px, 70vw);
    height: auto;
    margin-inline: auto;
}

.rating-ticket-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.75rem;
    border: 1px solid #dbe5f3;
    border-radius: 999px;
    color: #2563eb;
    background: #f8fbff;
    font-size: 0.82rem;
    font-weight: 800;
}

.rating-minimal-title {
    color: #0f172a;
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    line-height: 1.14;
    font-weight: 850;
    letter-spacing: -0.035em;
}

.rating-minimal-copy {
    color: #64748b;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.rating-section-title {
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 800;
}

.rating-page-body .rating-stars-wrap {
    padding: 1rem;
    border: 1px solid #e5eaf2;
    border-radius: 1rem;
    background: #fbfdff;
}

.rating-page-body .rating-stars-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
}

.rating-page-body .rating-star-btn {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    color: #f5b301;
    background: transparent;
    font-size: 2.2rem;
    line-height: 1;
    opacity: 0.38;
    transition: transform 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.rating-page-body .rating-star-btn:hover,
.rating-page-body .rating-star-btn:focus-visible {
    transform: translateY(-1px) scale(1.05);
    opacity: 0.72;
}

.rating-page-body .rating-star-btn.active {
    color: #f5b301;
    opacity: 1;
}

.rating-page-body .rating-star-btn:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 3px;
    border-radius: 0.55rem;
}

.rating-page-body .rating-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.92rem;
}

.rating-stars-value {
    color: #0f172a;
    font-weight: 850;
}

.rating-stars-caption {
    color: #64748b;
    font-weight: 600;
}

.rating-remarks {
    resize: vertical;
    min-height: 7rem;
    border-color: #dbe5f3;
    border-radius: 0.9rem;
    background: #fbfdff;
}

.rating-remarks:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.rating-submit-btn {
    min-height: 3.1rem;
    border-radius: 0.9rem;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.rating-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

.rating-privacy-note {
    color: #64748b;
    font-size: 0.88rem;
}

@media (max-width: 575.98px) {
    .rating-minimal-card {
        border-radius: 1rem;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    }

    .rating-page-body .rating-stars-bar {
        justify-content: center;
        width: 100%;
        margin-left: 0;
    }

    .rating-page-body .rating-star-btn {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 2rem;
    }
}

        /* Sort row stays readable by allowing controls to wrap naturally */
        .ticket-sort-controls {
            flex-wrap: wrap;
        }

        .ticket-sort-select {
            width: 180px;
        }

        /* Smaller layout adjustments preserve comfortable spacing on mobile */
        @media (max-width: 991.98px) {
            .page-content {
                padding: 1.15rem;
            }
        }

        /* This breakpoint stacks topbar groups before they start crowding each other */
        @media (max-width: 1199.98px) {
            .topbar-left,
            .topbar-right {
                flex: 1 1 100%;
                margin-left: 0;
            }

            .topbar-right {
                justify-content: flex-end;
            }

            .topbar-brand-selector {
                width: 100%;
                max-width: none;
            }

            .topbar-search {
                width: 100%;
                max-width: none;
            }
        }

        /* On extra-small screens, action and sort controls switch to full-width layout */
        @media (max-width: 575.98px) {
            .topbar-right,
            .ticket-sort-controls {
                justify-content: flex-start;
                width: 100%;
            }

            .topbar-right .btn {
                flex: 1 1 auto;
            }

            .reply-bubble {
                max-width: 100%;
            }

            .ticket-sort-select {
                width: 100%;
            }
        }

        /* Collapsed sidebar mode keeps desktop experience compact when needed */
        body.sidebar-collapsed .desktop-sidebar {
            width: var(--sidebar-collapsed-width);
            min-width: var(--sidebar-collapsed-width);
            max-width: var(--sidebar-collapsed-width);
        }

        body.sidebar-collapsed .desktop-sidebar .sidebar-top {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 2.75rem;
        }

        body.sidebar-collapsed .desktop-sidebar .sidebar-toggle-btn {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 50%;
            margin: 0 auto;
            position: static;
            transform: none;
        }

        body.sidebar-collapsed .desktop-sidebar .brand-badge,
        body.sidebar-collapsed .desktop-sidebar .menu-title,
        body.sidebar-collapsed .desktop-sidebar .menu-text {
            display: none !important;
        }

        body.sidebar-collapsed .desktop-sidebar .sidebar-inner {
            padding-left: 0.5rem !important;
            padding-right: 0.5rem !important;
        }

        body.sidebar-collapsed .desktop-sidebar .menu-link {
            justify-content: center;
            padding: 0.75rem;
        }

        /* Tooltip labels make icon-only sidebar entries understandable */
        body.sidebar-collapsed .desktop-sidebar .menu-link::after {
            content: attr(data-title);
            position: absolute;
            left: calc(100% + 0.75rem);
            top: 50%;
            transform: translateY(-50%) translateX(-8px);
            background: #0f172a;
            color: #ffffff;
            border: 1px solid rgba(148, 163, 184, 0.35);
            border-radius: 0.6rem;
            font-size: 0.75rem;
            font-weight: 600;
            white-space: nowrap;
            padding: 0.4rem 0.6rem;
            opacity: 0;
            pointer-events: none;
            transition: all 0.18s ease;
            z-index: 1050;
        }

        body.sidebar-collapsed .desktop-sidebar .menu-link::before {
            content: "";
            position: absolute;
            left: calc(100% + 0.4rem);
            top: 50%;
            transform: translateY(-50%);
            border: 6px solid transparent;
            border-right-color: #0f172a;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.18s ease;
            z-index: 1049;
        }

        body.sidebar-collapsed .desktop-sidebar .menu-link:hover::after,
        body.sidebar-collapsed .desktop-sidebar .menu-link:hover::before {
            opacity: 1;
        }

        body.sidebar-collapsed .desktop-sidebar .menu-link:hover::after {
            transform: translateY(-50%) translateX(0);
        }
    

/* ===== livechat.html ===== */

        /* These variables keep color and spacing easy to maintain. */
        :root {
            --supportix-primary: #2563eb;
            --supportix-primary-dark: #1d4ed8;
            --supportix-bg: #eef3fb;
            --supportix-surface: #ffffff;
            --supportix-border: #dbe4f2;
            --supportix-muted: #64748b;
            --supportix-sidebar-width: 248px;
            --supportix-sidebar-collapsed: 88px;
            --supportix-sidebar-bg: #12264f;
            --supportix-sidebar-border: #2a477f;
            --supportix-sidebar-text: #dbe7ff;
            --supportix-sidebar-title: #9eb4df;
        }

        /* Base page setup with shared font and soft app background. */
        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            background: var(--supportix-bg);
            color: #0f172a;
            letter-spacing: -0.01em;
        }

        /* Desktop sidebar style with smooth width transitions. */
        .desktop-sidebar {
            background: linear-gradient(180deg, var(--supportix-sidebar-bg) 0%, #10224a 100%);
            border-right: 1px solid var(--supportix-sidebar-border);
            width: var(--supportix-sidebar-width);
            min-width: var(--supportix-sidebar-width);
            max-width: var(--supportix-sidebar-width);
            transition: width 0.25s ease, min-width 0.25s ease, max-width 0.25s ease;
            overflow: visible;
        }

        .sidebar-inner {
            min-height: 100vh;
            overflow: visible;
        }

        /* Logo container keeps branding readable and full width. */
        .brand-badge {
            display: inline-flex;
            align-items: center;
            width: 100%;
            padding: 0.6rem 0.9rem;
            border-radius: 0.95rem;
            background: #ffffff;
            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
        }

        .brand-image {
            display: block;
            width: 100%;
            max-width: 100%;
            height: auto;
        }

        /* Sidebar menu links use this shared style for hover and active states. */
        .menu-link {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            border-radius: 0.85rem;
            color: var(--supportix-sidebar-text);
            padding: 0.7rem 0.85rem;
            text-decoration: none;
            transition: all 0.2s ease;
            position: relative;
        }

        .menu-text {
            font-size: 1rem;
            font-weight: 400;
            line-height: 1.5;
        }

        .menu-link:hover,
        .menu-link:focus {
            background: rgba(59, 130, 246, 0.18);
            color: #ffffff;
        }

        .menu-link.active {
            background: var(--supportix-primary);
            color: #ffffff;
            box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
        }

        .menu-title {
            color: var(--supportix-sidebar-title);
            font-size: 0.72rem;
            letter-spacing: 0.14em;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 0.55rem;
        }

        .main-pane {
            min-width: 0;
            flex: 1 1 auto;
        }

        /* This button toggles desktop sidebar collapse without touching the logo area. */
        .topbar-collapse-btn {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.8rem;
            border-color: #dbe5f3;
            color: #334155;
            background: #ffffff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .topbar-collapse-btn:hover,
        .topbar-collapse-btn:focus {
            background: #f8fbff;
            border-color: #bfdbfe;
            color: #1d4ed8;
        }

        /* Generic card style used for all content blocks. */
        .panel-card {
            border: 1px solid var(--supportix-border);
            border-radius: 1rem;
            background: var(--supportix-surface);
            box-shadow: 0 14px 35px rgba(15, 23, 42, 0.05);
        }

        /* Hero section creates a strong visual start for the live chat workspace. */
        .live-hero {
            border: 1px solid #254e8f;
            border-radius: 1rem;
            background: linear-gradient(120deg, #123366 0%, #1b4c96 55%, #2a67be 100%);
            color: #ffffff;
            overflow: hidden;
            position: relative;
        }

        .live-hero::after {
            content: "";
            position: absolute;
            inset: auto -20% -70% auto;
            width: 320px;
            height: 320px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            pointer-events: none;
        }

        .hero-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.35rem 0.65rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.14);
            font-size: 0.78rem;
            font-weight: 600;
        }

        .hero-metric {
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 0.85rem;
            background: rgba(10, 35, 73, 0.32);
            padding: 0.85rem;
            min-height: 100%;
        }

        .hero-metric-label {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            opacity: 0.82;
            margin-bottom: 0.2rem;
        }

        .hero-metric-value {
            font-size: 1.45rem;
            font-weight: 700;
            margin: 0;
        }

        /* Visitor toolbar helps agents quickly narrow down active users. */
        .toolbar-block {
            border-bottom: 1px solid var(--supportix-border);
        }

        .toolbar-title {
            font-size: 1.05rem;
            font-weight: 500;
            margin: 0;
        }

        .filter-label {
            font-size: 0.72rem;
            color: var(--supportix-muted);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 0.35rem;
        }

        /* Minimal table styling keeps visitor data clean and easy to scan. */
        .visitor-table-wrap {
            border-top: 1px solid var(--supportix-border);
        }

        .visitor-table {
            margin-bottom: 0;
            min-width: 980px;
        }

        .visitor-table thead th {
            font-size: 0.74rem;
            color: var(--supportix-muted);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            font-weight: 500;
            border-bottom-color: #dfe7f4;
            white-space: nowrap;
            background: #f8fbff;
            padding-top: 0.8rem;
            padding-bottom: 0.8rem;
        }

        .visitor-table tbody td {
            border-bottom-color: #e9eff8;
            vertical-align: middle;
            padding-top: 0.8rem;
            padding-bottom: 0.8rem;
            color: #0f172a;
        }

        /* Extra edge padding keeps first and last columns away from panel borders. */
        .visitor-table thead th:first-child,
        .visitor-table tbody td:first-child {
            padding-left: 1.4rem;
        }

        .visitor-table thead th:last-child,
        .visitor-table tbody td:last-child {
            padding-right: 1.4rem;
        }

        .visitor-table tbody tr {
            transition: background-color 0.2s ease;
        }

        .visitor-table tbody tr:hover {
            background: #f8fbff;
        }

        .visitor-name {
            font-weight: 400;
            margin: 0;
            line-height: 1.35;
        }

        .visitor-meta {
            color: var(--supportix-muted);
            font-size: 0.8rem;
            margin: 0;
        }

        .page-url {
            color: #0f766e;
            text-decoration: none;
            font-weight: 500;
            word-break: break-word;
            overflow-wrap: anywhere;
        }

        .page-url:hover,
        .page-url:focus {
            color: #115e59;
            text-decoration: underline;
        }

        .status-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0;
            border-radius: 0;
            font-size: 0.82rem;
            font-weight: 500;
        }

        .status-active {
            color: #166534;
        }

        .status-idle {
            color: #92400e;
        }

        .status-risk {
            color: #991b1b;
        }

        .status-dot {
            width: 0.5rem;
            height: 0.5rem;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .status-dot-active {
            background: #22c55e;
        }

        .status-dot-idle {
            background: #f59e0b;
        }

        .status-dot-risk {
            background: #ef4444;
        }

        /* Live chat console keeps session navigation and messages usable on wide and narrow screens. */
        .live-console {
            display: flex;
            flex-direction: column;
            height: calc(100vh - var(--live-console-top, 360px) - 1rem);
            min-height: 420px;
            overflow: hidden;
        }

        /* Keep this page stable on hover so the fixed composer never jumps out of view. */
        .live-console.panel-card:hover {
            transform: none !important;
            box-shadow: 0 14px 35px rgba(15, 23, 42, 0.05);
        }

        .live-console-top {
            background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        }

        .live-view-tabs {
            flex-wrap: wrap;
        }

        .live-view-tabs .btn {
            border-radius: 0.55rem !important;
            font-weight: 700;
        }

        .live-session-list {
            height: 100%;
            max-height: none;
            overflow-y: auto;
            background: #f8fafc;
        }

        .live-session-item {
            width: 100%;
            border: 0;
            border-bottom: 1px solid var(--supportix-border);
            background: #ffffff;
            padding: 0.9rem 1rem;
            text-align: left;
            transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
        }

        .live-session-name {
            line-height: 1.25;
            overflow-wrap: anywhere;
        }

        .live-session-item:hover,
        .live-session-item:focus,
        .live-session-item.active {
            background: #f8fbff;
            box-shadow: inset 3px 0 0 #2563eb;
            outline: none;
        }

        .live-session-item:hover {
            transform: translateX(1px);
        }

        .live-session-item.is-ringing {
            background: #fff7ed;
            box-shadow: inset 4px 0 0 #f59e0b;
            animation: live-chat-ring 1.1s ease-in-out infinite;
        }

        @keyframes live-chat-ring {
            0%,
            100% {
                transform: translateX(0);
            }

            18% {
                transform: translateX(3px);
            }

            36% {
                transform: translateX(-2px);
            }

            54% {
                transform: translateX(2px);
            }
        }

        .live-status-badge {
            border-radius: 999px;
            font-weight: 700;
            flex: 0 0 auto;
        }

        .live-status-badge.status-open {
            background: #dcfce7;
            color: #166534;
        }

        .live-status-badge.status-pending {
            background: #fef3c7;
            color: #92400e;
        }

        .live-status-badge.status-assigned {
            background: #dbeafe;
            color: #1d4ed8;
        }

        .live-status-badge.status-closed {
            background: #e5e7eb;
            color: #374151;
        }

        .live-chat-header {
            background: #ffffff;
            flex: 0 0 auto;
            padding: 1rem 1.25rem !important;
        }

        .live-message-thread {
            max-height: none;
            min-height: 0;
            overflow-y: auto;
            padding: 1.1rem 1.25rem;
            background: linear-gradient(180deg, #f8fafc 0%, #f3f6fb 100%);
        }

        .live-chat-pane {
            min-height: 0;
            position: relative;
            overflow: hidden;
        }

        /* Keep room at the bottom of the thread when the composer is docked. */
        .live-chat-pane.has-fixed-composer .live-message-thread {
            padding-bottom: 1.1rem;
        }

        .live-message-thread .reply-bubble {
            width: auto;
            max-width: min(76%, 780px);
            padding: 0.8rem 0.95rem;
            line-height: 1.45;
            box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
        }

        .live-message-thread .reply-row-agent .reply-bubble {
            max-width: min(72%, 760px);
        }

        .live-message-thread .reply-row-customer .reply-bubble {
            background: #ffffff;
        }

        .live-system-bubble {
            width: auto !important;
            max-width: min(70%, 520px) !important;
            background: #eef2ff !important;
            color: #334155 !important;
            border: 1px solid #c7d2fe !important;
            text-align: center;
        }

        .live-composer {
            background: #ffffff;
            flex: 0 0 auto;
            /* Sticky keeps reply tools visible without covering the latest messages. */
            position: sticky;
            bottom: 0;
            left: auto;
            width: 100%;
            padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
            z-index: 2;
            box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.05);
        }

        .live-composer .rich-reply-editor {
            min-height: 86px;
            max-height: 150px;
            border-color: #cbd7ea;
            border-radius: 0.75rem;
            padding: 0.75rem 0.85rem;
        }

        .live-composer .reply-toolbar .btn {
            min-width: 2rem;
            padding: 0.28rem 0.5rem;
        }

        .live-composer-actions {
            display: flex;
            align-items: stretch;
            gap: 0.75rem;
        }

        .live-composer .reply-dropzone {
            flex: 1 1 auto;
            min-height: 44px;
            flex-direction: row;
            justify-content: flex-start;
            text-align: left;
            padding: 0.55rem 0.75rem;
            border-radius: 0.7rem;
        }

        .live-composer .reply-dropzone-icon {
            width: 1.75rem;
            height: 1.75rem;
            font-size: 1rem;
        }

        .live-composer .reply-dropzone-name {
            margin-left: auto;
            font-size: 0.78rem;
        }

        .live-console > .row {
            flex: 1 1 auto;
            height: auto !important;
            min-height: 0;
        }

        .live-console > .row > [class*="col-"] {
            min-height: 0;
        }

        .live-console .d-flex.flex-column {
            min-height: 0;
        }

        @media (max-width: 991.98px) {
            .live-console {
                height: auto;
                min-height: 0;
            }

            .live-session-list {
                height: 220px;
                max-height: 220px;
            }

            .live-message-thread {
                min-height: 360px;
            }

            .live-message-thread .reply-bubble,
            .live-message-thread .reply-row-agent .reply-bubble {
                max-width: 96%;
            }

            .live-composer-actions {
                flex-direction: column;
            }

            .live-composer .reply-dropzone-name {
                margin-left: 0;
            }
        }

        /* Action buttons reuse shared project button language. */
        .btn-theme-solid {
            background: #2563eb;
            border: 1px solid #2563eb;
            color: #ffffff;
            border-radius: 0.65rem;
            font-weight: 500;
        }

        .btn-theme-solid:hover,
        .btn-theme-solid:focus {
            background: #1d4ed8;
            border-color: #1d4ed8;
            color: #ffffff;
        }

        .btn-theme-outline {
            background: #ffffff;
            border: 1px solid #3b82f6;
            color: #2563eb;
            border-radius: 0.65rem;
            font-weight: 600;
        }

        .btn-theme-outline:hover,
        .btn-theme-outline:focus {
            background: #eff6ff;
            border-color: #2563eb;
            color: #1d4ed8;
        }

        /* Topbar profile and notification controls align with dashboard pages. */
        .topbar-profile-btn {
            border: 1px solid #dbe5f3;
            border-radius: 0.85rem;
            background: #ffffff;
            padding: 0.35rem 0.5rem;
        }

        .topbar-profile-btn:hover {
            border-color: #bfdbfe;
            background: #f8fbff;
        }

        .topbar-avatar {
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #2563eb;
            color: #ffffff;
            font-weight: 700;
            font-size: 0.8rem;
            line-height: 1;
        }

        .topbar-notification-menu {
            width: min(92vw, 320px);
            min-width: 0;
            border-radius: 0.85rem;
        }

        .profile-menu {
            min-width: 220px;
            border-radius: 0.85rem;
        }

        /* Collapsed sidebar mode keeps icon-only nav with tooltips. */
        .sidebar-collapsed .desktop-sidebar {
            width: var(--supportix-sidebar-collapsed);
            min-width: var(--supportix-sidebar-collapsed);
            max-width: var(--supportix-sidebar-collapsed);
        }

        .sidebar-collapsed .desktop-sidebar .sidebar-top,
        .sidebar-collapsed .desktop-sidebar .menu-title,
        .sidebar-collapsed .desktop-sidebar .menu-text {
            display: none !important;
        }

        .sidebar-collapsed .desktop-sidebar .sidebar-inner {
            padding-left: 0.5rem !important;
            padding-right: 0.5rem !important;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link {
            justify-content: center;
            padding: 0.75rem;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link::after {
            content: attr(data-title);
            position: absolute;
            left: calc(100% + 0.75rem);
            top: 50%;
            transform: translateY(-50%) translateX(-8px);
            background: #0f172a;
            color: #ffffff;
            border: 1px solid rgba(148, 163, 184, 0.35);
            border-radius: 0.6rem;
            font-size: 0.75rem;
            font-weight: 600;
            white-space: nowrap;
            padding: 0.4rem 0.6rem;
            opacity: 0;
            pointer-events: none;
            transition: all 0.18s ease;
            z-index: 1050;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link:hover::after {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }

        /* Mobile tweaks keep cards and controls readable on smaller screens. */
        @media (max-width: 1199.98px) {
            .live-hero {
                border-radius: 0.9rem;
            }
        }

        @media (max-width: 991.98px) {
            .topbar-shell {
                flex-wrap: wrap;
            }

            .topbar-left {
                width: 100%;
            }

            .topbar-left .input-group {
                max-width: none !important;
            }

            .page-content {
                padding: 1rem;
            }

            .topbar-actions {
                display: flex !important;
                flex-wrap: wrap;
                justify-content: flex-end;
                width: 100%;
            }

            .hero-metric-value {
                font-size: 1.25rem;
            }
        }
    

/* ===== brands.html ===== */

        :root {
            --supportix-primary: #2563eb;
            --supportix-primary-dark: #1d4ed8;
            --supportix-bg: #f4f7fb;
            --supportix-surface: #ffffff;
            --supportix-muted: #64748b;
            --supportix-border: #e2e8f0;
            --supportix-radius: 1.15rem;
            --sidebar-width: 248px;
            --sidebar-collapsed-width: 88px;
            --sidebar-bg: #12264f;
            --sidebar-border: #2a477f;
            --sidebar-text: #dbe7ff;
            --sidebar-title: #9eb4df;
        }

        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            background-color: var(--supportix-bg);
            color: #0f172a;
            letter-spacing: -0.01em;
        }

        /* Desktop sidebar keeps navigation available on larger screens. */
        .desktop-sidebar {
            background: linear-gradient(180deg, var(--sidebar-bg) 0%, #10224a 100%);
            border-right: 1px solid var(--sidebar-border);
            width: var(--sidebar-width);
            min-width: var(--sidebar-width);
            max-width: var(--sidebar-width);
            transition: width 0.25s ease, min-width 0.25s ease, max-width 0.25s ease;
            overflow: visible;
        }

        .sidebar-inner {
            min-height: 100vh;
            overflow: visible;
        }

        .brand-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.9rem;
            border-radius: 0.95rem;
            background: #ffffff;
            color: var(--supportix-primary);
            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
            font-weight: 800;
            width: 100%;
        }

        .brand-image {
            width: 100%;
            max-width: 100%;
            height: auto;
            display: block;
        }

        .menu-link {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            border-radius: 0.85rem;
            color: var(--sidebar-text);
            padding: 0.7rem 0.85rem;
            text-decoration: none;
            transition: all 0.2s ease;
            position: relative;
        }

        .menu-link:hover,
        .menu-link:focus {
            background: rgba(59, 130, 246, 0.18);
            color: #ffffff;
        }

        .menu-link.active {
            background: var(--supportix-primary);
            color: #ffffff;
            box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
        }

        .menu-text {
            font-size: 1rem;
            font-weight: 400;
            line-height: 1.5;
        }

        .menu-title {
            color: var(--sidebar-title);
            font-size: 0.72rem;
            letter-spacing: 0.14em;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 0.55rem;
        }

        .main-pane {
            min-width: 0;
            flex: 1 1 auto;
        }

        .topbar-collapse-btn {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.8rem;
            border-color: #dbe5f3;
            color: #334155;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #ffffff;
        }

        .topbar-collapse-btn:hover,
        .topbar-collapse-btn:focus {
            background: #f8fbff;
            border-color: #bfdbfe;
            color: #1d4ed8;
        }

        /* Shared panel design keeps cards visually consistent across sections. */
        .panel-card {
            border: 1px solid var(--supportix-border);
            border-radius: var(--supportix-radius);
            background: var(--supportix-surface);
            box-shadow: 0 14px 35px rgba(15, 23, 42, 0.05);
        }

        .section-title {
            font-weight: 700;
            font-size: 1.05rem;
        }

        .muted-note {
            color: var(--supportix-muted);
            font-size: 0.88rem;
        }

        .category-chip {
            border: 1px solid #c7d2fe;
            background: #eef2ff;
            color: #3730a3;
            font-weight: 600;
            border-radius: 999px;
            padding: 0.23rem 0.6rem;
            font-size: 0.77rem;
            display: inline-block;
            margin: 0.14rem 0.2rem 0.14rem 0;
        }

        .smtp-host-label {
            max-width: 220px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: inline-block;
            vertical-align: bottom;
        }

        .empty-state {
            border: 1px dashed #cbd5e1;
            border-radius: 0.9rem;
            background: #f8fafc;
            padding: 1rem;
            color: #475569;
        }

        .form-hint {
            font-size: 0.78rem;
            color: #64748b;
        }

        /* Brands workspace uses a command-center layout for faster scanning and editing. */
        .brands-workspace {
            width: 100%;
            max-width: none;
            margin: 0;
        }

        .brands-command-strip {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1.25rem;
            border: 1px solid #bfdbfe;
            border-radius: 1rem;
            background: linear-gradient(135deg, #ffffff 0%, #eef6ff 58%, #e0f2fe 100%);
            padding: 1.25rem;
            box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
        }

        .brands-command-copy {
            min-width: 0;
        }

        .brands-kicker {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            color: #1d4ed8;
            font-size: 0.76rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            margin-bottom: 0.45rem;
        }

        .brands-page-title {
            margin: 0;
            font-size: clamp(1.35rem, 2vw, 2rem);
            font-weight: 800;
            letter-spacing: 0;
        }

        .brands-page-copy {
            max-width: 760px;
            color: var(--supportix-muted);
            margin: 0.45rem 0 0;
        }

        .brands-command-actions,
        .brand-directory-tools {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            flex-wrap: wrap;
        }

        .brands-counts {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-wrap: wrap;
            color: var(--supportix-muted);
            font-size: 0.9rem;
        }

        .brands-counts span {
            border: 1px solid var(--supportix-border);
            border-radius: 999px;
            background: #ffffff;
            padding: 0.4rem 0.75rem;
        }

        .brands-counts strong {
            color: #0f172a;
        }

        .brands-tabs .nav-link {
            border-radius: 0.6rem;
            font-weight: 600;
        }

        .brand-stat-tile {
            display: flex;
            align-items: center;
            gap: 0.9rem;
            min-height: 112px;
            border: 1px solid var(--supportix-border);
            border-radius: 1rem;
            background: #ffffff;
            padding: 1rem;
            box-shadow: 0 14px 35px rgba(15, 23, 42, 0.05);
        }

        .brand-stat-icon,
        .brand-context-avatar {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 0.85rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            background: #e8f0ff;
            color: #2563eb;
            font-size: 1.25rem;
        }

        .brand-stat-label {
            color: var(--supportix-muted);
            font-size: 0.75rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            margin: 0 0 0.15rem;
        }

        .brand-stat-value {
            font-size: 1.75rem;
            font-weight: 800;
            margin: 0;
            letter-spacing: 0;
        }

        /* Brand context panel makes the selected workspace obvious before editing. */
        .brand-context-card {
            background: #ffffff;
        }

        .brand-context-stack {
            display: grid;
            gap: 0.75rem;
        }

        .brand-context-item {
            border: 1px solid #dbe5f3;
            border-radius: 0.8rem;
            background: #f8fbff;
            padding: 0.85rem 1rem;
        }

        .brand-context-label {
            display: block;
            color: var(--supportix-muted);
            font-size: 0.74rem;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 0.25rem;
        }

        .brand-directory-card {
            overflow: hidden;
        }

        .brand-directory-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--supportix-border);
            background: #ffffff;
        }

        .brand-directory-tools .input-group {
            width: min(360px, 100%);
        }

        .brand-directory-table,
        .brand-mini-table {
            min-width: 760px;
        }

        .brand-directory-table thead th,
        .brand-mini-table thead th {
            color: #64748b;
            font-size: 0.72rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            background: #f8fbff;
            border-bottom-color: #dbe5f3;
            white-space: nowrap;
        }

        .brand-directory-table tbody td,
        .brand-mini-table tbody td {
            border-bottom-color: #edf2f7;
            padding-top: 0.95rem;
            padding-bottom: 0.95rem;
            vertical-align: middle;
        }

        .brand-directory-table tbody tr:hover,
        .brand-mini-table tbody tr:hover {
            background: #f8fbff;
        }

        .brand-mini-table-wrap {
            max-height: 520px;
        }

        .table-responsive {
            overflow: auto;
        }

        /* Compact sidebar mode keeps desktop clean when collapsed. */
        .sidebar-collapsed .desktop-sidebar {
            width: var(--sidebar-collapsed-width);
            min-width: var(--sidebar-collapsed-width);
            max-width: var(--sidebar-collapsed-width);
        }

        .sidebar-collapsed .desktop-sidebar .brand-badge,
        .sidebar-collapsed .desktop-sidebar .menu-title,
        .sidebar-collapsed .desktop-sidebar .menu-text {
            display: none !important;
        }

        .sidebar-collapsed .desktop-sidebar .sidebar-inner {
            padding-left: 0.5rem !important;
            padding-right: 0.5rem !important;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link {
            justify-content: center;
            padding: 0.75rem;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link::after {
            content: attr(data-title);
            position: absolute;
            left: calc(100% + 0.75rem);
            top: 50%;
            transform: translateY(-50%) translateX(-8px);
            background: #0f172a;
            color: #ffffff;
            border: 1px solid rgba(148, 163, 184, 0.35);
            border-radius: 0.6rem;
            font-size: 0.75rem;
            font-weight: 600;
            white-space: nowrap;
            padding: 0.4rem 0.6rem;
            opacity: 0;
            pointer-events: none;
            transition: all 0.18s ease;
            z-index: 1050;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link:hover::after {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }

        /* Mobile spacing updates keep forms and actions readable on small screens. */
        @media (max-width: 767.98px) {
            .brands-command-strip,
            .brand-directory-header {
                align-items: stretch;
                flex-direction: column;
            }

            .brands-command-actions,
            .brands-command-actions .btn,
            .brand-directory-tools,
            .brand-directory-tools .btn,
            .brand-directory-tools .input-group {
                width: 100%;
            }

            .page-actions {
                width: 100%;
                display: grid;
                grid-template-columns: 1fr;
                gap: 0.6rem;
            }

            .page-actions .btn {
                width: 100%;
            }

            .page-actions .topbar-brand-selector {
                width: 100%;
                max-width: none;
            }

            .smtp-host-label {
                max-width: 140px;
            }
        }
    

/* ===== knowledgebase.html ===== */

        :root {
            --supportix-primary: #2563eb;
            --supportix-primary-dark: #1d4ed8;
            --supportix-bg: #eff4fb;
            --supportix-surface: #ffffff;
            --supportix-muted: #64748b;
            --supportix-border: #e2e8f0;
            --supportix-radius: 1.15rem;
            --sidebar-width: 248px;
            --sidebar-collapsed-width: 88px;
            --sidebar-bg: #12264f;
            --sidebar-border: #2a477f;
            --sidebar-text: #dbe7ff;
            --sidebar-title: #9eb4df;
            --status-published-bg: #dcfce7;
            --status-published-text: #166534;
            --status-draft-bg: #fef3c7;
            --status-draft-text: #92400e;
            --status-archived-bg: #fee2e2;
            --status-archived-text: #991b1b;
        }

        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            background: radial-gradient(circle at 8% 0%, #dce9ff 0%, #eff4fb 42%, #eff4fb 100%);
            color: #0f172a;
            letter-spacing: -0.01em;
        }

        .desktop-sidebar {
            background: linear-gradient(180deg, var(--sidebar-bg) 0%, #10224a 100%);
            border-right: 1px solid var(--sidebar-border);
            width: var(--sidebar-width);
            min-width: var(--sidebar-width);
            max-width: var(--sidebar-width);
            transition: width 0.25s ease, min-width 0.25s ease, max-width 0.25s ease;
            overflow: visible;
        }

        .sidebar-inner {
            min-height: 100vh;
            overflow: visible;
        }

        .brand-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.9rem;
            border-radius: 0.95rem;
            background: #ffffff;
            color: var(--supportix-primary);
            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
            font-weight: 800;
            width: 100%;
        }

        .brand-image {
            width: 100%;
            max-width: 100%;
            height: auto;
            display: block;
        }

        .menu-link {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            border-radius: 0.85rem;
            color: var(--sidebar-text);
            padding: 0.7rem 0.85rem;
            text-decoration: none;
            transition: all 0.2s ease;
            position: relative;
        }

        .menu-link:hover,
        .menu-link:focus {
            background: rgba(59, 130, 246, 0.18);
            color: #ffffff;
        }

        .menu-link.active {
            background: var(--supportix-primary);
            color: #ffffff;
            box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
        }

        .menu-text {
            font-size: 1rem;
            font-weight: 400;
            line-height: 1.5;
        }

        .menu-title {
            color: var(--sidebar-title);
            font-size: 0.72rem;
            letter-spacing: 0.14em;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 0.55rem;
        }

        .main-pane {
            min-width: 0;
            flex: 1 1 auto;
        }

        .topbar-collapse-btn {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.8rem;
            border-color: #dbe5f3;
            color: #334155;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #ffffff;
        }

        .topbar-collapse-btn:hover,
        .topbar-collapse-btn:focus {
            background: #f8fbff;
            border-color: #bfdbfe;
            color: #1d4ed8;
        }

        /* Cards share one style to keep the layout clean and easy to scan. */
        .panel-card {
            border: 1px solid var(--supportix-border);
            border-radius: var(--supportix-radius);
            background: var(--supportix-surface);
            box-shadow: 0 14px 35px rgba(15, 23, 42, 0.05);
        }

        .hero-card {
            background: linear-gradient(125deg, #1d4ed8 0%, #2563eb 40%, #3b82f6 100%);
            color: #ffffff;
            border: none;
            overflow: hidden;
            position: relative;
        }

        .hero-card::after {
            content: "";
            position: absolute;
            right: -60px;
            top: -50px;
            width: 220px;
            height: 220px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.16);
        }

        .hero-card .btn-light {
            color: #1d4ed8;
            font-weight: 600;
        }

        .stat-card h3 {
            font-size: 1.55rem;
            font-weight: 800;
            margin: 0;
        }

        .stat-card p {
            margin: 0;
            color: var(--supportix-muted);
            font-weight: 500;
            font-size: 0.84rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .article-title {
            font-weight: 700;
            margin-bottom: 0.2rem;
        }

        .article-snippet {
            color: #475569;
            font-size: 0.84rem;
            line-height: 1.45;
            max-width: 520px;
        }

        .article-type-chip {
            border: 1px solid #cbd5e1;
            background: #f8fafc;
            color: #334155;
            border-radius: 999px;
            padding: 0.23rem 0.6rem;
            font-size: 0.74rem;
            font-weight: 600;
            white-space: nowrap;
        }

        .status-pill {
            border-radius: 999px;
            padding: 0.24rem 0.66rem;
            font-size: 0.74rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }

        .status-pill::before {
            content: "";
            width: 0.42rem;
            height: 0.42rem;
            border-radius: 999px;
            display: inline-block;
        }

        .status-published {
            background: var(--status-published-bg);
            color: var(--status-published-text);
        }

        .status-published::before { background: #22c55e; }

        .status-draft {
            background: var(--status-draft-bg);
            color: var(--status-draft-text);
        }

        .status-draft::before { background: #f59e0b; }

        .status-archived {
            background: var(--status-archived-bg);
            color: var(--status-archived-text);
        }

        .status-archived::before { background: #ef4444; }

        .section-title {
            font-size: 1rem;
            font-weight: 700;
            margin: 0;
        }

        .empty-state {
            border: 1px dashed #cbd5e1;
            border-radius: 0.9rem;
            background: #f8fafc;
            padding: 1rem;
            color: #475569;
        }

        .quick-item {
            border-bottom: 1px solid #eef2f7;
            padding: 0.72rem 0;
        }

        .quick-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .quick-item:first-child {
            padding-top: 0;
        }

        .quick-item small {
            color: #64748b;
        }

        .sidebar-collapsed .desktop-sidebar {
            width: var(--sidebar-collapsed-width);
            min-width: var(--sidebar-collapsed-width);
            max-width: var(--sidebar-collapsed-width);
        }

        .sidebar-collapsed .desktop-sidebar .brand-badge,
        .sidebar-collapsed .desktop-sidebar .menu-title,
        .sidebar-collapsed .desktop-sidebar .menu-text {
            display: none !important;
        }

        .sidebar-collapsed .desktop-sidebar .sidebar-inner {
            padding-left: 0.5rem !important;
            padding-right: 0.5rem !important;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link {
            justify-content: center;
            padding: 0.75rem;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link::after {
            content: attr(data-title);
            position: absolute;
            left: calc(100% + 0.75rem);
            top: 50%;
            transform: translateY(-50%) translateX(-8px);
            background: #0f172a;
            color: #ffffff;
            border: 1px solid rgba(148, 163, 184, 0.35);
            border-radius: 0.6rem;
            font-size: 0.75rem;
            font-weight: 600;
            white-space: nowrap;
            padding: 0.4rem 0.6rem;
            opacity: 0;
            pointer-events: none;
            transition: all 0.18s ease;
            z-index: 1050;
        }

        .sidebar-collapsed .desktop-sidebar .menu-link:hover::after {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }

        @media (max-width: 991.98px) {
            .hero-card .btn {
                width: 100%;
            }

            .filters-grid .col-12:last-child .btn {
                width: 100%;
            }
        }
    

/* ===== login.html ===== */

        body { letter-spacing: -0.011em; }
        .input-focus-effect:focus {
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
        }

/* Global page background override: soft off-white helps cards stand out better. */
html,
body {
    background: #f3f4f6 !important;
    background-color: #f3f4f6 !important;
}

/* Tailwind utility overrides keep login page aligned with the same off-white background. */
.bg-slate-50,
.bg-slate-50\/50 {
    background-color: #f3f4f6 !important;
}

/* Settings snippets stay readable and easy to copy on desktop and mobile. */
.settings-code-box {
    resize: none;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.85rem;
}

.settings-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.settings-brand-snippet {
    border-top: 1px solid var(--supportix-border);
    padding-top: 1rem;
    margin-top: 1rem;
}

.settings-brand-snippet:first-of-type {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}

.settings-widget-preview-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.settings-widget-preview {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    border: 1px solid #dbe5f3;
    border-radius: 1rem;
    background: #eef4ff;
    padding: 1rem;
}

.settings-widget-panel {
    width: min(380px, 100%);
    height: 350px;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dbe5f3;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.14);
}

.settings-widget-header {
    padding: 0.9rem 1rem;
    background: #0f172a;
    color: #ffffff;
}

.settings-widget-header strong,
.settings-widget-header span {
    display: block;
}

.settings-widget-header span {
    color: #cbd5e1;
    font-size: 0.78rem;
}

.settings-widget-identity {
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e5edf7;
}

.settings-widget-identity div,
.settings-widget-composer div {
    border: 1px solid #dbe5f3;
    border-radius: 0.65rem;
    color: #94a3b8;
    padding: 0.55rem 0.65rem;
    font-size: 0.85rem;
}

.settings-widget-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.75rem;
    background: #f8fafc;
}

.settings-widget-bubble {
    max-width: 84%;
    border-radius: 0.9rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.85rem;
}

.settings-widget-bubble.agent {
    align-self: flex-start;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.settings-widget-bubble.visitor {
    align-self: flex-end;
    background: #2563eb;
    color: #ffffff;
}

.settings-widget-composer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid #e5edf7;
}

.settings-widget-composer button,
.settings-widget-launcher {
    border: 0;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
}

.settings-widget-composer button {
    padding: 0.55rem 0.9rem;
}

.settings-widget-launcher {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: 0.8rem 1.1rem;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.24);
}

/* The visitor simulator is a test website with a small admin toolbar above it. */
.simulator-page {
    min-height: 100vh;
    background: #f3f4f6;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.simulator-toolbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.simulator-brand-select {
    min-width: min(16rem, 100%);
}

.simulator-site {
    min-height: calc(100vh - 82px);
}

.simulator-hero {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(255, 255, 255, 0.86));
}

.simulator-status-card,
.simulator-service-card,
.simulator-help-band {
    border: 1px solid #dbe5f3;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.simulator-status-card {
    padding: 1.25rem;
}

.simulator-mini-stat {
    height: 100%;
    border: 1px solid #e5edf7;
    border-radius: 0.8rem;
    padding: 0.85rem;
    background: #f8fafc;
}

.simulator-mini-stat span,
.simulator-mini-stat strong {
    display: block;
}

.simulator-mini-stat span {
    color: #64748b;
    font-size: 0.78rem;
}

.simulator-mini-stat strong {
    margin-top: 0.2rem;
    color: #0f172a;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.simulator-service-card {
    height: 100%;
    padding: 1.25rem;
}

.simulator-service-card i {
    font-size: 1.8rem;
}

.simulator-help-band {
    background: #ffffff;
}

@media (max-width: 575.98px) {
    .simulator-brand-select,
    .simulator-toolbar .btn {
        width: 100%;
    }
}

/* Desktop sidebar stays fixed while the main page content scrolls beside it. */
@media (min-width: 992px) {
    .desktop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        overflow: hidden;
        z-index: 1030;
    }

    .sidebar-inner {
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    .main-pane {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }

    .sidebar-collapsed .main-pane,
    body.sidebar-collapsed .main-pane {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }
}
    
