:root {
  --bg: #06101c;
  --bg-elevated: #0a1726;
  --panel: rgba(12, 27, 43, 0.82);
  --panel-solid: #0d1d2d;
  --panel-soft: #102437;
  --border: rgba(146, 177, 204, 0.14);
  --border-strong: rgba(146, 177, 204, 0.24);
  --text: #f4f8fb;
  --muted: #8498aa;
  --accent: #36e3b2;
  --accent-strong: #18c895;
  --accent-soft: rgba(54, 227, 178, 0.11);
  --blue: #5ba8ff;
  --warning: #f4bb5d;
  --danger: #ff6f7d;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
  --radius: 20px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: rgba(54,227,178,.58) rgba(5,14,25,.74); }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { min-height: var(--app-viewport-height, 100dvh); margin: 0; color: var(--text); color-scheme: dark; background:
  radial-gradient(circle at 78% 9%, rgba(31, 135, 158, .12), transparent 32%),
  radial-gradient(circle at 15% 78%, rgba(44, 180, 132, .07), transparent 28%),
  var(--bg); overflow-x: hidden; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(5,14,25,.82); border-left: 1px solid rgba(146,177,204,.08); }
::-webkit-scrollbar-thumb { min-height: 54px; border: 2px solid rgba(5,14,25,.82); border-radius: 999px; background: linear-gradient(180deg, rgba(72,236,191,.9), rgba(31,174,143,.72)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 0 12px rgba(54,227,178,.12); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #72f2ce, #28cfa1); box-shadow: 0 0 15px rgba(54,227,178,.22); }
::-webkit-scrollbar-thumb:active { background: var(--accent-strong); }
::-webkit-scrollbar-corner { background: rgba(5,14,25,.9); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.ambient { position: fixed; pointer-events: none; filter: blur(90px); opacity: .13; border-radius: 999px; }
.ambient-one { width: 380px; height: 380px; background: #14d6aa; top: -180px; left: 25%; }
.ambient-two { width: 320px; height: 320px; background: #3c78ff; right: -160px; bottom: 0; }

.app-shell { min-height: var(--app-viewport-height, 100dvh); display: grid; grid-template-columns: 250px minmax(0, 1fr); position: relative; z-index: 1; }
.app-shell.is-loading { opacity: .68; }
.launch-error { min-height: var(--app-viewport-height, 100dvh); padding: 24px; display: grid; place-items: center; position: relative; z-index: 5; }
.launch-error-card { width: min(520px, 100%); padding: 38px; text-align: center; border: 1px solid rgba(54,227,178,.24); border-radius: 24px; background: linear-gradient(150deg, rgba(13,34,51,.98), rgba(6,16,28,.98)); box-shadow: var(--shadow), 0 0 70px rgba(54,227,178,.07); }
.launch-error-icon { width: 58px; height: 58px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 18px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(54,227,178,.22); font-size: 28px; }
.launch-error-card h1 { margin: 6px 0 12px; font-size: clamp(24px, 5vw, 34px); letter-spacing: -.8px; }
.launch-error-card > p:not(.eyebrow) { margin: 0 auto 24px; max-width: 420px; color: var(--muted); line-height: 1.65; }
.sidebar { position: sticky; top: 0; height: var(--app-viewport-height, 100dvh); padding: 28px 18px 20px; border-right: 1px solid var(--border); background: rgba(5, 14, 25, .78); backdrop-filter: blur(20px); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: linear-gradient(145deg, rgba(54,227,178,.16), rgba(91,168,255,.09)); border: 1px solid rgba(54,227,178,.25); box-shadow: 0 0 28px rgba(54,227,178,.08); }
.brand-mark svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.brand strong, .brand span { display: block; line-height: 1.05; }
.brand strong { font-size: 19px; letter-spacing: -.4px; }
.brand span { margin-top: 4px; color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: 2.4px; font-weight: 700; }

.nav-list { display: grid; gap: 7px; }
.nav-item { appearance: none; border: 0; background: transparent; width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 13px; color: #91a4b5; cursor: pointer; text-align: left; transition: .2s ease; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, rgba(54,227,178,.13), rgba(54,227,178,.035)); box-shadow: inset 2px 0 var(--accent); }
.nav-icon { flex: 0 0 24px; width: 24px; height: 24px; display: inline-grid; place-items: center; text-align: center; font-size: 18px; line-height: 1; color: var(--accent); }
.nav-item span:last-child { font-size: 14px; font-weight: 600; }

.sidebar-footer { margin-top: auto; }
.system-status { display: flex; align-items: center; gap: 9px; padding: 12px; color: var(--muted); font-size: 12px; }
.system-status i, .preview-live i { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.actor-card { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-top: 1px solid var(--border); }
.avatar { flex: 0 0 auto; width: 37px; height: 37px; border-radius: 12px; display: grid; place-items: center; color: #03251c; background: linear-gradient(145deg, var(--accent), #78efce); font-weight: 800; }
.avatar img, .owner-symbol img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.actor-copy { min-width: 0; }
.actor-copy strong, .actor-copy span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actor-copy strong { font-size: 13px; }
.actor-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }

.workspace { min-width: 0; width: 100%; max-width: 1480px; margin: 0 auto; padding: 22px 34px 54px; }
.topbar {
  min-height: 72px;
  margin-bottom: 18px;
  padding: 13px 15px 13px 17px;
  border: 1px solid rgba(95,168,193,.16);
  border-radius: 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: linear-gradient(115deg, rgba(12,29,45,.78), rgba(7,19,32,.52));
  box-shadow: inset 0 1px rgba(255,255,255,.018);
}
.topbar > div:first-child { min-width: 0; }
.eyebrow { margin: 0 0 5px; color: var(--accent); text-transform: uppercase; letter-spacing: 1.8px; font-size: 9px; font-weight: 800; }
.topbar h1 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.top-actions, .heading-actions { display: flex; align-items: center; gap: 10px; }
.top-tool { white-space: nowrap; }
.top-tool-icon { flex: 0 0 auto; min-width: 18px; height: 18px; display: inline-grid; place-items: center; font-size: 17px; line-height: 1; }
.top-tool.is-refreshing .top-tool-icon { animation: toolSpin .7s linear infinite; }
@keyframes toolSpin { to { transform: rotate(360deg); } }
.fullscreen-prompt { margin: 0 0 12px; }
.fullscreen-cta { appearance: none; width: 100%; min-height: 48px; padding: 0 18px; border: 2px solid rgba(230,255,248,.92); border-radius: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; color: #03231b; background: linear-gradient(135deg, #63efca, #29cda0); box-shadow: 0 9px 28px rgba(36,202,157,.2), inset 0 1px rgba(255,255,255,.36); cursor: pointer; font: inherit; font-size: 17px; font-weight: 800; transition: transform .18s ease, filter .18s ease; }
.fullscreen-cta:hover { transform: translateY(-1px); filter: brightness(1.05); }
.fullscreen-cta:active { transform: translateY(0); }
.fullscreen-cta:disabled { opacity: .72; cursor: wait; }
.fullscreen-check { width: 20px; height: 20px; display: inline-grid; place-items: center; font-size: 18px; line-height: 1; }
.fullscreen-prompt small { display: none; padding: 8px 4px 0; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.4; }
.fullscreen-prompt.has-message small { display: block; }
.telegram-fullscreen .fullscreen-prompt { display: none !important; }
.button { appearance: none; border: 1px solid transparent; border-radius: 12px; min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-size: 13px; font-weight: 700; transition: transform .18s ease, background .18s ease, border .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: wait; transform: none; }
.button-primary { color: #03231b; background: linear-gradient(135deg, #4ae9bd, #24ca9d); box-shadow: 0 8px 24px rgba(36,202,157,.16); }
.button-primary:hover { background: linear-gradient(135deg, #69f0cc, #2bd5a6); }
.button-ghost { color: #b7c5d1; border-color: var(--border-strong); background: rgba(255,255,255,.02); }
.button-secondary { color: var(--accent); border-color: rgba(54,227,178,.23); background: var(--accent-soft); }
.full { width: 100%; }

.notice { display: flex; align-items: center; gap: 11px; padding: 11px 14px; margin: 0 0 18px; border: 1px solid rgba(244,187,93,.18); background: rgba(244,187,93,.07); border-radius: 13px; }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 12px rgba(244,187,93,.5); }
.notice strong, .notice small { display: block; }
.notice strong { font-size: 12px; color: #f7d799; }
.notice small { margin-top: 2px; color: #9d988b; font-size: 10px; }

.view { display: none; animation: fadeIn .23s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.panel { border: 1px solid rgba(95, 168, 193, .2); background: linear-gradient(145deg, rgba(15,33,51,.88), rgba(8,21,35,.88)); border-radius: var(--radius); box-shadow: inset 0 1px rgba(255,255,255,.025), 0 0 0 1px rgba(6,16,28,.4), var(--shadow); backdrop-filter: blur(18px); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 14px 0; }
.stat-card { padding: 19px 20px; min-height: 126px; box-shadow: none; }
.stat-card > span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1.1px; font-weight: 700; }
.stat-card strong { display: block; margin: 9px 0 5px; font-size: 30px; letter-spacing: -1.4px; }
.stat-card small { color: #7690a4; font-size: 10px; }
.platform-stats, .team-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cost-card { border-color: rgba(54,227,178,.2); background: linear-gradient(145deg, rgba(54,227,178,.045), rgba(8,25,40,.85)); }
.cost-card strong { color: var(--accent); font-size: 25px; letter-spacing: -1px; }
.platform-overview { display: grid; gap: 14px; margin-bottom: 22px; }
.platform-overview.hidden { display: none; }
.owner-banner { min-height: 142px; padding: 24px; display: grid; grid-template-columns: 62px minmax(220px, 1fr) minmax(230px, 290px); align-items: center; gap: 20px; overflow: hidden; background: radial-gradient(circle at 88% 120%, rgba(54,227,178,.13), transparent 36%), linear-gradient(135deg, rgba(30,75,83,.28), rgba(8,25,40,.9)); }
.owner-symbol { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(54,227,178,.28); border-radius: 18px; color: var(--accent); background: rgba(54,227,178,.08); font-size: 34px; font-weight: 800; }
.owner-banner h2 { margin: 3px 0 6px; font-size: 25px; }
.owner-banner p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.owner-auto-note { max-width: 290px; padding: 13px 15px; border: 1px solid rgba(54,227,178,.2); border-radius: 14px; background: rgba(54,227,178,.055); }
.owner-auto-note b, .owner-auto-note span { display: block; }
.owner-auto-note b { color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
.owner-auto-note span { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.telegram-mini-app .workspace { padding-top: max(46px, calc(22px + var(--tg-content-safe-area-inset-top, 0px))); }
.scope-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 7px 2px 0; }
.scope-heading h3 { margin: 2px 0 0; font-size: 18px; }
.scope-badge { padding: 8px 11px; border: 1px solid var(--border); border-radius: 99px; color: #9fb5c5; background: rgba(255,255,255,.02); font-size: 9px; }
.team-metric-heading { margin-top: 5px; }
.team-scope-panel { padding: 20px; }
.workspace-choice { width: min(280px, 100%); margin-top: 7px; }
.workspace-choice .select-choice-button { min-height: 36px; padding: 7px 11px; border-color: rgba(54,227,178,.28); border-radius: 10px; background: linear-gradient(145deg, rgba(13,38,52,.96), rgba(5,20,31,.96)); }
.workspace-choice .choice-menu { min-width: 240px; }
.workspace-choice .choice-option { min-height: 40px; }
.workspace-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.workspace-card { position: relative; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.014); }
.workspace-card.selected { border-color: rgba(54,227,178,.36); box-shadow: inset 0 0 0 1px rgba(54,227,178,.06); }
.workspace-card-main { width: calc(100% - 38px); padding: 0; border: 0; display: flex; align-items: center; gap: 11px; color: var(--text); background: transparent; cursor: pointer; text-align: left; }
.workspace-card-icon { flex: 0 0 39px; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 800; }
.workspace-card-copy { min-width: 0; }
.workspace-card-copy b, .workspace-card-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card-copy b { font-size: 12px; }
.workspace-card-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.workspace-leaders { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 14px; }
.workspace-leaders small, .workspace-leaders b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-leaders small { color: #667d90; font-size: 8px; text-transform: uppercase; }
.workspace-leaders b { color: #b9c9d4; font-size: 9px; }
.leader-person { min-width: 0; margin-top: 6px; display: flex; align-items: center; gap: 7px; }
.leader-person b { min-width: 0; flex: 1; }
.leader-remove { flex: 0 0 22px; width: 22px; height: 22px; padding: 0; border: 1px solid rgba(255,111,125,.18); border-radius: 7px; display: grid; place-items: center; color: #a7828a; background: rgba(255,111,125,.035); cursor: pointer; font: 400 15px/1 Arial, sans-serif; transition: .18s; }
.leader-remove:hover { color: #ffd7dc; border-color: rgba(255,111,125,.42); background: rgba(255,111,125,.11); }
.leader-avatar { flex: 0 0 25px; width: 25px; height: 25px; border: 1px solid rgba(54,227,178,.16); border-radius: 8px; display: grid; place-items: center; overflow: hidden; color: var(--accent); background: rgba(54,227,178,.08); font-size: 8px; font-weight: 800; }
.leader-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leader-stack { max-height: 76px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 9px; overflow-y: auto; scrollbar-width: thin; }
.leader-empty { display: block; margin-top: 9px; color: var(--muted); font-size: 9px; }
.team-member-section { min-width: 0; }
.team-member-carousel { min-width: 0; margin-top: 6px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 24px; align-items: center; gap: 6px; }
.team-member-arrow { width: 24px; height: 24px; padding: 0; border: 1px solid rgba(54,227,178,.2); border-radius: 7px; display: grid; place-items: center; color: var(--accent); background: rgba(54,227,178,.055); cursor: pointer; font: 700 17px/1 Arial, sans-serif; }
.team-member-arrow:hover { border-color: rgba(54,227,178,.45); background: rgba(54,227,178,.12); }
.team-member-arrow:disabled { opacity: .28; cursor: default; }
.team-member-slide { min-width: 0; }
.team-member-person { min-width: 0; display: flex; align-items: center; gap: 7px; }
.team-member-copy { min-width: 0; flex: 1; }
.team-member-copy b, .team-member-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-member-copy em { margin-top: 2px; color: var(--muted); font-size: 8px; font-style: normal; }
.team-member-counter { color: #6f8799; font-size: 8px; font-variant-numeric: tabular-nums; }
.workspace-edit { position: absolute; top: 12px; right: 12px; }
.two-column { display: grid; grid-template-columns: 1.08fr .92fr; gap: 14px; }
.section-panel { padding: 22px; box-shadow: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-heading h3 { margin: 0; font-size: 16px; }
.text-button { appearance: none; border: 0; padding: 5px; color: var(--accent); background: transparent; cursor: pointer; font-size: 11px; }
.compact-list { display: grid; gap: 8px; }
.compact-person { display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.014); }
.compact-person .mini-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #b9f8e5; background: rgba(54,227,178,.09); font-size: 12px; font-weight: 800; }
.compact-person div:nth-child(2) { min-width: 0; flex: 1; }
.compact-person strong, .compact-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-person strong { font-size: 12px; }
.compact-person small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.role-tag, .status-tag { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 99px; font-size: 9px; font-weight: 700; }
.role-tag { color: #b5c5d2; background: rgba(255,255,255,.045); }
.status-tag.active { color: var(--accent); background: var(--accent-soft); }
.status-tag.inactive { color: var(--danger); background: rgba(255,111,125,.08); }
.language-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.language-chip { padding: 12px 13px; min-width: 140px; flex: 1; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.014); }
.request-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.request-settings-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 14px; }
.request-space-settings, .request-worker-settings { min-width: 0; }
.request-section-note { margin: -4px 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.request-routing-note { padding: 15px; border: 1px solid rgba(54,227,178,.2); border-radius: 14px; display: grid; gap: 6px; background: rgba(54,227,178,.045); }
.request-routing-note b { color: var(--accent); font-size: 15px; }
.request-routing-note span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.request-worker-heading { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.request-worker-heading b { font-size: 14px; }
.request-worker-heading span { min-width: 28px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--accent); text-align: center; font-size: 12px; font-weight: 800; }
.request-preview { margin-top: 18px; padding: 15px; border: 1px solid rgba(54,227,178,.2); border-radius: 14px; display: grid; gap: 9px; background: rgba(54,227,178,.045); }
.request-preview > span { color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: .9px; font-weight: 800; }
.request-preview > b { color: var(--text); font-size: 17px; line-height: 1.45; }
.request-preview > i { width: fit-content; padding: 8px 14px; border-radius: 9px; color: #05251d; background: var(--accent); font-size: 14px; font-style: normal; font-weight: 800; }
.request-recipient-list, .request-channel-list, .request-recent-list { display: grid; gap: 9px; }
.request-channel-counter { margin: -5px 0 10px; display: flex; justify-content: flex-end; }
.request-recipient { min-width: 0; padding: 11px; border: 1px solid var(--border); border-radius: 13px; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; background: rgba(255,255,255,.014); cursor: pointer; transition: border-color .18s, background .18s; }
.request-recipient:hover { border-color: rgba(54,227,178,.3); background: rgba(54,227,178,.035); }
.request-recipient.disabled { opacity: .5; cursor: not-allowed; }
.request-recipient input { width: 18px; height: 18px; accent-color: var(--accent); }
.request-avatar { width: 38px; height: 38px; border: 1px solid rgba(54,227,178,.18); border-radius: 11px; display: grid; place-items: center; overflow: hidden; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 800; }
.request-avatar img { width: 100%; height: 100%; object-fit: cover; }
.request-recipient > span { min-width: 0; }
.request-recipient b, .request-recipient small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.request-recipient b { font-size: 16px; }
.request-recipient small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.request-recipient > i { color: var(--accent); font-size: 12px; font-style: normal; font-weight: 700; }
.request-worker-summary { grid-template-columns: auto minmax(0, 1fr) auto; cursor: default; }
.request-worker-summary:hover { border-color: var(--border); background: rgba(255,255,255,.014); }
.request-save-row { grid-column: 1 / -1; padding: 15px 17px; border: 1px solid var(--border); border-radius: 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: rgba(255,255,255,.018); }
.request-save-row span { color: var(--muted); font-size: 14px; }
.request-bottom-grid { margin-top: 14px; }
.request-channel { padding: 11px; border: 1px solid var(--border); border-radius: 13px; display: grid; grid-template-columns: auto minmax(150px, 1fr) minmax(210px, .8fr) auto; align-items: center; gap: 11px; }
.request-channel > span { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); font-size: 19px; }
.request-channel-main { min-width: 0; }
.request-channel b, .request-channel small { display: block; }
.request-channel b { font-size: 16px; }
.request-channel small { margin-top: 4px; color: var(--muted); font-size: 13px; }
.request-channel-route { min-width: 0; display: grid; gap: 5px; }
.request-channel-route > small { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.request-channel-route .choice-control { min-width: 0; }
.request-channel-route .select-choice-button { min-height: 38px; }
.request-channel-actions { display: flex; align-items: center; gap: 9px; }
.request-channel-actions > i { color: var(--accent); font-size: 12px; font-style: normal; font-weight: 700; }
.request-channel-actions > i.warning { color: #ffcf72; }
.request-channel-actions > button { width: 28px; height: 28px; padding: 0; border: 1px solid rgba(255,111,125,.25); border-radius: 8px; display: inline-grid; place-items: center; color: #ffc3c9; background: rgba(255,111,125,.07); cursor: pointer; font-size: 18px; line-height: 1; }
.request-channel-actions > button:hover { border-color: rgba(255,111,125,.55); background: rgba(255,111,125,.16); }
.request-help { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.request-recent { position: relative; padding: 11px 105px 11px 12px; border: 1px solid var(--border); border-radius: 13px; display: grid; gap: 3px; }
.request-recent b { font-size: 16px; }
.request-recent > span, .request-recent small { color: var(--muted); font-size: 13px; }
.request-recent > i { position: absolute; top: 11px; right: 11px; font-style: normal; }
.language-chip b, .language-chip small { display: block; }
.language-chip b { font-size: 11px; }
.language-chip small { margin-top: 5px; color: var(--muted); font-size: 9px; }

.page-heading { min-height: 106px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 14px 2px 25px; }
.page-heading h2 { margin: 0; font-size: 31px; letter-spacing: -1.2px; }
.page-heading p:last-child { max-width: 620px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.table-panel { overflow: hidden; box-shadow: none; }
.table-toolbar { min-height: 67px; padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.search { display: flex; align-items: center; gap: 8px; min-width: 300px; border: 1px solid var(--border); border-radius: 11px; padding: 0 11px; background: rgba(2,10,18,.28); }
.search span { color: var(--muted); }
.search input { width: 100%; height: 37px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.table-toolbar .muted { font-size: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th { padding: 13px 16px; color: #657c90; text-align: left; text-transform: uppercase; letter-spacing: .8px; font-size: 8px; }
td { padding: 14px 16px; border-top: 1px solid var(--border); font-size: 11px; vertical-align: middle; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell strong, .person-cell small { display: block; }
.person-cell small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.row-action { appearance: none; border: 1px solid var(--border); border-radius: 9px; background: transparent; color: var(--muted); width: 32px; height: 30px; padding: 0; display: inline-grid; place-items: center; cursor: pointer; line-height: 1; }
.row-action:hover { color: var(--text); border-color: var(--border-strong); }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.profile-card { min-height: 240px; padding: 22px; position: relative; overflow: hidden; box-shadow: none; display: flex; flex-direction: column; }
.profile-card::after { content: attr(data-code); position: absolute; right: -2px; bottom: -22px; color: rgba(255,255,255,.025); font-size: 85px; font-weight: 900; letter-spacing: -8px; }
.profile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.profile-symbol { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(54,227,178,.15); font-size: 18px; }
.profile-card h3 { margin: 20px 0 4px; font-size: 17px; }
.profile-card > p { margin: 0 0 18px; color: var(--muted); font-size: 10px; }
.profile-meta { display: grid; gap: 7px; }
.profile-meta div { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 10px; }
.profile-meta b { color: #c2d0da; font-weight: 600; text-align: right; }
.profile-edit { position: relative; z-index: 2; margin-top: 18px; }

.profile-switcher { display: flex; gap: 8px; }
.profile-switcher select { min-width: 230px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 14px; align-items: start; }
.editor-panel, .preview-panel { padding: 24px; box-shadow: none; }
.feature-explainer { margin: 0 0 20px; padding: 14px 16px; border: 1px solid rgba(54,227,178,.16); border-radius: 13px; display: grid; gap: 5px; background: rgba(54,227,178,.045); }
.feature-explainer b { color: var(--accent); font-size: 10px; }
.feature-explainer span { color: #8ca2b2; font-size: 10px; line-height: 1.55; }
.form-head, .preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.form-kicker, .preview-live { color: var(--accent); font-size: 9px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 800; }
.preview-live { display: flex; align-items: center; gap: 7px; }
.form-head h3, .preview-head h3 { margin: 6px 0 0; font-size: 18px; }
.switch { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { display: none; }
.switch > span { width: 37px; height: 21px; border-radius: 99px; background: #2a3946; position: relative; transition: .2s; }
.switch > span::after { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; border-radius: 50%; background: #8394a2; transition: .2s; }
.switch input:checked + span { background: rgba(54,227,178,.27); }
.switch input:checked + span::after { left: 19px; background: var(--accent); }
.switch b { font-size: 10px; }
.client-name-management { margin-top: 22px; }
.client-name-management-note { margin: -4px 0 17px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.client-name-member-list { display: grid; gap: 9px; }
.client-name-member { min-height: 66px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 13px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; background: rgba(4,15,25,.32); }
.client-name-member-copy { min-width: 0; display: grid; gap: 4px; }
.client-name-member-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.client-name-member-copy small { color: var(--muted); font-size: 13px; }
.client-name-member .switch b { min-width: 90px; color: var(--muted); text-align: right; font-size: 14px; }
.client-name-member .switch input:checked ~ b { color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; }
.field:focus-within > span { color: var(--accent); }
.field-wide { grid-column: 1 / -1; }
.field > span { color: #9bafbe; font-size: 9px; text-transform: uppercase; letter-spacing: .7px; font-weight: 700; }
.field small { color: #62788c; font-size: 9px; }
input, select, textarea { width: 100%; border: 1px solid rgba(102, 158, 184, .24); border-radius: 12px; outline: 0; color: var(--text); background-color: rgba(3,12,22,.7); padding: 11px 12px; font-size: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 1px 0 rgba(255,255,255,.015); transition: border .2s, box-shadow .2s, background-color .2s; }
input:hover, select:hover, textarea:hover { border-color: rgba(102, 184, 199, .38); background-color: rgba(4,16,28,.82); }
input:focus, select:focus, textarea:focus { border-color: rgba(54,227,178,.58); background-color: rgba(4,17,28,.9); box-shadow: 0 0 0 3px rgba(54,227,178,.075), inset 0 0 0 1px rgba(54,227,178,.06); }
select { min-height: 42px; appearance: none; padding-right: 38px; background-image: linear-gradient(45deg, transparent 50%, #7794a7 50%), linear-gradient(135deg, #7794a7 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
textarea { line-height: 1.55; resize: vertical; }
option { background: #0c1c2b; }
.choice-control { position: relative; min-width: 0; }
.language-choice input { padding-right: 42px; }
.choice-toggle { position: absolute; z-index: 2; top: 50%; right: 7px; width: 32px; height: 32px; padding: 0; transform: translateY(-50%); border: 0; border-radius: 9px; display: grid; place-items: center; color: #8ea6b8; background: transparent; cursor: pointer; line-height: 1; transition: color .18s, background .18s; }
.choice-toggle:hover { color: var(--accent); background: rgba(54,227,178,.07); }
.choice-control.open .choice-toggle { color: var(--accent); }
.native-choice { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.select-choice-button { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid rgba(102,158,184,.24); border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text); background: rgba(3,12,22,.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); cursor: pointer; text-align: left; font-size: 11px; transition: border .2s, box-shadow .2s, background .2s; }
.select-choice-button:hover { border-color: rgba(102,184,199,.38); background: rgba(4,16,28,.82); }
.choice-chevron { flex: 0 0 auto; width: 8px; height: 8px; display: block; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transform-origin: center; transition: transform .18s ease, color .18s ease; }
.select-choice-button > .choice-chevron { margin: 0 3px 0 8px; color: #7794a7; font-style: normal; }
.choice-control.open .select-choice-button { border-color: rgba(54,227,178,.58); background: rgba(4,17,28,.9); box-shadow: 0 0 0 3px rgba(54,227,178,.075); }
.choice-control.open .choice-chevron { color: var(--accent); transform: translateY(2px) rotate(225deg); }
.choice-menu { display: none; position: absolute; z-index: 80; top: calc(100% + 7px); left: 0; width: 100%; max-height: 265px; overflow-y: auto; padding: 7px; border: 1px solid rgba(54,227,178,.24); border-radius: 14px; background: linear-gradient(155deg, #102536, #081621); box-shadow: 0 22px 55px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.035); scrollbar-width: thin; scrollbar-color: rgba(54,227,178,.38) transparent; }
.choice-control.open .choice-menu { display: grid; gap: 3px; animation: choiceIn .16s ease; }
@keyframes choiceIn { from { opacity: 0; transform: translateY(-5px) scale(.99); } to { opacity: 1; transform: none; } }
.choice-option { width: 100%; min-height: 38px; padding: 9px 11px; border: 1px solid transparent; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #c8d5de; background: transparent; cursor: pointer; text-align: left; font-size: 11px; transition: color .14s, border .14s, background .14s; }
.choice-option:hover, .choice-option:focus { outline: 0; color: #f5fffc; border-color: rgba(54,227,178,.15); background: rgba(54,227,178,.09); }
.choice-option.selected { color: var(--accent); background: rgba(54,227,178,.075); }
.choice-option i { color: var(--accent); font-style: normal; }
.choice-empty { padding: 18px 12px; color: var(--muted); text-align: center; font-size: 10px; }
.language-menu .choice-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 17px; }
.check { display: flex; align-items: center; gap: 8px; color: #a5b7c5; font-size: 10px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--border); }
.save-hint { margin-right: auto; color: var(--accent); font-size: 10px; }
.preview-panel { position: sticky; top: 18px; }
.preview-panel .field { margin-bottom: 13px; }
.message-preview { min-height: 170px; margin-top: 17px; padding: 18px; border: 1px solid rgba(54,227,178,.12); border-radius: 15px 15px 5px 15px; background: linear-gradient(145deg, rgba(54,227,178,.075), rgba(24,72,75,.05)); }
.message-label { color: var(--accent); font-size: 8px; text-transform: uppercase; letter-spacing: 1.1px; font-weight: 800; }
.message-preview p { margin: 12px 0; white-space: pre-wrap; color: #dfe9ee; font-size: 12px; line-height: 1.6; }
.message-preview small { color: var(--muted); font-size: 8px; }

.timeline { display: grid; }
.timeline-item { display: grid; grid-template-columns: 12px 1fr auto; gap: 13px; align-items: start; padding: 15px 4px; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(54,227,178,.06); }
.timeline-item b, .timeline-item small { display: block; }
.timeline-item b { font-size: 11px; }
.timeline-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.timeline-item time { color: #63788a; font-size: 9px; }

.billing-grid { display: grid; grid-template-columns: 1.45fr repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 14px; }
.balance-hero, .billing-stat { min-height: 142px; padding: 22px; }
.balance-hero { border-color: rgba(54,227,178,.3); background: radial-gradient(circle at 90% 110%, rgba(54,227,178,.15), transparent 44%), linear-gradient(145deg, rgba(19,55,65,.76), rgba(7,24,38,.92)); }
.balance-hero > span, .billing-stat > span { color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-size: 9px; font-weight: 800; }
.balance-hero strong, .billing-stat strong { display: block; margin: 13px 0 7px; color: var(--accent); font-size: 28px; letter-spacing: -1px; }
.balance-hero strong { font-size: 34px; }
.balance-hero small, .billing-stat small { color: #7890a2; font-size: 9px; }
.billing-columns { align-items: start; }
.payment-calculation { display: grid; gap: 10px; margin: 17px 0; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: rgba(2,10,18,.25); }
.payment-calculation > span { display: flex; justify-content: space-between; gap: 15px; color: #b8c8d3; }
.payment-calculation small { color: var(--muted); font-size: 10px; }
.payment-calculation b { font-size: 11px; }
.payment-calculation .payment-credit { padding-top: 10px; border-top: 1px solid var(--border); color: var(--accent); }
.payment-note { margin: 0 0 16px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.payment-history { display: grid; }
.payment-row { min-height: 62px; padding: 11px 2px; display: flex; align-items: center; justify-content: space-between; gap: 13px; border-bottom: 1px solid var(--border); }
.payment-row:last-child { border-bottom: 0; }
.payment-row b, .payment-row small { display: block; }
.payment-row b { font-size: 12px; }
.payment-row small { margin-top: 5px; color: var(--muted); font-size: 9px; }

.modal { display: none; position: fixed; inset: 0; z-index: 50; align-items: center; justify-content: center; padding: 18px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(1,7,13,.75); backdrop-filter: blur(9px); }
.modal-card { position: relative; width: min(600px, 100%); max-height: calc(var(--app-viewport-height, 100dvh) - 36px); overflow: auto; padding: 32px; border: 1px solid rgba(54,227,178,.22); border-radius: 23px; background: linear-gradient(155deg, #0c2031, #071522 72%); box-shadow: inset 0 1px rgba(255,255,255,.035), 0 0 0 1px rgba(4,12,20,.8), 0 34px 90px rgba(0,0,0,.55), 0 0 42px rgba(54,227,178,.04); animation: modalIn .2s ease; }
.modal-wide { width: min(780px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: scale(.98) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.modal-head h3 { margin: 0; font-size: 27px; }
.modal-close { appearance: none; flex: 0 0 42px; width: 42px; height: 42px; padding: 0; border: 1px solid var(--border); border-radius: 12px; display: grid; place-items: center; color: var(--muted); background: rgba(255,255,255,.02); cursor: pointer; font: 400 24px/1 Arial, sans-serif; }
.modal-card .eyebrow { font-size: 11px; }
.modal-card > .field { margin-bottom: 16px; }
.modal-card .field { gap: 9px; }
.modal-card .field > span { font-size: 12px; }
.modal-card .field small { font-size: 11px; line-height: 1.45; }
.modal-card input, .modal-card select, .modal-card textarea, .modal-card .select-choice-button { min-height: 50px; padding: 13px 15px; font-size: 14px; }
.modal-card .choice-option { min-height: 44px; padding: 11px 13px; font-size: 14px; }
.modal-card .button { min-height: 46px; padding-inline: 19px; font-size: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--border); }
.modal-note { margin: -5px 0 22px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.invite-result { margin-top: 17px; padding: 14px; border: 1px solid rgba(54,227,178,.16); border-radius: 13px; background: var(--accent-soft); }
.invite-result span { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.invite-result code { display: block; margin: 10px 0; padding: 12px; overflow-wrap: anywhere; color: #cae7dd; background: rgba(2,10,17,.35); border-radius: 9px; font-size: 12px; }
.invite-worker-fields { display: grid; gap: 14px; margin-bottom: 14px; }
.invite-expiry { min-height: 72px; padding: 13px 14px; border: 1px solid rgba(54,227,178,.18); border-radius: 13px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 14px; background: rgba(54,227,178,.045); }
.invite-expiry > span { color: #91a8b8; font-size: 11px; text-transform: uppercase; letter-spacing: .75px; font-weight: 700; }
.invite-expiry > b { color: var(--accent); font-size: 16px; }
.invite-expiry > small { grid-column: 1 / -1; color: #7891a3; font-size: 11px; line-height: 1.45; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 360px; padding: 13px 16px; border: 1px solid var(--border-strong); border-radius: 12px; color: #dce8ee; background: #102234; box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s; }
.toast.show { opacity: 1; transform: none; }
.toast.error { border-color: rgba(255,111,125,.28); color: #ffc3c9; }
.empty { padding: 24px; color: var(--muted); text-align: center; font-size: 11px; }

/* Readable UI: the dashboard is used in a large Telegram desktop viewport. */
.app-shell { grid-template-columns: 310px minmax(0, 1fr); }
.brand strong { font-size: 26px; }
.brand span { font-size: 16px; }
.nav-item { min-height: 54px; }
.nav-item span:last-child { font-size: 19px; }
.system-status { font-size: 17px; }
.actor-copy strong { font-size: 18px; }
.actor-copy span { font-size: 15px; }
.eyebrow { font-size: 14px; }
.topbar h1 { font-size: 28px; }
.button { min-height: 48px; font-size: 18px; }
.notice strong { font-size: 18px; }
.notice small { font-size: 15px; }
.stat-card > span, .balance-hero > span, .billing-stat > span { font-size: 15px; }
.stat-card small, .balance-hero small, .billing-stat small { font-size: 15px; }
.owner-banner h2 { font-size: 34px; }
.owner-banner p:last-child { font-size: 17px; }
.owner-auto-note b { font-size: 15px; }
.owner-auto-note span { font-size: 14px; }
.scope-heading h3 { font-size: 26px; }
.scope-badge { font-size: 14px; }
.workspace-card-copy b { font-size: 18px; }
.workspace-card-copy small { font-size: 14px; }
.workspace-leaders small { font-size: 13px; }
.workspace-leaders b, .leader-empty { font-size: 14px; }
.team-member-copy em, .team-member-counter { font-size: 12px; }
.section-heading h3 { font-size: 24px; }
.text-button { font-size: 17px; }
.compact-person strong { font-size: 18px; }
.compact-person small, .language-chip small { font-size: 14px; }
.role-tag, .status-tag, .language-chip b { font-size: 15px; }
.page-heading h2 { font-size: 42px; }
.page-heading p:last-child { font-size: 18px; }
.search input, input, select, textarea, .select-choice-button { font-size: 17px; }
.table-toolbar .muted { font-size: 15px; }
th { font-size: 13px; }
td { font-size: 17px; }
.person-cell small { font-size: 14px; }
.profile-card { min-height: 300px; }
.profile-card h3 { font-size: 25px; }
.profile-card > p, .profile-meta div { font-size: 17px; }
.profile-actions { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: auto; }
.button-danger { border-color: rgba(255,111,125,.42); color: #ffc3c9; background: rgba(255,111,125,.1); }
.button-danger:hover { border-color: rgba(255,111,125,.72); color: #fff; background: rgba(255,111,125,.2); }
.profile-delete { padding-inline: 18px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid rgba(255,111,125,.3); border-radius: 14px; background: rgba(255,111,125,.055); }
.danger-zone div { display: grid; gap: 5px; }
.danger-zone b { color: #ffc3c9; font-size: 17px; }
.danger-zone span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.feature-explainer b, .feature-explainer span { font-size: 15px; }
.form-kicker, .preview-live { font-size: 14px; }
.form-head h3, .preview-head h3 { font-size: 26px; }
.switch b, .check, .save-hint { font-size: 15px; }
.field > span { font-size: 14px; }
.field small { font-size: 14px; }
.choice-option { font-size: 17px; }
.choice-empty { font-size: 15px; }
.message-label { font-size: 13px; }
.message-preview p { font-size: 18px; }
.message-preview small { font-size: 13px; }
.timeline-item b { font-size: 17px; }
.timeline-item small, .timeline-item time { font-size: 14px; }
.payment-calculation small, .payment-calculation b { font-size: 15px; }
.payment-note { font-size: 14px; }
.payment-row b { font-size: 18px; }
.payment-row small { font-size: 14px; }
.toast, .empty { font-size: 17px; }
.modal-head h3 { font-size: 32px; }
.modal-card .field > span { font-size: 14px; }
.modal-card .field small { font-size: 14px; }
.modal-card input, .modal-card select, .modal-card textarea, .modal-card .select-choice-button { font-size: 17px; }
.modal-card .choice-option, .modal-card .button { font-size: 17px; }
.modal-note { font-size: 17px; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .brand { padding-inline: 7px; justify-content: center; }
  .brand > div:last-child, .nav-item span:last-child, .actor-copy, .system-status span { display: none; }
  .nav-item { justify-content: center; padding-inline: 0; }
  .nav-icon { width: auto; }
  .actor-card { justify-content: center; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-stats, .team-stats { grid-template-columns: repeat(2, 1fr); }
  .editor-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
}

@media (max-width: 720px) {
  ::-webkit-scrollbar { width: 7px; height: 7px; }
  ::-webkit-scrollbar-thumb { border-width: 1px; }
  .app-shell { display: block; padding-bottom: 72px; }
  .workspace-leaders { grid-template-columns: 1fr; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .danger-zone .button { width: 100%; }
  .sidebar { position: fixed; z-index: 30; top: auto; bottom: 0; left: 0; width: 100%; height: 66px; padding: 7px 10px max(7px, env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--border); }
  .brand, .sidebar-footer { display: none; }
  .nav-list { height: 100%; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
  .nav-item { min-height: 48px; flex-direction: column; gap: 2px; padding: 4px; box-shadow: none !important; }
  .nav-item span:last-child { display: block; font-size: 10px; }
  .nav-icon { font-size: 19px; }
  .workspace { padding: 14px 14px 34px; }
  .telegram-mini-app .workspace { padding-top: max(14px, var(--tg-content-safe-area-inset-top, 0px)); }
  .fullscreen-prompt { position: sticky; z-index: 25; top: max(6px, var(--tg-content-safe-area-inset-top, 0px)); margin-bottom: 10px; }
  .fullscreen-cta { min-height: 46px; font-size: 16px; }
  .topbar { position: sticky; z-index: 20; top: 0; min-height: 60px; margin: -14px -14px 14px; padding: 12px 14px 10px; border-width: 0 0 1px; border-radius: 0; background: rgba(6,16,28,.91); backdrop-filter: blur(18px); }
  .top-actions { gap: 6px; }
  .top-tool { width: 38px; min-width: 38px; padding: 0; }
  .top-tool .tool-label { display: none; }
  .topbar h1 { font-size: 19px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .button { min-height: 42px; padding-inline: 14px; font-size: 15px; }
  .stat-grid, .two-column, .card-grid { grid-template-columns: 1fr; }
  .request-settings-layout { grid-template-columns: 1fr; }
  .request-channel { grid-template-columns: auto minmax(0, 1fr) auto; }
  .request-channel-route { grid-column: 1 / -1; }
  .request-save-row { grid-column: auto; align-items: stretch; flex-direction: column; }
  .request-save-row .button { width: 100%; }
  .billing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { min-height: 110px; padding: 15px; }
  .stat-card strong { font-size: 24px; }
  .page-heading { min-height: 0; flex-direction: column; padding-top: 8px; }
  .page-heading h2 { font-size: 32px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .search { min-width: 0; flex: 1; }
  .table-toolbar .muted { display: none; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
  thead { display: none; }
  tbody, tr, td { display: block; width: 100%; }
  tbody tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 42px; padding: 7px 0; border: 0; text-align: right; }
  td::before { content: attr(data-label); flex: 0 0 108px; color: #657c90; text-align: left; text-transform: uppercase; letter-spacing: .7px; font-size: 11px; font-weight: 700; }
  td .person-cell { margin-left: auto; text-align: left; }
  td .row-actions { margin-left: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .form-head { flex-direction: column; }
  .profile-switcher { width: 100%; }
  .profile-switcher select { min-width: 0; flex: 1; }
  .client-name-member { grid-template-columns: auto minmax(0, 1fr) auto; }
  .client-name-member > .status-tag { display: none; }
  .client-name-member .switch b { min-width: 82px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-card { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .owner-banner { grid-template-columns: auto 1fr; padding: 18px; }
  .owner-auto-note { grid-column: 1 / -1; max-width: none; }
  .owner-symbol { width: 48px; height: 48px; border-radius: 14px; font-size: 27px; }
  .owner-banner h2 { font-size: 24px; }
  .workspace-cards { grid-template-columns: 1fr; }
  .scope-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .team-metric-heading { flex-direction: row; align-items: flex-end; }
  .team-metric-heading .scope-badge { flex: 0 0 auto; margin-bottom: 1px; }
  .workspace-choice { width: min(190px, 100%); }
  .toast { left: 14px; right: 14px; bottom: 82px; }
}

@media (max-width: 430px) {
  .billing-grid { grid-template-columns: 1fr; }
  .topbar h1 { max-width: 112px; }
  #openHelper { width: 38px; min-width: 38px; padding: 0; }
  #openHelper .member-label { display: none; }
}

/* Personal unlimited translator for buyers, droppers and designers. */
.personal-translate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
.personal-translate-card,
.personal-result-card { min-height: 520px; }
.personal-translate-card { display: flex; flex-direction: column; gap: 18px; }
.personal-translate-card .field:first-of-type { flex: 1; }
.personal-translate-card textarea { min-height: 260px; resize: vertical; }
.personal-result-card { display: flex; flex-direction: column; }
.direct-result {
  flex: 1;
  min-height: 340px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(4, 14, 25, .58);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 19px;
  line-height: 1.65;
}
.personal-settings-card { max-width: 900px; }
.personal-mode .owner-auto-note,
.personal-mode #platformOverview { display: none !important; }
.personal-mode .topbar {
  min-height: 58px;
  padding-block: 10px;
}
.personal-mode .topbar .eyebrow { margin-bottom: 2px; }
.personal-mode .top-actions { gap: 7px; }
.personal-mode .top-tool { min-height: 36px; padding-inline: 12px; }
.personal-mode #workspaceSettings,
.personal-mode #openHelper { display: none !important; }
.pinned-language-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}
.pinned-language-list { min-height: 44px; display: flex; flex-wrap: wrap; gap: 9px; }
.pinned-language-chip {
  min-height: 38px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(54,227,178,.23);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #cbfaec;
  background: rgba(54,227,178,.075);
  font-size: 13px;
  font-weight: 700;
}
.pinned-language-chip button {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #9db3c3;
  background: rgba(255,255,255,.055);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.pinned-language-chip button:hover { color: #fff; background: rgba(255,111,125,.16); }
.pinned-language-empty { align-self: center; color: var(--muted); font-size: 13px; }
.personal-translation-rules { margin-top: 2px; }

@media (max-width: 720px) {
  .personal-mode .nav-list { grid-template-columns: repeat(2, 1fr); }
  .personal-translate-grid { grid-template-columns: 1fr; }
  .personal-translate-card,
  .personal-result-card { min-height: auto; }
  .direct-result { min-height: 260px; font-size: 17px; }
  .personal-heading { flex-direction: row; align-items: flex-end; }
  .personal-heading .status-tag,
  .personal-heading .scope-badge { flex: 0 0 auto; }
  .personal-mode .topbar { margin: -14px -14px 14px; border-width: 0 0 1px; border-radius: 0; }
  .pinned-language-editor { grid-template-columns: 1fr; }
  .pinned-language-editor .button { width: 100%; }
}

/* Telegram's embedded browser has a much smaller GPU budget than a desktop
   browser. Keep the layout while avoiding full-screen blur repaints. */
.telegram-mini-app .ambient { display: none; }
.telegram-mini-app .sidebar,
.telegram-mini-app .topbar,
.telegram-mini-app .panel,
.telegram-mini-app .modal-backdrop {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.telegram-mini-app .sidebar { background: #071321; }
.telegram-mini-app .topbar {
  background: linear-gradient(115deg, #0b1b2a, #071522);
}
.telegram-mini-app .panel { background: linear-gradient(145deg, #0e2133, #091725); }
.telegram-mini-app .modal-backdrop { background: rgba(1,7,13,.9); }
.telegram-mini-app .panel,
.telegram-mini-app .modal-card,
.telegram-mini-app .launch-error-card { box-shadow: inset 0 1px rgba(255,255,255,.025); }
.telegram-mini-app .view.active,
.telegram-mini-app .modal-card,
.telegram-mini-app .choice-control.open .choice-menu { animation: none; }
.telegram-mini-app .view.active { contain: layout style; }
.telegram-mini-app .button,
.telegram-mini-app .nav-item,
.telegram-mini-app input,
.telegram-mini-app select,
.telegram-mini-app textarea { transition-duration: .1s; }
button { touch-action: manipulation; }
button:disabled { pointer-events: none; }
.telegram-mini-app :is(.button, .nav-item, .text-button, .row-action, .modal-close, .fullscreen-cta):active {
  transform: scale(.985);
}
