/* Oqeria — live demos + playground */
.demo-head { padding: 150px 0 30px; position: relative; }
.demo-head::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 70% at 90% 0%, color-mix(in srgb, var(--brand-2) 14%, transparent), transparent 70%), radial-gradient(40% 70% at 0% 100%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%); }
.demo-head h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.demo-stage { padding-bottom: 40px; }
.demo-note { color: var(--muted); margin: 14px 4px 0; }
.demo-nav { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 70px; padding-top: 28px; border-top: 1px solid var(--line); }
.demo-nav > a:not(.btn) { font-weight: 600; color: var(--text-2); }
.demo-nav > a:not(.btn):hover { color: var(--brand-2); }

.browser { border-radius: 22px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow), 0 50px 120px -60px var(--glow); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; } .browser-bar i:nth-child(2) { background: #FEBC2E; } .browser-bar i:nth-child(3) { background: #28C840; }
.browser-bar .url { flex: 1; margin: 0 10px; padding: 6px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: .78rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.b-reset { border: 1px solid var(--line-2); background: transparent; border-radius: 8px; padding: 5px 12px; font-size: .8rem; cursor: pointer; color: var(--text-2); }
.b-reset:hover { color: var(--text); border-color: var(--text-2); }
.demo-root { position: relative; min-height: 560px; padding: 22px; color: var(--text); font-size: .95rem; }
.pad { padding: 20px; }

/* shared demo atoms */
.dchip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: .86rem; color: var(--text-2); transition: .25s; white-space: nowrap; }
.dchip:hover { color: var(--text); border-color: var(--text-2); }
.dchip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.dbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; border: 0; background: var(--grad); color: #fff; font-weight: 600; cursor: pointer; transition: transform .2s, filter .2s; font-size: .92rem; }
.dbtn:hover { filter: brightness(1.08); }
.dbtn:active { transform: scale(.96); }
.dbtn:disabled { opacity: .6; cursor: wait; }
.dbtn.wide { width: 100%; padding: 13px; }
.dbtn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.dstat { padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.dstat small { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.dstat b { display: block; font: 600 1.35rem/1.3 var(--display); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dstat em { font-style: normal; font-size: .75rem; }
.dstat .up { color: var(--ok); }
.dempty { color: var(--muted); padding: 20px 0; text-align: center; }
.dlabel { font: 500 .76rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.demo-root input, .demo-root select { font: inherit; font-size: 16px; color: var(--text); background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.demo-root input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.grow { flex: 1; min-width: 0; }
.okmark { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 700; color: #07090F; background: var(--grad); animation: popIn .6s var(--ease); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.tag { font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-2); }

/* ---------- e-commerce ---------- */
.ec { position: relative; min-height: 520px; overflow: hidden; }
.ec-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ec-logo { font: 700 1.2rem var(--display); }
.ec-logo span { color: var(--brand-2); font-weight: 500; }
.ec-search { flex: 1; }
.ec-cartbtn { position: relative; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; font-weight: 600; }
.ec-cartbtn.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.18); } }
.ec-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--lime); color: #07090F; font-size: .78rem; }
.ec-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.ec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ec-card { border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i) * 40ms); transition: transform .3s var(--ease), border-color .3s; }
.ec-card:hover { transform: translateY(-4px); border-color: var(--line-2); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } }
.ec-art { height: 120px; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h) 80% 70%), hsl(calc(var(--h) + 40) 75% 55%)); }
.ec-art span { font: 700 1.6rem var(--display); color: rgba(255,255,255,.9); text-shadow: 0 2px 10px rgba(0,0,0,.15); }
.ec-info { padding: 12px; }
.ec-info small { color: var(--muted); font-size: .74rem; }
.ec-info h4 { margin: 2px 0 8px; font-size: .98rem; }
.ec-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ec-add { padding: 7px 12px; border-radius: 8px; border: 0; background: var(--text); color: var(--bg); font-weight: 600; cursor: pointer; font-size: .82rem; transition: .25s; }
.ec-add.done { background: var(--ok); color: #07090F; }
.ec-fly { position: fixed; z-index: 600; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--grad); pointer-events: none; }
.ec-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%); z-index: 3; background: var(--surface); border-left: 1px solid var(--line); padding: 18px; transform: translateX(105%); transition: transform .5s var(--ease); display: flex; flex-direction: column; overflow-y: auto; }
.ec-drawer.open { transform: none; }
.ec-scrim { position: absolute; inset: 0; z-index: 2; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .4s; }
.ec-scrim.open { opacity: 1; pointer-events: auto; }
.ec-dhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ec-close { border: 0; background: var(--bg-2); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.ec-lines { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.ec-lines li { display: flex; align-items: center; gap: 10px; }
.ec-lines small { display: block; color: var(--muted); }
.ec-mini { width: 40px; height: 40px; border-radius: 10px; flex: none; background: linear-gradient(135deg, hsl(var(--h) 80% 70%), hsl(calc(var(--h) + 40) 75% 55%)); }
.ec-qty { display: flex; align-items: center; gap: 8px; }
.ec-qty button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 1rem; }
.ec-coupon { display: flex; gap: 8px; margin-bottom: 12px; }
.ec-coupon input { flex: 1; }
.ec-coupon button { border: 1px solid var(--line-2); background: transparent; border-radius: 10px; padding: 0 14px; cursor: pointer; font-weight: 600; }
.ec-sum { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin: 0 0 12px; }
.ec-sum dt { color: var(--text-2); } .ec-sum dd { margin: 0; text-align: right; }
.ec-sum .tot { font-weight: 700; font-size: 1.1rem; color: var(--text); padding-top: 8px; border-top: 1px solid var(--line); }
.good { color: var(--ok); }
.ec-note { color: var(--muted); font-size: .8rem; margin: 6px 0 10px; }
.ec-pay { display: grid; gap: 10px; }
.ec-methods { display: grid; gap: 6px; }
.ec-methods label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.ec-methods input { accent-color: var(--brand); width: 18px; height: 18px; }
.ec-done, .bk-done { text-align: center; padding: 30px 10px; }
.ec-done p, .bk-done p { color: var(--text-2); }

/* ---------- CRM ---------- */
.crm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.crm-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.crm-q { flex: 1 1 200px; }
.crm-add { display: flex; gap: 8px; flex-wrap: wrap; flex: 2 1 420px; }
.crm-add input { flex: 1 1 110px; }
.crm-board { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.crm-col { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 260px; transition: border-color .2s, background-color .2s; }
.crm-col.over { border-color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 8%, var(--bg-2)); }
.crm-col header { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 4px 4px 10px; }
.crm-col header span { color: var(--muted); font-size: .76rem; }
.crm-list { display: grid; gap: 8px; }
.crm-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: grab; touch-action: none; user-select: none; transition: transform .2s, box-shadow .2s; }
.crm-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.crm-card.dragging { opacity: .35; }
.crm-card.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 var(--brand-2); transform: scale(1.03); } 100% { box-shadow: 0 0 0 10px transparent; } }
.crm-ghost { position: fixed; left: 0; top: 0; z-index: 700; pointer-events: none; box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.crm-card b { display: block; font-size: .9rem; }
.crm-card small { color: var(--muted); font-size: .76rem; }
.crm-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: hsl(var(--h) 60% 50%); }
.crm-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; font-size: .82rem; }
.crm-next { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; }
.crm-next:hover { background: var(--text); color: var(--bg); }
.crm-won { color: var(--lime); }
.crm-tip { color: var(--muted); font-size: .8rem; margin: 10px 0 0; }

/* ---------- AI chat ---------- */
.ai { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; height: 560px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg-2); }
.ai-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.ai-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #07090F; background: var(--grad); }
.ai-head small { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.ai-head i.on { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.ai-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 80%; padding: 11px 14px; border-radius: 16px; line-height: 1.5; animation: msgIn .35s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ai-msg.me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-topic { display: block; margin-top: 6px; font: normal .7rem var(--mono); color: var(--muted); }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing b { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); animation: dots 1.2s infinite; }
.typing b:nth-child(2) { animation-delay: .15s; } .typing b:nth-child(3) { animation-delay: .3s; }
.ai-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 0; scrollbar-width: none; }
.ai-form { display: flex; gap: 8px; padding: 12px 16px 16px; }
.ai-form input { flex: 1; }

/* ---------- automation ---------- */
.au { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.au-flow { display: grid; }
.au-node { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1.5px solid var(--line); transition: border-color .3s, box-shadow .3s, opacity .3s; }
.au-node small { color: var(--muted); font-size: .74rem; display: block; }
.au-node.off { opacity: .45; }
.au-node.busy { border-color: var(--brand-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 15%, transparent); }
.au-node.ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.au-node.skip { border-style: dashed; }
.au-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); font-size: 1.15rem; flex: none; }
.au-state { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); }
.au-node.busy .au-state { border-color: var(--brand-2); border-top-color: transparent; animation: spin .7s linear infinite; }
.au-node.ok .au-state { border-color: var(--ok); background: var(--ok); position: relative; }
.au-node.ok .au-state::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #07090F; font-size: .75rem; font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }
.au-link { height: 22px; display: flex; justify-content: center; }
.au-link i { width: 2px; height: 100%; background: linear-gradient(var(--brand), var(--brand-2)); background-size: 100% 200%; animation: flowV 1s linear infinite; opacity: .7; }
@keyframes flowV { to { background-position: 0 -200%; } }
.au-ctrl { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.au-auto { display: flex; align-items: center; gap: 8px; color: var(--text-2); cursor: pointer; }
.au-auto input { width: 18px; height: 18px; accent-color: var(--brand); }
.sw { position: relative; width: 38px; height: 22px; flex: none; cursor: pointer; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: .25s; pointer-events: none; }
.sw span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.sw input:checked + span { background: var(--brand); }
.sw input:checked + span::after { transform: translateX(16px); }
.sw input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.au-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.au-log { height: 380px; overflow-y: auto; padding: 12px; border-radius: 14px; background: #05070C; color: #C9D3E6; font-size: .8rem; border: 1px solid var(--line); }
.au-lh { color: #6F7A93; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; }
.au-l { padding: 3px 0; animation: msgIn .3s var(--ease); }
.au-l span { color: #6F7A93; }
.au-l.hl { color: #22D3EE; } .au-l.good { color: #34D399; } .au-l.dim { color: #7F8AA3; }

/* ---------- analytics ---------- */
.an-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.an-live { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.an-live i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); animation: ping 1.6s infinite; }
.an-live b { color: var(--text); font: 600 1.2rem var(--display); }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; cursor: pointer; color: var(--text-2); font-size: .86rem; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.an-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.an-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.an-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-width: 0; }
.an-main { grid-column: span 2; }
.an-ch { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.an-ch small { color: var(--muted); font-size: .75rem; }
.an-main canvas { width: 100%; height: 220px; display: block; }
.an-bars { display: grid; gap: 10px; }
.an-bar { display: grid; grid-template-columns: 78px 1fr 40px; gap: 8px; align-items: center; font-size: .84rem; }
.an-bar > div { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.an-bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 4px; transition: width 1s var(--ease); }
.an-bar i.go { width: var(--w); }
.an-bar b { text-align: right; font-weight: 600; }
.an-donut { display: flex; align-items: center; gap: 16px; }
.dn { width: 110px; height: 110px; border-radius: 50%; flex: none; background: conic-gradient(var(--brand) 0 78%, var(--brand-2) 78% 97%, var(--lime) 97% 100%); -webkit-mask: radial-gradient(circle, transparent 52%, #000 53%); mask: radial-gradient(circle, transparent 52%, #000 53%); animation: dnIn 1.2s var(--ease); }
@keyframes dnIn { from { transform: rotate(-120deg) scale(.6); opacity: 0; } }
.an-donut ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; }
.an-donut li i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.c1 { background: var(--brand); } .c2 { background: var(--brand-2); } .c3 { background: var(--lime); }
.an-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .82rem; }
.an-feed li { display: flex; gap: 8px; align-items: baseline; animation: msgIn .4s var(--ease); color: var(--text-2); }
.an-feed li > i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); flex: none; transform: translateY(-2px); }
.an-feed small { margin-left: auto; color: var(--muted); }
.an-feed .mono { font-size: .75rem; }
.an-tp { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .86rem; }
.an-tp li { display: flex; justify-content: space-between; gap: 8px; }
.an-tp .mono { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- booking ---------- */
.bk { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.bk-svc { display: grid; gap: 8px; margin-bottom: 20px; }
.bk-s { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg-2); cursor: pointer; text-align: left; transition: .25s; }
.bk-s small { color: var(--muted); }
.bk-s.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.bk-cal { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--bg-2); }
.bk-mh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bk-mh button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 1.1rem; }
.bk-mh button:disabled { opacity: .3; cursor: default; }
.bk-wd, .bk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.bk-wd span { font-size: .72rem; color: var(--muted); padding: 4px 0; }
.bk-days button { aspect-ratio: 1; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-weight: 500; transition: .2s; }
.bk-days button:hover:not(:disabled) { background: var(--surface-2); }
.bk-days button:disabled { opacity: .28; cursor: not-allowed; text-decoration: line-through; }
.bk-days button.today { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.bk-days button.on { background: var(--grad); color: #fff; }
.bk-date { font-weight: 600; margin: 0 0 10px; }
.bk-sg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.bk-sg button { padding: 10px 6px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg-2); cursor: pointer; font-size: .86rem; transition: .2s; animation: cardIn .4s var(--ease) both; }
.bk-sg button:hover:not(:disabled) { border-color: var(--brand-2); }
.bk-sg button:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.bk-sg button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.bk-f { display: grid; gap: 10px; animation: cardIn .4s var(--ease); }
.bk-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- playground ---------- */
.pg { border-radius: 20px; border: 1px solid var(--line-2); overflow: hidden; background: #0A0D15; color: #DDE3EE; box-shadow: var(--shadow); }
.pg-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); background: #0E121C; }
.pg-tabs { display: flex; gap: 4px; }
.pg-tabs button, .pg-actions button { border: 0; background: transparent; color: #9AA5BC; padding: 8px 14px; border-radius: 8px; cursor: pointer; font: 500 .84rem var(--mono); }
.pg-tabs button.on { background: #1A2030; color: #fff; }
.pg-actions { margin-left: auto; display: flex; gap: 4px; }
.pg-actions button:hover, .pg-tabs button:hover { color: #fff; background: #161B28; }
.pg-actions [data-run] { background: linear-gradient(135deg, #7C5CFF, #22D3EE); color: #fff; }
.pg-select select { background: #161B28; color: #DDE3EE; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 7px 10px; font: .82rem var(--mono); }
.pg-body { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; }
.pg-editors { position: relative; border-right: 1px solid rgba(255,255,255,.08); }
.pg-ed { position: absolute; inset: 0; display: none; }
.pg-ed.on { display: flex; }
.pg-lines { width: 44px; flex: none; padding: 16px 8px 16px 0; text-align: right; color: #4B5570; font: .86rem/1.6 var(--mono); white-space: pre; overflow: hidden; user-select: none; background: #0A0D15; }
.pg-ed textarea { flex: 1; resize: none; border: 0; outline: none; padding: 16px 16px 16px 10px; background: transparent; color: #E6EBF5; font: .86rem/1.6 var(--mono); tab-size: 2; white-space: pre; overflow: auto; caret-color: #22D3EE; }
.pg-out { display: flex; flex-direction: column; background: #fff; }
.pg-out-bar { display: flex; justify-content: space-between; padding: 8px 12px; font-size: .74rem; background: #0E121C; color: #8792A8; border-bottom: 1px solid rgba(255,255,255,.08); }
.pg-out iframe { flex: 1; width: 100%; border: 0; min-height: 340px; background: #fff; }
.pg-console { height: 140px; overflow-y: auto; background: #05070C; color: #C9D3E6; font-size: .78rem; padding: 8px 12px; border-top: 1px solid rgba(255,255,255,.08); }
.pg-c-head { color: #6F7A93; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; margin-bottom: 4px; }
.pg-c { padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,.04); white-space: pre-wrap; word-break: break-word; }
.pg-error { color: #F87171; } .pg-warn { color: #FBBF24; } .pg-info { color: #22D3EE; }

@media (max-width: 1080px) {
  .ec-grid { grid-template-columns: repeat(3, 1fr); }
  .au, .bk { grid-template-columns: 1fr; }
  .an-grid { grid-template-columns: 1fr 1fr; }
  .an-main { grid-column: span 2; }
}
@media (max-width: 680px) {
  .demo-head { padding: 120px 0 20px; }
  .demo-root { padding: 14px; min-height: 480px; }
  .ec-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ec-art { height: 90px; }
  .ec-top { flex-wrap: wrap; }
  .ec-search { order: 3; flex-basis: 100%; }
  .ec-logo { margin-right: auto; }
  .crm-stats, .an-kpis { grid-template-columns: 1fr 1fr; }
  .crm-board { grid-template-columns: repeat(4, 78vw); scroll-snap-type: x mandatory; }
  .crm-col { scroll-snap-align: start; }
  .ai { height: 520px; }
  .ai-msg { max-width: 90%; }
  .au-stats { grid-template-columns: 1fr 1fr 1fr; }
  .au-log { height: 260px; }
  .an-grid { grid-template-columns: 1fr; }
  .an-main { grid-column: auto; }
  .bk-sg { grid-template-columns: repeat(2, 1fr); }
  .pg-body { grid-template-columns: 1fr; }
  .pg-editors { height: 340px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .pg-actions { margin-left: 0; }
  .dstat b { font-size: 1.1rem; }
}
