/* Editor Word, Kamus Tautan, mode banner, dan komponen CMS. */
.admin-mode{--sm-blue:#245bff;--sm-blue-2:#1b47e0;--sm-ink:#111a36;--sm-muted:#5f6e91;--sm-bg:#eef2fb;--sm-card:#fff;--sm-line:#e7edfa;--sm-soft:#edf3ff;--sm-indigo:linear-gradient(120deg,#16246a,#2b2fa3 55%,#5a2bcb);--green:#245bff;--green-dark:#1b47e0;--green-soft:#edf3ff;--ink:#111a36;--muted:#5f6e91;--line:#e7edfa;background:var(--sm-bg);color:var(--sm-ink)}

.admin-mode .admin-page-header h1{font-size:26px;letter-spacing:-.6px;color:var(--sm-ink)}
.admin-mode .admin-page-header p{font-size:13.5px;color:var(--sm-muted)}
.admin-mode .admin-page-header .btn,.admin-mode .btn-primary{border-radius:14px}
.admin-mode .btn-primary{background:linear-gradient(135deg,#3f6bff,#245bff 55%,#1b47e0);box-shadow:0 8px 18px #245bff33;border-color:transparent}
.admin-mode .admin-card{border-radius:20px;border:1px solid var(--sm-line);box-shadow:0 1px 2px #1b2b5c0d,0 10px 26px #1b2b5c08;background:#fff}
.admin-mode .admin-card-header h2{font-size:15.5px}
.admin-mode .data-table th{font-size:11px}
.admin-mode .data-table td{font-size:13px}
.admin-mode .table-title{font-size:13.5px}
.admin-mode .table-subtitle{font-size:11.5px}
.admin-mode .pill{font-size:11px}
.admin-mode .field>span,.admin-mode .field>label{font-size:12.5px}
.admin-mode .field small{font-size:11.5px;line-height:1.6}
.admin-mode .field input,.admin-mode .field select,.admin-mode .field textarea{border-radius:12px;font-size:14px}

/* ---------- editor bergaya Word ---------- */
#editor-dialog.composer-dialog{width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;border-radius:0;margin:0;background:#eef2fb}
.composer{display:flex;flex-direction:column;height:100%;position:relative}
.composer-top{display:flex;align-items:center;gap:14px;padding:10px 18px;background:#fff;border-bottom:1px solid var(--sm-line,#e7edfa);position:relative;z-index:5}
.composer-close{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;border:1px solid #e3e8f5;background:#fff;cursor:pointer;color:#2a3557}
.composer-close .icon{width:18px;height:18px}
.composer-title{display:grid;min-width:0}
.composer-title strong{font-size:16px;color:#111a36}
.composer-title span{font-size:12px;color:#5f6e91}
.composer-actions{margin-left:auto;display:flex;gap:8px}
.composer-actions .btn{min-height:40px;border-radius:12px;font-size:13px;gap:6px}
.composer-actions .icon{width:16px;height:16px}
.composer-error:empty{display:none}
.composer-error{margin:10px 18px 0;padding:10px 14px;border-radius:12px;background:#ffe8ed;color:#b51d38;font-size:13px}
.composer-restore,.composer-confirm{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:10px 18px 0;padding:10px 14px;border-radius:14px;background:#fff7e6;border:1px solid #f6dfac;font-size:13px;color:#7a5410}
.composer-restore .icon{width:16px;height:16px}
.composer-restore span{flex:1}
.composer-confirm{position:absolute;top:66px;left:50%;transform:translateX(-50%);z-index:30;background:#fff;border-color:#e3e8f5;box-shadow:0 18px 40px #1b2b5c2a;max-width:min(640px,94vw);color:#111a36}
.composer-confirm span{flex:1 1 220px;color:#5f6e91}
.composer-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 330px}
.composer.is-focus .composer-body{grid-template-columns:minmax(0,1fr) 0}
.composer.is-focus .composer-side{display:none}
.composer-doc{display:flex;flex-direction:column;min-height:0}
.rte-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;padding:8px 14px;background:#fff;border-bottom:1px solid #e7edfa;position:sticky;top:0;z-index:4}
.rte-group{display:flex;align-items:center;gap:2px;padding-right:6px;border-right:1px solid #e7edfa}
.rte-group:last-of-type{border-right:0}
.rte-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:34px;height:34px;padding:0 7px;border-radius:9px;border:0;background:none;color:#2a3557;cursor:pointer;font:inherit;font-size:12.5px;font-weight:600}
.rte-btn:hover{background:#f0f4ff}
.rte-btn.is-on{background:#e3ebff;color:#245bff}
.rte-btn .icon{width:18px;height:18px}
.rte-btn.has-label span{display:inline}
.rte-letter{font-size:15px;font-family:Georgia,'Times New Roman',serif}
.rte-italic{font-style:italic}.rte-underline{text-decoration:underline}.rte-strikeThrough{text-decoration:line-through}.rte-bold{font-weight:800}
.rte-block{height:34px;border-radius:9px;border:1px solid #e3e8f5;padding:0 8px;font:inherit;font-size:13px;background:#fff;color:#111a36}
.rte-focus{margin-left:auto}
.composer-scroll{flex:1;overflow:auto;padding:28px 18px 60px}
.composer-paper{max-width:820px;margin:0 auto;background:#fff;border-radius:6px;box-shadow:0 1px 3px #1b2b5c14,0 14px 40px #1b2b5c10;padding:48px clamp(20px,6vw,72px) 72px;min-height:calc(100% - 20px)}
.composer-title-input{display:block;width:100%;border:0;resize:none;font:inherit;font-size:clamp(26px,3.2vw,34px);font-weight:800;line-height:1.25;letter-spacing:-.6px;color:#111a36;padding:0;margin:0 0 8px;outline:none;overflow:hidden;background:none}
.composer-excerpt{display:block;width:100%;border:0;border-bottom:1px dashed #dfe5f5;resize:none;font:inherit;font-size:16px;line-height:1.6;color:#5f6e91;padding:0 0 14px;margin:0 0 22px;outline:none;overflow:hidden;background:none}
.rte{position:relative;min-height:360px;outline:none;font-size:17.5px;line-height:1.85;color:#1e2943;caret-color:#245bff}
.rte.is-empty:before{content:attr(data-placeholder);color:#9aa6c4;pointer-events:none;position:absolute;left:0;top:0}
.rte.is-drop{outline:2px dashed #245bff;outline-offset:10px;border-radius:8px}
.rte figure{cursor:pointer}
.rte figure.is-selected,.rte table.is-selected{outline:3px solid #245bff;outline-offset:4px;border-radius:6px}
.rte figcaption:empty:before{content:attr(data-placeholder);color:#a3aecb}
.rte figcaption{outline:none;cursor:text}
.rte hr.page-break{border:0;height:30px;margin:28px 0;background:repeating-linear-gradient(90deg,#c9d3f0 0 10px,transparent 10px 18px) center/100% 2px no-repeat;position:relative}
.rte hr.page-break:after{content:'Batas halaman';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;color:#7a87ad;font-size:12px;font-weight:700;padding:0 10px;letter-spacing:.5px}
.rte td,.rte th{min-width:60px}
.rte-embed-preview{position:relative;display:grid;gap:4px;padding:16px;border-radius:14px;background:#0f1630;color:#fff;overflow:hidden;min-height:140px;align-content:end}
.rte-embed-preview img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.55}
.rte-embed-preview>*:not(img){position:relative}
.rte-embed-preview strong{font-size:16px}
.rte-embed-preview small{font-size:12px;opacity:.8;word-break:break-all}
.rte-embed-preview em{font-size:12.5px;font-style:normal;opacity:.85}
.rte-embed-preview.no-thumb{background:linear-gradient(135deg,#1b2a6b,#3a2db8)}
.rte-embed-preview.is-pdf{background:linear-gradient(135deg,#b4232f,#e25a3a)}
.rte-embed-badge{display:inline-flex;align-items:center;gap:6px;justify-self:start;padding:4px 10px;border-radius:999px;background:#ffffff2b;font-size:12px;font-weight:700}
.rte-embed-badge .icon{width:14px;height:14px}
.rte-status{display:flex;gap:16px;flex-wrap:wrap;align-items:center;padding:8px 18px;background:#fff;border-top:1px solid #e7edfa;font-size:12.5px;color:#5f6e91}
.rte-status .rte-hint{margin-left:auto;display:inline-flex;align-items:center;gap:6px}
.rte-status .icon{width:14px;height:14px}
.composer-side{overflow:auto;padding:16px;border-left:1px solid #e7edfa;background:#f7f9ff;display:grid;gap:14px;align-content:start}
.composer-card{background:#fff;border:1px solid #e7edfa;border-radius:18px;padding:14px 16px;display:grid;gap:12px}
.composer-card h3{font-size:14px;margin:0;display:flex;align-items:center;gap:8px;color:#111a36}
.composer-card h3 .icon{width:16px;height:16px;color:#6932e0}
.composer-card .field{gap:6px}
.composer-card .field-row-2{grid-template-columns:1fr;gap:12px}
.composer-cover{position:relative;border-radius:14px;overflow:hidden;background:#eef2fb;aspect-ratio:16/9;display:grid;place-items:center}
.composer-cover img{width:100%;height:100%;object-fit:cover}
.composer-cover span{position:absolute;font-size:12.5px;color:#5f6e91;background:#ffffffd9;padding:4px 10px;border-radius:999px}
.composer-upload{justify-content:center;cursor:pointer;border-radius:12px;font-size:13px;gap:6px}
.composer-upload .icon{width:16px;height:16px}
.composer-tips ul{margin:0;padding-left:18px;display:grid;gap:6px;font-size:12.5px;color:#3d4668;line-height:1.5}
.rte-pop{position:absolute;z-index:40;width:min(360px,92vw);background:#fff;border:1px solid #e3e8f5;border-radius:18px;box-shadow:0 22px 50px #1b2b5c33;padding:16px}
.rte-pop-form{display:grid;gap:12px}
.rte-pop h4{display:flex;align-items:center;gap:8px;font-size:15px;margin:0}
.rte-pop h4 .icon{width:18px;height:18px;color:#245bff}
.rte-pop-actions{display:flex;justify-content:flex-end;gap:8px}
.rte-drop{display:grid;justify-items:center;gap:4px;padding:16px;border:2px dashed #cdd7f2;border-radius:14px;cursor:pointer;text-align:center;color:#2a3557}
.rte-drop:hover{border-color:#245bff;background:#f5f8ff}
.rte-drop .icon{width:24px;height:24px;color:#245bff}
.rte-drop small{font-size:12px;color:#5f6e91}
.rte-drop input{font-size:12px;max-width:100%}
.rte-or{text-align:center;font-size:12px;color:#8b98b8;position:relative}
.rte-figure-bar{position:absolute;z-index:35;display:flex;align-items:center;gap:2px;padding:4px;background:#111a36;border-radius:12px;box-shadow:0 12px 26px #0b14304d}
.rte-figure-bar button{display:inline-flex;align-items:center;gap:4px;border:0;background:none;color:#fff;font:inherit;font-size:12.5px;font-weight:600;padding:6px 9px;border-radius:8px;cursor:pointer}
.rte-figure-bar button:hover{background:#ffffff1f}
.rte-figure-bar button.is-on{background:#245bff}
.rte-figure-bar button.danger{color:#ffb4c0}
.rte-figure-bar .icon{width:14px;height:14px}
.rte-figure-bar span{width:1px;height:20px;background:#ffffff2e;margin:0 2px}
.composer-preview{position:absolute;inset:0;z-index:50;background:#f4f6fb;overflow:auto}
.composer-preview-bar{position:sticky;top:0;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 18px;background:#111a36;color:#fff;z-index:2}
.composer-preview-bar span{font-size:12.5px;opacity:.75;flex:1}
.composer-preview-page{max-width:780px;margin:24px auto 80px;background:#fff;border-radius:14px;padding:40px clamp(18px,5vw,56px)}
.composer-preview-page h1{font-size:clamp(26px,3vw,36px);line-height:1.2;margin:8px 0 12px}
.composer-preview-lead{font-size:17px;color:#5f6e91}
.rte-toolbar,.rte-status{flex:none}
@media(max-width:1000px){.composer-body{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;align-content:start}.composer-doc,.composer-side{min-width:0}.composer-doc{min-height:auto}.composer-paper{min-height:62vh}.composer-side{overflow:visible}.composer-side{border-left:0;border-top:1px solid #e7edfa}.composer-scroll{overflow:visible;padding:14px 8px 30px}.composer-body{overflow:auto}.composer-paper{padding:28px 18px 40px}}
@media(max-width:640px){.composer-top{padding:8px 10px;gap:8px}.composer-title span{display:none}.composer-actions .btn span{display:none}.composer-actions .btn{padding:0 12px}.rte-btn.has-label span{display:none}.rte-toolbar{flex-wrap:nowrap;overflow-x:auto;padding:6px 8px}.rte-group{flex:none}.rte-status .rte-hint{display:none}.rte{font-size:16.5px}}

/* ---------- mode banner ---------- */
.banner-mode{border:0;padding:0;margin:0;display:grid;gap:10px}
.banner-mode legend{font-size:12.5px;font-weight:700;margin-bottom:8px;color:#111a36}
.banner-mode-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.banner-mode-option{position:relative;cursor:pointer}
.banner-mode-option input{position:absolute;opacity:0}
.banner-mode-option span{display:grid;gap:4px;justify-items:start;padding:12px;border-radius:14px;border:1.5px solid #e3e8f5;background:#fff;height:100%;transition:border-color .2s,background .2s}
.banner-mode-option .icon{width:20px;height:20px;color:#245bff}
.banner-mode-option strong{font-size:13.5px}
.banner-mode-option small{font-size:11.5px;color:#5f6e91;line-height:1.4}
.banner-mode-option input:checked+span{border-color:#245bff;background:#f2f6ff;box-shadow:0 0 0 3px #245bff1f}
.banner-mode-option input:focus-visible+span{outline:2px solid #245bff;outline-offset:2px}
.banner-mode-option.is-disabled{opacity:.45;cursor:not-allowed}
.banner-mode-panel{display:grid;gap:10px;padding:14px;border-radius:14px;background:#f7f9ff;border:1px solid #e7edfa}
.code-input{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important;font-size:13px!important;line-height:1.55;background:#0f1630!important;color:#dfe6ff!important;border-radius:12px}
.banner-code-preview{display:grid;gap:6px}
.banner-code-preview span{font-size:12px;color:#5f6e91}
.banner-code-preview iframe{width:100%;height:180px;border:1px dashed #cdd7f2;border-radius:12px;background:#fff}
@media(max-width:640px){.banner-mode-grid{grid-template-columns:1fr 1fr}}

/* ---------- Kamus Tautan ---------- */
.terms-intro{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
.terms-intro>div{background:#fff;border:1px solid #e7edfa;border-radius:18px;padding:14px 16px}
.terms-intro p{font-size:13px;color:#3d4668;margin:8px 0 0;line-height:1.5}
.terms-intro .pill{display:inline-flex;align-items:center;gap:6px}
.terms-intro .icon{width:14px;height:14px}
.term-target{max-width:420px;font-size:13px;color:#3d4668;line-height:1.5}
.term-target code{font-size:12px;word-break:break-all}
@media(max-width:800px){.terms-intro{grid-template-columns:1fr}}
.composer-title-input:focus,.composer-title-input:focus-visible,.composer-excerpt:focus,.composer-excerpt:focus-visible{outline:none;box-shadow:none}.composer-title-input:focus-visible{background:linear-gradient(transparent 92%,#dbe5ff 92%)}
