/* EGM Conversion Worklist critical styles.
   Loaded in the document head so the page does not flash unstyled before Razor page CSS is parsed. */
.worklist-header,
.custom-header.worklist-header {
    border-radius: 0 !important;
    border-left: 4px solid var(--eclipse-orange, #ED6920);
}

.worklist-header .custom-title,
.worklist-header .custom-subtitle {
    letter-spacing: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.action-button,
.filter-actions .btn,
.filter-field .form-select,
.filter-field .form-control {
    border-radius: 2px;
}

.worklist-filter-panel,
.summary-strip > div,
.worklist-table-shell,
.empty-state,
.mobile-worklist-card,
.mobile-metrics > div {
    border-radius: 0;
}

.worklist-filter-panel {
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    padding: 0.75rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) minmax(170px, 1fr) minmax(190px, 1fr) minmax(135px, 0.7fr) minmax(180px, 1fr) auto;
    gap: 0.65rem;
    align-items: end;
}

.filter-field label,
.summary-label,
.mobile-label {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 0.55rem;
}

.summary-strip > div {
    border: 1px solid rgba(15, 23, 42, 0.09);
    background: #f8fafc;
    padding: 0.55rem 0.7rem;
    min-height: 58px;
}

.summary-value {
    display: block;
    color: #0f172a;
    font-size: 1.08rem;
    line-height: 1.05;
    font-weight: 900;
}

.worklist-table-shell {
    overflow-x: hidden;
    overflow-y: visible;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.worklist-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 0.72rem;
}

.worklist-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #0f172a;
    color: #ffffff;
    border-bottom: 0;
    padding: 0.48rem 0.42rem;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: normal;
    line-height: 1.12;
}

.worklist-table tbody td {
    padding: 0.34rem 0.42rem;
    border-color: rgba(15, 23, 42, 0.07);
    color: #334155;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    padding: 0.18rem 0.36rem;
    font-size: 0.6rem;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
}

.status-scheduled {
    background: rgba(89, 109, 149, 0.14);
    color: var(--eclipse-mutedblue, #596D95);
}

.status-unscheduled {
    background: rgba(237, 105, 32, 0.15);
    color: #9a3f0f;
}

.status-approval {
    background: rgba(13, 110, 253, 0.14);
    color: #1d4ed8;
}

.status-targeted {
    background: var(--eclipse-orange, #ED6920);
    color: #ffffff;
}

.status-open {
    background: #e2e8f0;
    color: #334155;
}

.mobile-worklist {
    display: none;
}

@media (max-width: 1200px) {
    .filter-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .summary-strip {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
}

@media (max-width: 760px) {
    .worklist-table-shell {
        display: none;
    }

    .mobile-worklist {
        display: grid;
        gap: 0.7rem;
    }

    .mobile-worklist-card {
        border: 1px solid rgba(15, 23, 42, 0.10);
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
        padding: 0.75rem;
    }
}

@media (max-width: 700px) {
    .filter-grid,
    .summary-strip {
        grid-template-columns: 1fr;
    }
}

/* Full page styles moved from EgmConversionWorklist.cshtml. */
/* Critical worklist styles are intentionally above markup to prevent a flash of unstyled content. */
    .worklist-header,
    .custom-header {
        border-radius: 0 !important;
        border-left: 4px solid var(--eclipse-orange, #ED6920);
    }

    .header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.6rem;
        flex-wrap: wrap;
    }

    .action-button,
    .filter-actions .btn,
    .filter-field .form-select,
    .filter-field .form-control {
        border-radius: 2px;
    }

    .worklist-filter-panel,
    .summary-strip > div,
    .worklist-table-shell,
    .empty-state,
    .mobile-worklist-card,
    .mobile-metrics > div {
        border-radius: 0;
    }

    .worklist-filter-panel {
        border: 1px solid rgba(15, 23, 42, 0.10);
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
        padding: 0.75rem;
    }

    .filter-grid {
        display: grid;
        grid-template-columns: minmax(180px, 1.1fr) minmax(170px, 1fr) minmax(190px, 1fr) minmax(135px, 0.7fr) minmax(180px, 1fr) auto;
        gap: 0.65rem;
        align-items: end;
    }

    .filter-field label,
    .summary-label,
    .mobile-label {
        display: block;
        color: #64748b;
        font-size: 0.68rem;
        font-weight: 850;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .summary-strip {
        display: grid;
        grid-template-columns: repeat(6, minmax(120px, 1fr));
        gap: 0.55rem;
    }

    .summary-strip > div {
        border: 1px solid rgba(15, 23, 42, 0.09);
        background: #f8fafc;
        padding: 0.55rem 0.7rem;
        min-height: 58px;
    }

    .summary-value {
        display: block;
        color: #0f172a;
        font-size: 1.08rem;
        line-height: 1.05;
        font-weight: 900;
    }

    .worklist-table-shell {
        overflow-x: hidden;
        overflow-y: visible;
        border: 1px solid rgba(15, 23, 42, 0.10);
        background: #ffffff;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    }

    .worklist-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        font-size: 0.72rem;
    }

    .worklist-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #0f172a;
        color: #ffffff;
        border-bottom: 0;
        padding: 0.48rem 0.42rem;
        font-size: 0.6rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        white-space: normal;
        line-height: 1.12;
    }

    .worklist-table tbody td {
        padding: 0.34rem 0.42rem;
        border-color: rgba(15, 23, 42, 0.07);
        color: #334155;
        vertical-align: middle;
        overflow-wrap: anywhere;
    }

    .status-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 2px;
        padding: 0.18rem 0.36rem;
        font-size: 0.6rem;
        line-height: 1;
        font-weight: 900;
        white-space: nowrap;
    }

    .status-scheduled {
        background: rgba(89, 109, 149, 0.14);
        color: var(--eclipse-mutedblue, #596D95);
    }

    .status-unscheduled {
        background: rgba(237, 105, 32, 0.15);
        color: #9a3f0f;
    }

    .status-approval {
        background: rgba(13, 110, 253, 0.14);
        color: #1d4ed8;
    }

    .status-targeted {
        background: var(--eclipse-orange, #ED6920);
        color: #ffffff;
    }

    .status-open {
        background: #e2e8f0;
        color: #334155;
    }

    .mobile-worklist {
        display: none;
    }

    @media (max-width: 1200px) {
        .filter-grid {
            grid-template-columns: repeat(2, minmax(180px, 1fr));
        }

        .summary-strip {
            grid-template-columns: repeat(3, minmax(120px, 1fr));
        }
    }

    @media (max-width: 760px) {
        .worklist-table-shell {
            display: none;
        }

        .mobile-worklist {
            display: grid;
            gap: 0.7rem;
        }

        .mobile-worklist-card {
            border: 1px solid rgba(15, 23, 42, 0.10);
            background: #ffffff;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
            padding: 0.75rem;
        }
    }

    @media (max-width: 700px) {
        .filter-grid,
        .summary-strip {
            grid-template-columns: 1fr;
        }
    }

.worklist-header {
        padding-bottom: 0.9rem;
    }

    .custom-header {
        border-radius: 0 !important;
        border-left: 4px solid var(--eclipse-orange, #ED6920);
    }

    .header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.6rem;
        flex-wrap: wrap;
    }

    .action-button {
        border-radius: 2px;
        font-weight: 750;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .worklist-filter-panel {
        border: 1px solid rgba(15, 23, 42, 0.10);
        border-radius: 0;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
        padding: 0.75rem;
    }

    .filter-grid {
        display: grid;
        grid-template-columns: minmax(180px, 1.1fr) minmax(170px, 1fr) minmax(190px, 1fr) minmax(135px, 0.7fr) minmax(180px, 1fr) auto;
        gap: 0.65rem;
        align-items: end;
    }

    .filter-field label {
        display: block;
        margin-bottom: 0.22rem;
        color: #475569;
        font-size: 0.68rem;
        font-weight: 850;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .filter-field .form-select,
    .filter-field .form-control {
        border-radius: 2px;
        font-size: 0.82rem;
        font-weight: 650;
    }

    .filter-actions {
        display: flex;
        gap: 0.45rem;
        justify-content: flex-end;
    }

    .filter-actions .btn {
        border-radius: 2px;
        font-weight: 800;
        white-space: nowrap;
    }

    .summary-strip {
        display: grid;
        grid-template-columns: repeat(6, minmax(120px, 1fr));
        gap: 0.55rem;
    }

    .summary-strip > div {
        border: 1px solid rgba(15, 23, 42, 0.09);
        border-radius: 0;
        background: #f8fafc;
        padding: 0.55rem 0.7rem;
        min-height: 58px;
    }

    .summary-value {
        display: block;
        color: #0f172a;
        font-size: 1.08rem;
        line-height: 1.05;
        font-weight: 900;
    }

    .summary-label {
        display: block;
        margin-top: 0.2rem;
        color: #64748b;
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .summary-date .summary-value {
        font-size: 0.82rem;
        line-height: 1.2;
    }

    .snapshot-value {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.4rem;
    }

    .snapshot-refresh-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.45rem;
        height: 1.45rem;
        flex: 0 0 1.45rem;
        border: 1px solid rgba(15, 23, 42, 0.18);
        border-radius: 2px;
        background: #ffffff;
        color: var(--eclipse-mutedblue, #596D95);
        font-size: 0.66rem;
        line-height: 1;
    }

    .snapshot-refresh-button:hover {
        border-color: var(--eclipse-orange, #ED6920);
        color: var(--eclipse-orange, #ED6920);
    }

    .snapshot-refresh-button:disabled {
        cursor: wait;
        opacity: 0.75;
    }

    .snapshot-refresh-button.is-refreshing i {
        animation: worklist-spin 0.8s linear infinite;
    }

    @keyframes worklist-spin {
        to {
            transform: rotate(360deg);
        }
    }

    .worklist-table-shell {
        overflow-x: hidden;
        overflow-y: visible;
        border: 1px solid rgba(15, 23, 42, 0.10);
        border-radius: 0;
        background: #ffffff;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    }

    .mobile-worklist {
        display: none;
    }

    .worklist-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        font-size: 0.72rem;
    }

    .worklist-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #0f172a;
        color: #ffffff;
        border-bottom: 0;
        padding: 0.48rem 0.42rem;
        font-size: 0.6rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        white-space: normal;
        line-height: 1.12;
    }

    .worklist-table tbody td {
        padding: 0.34rem 0.42rem;
        border-color: rgba(15, 23, 42, 0.07);
        color: #334155;
        vertical-align: middle;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .col-casino {
        width: 11%;
    }

    .col-serial {
        width: 8%;
    }

    .col-current {
        width: 20%;
    }

    .col-status {
        width: 8%;
    }

    .col-recommended {
        width: 16%;
    }

    .col-date {
        width: 7%;
    }

    .col-days {
        width: 4%;
    }

    .col-money {
        width: 5%;
    }

    .worklist-table tbody tr:nth-child(even) {
        background: #f8fafc;
    }

    .worklist-table tbody tr:hover {
        background: #eef6ff;
    }

    .casino-cell {
        color: #0f172a;
        font-weight: 850;
        line-height: 1.18;
    }

    .serial-cell {
        color: #0f172a;
        font-family: Consolas, "Courier New", monospace;
        font-weight: 850;
        line-height: 1.18;
    }

    .title-cell {
        min-width: 0;
        max-width: none;
        color: #0f172a;
        font-weight: 650;
        line-height: 1.18;
    }

    .status-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 2px;
        padding: 0.18rem 0.36rem;
        min-width: 0;
        font-size: 0.6rem;
        line-height: 1;
        font-weight: 900;
        white-space: nowrap;
    }

    .status-scheduled {
        background: rgba(89, 109, 149, 0.14);
        color: var(--eclipse-mutedblue, #596D95);
    }

    .status-unscheduled {
        background: rgba(237, 105, 32, 0.15);
        color: #9a3f0f;
    }

    .status-approval {
        background: rgba(13, 110, 253, 0.14);
        color: #1d4ed8;
    }

    .status-targeted {
        background: var(--eclipse-orange, #ED6920);
        color: #ffffff;
    }

    .status-open {
        background: #e2e8f0;
        color: #334155;
    }

    .muted-dash {
        color: #94a3b8;
        font-weight: 750;
    }

    .delta-up {
        color: #198754 !important;
        font-weight: 850;
    }

    .delta-down {
        color: #dc3545 !important;
        font-weight: 850;
    }

    .delta-neutral {
        color: #64748b !important;
        font-weight: 750;
    }

    .empty-state {
        border: 1px dashed rgba(100,116,139,0.35);
        border-radius: 0;
        padding: 2.5rem 1rem;
        text-align: center;
        color: #64748b;
        background: #ffffff;
        font-weight: 700;
    }

    .empty-state i {
        display: block;
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }

    @media (max-width: 1200px) {
        .filter-grid {
            grid-template-columns: repeat(2, minmax(180px, 1fr));
        }

        .filter-actions {
            justify-content: flex-start;
        }

        .summary-strip {
            grid-template-columns: repeat(3, minmax(120px, 1fr));
        }
    }

    @media (max-width: 700px) {
        .filter-grid,
        .summary-strip {
            grid-template-columns: 1fr;
        }

        .header-actions {
            justify-content: flex-start;
        }
    }

    @media (max-width: 760px) {
        .worklist-table-shell {
            display: none;
        }

        .mobile-worklist {
            display: grid;
            gap: 0.7rem;
        }

        .mobile-worklist-card {
            border: 1px solid rgba(15, 23, 42, 0.10);
            border-radius: 0;
            background: #ffffff;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
            padding: 0.75rem;
        }

        .mobile-card-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.75rem;
            padding-bottom: 0.55rem;
            border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        }

        .mobile-casino {
            color: #0f172a;
            font-size: 0.92rem;
            font-weight: 900;
            line-height: 1.15;
        }

        .mobile-serial {
            margin-top: 0.18rem;
            color: #475569;
            font-family: Consolas, "Courier New", monospace;
            font-size: 0.78rem;
            font-weight: 850;
        }

        .mobile-status-stack {
            display: flex;
            align-items: flex-end;
            flex-direction: column;
            gap: 0.28rem;
            flex: 0 0 auto;
        }

        .mobile-title-block {
            margin-top: 0.62rem;
        }

        .mobile-label {
            display: block;
            color: #64748b;
            font-size: 0.62rem;
            font-weight: 850;
            letter-spacing: 0.06em;
            line-height: 1.1;
            text-transform: uppercase;
        }

        .mobile-title {
            margin-top: 0.16rem;
            color: #0f172a;
            font-size: 0.86rem;
            font-weight: 700;
            line-height: 1.25;
            overflow-wrap: anywhere;
        }

        .mobile-metrics {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.42rem;
            margin-top: 0.65rem;
        }

        .mobile-metrics + .mobile-metrics {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .mobile-metrics > div {
            border: 1px solid rgba(15, 23, 42, 0.08);
            border-radius: 0;
            background: #f8fafc;
            padding: 0.45rem;
            min-width: 0;
        }

        .mobile-metrics strong {
            display: block;
            margin-top: 0.16rem;
            color: #0f172a;
            font-size: 0.84rem;
            line-height: 1.1;
            overflow-wrap: anywhere;
        }

        .mobile-deltas {
            display: flex;
            justify-content: space-between;
            gap: 0.6rem;
            margin-top: 0.6rem;
            padding-top: 0.55rem;
            border-top: 1px solid rgba(15, 23, 42, 0.08);
            color: #475569;
            font-size: 0.74rem;
            font-weight: 750;
        }

        .mobile-deltas span {
            min-width: 0;
        }
    }

    @media (max-width: 430px) {
        .mobile-metrics,
        .mobile-metrics + .mobile-metrics {
            grid-template-columns: 1fr;
        }

        .mobile-card-top,
        .mobile-deltas {
            flex-direction: column;
            align-items: stretch;
        }

        .mobile-status-stack {
            align-items: flex-start;
            flex-direction: row;
            flex-wrap: wrap;
        }
    }

    @media print {
        .navbar,
        .worklist-filter-panel,
        .header-actions {
            display: none !important;
        }

        .dashboard-wrapper,
        .container-fluid {
            padding: 0 !important;
            margin: 0 !important;
        }

        .page-header {
            margin-bottom: 0.5rem !important;
        }

        .summary-strip {
            grid-template-columns: repeat(6, 1fr);
            break-inside: avoid;
        }

        .worklist-table-shell {
            max-height: none;
            overflow: visible;
            box-shadow: none;
            border-radius: 0;
        }

        .worklist-table {
            min-width: 0;
            font-size: 0.62rem;
        }

        .worklist-table thead th {
            position: static;
            padding: 0.32rem;
        }

        .worklist-table tbody td {
            padding: 0.28rem 0.32rem;
        }

        .title-cell {
            min-width: 0;
            max-width: 180px;
        }
    }

