/* ==========================================================================
   Cafentra demo — interactive module simulations (Admin / Client / Server)
   Ported from the cafentra-design ui_kits into vanilla CSS on the site tokens.
   ========================================================================== */

.demo-hero { padding: 92px 0 24px; text-align: center; }
.demo-hero h1 { font-size: clamp(28px, 4.4vw, 46px); margin: 18px 0 14px; }
.demo-hero .lead { color: var(--text-mid); font-size: clamp(15px, 2vw, 19px); max-width: 640px; margin: 0 auto; }

/* Module tabs */
.demo-tabs { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.demo-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--surface-card); border: 1px solid var(--border-steel);
  border-radius: var(--r-lg); padding: 16px 26px; cursor: pointer; min-width: 150px;
  color: var(--text-mid); font-family: var(--font-body);
  transition: border-color .2s, transform .2s, box-shadow .2s, color .2s;
}
.demo-tab:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text-hi); }
.demo-tab.active { border-color: var(--accent); box-shadow: var(--glow-brand); color: var(--text-hi); }
.demo-tab i { font-size: 26px; color: var(--accent-2); margin-bottom: 4px; }
.demo-tab.active i { color: var(--accent); }
.demo-tab .t-label { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.demo-tab .t-sub { font-size: 12px; color: var(--text-lo); }
.demo-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }

/* Stage */
.demo-stage-wrap { padding: 24px 0 72px; }
.demo-stage {
  height: 620px; max-height: 78vh;
  background: var(--bg-window); border: 1px solid var(--border-steel);
  border-radius: var(--r-xl); box-shadow: var(--shadow-modal); overflow: hidden;
  /* Chrome inside the stage is LTR (matches the real desktop app), even in RTL pages. */
  direction: ltr;
}
.demo-note { text-align: center; color: var(--text-lo); font-size: 13px; margin-top: 16px; }
.demo-note i { color: var(--accent); vertical-align: -2px; }

/* Generic atoms used by the JS engine */
.dm-root { height: 100%; display: flex; flex-direction: column; font-family: var(--font-body); color: var(--text-soft); line-height: 1.35; }
.dm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: var(--r-md); padding: 9px 14px;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s, box-shadow .18s;
}
.dm-btn:disabled { opacity: .4; cursor: not-allowed; }
.dm-btn-full { width: 100%; justify-content: flex-start; }
.dm-tonal { background: color-mix(in srgb, var(--accent) 15%, var(--bg-window)); color: var(--accent); }
.dm-tonal:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 26%, var(--bg-window)); }
.dm-input {
  width: 100%; background: var(--bg-window); color: #fff;
  border: 1px solid var(--border-default); border-radius: var(--r-xs);
  padding: 8px 10px; font-size: 13px; outline: none; font-family: var(--font-body);
}
.dm-input:focus { border-color: var(--accent); }
.dm-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-mid); margin-bottom: 6px; }
.dm-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.dm-scroll::-webkit-scrollbar-thumb { background: var(--border-steel); border-radius: 4px; }

/* ---------- Window chrome (Admin/Server title bars) ---------- */
.dm-titlebar { background: var(--surface-accent); padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; flex: none; }
.dm-titlebar .brand { display: flex; align-items: center; gap: 8px; }
.dm-titlebar img { width: 22px; height: 22px; }
.dm-titlebar .name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text-hi); }
.dm-titlebar .mod { color: var(--accent); font-size: 13px; }
.dm-winbtns { display: flex; gap: 3px; }
.dm-winbtn { width: 30px; height: 28px; border-radius: var(--r-md); background: var(--surface-card); color: var(--text-mid); display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* ---------- Admin ---------- */
.adm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; background: var(--bg-base); border-bottom: 1px solid var(--border-faint); flex: none; overflow: hidden; }
.adm-tb-left { display: flex; align-items: center; gap: 5px; min-width: 0; overflow-x: auto; }
.adm-tb-btn { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-accent); border-radius: var(--r-sm); padding: 6px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; font-family: var(--font-display); }
.adm-tb-btn i { font-size: 13px; }
.adm-tb-div { width: 1px; height: 18px; background: var(--border-subtle); margin: 0 3px; flex: none; }
.adm-tb-right { display: flex; align-items: center; gap: 6px; flex: none; }
.adm-tb-search-lbl { font-size: 11px; color: var(--text-mid); white-space: nowrap; }
.adm-tb-search { width: 140px; background: var(--bg-window); color: #fff; border: 1px solid var(--border-default); border-radius: var(--r-xs); padding: 5px 8px; font-size: 12px; outline: none; }
.adm-body { flex: 1; display: flex; min-height: 0; }
.adm-side { width: 200px; flex: none; background: var(--bg-base); padding: 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.adm-side-head { display: flex; align-items: center; gap: 8px; margin: 2px 4px 14px; }
.adm-side-head img { width: 26px; height: 26px; }
.adm-side-brand { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: 16px; }
.adm-side-sub { font-size: 11px; color: var(--text-mid); }
.adm-side .menu-lbl { font-size: 10px; font-weight: 700; color: var(--text-mid); letter-spacing: .06em; margin: 2px 0 4px 8px; }
.adm-nav { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; font-size: 13px; font-weight: 600; color: var(--text-mid); background: transparent; border: 0; border-radius: var(--r-md); padding: 9px 12px; cursor: pointer; }
.adm-nav:hover { color: var(--text-hi); background: var(--surface-muted); }
.adm-nav.active { color: var(--text-hi); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.adm-nav.active::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--accent); }
.adm-nav i { width: 20px; text-align: center; font-size: 18px; color: var(--text-lo); }
.adm-nav.active i { color: var(--accent); }
.adm-nav span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-nav .badge { flex: none; font-size: 10px; font-weight: 700; color: #0A0912; background: var(--warning); border-radius: var(--r-pill); padding: 1px 7px; }
.adm-main { flex: 1; display: flex; flex-direction: column; padding: 8px; gap: 6px; min-width: 0; }
.adm-stats { display: flex; gap: 6px; }
.adm-stat { background: var(--surface-card); border-radius: var(--r-lg); padding: 12px 14px; flex: 1; min-width: 0; }
.adm-stat-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.adm-stat .l { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-mid); }
.adm-stat-n { font-family: var(--font-display); font-weight: 700; font-size: 24px; font-variant-numeric: tabular-nums; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.adm-chip { font-size: 10px; font-weight: 600; color: var(--text-mid); background: var(--surface-muted); border-radius: var(--r-sm); padding: 2px 7px; }
.adm-chip.empty { color: var(--text-faint); }
.adm-presets { display: flex; gap: 5px; margin-bottom: 8px; }
.adm-preset { flex: 1; background: color-mix(in srgb, var(--accent) 14%, var(--bg-window)); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--r-sm); padding: 7px 0; font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--font-display); transition: background .15s; }
.adm-preset:hover { background: color-mix(in srgb, var(--accent) 26%, var(--bg-window)); }

/* Admin nav previews */
.adm-preview { flex: 1; overflow-y: auto; padding: 6px 4px; display: flex; flex-direction: column; gap: 10px; }
.adm-pv-head { display: flex; align-items: flex-start; justify-content: space-between; }
.adm-pv-head h3 { font-family: var(--font-display); font-size: 18px; color: var(--text-hi); margin: 0; }
.adm-pv-head p { font-size: 12px; color: var(--text-mid); margin: 3px 0 0; }
.adm-pv-tools { display: flex; align-items: center; gap: 8px; }
.adm-pv-cards { display: flex; gap: 8px; }
.adm-pv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.adm-report-card { display: flex; align-items: center; gap: 12px; cursor: pointer; transition: border-color .15s; border: 1px solid transparent; }
.adm-report-card:hover { border-color: var(--accent); }
.adm-report-card i { font-size: 26px; color: var(--accent); flex: none; }
.adm-report-card .rc-t { font-weight: 700; font-size: 14px; color: var(--text-hi); }
.adm-report-card .rc-s { font-size: 11px; color: var(--text-mid); }
/* bar chart */
.adm-chart { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 10px; }
.adm-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.adm-bar-fill { width: 60%; max-width: 34px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-radius: 4px 4px 0 0; }
.adm-bar-lbl { font-size: 10px; color: var(--text-mid); }
/* gantt */
.adm-gantt-head { display: flex; margin: 0 0 8px 70px; }
.adm-gantt-head span { flex: 1; font-size: 10px; color: var(--text-lo); }
.adm-gantt-row { display: flex; align-items: center; margin-bottom: 6px; }
.adm-gantt-lbl { width: 70px; flex: none; font-size: 12px; font-weight: 700; color: var(--text-soft); }
.adm-gantt-track { position: relative; flex: 1; height: 26px; background: var(--bg-window); border-radius: var(--r-sm); }
.adm-gantt-bar { position: absolute; top: 0; height: 26px; background: color-mix(in srgb, var(--accent) 30%, var(--bg-window)); border: 1px solid var(--accent); border-radius: var(--r-sm); font-size: 10px; color: var(--text-hi); display: flex; align-items: center; padding: 0 8px; overflow: hidden; white-space: nowrap; }
/* requests actions */
.adm-req-actions { display: inline-flex; gap: 6px; }
.adm-req-ok, .adm-req-no { width: 24px; height: 24px; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.adm-req-ok { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.adm-req-no { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.adm-log { max-height: 220px; overflow-y: auto; }
.adm-work { flex: 1; display: flex; gap: 6px; min-height: 0; }
.adm-gridwrap { flex: 1; background: var(--surface-card); border-radius: var(--r-lg); padding: 14px; min-width: 0; display: flex; flex-direction: column; }
.adm-grid { flex: 1; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; }
.pc {
  position: relative; width: 128px; min-height: 126px; border-radius: var(--r-xl); border: 2px solid var(--border-steel);
  padding: 8px; cursor: pointer; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s;
}
.pc .top { display: flex; justify-content: space-between; align-items: center; }
.pc .type { font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: var(--r-sm); background: var(--surface-accent); color: var(--accent); }
.pc .rate { font-size: 9px; color: var(--text-lo); }
.pc .mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pc .mid i { font-size: 24px; }
.pc .pcname { font-size: 14px; font-weight: 700; font-family: var(--font-display); color: var(--text-hi); }
.pc .stat { font-size: 10px; font-weight: 700; }
.pc .foot { min-height: 24px; text-align: center; }
.pc .member { font-size: 9px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc .timer { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc .est { font-size: 10px; font-weight: 700; color: var(--warning-alt); font-variant-numeric: tabular-nums; }
.pc.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 16px rgba(124,92,255,.34); }
.pc-free { background: var(--pc-free-bg); border-color: #1c4a33; } .pc-free .mid i, .pc-free .stat { color: var(--success); }
.pc-inuse { background: var(--pc-inuse-bg); border-color: #5a1a2a; } .pc-inuse .mid i, .pc-inuse .stat { color: var(--danger); }
.pc-locked { background: var(--pc-locked-bg); border-color: #5a4a1a; } .pc-locked .mid i, .pc-locked .stat { color: var(--warning); }
.pc-reserved { background: var(--pc-reserved-bg); border-color: #2e3a6a; } .pc-reserved .mid i, .pc-reserved .stat { color: var(--reserved); }
.pc-offline { background: var(--pc-offline-bg); border-color: var(--border-steel); } .pc-offline .mid i, .pc-offline .stat { color: var(--text-lo); }
.pc-offline .mid i { opacity: .5; }
.adm-panel { width: 290px; flex: none; background: var(--surface-card); border-radius: var(--r-lg); padding: 14px; overflow-y: auto; }
.adm-panel .sel-card { background: var(--bg-base); border-radius: var(--r-lg); padding: 12px; margin-bottom: 12px; }
.adm-panel .sel-name { font-size: 15px; font-weight: 700; color: var(--text-hi); }
.adm-panel .none { color: var(--text-lo); font-size: 13px; }
.adm-divider { height: 1px; background: var(--border-subtle); margin: 12px 0; }
.adm-status { background: var(--bg-darkest); border-top: 1px solid var(--border-faint); padding: 5px 12px; display: flex; align-items: center; gap: 16px; font-size: 11px; flex: none; }
.adm-status .sp { display: flex; align-items: center; gap: 6px; color: var(--text-mid); }
.adm-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

/* ---------- Client ---------- */
.cl-root { height: 100%; display: flex; flex-direction: column; position: relative; background: var(--grad-lock); }
.cl-root.in-session { background: var(--grad-session); }
.cl-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(124,92,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(124,92,255,.06) 1px, transparent 1px); background-size: 34px 34px; pointer-events: none; }
.cl-bar { background: rgba(7,6,13,.72); backdrop-filter: blur(6px); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-subtle); position: relative; z-index: 1; }
.cl-bar .brand { display: flex; align-items: center; gap: 8px; }
.cl-bar .brand img { width: 22px; height: 22px; }
.cl-bar .brand .name { font-family: var(--font-display); color: var(--accent); font-weight: 700; font-size: 16px; }
.cl-bar .clock { color: var(--text-mid); font-variant-numeric: tabular-nums; }
.cl-lockwrap { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.cl-card { width: 380px; max-width: 88%; background: var(--surface-card); border: 1px solid var(--border-steel); border-radius: var(--r-3xl); padding: 36px 34px 30px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }
.cl-card .fp { text-align: center; }
.cl-card .fp i { font-size: 42px; color: var(--accent); filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 55%, transparent)); }
.cl-card h2 { text-align: center; font-size: 22px; margin: 6px 0 2px; }
.cl-card .sub { text-align: center; font-size: 13px; color: var(--text-mid); margin-bottom: 22px; }
.cl-field { width: 100%; background: var(--bg-window); color: #fff; border: 0; border-bottom: 2px solid var(--border-default); padding: 10px; font-size: 15px; outline: none; margin-bottom: 4px; border-radius: var(--r-xs); font-family: var(--font-body); }
.cl-field:focus { border-bottom-color: var(--accent); }
.cl-field-lbl { font-size: 10px; color: var(--text-lo); margin: -2px 0 10px; }
.cl-err { background: var(--danger-bg2); color: var(--danger-soft); border-radius: var(--r-md); padding: 10px 8px; font-size: 12px; margin-bottom: 10px; }
.cl-login-btn { width: 100%; border: 0; border-radius: var(--r-lg); padding: 14px; font-size: 15px; font-weight: 700; background: var(--accent); color: #fff; cursor: pointer; font-family: var(--font-display); transition: background-color .18s; }
.cl-login-btn:hover { background: var(--accent-hover); }
.cl-foot { background: rgba(7,6,13,.72); padding: 10px; text-align: center; color: var(--text-lo); font-size: 11px; position: relative; z-index: 1; }
/* session */
.cl-hud { background: rgba(5,4,9,.78); backdrop-filter: blur(6px); padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-subtle); position: relative; z-index: 1; }
.cl-hud .brand { display: flex; align-items: center; gap: 10px; }
.cl-hud .brand img { width: 20px; height: 20px; }
.cl-hud .brand .name { font-family: var(--font-display); color: var(--accent); font-weight: 700; font-size: 14px; }
.cl-hud .brand .pc { font-weight: 700; font-size: 14px; color: var(--text-hi); }
.cl-timer { text-align: center; }
.cl-timer .v { font-size: 27px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--success); text-shadow: 0 0 14px color-mix(in srgb, var(--success) 45%, transparent); }
.cl-timer.warn .v { color: var(--danger); text-shadow: none; }
.cl-timer .l { font-size: 9px; font-weight: 700; color: var(--text-lo); }
.cl-timer.warn .l { color: var(--danger); }
.cl-hud .right { display: flex; align-items: center; gap: 14px; }
.cl-hud .user { font-weight: 700; font-size: 13px; color: var(--text-hi); }
.cl-logout { background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); border-radius: var(--r-lg); padding: 8px 16px; font-weight: 700; font-size: 12px; cursor: pointer; font-family: var(--font-body); }
.cl-session-body { flex: 1; display: flex; min-height: 0; padding: 16px; gap: 14px; position: relative; z-index: 1; }
.cl-rail { flex: none; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; }
.cl-rail-item { width: 40px; height: 40px; border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--text-mid); background: rgba(22,20,42,.6); border: 1px solid var(--border-faint); cursor: pointer; transition: color .15s, border-color .15s; }
.cl-rail-item:hover { color: var(--accent); border-color: var(--accent); }
.cl-launcher { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cl-search { display: flex; align-items: center; gap: 8px; background: rgba(15,14,26,.7); border: 1px solid var(--border-default); border-radius: var(--r-md); padding: 9px 12px; margin-bottom: 12px; }
.cl-search i { color: var(--text-mid); font-size: 16px; }
.cl-search input { flex: 1; background: none; border: 0; outline: none; color: #fff; font-size: 13px; font-family: var(--font-body); }
.cl-pills { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.cl-pill { border-radius: var(--r-pill); padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; background: var(--surface-card); color: var(--text-soft); border: 1px solid var(--border-faint); font-family: var(--font-body); transition: border-color .15s, color .15s; }
.cl-pill.active { background: var(--surface-accent); color: #fff; border-color: var(--accent); }
.cl-games { flex: 1; overflow-y: auto; }
.cl-games-inner { display: flex; flex-wrap: wrap; gap: 12px; }
.gtile { position: relative; width: 118px; height: 168px; border-radius: var(--r-xl); overflow: hidden; background: var(--surface-card); cursor: pointer; transition: transform .18s, box-shadow .18s; }
.gtile:hover { transform: translateY(-3px); box-shadow: 0 0 22px rgba(124,92,255,.4); }
.gtile .cl-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.9); display: inline-flex; align-items: center; gap: 5px; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 12px; padding: 7px 14px; border-radius: var(--r-pill); opacity: 0; transition: opacity .18s, transform .18s; z-index: 2; pointer-events: none; }
.gtile:hover .cl-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.gtile .art { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.gtile .art i { font-size: 54px; color: rgba(255,255,255,.16); }
.gtile .cat { position: absolute; top: 8px; left: 8px; font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: var(--r-pill); background: rgba(7,6,13,.62); backdrop-filter: blur(4px); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); }
.gtile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 10px; background: linear-gradient(to top, rgba(6,5,12,.95) 14%, rgba(6,5,12,.72) 52%, transparent); }
.gtile .cap .nm { font-size: 12.5px; font-weight: 700; color: #fff; line-height: 1.18; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.cl-order { width: 250px; flex: none; background: var(--surface-card); border-radius: var(--r-2xl); padding: 16px; display: flex; flex-direction: column; border: 1px solid var(--border-faint); }
.cl-order h3 { font-size: 12px; font-weight: 700; color: var(--text-mid); margin: 0 0 12px; display: flex; align-items: center; gap: 6px; }
.cl-order .pick { font-size: 11px; color: var(--text-mid); margin-bottom: 8px; }
.cl-prod { display: flex; justify-content: space-between; background: var(--bg-window); color: #fff; border: 1px solid transparent; border-radius: var(--r-md); padding: 8px 10px; font-size: 12px; cursor: pointer; margin-bottom: 6px; font-family: var(--font-body); transition: border-color .15s; }
.cl-prod.active { background: var(--surface-accent); color: var(--accent); border-color: var(--accent); }
.cl-prod .pr { font-variant-numeric: tabular-nums; }
.cl-price { font-size: 12px; color: var(--warning); margin: 4px 0 12px; }
.cl-send { width: 100%; border: 0; border-radius: var(--r-lg); padding: 12px; font-weight: 700; font-size: 13px; background: var(--accent); color: #fff; cursor: pointer; font-family: var(--font-display); transition: background-color .18s; }
.cl-send:hover { background: var(--accent-hover); }
.cl-sent { background: var(--success-bg); color: var(--success); border-radius: var(--r-md); padding: 8px; font-size: 11px; margin-top: 8px; }
.cl-transfer { width: 100%; margin-top: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface-accent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: var(--r-lg); padding: 10px; font-weight: 700; font-size: 12px; cursor: pointer; font-family: var(--font-body); }
.cl-balance { margin-top: auto; padding-top: 14px; text-align: center; font-size: 12px; color: var(--text-soft); }
.cl-balance .cl-bal-lbl { display: block; font-size: 9px; font-weight: 700; letter-spacing: .08em; color: var(--text-lo); margin-bottom: 2px; }
.cl-balance b { color: var(--success); font-size: 15px; font-family: var(--font-display); }

/* ---------- Server ---------- */
.sv-root { height: 100%; padding: 10px; display: flex; flex-direction: column; }
.sv-header { background: var(--surface-accent); border-radius: var(--r-lg); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex: none; }
.sv-header .brand { display: flex; align-items: center; gap: 10px; }
.sv-header img { width: 28px; height: 28px; }
.sv-header .name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text-hi); }
.sv-header .status { color: var(--accent); font-size: 11px; }
.sv-header .port { color: var(--text-mid); font-size: 12px; }
.sv-header .port b { color: var(--accent); }
.sv-tabs { display: flex; gap: 2px; margin-bottom: 0; flex: none; overflow-x: auto; }
.sv-tab { position: relative; background: transparent; color: var(--text-mid); border: 0; border-radius: 6px 6px 0 0; padding: 10px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font-body); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.sv-tab.active { background: var(--surface-card); color: var(--accent); }
.sv-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 1px; background: var(--accent); }
.sv-subtabs { display: flex; gap: 4px; margin: 8px 0; flex: none; overflow-x: auto; }
.sv-subtab { background: var(--surface-muted); color: var(--text-mid); border: 1px solid var(--border-faint); border-radius: var(--r-pill); padding: 5px 13px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--font-body); white-space: nowrap; transition: color .15s, border-color .15s; }
.sv-subtab:hover { color: var(--text-hi); }
.sv-subtab.active { background: var(--surface-accent); color: var(--accent); border-color: var(--accent); }
.sv-badge { display: inline-block; font-size: 9px; font-weight: 700; color: #06140D; border-radius: var(--r-sm); padding: 1px 6px; margin-inline-end: 3px; }
.sv-settings-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--accent); margin-bottom: 4px; }
.sv-body { flex: 1; display: flex; min-height: 0; }
.sv-card { background: var(--surface-card); border-radius: var(--r-lg); padding: 14px; }
.sv-stats { display: flex; gap: 6px; margin-bottom: 6px; }
.sv-stat { flex: 1; }
.sv-stat .v { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.sv-dash { flex: 1; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.sv-dash-row { flex: 1; display: flex; gap: 6px; min-height: 0; }
.sv-minigrid { flex: 1; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.sv-mini { width: 96px; height: 80px; border-radius: var(--r-lg); padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.sv-mini .nm { font-weight: 700; font-size: 12px; color: var(--text-hi); }
.sv-mini .st { font-size: 10px; font-weight: 700; }
.sv-mini .mbr { font-size: 9px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sv-addrow { display: flex; gap: 6px; margin-top: 8px; }
.sv-addrow .dm-input { flex: 1; }
.sv-logs { width: 290px; flex: none; display: flex; flex-direction: column; }
.sv-logs .list { flex: 1; overflow-y: auto; }
.sv-log { font-family: var(--font-mono); font-size: 11px; color: var(--text-mid); margin: 1px 0; word-break: break-word; }
.sv-table { width: 100%; border-collapse: collapse; }
.sv-table th { padding: 8px; font-size: 11px; font-weight: 700; color: var(--text-mid); text-align: left; background: var(--bg-base); position: sticky; top: 0; }
.sv-table td { padding: 8px; font-size: 12px; border-bottom: 1px solid var(--border-faint); }
.sv-table tr.sel { background: var(--surface-accent); }
.sv-table tbody tr { cursor: pointer; }
.sv-mono { font-family: var(--font-mono); }
.sv-net { width: 270px; flex: none; overflow-y: auto; }
.sv-net .field { margin-bottom: 10px; }
.sv-net .field .k { font-size: 10px; color: var(--text-mid); margin-bottom: 4px; }
.sv-net .field .v { background: var(--bg-window); border: 1px solid var(--border-default); border-radius: var(--r-xs); padding: 7px 9px; font-size: 12px; }
.sv-swatch { width: 18px; height: 18px; border-radius: 3px; display: inline-block; vertical-align: -4px; }
.sv-check { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; font-size: 11px; }

/* RTL: flip only text alignment inside stage tables/nav where it reads better.
   Chrome layout stays LTR to match the desktop app. */
.lang-fa .cl-card h2, .lang-fa .cl-card .sub, .lang-fa .cl-order h3,
.lang-fa .cl-order .pick, .lang-fa .cl-price, .lang-fa .cl-balance { direction: rtl; }
.lang-fa .cl-field, .lang-fa .cl-field-lbl { direction: rtl; text-align: right; }
.lang-fa .cl-pills { direction: rtl; }
.lang-fa .cl-prod { direction: rtl; }

/* Responsive */
@media (max-width: 860px) {
  .demo-stage { height: auto; max-height: none; }
  .adm-side { display: none; }
  .adm-work, .sv-dash-row, .sv-body { flex-direction: column; }
  .adm-panel, .sv-logs, .sv-net { width: 100%; }
  .cl-session-body { flex-direction: column; }
  .cl-order { width: 100%; }
  .demo-tab { min-width: 120px; padding: 12px 18px; }
}
