/* SCHOOL CMS PRO ELITE PREMIUM - Dashboard */
:root {
    --cms-primary: #0b3d91;
    --cms-primary-rgb: 11, 61, 145;
    --cms-accent: #f2a900;
    --cms-sidebar-bg: #0a1f44;
    --cms-sidebar-fg: #c7d2e8;
    --cms-sidebar-w: 260px;
    --cms-radius: .85rem;
    --bs-primary: var(--cms-primary);
    --bs-primary-rgb: var(--cms-primary-rgb);
    --bs-link-color: var(--cms-primary);
    --bs-link-color-rgb: var(--cms-primary-rgb);
    --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
[data-bs-theme="dark"] {
    --cms-sidebar-bg: #0b1220;
    --bs-body-bg: #111827;
    --bs-tertiary-bg: #0f172a;
    --bs-link-color: #8fb3ff;
    --bs-link-color-rgb: 143, 179, 255;
}
.btn-primary { --bs-btn-bg: var(--cms-primary); --bs-btn-border-color: var(--cms-primary); --bs-btn-hover-bg: #092f70; --bs-btn-hover-border-color: #092f70; --bs-btn-active-bg: #072659; }
.btn-outline-primary { --bs-btn-color: var(--cms-primary); --bs-btn-border-color: var(--cms-primary); --bs-btn-hover-bg: var(--cms-primary); --bs-btn-hover-border-color: var(--cms-primary); --bs-btn-active-bg: var(--cms-primary); }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: #8fb3ff; --bs-btn-border-color: #8fb3ff; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--cms-primary-rgb), .5); box-shadow: 0 0 0 .2rem rgba(var(--cms-primary-rgb), .15); }
.form-check-input:checked { background-color: var(--cms-primary); border-color: var(--cms-primary); }
.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: .5rem; }

/* Layout */
.admin-body { background: var(--bs-tertiary-bg); min-height: 100vh; }
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar { width: var(--cms-sidebar-w); background: var(--cms-sidebar-bg); color: var(--cms-sidebar-fg); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1040; transition: transform .25s ease; }
.admin-main { flex: 1; margin-left: var(--cms-sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: .7rem; background: linear-gradient(135deg, var(--cms-accent), #ffcf4d); color: #0a1f44; font-size: 1.25rem; flex-shrink: 0; }
.brand-mark.lg { width: 56px; height: 56px; font-size: 1.75rem; border-radius: 1rem; }
.brand-text strong { display: block; color: #fff; font-size: .95rem; line-height: 1.2; }
.brand-text small { color: var(--cms-accent); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-nav { padding: .75rem; overflow-y: auto; flex: 1; }
.sidebar-nav .nav-heading { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(199,210,232,.55); padding: 1rem .75rem .4rem; }
.admin-sidebar .nav-link { display: flex; align-items: center; gap: .75rem; color: var(--cms-sidebar-fg); padding: .6rem .75rem; border-radius: .6rem; font-size: .92rem; transition: background .15s, color .15s; }
.admin-sidebar .nav-link i { font-size: 1.05rem; width: 1.25rem; text-align: center; }
.admin-sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-sidebar .nav-link.active { background: linear-gradient(90deg, rgba(242,169,0,.18), rgba(242,169,0,.04)); color: #fff; box-shadow: inset 3px 0 0 var(--cms-accent); }
.sidebar-footer { padding: .75rem; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-backdrop { display: none; }

.admin-topbar { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: 1rem; padding: .75rem 1.5rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); }
.topbar-title { font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.btn-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: .6rem; color: var(--bs-body-color); }
.btn-icon:hover { background: var(--bs-tertiary-bg); }
.user-chip { display: flex; align-items: center; gap: .5rem; border-radius: 2rem; padding: .25rem .75rem .25rem .25rem; border: 1px solid var(--bs-border-color); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(var(--cms-primary-rgb), .12); color: var(--cms-primary); font-weight: 700; flex-shrink: 0; }
[data-bs-theme="dark"] .avatar { color: #8fb3ff; }
.admin-content { padding: 1.5rem; flex: 1; }
.admin-content:focus { outline: none; }
.admin-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: 1rem 1.5rem; font-size: .82rem; border-top: 1px solid var(--bs-border-color); background: var(--bs-body-bg); }

@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; }
    body.sidebar-open .admin-sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1035; }
    .admin-content { padding: 1rem; }
    .admin-topbar { padding: .6rem 1rem; }
}

/* Components */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; margin: 0; }
.page-subtitle { color: var(--bs-secondary-color); margin: .25rem 0 0; }
.card { border: 1px solid var(--bs-border-color-translucent); border-radius: var(--cms-radius); box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06); }
.card-header { background: transparent; border-bottom: 1px solid var(--bs-border-color-translucent); padding: 1rem 1.25rem; }
.card-title { font-size: 1rem; font-weight: 600; margin: 0; }
.card-footer { background: transparent; }
.stat-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--cms-radius); padding: 1.1rem; height: 100%; box-shadow: 0 1px 3px rgba(16,24,40,.05); transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,24,40,.08); }
.stat-icon { display: inline-flex; width: 40px; height: 40px; border-radius: .7rem; align-items: center; justify-content: center; font-size: 1.15rem; margin-bottom: .75rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--bs-secondary-color); font-size: .82rem; }
.legend-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; }
.bar-chart { display: flex; align-items: flex-end; gap: .4rem; height: 220px; padding-top: 1.25rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar { width: 100%; max-width: 34px; height: 0; min-height: 3px; border-radius: .4rem .4rem 0 0; background: linear-gradient(180deg, #3b74d6, var(--cms-primary)); transition: height .6s ease; }
.bar-value { font-size: .7rem; color: var(--bs-secondary-color); margin-bottom: .2rem; }
.bar-label { font-size: .68rem; color: var(--bs-secondary-color); margin-top: .35rem; white-space: nowrap; }
.activity-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bs-tertiary-bg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.empty-state { text-align: center; color: var(--bs-secondary-color); padding: 2.5rem 1rem !important; }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .6; }
.empty-state p { margin: 0; }
.table > :not(caption) > * > * { padding: .75rem 1rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); font-weight: 600; background: var(--bs-tertiary-bg); }
.text-truncate-cell { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-option { display: flex; align-items: flex-start; gap: .6rem; border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .65rem .8rem; cursor: pointer; width: 100%; }
.role-option:has(input:checked) { border-color: var(--cms-primary); background: rgba(var(--cms-primary-rgb), .06); }
.permission-table th { font-weight: 600; }
.sticky-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--cms-radius); box-shadow: 0 -4px 16px rgba(16,24,40,.06); }
.settings-nav .list-group-item.active, .list-group-item-action.active { background: var(--cms-primary); border-color: var(--cms-primary); }
.password-meter { height: 4px; border-radius: 2px; background: var(--bs-border-color); margin-top: .4rem; overflow: hidden; }
.password-meter > span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.btn[disabled].is-loading { position: relative; }

/* Auth */
.auth-body { min-height: 100vh; background: var(--bs-tertiary-bg); }
.auth-shell { display: flex; min-height: 100vh; }
.auth-aside { flex: 1; flex-direction: column; justify-content: space-between; padding: 3rem; color: #fff; background: radial-gradient(circle at 20% 20%, rgba(242,169,0,.25), transparent 40%), linear-gradient(135deg, #0a1f44 0%, var(--cms-primary) 100%); }
.auth-aside h1 { font-size: 2.25rem; font-weight: 800; margin: 1.5rem 0 .75rem; max-width: 30rem; }
.auth-aside p { font-size: 1.1rem; opacity: .85; max-width: 28rem; }
.auth-aside small { opacity: .7; }
.auth-panel { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 420px; background: var(--bs-body-bg); border-radius: 1.1rem; padding: 2.25rem; box-shadow: 0 20px 50px rgba(16,24,40,.08); }

/* Error & install */
.error-body, .install-body { min-height: 100vh; background: var(--bs-tertiary-bg); }
.error-body { display: flex; align-items: center; justify-content: center; padding: 1rem; }
.error-card { max-width: 560px; width: 100%; background: var(--bs-body-bg); padding: 3rem 2rem; border-radius: 1.25rem; box-shadow: 0 20px 50px rgba(16,24,40,.08); }
.error-icon { font-size: 3rem; color: var(--cms-primary); }
.error-code { font-size: 4rem; font-weight: 800; line-height: 1; margin: .5rem 0; background: linear-gradient(135deg, var(--cms-primary), var(--cms-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-debug { max-height: 320px; overflow: auto; background: #111827; color: #f9fafb; padding: 1rem; border-radius: .5rem; font-size: .75rem; }
.install-card { max-width: 760px; }
.install-steps { display: flex; justify-content: center; gap: 1.5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; flex-wrap: wrap; }
.install-steps li { display: flex; align-items: center; gap: .5rem; color: var(--bs-secondary-color); font-weight: 500; }
.install-steps li span { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; border: 2px solid var(--bs-border-color); font-size: .85rem; }
.install-steps li.current { color: var(--cms-primary); }
.install-steps li.current span { border-color: var(--cms-primary); background: var(--cms-primary); color: #fff; }
.install-steps li.done span { border-color: #198754; background: #198754; color: #fff; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ===================== Phase 2: Konten ===================== */
.brand-logo { background: #fff; padding: 4px; overflow: hidden; }
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.min-w-0 { min-width: 0; }
.status-pills .nav-link { border-radius: 2rem; padding: .35rem .9rem; font-size: .875rem; color: var(--bs-body-color); }
.status-pills .nav-link .badge { background: rgba(var(--bs-body-color-rgb), .08); color: inherit; font-weight: 500; }
.status-pills .nav-link.active { background: var(--cms-primary); color: #fff; }
.status-pills .nav-link.active .badge { background: rgba(255,255,255,.2); }
.list-thumb { width: 56px; height: 40px; border-radius: .5rem; object-fit: cover; flex-shrink: 0; background: var(--bs-tertiary-bg); }
.list-thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--bs-secondary-color); font-size: 1.1rem; }
.tree-indent { display: inline-block; width: 0; }
.tree-indent[data-depth="1"] { width: 1.25rem; } .tree-indent[data-depth="2"] { width: 2.5rem; } .tree-indent[data-depth="3"] { width: 3.75rem; }
.tree-indent[data-depth="4"] { width: 5rem; } .tree-indent[data-depth="5"] { width: 6.25rem; }
.detail-list dt { font-weight: 500; color: var(--bs-secondary-color); }
.detail-list dd { margin-bottom: .35rem; }
.char-counter { font-size: .75rem; color: var(--bs-secondary-color); text-align: right; margin-top: .2rem; }
.char-counter.is-over { color: var(--bs-warning-text-emphasis); font-weight: 600; }
.slug-prefix { max-width: 40%; }

/* Editor */
.editor-wrapper { border-radius: .5rem; background: var(--bs-body-bg); }
.editor-wrapper .ql-toolbar.ql-snow { border-color: var(--bs-border-color); border-radius: .5rem .5rem 0 0; background: var(--bs-tertiary-bg); }
.editor-wrapper .ql-container.ql-snow { border-color: var(--bs-border-color); border-radius: 0 0 .5rem .5rem; font-family: inherit; font-size: 1rem; }
.editor-wrapper .ql-editor { min-height: 360px; max-height: 70vh; overflow-y: auto; line-height: 1.7; }
.editor-wrapper .ql-editor img { max-width: 100%; height: auto; }
.editor-wrapper.is-invalid .ql-toolbar, .editor-wrapper.is-invalid .ql-container { border-color: var(--bs-form-invalid-border-color); }
[data-bs-theme="dark"] .ql-snow .ql-stroke { stroke: #cbd5e1; }
[data-bs-theme="dark"] .ql-snow .ql-fill { fill: #cbd5e1; }
[data-bs-theme="dark"] .ql-snow .ql-picker { color: #cbd5e1; }
[data-bs-theme="dark"] .ql-snow .ql-picker-options { background: #1f2937; }
[data-bs-theme="dark"] .ql-editor.ql-blank::before { color: #94a3b8; }

/* Konten (pratinjau) */
.rich-content { line-height: 1.8; font-size: 1.05rem; overflow-wrap: anywhere; }
.rich-content img { max-width: 100%; height: auto; border-radius: .5rem; }
.rich-content blockquote { border-left: 4px solid var(--cms-accent); padding: .5rem 1rem; margin: 1rem 0; background: var(--bs-tertiary-bg); border-radius: 0 .5rem .5rem 0; }
.rich-content iframe.ql-video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: .5rem; }
.rich-content .ql-align-center { text-align: center; } .rich-content .ql-align-right { text-align: right; } .rich-content .ql-align-justify { text-align: justify; }
.rich-content .ql-indent-1 { padding-left: 2em; } .rich-content .ql-indent-2 { padding-left: 4em; } .rich-content .ql-indent-3 { padding-left: 6em; }
.rich-content pre, .rich-content .ql-code-block-container { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: .5rem; overflow-x: auto; font-family: SFMono-Regular, Consolas, monospace; font-size: .9rem; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.rich-content th, .rich-content td { border: 1px solid var(--bs-border-color); padding: .5rem; }
.content-preview .card-img-top { max-height: 420px; object-fit: cover; }

/* SEO preview */
.seo-preview { border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: .85rem 1rem; background: var(--bs-body-bg); font-family: Arial, sans-serif; }
.seo-preview-title { color: #1a0dab; font-size: 1.1rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-bs-theme="dark"] .seo-preview-title { color: #8ab4f8; }
.seo-preview-url { color: #188038; font-size: .8rem; margin: .15rem 0; word-break: break-all; }
.seo-preview-desc { color: var(--bs-secondary-color); font-size: .85rem; line-height: 1.45; }

/* Tag */
.tag-suggestions { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .35rem; }
.tag-chip { font-size: .78rem; padding: .15rem .55rem; border-radius: 2rem; }

/* Media */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: 2rem 1rem; border: 2px dashed var(--bs-border-color); border-radius: var(--cms-radius); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; margin: 0; }
.dropzone > i { font-size: 2.25rem; color: var(--cms-primary); }
.dropzone:hover, .dropzone.is-dragover, .dropzone:focus-within { border-color: var(--cms-primary); background: rgba(var(--cms-primary-rgb), .04); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .85rem; }
.media-tile { position: relative; border: 1px solid var(--bs-border-color); border-radius: .75rem; overflow: hidden; background: var(--bs-body-bg); transition: box-shadow .15s, transform .15s; }
.media-tile:hover { box-shadow: 0 .5rem 1.25rem rgba(15, 23, 42, .1); transform: translateY(-2px); }
.media-check { position: absolute; top: .5rem; left: .5rem; z-index: 2; width: 1.15rem; height: 1.15rem; box-shadow: 0 0 0 2px #fff; }
.media-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: repeating-conic-gradient(var(--bs-tertiary-bg) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-icon { display: flex; flex-direction: column; align-items: center; color: var(--bs-secondary-color); font-size: 2.25rem; text-decoration: none; }
.media-icon small { font-size: .7rem; font-weight: 700; letter-spacing: .05em; }
.media-meta { display: flex; flex-direction: column; padding: .5rem .65rem; font-size: .82rem; min-width: 0; }
.media-preview { text-align: center; background: repeating-conic-gradient(var(--bs-tertiary-bg) 0 25%, transparent 0 50%) 0 0 / 20px 20px; border-radius: var(--cms-radius); }
.media-preview img { max-height: 70vh; }
.media-field-preview { display: flex; align-items: center; justify-content: center; min-height: 140px; border: 2px dashed var(--bs-border-color); border-radius: .75rem; text-align: center; overflow: hidden; background: var(--bs-tertiary-bg); }
.media-field-preview.has-media { border-style: solid; }
.media-field-preview img { max-width: 100%; max-height: 220px; object-fit: contain; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; min-height: 120px; }
.picker-grid[aria-busy="true"] { opacity: .5; }
.picker-item { display: flex; flex-direction: column; padding: 0; border: 2px solid var(--bs-border-color); border-radius: .65rem; overflow: hidden; background: var(--bs-body-bg); text-align: left; }
.picker-item:hover { border-color: rgba(var(--cms-primary-rgb), .5); }
.picker-item.is-selected { border-color: var(--cms-primary); box-shadow: 0 0 0 .2rem rgba(var(--cms-primary-rgb), .25); }
.picker-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.picker-icon { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 4 / 3; font-size: 2rem; color: var(--bs-secondary-color); }
.picker-icon small { font-size: .7rem; font-weight: 700; }
.picker-caption { display: block; padding: .35rem .5rem; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Menu drag & drop */
.menu-tree-list { list-style: none; padding-left: 1.75rem; margin: 0; min-height: .5rem; }
.menu-tree-root { padding-left: 0; }
.menu-node { margin: .4rem 0; }
.menu-node-row { display: flex; align-items: center; gap: .65rem; padding: .55rem .75rem; border: 1px solid var(--bs-border-color); border-radius: .65rem; background: var(--bs-body-bg); }
.menu-node-row.is-inactive { opacity: .6; }
.menu-handle { cursor: grab; color: var(--bs-secondary-color); font-size: 1.15rem; padding: .1rem; touch-action: none; }
.menu-handle:active { cursor: grabbing; }
.menu-node-main { flex: 1; min-width: 0; }
.menu-node-badges { display: flex; gap: .35rem; align-items: center; }
.menu-node-actions { display: flex; gap: .25rem; }
.menu-node-edit { margin: .35rem 0 .5rem 2rem; padding: .85rem; border: 1px dashed var(--bs-border-color); border-radius: .65rem; background: var(--bs-tertiary-bg); }
.menu-ghost > .menu-node-row { background: rgba(var(--cms-primary-rgb), .08); border-style: dashed; border-color: var(--cms-primary); }
@media (max-width: 575.98px) { .menu-tree-list { padding-left: 1rem; } .menu-node-badges { display: none; } }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1rem .5rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; text-decoration: none; color: var(--bs-body-color); text-align: center; transition: all .15s; font-size: .875rem; }
.quick-action i { font-size: 1.5rem; color: var(--cms-primary); }
.quick-action:hover { border-color: var(--cms-primary); background: rgba(var(--cms-primary-rgb), .05); transform: translateY(-2px); }
[data-bs-theme="dark"] .quick-action i { color: #8fb3ff; }

/* ---------------------------------------------------------------- Phase 3: data sekolah */
.avatar-lg { width: 42px; height: 42px; font-size: 1rem; }
.avatar-img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--bs-border-color); }
.table-thumb { width: 56px; height: 42px; border-radius: .5rem; object-fit: cover; flex-shrink: 0; border: 1px solid var(--bs-border-color); }
.table-thumb-empty { display: inline-flex; align-items: center; justify-content: center; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); font-size: 1.2rem; }
.section-icon { display: inline-flex; width: 38px; height: 38px; border-radius: .6rem; align-items: center; justify-content: center; background: rgba(var(--cms-primary-rgb), .1); color: var(--cms-primary); font-size: 1.1rem; flex-shrink: 0; }
[data-bs-theme="dark"] .section-icon { color: #8fb3ff; }
.sortable-handle { cursor: grab; color: var(--bs-secondary-color); font-size: 1.15rem; touch-action: none; }
.sortable-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: .4; background: rgba(var(--cms-primary-rgb), .08); }
.media-field-preview.is-file { min-height: 90px; }
.media-file-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .75rem; max-width: 100%; }
.media-file-chip i { font-size: 1.6rem; color: var(--cms-primary); }
.media-file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.media-file-chip small { color: var(--bs-secondary-color); }
.date-chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 54px; padding: .3rem .4rem; border-radius: .6rem; background: rgba(var(--cms-primary-rgb), .08); line-height: 1.1; }
.date-chip span { font-size: 1.25rem; font-weight: 700; color: var(--cms-primary); }
.date-chip small { font-size: .7rem; color: var(--bs-secondary-color); text-transform: uppercase; }
[data-bs-theme="dark"] .date-chip span { color: #8fb3ff; }
.album-card { border: 1px solid var(--bs-border-color); border-radius: var(--cms-radius); overflow: hidden; background: var(--bs-body-bg); display: flex; flex-direction: column; }
.album-cover { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--bs-tertiary-bg); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover > span:first-child { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: var(--bs-secondary-color); }
.album-count { position: absolute; right: .5rem; bottom: .5rem; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; padding: .15rem .5rem; border-radius: 1rem; }
.album-body { padding: .75rem; display: flex; flex-direction: column; flex: 1; }
.album-body .text-end { margin-top: auto !important; padding-top: .5rem; }
.gallery-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; padding: 1rem; }
.gallery-item { border: 1px solid var(--bs-border-color); border-radius: .75rem; overflow: hidden; background: var(--bs-body-bg); }
.gallery-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--bs-tertiary-bg); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb .sortable-handle { position: absolute; left: .35rem; top: .35rem; background: rgba(255,255,255,.9); color: #333; border-radius: .4rem; padding: 0 .2rem; z-index: 1; }
.gallery-thumb-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--bs-secondary-color); }
.gallery-cover-badge { position: absolute; right: .35rem; top: .35rem; }
.gallery-meta { padding: .5rem; }
.school-strip { display: flex; flex-wrap: wrap; gap: .5rem; }
.school-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border: 1px solid var(--bs-border-color); border-radius: 2rem; background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; font-size: .85rem; transition: border-color .15s, transform .15s; }
.school-chip i { color: var(--cms-primary); }
.school-chip span { color: var(--bs-secondary-color); }
.school-chip:hover { border-color: var(--cms-primary); transform: translateY(-1px); }
.school-chip-warn { border-color: var(--bs-warning-border-subtle); background: var(--bs-warning-bg-subtle); }
[data-bs-theme="dark"] .school-chip i { color: #8fb3ff; }
fieldset[disabled] .ql-toolbar { display: none; }

/* ---------------------------------------------------------------- Phase 4: fitur lanjutan */
.kpi .stat-label, .kpi .stat-value { display: block; }
.stats-chart { display: flex; align-items: flex-end; gap: 2px; height: 200px; border-bottom: 1px solid var(--bs-border-color); }
.stats-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.stats-bar-fill { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #3b74d6, var(--cms-primary)); }
.stats-bar:hover .stats-bar-fill { background: var(--bs-warning); }
.rank-bar { height: 4px; background: var(--bs-tertiary-bg); border-radius: 2px; margin-top: .35rem; overflow: hidden; }
.rank-bar span { display: block; height: 100%; background: var(--cms-primary); border-radius: 2px; }
.stats-bar-fill.hp-0 { height: 0%; } .rank-bar .wp-0 { width: 0%; }
.stats-bar-fill.hp-5 { height: 5%; } .rank-bar .wp-5 { width: 5%; }
.stats-bar-fill.hp-10 { height: 10%; } .rank-bar .wp-10 { width: 10%; }
.stats-bar-fill.hp-15 { height: 15%; } .rank-bar .wp-15 { width: 15%; }
.stats-bar-fill.hp-20 { height: 20%; } .rank-bar .wp-20 { width: 20%; }
.stats-bar-fill.hp-25 { height: 25%; } .rank-bar .wp-25 { width: 25%; }
.stats-bar-fill.hp-30 { height: 30%; } .rank-bar .wp-30 { width: 30%; }
.stats-bar-fill.hp-35 { height: 35%; } .rank-bar .wp-35 { width: 35%; }
.stats-bar-fill.hp-40 { height: 40%; } .rank-bar .wp-40 { width: 40%; }
.stats-bar-fill.hp-45 { height: 45%; } .rank-bar .wp-45 { width: 45%; }
.stats-bar-fill.hp-50 { height: 50%; } .rank-bar .wp-50 { width: 50%; }
.stats-bar-fill.hp-55 { height: 55%; } .rank-bar .wp-55 { width: 55%; }
.stats-bar-fill.hp-60 { height: 60%; } .rank-bar .wp-60 { width: 60%; }
.stats-bar-fill.hp-65 { height: 65%; } .rank-bar .wp-65 { width: 65%; }
.stats-bar-fill.hp-70 { height: 70%; } .rank-bar .wp-70 { width: 70%; }
.stats-bar-fill.hp-75 { height: 75%; } .rank-bar .wp-75 { width: 75%; }
.stats-bar-fill.hp-80 { height: 80%; } .rank-bar .wp-80 { width: 80%; }
.stats-bar-fill.hp-85 { height: 85%; } .rank-bar .wp-85 { width: 85%; }
.stats-bar-fill.hp-90 { height: 90%; } .rank-bar .wp-90 { width: 90%; }
.stats-bar-fill.hp-95 { height: 95%; } .rank-bar .wp-95 { width: 95%; }
.stats-bar-fill.hp-100 { height: 100%; } .rank-bar .wp-100 { width: 100%; }
.banner-thumb { width: 72px; height: 40px; border-radius: .4rem; overflow: hidden; background: var(--bs-tertiary-bg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.banner-thumb img { width: 100%; height: 100%; object-fit: cover; }
.message-row.is-unread { border-left: 3px solid var(--cms-primary); background: rgba(var(--bs-primary-rgb), .04); }
.message-row.is-unread strong { font-weight: 700; }
.message-body, .comment-text { white-space: normal; overflow-wrap: anywhere; }
.detail-table th { width: 38%; }
.notif-bell { position: relative; }
.notif-bell .notif-count { position: absolute; top: 2px; right: 0; font-size: .62rem; padding: .2em .45em; }
.notif-menu { width: 340px; max-width: calc(100vw - 1.5rem); }
.notif-menu .dropdown-item { white-space: normal; }
.notif-item.is-unread { background: rgba(var(--bs-primary-rgb), .06); }
.backup-warning { border-left: 4px solid var(--bs-danger); }

/* Elemen absolut (mis. .visually-hidden) di dalam tabel tidak boleh melebarkan halaman di ponsel. */
.table-responsive { position: relative; }
