/* Style halaman dialplan; urutan selector dipertahankan untuk menjaga cascade. */
.dp-page {
    --dp-border: #e1e7ee;
    --dp-muted: #69788c;
    color: #22334b;
    max-width: 1500px;
    margin: auto;
    padding: 24px;
    display: grid;
    gap: 20px;
}

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

.dp-heading h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: -0.8px;
}

.dp-heading p {
    margin: 9px 0 0;
    color: #766554;
    font-size: 12px;
}

.dp-sidebar p {
    color: var(--dp-muted);
    margin: 0;
    font-size: 14px;
}

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

.dp-page button {
    border: 1px solid var(--dp-border);
    border-radius: 8px;
    background: #fff;
    padding: 10px 14px;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
}

.dp-page button:hover:not(:disabled) {
    background: #f0f5f8;
}

.dp-page button:disabled {
    opacity: 0.5;
    cursor: default;
}

.dp-page .dp-primary {
    background: #226d66;
    color: #fff;
    border-color: #226d66;
}

.dp-page .dp-primary:hover:not(:disabled) {
    background: #195a54;
}

.dp-heading .dp-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid #d98b19;
    border-radius: 7px;
    background: #ffbd32;
    color: #291c0b;
    box-shadow: 0 3px 8px #8b5a1517;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.dp-heading .dp-primary:hover:not(:disabled) {
    background: #ffca57;
}

.dp-notice {
    background: #eaf4f1;
    border: 1px solid #d3e7de;
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 13px;
    color: #37675b;
}

.dp-workspace {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    border: 1px solid var(--dp-border);
    border-radius: 14px;
    background: white;
    overflow: hidden;
}

.dp-sidebar {
    padding: 20px;
    background: #f8fafc;
    border-right: 1px solid var(--dp-border);
}

.dp-sidebar h2,
.dp-toolbar h2 {
    font-size: 16px;
    margin: 0 0 7px;
}

.dp-sidebar p {
    font-size: 12px;
    line-height: 1.6;
}

.dp-sidebar [data-dp-files] {
    display: grid;
    gap: 7px;
    margin: 20px 0;
}

.dp-sidebar [data-dp-file] {
    display: flex;
    gap: 10px;
    text-align: left;
    overflow-wrap: anywhere;
}

.dp-sidebar [aria-pressed="true"] {
    background: #e4f0ed;
    border-color: #b8d5ce;
    color: #226d66;
    font-weight: 600;
}

.dp-panel {
    min-width: 0;
}

.dp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
}

.dp-toolbar [role="status"] {
    color: var(--dp-muted);
    font-size: 12px;
}

.dp-toolbar label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    color: var(--dp-muted);
}

.dp-toolbar select {
    min-width: 230px;
    max-width: 100%;
    padding: 9px;
    border: 1px solid var(--dp-border);
    border-radius: 7px;
    background: white;
    color: #22334b;
}

.dp-editor-head {
    display: flex;
    justify-content: space-between;
    padding: 11px 18px;
    background: #f1f5f9;
    border-block: 1px solid var(--dp-border);
    font:
        12px ui-monospace,
        monospace;
    color: #61718a;
}

.dp-editor-wrap {
    display: flex;
    height: 480px;
    background: #152334;
}

.dp-editor-wrap pre,
.dp-editor-wrap textarea {
    font:
        13px/24px ui-monospace,
        SFMono-Regular,
        Consolas,
        monospace;
    tab-size: 4;
    margin: 0;
    padding: 16px 12px;
    border: 0;
}

.dp-editor-wrap pre {
    width: 65px;
    flex: none;
    box-sizing: border-box;
    text-align: right;
    color: #7588a0;
    background: #12202f;
    overflow: hidden;
    user-select: none;
}

.dp-editor-wrap textarea {
    width: 100%;
    min-width: 0;
    resize: vertical;
    outline: none;
    background: transparent;
    color: #dfebf5;
    white-space: pre;
    overflow: auto;
}

.dp-editor-wrap:focus-within {
    outline: 2px solid #4c9b90;
    outline-offset: -2px;
}

.dp-message {
    margin: 16px;
    padding: 12px;
    background: #edf7f0;
    color: #285b3d;
    border-radius: 8px;
    font-size: 13px;
    white-space: pre-wrap;
}

.dp-message[data-error="true"] {
    background: #fff0ed;
    color: #9c3b30;
}

.dp-footer {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.dp-footer > span {
    font-size: 12px;
    color: var(--dp-muted);
    max-width: 280px;
}

.dp-footer > div {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dp-preview {
    width: min(1000px, 90vw);
    max-height: 85vh;
    padding: 22px;
    border: 1px solid var(--dp-border);
    border-radius: 12px;
}

.dp-preview::backdrop {
    background: #13223599;
}

.dp-preview header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dp-preview h2 {
    font-size: 18px;
}

.dp-preview p {
    white-space: pre-wrap;
    font-size: 13px;
}

.dp-preview pre {
    padding: 20px;
    background: #152334;
    color: #dfebf5;
    overflow: auto;
    font:
        13px/24px ui-monospace,
        monospace;
}

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

@media (max-width: 850px) {
    .dp-page {
        padding: 12px;
    }

    .dp-workspace {
        grid-template-columns: 1fr;
    }

    .dp-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--dp-border);
    }

    .dp-sidebar [data-dp-files] {
        display: flex;
        flex-wrap: wrap;
        margin: 12px 0;
    }

    .dp-toolbar,
    .dp-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .dp-heading {
        align-items: flex-start;
    }

    .dp-editor-wrap {
        height: 400px;
    }

    .dp-toolbar select {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 680px) {
    .dp-heading {
        flex-direction: column;
        padding: 22px;
    }

    .dp-heading .dp-primary {
        width: 100%;
    }
}
