/* Overdue alert buttons */
.overdue-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.overdue-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


.overdue-btn-12315 {
    background: rgba(240, 185, 11, 0.2);
    border-color: rgba(240, 185, 11, 0.5);
    color: #FCD535;
}

.overdue-btn-12315:hover {
    background: rgba(240, 185, 11, 0.3);
    border-color: #F0B90B;
}

.overdue-details-close-btn {
    background: var(--bg-card, #FFFFFF);
    border: 1px solid var(--border-color, #ddd);
    color: var(--text-secondary, #666);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.overdue-details-close-btn:hover {
    border-color: var(--border-hover, #cfcfcf);
    color: var(--text-primary, #333);
}

/* Case Type Stats Modal (dashboard overdue detail) */
.case-type-stats-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--app-modal-mask-bg, rgba(11, 14, 17, 0.62));
    backdrop-filter: var(--app-modal-mask-filter, blur(16px) saturate(1.04));
    -webkit-backdrop-filter: var(--app-modal-mask-filter, blur(16px) saturate(1.04));
    z-index: var(--z-modal-max, 2147483210);
    align-items: center;
    justify-content: center;
}

.case-type-stats-modal__dialog {
    background: var(--bg-card, #FFFFFF);
    border-radius: 16px;
    padding: 24px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.case-type-stats-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color, #E5E7EB);
    padding-bottom: 12px;
}

.case-type-stats-modal__title {
    margin: 0;
    color: var(--text-primary, #1E2329);
    font-size: 18px;
}

.case-type-stats-modal__content {
    min-height: 200px;
}

.case-type-stats-summary {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-secondary, #F9FAFB);
    border-radius: 8px;
    font-size: 14px;
}

.case-type-stats-summary__count {
    font-weight: 700;
}

.case-type-stats-summary__filter {
    margin-left: 8px;
    color: var(--text-secondary, #6B7280);
}

.case-type-stats-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.case-type-stats-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-color, #E5E7EB);
    border-radius: 999px;
    background: var(--bg-card, #FFFFFF);
    color: var(--text-secondary, #4B5563);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.case-type-stats-tab:hover {
    border-color: #F0B90B;
    color: var(--text-primary, #1E2329);
    background: var(--color-warning-bg, #FFFBEB);
}

.case-type-stats-tab.is-active {
    border-color: #F0B90B;
    background: #F0B90B;
    color: #1E2329;
}

.case-type-stats-tab__count {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(30, 35, 41, 0.08);
    text-align: center;
    font-size: 11px;
    line-height: 1.4;
}

.case-type-stats-tab.is-active .case-type-stats-tab__count {
    background: rgba(30, 35, 41, 0.16);
}

.case-type-stats-table-wrap {
    max-height: 450px;
    overflow-y: auto;
}

.case-type-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.case-type-stats-table__head {
    position: sticky;
    top: 0;
    background: var(--bg-secondary, #F9FAFB);
    z-index: 1;
}

.case-type-stats-table__th {
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid var(--border-color, #E5E7EB);
}

.case-type-stats-table__th--source {
    width: 110px;
    min-width: 110px;
    white-space: nowrap;
}

.case-type-stats-table__th--case-num {
    width: 230px;
    min-width: 230px;
}

.case-type-stats-table__th--type {
    width: 90px;
    min-width: 90px;
    white-space: nowrap;
}

.case-type-stats-table__row {
    border-bottom: 1px solid var(--border-color, #F3F4F6);
}

.case-type-stats-table__row:hover {
    background: var(--bg-hover, #F9FAFB);
}

.case-type-stats-table__td {
    padding: 10px;
    vertical-align: middle;
}

.case-type-stats-table__td--source {
    width: 110px;
    min-width: 110px;
    white-space: nowrap;
    vertical-align: middle;
}

.case-type-stats-table__td--case-num {
    width: 230px;
    min-width: 230px;
    max-width: 230px;
}

.case-type-stats-table__td--type {
    width: 90px;
    min-width: 90px;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.case-type-stats-case-num {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.case-type-stats-case-num:hover,
.case-type-stats-case-num:focus {
    white-space: normal;
    word-break: break-all;
    background: var(--color-warning-bg, #FFFBEB);
    border-radius: 6px;
    padding: 2px 6px;
    outline: none;
}

.case-type-stats-table__td--due-date {
    font-size: 12px;
    line-height: 1.4;
    vertical-align: middle;
    width: 180px;
    min-width: 180px;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.case-type-stats-table__head .case-type-stats-table__th:last-child {
    width: 180px;
    min-width: 180px;
    white-space: nowrap;
}

.case-type-stats-source-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    line-height: 1.2;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #FFFFFF;
}

.case-type-stats-source-badge--main {
    background: #667EEA;
}

.case-type-stats-source-badge--12315 {
    background: #F59E0B;
}

.case-type-stats-source-badge--recon {
    background: #10B981;
}

.case-type-stats-source-badge--admin-lit {
    background: #EF4444;
}

.case-type-stats-source-badge--civil-lit {
    background: #8B5CF6;
}

.case-type-stats-source-badge--info-disclosure {
    background: #F97316;
}

.case-type-stats-state {
    text-align: center;
    padding: 40px;
}

.case-type-stats-state__icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.case-type-stats-state__logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px;
}

.case-type-stats-state__text {
    margin: 0;
}

.case-type-stats-state--loading .case-type-stats-state__icon {
    font-size: 24px;
    color: #667EEA;
    margin-bottom: 10px;
}

.case-type-stats-state--empty {
    color: var(--text-tertiary, #9CA3AF);
}

.case-type-stats-state--empty .case-type-stats-state__icon {
    opacity: 0.5;
}

.case-type-stats-state--error {
    color: #F6465D;
}

[data-theme="dark"] .case-type-stats-tab__count {
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .case-type-stats-tab.is-active .case-type-stats-tab__count {
    background: rgba(17, 24, 39, 0.24);
}
