/* Style mandiri halaman Live Call Monitor. */
/* Kartu statistik memakai selector milik halaman ini. */
.lcm-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0 22px;
}

.lcm-stat {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid #eee8df;
    border-radius: 9px;
    background: #fffefa;
}

.lcm-stat-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: #fff1d5;
    color: #b37b21;
    border-radius: 10px;
}

.lcm-stat p {
    margin: 0;
    font-size: 11px;
    color: #746a5e;
}

.lcm-stat strong {
    display: block;
    font-size: 28px;
    line-height: 1.5;
    font-weight: 500;
    color: #62564a;
}

.lcm-stat small {
    display: block;
    font-size: 10px;
    color: #7e746c;
}

@media (max-width: 1200px) {
    .lcm-stats {
        gap: 10px;
    }

    .lcm-stat {
        padding: 15px 12px;
        gap: 10px;
    }

    .lcm-stat-icon {
        width: 30px;
        height: 30px;
    }

    .lcm-stat-icon svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 680px) {
    .lcm-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* Pengaturan khusus halaman dan responsif, setelah style dasar. */
.lcm-page {
    --lcm-text: #302823;
    --lcm-muted: #71665b;
    --lcm-line: #e7e0d6;
    --lcm-surface: #fffefa;
    color: var(--lcm-text);
    display: grid;
    gap: 20px;
    min-width: 0;
}

.lcm-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 25px 28px;
    border: 1px solid #efd6a0;
    border-radius: 10px;
    background: #fff0cd url("../../../assets/images/background/login-form-v1.png?v=2") center top /
        100% auto no-repeat;
}

.lcm-heading > div {
    min-width: 0;
}

.lcm-eyebrow {
    display: block;
    margin: 0 0 7px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #805c20;
}

.lcm-heading h1 {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: -0.8px;
    margin: 0;
    color: var(--lcm-text);
}

.lcm-heading p {
    color: #69533a;
    margin: 9px 0 0;
    font-size: 12px;
}

.lcm-live {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 8px 13px;
    border: 1px solid #ead7ad;
    border-radius: 24px;
    background: #fff5dd;
    white-space: nowrap;
    color: #805c20;
}

.lcm-live.connected {
    color: #287344;
    border-color: #bad8c0;
    background: #edf8ef;
}

.lcm-stats {
    margin: 0;
}

.lcm-panel {
    min-width: 0;
    border: 1px solid var(--lcm-line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--lcm-surface);
    box-shadow: 0 3px 9px #49331a03;
}

.lcm-toolbar {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    padding: 20px 22px;
    flex-wrap: wrap;
}

.lcm-toolbar label {
    display: grid;
    gap: 7px;
    min-width: 160px;
    font-size: 12px;
    font-weight: 600;
    color: var(--lcm-muted);
}

.lcm-toolbar .lcm-search {
    flex: 1;
    min-width: 230px;
}

.lcm-toolbar input,
.lcm-toolbar select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #dcd3c7;
    border-radius: 7px;
    background: #fff;
    color: var(--lcm-text);
    font: inherit;
    font-weight: 400;
    color-scheme: light;
}

.lcm-toolbar input::placeholder {
    color: #7a7066;
    opacity: 1;
}

.lcm-toolbar button {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    height: 42px;
    width: 42px;
    padding: 0;
    border: 1px solid #dcd3c7;
    border-radius: 7px;
    background: #fff;
    color: #805c20;
    font-size: 24px;
    cursor: pointer;
}

.lcm-toolbar button:hover {
    background: #fff2d8;
    border-color: #dfbc75;
}

.lcm-page :is(button, input, select, [tabindex]):focus-visible {
    outline: 2px solid #b17a20;
    outline-offset: 3px;
}

.lcm-table-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 22px 16px;
    gap: 15px;
}

.lcm-table-heading h2 {
    font-size: 16px;
    color: var(--lcm-text);
    margin: 0;
}

.lcm-table-heading > span,
.lcm-footer {
    font-size: 12px;
    color: var(--lcm-muted);
}

.lcm-message {
    margin: 0;
    padding: 12px 22px;
    background: #fff5df;
    color: #805c20;
    font-size: 13px;
    border-top: 1px solid #ead7ad;
}

.lcm-message[hidden] {
    display: none;
}

.lcm-table-wrap {
    max-height: 480px;
    max-height: clamp(260px, 52vh, 560px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-color: #bfb3a3 #f7f3ec;
}

.lcm-page table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    white-space: nowrap;
}

.lcm-page th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 11px;
    letter-spacing: 0.4px;
    color: #665c52;
    font-weight: 700;
    background: #f5f1ea;
    box-shadow: inset 0 1px var(--lcm-line);
}

.lcm-page td,
.lcm-page th {
    padding: 13px 18px;
    border-bottom: 1px solid var(--lcm-line);
}

.lcm-page td {
    font-size: 13px;
    color: var(--lcm-text);
}

.lcm-page tbody tr:nth-child(even) {
    background: #fcfaf6;
}

.lcm-page tbody tr:hover {
    background: #fff4df;
}

.lcm-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #5f554b;
}

.lcm-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #62666c;
    flex-shrink: 0;
}

.lcm-dot.online {
    background: #239557;
}

.lcm-dot.in-call {
    background: #307bce;
}

.lcm-dot.ringing {
    background: #d2a01b;
}

.lcm-agent {
    font-weight: 700;
}

.lcm-duration {
    font-variant-numeric: tabular-nums;
    font-family: monospace;
}

.lcm-call-state {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #e2dcd3;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    color: #71665b;
    background: #f5f1ea;
}

.lcm-call-state.ringing {
    color: #805c20;
    border-color: #ead7ad;
    background: #fff5dd;
}

.lcm-call-state.in-call {
    color: #2466a6;
    border-color: #bed5ec;
    background: #eef5fc;
}

.lcm-page .lcm-empty {
    text-align: center;
    padding: 45px;
    color: var(--lcm-muted);
}

.lcm-footer {
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--lcm-line);
    background: var(--lcm-surface);
}

.lcm-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.lcm-legend span {
    display: flex;
    align-items: center;
    gap: 7px;
}

@media (max-width: 720px) {
    .lcm-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .lcm-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
        gap: 16px;
        background-size: auto 460px;
    }

    .lcm-heading h1 {
        font-size: 23px;
    }

    .lcm-stats .lcm-stat {
        padding: 16px;
        gap: 10px;
    }

    .lcm-toolbar {
        padding: 16px;
        gap: 12px;
    }

    .lcm-toolbar label {
        flex: 1;
        min-width: 130px;
    }

    .lcm-toolbar .lcm-search {
        flex-basis: 100%;
        min-width: 0;
    }

    .lcm-live {
        font-size: 10px;
        padding: 8px;
    }

    .lcm-page td,
    .lcm-page th {
        padding: 12px 14px;
    }

    .lcm-table-heading,
    .lcm-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .lcm-legend {
        gap: 12px;
    }
}
