/* ── FEAT-135 — Puspakom Pre-Ticket Statistics page ──────────────────────── */

.pss-page {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header */
.pss-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.pss-page-title {
    font-size: 20px;
    font-weight: bold;
    color: #e8eaf0;
}

body[data-theme="light"] .pss-page-title {
    color: #1a202c;
}

/* Filter bar */
.pss-filter-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: flex-end;
}

.pss-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}

.pss-filter-label {
    font-size: 12px;
    color: #9aa3b5;
    white-space: nowrap;
}

.pss-dropdown {
    min-width: 160px;
    color: #1a1f2e;
}

.pss-date-input {
    background: #1e2537;
    color: #e8eaf0;
    border: 1px solid #2d3548;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 13px;
    min-width: 160px;
    box-sizing: border-box;
    outline: none;
}

.pss-date-input:focus {
    border-color: #4a90d9;
}

body[data-theme="light"] .pss-date-input {
    background: #f7f9fc;
    color: #1a202c;
    border-color: #d1d9e0;
}

body[data-theme="light"] .pss-date-input:focus {
    border-color: #4a90d9;
}

/* KPI content area */
.pss-kpi-content {
    margin-top: 8px;
}

/* Section titles */
.pss-section-title {
    font-size: 13px;
    font-weight: bold;
    color: #4a90d9;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

body[data-theme="light"] .pss-section-title {
    color: #2563eb;
}

/* Explanatory caption under stats */
.pss-caption {
    font-size: 11px;
    color: #9aa3b5;
    margin-top: 6px;
    margin-bottom: 16px;
    line-height: 1.5;
    padding: 8px 12px;
    background: #1a2030;
    border-radius: 4px;
    border-left: 2px solid #3a4a6b;
}

body[data-theme="light"] .pss-caption {
    background: #f0f4f8;
    color: #4a5568;
    border-left-color: #9ab0d0;
}

/* Status summary badges */
.pss-status-summary-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.pss-status-badge {
    background: #1e2537;
    border: 1px solid #2d3548;
    border-radius: 8px;
    padding: 14px 20px;
    text-align: center;
    min-width: 110px;
    flex: 1;
}

body[data-theme="light"] .pss-status-badge {
    background: #f0f4f8;
    border-color: #d1d9e0;
}

/* Stage duration cards */
.pss-cards-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.pss-card {
    background: #1e2537;
    border: 1px solid #2d3548;
    border-left: 3px solid #4a90d9;
    border-radius: 6px;
    padding: 12px 16px;
    min-width: 170px;
    flex: 1;
}

body[data-theme="light"] .pss-card {
    background: #f0f4f8;
    border-color: #d1d9e0;
    border-left-color: #4a90d9;
}

.pss-card-label {
    font-size: 11px;
    color: #9aa3b5;
    margin-bottom: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body[data-theme="light"] .pss-card-label {
    color: #6b7280;
}

.pss-card-owner {
    font-size: 10px;
    color: #4a90d9;
    margin-bottom: 8px;
    font-weight: bold;
}

body[data-theme="light"] .pss-card-owner {
    color: #2563eb;
}

.pss-card-value {
    font-size: 18px;
    font-weight: bold;
    color: #5ec97e;
}

body[data-theme="light"] .pss-card-value {
    color: #16a34a;
}

/* SLA thresholds note */
.pss-sla-thresholds {
    font-size: 11px;
    color: #9aa3b5;
    margin-bottom: 10px;
}

body[data-theme="light"] .pss-sla-thresholds {
    color: #6b7280;
}

/* Tables */
.pss-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pss-table-wrap {
    overflow-x: auto;
    margin-bottom: 8px;
}

/* Heatmap clickable cells */
.pss-heatmap-cell {
    cursor: pointer;
    transition: opacity 0.15s, outline 0.1s;
}

.pss-heatmap-cell:hover {
    opacity: 0.8;
    outline: 2px solid #4a90d9;
    outline-offset: -2px;
}

.pss-heatmap-cell-zero {
    cursor: default;
}

/* Empty state */
.pss-empty {
    color: #9aa3b5;
    padding: 24px;
    text-align: center;
    background: #252b3b;
    border-radius: 6px;
}

body[data-theme="light"] .pss-empty {
    background: #f7f9fc;
    color: #6b7280;
}

/* ── Console condensed header widget ─────────────────────────────────────── */

.psc-hdr-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.psc-hdr-status-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.psc-hdr-status-pill {
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.psc-hdr-stats-link {
    font-size: 12px;
    color: #4a90d9;
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 10px;
    border: 1px solid #4a90d955;
    border-radius: 4px;
    transition: background 0.15s;
}

.psc-hdr-stats-link:hover {
    background: #4a90d911;
    color: #7ab4ff;
}

body[data-theme="light"] .psc-hdr-stats-link {
    color: #2563eb;
    border-color: #2563eb55;
}

body[data-theme="light"] .psc-hdr-stats-link:hover {
    background: #eff6ff;
}

/* Mobile */
@media (max-width: 390px) {
    .pss-filter-bar {
        flex-direction: column;
    }

    .pss-filter-group {
        width: 100%;
    }

    .pss-dropdown,
    .pss-date-input {
        width: 100%;
    }

    .pss-page {
        padding: 12px;
    }

    .pss-card {
        min-width: 100%;
    }

    .pss-status-badge {
        min-width: 100%;
    }
}
