/* Hedomi Courses v0.3.1 — modern admin editor */
.admin-editor-hero {
    padding: 2rem 0 1.75rem;
    border-bottom: 1px solid var(--platform-border, var(--line));
    background: linear-gradient(180deg, var(--platform-surface, #fff), rgba(247,248,243,.72));
}
.admin-editor-hero-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}
.admin-editor-hero h1 {
    margin: .25rem 0 .35rem;
    font-size: clamp(2rem, 4vw, 3rem);
}
.admin-editor-hero p { margin: 0; color: var(--muted); }
.admin-editor-current-title { max-width: 680px; font-size: 1rem; font-weight: 700; color: var(--ink-soft) !important; }
.admin-back-link {
    margin-bottom: .75rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 750;
}
.admin-back-link:hover { color: var(--teal); }
.modern-admin-editor { padding-top: 2rem; }

.page-builder-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 1.5rem;
}
.page-builder-main,
.page-builder-sidebar { min-width: 0; }
.page-builder-sidebar {
    position: sticky;
    top: 142px;
    display: grid;
    gap: 1rem;
}
.page-builder-card {
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--platform-border, var(--line));
    border-radius: 12px;
    background: var(--platform-surface, #fff);
    box-shadow: 0 8px 24px rgba(24, 48, 41, .06);
}
.editor-card-head {
    padding: 1.3rem 1.4rem 1.15rem;
    border-bottom: 1px solid var(--platform-border, var(--line));
    background: rgba(247, 248, 243, .55);
}
.editor-card-head.compact { padding-bottom: 1rem; }
.editor-card-head .eyebrow { margin-bottom: .3rem; }
.editor-card-head h2 { margin: 0; font-size: 1.15rem; }
.editor-card-head p { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; }
.page-builder-fields { padding: 1.45rem; display: grid; gap: 1.25rem; }
.page-title-field input { min-height: 54px; font-size: 1.12rem; font-weight: 750; }
.page-content-field { gap: .55rem; }
.page-content-editor {
    min-height: 470px !important;
    padding: 1rem 1.05rem !important;
    border-radius: 8px !important;
    background: #fff !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .94rem;
    line-height: 1.7 !important;
}
.page-sidebar-fields { padding: 1.15rem 1.25rem 1.3rem; display: grid; gap: 1rem; }
.page-builder-sidebar .field input,
.page-builder-sidebar .field select { border-radius: 7px; }
.slug-input-wrap {
    min-height: 47px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--white);
    display: flex;
    align-items: center;
    overflow: hidden;
}
.slug-input-wrap:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,132,61,.12); }
.slug-input-wrap > span { padding-left: .8rem; color: var(--muted); font-size: .84rem; font-weight: 650; white-space: nowrap; }
.slug-input-wrap input { min-width: 0; min-height: 45px !important; border: 0 !important; box-shadow: none !important; padding-left: .25rem !important; }

.admin-toggle-row {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--platform-border, var(--line));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
}
.page-builder-card .admin-toggle-row:last-child { border-bottom: 0; }
.admin-toggle-copy { min-width: 0; display: grid; gap: .15rem; }
.admin-toggle-copy strong { color: var(--ink); font-size: .92rem; }
.admin-toggle-copy small { color: var(--muted); font-size: .78rem; line-height: 1.4; font-weight: 500; }
.admin-switch { position: relative; width: 44px; height: 24px; flex: 0 0 44px; }
.admin-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.admin-switch > span {
    position: absolute;
    inset: 0;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #e8ece9;
    transition: .18s ease;
}
.admin-switch > span::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 2px;
    left: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    transition: .18s ease;
}
.admin-switch input:checked + span { border-color: var(--teal); background: var(--teal); }
.admin-switch input:checked + span::after { transform: translateX(20px); }
.admin-switch input:focus-visible + span { outline: 3px solid rgba(0,132,61,.18); outline-offset: 2px; }

.modern-danger-zone { margin-top: 1.5rem; border-radius: 10px; }
.modern-danger-zone form { margin: 0; }

@media (max-width: 980px) {
    .page-builder-grid { grid-template-columns: 1fr; }
    .page-builder-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .admin-editor-hero-inner { align-items: stretch; flex-direction: column; }
    .admin-editor-hero .header-actions { display: grid; grid-template-columns: 1fr; }
    .page-builder-sidebar { grid-template-columns: 1fr; }
    .page-content-editor { min-height: 340px !important; }
}
