@font-face { font-family: Plex; src: url(/fonts/IBMPlexSansArabic-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Plex; src: url(/fonts/IBMPlexSansArabic-Medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: Plex; src: url(/fonts/IBMPlexSansArabic-SemiBold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: Plex; src: url(/fonts/IBMPlexSansArabic-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Kufi; src: url(/fonts/ReemKufi.ttf); font-weight: 400 700; font-display: swap; }

:root {
  --navy-950: #070F1C; --navy-900: #0B1626; --navy-800: #12233D; --navy-600: #24426B;
  --gold: #C9A24B; --gold-600: #8F6C22; --gold-100: #F6EEDB;
  --bg: #F4F5F8; --surface: #fff; --surface-2: #F7F8FA; --border: #E5E7EC; --border-2: #F0F1F4;
  --ink: #121A26; --ink-2: #4A5363; --muted: #6E7686;
  --ok: #1E7A4E; --ok-bg: #E3F4EA; --warn: #9A6412; --warn-bg: #FBF0DC; --bad: #B83A34; --bad-bg: #FBE6E4; --info: #1F65B8; --info-bg: #E5EFFB;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --prev: #9AA1AD;
  --side: 248px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: Plex, system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 14.5px; line-height: 1.6; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.ic { width: 1em; height: 1em; flex: none; vertical-align: -0.14em; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.grow { flex: 1; min-width: 0; } .row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 12px; }
.between { justify-content: space-between; } .end { margin-inline-start: auto; }
.gap16 { gap: 16px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mb16 { margin-bottom: 16px; }
.boot { height: 100vh; display: grid; place-items: center; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--gold); animation: sp 0.8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* layout */
.shell { display: flex; min-height: 100vh; }
.side { width: var(--side); flex: none; background: var(--navy-900); color: rgba(255,255,255,.74); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 18px; color: #fff; }
.side .brand svg { width: 38px; height: 38px; }
.side .brand b { font-family: Kufi; font-size: 24px; line-height: 1; display: block; } .side .brand small { font-size: 11px; opacity: .6; }
.side .grp { font-size: 11.5px; color: rgba(255,255,255,.42); padding: 14px 12px 4px; }
.nav-i { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 12px; border-radius: 10px; font-weight: 500; cursor: pointer; }
.nav-i .ic { font-size: 18px; } .nav-i:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-i.on { background: rgba(201,162,75,.16); color: var(--gold); }
.nav-i .count { margin-inline-start: auto; background: var(--gold); color: var(--navy-900); font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 0 7px; line-height: 19px; }
.side .bottom { margin-top: auto; padding-top: 10px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 62px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.top .menu-btn { display: none; }
.me { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 8px; border-radius: 10px; } .me:hover { background: var(--surface-2); }
.me b { display: block; font-size: 13.5px; line-height: 1.3; } .me small { color: var(--muted); font-size: 12px; }
.content { padding: 24px; flex: 1; min-width: 0; }
.content.full { padding: 0; }
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph h1 { font-size: 23px; color: var(--navy-900); line-height: 1.35; } .ph p { color: var(--muted); margin-top: 2px; }
.ph .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* controls */
.btn { height: 38px; padding: 0 14px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; font-size: 13.5px; border: 1px solid var(--border); background: #fff; color: var(--ink); white-space: nowrap; cursor: pointer; transition: background .12s, opacity .12s; }
.btn:hover { background: var(--surface-2); }
.btn.pri { background: var(--navy-900); color: #fff; border-color: var(--navy-900); } .btn.pri:hover { background: var(--navy-800); }
.btn.gold { background: var(--gold); color: var(--navy-900); border-color: var(--gold); } .btn.gold:hover { background: #D4AE5A; }
.btn.danger { color: var(--bad); } .btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; } .btn.sm.icon { width: 30px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .ic { font-size: 16px; }
.input, select.input, textarea.input { width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 0 12px; font-size: 14px; }
textarea.input { height: auto; min-height: 90px; padding: 9px 12px; resize: vertical; line-height: 1.7; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,.2); }
.input.sm { height: 32px; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; background: #fff; color: var(--muted); min-width: 240px; }
.search input { border: 0; outline: 0; flex: 1; min-width: 0; background: transparent; color: var(--ink); }
.toggle { width: 38px; height: 22px; border-radius: 99px; background: #CDD1D9; position: relative; flex: none; border: 0; cursor: pointer; transition: background .15s; }
.toggle::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle.on { background: var(--ok); } .toggle.on::after { inset-inline-start: 19px; }
.check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #C5CAD3; background: #fff; display: inline-grid; place-items: center; color: #fff; font-size: 12px; cursor: pointer; flex: none; }
.check.on { background: var(--ok); border-color: var(--ok); }
.seg { display: inline-flex; background: #ECEEF2; border-radius: 9px; padding: 3px; font-size: 13px; }
.seg button { padding: 4px 12px; border-radius: 7px; color: var(--ink-2); border: 0; background: none; cursor: pointer; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--navy-900); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { padding: 9px 14px; color: var(--ink-2); font-weight: 500; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--navy-900); border-color: var(--gold); font-weight: 600; }
.tabs em { font-style: normal; color: var(--muted); font-weight: 400; }
.lang-tabs { display: inline-flex; gap: 2px; font-size: 11.5px; }
.lang-tabs button { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 0 7px; cursor: pointer; color: var(--muted); line-height: 20px; }
.lang-tabs button.on { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.lang-tabs button.missing:not(.on) { border-color: var(--warn); color: var(--warn); }

/* cards & lists */
.card { background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.card.pad { padding: 18px 20px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border-2); flex-wrap: wrap; }
.card-h h3 { font-size: 15px; color: var(--navy-900); } .card-h small { color: var(--muted); font-size: 12.5px; }
.card-b { padding: 16px 18px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; background: #EEF0F3; color: var(--ink-2); }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-new, .b-info { background: var(--info-bg); color: var(--info); } .b-ok { background: var(--ok-bg); color: var(--ok); } .b-warn { background: var(--warn-bg); color: var(--warn); } .b-bad { background: var(--bad-bg); color: var(--bad); } .b-gold { background: var(--gold-100); color: var(--gold-600); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .ic { font-size: 34px; color: #C2C7D0; display: block; margin: 0 auto 8px; }
.err { background: var(--bad-bg); color: var(--bad); padding: 10px 14px; border-radius: 10px; font-weight: 500; }
.note { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }
.note.warn { background: var(--warn-bg); color: #6B4A10; } .note.ok { background: var(--ok-bg); color: #145236; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: hsl(var(--h, 210) 45% 28%); background: hsl(var(--h, 210) 55% 90%); flex: none; }
.av.lg { width: 40px; height: 40px; font-size: 14px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: start; color: var(--muted); font-weight: 500; font-size: 12.5px; padding: 9px 14px; background: #FAFAFB; border-bottom: 1px solid var(--border-2); white-space: nowrap; }
table.t td { padding: 10px 14px; border-bottom: 1px solid #F3F4F6; vertical-align: middle; }
table.t tr:hover td { background: #FCFCFD; }
table.t td.num, table.t th.num { text-align: end; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; }

/* KPI + charts */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.kpis.five { grid-template-columns: repeat(5, 1fr); }
.kpi { padding: 16px 18px; }
.kpi .t { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 13.5px; align-items: center; }
.kpi .t .ic { font-size: 17px; color: var(--muted); }
.kpi b { font-size: 27px; display: block; margin: 6px 0 2px; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta { font-size: 12.5px; font-weight: 600; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); } .delta.flat { color: var(--muted); }
.delta + span { color: var(--muted); font-size: 12.5px; margin-inline-start: 5px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--navy-900); color: #fff; border-radius: 8px; padding: 7px 10px; font-size: 12px; line-height: 1.6; white-space: nowrap; transform: translate(-50%, -110%); z-index: 2; box-shadow: 0 6px 16px -6px rgba(0,0,0,.4); }
.chart .tip .k { display: inline-block; width: 10px; height: 2px; vertical-align: middle; margin-inline-end: 5px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 16px; height: 2px; } .legend i.dash { height: 0; border-top: 2px dashed var(--prev); } .legend i.sq { width: 10px; height: 10px; border-radius: 3px; }
.hbars { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 60px; align-items: center; gap: 10px; font-size: 13.5px; }
.hbar .tr { height: 10px; background: #F1F2F5; border-radius: 4px; position: relative; }
.hbar .tr i { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--s1); border-radius: 4px; }
.hbar .v { text-align: end; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.share { display: flex; gap: 2px; height: 14px; border-radius: 5px; overflow: hidden; }
.share i { display: block; height: 100%; }
.dash-grid { display: grid; grid-template-columns: 2.1fr 1fr; gap: 14px; }
.dash-grid3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; margin-top: 14px; }
.li { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid #F3F4F6; }
.li:last-child { border-bottom: 0; }
.prog { height: 7px; background: #F1F2F5; border-radius: 4px; overflow: hidden; } .prog i { display: block; height: 100%; background: var(--s1); border-radius: 4px; }

/* leads */
.lead { padding: 16px 18px; margin-bottom: 12px; }
.lead.focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,.18); }
.lead h4 { font-size: 16px; margin-top: 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.lead h4 small { font-weight: 400; color: var(--muted); font-size: 13.5px; display: inline-flex; gap: 5px; align-items: center; }
.chipl { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 3px 10px; font-size: 13px; background: #fff; }
.chipl:hover { background: var(--surface-2); } .chipl .ic { color: var(--muted); } .chipl.wa .ic { color: #1E9E50; }
.dl { display: flex; gap: 6px 22px; margin-top: 10px; font-size: 13.5px; flex-wrap: wrap; } .dl span { color: var(--muted); }
.msg { margin-top: 10px; background: var(--surface-2); border-radius: 10px; padding: 11px 14px; line-height: 1.8; white-space: pre-wrap; color: var(--ink-2); }
.timeline { border-inline-start: 2px solid var(--border); margin: 12px 6px 0; padding-inline-start: 14px; display: flex; flex-direction: column; gap: 10px; }
.timeline > div { font-size: 13px; position: relative; } .timeline > div::before { content: ""; position: absolute; inset-inline-start: -20px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--gold); }
.timeline pre { white-space: pre-wrap; font-family: inherit; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; margin-top: 4px; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; }
.kcol { background: #EAECF0; border-radius: 14px; padding: 10px; min-height: 200px; transition: background .12s; }
.kcol.over { background: #E1E5EC; outline: 2px dashed var(--gold); outline-offset: -2px; }
.kcol-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-weight: 600; color: var(--navy-900); }
.kcol-h span { display: flex; align-items: center; gap: 8px; } .kcol-h i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.kcol-h em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 12.5px; background: #fff; border-radius: 99px; padding: 0 8px; }
.task { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 8px; border: 1px solid #E2E4E9; cursor: grab; }
.task:hover { border-color: #CDD1D9; } .task.dragging { opacity: .45; }
.task h5 { font-size: 14px; line-height: 1.55; margin: 6px 0; font-weight: 600; }
.task .ft { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: 8px; gap: 6px; }
.task .ft span { display: flex; align-items: center; gap: 4px; }
.task .late { color: var(--bad); font-weight: 600; }
.drop-ph { height: 4px; background: var(--gold); border-radius: 2px; margin: 4px 0 8px; }
.pri-urgent { background: var(--bad-bg); color: var(--bad); } .pri-high { background: var(--warn-bg); color: var(--warn); } .pri-normal { background: #EEF0F3; color: var(--ink-2); } .pri-low { background: #F3F4F6; color: var(--muted); }

/* event editor */
.ev-editor { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
.sec-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 76px; }
.sec-nav button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 0; background: none; color: var(--ink-2); font-weight: 500; cursor: pointer; text-align: start; }
.sec-nav button:hover { background: var(--surface-2); color: var(--navy-900); }
.sec-nav button.on { background: var(--gold-100); color: var(--gold-600); font-weight: 600; }
.sec-nav .ic { font-size: 17px; }

/* modal & drawer */
.overlay { position: fixed; inset: 0; background: rgba(7,15,28,.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 16px; width: 520px; max-width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); }
.modal.wide { width: 860px; } .modal.xl { width: 1100px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border-2); gap: 10px; }
.modal-h h2 { font-size: 17px; color: var(--navy-900); }
.modal-b { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--border-2); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.drawer-ov { position: fixed; inset: 0; background: rgba(7,15,28,.35); z-index: 90; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: 560px; max-width: 100%; background: #fff; z-index: 91; display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(0,0,0,.25); animation: slide .16s; }
@keyframes slide { from { transform: translateX(-30px); opacity: 0; } }
.toasts { position: fixed; bottom: 20px; left: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 500; box-shadow: 0 10px 20px -8px rgba(0,0,0,.4); animation: fade .15s; max-width: 380px; }
.toast.err { background: var(--bad); }

/* login */
.login { min-height: 100vh; display: flex; background: #fff; }
.login .art-side { width: 44%; background: radial-gradient(ellipse at 50% 0%, rgba(201,162,75,.35), transparent 60%), linear-gradient(160deg, var(--navy-800), var(--navy-950)); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 60px; }
.login .art-side h2 { font-size: 34px; margin: 24px 0 8px; } .login .art-side p { opacity: .75; font-size: 16px; }
.login .form-side { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .box { width: 400px; max-width: 100%; display: flex; flex-direction: column; gap: 16px; }
.login h1 { font-size: 26px; color: var(--navy-900); }
.login .input { height: 46px; font-size: 15px; } .login .btn { height: 46px; font-size: 15px; }
.otp { letter-spacing: .5em; text-align: center; font-size: 22px !important; direction: ltr; }

/* builder */
.bld { display: flex; flex-direction: column; height: calc(100vh - 62px); }
.bld-top { min-height: 56px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; padding: 8px 16px; flex-wrap: wrap; }
.bld-body { flex: 1; display: flex; min-height: 0; }
.bld-l { width: 280px; flex: none; background: #fff; border-inline-end: 1px solid var(--border); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.bld-r { width: 360px; flex: none; background: #fff; border-inline-start: 1px solid var(--border); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.bld-c { flex: 1; min-width: 0; background: #E9EBEF; display: flex; padding: 16px; overflow: hidden; }
.bld-frame { background: #fff; border-radius: 10px; box-shadow: 0 10px 30px -14px rgba(0,0,0,.3); overflow: hidden; }
.bld-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.blk { display: flex; align-items: center; gap: 8px; min-height: 42px; border: 1px solid var(--border); border-radius: 10px; padding: 0 8px; cursor: pointer; background: #fff; }
.blk:hover { border-color: #CDD1D9; }
.blk.on { border-color: var(--gold); background: var(--gold-100); }
.blk.off .t { color: var(--muted); text-decoration: line-through; }
.blk .grip { color: #B9BDC7; cursor: grab; font-size: 16px; } .blk .t { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk.drag-over { box-shadow: 0 -3px 0 var(--gold); }
.lib { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lib button { border: 1px dashed #CDD1D9; border-radius: 10px; padding: 10px 6px; text-align: center; font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; align-items: center; background: #fff; cursor: pointer; }
.lib button:hover { border-color: var(--gold); background: var(--gold-100); }
.lib .ic { font-size: 19px; color: var(--navy-600); }
.sec-t { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.list-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.list-item .lh { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.imgpick { display: flex; gap: 10px; align-items: center; }
.imgpick .th { width: 84px; height: 56px; border-radius: 8px; background: #E9EBEF center / cover no-repeat; border: 1px solid var(--border); flex: none; display: grid; place-items: center; color: var(--muted); }

/* media */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mitem { border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--border); cursor: pointer; position: relative; }
.mitem.on { outline: 2px solid var(--gold); outline-offset: -2px; }
.mitem .th { height: 110px; background: #E9EBEF center / cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 28px; }
.mitem .nm { padding: 7px 9px; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.dropzone { border: 2px dashed #CDD1D9; border-radius: 14px; padding: 18px; text-align: center; color: var(--muted); background: #fff; }
.dropzone.over { border-color: var(--gold); background: var(--gold-100); }

/* rich text */
.rte-bar { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--surface-2); }
.rte { min-height: 260px; border: 1px solid var(--border); border-radius: 0 0 10px 10px; padding: 12px 14px; background: #fff; line-height: 1.9; outline: none; overflow-y: auto; max-height: 520px; }
.rte:focus { border-color: var(--gold); } .rte h2 { font-size: 21px; margin: 10px 0 6px; } .rte h3 { font-size: 18px; margin: 8px 0 4px; } .rte p { margin-bottom: 8px; } .rte ul, .rte ol { padding-inline-start: 22px; } .rte blockquote { border-inline-start: 3px solid var(--gold); padding-inline-start: 12px; color: var(--ink-2); } .rte img { max-width: 100%; border-radius: 8px; } .rte a { color: var(--info); text-decoration: underline; }

.checkin { max-width: 560px; margin: 0 auto; }
.checkin video { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 4 / 3; object-fit: cover; }
.result { border-radius: 14px; padding: 18px; text-align: center; font-size: 16px; }
.result.ok { background: var(--ok-bg); color: #145236; } .result.warn { background: var(--warn-bg); color: #6B4A10; } .result.bad { background: var(--bad-bg); color: var(--bad); }
.result b { font-size: 22px; display: block; }

@media (max-width: 1200px) {
  .kpis, .kpis.five { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dash-grid3 { grid-template-columns: 1fr; }
  .bld-l { width: 230px; } .bld-r { width: 300px; }
}
@media (max-width: 900px) {
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; transform: translateX(100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .top .menu-btn { display: inline-flex; }
  .content { padding: 16px; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; }
  .login .art-side { display: none; }
  .bld-body { flex-direction: column; overflow-y: auto; } .bld-l, .bld-r { width: auto; } .bld-c { min-height: 70vh; }
  .me div { display: none; }
  .ev-editor { grid-template-columns: 1fr; }
  .sec-nav { position: static; flex-direction: row; overflow-x: auto; }
  .sec-nav button { white-space: nowrap; }
  .kpis, .kpis.five { grid-template-columns: 1fr 1fr; }
  .ph .acts { width: 100%; }
}
