.editor-toolbar {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.editor-back-btn,
.editor-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.1rem;
    border-radius: 999px;
    border: none;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    transition: transform .15s ease, background .15s ease;
    cursor: pointer;
}

.editor-back-btn {
    background: rgba(15, 27, 25, 0.85);
    color: #fff;
}

.editor-back-btn:hover {
    background: #16b597;
    color: #fff;
    transform: translateY(-2px);
}

.editor-generate-btn {
    background: #16b597;
    color: #fff;
}

.editor-generate-btn:hover {
    background: #0f9b6b;
    transform: translateY(-2px);
}

.editor-back-btn svg,
.editor-generate-btn svg {
    width: 16px;
    height: 16px;
}

.editor-notice {
    position: fixed;
    top: 66px;
    left: 16px;
    z-index: 100000;
    max-width: 360px;
    background: #fff;
    color: #1f2937;
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: .82rem;
    padding: .65rem 1rem;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #16b597;
}

/* ---------- editor konten (ikon pensil + modal) ---------- */
.cms-editable:hover {
    outline: 2px dashed #16b597;
    outline-offset: 3px;
}

.cms-pencil {
    position: fixed;
    z-index: 100002;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #16b597;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform .12s ease, background .12s ease;
}

.cms-pencil[hidden] { display: none; }

.cms-pencil:hover {
    background: #0f9b6b;
    transform: scale(1.1);
}

.cms-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100003;
    background: rgba(15, 27, 25, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.cms-modal-backdrop[hidden] { display: none; }

.cms-modal {
    width: 100%;
    max-width: 520px;
    background: #fff;
    color: #1f2937;
    border-radius: 14px;
    padding: 1.1rem 1.25rem 1.25rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.cms-modal-head {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    margin-bottom: .75rem;
}

.cms-modal-head strong { font-size: 1rem; }

.cms-modal-label {
    font-size: .78rem;
    color: #6b7280;
    word-break: break-all;
}

.cms-modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: .6rem .75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    font-size: .92rem;
    line-height: 1.45;
    color: #1f2937;
    resize: vertical;
}

.cms-modal-input:focus {
    outline: none;
    border-color: #16b597;
    box-shadow: 0 0 0 3px rgba(22, 181, 151, 0.2);
}

.cms-modal-error {
    margin-top: .6rem;
    padding: .5rem .7rem;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: .82rem;
}

.cms-modal-error[hidden] { display: none; }

.cms-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: .9rem;
}

.cms-btn {
    border: none;
    border-radius: 999px;
    padding: .5rem 1.1rem;
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}

.cms-btn:disabled { opacity: .6; cursor: default; }

.cms-btn-ghost { background: #f3f4f6; color: #374151; }
.cms-btn-ghost:hover { background: #e5e7eb; }

.cms-btn-primary { background: #16b597; color: #fff; }
.cms-btn-primary:hover:not(:disabled) { background: #0f9b6b; }

.cms-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 100004;
    background: #1f2937;
    color: #fff;
    padding: .6rem 1rem;
    border-radius: 10px;
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: .85rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: opacity .4s ease;
}

.cms-toast-out { opacity: 0; }
