/* LU CS — admin styles */
:root {
  --orange: #f47920; --orange-d: #d85f0b; --navy: #0b1b3f; --ink: #060e22;
  --text: #1a2236; --muted: #687188; --line: #e4e7ee; --bg: #f3f5f9; --card: #fff;
  --ok: #138a52; --err: #c62f3a; --warn: #a86400;
  --r: 12px; --side: 236px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif; --head: "Sora", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.01em; margin: 0 0 .4em; }
a { color: var(--orange-d); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .mono { font-family: var(--mono); }
.pad { padding: 10px 12px; margin: 0; }
img { max-width: 100%; }
.icon { width: 20px; height: 20px; flex: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--orange); color: #fff; border: 0; border-radius: 9px; padding: 10px 18px; font: 700 .9rem var(--font); text-decoration: none; cursor: pointer; transition: background .2s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--orange-d); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { padding: 7px 12px; font-size: .82rem; border-radius: 8px; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: #fff; box-shadow: inset 0 0 0 1px #c9cfdb; }
.btn.danger, button.danger { color: var(--err) !important; }
.btn.block { width: 100%; padding: 13px; }
.linkish { background: none; border: 0; color: var(--orange-d); font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.icon-btn { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: .9rem; }
.icon-btn:hover { border-color: var(--orange); color: var(--orange-d); }

/* forms */
.form label, label.fld-label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .86rem; margin-bottom: 14px; }
.form label.check, label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], input:not([type]), select, textarea {
  width: 100%; font: 500 .92rem var(--font); color: var(--text); background: #fff; border: 1px solid #d6dbe5; border-radius: 9px; padding: 9px 12px; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus, .rte-area:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244,121,32,.18); }
textarea { resize: vertical; }
textarea.mono { font: .82rem/1.55 var(--mono); background: #0f1834; color: #e6edf7; border-color: #0f1834; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid2.gap { gap: 20px; align-items: start; }
.span2 { grid-column: 1 / -1; }
.row-gap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.slug-prefix { display: flex; align-items: stretch; border: 1px solid #d6dbe5; border-radius: 9px; overflow: hidden; background: #f7f8fb; }
.slug-prefix span { padding: 9px 4px 9px 12px; color: var(--muted); font: 500 .82rem var(--mono); white-space: nowrap; align-self: center; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.slug-prefix input { border: 0; border-radius: 0; font-family: var(--mono); font-size: .85rem; padding-left: 2px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.alert.ok { background: #e9f8f0; border-color: #b8e6cc; color: var(--ok); }
.alert.err { background: #fdecee; border-color: #f5c2c7; color: var(--err); }
.alert.warn { background: #fff6e5; border-color: #f6d9a4; color: var(--warn); }

/* auth */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(80% 80% at 90% 0%, #1d3a86, transparent 60%), radial-gradient(70% 70% at 0% 100%, #4a1d0b, transparent 60%), var(--ink); }
.auth-fx { position: fixed; inset: 0; z-index: 0; }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 420px; background: rgba(255,255,255,.97); border-radius: 18px; padding: 34px; box-shadow: 0 40px 90px -20px rgba(0,0,0,.6); }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { font-size: 1.6rem; margin: 18px 0 16px; }
.auth-brand { display: flex; gap: 12px; align-items: center; }
.auth-brand img { height: 48px; }
.auth-brand b { display: block; font-family: var(--head); } .auth-brand small { color: var(--muted); }
.logo-dot { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--orange), #2f6bff); flex: none; }
.log { padding-left: 0; list-style: none; color: var(--ok); }

/* shell */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--ink); color: #c6cde0; display: flex; flex-direction: column; padding: 18px 12px; z-index: 30; transition: transform .3s; }
.side-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 4px 8px 22px; }
.side-brand img { height: 38px; }
.side-brand b { display: block; font-family: var(--head); } .side-brand small { color: #8a93ad; font-size: .76rem; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: inherit; text-decoration: none; font-weight: 600; font-size: .92rem; }
.side a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.on { background: linear-gradient(90deg, rgba(244,121,32,.22), rgba(244,121,32,.05)); color: #fff; box-shadow: inset 3px 0 0 var(--orange); }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; }
.main { margin-left: var(--side); min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: rgba(243,245,249,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 1.25rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; gap: 12px; align-items: center; }
.me { font-weight: 600; color: var(--muted); font-size: .88rem; }
.content { padding: 26px 28px 60px; max-width: 1280px; }
.side-toggle { display: none; width: 40px; height: 40px; border: 0; background: #fff; border-radius: 9px; position: relative; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.side-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); }
.side-toggle span:nth-child(1) { top: 13px; } .side-toggle span:nth-child(2) { top: 19px; } .side-toggle span:nth-child(3) { top: 25px; }
@media (max-width: 900px) {
  .side { transform: translateX(-100%); } body.side-open .side { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .main { margin-left: 0; } .side-toggle { display: block; } .content { padding: 18px 16px 60px; } .topbar { padding: 12px 16px; } .me { display: none; }
}

/* cards & tables */
.card { background: var(--card); border-radius: var(--r); border: 1px solid var(--line); padding: 20px 22px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(11,27,63,.04); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-head h3 { margin: 0; font-size: 1.02rem; }
.card-head a { font-size: .85rem; font-weight: 600; text-decoration: none; }
.hello h2 { font-size: 1.5rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 18px 0 20px; }
.stat-grid .stat { margin: 0; display: flex; flex-direction: column; }
.stat-grid .stat b { font: 700 2rem var(--head); background: linear-gradient(100deg, var(--orange), #2f6bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-grid .stat span { color: var(--muted); font-weight: 600; font-size: .85rem; }
@media (max-width: 700px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick a { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: .2s; }
.quick a:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(244,121,32,.5); }
.quick .icon { color: var(--orange); margin-bottom: 6px; } .quick small { color: var(--muted); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl a { text-decoration: none; }
.tbl tr.dim { opacity: .55; }
.tbl .actions { text-align: right; white-space: nowrap; }
@media (max-width: 760px) { .tbl thead { display: none; } .tbl td { display: block; padding: 4px 0; border: 0; } .tbl tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); } .tbl .actions { text-align: left; } }
.tag { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: #eef1f7; color: var(--navy); padding: 2px 7px; border-radius: 5px; vertical-align: middle; }
.pill { display: inline-block; font: 700 .74rem var(--font); padding: 4px 10px; border-radius: 999px; background: #eef1f7; color: var(--muted); border: 0; cursor: pointer; }
.pill.on { background: #e3f6ec; color: var(--ok); }
form.inline { display: inline; }
.more-menu { position: relative; display: inline-block; }
.more-menu summary { list-style: none; } .more-menu summary::-webkit-details-marker { display: none; }
.more-menu > div { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 20px 40px -12px rgba(11,27,63,.25); min-width: 220px; padding: 6px; z-index: 40; text-align: left; }
.more-menu > div button, .more-menu > div > a { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 7px; font: 600 .88rem var(--font); cursor: pointer; color: var(--text); }
.more-menu > div button:hover { background: var(--bg); }
.more-menu .form button { width: auto; background: var(--orange); color: #fff; text-align: center; }

/* modal */
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(560px, 94vw); max-height: 90vh; box-shadow: 0 40px 100px -20px rgba(0,0,0,.5); }
dialog.modal.wide { width: min(980px, 96vw); }
dialog::backdrop { background: rgba(6,14,34,.55); backdrop-filter: blur(3px); }
.modal form, .modal > div:not(.modal-head) { padding: 0 24px 22px; }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px 14px; position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h2 { margin: 0; font-size: 1.2rem; flex: 1; }
.modal-head input { max-width: 260px; }
.modal-head .x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg); font-size: 1.3rem; cursor: pointer; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.tpl-pick { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tpl-pick legend { font-weight: 600; font-size: .86rem; margin-bottom: 6px; }
.tpl { flex-direction: row !important; align-items: flex-start; gap: 10px !important; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; margin: 0 !important; }
.tpl:has(input:checked) { border-color: var(--orange); background: #fff7f0; }
.tpl b { display: block; font-size: .9rem; } .tpl small { color: var(--muted); font-weight: 500; }
.tpl input { margin-top: 3px; accent-color: var(--orange); }

/* menu page */
.menu-preview { display: flex; gap: 6px; flex-wrap: wrap; background: var(--ink); padding: 12px; border-radius: 10px; margin-bottom: 14px; }
.menu-preview span { color: #fff; font: 700 .78rem var(--font); text-transform: uppercase; letter-spacing: .05em; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); }
.menu-list { list-style: none; padding: 0; margin: 0; }
.menu-row { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.menu-row.child { margin-left: 34px; border-style: dashed; }
.menu-row.off { opacity: .55; }
.menu-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.menu-line .spacer { flex: 1; }
.menu-line .grip { color: #b5bccb; }
.edit-toggle summary { list-style: none; } .edit-toggle summary::-webkit-details-marker { display: none; }
.edit-toggle[open] { flex-basis: 100%; order: 10; }
.edit-pop { padding-top: 12px; border-top: 1px solid var(--line); margin-top: 8px; }

/* media */
.media-drop { border: 2px dashed #cdd3df; border-radius: 12px; padding: 22px; text-align: center; transition: .2s; margin-bottom: 14px; }
.media-drop.big { padding: 40px; }
.media-drop.over { border-color: var(--orange); background: #fff7f0; }
.media-drop p { margin: 0; }
.upl-progress { margin-top: 10px; display: grid; gap: 6px; }
.upl { position: relative; background: var(--bg); border-radius: 6px; overflow: hidden; font-size: .82rem; padding: 6px 10px; text-align: left; }
.upl i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(244,121,32,.25); transition: width .2s; }
.upl span { position: relative; } .upl.fail { background: #fdecee; color: var(--err); }
.media-url { display: flex; gap: 8px; margin-bottom: 16px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.media-grid.page { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.m-item { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px; cursor: pointer; text-align: left; transition: .15s; }
.m-item:hover { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244,121,32,.15); }
.m-item img, .m-item .m-file { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; display: grid; place-items: center; background: var(--bg); font: 700 .8rem var(--mono); color: var(--muted); }
.m-item small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; color: var(--muted); }
.m-card { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.m-prev { aspect-ratio: 16/10; background: var(--bg) repeating-conic-gradient(#eef0f5 0 25%, #f7f8fb 0 50%) 0 0/20px 20px; display: grid; place-items: center; }
.m-prev img, .m-prev video { width: 100%; height: 100%; object-fit: contain; }
.m-file { font: 700 1.1rem var(--mono); color: var(--muted); }
.m-card figcaption { padding: 10px 12px 12px; }
.m-card figcaption b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .88rem; }
.m-acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.media-field { display: flex; gap: 8px; align-items: center; }
.mthumb { width: 42px; height: 42px; flex: none; border-radius: 8px; overflow: hidden; background: var(--bg); display: grid; place-items: center; border: 1px solid var(--line); }
.mthumb img { width: 100%; height: 100%; object-fit: cover; }
.mthumb .vid { font: 700 .7rem var(--mono); color: var(--orange-d); } .mthumb .none { color: #c0c6d2; }
.sticky-save { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; }
.sticky-save .btn { box-shadow: 0 12px 30px -8px rgba(244,121,32,.7); padding: 13px 26px; }

/* ===================== Builder ===================== */
.builder-body .content { padding: 0; max-width: none; }
.builder-body .topbar, .builder-body .side { display: none; }
.builder-body .main { margin-left: 0; }
.builder-body .content > .alert { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 100; box-shadow: 0 16px 40px -12px rgba(0,0,0,.3); animation: flashout 5s forwards; }
@keyframes flashout { 0%,80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.builder { height: 100vh; display: flex; flex-direction: column; }
.b-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.b-title { flex: 1; min-width: 160px; font: 700 1.05rem var(--head) !important; border-color: transparent !important; background: transparent !important; }
.b-title:hover { border-color: var(--line) !important; }
.b-status { display: flex; gap: 10px; align-items: center; }
.unsaved { color: var(--warn); font-size: .8rem; font-weight: 700; }
.b-devices { display: flex; background: var(--bg); border-radius: 8px; padding: 3px; }
.b-devices button { border: 0; background: none; padding: 5px 9px; border-radius: 6px; cursor: pointer; font-size: .9rem; }
.b-devices button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
#b-revs { max-height: 360px; overflow: auto; min-width: 260px; }
#b-revs button { display: flex; flex-direction: column; } #b-revs small { color: var(--muted); font-weight: 500; }
.b-body { flex: 1; display: grid; grid-template-columns: 400px 1fr; min-height: 0; }
.b-panel { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.b-tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 3; }
.b-tabs button { flex: 1; border: 0; background: none; padding: 12px; font: 700 .85rem var(--font); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.b-tabs button.on { color: var(--text); border-bottom-color: var(--orange); }
.b-pane { padding: 14px; }
.b-list { display: flex; flex-direction: column; gap: 6px; }
.b-empty { text-align: center; color: var(--muted); padding: 30px 10px; border: 2px dashed var(--line); border-radius: 12px; }
.b-item { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; position: relative; }
.b-item:hover { border-color: #c9cfdb; }
.b-item.on { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244,121,32,.15); }
.b-item.is-hidden { opacity: .5; }
.b-item.dragging { opacity: .4; }
.b-item.drop-above { box-shadow: 0 -3px 0 var(--orange); } .b-item.drop-below { box-shadow: 0 3px 0 var(--orange); }
.b-grip { color: #b5bccb; cursor: grab; padding: 0 2px; }
.b-ico { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: #fff3e8; color: var(--orange-d); }
.b-ico svg { width: 18px; height: 18px; }
.b-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.b-meta b { font-size: .88rem; }
.b-sum { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-acts { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.b-item:hover .b-acts, .b-item.on .b-acts { opacity: 1; }
.b-acts button, .rep-acts button { width: 26px; height: 26px; border: 0; background: var(--bg); border-radius: 6px; cursor: pointer; font-size: .78rem; color: var(--text); }
.b-acts button:hover, .rep-acts button:hover { background: #e6e9f0; }
.b-acts button:disabled, .rep-acts button:disabled { opacity: .3; cursor: default; }
.b-acts .del:hover, .rep-acts .del:hover { background: #fdecee; color: var(--err); }
@media (hover: none) { .b-acts { opacity: 1; } }
.add-block { width: 100%; margin-top: 12px; padding: 14px; border: 2px dashed #f2b98d; background: #fff8f2; color: var(--orange-d); font: 700 .92rem var(--font); border-radius: 12px; cursor: pointer; transition: .2s; }
.add-block:hover { background: #ffefe1; border-color: var(--orange); }
.b-editor-head { display: flex; align-items: center; gap: 10px; margin: -2px 0 12px; position: sticky; top: -14px; background: #fff; padding: 10px 0; z-index: 3; border-bottom: 1px solid var(--line); }
.b-editor-head b { display: flex; align-items: center; gap: 6px; font-size: .95rem; }
.b-editor-head b svg { width: 18px; height: 18px; color: var(--orange); }
.fld { margin-bottom: 14px; }
.fld .fld-label { font-weight: 600; font-size: .84rem; margin-bottom: 6px; display: block; }
.fld small.muted { display: block; margin-top: 4px; font-size: .78rem; }
.style-box { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; margin-top: 10px; background: #fafbfd; }
.style-box summary { padding: 12px 0; font-weight: 700; font-size: .86rem; cursor: pointer; }
.style-box[open] summary { margin-bottom: 4px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .86rem; }
.switch input { display: none; }
.switch .sw { width: 38px; height: 22px; border-radius: 22px; background: #cdd3df; position: relative; transition: .2s; flex: none; }
.switch .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .sw { background: var(--orange); }
.switch input:checked + .sw::after { left: 19px; }
.icon-pick { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #d6dbe5; background: #fff; border-radius: 9px; cursor: pointer; font: 600 .86rem var(--font); }
.icon-pick svg { width: 20px; height: 20px; color: var(--orange-d); }
.icon-pop { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 30px -10px rgba(0,0,0,.2); }
.icon-pop button { aspect-ratio: 1; border: 0; background: var(--bg); border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.icon-pop button:hover, .icon-pop button.on { background: var(--orange); color: #fff; }
.icon-pop svg { width: 18px; height: 18px; }
.rep { display: flex; flex-direction: column; gap: 6px; }
.rep-item { border: 1px solid var(--line); border-radius: 9px; background: #fafbfd; }
.rep-item > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; font-weight: 600; font-size: .84rem; }
.rep-item > summary::-webkit-details-marker { display: none; }
.rep-item > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.rep-item[open] > summary::before { transform: rotate(90deg); }
.rep-lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-acts { display: flex; gap: 2px; }
.rep-body { padding: 4px 12px 2px; border-top: 1px solid var(--line); background: #fff; border-radius: 0 0 9px 9px; }
.add-item { border: 1px dashed #c9cfdb; background: #fff; border-radius: 9px; padding: 9px; font: 700 .82rem var(--font); color: var(--orange-d); cursor: pointer; }
.add-item:hover { border-color: var(--orange); }
.add-item:disabled { opacity: .4; }
.rte { border: 1px solid #d6dbe5; border-radius: 9px; overflow: hidden; background: #fff; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; background: var(--bg); border-bottom: 1px solid var(--line); }
.rte-bar button { border: 0; background: none; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 6px; cursor: pointer; font: 700 .76rem var(--font); color: var(--text); }
.rte-bar button:hover { background: #fff; }
.rte-area { min-height: 140px; max-height: 420px; overflow: auto; padding: 10px 12px; font-size: .92rem; line-height: 1.6; }
.rte-area h2 { font-size: 1.3rem; margin: .6em 0 .3em; } .rte-area h3 { font-size: 1.1rem; margin: .6em 0 .3em; }
.rte-area p { margin: 0 0 .7em; } .rte-area img { max-width: 100%; border-radius: 6px; }
.rte-area blockquote { border-left: 3px solid var(--orange); margin: .6em 0; padding-left: 10px; color: var(--muted); }
.rte-src { border: 0 !important; border-radius: 0 !important; }
.b-preview { background: #dfe3ea; display: flex; min-height: 0; overflow: auto; }
.b-frame-wrap { flex: 1; display: flex; justify-content: center; transition: .3s; padding: 0; }
.b-frame-wrap iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .3s; }
.b-frame-wrap[data-dev=tablet] { padding: 16px; } .b-frame-wrap[data-dev=tablet] iframe { width: 820px; border-radius: 12px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.4); }
.b-frame-wrap[data-dev=phone] { padding: 16px; } .b-frame-wrap[data-dev=phone] iframe { width: 390px; border-radius: 24px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.4); border: 8px solid #111; }
@media (max-width: 1000px) {
  .b-body { grid-template-columns: 1fr; grid-template-rows: 55vh 45vh; }
  .b-preview { order: -1; }
  .b-devices { display: none; }
}
.lib h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 10px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lib-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 14px; cursor: pointer; transition: .15s; font-family: var(--font); }
.lib-card:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(244,121,32,.55); }
.lib-card b { font-size: .92rem; } .lib-card small { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.lib-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--orange), #ff6a5c); color: #fff; margin-bottom: 6px; }
.lib-ico svg { width: 18px; height: 18px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 600; z-index: 200; transition: .3s; box-shadow: 0 20px 40px -10px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--ok); } .toast.err { background: var(--err); }
