/* Palet dan panel mengikuti halaman Extensions / Registration. */
.cdr-page {
    color: #51483f;
    padding: 4px 0 24px;
}

.cdr-page [hidden] {
    display: none !important;
}

.cdr-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 28px;
    margin-bottom: 18px;
    border: 1px solid #efd6a0;
    border-radius: 12px;
    background: linear-gradient(105deg, #fff3d8 0%, #fff8eb 62%, #fffdf8 100%);
}

.cdr-eyebrow {
    margin: 0 0 8px;
    color: #b48336;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
}

.cdr-hero h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 650;
    letter-spacing: -0.6px;
}

.cdr-hero p:not(.cdr-eyebrow) {
    margin: 9px 0 0;
    color: #766554;
    font-size: 12px;
}

.cdr-primary,
.cdr-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid #e4c27d;
    border-radius: 7px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
}

.cdr-primary {
    background: #ffbd32;
    border-color: #d98b19;
    color: #291c0b;
    box-shadow: 0 3px 8px #8b5a1517;
}

.cdr-primary:hover {
    background: #ffca57;
}

.cdr-secondary {
    background: #fff8e8;
    color: #845711;
}

.cdr-secondary:hover {
    background: #fff0d1;
}

.cdr-notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #ecdfca;
    border-radius: 8px;
    background: #fff9ed;
    color: #876a42;
    font-size: 12px;
    line-height: 1.5;
}

.cdr-notice p {
    margin: 0;
}

.cdr-notice i {
    color: #b48336;
    flex-shrink: 0;
}

.cdr-page button:disabled {
    opacity: 0.5;
    cursor: wait;
}

.cdr-panel {
    background: #fffefa;
    border: 1px solid #e9e1d6;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 4px 22px #49321c05;
}

.cdr-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border-bottom: 1px solid #eee8df;
}

.cdr-panel-head h2 {
    font-size: 14px;
    margin: 0 0 7px;
}

.cdr-panel-head p,
.cdr-period-note {
    color: #978a7e;
    font-size: 11px;
    margin: 0;
}

.cdr-badge {
    border: 1px solid #e7dcc9;
    background: #faf5ec;
    border-radius: 20px;
    padding: 6px 10px;
    color: #9c8057;
    font-size: 10px;
    white-space: nowrap;
}

.cdr-filters {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(125px, 1fr)) minmax(140px, 1fr) minmax(190px, 1.4fr)
        auto;
    gap: 12px;
    align-items: end;
    padding: 20px 22px 10px;
}

.cdr-filters label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 0;
}

.cdr-filters input,
.cdr-filters select {
    width: 100%;
    min-width: 0;
    height: 39px;
    box-sizing: border-box;
    border: 1px solid #e6ded3;
    border-radius: 7px;
    padding: 8px 10px;
    color: #6c5d4e;
    background: white;
    font: inherit;
    font-size: 11px;
}

.cdr-period-note {
    padding: 0 22px 18px;
}

.cdr-page :focus-visible {
    outline: 2px solid #bf923e;
    outline-offset: 3px;
}

.cdr-table-wrap {
    max-height: 570px;
    overflow: auto;
    margin: 0 16px;
    border: 1px solid #eee8df;
    border-radius: 8px;
}

.cdr-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11px;
    text-align: left;
}

.cdr-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8f4ed;
    color: #968573;
    padding: 14px 12px;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
    border-bottom: 1px solid #eee8df;
}

.cdr-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0eae1;
    vertical-align: middle;
}

.cdr-table tbody tr:hover {
    background: #fdf9f1;
}

.cdr-table td:first-child {
    white-space: nowrap;
}

.cdr-direction {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    background: #f2eee8;
    color: #887666;
    font-size: 10px;
}

.cdr-direction[data-direction="inbound"] {
    color: #467a62;
    background: #edf6ef;
}

.cdr-direction[data-direction="outbound"] {
    color: #9c7632;
    background: #fff3d9;
}

.cdr-direction[data-direction="internal"] {
    color: #587997;
    background: #edf3f9;
}

.cdr-duration {
    font-variant-numeric: tabular-nums;
}

.cdr-empty {
    text-align: center;
    padding: 40px 20px;
    color: #988a7b;
}

.cdr-empty > i {
    font-size: 30px;
    color: #c1ad8f;
}

.cdr-empty h3 {
    font-size: 14px;
    color: #7d6e5e;
}

.cdr-empty p {
    font-size: 12px;
}

.cdr-sentinel {
    min-height: 48px;
    display: grid;
    place-items: center;
    color: #9a8d7e;
    font-size: 11px;
    padding: 8px 12px;
    text-align: center;
}

.cdr-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 62px;
    padding: 12px 22px;
    color: #938573;
    font-size: 11px;
}

.cdr-error {
    margin: 0 22px 16px;
    padding: 12px;
    border: 1px solid #e6b7b1;
    border-radius: 8px;
    background: #fff2f0;
    color: #97443b;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .cdr-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cdr-filters button {
        justify-self: start;
    }
}

@media (max-width: 600px) {
    .cdr-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .cdr-panel-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .cdr-filters {
        padding: 18px 16px 10px;
        gap: 14px 10px;
    }

    .cdr-filters button {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .cdr-table-wrap {
        margin: 0 10px;
        max-height: 65vh;
    }

    .cdr-period-note {
        padding-inline: 16px;
        line-height: 1.5;
    }
}

.cdr-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cdr-filters {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.cdr-call-status {
    display: inline-block;
    white-space: nowrap;
    border-radius: 20px;
    padding: 5px 9px;
    background: #fff0e9;
    color: #a46147;
    font-size: 10px;
}

.cdr-call-status[data-status="ANSWERED"] {
    background: #edf6ef;
    color: #467a62;
}

.cdr-call-status[data-status="BUSY"] {
    background: #fff3d9;
    color: #9c7632;
}

.cdr-details {
    min-width: 140px;
}

.cdr-details summary {
    cursor: pointer;
    color: #9c7632;
}

.cdr-details dl {
    min-width: 260px;
    max-width: 420px;
    margin: 12px 0 0;
}

.cdr-details dt {
    font-size: 10px;
    color: #978a7e;
    margin-top: 8px;
}

.cdr-details dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .cdr-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cdr-list-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cdr-answered {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
}

.cdr-answered input {
    margin: 0;
    accent-color: #b7883d;
    width: 14px;
    height: 14px;
}

.cdr-search {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 11px;
}

@media (max-width: 600px) {
    .cdr-list-actions {
        gap: 10px;
    }
}

/* Kontrol header memakai tinggi yang sama dengan tombol Cari. */
.cdr-list-actions > .cdr-badge,
.cdr-list-actions > .cdr-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
}

.cdr-list-actions > .cdr-answered {
    gap: 7px;
}
