/* Precision Security Service Portal Version 2.6
   Credential requests + Ready-to-Bill workflow */
.customer-request-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start}
.request-choice-card{height:100%}.request-kicker,.request-type-badge{display:inline-flex;align-items:center;width:max-content;border:1px solid rgba(181,32,57,.42);background:rgba(127,21,36,.18);color:#efb1bc;border-radius:999px;padding:.34rem .65rem;font-size:.72rem;font-weight:900;letter-spacing:.07em;text-transform:uppercase}.request-choice-card>p{color:var(--muted-2,#939aa6)}
.credential-request-card{border-color:rgba(102,125,160,.32)}.credential-request-card .request-kicker{border-color:rgba(103,132,175,.48);background:rgba(60,82,115,.25);color:#cbdcf7}.credential-master-check{display:flex;align-items:flex-start;gap:.75rem;padding:.9rem 1rem;border:1px solid rgba(255,255,255,.11);border-radius:12px;background:rgba(255,255,255,.025)}.credential-master-check input{width:auto;margin-top:.2rem}.credential-master-check span{display:grid;gap:.15rem}.credential-master-check small{color:var(--muted-2,#939aa6);font-weight:400}.credential-types{display:flex;gap:1rem;flex-wrap:wrap;padding:1rem;border:1px solid rgba(255,255,255,.1);border-radius:12px}.credential-types legend{padding:0 .4rem;font-weight:800}.credential-types .checkbox-label{margin:0}.credential-request-detail{margin:1rem 0;padding:1rem;border:1px solid rgba(103,132,175,.42);border-left:4px solid #647fa8;border-radius:12px;background:rgba(45,61,86,.2)}.credential-request-detail>strong{color:#dbe8ff;letter-spacing:.06em}
.request-type-badge{margin-bottom:.45rem}.request-type-badge.credentials{border-color:rgba(103,132,175,.48);background:rgba(60,82,115,.25);color:#cbdcf7}.request-type-badge.video_footage{border-color:rgba(210,47,75,.6);background:rgba(145,18,37,.28);color:#ffd0d9}
.billing-stat{border-color:rgba(75,157,102,.45)!important}.billing-queue{border-color:rgba(75,157,102,.38)}.billing-queue .eyebrow{color:#b9e4c7}.billing-item{align-items:flex-start}.billing-item small{display:block;margin-top:.3rem;color:var(--muted-2,#939aa6)}.billing-actions{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;justify-content:flex-end}.billing-actions form{margin:0}.mark-billed-button{white-space:nowrap;background:linear-gradient(180deg,#277a47,#1e6038)!important;border-color:rgba(76,178,111,.55)!important}.queue-footer-link{margin-top:1rem;text-align:right}.queue-footer-link a{font-weight:800;color:#b9e4c7}.billing-status-panel{display:grid;gap:.15rem;margin:1rem 0;padding:.85rem 1rem;border-radius:12px}.billing-status-panel.ready{border:1px solid rgba(76,178,111,.45);background:rgba(31,100,56,.18)}.billing-status-panel.billed{border:1px solid rgba(93,122,162,.42);background:rgba(46,66,94,.18)}.billing-status-panel small{color:var(--muted-2,#939aa6)}.billing-history-card table small{display:block;color:var(--muted-2,#939aa6)}
.upgrade-required{padding:1rem;border:1px solid rgba(214,165,54,.45);border-radius:12px;background:rgba(125,91,18,.16)}.portal-upgrade-alert{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.portal-upgrade-alert h2{margin:.25rem 0}.portal-upgrade-alert p{margin:0;color:var(--muted-2,#939aa6)}
@media(max-width:950px){.customer-request-grid{grid-template-columns:1fr}.portal-upgrade-alert{align-items:flex-start;flex-direction:column}.billing-actions{justify-content:flex-start}}
@media(max-width:620px){.credential-types{flex-direction:column;gap:.6rem}.billing-actions{width:100%}.billing-actions>*{width:100%}.billing-actions .queue-open,.billing-actions button{width:100%;text-align:center;justify-content:center}}

/* =========================================================
   SERVICE PORTAL VERSION 2.6.1 POLISH
   ========================================================= */

.credential-lead-time {
    display: grid;
    gap: .28rem;
    margin: .85rem 0 1rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(211, 156, 66, .42);
    border-left: 4px solid #c99038;
    border-radius: 12px;
    background: rgba(119, 78, 24, .16);
}

.credential-lead-time strong {
    color: #ffe0a8;
    font-size: .96rem;
}

.credential-lead-time span {
    color: #d7dbe2;
    font-size: .88rem;
    line-height: 1.5;
}

.billing-item {
    min-height: 0;
    padding: 12px 14px;
    align-items: center;
}

.billing-item > .queue-title {
    min-width: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.billing-actions {
    flex-wrap: nowrap;
}

.billing-actions .queue-open,
.billing-actions .mark-billed-button {
    min-height: 42px;
    padding: .65rem .85rem;
    font-size: .9rem;
}

@media (max-width: 760px) {
    .billing-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .billing-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

/* =========================================================
   SERVICE PORTAL VERSION 2.6.2
   EQUAL-SIZE DASHBOARD QUEUE CARDS
   ========================================================= */

/*
 * All four operational queue cards use one consistent desktop height.
 * Busy queues scroll internally instead of stretching an entire grid row.
 */
@media (min-width: 1001px) {
    .dispatch-queues > .card {
        height: 390px;
        min-height: 390px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .dispatch-queues > .card .queue-heading {
        flex: 0 0 auto;
    }

    .dispatch-queues > .card .queue-list {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        align-content: start;
        padding-right: 5px;
        scrollbar-width: thin;
        scrollbar-color: rgba(165, 29, 50, .55) rgba(255, 255, 255, .035);
    }

    .dispatch-queues > .card .queue-list::-webkit-scrollbar {
        width: 8px;
    }

    .dispatch-queues > .card .queue-list::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, .035);
        border-radius: 999px;
    }

    .dispatch-queues > .card .queue-list::-webkit-scrollbar-thumb {
        background: rgba(165, 29, 50, .55);
        border-radius: 999px;
    }

    .dispatch-queues > .card .empty-queue {
        flex: 1 1 auto;
    }

    .dispatch-queues > .card .queue-footer-link {
        flex: 0 0 auto;
        margin-bottom: 0;
    }
}

/* On tablets and phones, allow natural card height for easier reading. */
@media (max-width: 1000px) {
    .dispatch-queues > .card {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .dispatch-queues > .card .queue-list {
        overflow: visible;
        max-height: none;
        padding-right: 0;
    }
}

/* =========================================================
   SERVICE PORTAL VERSION 2.6.3
   EQUAL-WIDTH DASHBOARD QUEUE COLUMNS
   ========================================================= */
@media (min-width: 1001px) {
    .dispatch-queues {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}
