/*
 * Device call modal lists.
 * Reuses the institution physical examination list treatment for:
 * - device-call-divide-grid
 * - device-call-record-grid
 */

.modal:has(table.device-call-divide-grid),
.modal:has(table.device-call-record-grid) {
    --dcm-border: #d4e2ef;
    --dcm-border-strong: #afc7dc;
    --dcm-surface: #ffffff;
    --dcm-surface-soft: #f5f9fc;
    --dcm-text: #1d3551;
    --dcm-muted: #6d8196;
    --dcm-accent: #2f72b6;
    --dcm-accent-2: #2c9a9a;
    --dcm-shadow: 0 18px 42px rgba(31, 62, 91, 0.18);
}

.modal:has(table.device-call-divide-grid) .modal-dialog,
.modal:has(table.device-call-record-grid) .modal-dialog {
    width: calc(100vw - 72px) !important;
    max-width: 1280px !important;
    margin: 4vh auto;
}

.modal:has(table.device-call-divide-grid) .modal-content,
.modal:has(table.device-call-record-grid) .modal-content {
    overflow: hidden;
    border: 1px solid var(--dcm-border);
    border-radius: 10px;
    background: linear-gradient(180deg, #f3f8fc 0%, #ffffff 34%, #f8fbfd 100%);
    box-shadow: var(--dcm-shadow);
}

.modal:has(table.device-call-divide-grid) .modal-header,
.modal:has(table.device-call-record-grid) .modal-header {
    min-height: 58px;
    padding: 15px 22px;
    border-bottom: 1px solid var(--dcm-border);
    background:
        linear-gradient(90deg, rgba(47, 114, 182, 0.12), rgba(44, 154, 154, 0.08) 54%, rgba(255, 255, 255, 0.78)),
        #f3f8fc;
}

.modal:has(table.device-call-divide-grid) .modal-title,
.modal:has(table.device-call-record-grid) .modal-title {
    color: var(--dcm-text);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
}

.modal:has(table.device-call-divide-grid) .modal-header .close,
.modal:has(table.device-call-record-grid) .modal-header .close {
    color: #60758c;
    opacity: 0.9;
    text-shadow: none;
    transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.modal:has(table.device-call-divide-grid) .modal-header .close:hover,
.modal:has(table.device-call-record-grid) .modal-header .close:hover {
    color: var(--dcm-accent);
    opacity: 1;
    transform: rotate(90deg);
}

.modal:has(table.device-call-divide-grid) .modal-body,
.modal:has(table.device-call-record-grid) .modal-body {
    max-height: 76vh;
    padding: 0 18px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, rgba(245, 249, 252, 0.92), rgba(255, 255, 255, 0.96));
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 114, 182, 0.3) transparent;
}

.modal:has(table.device-call-divide-grid) .modal-body::-webkit-scrollbar,
.modal:has(table.device-call-record-grid) .modal-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.modal:has(table.device-call-divide-grid) .modal-body::-webkit-scrollbar-thumb,
.modal:has(table.device-call-record-grid) .modal-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(47, 114, 182, 0.28);
}

.modal:has(table.device-call-divide-grid) .grid-box,
.modal:has(table.device-call-record-grid) .grid-box,
.modal:has(table.device-call-divide-grid) .dcat-box,
.modal:has(table.device-call-record-grid) .dcat-box {
    margin-bottom: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.modal:has(table.device-call-divide-grid) .box-body,
.modal:has(table.device-call-record-grid) .box-body,
.modal:has(table.device-call-divide-grid) .card-body,
.modal:has(table.device-call-record-grid) .card-body {
    padding: 0;
    background: transparent;
}

.modal:has(table.device-call-divide-grid) .dcat-box > .card-header,
.modal:has(table.device-call-record-grid) .dcat-box > .card-header,
.modal:has(table.device-call-divide-grid) .grid-box > .card-header,
.modal:has(table.device-call-record-grid) .grid-box > .card-header {
    margin: 0 0 12px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.modal:has(table.device-call-divide-grid) .grid-selector,
.modal:has(table.device-call-record-grid) .grid-selector,
.modal:has(table.device-call-divide-grid) .grid-filter,
.modal:has(table.device-call-record-grid) .grid-filter,
.modal:has(table.device-call-divide-grid) .filter-box,
.modal:has(table.device-call-record-grid) .filter-box {
    margin: 14px 0 12px !important;
    padding: 12px 14px !important;
    border: 1px solid var(--dcm-border);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 249, 252, 0.96)),
        #ffffff;
    box-shadow: 0 10px 24px rgba(31, 62, 91, 0.07);
}

.modal:has(table.device-call-divide-grid) .grid-selector,
.modal:has(table.device-call-record-grid) .grid-selector {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 54px;
    overflow: visible !important;
    max-height: none !important;
    scrollbar-width: none;
}

.modal:has(table.device-call-divide-grid) .grid-filter .filter-box,
.modal:has(table.device-call-record-grid) .grid-filter .filter-box {
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.modal:has(table.device-call-divide-grid) .grid-selector .wrap,
.modal:has(table.device-call-record-grid) .grid-selector .wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    margin: 0 0 10px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: normal;
    scrollbar-width: none;
}

.modal:has(table.device-call-divide-grid) .grid-selector .wrap:last-child,
.modal:has(table.device-call-record-grid) .grid-selector .wrap:last-child {
    margin-bottom: 0 !important;
}

.modal:has(table.device-call-divide-grid) .grid-selector .select-label,
.modal:has(table.device-call-record-grid) .grid-selector .select-label {
    display: flex;
    align-items: center;
    float: none;
    flex: 0 0 72px;
    width: 72px;
    min-height: 30px;
    padding: 0;
    color: #365875;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.modal:has(table.device-call-divide-grid) .grid-selector .select-options,
.modal:has(table.device-call-record-grid) .grid-selector .select-options {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0 !important;
    overflow: visible !important;
    max-height: none !important;
    scrollbar-width: none;
}

.modal:has(table.device-call-divide-grid) .grid-selector .select-options ul,
.modal:has(table.device-call-record-grid) .grid-selector .select-options ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    height: auto !important;
    margin: 0;
    padding: 0;
    overflow: visible !important;
    max-height: none !important;
    list-style: none;
    scrollbar-width: none;
}

.modal:has(table.device-call-divide-grid) .grid-selector::-webkit-scrollbar,
.modal:has(table.device-call-record-grid) .grid-selector::-webkit-scrollbar,
.modal:has(table.device-call-divide-grid) .grid-selector .wrap::-webkit-scrollbar,
.modal:has(table.device-call-record-grid) .grid-selector .wrap::-webkit-scrollbar,
.modal:has(table.device-call-divide-grid) .grid-selector .select-options::-webkit-scrollbar,
.modal:has(table.device-call-record-grid) .grid-selector .select-options::-webkit-scrollbar,
.modal:has(table.device-call-divide-grid) .grid-selector .select-options ul::-webkit-scrollbar,
.modal:has(table.device-call-record-grid) .grid-selector .select-options ul::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.modal:has(table.device-call-divide-grid) .grid-selector::-webkit-scrollbar-button,
.modal:has(table.device-call-record-grid) .grid-selector::-webkit-scrollbar-button,
.modal:has(table.device-call-divide-grid) .grid-selector .wrap::-webkit-scrollbar-button,
.modal:has(table.device-call-record-grid) .grid-selector .wrap::-webkit-scrollbar-button,
.modal:has(table.device-call-divide-grid) .grid-selector .select-options::-webkit-scrollbar-button,
.modal:has(table.device-call-record-grid) .grid-selector .select-options::-webkit-scrollbar-button,
.modal:has(table.device-call-divide-grid) .grid-selector .select-options ul::-webkit-scrollbar-button,
.modal:has(table.device-call-record-grid) .grid-selector .select-options ul::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.modal:has(table.device-call-divide-grid) .grid-selector .select-options li,
.modal:has(table.device-call-record-grid) .grid-selector .select-options li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    float: none;
    margin: 0 !important;
    list-style: none;
}

.modal:has(table.device-call-divide-grid) .grid-selector .select-options a,
.modal:has(table.device-call-record-grid) .grid-selector .select-options a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 12px;
    border: 1px solid rgba(175, 199, 220, 0.88);
    border-radius: 999px;
    background: #ffffff;
    color: var(--dcm-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.modal:has(table.device-call-divide-grid) .grid-selector .select-options a:hover,
.modal:has(table.device-call-record-grid) .grid-selector .select-options a:hover,
.modal:has(table.device-call-divide-grid) .grid-selector .select-options a.active,
.modal:has(table.device-call-record-grid) .grid-selector .select-options a.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--dcm-accent), var(--dcm-accent-2));
    color: #ffffff !important;
    box-shadow: 0 8px 16px rgba(47, 114, 182, 0.18);
    transform: translateY(-1px);
}

.modal:has(table.device-call-divide-grid) .grid-filter .card,
.modal:has(table.device-call-record-grid) .grid-filter .card,
.modal:has(table.device-call-divide-grid) .grid-filter .box,
.modal:has(table.device-call-record-grid) .grid-filter .box,
.modal:has(table.device-call-divide-grid) .filter-box .card,
.modal:has(table.device-call-record-grid) .filter-box .card,
.modal:has(table.device-call-divide-grid) .filter-box .box,
.modal:has(table.device-call-record-grid) .filter-box .box {
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.modal:has(table.device-call-divide-grid) .grid-filter .card-body,
.modal:has(table.device-call-record-grid) .grid-filter .card-body,
.modal:has(table.device-call-divide-grid) .grid-filter .box-body,
.modal:has(table.device-call-record-grid) .grid-filter .box-body,
.modal:has(table.device-call-divide-grid) .filter-box .card-body,
.modal:has(table.device-call-record-grid) .filter-box .card-body,
.modal:has(table.device-call-divide-grid) .filter-box .box-body,
.modal:has(table.device-call-record-grid) .filter-box .box-body {
    padding: 0 !important;
}

.modal:has(table.device-call-divide-grid) .grid-filter-form > .row,
.modal:has(table.device-call-record-grid) .grid-filter-form > .row,
.modal:has(table.device-call-divide-grid) .filter-form > .row,
.modal:has(table.device-call-record-grid) .filter-form > .row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 40px;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.modal:has(table.device-call-divide-grid) .grid-filter-form > .row > *,
.modal:has(table.device-call-record-grid) .grid-filter-form > .row > *,
.modal:has(table.device-call-divide-grid) .filter-form > .row > *,
.modal:has(table.device-call-record-grid) .filter-form > .row > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.modal:has(table.device-call-divide-grid) .grid-filter-form .filter-input[class*="col-sm-"],
.modal:has(table.device-call-record-grid) .grid-filter-form .filter-input[class*="col-sm-"],
.modal:has(table.device-call-divide-grid) .filter-form .filter-input[class*="col-sm-"],
.modal:has(table.device-call-record-grid) .filter-form .filter-input[class*="col-sm-"] {
    flex: 0 0 240px;
    width: auto;
    max-width: 320px;
    padding: 0 !important;
}

.modal:has(table.device-call-divide-grid) .grid-filter .form-group,
.modal:has(table.device-call-record-grid) .grid-filter .form-group,
.modal:has(table.device-call-divide-grid) .filter-box .form-group,
.modal:has(table.device-call-record-grid) .filter-box .form-group {
    flex: 0 0 240px;
    max-width: 320px;
    margin: 0 !important;
    padding: 0 !important;
}

.modal:has(table.device-call-divide-grid) .grid-filter label,
.modal:has(table.device-call-record-grid) .grid-filter label,
.modal:has(table.device-call-divide-grid) .filter-box label,
.modal:has(table.device-call-record-grid) .filter-box label {
    margin-bottom: 6px;
    color: #365875;
    font-size: 13px;
    font-weight: 700;
}

.modal:has(table.device-call-divide-grid) .grid-filter .input-group,
.modal:has(table.device-call-record-grid) .grid-filter .input-group,
.modal:has(table.device-call-divide-grid) .filter-box .input-group,
.modal:has(table.device-call-record-grid) .filter-box .input-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    height: 38px;
    overflow: hidden;
    border: 1px solid var(--dcm-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
}

.modal:has(table.device-call-divide-grid) .grid-filter .input-group-prepend,
.modal:has(table.device-call-record-grid) .grid-filter .input-group-prepend,
.modal:has(table.device-call-divide-grid) .filter-box .input-group-prepend,
.modal:has(table.device-call-record-grid) .filter-box .input-group-prepend {
    display: flex;
    align-self: stretch;
    margin: 0 !important;
}

.modal:has(table.device-call-divide-grid) .grid-filter .input-group-text,
.modal:has(table.device-call-record-grid) .grid-filter .input-group-text,
.modal:has(table.device-call-divide-grid) .filter-box .input-group-text,
.modal:has(table.device-call-record-grid) .filter-box .input-group-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 0 11px;
    border: 0;
    border-right: 1px solid var(--dcm-border);
    border-radius: 0 !important;
    background: #ffffff;
    color: var(--dcm-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.modal:has(table.device-call-divide-grid) .grid-filter .form-control,
.modal:has(table.device-call-record-grid) .grid-filter .form-control,
.modal:has(table.device-call-divide-grid) .filter-box .form-control,
.modal:has(table.device-call-record-grid) .filter-box .form-control {
    height: 36px;
    border-color: var(--dcm-border);
    border-radius: 8px;
    color: var(--dcm-text);
    font-size: 13px;
    box-shadow: none;
}

.modal:has(table.device-call-divide-grid) .grid-filter .input-group > .form-control,
.modal:has(table.device-call-record-grid) .grid-filter .input-group > .form-control,
.modal:has(table.device-call-divide-grid) .filter-box .input-group > .form-control,
.modal:has(table.device-call-record-grid) .filter-box .input-group > .form-control {
    min-width: 0;
    height: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.modal:has(table.device-call-divide-grid) .grid-filter .form-control:focus,
.modal:has(table.device-call-record-grid) .grid-filter .form-control:focus,
.modal:has(table.device-call-divide-grid) .filter-box .form-control:focus,
.modal:has(table.device-call-record-grid) .filter-box .form-control:focus {
    border-color: var(--dcm-accent);
    box-shadow: none;
}

.modal:has(table.device-call-divide-grid) .grid-filter .input-group:focus-within,
.modal:has(table.device-call-record-grid) .grid-filter .input-group:focus-within,
.modal:has(table.device-call-divide-grid) .filter-box .input-group:focus-within,
.modal:has(table.device-call-record-grid) .filter-box .input-group:focus-within {
    border-color: var(--dcm-accent);
    box-shadow: 0 0 0 3px rgba(47, 114, 182, 0.12);
}

.modal:has(table.device-call-divide-grid) .grid-filter .btn-group,
.modal:has(table.device-call-record-grid) .grid-filter .btn-group,
.modal:has(table.device-call-divide-grid) .filter-box .btn-group,
.modal:has(table.device-call-record-grid) .filter-box .btn-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    vertical-align: middle;
}

.modal:has(table.device-call-divide-grid) .filter-button-group,
.modal:has(table.device-call-record-grid) .filter-button-group {
    display: inline-flex;
    align-items: center;
    margin: 12px 0 8px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.modal:has(table.device-call-divide-grid) .filter-button-group .btn,
.modal:has(table.device-call-record-grid) .filter-button-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--dcm-border) !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: var(--dcm-accent) !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 5px 12px rgba(31, 62, 91, 0.08);
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.modal:has(table.device-call-divide-grid) .filter-button-group .btn:hover,
.modal:has(table.device-call-record-grid) .filter-button-group .btn:hover,
.modal:has(table.device-call-divide-grid) .filter-button-group .btn:focus,
.modal:has(table.device-call-record-grid) .filter-button-group .btn:focus {
    border-color: var(--dcm-border-strong) !important;
    background: #f8fbfe !important;
    color: var(--dcm-accent) !important;
    box-shadow: 0 8px 16px rgba(31, 62, 91, 0.12);
    transform: translateY(-1px);
}

.modal:has(table.device-call-divide-grid) .grid-filter .btn,
.modal:has(table.device-call-record-grid) .grid-filter .btn,
.modal:has(table.device-call-divide-grid) .filter-box .btn,
.modal:has(table.device-call-record-grid) .filter-box .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    height: 36px;
    margin: 0 !important;
    padding: 0 14px;
    border-radius: 8px !important;
    font-size: 13px;
    font-weight: 700;
}

.modal:has(table.device-call-divide-grid) .grid-filter-form > .row > .btn,
.modal:has(table.device-call-record-grid) .grid-filter-form > .row > .btn,
.modal:has(table.device-call-divide-grid) .filter-form > .row > .btn,
.modal:has(table.device-call-record-grid) .filter-form > .row > .btn {
    flex: 0 0 auto;
    background-clip: padding-box !important;
    box-shadow: 0 6px 14px rgba(31, 62, 91, 0.08);
}

.modal:has(table.device-call-divide-grid) .grid-filter-form > .row > .reset,
.modal:has(table.device-call-record-grid) .grid-filter-form > .row > .reset,
.modal:has(table.device-call-divide-grid) .filter-form > .row > .reset,
.modal:has(table.device-call-record-grid) .filter-form > .row > .reset {
    border: 1px solid var(--dcm-border) !important;
    background: #ffffff !important;
    color: var(--dcm-text) !important;
}

.modal:has(table.device-call-divide-grid) .grid-filter .btn-primary,
.modal:has(table.device-call-record-grid) .grid-filter .btn-primary,
.modal:has(table.device-call-divide-grid) .filter-box .btn-primary,
.modal:has(table.device-call-record-grid) .filter-box .btn-primary {
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--dcm-accent), var(--dcm-accent-2)) !important;
    box-shadow: 0 8px 16px rgba(47, 114, 182, 0.18);
}

.modal:has(table.device-call-divide-grid) .table-responsive,
.modal:has(table.device-call-record-grid) .table-responsive,
.modal:has(table.device-call-divide-grid) .table-wrapper,
.modal:has(table.device-call-record-grid) .table-wrapper {
    margin: 0 !important;
    overflow: visible !important;
    border: 1px solid var(--dcm-border);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 26px rgba(31, 62, 91, 0.08);
}

.modal:has(table.device-call-divide-grid) .custom-data-table-header,
.modal:has(table.device-call-record-grid) .custom-data-table-header,
.modal:has(table.device-call-divide-grid) .custom-data-table-header .table-responsive,
.modal:has(table.device-call-record-grid) .custom-data-table-header .table-responsive,
.modal:has(table.device-call-divide-grid) .custom-data-table-header .top,
.modal:has(table.device-call-record-grid) .custom-data-table-header .top {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

table.device-call-divide-grid,
table.device-call-record-grid {
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    border-collapse: separate !important;
    border-spacing: 0 7px !important;
    table-layout: fixed;
    background: transparent;
}

table.device-call-divide-grid > thead > tr > th,
table.device-call-record-grid > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 11px 10px !important;
    border: 0 !important;
    background: linear-gradient(180deg, #edf5fb 0%, #e4eff8 100%) !important;
    background-clip: padding-box;
    color: #365875 !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left !important;
    white-space: normal;
}

table.device-call-divide-grid > tbody > tr,
table.device-call-record-grid > tbody > tr {
    transform: translateY(0);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

table.device-call-divide-grid > tbody > tr > td,
table.device-call-record-grid > tbody > tr > td {
    padding: 10px 10px !important;
    border-top: 1px solid rgba(212, 226, 239, 0.84) !important;
    border-bottom: 1px solid rgba(212, 226, 239, 0.84) !important;
    background: var(--dcm-surface);
    color: var(--dcm-text);
    font-size: 13px;
    line-height: 1.46;
    vertical-align: middle !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

table.device-call-divide-grid > tbody > tr > td:first-child,
table.device-call-record-grid > tbody > tr > td:first-child {
    border-left: 1px solid rgba(212, 226, 239, 0.84) !important;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

table.device-call-divide-grid > tbody > tr > td:last-child,
table.device-call-record-grid > tbody > tr > td:last-child {
    border-right: 1px solid rgba(212, 226, 239, 0.84) !important;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

table.device-call-divide-grid > tbody > tr:hover,
table.device-call-record-grid > tbody > tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(31, 62, 91, 0.08);
}

table.device-call-divide-grid > tbody > tr:hover > td,
table.device-call-record-grid > tbody > tr:hover > td {
    border-color: rgba(175, 199, 220, 0.98) !important;
    background: #fbfdff;
}

table.device-call-divide-grid .label,
table.device-call-record-grid .label,
table.device-call-divide-grid .badge,
table.device-call-record-grid .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: 0 6px 14px rgba(31, 62, 91, 0.08);
}

table.device-call-divide-grid .grid-column-header,
table.device-call-record-grid .grid-column-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

table.device-call-divide-grid .grid-sort,
table.device-call-record-grid .grid-sort {
    color: #88a3bb;
}

table.device-call-divide-grid > thead > tr > th:nth-child(1) {
    width: 25%;
}

table.device-call-divide-grid > thead > tr > th:nth-child(2) {
    width: 35%;
}

table.device-call-divide-grid > thead > tr > th:nth-child(3) {
    width: 40%;
}

table.device-call-record-grid > thead > tr > th:nth-child(1) {
    width: 7%;
}

table.device-call-record-grid > thead > tr > th:nth-child(2) {
    width: 11%;
}

table.device-call-record-grid > thead > tr > th:nth-child(3) {
    width: 15%;
}

table.device-call-record-grid > thead > tr > th:nth-child(4) {
    width: 13%;
}

table.device-call-record-grid > thead > tr > th:nth-child(5) {
    width: 12%;
}

table.device-call-record-grid > thead > tr > th:nth-child(6) {
    width: 13%;
}

table.device-call-record-grid > thead > tr > th:nth-child(7),
table.device-call-record-grid > thead > tr > th:nth-child(8) {
    width: 14.5%;
}

.modal:has(table.device-call-divide-grid) .box-footer,
.modal:has(table.device-call-record-grid) .box-footer,
.modal:has(table.device-call-divide-grid) .card-footer,
.modal:has(table.device-call-record-grid) .card-footer {
    margin-top: 10px;
    padding: 10px 2px 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.modal:has(table.device-call-divide-grid) .box-footer > *,
.modal:has(table.device-call-record-grid) .box-footer > *,
.modal:has(table.device-call-divide-grid) .card-footer > *,
.modal:has(table.device-call-record-grid) .card-footer > * {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal:has(table.device-call-divide-grid) .pagination,
.modal:has(table.device-call-record-grid) .pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.modal:has(table.device-call-divide-grid) .pagination .page-item,
.modal:has(table.device-call-record-grid) .pagination .page-item {
    margin: 0;
}

.modal:has(table.device-call-divide-grid) .pagination .page-link,
.modal:has(table.device-call-record-grid) .pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    border-color: var(--dcm-border);
    color: var(--dcm-accent);
    border-radius: 8px;
    line-height: 1;
}

.modal:has(table.device-call-divide-grid) .pagination .page-item.active .page-link,
.modal:has(table.device-call-record-grid) .pagination .page-item.active .page-link {
    border-color: transparent;
    background: linear-gradient(135deg, var(--dcm-accent), var(--dcm-accent-2));
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(47, 114, 182, 0.22);
}

.modal:has(table.device-call-divide-grid) .box-footer select,
.modal:has(table.device-call-record-grid) .box-footer select,
.modal:has(table.device-call-divide-grid) .card-footer select,
.modal:has(table.device-call-record-grid) .card-footer select,
.modal:has(table.device-call-divide-grid) .box-footer .form-control,
.modal:has(table.device-call-record-grid) .box-footer .form-control,
.modal:has(table.device-call-divide-grid) .card-footer .form-control,
.modal:has(table.device-call-record-grid) .card-footer .form-control {
    min-width: 58px;
    height: 34px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 34px;
    text-align: center;
    text-align-last: center;
    border-color: var(--dcm-border);
    border-radius: 8px;
}

body.dark-mode .modal:has(table.device-call-divide-grid),
body.dark-mode .modal:has(table.device-call-record-grid) {
    --dcm-border: #35465a;
    --dcm-border-strong: #486078;
    --dcm-surface: #202b38;
    --dcm-surface-soft: #1a2430;
    --dcm-text: #d9e4ef;
    --dcm-muted: #a8b6c6;
}

body.dark-mode table.device-call-divide-grid > thead > tr > th,
body.dark-mode table.device-call-record-grid > thead > tr > th {
    background: linear-gradient(180deg, #263444 0%, #213040 100%) !important;
    color: #dce8f3 !important;
}

body.dark-mode table.device-call-divide-grid > tbody > tr > td,
body.dark-mode table.device-call-record-grid > tbody > tr > td {
    background: #202b38;
    color: #d9e4ef;
}

body.dark-mode table.device-call-divide-grid > tbody > tr:hover > td,
body.dark-mode table.device-call-record-grid > tbody > tr:hover > td {
    background: #243343;
}

@media (max-width: 768px) {
    .modal:has(table.device-call-divide-grid) .modal-dialog,
    .modal:has(table.device-call-record-grid) .modal-dialog {
        width: 94vw !important;
        max-width: 94vw !important;
        margin: 3vh auto;
    }

    .modal:has(table.device-call-divide-grid) .modal-body,
    .modal:has(table.device-call-record-grid) .modal-body {
        padding: 12px;
        max-height: 78vh;
    }
}
