/* ==========================================================================
   PiccaTv Support & Ticket Command Center — Cyber-Luxe Obsidian Stylesheet
   Matches PiccaTv App Theme (--brand-primary, --bg-dark-obsidian, etc.)
   ========================================================================== */

.support-desk-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

.w-100 {
    width: 100%;
}

.ms-auto {
    margin-left: auto;
}

.me-2 {
    margin-right: 0.5rem;
}

/* --- Top Command Header --- */
.desk-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 54px;
    background: rgba(6, 8, 20, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.4rem 1.25rem;
}

.desk-nav-inner {
    max-width: 1720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: nowrap;
}

.desk-title-sub {
    font-size: 0.86rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-left: 0.35rem;
    padding-left: 0.55rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mode Switcher Tabs */
.desk-mode-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 2.5px;
    border-radius: 999px;
    background: rgba(10, 15, 30, 0.7);
    border: 1px solid var(--border-glass);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.desk-mode-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.desk-mode-tab:hover {
    color: var(--text-pure);
    background: rgba(255, 255, 255, 0.05);
}

.desk-mode-tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.25) 100%);
    border-color: rgba(129, 140, 248, 0.45);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.tab-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.35);
    border: 1px solid rgba(129, 140, 248, 0.5);
    color: #e0e7ff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.tab-counter.counter-pink {
    background: rgba(236, 72, 153, 0.28);
    border-color: rgba(244, 114, 182, 0.55);
    color: #fce7f3;
}

.desk-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: nowrap;
}

.agent-identity-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--border-glass);
    color: #a5b4fc;
    font-size: 0.78rem;
}

.agent-identity-pill input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    width: 95px;
}

.service-health-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.38);
    color: #6ee7b7;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.crm-capacity-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #67e8f9;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.btn-sm-desk {
    padding: 0.32rem 0.65rem;
    font-size: 0.78rem;
    border-radius: 8px;
}

/* --- Main Container & KPI Ribbon --- */
.desk-main-container {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem 1.5rem;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.kpi-ribbon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.65rem;
}

.kpi-glass-card {
    background: var(--bg-glass-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.55rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-glass-card:hover {
    transform: translateY(-2px);
    border-color: rgba(129, 140, 248, 0.45);
}

.kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.kpi-indigo .kpi-icon { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.38); }
.kpi-cyan .kpi-icon { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.38); }
.kpi-pink .kpi-icon { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.38); }
.kpi-emerald .kpi-icon { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.38); }
.kpi-amber .kpi-icon { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.38); }
.kpi-purple .kpi-icon { background: rgba(139, 92, 246, 0.2); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.38); }

.kpi-meta {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
}

.kpi-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

/* --- Workspaces & Split Layout --- */
.desk-workspace {
    display: none;
    flex: 1;
}

.desk-workspace.active {
    display: flex;
    flex-direction: column;
}

.desk-split-layout {
    display: grid;
    grid-template-columns: 410px 1fr;
    gap: 1.25rem;
    min-height: calc(100vh - 235px);
}

.glass-card-desk {
    background: var(--bg-glass-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- Left Queue Panel --- */
.queue-header {
    padding: 1.15rem;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(6, 8, 20, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.queue-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.queue-title-row h2 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

.queue-count-pill {
    font-size: 0.75rem;
    font-weight: 700;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.16);
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
}

.queue-search-row {
    display: flex;
    gap: 0.5rem;
}

.search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap i {
    position: absolute;
    left: 0.8rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-input-wrap input {
    width: 100%;
    padding: 0.58rem 0.75rem 0.58rem 2.2rem;
    border-radius: 10px;
    background: rgba(3, 7, 18, 0.75);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    font-size: 0.84rem;
    outline: none;
}

.search-input-wrap input:focus {
    border-color: var(--brand-primary);
}

.desk-select-compact {
    padding: 0.52rem 0.65rem;
    border-radius: 10px;
    background: rgba(3, 7, 18, 0.85);
    border: 1px solid var(--border-glass);
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 600;
    outline: none;
}

.status-filter-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
}

.filter-chip {
    padding: 0.32rem 0.68rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.filter-chip:hover {
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.queue-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: calc(100vh - 385px);
}

/* Queue Item Card */
.queue-item-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.queue-item-card:hover {
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateX(2px);
}

.queue-item-card.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-color: #818cf8;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.22);
}

.q-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.q-id-tag {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    color: #a5b4fc;
}

.q-card-title {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.q-card-snippet {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.55rem;
}

.q-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.73rem;
    color: #94a3b8;
}

/* Status & Priority Badges */
.status-pill,
.priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-open, .status-0 { background: rgba(99, 102, 241, 0.22); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.5); }
.status-in-progress, .status-waiting-on-user, .status-1 { background: rgba(6, 182, 212, 0.2); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.5); }
.status-re-opened { background: rgba(245, 158, 11, 0.22); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.5); }
.status-resolved, .status-2 { background: rgba(16, 185, 129, 0.22); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.5); }
.status-closed, .status-3 { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }

.priority-urgent { background: rgba(236, 72, 153, 0.22); color: #f9a8d4; border: 1px solid rgba(236, 72, 153, 0.55); }
.priority-high { background: rgba(245, 158, 11, 0.22); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.5); }
.priority-medium { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.45); }
.priority-low { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.35); }

/* --- Right Detail Panel --- */
.desk-empty-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-orb {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(236, 72, 153, 0.22));
    border: 1px solid rgba(129, 140, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #a5b4fc;
    margin-bottom: 1.2rem;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.25);
}

.desk-empty-detail h3 {
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 0.45rem;
}

.desk-empty-detail p {
    max-width: 460px;
    font-size: 0.9rem;
}

.active-ticket-view,
.active-enquiry-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.detail-top-bar {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(6, 8, 20, 0.55);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.detail-badges-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.ticket-id-pill {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.2rem 0.65rem;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: #c7d2fe;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.2rem 0.65rem;
    border-radius: 8px;
}

.detail-title-block h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
}

.detail-timestamp {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.detail-quick-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.control-group-inline {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.control-group-inline label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.desk-select,
.desk-input,
.desk-textarea {
    width: 100%;
    padding: 0.62rem 0.85rem;
    border-radius: 10px;
    background: rgba(3, 7, 18, 0.82);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.86rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.desk-select:focus,
.desk-input:focus,
.desk-textarea:focus {
    border-color: var(--brand-primary);
}

/* Ticket Split Body: Chat Stream + Resolution Drawer */
.ticket-work-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    grid-template-rows: 1fr;
    flex: 1;
    min-height: 0;
    height: 100%;
    align-items: stretch;
}

.chat-stream-column {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-glass);
    min-height: 0;
    height: 100%;
}

.chat-messages-viewport {
    flex: 1 1 0;
    min-height: 240px;
    height: 100%;
    max-height: none;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.chat-bubble-row {
    display: flex;
    flex-direction: column;
    max-width: 82%;
}

.chat-bubble-row.from-user {
    align-self: flex-start;
}

.chat-bubble-row.from-support {
    align-self: flex-end;
}

.chat-bubble-meta {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.chat-bubble-row.from-support .chat-bubble-meta {
    justify-content: flex-end;
    color: #67e8f9;
}

.chat-bubble-card {
    padding: 0.85rem 1.05rem;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-bubble-row.from-user .chat-bubble-card {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    border-top-left-radius: 4px;
}

.chat-bubble-row.from-support .chat-bubble-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.32) 0%, rgba(6, 182, 212, 0.26) 100%);
    border: 1px solid rgba(103, 232, 249, 0.42);
    color: #ffffff;
    border-top-right-radius: 4px;
}

.typing-indicator-bar {
    padding: 0.4rem 1.25rem;
    font-size: 0.78rem;
    color: #67e8f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(6, 182, 212, 0.08);
}

.canned-responses-strip {
    margin-top: auto;
    padding: 0.55rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(6, 8, 20, 0.45);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
}

.canned-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #a5b4fc;
    white-space: nowrap;
}

.canned-chip {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.32);
    color: #e0e7ff;
    font-size: 0.73rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.18s ease;
}

.canned-chip:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: #818cf8;
}

.chat-composer-form {
    padding: 0.9rem 1.1rem;
    border-top: 1px solid var(--border-glass);
    background: rgba(3, 7, 18, 0.7);
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-composer-form textarea {
    flex: 1;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.88rem;
    resize: none;
    outline: none;
}

.chat-composer-form textarea:focus {
    border-color: var(--brand-primary);
}

.btn-send-chat {
    padding: 0.72rem 1.15rem;
    white-space: nowrap;
}

.btn-attach-chat {
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    font-size: 1.05rem;
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-attach-chat:hover {
    background: rgba(56, 189, 248, 0.16);
    border-color: #38bdf8;
    color: #ffffff;
}

/* Chat & Ticket Image Attachments + Lightbox */
.desk-attachment-preview {
    margin: 0 1.1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.desk-att-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.desk-att-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.22);
    cursor: pointer;
}

.desk-att-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.desk-att-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desk-att-hint {
    font-size: 0.72rem;
    color: #38bdf8;
    cursor: pointer;
}

.desk-att-remove {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.desk-att-remove:hover {
    background: rgba(239, 68, 68, 0.35);
    color: #ffffff;
}

.chat-attachment-block {
    margin-top: 0.5rem;
    padding: 0.45rem;
    border-radius: 10px;
    background: rgba(3, 7, 18, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.chat-attachment-thumb {
    max-width: 250px;
    max-height: 175px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-attachment-thumb:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

.btn-open-lightbox {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #7dd3fc;
    border-radius: 6px;
    padding: 0.22rem 0.6rem;
    font-size: 0.73rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-open-lightbox:hover {
    background: rgba(56, 189, 248, 0.24);
    color: #ffffff;
}

.desk-lightbox-card {
    width: auto;
    max-width: 92vw;
    max-height: 90vh;
    background: rgba(10, 15, 29, 0.98);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.88);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.desk-lightbox-body {
    padding: 1rem;
    background: rgba(2, 6, 23, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.desk-lightbox-img {
    max-width: 86vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 10px;
}

/* Resolution Drawer Column */
.resolution-drawer-column {
    padding: 1.25rem;
    background: rgba(6, 8, 20, 0.35);
    overflow-y: auto;
}

.resolution-box {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.res-box-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #6ee7b7;
    font-family: var(--font-heading);
    font-weight: 800;
}

.res-box-header h4 {
    font-size: 1rem;
    color: #ffffff;
    margin: 0;
}

.desk-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.desk-form-field label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.resolution-meta-info {
    font-size: 0.78rem;
    color: #6ee7b7;
}

.resolution-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.25rem;
}

.btn-emerald-resolve {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}

.btn-emerald-resolve:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(16, 185, 129, 0.45);
}

/* Enquiries Detail Grid */
.enquiry-detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    grid-template-rows: 1fr;
    gap: 1.25rem;
    padding: 1.35rem;
    flex: 1;
    height: 100%;
}

.enquiry-message-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.contact-methods-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.contact-method-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #e0e7ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}

.enquiry-message-box {
    background: rgba(3, 7, 18, 0.68);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.25rem;
    flex: 1;
}

.box-label {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #818cf8;
    margin-bottom: 0.6rem;
}

.enquiry-message-box p {
    font-size: 0.95rem;
    color: #f1f5f9;
    white-space: pre-wrap;
    line-height: 1.65;
}

.converted-ticket-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
    font-size: 0.88rem;
}

/* Modal & Toast */
.desk-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.desk-modal-card {
    width: 100%;
    max-width: 520px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(129, 140, 248, 0.4);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
    overflow: hidden;
}

.desk-modal-header {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.desk-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #ffffff;
}

.desk-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.desk-modal-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.desk-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.desk-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.desk-toast {
    padding: 0.85rem 1.2rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(129, 140, 248, 0.5);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.desk-empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.desk-empty-state i {
    font-size: 2rem;
    color: #6366f1;
    display: block;
    margin-bottom: 0.5rem;
}

@media (max-width: 1200px) {
    .kpi-ribbon-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .desk-split-layout,
    .ticket-work-grid,
    .enquiry-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .kpi-ribbon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   CRM Executive Workspace & Last Replied By Tracker Styles
   ========================================================================== */
.crm-capacity-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.4);
    font-size: 0.78rem;
    font-weight: 700;
    color: #cbd5e1;
}

.crm-capacity-pill.capacity-normal {
    border-color: rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
}

.crm-capacity-pill.capacity-warning {
    border-color: rgba(245, 158, 11, 0.55);
    color: #fcd34d;
}

.crm-capacity-pill.capacity-full {
    border-color: rgba(239, 68, 68, 0.65);
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
}

.last-replied-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
}

.last-replied-user {
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.last-replied-exec {
    background: rgba(168, 85, 247, 0.14);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.last-replied-none {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

/* ==========================================================================
   Cyber-Luxe Shimmer Skeleton Loaders
   ========================================================================== */
@keyframes skeletonPulse {
    0% {
        background-position: -200% 0;
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        background-position: 200% 0;
        opacity: 0.6;
    }
}

.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 200% 100%;
    animation: skeletonPulse 1.8s ease-in-out infinite;
    border-radius: 8px;
    display: inline-block;
}

.skeleton-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
}

.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-85 { width: 85%; }
.skeleton-line.w-100 { width: 100%; }

.skeleton-badge {
    width: 65px;
    height: 22px;
    border-radius: 999px;
}

.skeleton-bubble {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    margin-bottom: 0.85rem;
    width: 65%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-bubble.user {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.6);
}

.skeleton-bubble.agent {
    align-self: flex-end;
    background: rgba(99, 102, 241, 0.16);
}

.kpi-skeleton {
    width: 38px;
    height: 28px;
    border-radius: 6px;
    display: inline-block;
}


