/* ─────────────────────────────────────────────────────────────
   Left Menu Panel Styles
   ───────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────
   Dashboard Main Content
   ───────────────────────────────────────────────────────────── */

.nexus-main-content {
    background: #f5f7fb;
}

/* ── Header (top 20%) ── */
.nexus-content-header {
    padding: 1.5rem 2rem 1.2rem;
    background: #ffffff;
    border-bottom: 1px solid #e3e8f0;
    flex-shrink: 0;
}

.nexus-content-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a2d5a;
}

.nexus-new-ticket-btn {
    font-weight: 600;
}

/* ── Summary tiles carousel ── */
.nexus-tiles-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.nexus-tiles {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    flex: 1;
    padding: 0.25rem 0;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.nexus-tiles::-webkit-scrollbar {
    height: 4px;
}

.nexus-tiles::-webkit-scrollbar-track {
    background: transparent;
}

.nexus-tiles::-webkit-scrollbar-thumb {
    background: rgba(17, 124, 176, 0.3);
    border-radius: 2px;
}

.nexus-tiles::-webkit-scrollbar-thumb:hover {
    background: rgba(17, 124, 176, 0.6);
}

.nexus-tile {
    background: #ffffff;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    min-width: 130px;
    flex-shrink: 0;
    scroll-snap-align: start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.nexus-tile:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* ── Tile Style: Normal (default) ── */
.nexus-tile--normal {
    border-left-color: #e3e8f0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.nexus-tile--normal .nexus-tile-value {
    color: #6b7a99;
}

/* ── Tile Style: Important (Blue/Cyan) ── */
.nexus-tile--important {
    border-left-color: #0ea5e9;
    background: linear-gradient(135deg, #ffffff 0%, #ecf7ff 100%);
}

.nexus-tile--important .nexus-tile-value {
    color: #0ea5e9;
}

.nexus-tile--important:hover {
    background: linear-gradient(135deg, #ffffff 0%, #cff0ff 100%);
}

/* ── Tile Style: Success (Green) ── */
.nexus-tile--success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}

.nexus-tile--success .nexus-tile-value {
    color: #10b981;
}

.nexus-tile--success:hover {
    background: linear-gradient(135deg, #ffffff 0%, #d1fae5 100%);
}

/* ── Tile Style: Warning (Amber/Orange) ── */
.nexus-tile--warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.nexus-tile--warning .nexus-tile-value {
    color: #f59e0b;
}

.nexus-tile--warning:hover {
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
}

/* ── Tile Style: Danger (Red) ── */
.nexus-tile--danger {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.nexus-tile--danger .nexus-tile-value {
    color: #ef4444;
}

.nexus-tile--danger:hover {
    background: linear-gradient(135deg, #ffffff 0%, #fee2e2 100%);
}

/* Legacy highlighted class for backward compatibility */
.nexus-tile--highlighted {
    border-left-color: #f0a500;
}

.nexus-tile-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.nexus-tile-label {
    font-size: 0.78rem;
    color: #6b7a99;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Grid (bottom 80%) ── */
.nexus-content-grid {
    padding: 1rem 2rem 1.5rem;
}

.nexus-component-shell {
    min-height: 0;
}

.nexus-shell-loading-overlay {
    align-items: center;
    background: rgba(245, 247, 251, 0.88);
    display: flex;
    inset: 0;
    justify-content: center;
    position: absolute;
    z-index: 20;
}

.nexus-shell-loading-card {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(16, 24, 40, 0.14);
    color: #1a2d5a;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 360px;
    padding: 2rem;
    text-align: center;
}

.nexus-shell-loading-title {
    font-size: 1rem;
    font-weight: 700;
}

.nexus-shell-loading-subtitle {
    color: #6b7a99;
    font-size: 0.85rem;
}

.nexus-queue-grid {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Panel shell */
.nexus-left-menu {
    background: #0d1b3e;           /* dark navy blue */
    border-right: 1px solid #1a2d5a;
    color: #e8ecf4;
}

/* Header block (workarea + user line) */
.nexus-menu-header {
    background: #1a499f;           /* slightly darker for depth */
    border-bottom-color: #1a2d5a !important;
    padding-bottom: 0.85rem;
}

.nexus-menu-brand {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.nexus-menu-user {
    font-size: 0.78rem;
    color: #8fa3cc;
    margin-top: 0.2rem;
}

.nexus-user-role {
    background-color: #117cb0;
    color: #ffffff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.3rem;
    display: inline-block;
    text-align: center;
}

/* Accordion — override DevExpress defaults for dark theme */
.nexus-accordion {
    --dxbl-accordion-item-header-bg: transparent;
    --dxbl-accordion-item-header-color: #c9d4ea;
    --dxbl-accordion-item-header-hover-bg: rgba(255, 255, 255, 0.06);
    --dxbl-accordion-item-border-color: rgba(255, 255, 255, 0.07);
}

.nexus-menu-links {
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0;
}

.nexus-menu-link {
    display: block;
    padding: 0.45rem 1.25rem;
    color: #b8c9e8;
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.nexus-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* Icon-based vertical menu */
.nexus-menu-icons {
    gap: 1.2rem;
    align-items: flex-start;
    align-self: center;
    width: fit-content;
}

.nexus-menu-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem;
    border-radius: 8px;
    background-color: transparent;
    color: #8fa3cc;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 60px;
    max-width: 65px;
}

.nexus-menu-icon-link.disabled {
    opacity: 0.65;
    pointer-events: none;
}

.nexus-menu-icon {
    font-size: 1.5rem;
    display: block;
    line-height: 1;
}

.nexus-menu-text {
    font-size: 0.65rem;
    font-weight: 500;
    text-align: center;
   
    color: inherit;
}

.nexus-menu-icon-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: scale(1.05);
    text-decoration: none;
}

.nexus-menu-icon-link.active {
    background-color: #117cb0;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(17, 124, 176, 0.4);
}

/* Log Off footer pinned at the bottom of the left menu */
.nexus-menu-footer {
    border-top-color: #1a2d5a !important;
    display: flex;
    justify-content: center;
    padding: 0.75rem 0;
}

/* Alternating row background colors for the grid */
.nexus-queue-grid .row-bg-primary > td:not(.dxbl-grid-empty-cell):not(.dxbl-grid-indent-cell) {
    background-color: #ffffff !important;
}

.nexus-queue-grid .row-bg-secondary > td:not(.dxbl-grid-empty-cell):not(.dxbl-grid-indent-cell) {
    background-color: #bacbf5 !important;
}

/* Ensure hover states are visible over alternating colors */
.nexus-queue-grid :deep(.dxgv-row:hover) > td:not(.dxbl-grid-empty-cell):not(.dxbl-grid-indent-cell) {
    background-color: #e8f4f8 !important;
}

/* Show pointer cursor on clickable data rows (row click opens detail view). */
.nexus-queue-grid .row-bg-primary > td:not(.dxbl-grid-empty-cell):not(.dxbl-grid-indent-cell),
.nexus-queue-grid .row-bg-secondary > td:not(.dxbl-grid-empty-cell):not(.dxbl-grid-indent-cell) {
    cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────
   Conditional Cell Styles
   ───────────────────────────────────────────────────────────── */

/* Cell style: None (no styling) */
.nexus-queue-grid td.cell-style-none {
    background-color: transparent !important;
}

/* Cell style: Normal (light gray) */
.nexus-queue-grid td.cell-style-normal {
    background-color: #f3f4f6 !important;
    color: #374151;
}

/* Cell style: Important (light blue) */
.nexus-queue-grid td.cell-style-important {
    background-color: #dbeafe !important;
    color: #0c4a6e;
    font-weight: 600;
}

/* Cell style: Success (light green) */
.nexus-queue-grid td.cell-style-success {
    background-color: #dcfce7 !important;
    color: #166534;
    font-weight: 500;
}

/* Cell style: Warning (light yellow/orange) */
.nexus-queue-grid td.cell-style-warning {
    background-color: #fef3c7 !important;
    color: #92400e;
    font-weight: 600;
}

/* Cell style: Danger (light red) */
.nexus-queue-grid td.cell-style-danger {
    background-color: #fee2e2 !important;
    color: #7f1d1d;
    font-weight: 600;
}

/* Cell style: Info (light cyan) */
.nexus-queue-grid td.cell-style-info {
    background-color: #cffafe !important;
    color: #164e63;
    font-weight: 500;
}

/* Cell style: Secondary (muted gray) */
.nexus-queue-grid td.cell-style-secondary {
    background-color: #e5e7eb !important;
    color: #4b5563;
}

/* Render rule-defined icon after cell text */
.nexus-queue-grid td[data-cell-icon]::after {
    content: " " attr(data-cell-icon);
    margin-left: 0.25rem;
}

/* ─────────────────────────────────────────────────────────────
   Dashboard Splitter + IFrame Interop
   ───────────────────────────────────────────────────────────── */

/* Allow splitter panes to shrink when iframe content is rendered in the center shell. */
.nexus-dashboard-root .dxbl-splitter-pane,
.nexus-dashboard-root .dxbl-splitter-pane-content,
.nexus-dashboard-root .nexus-center-pane,
.nexus-dashboard-root .nexus-component-shell {
    min-width: 0;
    min-height: 0;
}

/* Keep embedded frames constrained to pane bounds so resize handles remain usable. */
.nexus-dashboard-root .nexus-component-shell iframe {
    display: block;
    min-width: 0;
}

/* Disable embedded iframe hit-testing while splitter drag is active so separators can resize reliably. */
.nexus-splitter-dragging .nexus-dashboard-root iframe {
    pointer-events: none !important;
}