:root {
  --ink: #172033;
  --muted: #58657b;
  --soft: #f4f6fb;
  --line: #d8deea;
  --white: #fff;
  --surface-alt: #eef2f7;
  --surface-overlay: rgba(255,255,255,.97);
  --chat-bg: #f3f6fa;
  --nav-muted: #56627a;
  --navy: #192146;
  --navy-2: #273263;
  --brand-primary: #5b45d6;
  --primary: #5b45d6;
  --primary-strong: #5b45d6;
  --primary-soft: #eeeafd;
  --cyan: #187f91;
  --orange: #b85a00;
  --yellow: #ffc857;
  --green: #087a58;
  --red: #c9364e;
  --focus-ring: #2563eb;
  --shadow: 0 16px 45px rgba(28, 38, 75, .1);
  --radius: 22px;
  --page-tint: rgba(244,246,251,.9);
  --chat-wallpaper-tint: rgba(243,246,250,.76);
  --bg-primary: var(--soft);
  --bg-card: var(--white);
  --bg-subtle: var(--surface-alt);
  --text-primary: var(--ink);
  --text-secondary: var(--muted);
  --border-color: var(--line);
  --radius-card: var(--radius);
  --radius-control: 14px;
  --shadow-card: var(--shadow);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  color: var(--ink);
  background: var(--soft);
}

* { box-sizing: border-box; }
html { min-height: 100%; min-height: 100dvh; background: var(--soft); }
body { min-height: 100vh; min-height: 100dvh; margin: 0; color: var(--ink); background-color: var(--soft); background-size: cover; background-position: center; background-attachment: fixed; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.ui-icon { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.ui-icon .fill-icon { fill: currentColor; stroke: none; }
a { color: var(--primary); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 7px; color: var(--primary); font-weight: 800; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

:where(button,a,input,select,textarea,summary,[tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.25fr) minmax(390px, .75fr); background: var(--white); }
.login-art { position: relative; overflow: hidden; min-height: 100vh; padding: 42px 6vw; color: white; background: radial-gradient(circle at 80% 15%, #34417a 0, var(--navy) 42%, #121831 100%); }
.login-art::after { content: ""; position: absolute; inset: auto -14% -32% 26%; height: 62%; background: linear-gradient(135deg, rgba(109,82,237,.8), rgba(47,185,197,.55)); border-radius: 50% 50% 0 0; transform: rotate(-8deg); filter: blur(1px); }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; }
.orbit-a { width: 520px; height: 520px; right: -210px; top: -160px; }
.orbit-b { width: 780px; height: 780px; right: -320px; top: -280px; }
.login-brand, .sidebar-brand { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.login-brand div, .sidebar-brand div { display: grid; line-height: 1.05; font-size: 18px; }
.login-brand span:not(.brand-mark), .sidebar-brand span:not(.brand-mark) { opacity: .7; font-size: 13px; }
.brand-mark { display: grid; place-items: center; width: 49px; height: 49px; border-radius: 17px; color: white; font-size: 25px; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--cyan)); box-shadow: 0 10px 24px rgba(78,72,211,.35); }
.brand-mark.small { width: 42px; height: 42px; font-size: 21px; border-radius: 14px; }
.login-copy { position: absolute; z-index: 2; left: 6vw; bottom: 15vh; max-width: 640px; }
.login-copy .eyebrow { color: var(--yellow); }
.login-copy h1 { margin: 10px 0 18px; font-size: clamp(42px, 5vw, 76px); line-height: .98; letter-spacing: -.045em; }
.login-copy > p:last-child { max-width: 480px; color: rgba(255,255,255,.72); font-size: 20px; line-height: 1.5; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-form { width: min(100%, 390px); }
.login-form h2 { margin: 8px 0; font-size: 31px; letter-spacing: -.03em; }
.login-form > .muted { margin: 0 0 28px; line-height: 1.45; }
.login-form > label { margin: 17px 0 8px; }
.login-form > input, .login-form > .password-field { margin-bottom: 17px; }
.mobile-logo { display: none; align-items: center; gap: 12px; margin-bottom: 36px; }
label { display: grid; gap: 8px; margin: 17px 0; font-size: 13px; font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: var(--white); padding: 12px 13px; color: var(--ink); outline: none; transition: .18s border, .18s box-shadow; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(109,82,237,.1); }
textarea { resize: vertical; min-height: 100px; }
.password-field { position: relative; display: flex; }
.password-field input { padding-right: 44px; }
.password-field button { position: absolute; right: 6px; top: 6px; border: 0; background: transparent; width: 34px; height: 34px; cursor: pointer; color: var(--muted); }
.button { border: 0; border-radius: 13px; padding: 11px 16px; font-weight: 800; cursor: pointer; transition: transform .16s, box-shadow .16s, opacity .16s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: wait; transform: none; }
.button.primary { background: linear-gradient(135deg, var(--primary-strong), color-mix(in srgb,var(--primary-strong) 82%,#20184d)); color: white; box-shadow: 0 9px 24px rgba(109,82,237,.23); }
.button.secondary { background: var(--primary-soft); color: var(--primary); }
.button.ghost { background: var(--soft); color: var(--ink); }
.button.danger { background: #fff0f2; color: var(--red); }
.button.small { padding: 8px 11px; border-radius: 10px; font-size: 12px; }
.button.wide { width: 100%; margin-top: 12px; padding: 14px; }
.form-error { min-height: 20px; color: var(--red); font-size: 13px; }
.test-login-note { margin-bottom: 18px; padding: 11px 13px; border: 1px solid #f0c26d; border-radius: 13px; color: #7b4c00; background: #fff5dc; font-size: 12px; font-weight: 800; }

.app { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 20px 20px; color: white; background: var(--navy); }
.sidebar-brand { padding: 0 8px 28px; }
.desktop-nav { display: grid; gap: 5px; }
.nav-button { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 14px; border: 0; border-radius: 13px; background: transparent; color: rgba(255,255,255,.67); text-align: left; font-weight: 700; cursor: pointer; }
.nav-button span:first-child { width: 25px; text-align: center; font-size: 18px; }
.nav-icon-wrap { position: relative; display: inline-grid; place-items: center; }
.nav-svg { width: 22px; height: 22px; stroke-width: 1.75; }
.custom-nav-icon { width: 24px; display: grid; place-items: center; font-size: 18px; }
.nav-unread,.thread-unread { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; color: #fff !important; background: var(--red); font-size: 9px !important; font-style: normal; font-weight: 900; }
.nav-unread { position: absolute; right: -10px; top: -9px; }
.nav-button.active, .nav-button:hover { color: white; background: rgba(255,255,255,.1); }
.sidebar-profile { margin-top: 12px; padding: 14px; border-radius: 15px; background: rgba(255,255,255,.08); }
.sidebar-hub { min-height: 0; display: grid; align-content: end; gap: 9px; margin-top: auto; }
.sidebar-hub-title { margin: 0 8px 1px; color: rgba(255,255,255,.42); font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.sidebar-now { width: 100%; display: grid; gap: 4px; padding: 13px; border: 1px solid rgba(255,255,255,.11); border-radius: 15px; color: white; background: linear-gradient(145deg,rgba(109,82,237,.45),rgba(47,185,197,.18)); text-align: left; cursor: pointer; }
.sidebar-now.quiet { background: rgba(255,255,255,.06); }
.sidebar-now small { color: #ffe29b; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.sidebar-now b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.sidebar-now span { overflow: hidden; color: rgba(255,255,255,.6); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.sidebar-shortcuts { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.sidebar-shortcuts button { min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 8px 3px; border: 0; border-radius: 11px; color: white; background: rgba(255,255,255,.07); cursor: pointer; }
.sidebar-shortcuts b { min-height: 20px; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 11px; }.sidebar-shortcuts b em { color: white; font-style: normal; font-size: 11px; }.sidebar-shortcuts .shortcut-icon { width: 16px; height: 16px; color: #d8ddf3; stroke-width: 1.9; }.sidebar-shortcuts span { color: rgba(255,255,255,.52); font-size: 7px; }
.profile-name { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-role { margin-top: 3px; color: rgba(255,255,255,.58); font-size: 11px; }
.app-column { min-width: 0; }
.topbar { position: sticky; z-index: 10; top: 0; height: 92px; display: flex; align-items: center; justify-content: space-between; padding: 15px clamp(22px, 4vw, 56px); background: var(--surface-overlay); backdrop-filter: blur(18px); }
.topbar-title { min-width: 0; flex: 1; }
.topbar-back { flex: 0 0 auto; margin-right: 10px; }
.topbar h1 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.test-mode-label { display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border: 1px solid #efbd5d; border-radius: 999px; color: #714400; background: #fff1c9; font-size: 11px; font-weight: 900; letter-spacing: .05em; }.test-mode-label .ui-icon { width: 16px; height: 16px; }
body.test-mode .topbar { box-shadow: inset 0 3px 0 #f0aa27; }
.connection { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; color: var(--muted); background: var(--white); font-size: 12px; font-weight: 700; opacity: 0; visibility: hidden; transition: opacity .2s ease; }
.connection.offline, .connection.syncing { opacity: 1; visibility: visible; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.connection.offline i { background: var(--red); }
.connection.syncing i { background: var(--yellow); animation: connection-pulse 1s ease-in-out infinite; }
@keyframes connection-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.icon-button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 13px; background: var(--white); box-shadow: 0 3px 14px rgba(36,47,84,.06); cursor: pointer; }
.theme-toggle-button { font-size: 21px; line-height: 1; }
.pull-refresh { position: fixed; top: 0; left: 50%; margin-left: -18px; z-index: 200; width: 36px; height: 36px; display: none; align-items: center; justify-content: center; pointer-events: none; }
.pull-refresh.visible { display: flex; top: calc(-40px + var(--pull-distance, 0px) + env(safe-area-inset-top)); }
.pull-refresh.loading { top: calc(14px + env(safe-area-inset-top)); transition: top .15s ease; }
.pull-refresh-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); background: var(--white); box-shadow: var(--shadow); }
.pull-refresh:not(.loading) .pull-refresh-spinner { transform: rotate(calc(var(--pull-distance, 0) * 3deg)); }
.pull-refresh.ready .pull-refresh-spinner { border-top-color: var(--green); }
.pull-refresh.loading .pull-refresh-spinner { animation: pull-refresh-spin .7s linear infinite; }
@keyframes pull-refresh-spin { to { transform: rotate(360deg); } }
.badge { position: absolute; min-width: 17px; height: 17px; display: grid; place-items: center; right: -4px; top: -4px; border-radius: 9px; color: white; background: var(--red); font-size: 10px; font-weight: 900; }
.content { width: min(100%, 1440px); margin: 0 auto; padding: 10px clamp(22px, 4vw, 56px) 60px; outline: none; }
.content.chat-content { height: calc(var(--app-height, 100dvh) - 92px); display: flex; min-height: 0; padding-bottom: 22px; }
.mobile-nav { display: none; }

.page-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr); gap: 22px; align-items: start; }
.stack { display: grid; gap: 16px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 3px 0 12px; }
.section-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 7px 26px rgba(27,39,76,.045); }
.card-pad { padding: 20px; }
.urgent-card { position: relative; overflow: hidden; padding: 21px 22px 21px 71px; border: 0; color: white; background: linear-gradient(120deg, #df4660, #ff765d); box-shadow: 0 13px 32px rgba(220,68,95,.2); }
.urgent-card.important { background: linear-gradient(120deg, #6b50e9, #8b6ef1); box-shadow: 0 13px 32px rgba(107,80,233,.2); }
.urgent-card.normal { color: var(--ink); border: 1px solid var(--line); background: var(--white); box-shadow: none; }
.urgent-icon { position: absolute; left: 22px; top: 22px; font-size: 29px; }
.urgent-card h3 { margin: 0 0 6px; font-size: 17px; }
.urgent-card p { margin: 0; opacity: .86; line-height: 1.48; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 11px; opacity: .7; font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat { padding: 17px; }
.stat-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 13px; border-radius: 12px; background: var(--primary-soft); font-size: 18px; }
.stat strong { display: block; font-size: 25px; letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: 12px; }
.activity-card { display: grid; grid-template-columns: 75px minmax(0,1fr) auto; gap: 15px; align-items: center; padding: 17px; cursor: pointer; transition: .18s transform, .18s border; }
.activity-card:hover { transform: translateY(-2px); border-color: #cbc3f7; }
.activity-time { display: grid; justify-items: center; padding: 10px 6px; border-radius: 14px; color: var(--primary); background: var(--primary-soft); font-size: 11px; }
.activity-time b { font-size: 17px; }
.activity-main h3 { margin: 0 0 6px; font-size: 15px; }
.activity-main p { margin: 0; color: var(--muted); font-size: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; color: #58617b; background: var(--soft); font-size: 10px; font-weight: 750; }
.pill.status-active { color: #087856; background: #e5f8f0; }
.pill.status-ready { color: #2667a9; background: #e8f3ff; }
.pill.status-completed { color: #647087; background: #eef1f5; }
.pill.status-changed { color: #b25912; background: #fff0df; }
.arrow { color: #9da4b7; font-size: 22px; }
.empty { padding: 32px 22px; text-align: center; color: var(--muted); }
.empty-icon { font-size: 34px; display: block; margin-bottom: 8px; }
.quick-list { display: grid; gap: 9px; }
.quick-row { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 13px; background: var(--soft); }
.quick-row .avatar { flex: 0 0 auto; }
.quick-row-main { min-width: 0; flex: 1; }
.quick-row-main b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-row-main span { color: var(--muted); font-size: 10px; }

.toolbar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; padding: 14px; }
.toolbar label { min-width: 150px; flex: 1; margin: 0; }
.toolbar .button { margin-left: auto; }
.date-heading { display: flex; align-items: center; gap: 10px; margin: 22px 0 11px; }
.date-heading span { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 12px; color: var(--primary); background: var(--primary-soft); font-size: 12px; font-weight: 900; }
.date-heading h2 { margin: 0; font-size: 18px; }

.ranking-hero { overflow: hidden; position: relative; padding: 24px; color: white; background: linear-gradient(135deg, var(--navy), #34417a); }
.ranking-hero::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -100px; top: -100px; background: rgba(109,82,237,.35); }
.podium { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; margin-top: 18px; }
.podium-place { padding: 14px 9px; border-radius: 16px; text-align: center; background: rgba(255,255,255,.1); }
.podium-place.first { padding-top: 25px; background: linear-gradient(160deg, rgba(255,200,87,.35), rgba(255,255,255,.12)); }
.podium-rank { font-size: 23px; }
.podium-place strong { display: block; margin: 5px 0; font-size: 17px; }
.podium-place small { color: rgba(255,255,255,.65); }
.ranking-list { overflow: hidden; }
.ranking-row { display: grid; grid-template-columns: 42px minmax(0,1fr) 110px; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ranking-row:last-child { border-bottom: 0; }
.rank-number { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: var(--soft); font-size: 12px; font-weight: 900; }
.group-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.group-dot { width: 10px; height: 10px; border-radius: 50%; }
.score { text-align: right; font-weight: 900; }
.score small { color: var(--muted); font-weight: 500; }
.transaction { display: grid; grid-template-columns: 45px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.transaction:last-child { border-bottom: 0; }
.transaction-amount { font-weight: 900; color: var(--green); }
.transaction-amount.negative { color: var(--red); }

.tabs { display: flex; gap: 5px; max-width: 100%; overflow-x: auto; padding: 5px; width: fit-content; border-radius: 14px; background: var(--surface-alt); margin-bottom: 18px; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { min-height: 40px; flex: 0 0 auto; border: 0; border-radius: 10px; padding: 9px 14px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; white-space: nowrap; }
.tab.active { color: var(--ink); background: var(--white); box-shadow: 0 3px 10px rgba(30,41,78,.08); }
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.task-card { padding: 18px; cursor: pointer; }
.task-card h3 { margin: 9px 0 7px; font-size: 16px; }
.task-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.task-top { display: flex; justify-content: space-between; gap: 10px; }
.task-number { color: var(--primary); font-weight: 900; font-size: 12px; }
.deadline { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.leader-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 11px; margin-bottom: 22px; }
.leader-card { min-height: 132px; padding: 15px; cursor: pointer; }
.leader-card h3 { margin: 10px 0 4px; font-size: 14px; }
.leader-card p { margin: 0; color: var(--muted); font-size: 11px; }
.leader-score { float: right; color: var(--primary); font-size: 17px; font-weight: 900; }
.leader-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.leader-stat { padding:17px; }.leader-stat b,.leader-stat span { display:block; }.leader-stat b { color:var(--primary); font-size:24px; }.leader-stat span { margin-top:4px; color:var(--muted); font-size:11px; }
.leader-table { overflow:hidden; margin-bottom:24px; }
.leader-row { width:100%; display:grid; grid-template-columns:42px minmax(0,1fr) auto 18px; align-items:center; gap:11px; padding:12px 15px; border:0; border-bottom:1px solid var(--line); color:var(--ink); background:var(--white); text-align:left; cursor:pointer; }.leader-row:last-child { border-bottom:0; }.leader-row:hover { background:var(--surface-alt); }.leader-row span:nth-child(2) { min-width:0; }.leader-row b,.leader-row small { display:block; }.leader-row b { font-size:13px; }.leader-row small { margin-top:3px; color:var(--muted); font-size:10px; }.leader-row strong { color:var(--primary); font-size:12px; }.leader-row i { color:var(--muted); font-size:20px; font-style:normal; }
.leader-task-heading { margin-top:26px; }.leader-task-list { display:grid; gap:10px; }.leader-task-row { display:grid; grid-template-columns:36px minmax(0,1fr) auto 18px; align-items:center; gap:12px; padding:15px; cursor:pointer; }.leader-task-row .task-number { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; color:var(--primary); background:var(--primary-soft); }.leader-task-row h3 { margin:0; font-size:14px; }.leader-task-row p { margin:4px 0; color:var(--muted); font-size:11px; }.leader-task-row small { color:var(--muted); font-size:10px; }.leader-task-row > i { color:var(--muted); font-size:20px; font-style:normal; }

.chat-layout { width: 100%; height: auto; min-height: 0; flex: 1; display: grid; grid-template-columns: 300px minmax(0,1fr); overflow: hidden; }
.chat-sidebar { min-height: 0; border-right: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; }
.chat-sidebar-head { position: sticky; top: 0; z-index: 2; padding: 17px; background: var(--white); border-bottom: 1px solid var(--line); }
.chat-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-sidebar-head-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.chat-sidebar-head-title > div { min-width: 0; flex: 1; }
.chat-sidebar-home { flex-shrink: 0; }
.chat-sidebar-head h2 { margin: 0; font-size: 17px; }
.chat-sidebar-actions { display:flex; align-items:center; gap:5px; flex:0 0 auto; }
.thread-section-title { padding: 16px 10px 7px; }
.thread-section-title:first-child { padding-top: 7px; }
.thread-empty { margin: 3px 10px 9px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.thread-list { padding: 8px; }
.thread-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.thread-item,.thread-item * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.thread-item > span:nth-child(2) { min-width: 0; flex: 1; }
.thread-item:hover, .thread-item.active { background: var(--primary-soft); }
.thread-item b { display: block; font-size: 12px; }
.thread-item span { color: var(--muted); font-size: 10px; }
.thread-marks { display: flex; gap: 2px; flex: 0 0 auto; font-size: 9px !important; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(135deg, var(--primary), var(--cyan)); font-size: 12px; font-weight: 900; }
.chat-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; background: var(--chat-bg); }
.chat-main.has-thread-background .messages { background-image: linear-gradient(var(--chat-wallpaper-tint),var(--chat-wallpaper-tint)),var(--thread-background); background-size: cover; background-position: center; background-attachment: scroll; }
.chat-head { display: flex; align-items: center; gap: 11px; min-height: 64px; padding: 12px 17px; background: var(--white); border-bottom: 1px solid var(--line); }
.chat-head-main { min-width: 0; flex: 1; }
.chat-head h3 { margin: 0; font-size: 14px; }
.chat-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.chat-head-actions { display: flex; align-items: center; gap: 5px; }
.chat-head-actions .icon-button { width: 34px; height: 34px; }
.chat-head-actions .icon-button .ui-icon { width: 17px; height: 17px; }
.icon-button.control-active { color: white; background: var(--primary); box-shadow: 0 7px 18px color-mix(in srgb,var(--primary) 28%,transparent); }
.messages { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 18px 62px 18px 18px; }
.message { display: flex; gap: 9px; margin-bottom: 13px; max-width: 78%; }
.message.mine { margin-left: auto; flex-direction: row-reverse; }
.message-body { padding: 10px 12px; border-radius: 15px 15px 15px 4px; background: var(--white); box-shadow: 0 2px 10px rgba(30,40,75,.06); }
.message-body { position: relative; min-width: 110px; }
.message.mine .message-body { color: white; background: linear-gradient(135deg,var(--primary),#7256df); border-radius: 15px 15px 4px 15px; }
.message-author { display: block; margin: 0 34px 4px 0; padding: 0; border: 0; color: var(--primary); background: transparent; text-align: left; cursor: pointer; font-size: 10px; font-weight: 800; }
.message.mine .message-author { color: rgba(255,255,255,.75); }
.message-text { white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.42; }
.message.mine .message-text,.message.mine .message-time,.message.mine .message-status { color: #fff !important; }
.message:not(.mine) .message-text { color: var(--ink) !important; }
.message-time { margin-top: 4px; text-align: right; opacity: .6; font-size: 9px; }
.message-form { position: sticky; z-index: 3; bottom: 0; display: flex; flex: 0 0 auto; gap: 9px; padding: 12px; background: var(--white); border-top: 1px solid var(--line); }
.message-form textarea { min-width: 0; min-height: 44px; max-height: 110px; flex: 1; margin: 0; resize: none; }
.message-form .button { align-self: end; }
.message-form .chat-tool .ui-icon { width: 19px; height: 19px; }
.message-form .send-button .ui-icon { width: 19px; height: 19px; }
.chat-file-drop-overlay {
  position:absolute;
  z-index:40;
  inset:10px;
  display:grid;
  place-content:center;
  justify-items:center;
  gap:9px;
  padding:30px;
  border:3px dashed color-mix(in srgb,var(--cyan) 72%,var(--primary));
  border-radius:24px;
  color:#fff;
  background:linear-gradient(145deg,color-mix(in srgb,var(--primary) 89%,transparent),color-mix(in srgb,var(--cyan) 82%,var(--primary)));
  box-shadow:0 24px 70px rgba(18,28,61,.32),inset 0 0 0 1px rgba(255,255,255,.22);
  opacity:0;
  pointer-events:none;
  transform:scale(.985);
  transition:opacity .16s ease,transform .16s ease;
  backdrop-filter:blur(14px);
}
.chat-file-drop-overlay.visible { opacity:.96; transform:scale(1); }
.chat-file-drop-cloud { width:84px; height:84px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.24); border-radius:28px; background:rgba(255,255,255,.15); box-shadow:0 14px 35px rgba(17,26,61,.24); }
.chat-file-drop-cloud .ui-icon { width:48px; height:48px; stroke-width:1.6; }
.chat-file-drop-overlay b { font-size:23px; }
.chat-file-drop-overlay span { max-width:460px; color:rgba(255,255,255,.82); text-align:center; font-size:11px; line-height:1.45; }
.chat-file-draft-tray {
  position:absolute;
  z-index:7;
  right:12px;
  bottom:calc(100% + 8px);
  left:12px;
  display:grid;
  gap:8px;
  max-height:min(260px,42vh);
  overflow:auto;
  padding:11px;
  border:1px solid color-mix(in srgb,var(--primary) 24%,var(--line));
  border-radius:18px;
  color:var(--ink);
  background:color-mix(in srgb,var(--surface-overlay) 96%,transparent);
  box-shadow:0 18px 55px rgba(18,28,61,.22);
  backdrop-filter:blur(18px);
}
.chat-file-draft-tray > header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.chat-file-draft-tray > header > div { min-width:0; display:grid; gap:2px; }
.chat-file-draft-tray > header b { font-size:11px; }
.chat-file-draft-tray > header small { color:var(--muted); font-size:8px; }
.chat-file-draft-tray button { width:30px; height:30px; flex:0 0 auto; display:grid; place-items:center; padding:0; border:0; border-radius:10px; color:var(--muted); background:var(--surface-alt); cursor:pointer; font-size:18px; }
.chat-file-draft-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.chat-file-draft-list article { min-width:0; display:grid; grid-template-columns:34px minmax(0,1fr) 28px; align-items:center; gap:8px; padding:7px; border:1px solid var(--line); border-radius:13px; background:var(--white); }
.chat-file-draft-list article > span { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; color:#fff; background:linear-gradient(135deg,var(--primary),var(--cyan)); }
.chat-file-draft-list article > span .ui-icon { width:18px; height:18px; }
.chat-file-draft-list article > div { min-width:0; display:grid; gap:2px; }
.chat-file-draft-list article b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:9px; }
.chat-file-draft-list article small { color:var(--muted); font-size:8px; }
.chat-file-draft-list article > button { width:28px; height:28px; color:var(--red); background:color-mix(in srgb,var(--red) 9%,var(--white)); }
@media (max-width:760px) {
  .chat-file-draft-tray { right:6px; left:6px; max-height:min(230px,38vh); padding:9px; }
  .chat-file-draft-list { grid-template-columns:1fr; }
}
.composer-menu { position: relative; align-self: end; }
.composer-menu > summary { list-style: none; }
.composer-menu > summary::-webkit-details-marker { display: none; }
.composer-menu .composer-tools { position: absolute; z-index: 8; left: 0; bottom: 52px; width: 245px; display: grid; gap: 3px; padding: 7px; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: var(--surface-overlay); box-shadow: 0 18px 50px rgba(18,28,61,.24); backdrop-filter: blur(18px); }
.composer-menu:not([open]) .composer-tools { display: none; }
.composer-menu:hover .composer-tools, .composer-menu:focus-within .composer-tools { display: grid; }
.composer-tool-row { width: 100%; min-height: 43px; display: grid; grid-template-columns: 31px minmax(0,1fr); align-items: center; gap: 9px; margin: 0; padding: 6px 9px; border: 0; border-radius: 11px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.composer-tool-row:hover { background: var(--primary-soft); }
.composer-tool-row > span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: white; background: linear-gradient(135deg,var(--primary),var(--cyan)); box-shadow: 0 5px 13px color-mix(in srgb,var(--primary) 23%,transparent); font-size: 15px; }.composer-tool-row > span .ui-icon { width: 17px; height: 17px; stroke-width: 1.9; }
.composer-tool-row b { font-size: 11px; }.composer-tool-row input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.composer-tool-row > div { min-width:0; display:grid; gap:2px; }
.composer-tool-row > div small { overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; font-size:8px; }
.composer-gift-row > span { background:linear-gradient(135deg,#8c58dc,#f06292); box-shadow:0 6px 15px rgba(140,88,220,.28); }
.message-status { display:inline-block; margin-left: 3px; letter-spacing: -2px; font-weight: 900; animation:status-pop .22s ease-out; }
.message-read-at { margin-left: 5px; white-space: nowrap; }
.message-status.failed { width:17px; height:17px; display:inline-grid; place-items:center; border-radius:50%; color:#fff !important; background:var(--red); letter-spacing:0; }
.failed-message .message-body { outline:2px solid color-mix(in srgb,var(--red) 60%,transparent); }
.failed-actions { display:flex; gap:6px; margin-top:8px; }
.failed-actions button { padding:5px 8px; border:0; border-radius:8px; color:var(--ink); background:rgba(255,255,255,.9); cursor:pointer; font-size:9px; font-weight:850; }
.background-preview { width:100%; max-height:240px; object-fit:cover; border-radius:16px; margin:8px 0 14px; }
@keyframes status-pop { from { opacity:0; transform:scale(.45) translateY(3px); } to { opacity:1; transform:none; } }
.avatar-button { display: inline-grid; flex: 0 0 auto; padding: 0; border: 0; background: transparent; cursor: pointer; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.scheduled-badge { display: inline-flex; margin-left: 6px; padding: 3px 6px; border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: 9px; }
.message-menu { position: absolute; right: 7px; top: 5px; width: 30px; height: 26px; display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; opacity: .3; transition: opacity .16s,background .16s,transform .16s; }
.message-menu i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.message-body:hover .message-menu,.message-menu:focus { opacity: 1; color: var(--ink); border-color: var(--line); background: var(--surface-alt); transform: translateY(-1px); }
.message.mine .message-menu { color: rgba(255,255,255,.78); }
.message.mine .message-menu:hover,.message.mine .message-menu:focus { color: white; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.14); }
.forward-label { margin: 1px 34px 5px 0; color: var(--primary); font-size: 9px; font-weight: 850; }
.message.mine .forward-label { color: rgba(255,255,255,.75); }
.message-reply-preview { display: grid; gap: 2px; width: 100%; margin: 4px 0 7px; padding: 7px 9px; border: 0; border-left: 3px solid var(--primary); border-radius: 7px; color: var(--ink); background: var(--soft); text-align: left; cursor: pointer; }
.message-reply-preview b { color: var(--primary); font-size: 9px; }.message-reply-preview span { max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.message.mine .message-reply-preview { border-left-color: white; color: var(--ink); background: rgba(255,255,255,.92); }
.message-reactions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 7px; }
.message-reaction { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--soft); cursor: pointer; font-size: 10px; }.message-reaction.selected { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(47,185,197,.15); }
.composer-reply { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 0; border-top: 1px solid var(--line); background: var(--white); }
.composer-reply > div { min-width: 0; display: grid; gap: 2px; padding-left: 10px; border-left: 3px solid var(--primary); }.composer-reply b { font-size: 10px; }.composer-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.reaction-picker { display: grid; grid-template-columns: repeat(8,1fr); gap: 5px; margin: 15px 0; }.reaction-picker button { aspect-ratio: 1; border: 0; border-radius: 11px; background: var(--soft); cursor: pointer; font-size: 20px; }
.message-sheet-head { display: flex; align-items: center; gap: 12px; }.message-sheet-head > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: white; background: linear-gradient(135deg,var(--primary),var(--cyan)); box-shadow: 0 8px 20px color-mix(in srgb,var(--primary) 26%,transparent); }.message-sheet-head .ui-icon { width: 21px; height: 21px; }.message-sheet-head .eyebrow { margin-bottom: 2px; }.message-sheet-head .modal-title { margin: 0; }
.message-action-list { overflow: hidden; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: 0 12px 32px rgba(21,31,65,.08); }.message-action-list > button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: var(--white); cursor: pointer; text-align: left; font-size: 19px; }.message-action-list > button:last-child { border-bottom: 0; }.message-action-list > button:hover { background: var(--surface-alt); }.message-action-list span { min-width: 0; }.message-action-list b,.message-action-list small { display: block; }.message-action-list b { font-size: 12px; }.message-action-list small { margin-top: 2px; color: var(--muted); font-size: 9px; }.message-action-list .danger-action { color: var(--red); }
.message-action-list > button > .ui-icon { width: 20px; height: 20px; flex: 0 0 auto; color: var(--primary); }.message-action-list > button.danger-action > .ui-icon { color: var(--red); }
.thread-mark-icon { width: 12px; height: 12px; color: var(--primary); }

.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.person-card { padding: 15px; }
.person-head { display: flex; gap: 11px; align-items: center; }
.person-head h3 { margin: 0; font-size: 13px; }
.person-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.person-meta { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.menu-card { --menu-accent:var(--primary); position:relative; min-height:145px; display:grid; grid-template-columns:56px minmax(0,1fr) 28px; align-items:center; gap:16px; overflow:hidden; padding:21px; cursor:pointer; transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.menu-card:nth-child(3n+2) { --menu-accent:var(--cyan); }.menu-card:nth-child(3n+3) { --menu-accent:#e58b2a; }.menu-card:nth-child(4n) { --menu-accent:#d64f83; }
.menu-card::after { content:""; position:absolute; right:-35px; top:-45px; width:110px; height:110px; border-radius:50%; background:color-mix(in srgb,var(--menu-accent) 9%,transparent); transition:transform .25s ease; }
.menu-card:hover { transform:translateY(-3px); border-color:color-mix(in srgb,var(--menu-accent) 45%,var(--line)); box-shadow:0 16px 36px color-mix(in srgb,var(--menu-accent) 12%,transparent); }.menu-card:hover::after { transform:scale(1.25); }
.menu-card .menu-icon { width:54px; height:54px; display:grid; place-items:center; border:1px solid color-mix(in srgb,var(--menu-accent) 24%,var(--line)); border-radius:18px; color:var(--menu-accent); background:linear-gradient(145deg,color-mix(in srgb,var(--menu-accent) 14%,var(--white)),var(--white)); box-shadow:0 8px 20px color-mix(in srgb,var(--menu-accent) 12%,transparent); }
.menu-card .menu-card-icon { width:27px; height:27px; stroke-width:1.75; }
.menu-card-copy { min-width:0; }.menu-card h3 { margin:0 0 6px; font-size:15px; }.menu-card p { margin:0; color:var(--muted); font-size:11px; line-height:1.48; }
.menu-card-arrow { z-index:1; display:grid; place-items:center; width:28px; height:28px; border-radius:10px; color:var(--muted); background:var(--surface-alt); transition:color .2s,transform .2s; }.menu-card-arrow .ui-icon { width:16px; height:16px; }.menu-card:hover .menu-card-arrow { color:var(--menu-accent); transform:translateX(2px); }
.test-warning { display: grid; gap: 4px; margin: 16px 0; padding: 14px; border: 1px solid #efc66f; border-radius: 14px; color: #704600; background: #fff6df; }
.test-warning span { font-size: 11px; }
.test-accounts { display: grid; gap: 5px; margin: -4px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.test-accounts b { font-size: 12px; }
.test-accounts span, .test-accounts small { color: var(--muted); font-size: 10px; }
.test-accounts code { padding: 2px 5px; border-radius: 6px; color: var(--primary); background: var(--primary-soft); font-weight: 800; }
.test-device { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border-radius: 15px; color: white; background: linear-gradient(135deg, var(--navy), var(--navy-2)); }
.test-device small, .test-device b { display: block; }
.test-device small { margin-bottom: 4px; color: rgba(255,255,255,.65); }
.test-device > span { display: grid; place-items: center; min-width: 58px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.12); font-weight: 900; }
.test-diagnostics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 12px 0 18px; }
.test-diagnostic { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px; border-radius: 12px; background: var(--soft); }
.test-diagnostic > span { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 9px; color: white; background: var(--green); font-weight: 900; }
.test-diagnostic.note > span { background: var(--orange); }
.test-diagnostic b, .test-diagnostic small { display: block; }
.test-diagnostic b { font-size: 11px; }
.test-diagnostic small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.tester-checks { display: grid; gap: 7px; }
.tester-check { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); font-size: 11px; cursor: pointer; }
.tester-check input { width: 16px; height: 16px; margin: 1px 0 0; padding: 0; flex: 0 0 auto; box-shadow: none; }
.tester-check input:focus { box-shadow: 0 0 0 3px rgba(109,82,237,.12); }
.test-actions { flex-wrap: wrap; }

.modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(13,18,40,.58); backdrop-filter: blur(6px); }
.modal-card { position: relative; width: min(720px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; border-radius: 24px; color: var(--ink); background: var(--white); box-shadow: 0 30px 100px rgba(9,13,34,.3); }
.modal-close { position: sticky; z-index: 2; float: right; top: 13px; right: 13px; width: 36px; height: 36px; margin: 13px; border: 0; border-radius: 12px; background: var(--soft); font-size: 22px; cursor: pointer; }
#modal-content { padding: 28px; }
.modal-title { margin: 0 45px 5px 0; font-size: 24px; letter-spacing: -.03em; }
.modal-lead { margin: 0 0 22px; color: var(--muted); line-height: 1.5; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.detail { padding: 12px; border-radius: 13px; background: var(--soft); }
.detail small { display: block; margin-bottom: 4px; color: var(--muted); }
.detail b { font-size: 13px; }
.detail-section { margin-top: 21px; }
.detail-section h3 { margin: 0 0 10px; font-size: 14px; }
.detail-section p, .detail-section li { color: #4f5872; font-size: 13px; line-height: 1.55; }
.detail-section ol, .detail-section ul { padding-left: 21px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 13px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.check-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 170px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 13px; }
.response-type-choices { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.check-item { display: flex; align-items: center; gap: 5px; margin: 0; padding: 7px; border-radius: 8px; background: var(--soft); font-size: 11px; }
.check-item input { width: auto; margin: 0; }
.select-all-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0; }.select-all-row .select-all { color:var(--primary); background:var(--primary-soft); font-weight:900; }.select-all-row small { color:var(--muted); font-size:9px; }
.role-preset-row { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 8px; }.role-preset-row .check-item { border:1px solid var(--line); }
.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { min-width: 250px; max-width: 370px; padding: 13px 16px; border-radius: 14px; color: white; background: var(--navy); box-shadow: var(--shadow); animation: toast-in .22s ease-out; font-size: 13px; }
.toast.error { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.attachments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.attachments.compact { grid-template-columns: repeat(2, minmax(0, 190px)); gap: 7px; margin: 9px 0 3px; }
.attachment { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--white); text-decoration: none; }
.attachment.image img, .attachment.video video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #11152a; }
.attachment.image > span, .attachment.video > span { display: block; padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 750; }
.attachment.audio { grid-column: 1 / -1; padding: 11px; }
.attachment.audio > div { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.attachment.audio b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.attachment.audio small, .attachment.document small { display: block; color: var(--muted); font-size: 9px; }
.attachment audio { width: 100%; height: 34px; }
.attachment.document { display: flex; align-items: center; gap: 10px; padding: 11px; }
.file-symbol { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; color: var(--primary); background: var(--primary-soft); font-size: 19px; }
.attachment.document b { display: block; font-size: 11px; overflow-wrap: anywhere; }
.urgent-card .attachment { border-color: var(--line); background: var(--white); }
.message.mine .attachment { border-color: rgba(255,255,255,.23); }
.message-body .attachments { max-width: 420px; }
.chat-attachments { max-width:min(420px,72vw) !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; align-items:start; gap:4px !important; margin:6px 0 2px !important; }.chat-attachments.single { grid-template-columns:minmax(0,min(350px,72vw)) !important; }.attachment.chat-image { width:fit-content; max-width:100%; justify-self:start; border:0 !important; border-radius:12px; background:transparent !important; box-shadow:none; }.attachment.chat-image img { width:auto; max-width:100%; max-height:min(52vh,520px); aspect-ratio:auto; border-radius:12px; object-fit:contain; background:transparent; }.message.visual-only .message-body { padding:4px 4px 3px; }.message.visual-only .message-author { margin:3px 36px 3px 6px; }.message.visual-only .message-time { margin:3px 6px 1px; }.message.visual-only .message-menu { right:5px; top:4px; }

.upload-panel { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 8px; padding: 13px; border: 1px dashed var(--line); border-radius: 15px; background: var(--surface-alt); }
.upload-panel b, .upload-panel span { display: block; }
.upload-panel b { font-size: 12px; }
.upload-panel span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.file-picker { display: inline-flex; margin: 0; padding: 9px 11px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); cursor: pointer; white-space: nowrap; }
.file-picker input, .chat-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-selection { overflow-wrap: anywhere; }
.upload-panel .file-selection, .drop-zone .file-selection { margin-top: 7px; color: #5c45cc; font-weight: 750; }
.upload-panel.has-files, .drop-zone.has-files { border-color: var(--primary); background: var(--primary-soft); }
.media-checks { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; max-height: 180px; overflow-y: auto; padding: 7px; border: 1px solid var(--line); border-radius: 13px; }
.media-check { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0; padding: 8px; border-radius: 9px; background: var(--soft); font-size: 10px; cursor: pointer; }
.media-check input { width: auto; flex: 0 0 auto; margin: 0; }
.media-check span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.empty.mini { padding: 14px; font-size: 11px; }
.drop-zone { position: relative; min-height: 130px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 22px; border: 2px dashed var(--line); border-radius: 18px; color: var(--primary); background: var(--surface-alt); text-align: center; cursor: pointer; }
.drop-zone.dragging { border-color:var(--primary); background:var(--primary-soft); transform:scale(1.01); }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone span { color: var(--muted); font-size: 10px; }
.drop-zone strong { font-size: 13px; }
.upload-quick-submit { margin-top: 12px; }
.upload-options-note { margin: 8px 0 18px; color: var(--muted); text-align: center; font-size: 10px; }
.upload-actions { position: sticky; z-index: 3; bottom: -28px; margin: 22px -28px -28px; padding: 14px 28px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface-overlay); box-shadow: 0 -10px 24px rgba(17,24,55,.07); }
.is-submitting { cursor: wait; }
.is-submitting .drop-zone { pointer-events: none; opacity: .75; }

.storage-card { display: grid; grid-template-columns: minmax(250px, .35fr) 1fr; align-items: center; gap: 25px; margin-bottom: 17px; padding: 18px 20px; }
.storage-card b, .storage-card span { display: block; }
.storage-card b { font-size: 14px; }
.storage-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.storage-bar { height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-alt); }
.storage-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--cyan)); }
.media-tabs { max-width: 100%; overflow-x: auto; }
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.media-grid > .empty { grid-column: 1 / -1; }
.media-card { min-width: 0; overflow: hidden; cursor: pointer; transition: transform .18s, box-shadow .18s; }
.media-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.media-preview { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(145deg, #242e5b, #131934); }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; }
.media-cover { font-size: 55px; color: #b8abff; }
.media-cover.document { color: #68d0d7; }
.media-type-icon { position: absolute; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; color: white; background: rgba(16,22,49,.72); }
.disco-mark { position: absolute; left: 9px; top: 9px; padding: 5px 8px; border-radius: 999px; color: #694c00; background: var(--yellow); font-size: 9px; font-weight: 900; }
.media-info { padding: 14px; }
.media-info h3 { margin: 8px 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.media-info p { margin: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.disco-list { display: grid; gap: 10px; }
.disco-track { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px; }
.track-number { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); font-weight: 900; }
.track-main { min-width: 0; }
.track-main b, .track-main span { display: block; }
.track-main b { font-size: 12px; }
.track-main span { margin: 3px 0 8px; color: var(--muted); font-size: 9px; }
.track-main audio, .track-main video { width: min(100%, 560px); max-height: 180px; }
.leader-photo { width: 105px; height: 105px; float: right; margin: 0 0 15px 15px; border-radius: 22px; object-fit: cover; }
.chat-file { position: relative; display: grid; place-items: center; align-self: end; width: 44px; height: 44px; flex: 0 0 auto; margin: 0; border-radius: 13px; color: var(--primary); background: var(--primary-soft); cursor: pointer; font-size: 22px; }
.chat-file-count { position: absolute; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin: -34px -34px 0 0; border: 2px solid white; border-radius: 999px; color: white; background: var(--red); font-size: 9px; font-weight: 900; }
.chat-file-count[hidden] { display: none; }
.template-link { display: block; margin: 15px 0; padding: 13px 15px; border-radius: 13px; color: var(--primary); background: var(--primary-soft); text-decoration: none; font-weight: 800; }
.import-alert { display: grid; gap: 5px; margin: 12px 0; padding: 13px; border-radius: 13px; font-size: 11px; }
.import-alert.error { color: #a62f44; background: #fff0f3; }
.import-alert.warning { color: #9b561a; background: #fff4e7; }
.import-alert.success { color: #087856; background: #e8f8f1; }
.import-table-wrap { max-height: 340px; overflow: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; }
.import-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.import-table th { position: sticky; top: 0; z-index: 1; padding: 9px; color: white; background: var(--navy); text-align: left; }
.import-table td { padding: 8px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }

.coin-icon { display: inline-grid; place-items: center; width: 23px; height: 23px; border: 2px solid currentColor; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 950; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.stat-icon .coin-icon { width: 24px; height: 24px; color: var(--primary); font-size: 12px; }
.profile-button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 0; border: 0; color: white; background: none; text-align: left; cursor: pointer; }
.profile-button > span:last-child { min-width: 0; display: grid; }
.avatar.mini { width: 32px; height: 32px; flex: 0 0 auto; }
.media-avatar { overflow: hidden; padding: 0; }
.media-avatar img,.media-avatar video { width: 100%; height: 100%; object-fit: cover; }
.news-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.news-actions .button { padding: 8px 11px; font-size: 10px; }
.news-read { color: #164c43; background: rgba(255,255,255,.9); }
.news-readers { color: white; border: 1px solid rgba(255,255,255,.35); background: transparent; }
.urgent-card.normal .news-readers { color: var(--primary); border-color: var(--line); }
.read-state { padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.15); font-size: 10px; font-weight: 800; }
.attachment.document { width: 100%; border: 1px solid var(--line); text-align: left; cursor: pointer; }
.attachment.voice { grid-column: 1 / -1; width:min(330px,68vw); max-width:100%; display:grid; gap:7px; overflow:visible; padding:8px 9px; border:0; background:transparent; }
.attachment.voice b { font-size: 11px; }
.attachment.voice audio { display: none; }
.voice-player { width:100%; min-width:0; display:grid; grid-template-columns:40px minmax(90px,1fr) 34px; align-items:center; gap:9px; }
.voice-play { width: 38px; height: 38px; display: grid; place-items: center; padding: 0 0 0 2px; border: 0; border-radius: 50%; color: white; background: linear-gradient(135deg,var(--primary),var(--cyan)); cursor: pointer; font-size: 13px; }
.voice-play .ui-icon { width: 19px; height: 19px; }
.voice-track { --voice-progress:0%; position: relative; min-width: 0; height: 48px; display: grid; grid-template-rows: 30px 16px; align-items: center; }
.voice-scrubber { position:relative; min-width:0; height:30px; cursor:pointer; touch-action:pan-y; }
.voice-wave { position:absolute; inset:2px 0 1px; display:flex; align-items:center; gap:2px; overflow:hidden; pointer-events:none; }
.voice-wave i { width:3px; height:var(--wave); flex:1; max-width:4px; border-radius:5px; background:color-mix(in srgb,var(--primary) 24%,var(--line)); }
.voice-wave-played { clip-path:inset(0 calc(100% - var(--voice-progress)) 0 0); }
.voice-wave-played i { background:var(--primary); }
.voice-progress-knob { position:absolute; z-index:2; left:var(--voice-progress); top:50%; width:10px; height:10px; border:2px solid var(--white); border-radius:50%; background:var(--primary); box-shadow:0 2px 7px rgba(20,30,65,.28); transform:translate(-50%,-50%); pointer-events:none; }
.voice-seek { position:absolute; z-index:3; inset:0; width:100%; height:100%; margin:0; padding:0; border:0; box-shadow:none; opacity:0; pointer-events:none; }
.voice-seek:focus-visible + * { outline:none; }
.voice-scrubber:focus-within .voice-progress-knob { box-shadow:0 0 0 4px color-mix(in srgb,var(--cyan) 28%,transparent),0 2px 7px rgba(20,30,65,.28); }
.voice-meta { min-width: 0; display: flex; align-items: center; gap: 5px; color: var(--muted); font-variant-numeric: tabular-nums; }.voice-meta span,.voice-meta small { white-space: nowrap; font-size: 8px; }
.voice-speed { height: 18px; margin-left: auto; padding: 0 5px; border: 0; border-radius: 6px; color: var(--primary); background: var(--primary-soft); cursor: pointer; font-size: 8px; font-weight: 900; }
.voice-transcript-button { width: 34px; height: 30px; padding: 0; border: 0; border-radius: 9px; color: var(--primary); background: var(--primary-soft); cursor: pointer; font-size: 10px; font-weight: 950; }.voice-transcript-button.active { color: white; background: var(--primary); }.voice-transcript-button.unavailable { opacity: .45; }
.voice-transcript-button .ui-icon { width: 17px; height: 17px; margin: auto; }
.voice-fallback { color: var(--red); font-size: 9px; font-weight: 800; }
.voice-transcript-panel { margin-top: 7px; padding: 9px 10px; border-radius: 10px; color: var(--ink); background: var(--soft); font-size: 9px; }.voice-transcript-panel b { display: block; color: var(--primary); font-size: 9px; }.voice-transcript-panel p { margin: 5px 0 0; line-height: 1.5; }
.message.mine .attachment.voice { border-color:transparent; background:transparent; }
.message.mine .voice-player { color:white; }.message.mine .voice-play { color:var(--primary); background:white; }.message.mine .voice-wave-base i { background:rgba(255,255,255,.34); }.message.mine .voice-wave-played i { background:#fff; }.message.mine .voice-progress-knob { border-color:var(--primary); background:#fff; }.message.mine .voice-meta { color:rgba(255,255,255,.72); }.message.mine .voice-speed,.message.mine .voice-transcript-button { color:white; background:rgba(255,255,255,.17); }.message.mine .voice-transcript-button.active { color:var(--primary); background:white; }.message.mine .voice-transcript-panel { color:white; background:rgba(255,255,255,.13); }.message.mine .voice-transcript-panel b { color:rgba(255,255,255,.78); }
.attachment.circle { width:min(232px,70vw); display:grid; justify-items:center; gap:5px; overflow:visible; border:0 !important; background:transparent !important; }
.circle-media { --circle-radius:min(116px,35vw); position:relative; width:min(232px,70vw); aspect-ratio:1; display:grid; place-items:center; touch-action:pan-y; }
.attachment.circle video { position:absolute; inset:4px; width:calc(100% - 8px); height:calc(100% - 8px); aspect-ratio:1; border:0; border-radius:50%; object-fit:cover; background:#111; cursor:pointer; }
.circle-progress { --circle-progress:0deg; position:absolute; inset:0; border-radius:50%; background:conic-gradient(var(--cyan) var(--circle-progress),color-mix(in srgb,var(--line) 72%,transparent) 0); pointer-events:none; -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 4px),#000 0); mask:radial-gradient(farthest-side,transparent calc(100% - 4px),#000 0); }
.circle-progress-knob { --circle-progress:0deg; position:absolute; z-index:4; left:50%; top:50%; width:13px; height:13px; border:2px solid #fff; border-radius:50%; background:var(--cyan); box-shadow:0 3px 9px rgba(0,0,0,.32); transform:translate(-50%,-50%) rotate(var(--circle-progress)) translateY(calc(2px - var(--circle-radius))); transform-origin:center; pointer-events:none; }
.circle-ring-time { position:absolute; z-index:3; left:50%; bottom:9px; min-width:48px; padding:4px 7px; border:1px solid rgba(255,255,255,.2); border-radius:999px; color:#fff; background:rgba(10,18,40,.68); box-shadow:0 4px 12px rgba(0,0,0,.22); text-align:center; font-size:8px; font-weight:900; font-variant-numeric:tabular-nums; transform:translateX(-50%); backdrop-filter:blur(8px); pointer-events:none; }
.circle-play { position:absolute; z-index:2; width:48px; height:48px; display:grid; place-items:center; padding:0 0 0 2px; border:0; border-radius:50%; color:white; background:rgba(10,18,40,.72); box-shadow:0 8px 22px rgba(0,0,0,.3); cursor:pointer; transition:opacity .18s,transform .18s; backdrop-filter:blur(8px); }.circle-play .ui-icon { width:23px; height:23px; }.attachment.circle.playing .circle-play { opacity:0; transform:scale(.86); }.attachment.circle.playing:hover .circle-play,.attachment.circle.playing:focus-within .circle-play { opacity:1; transform:scale(1); }
.circle-mute { position:absolute; z-index:5; right:14px; top:14px; width:34px; height:34px; display:grid; place-items:center; padding:0; border:0; border-radius:50%; color:#fff; background:rgba(10,18,40,.58); box-shadow:0 4px 12px rgba(0,0,0,.18); cursor:pointer; backdrop-filter:blur(8px); }.circle-mute .ui-icon { width:18px; height:18px; }
.circle-seek { position:absolute; z-index:1; inset:0; width:100%; height:100%; margin:0; padding:0; border:0; opacity:0; pointer-events:none; }
.circle-media:focus-within .circle-progress-knob { box-shadow:0 0 0 4px color-mix(in srgb,var(--cyan) 34%,transparent),0 3px 9px rgba(0,0,0,.32); }
.circle-fallback { color:var(--red); font-size:9px; font-weight:800; }
.transcript { margin: 6px 0 0; padding: 8px; border-radius: 9px; color: var(--ink); background: var(--soft); font-size: 10px; line-height: 1.4; }
.mention { padding: 1px 4px; border-radius: 5px; color: #143f78; background: #dcecff; font-weight: 850; }
.message.mentioned .message-body { outline: 2px solid var(--yellow); outline-offset: 2px; }
.message-poll { min-width: min(330px, 70vw); margin-top: 8px; }
.message-poll > b { display: block; margin-bottom: 8px; font-size: 12px; }
.poll-meta { display:block; margin:-4px 0 9px; color:var(--muted); font-size:8px; }
.poll-options { display: grid; gap: 6px; }
.poll-option { position: relative; isolation: isolate; overflow: hidden; display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--white); cursor: pointer; text-align: left; }
.poll-option i { position: absolute; z-index: -1; inset: 0 auto 0 0; background: var(--primary-soft); }
.poll-option.selected { border-color: var(--cyan); }
.poll-option.correct { border-color:var(--green); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--green) 35%,transparent); }
.poll-option.wrong { border-color:var(--red); }
.poll-option span { font-size: 11px; font-weight: 750; }
.poll-option small, .poll-total { color: var(--muted); font-size: 9px; }
.message.mine .poll-option { border-color: rgba(255,255,255,.32); }
.message-poll.closed .poll-option { cursor:default; opacity:.92; }
.photo-poll .poll-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
.photo-poll .poll-option { min-width:0; display:grid; grid-template-columns:1fr auto; align-items:center; gap:7px; padding:6px; }
.photo-poll .poll-option img { grid-column:1/-1; width:100%; aspect-ratio:4/3; border-radius:8px; object-fit:cover; background:var(--soft); }
.photo-poll .poll-option span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.link-admin-actions { display:flex; gap:6px; padding:0 12px 12px; }
.news-admin-actions { display:flex; justify-content:flex-end; gap:6px; margin-top:9px; padding-top:8px; border-top:1px solid color-mix(in srgb,var(--line) 75%,transparent); }
.danger-icon { color:var(--red) !important; background:var(--red-soft) !important; }
.feedback-card > p { line-height:1.6; }
.feedback-card .attachment { max-width:220px; }
.message-checklist { min-width: min(340px,72vw); overflow: hidden; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.checklist-title { display: flex; align-items: center; gap: 9px; padding: 11px; border-bottom: 1px solid var(--line); }.checklist-title > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--primary); font-weight: 950; }.checklist-title b,.checklist-title small { display: block; }.checklist-title b { font-size: 11px; }.checklist-title small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.checklist-items { display: grid; }.checklist-item { width: 100%; display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: start; gap: 9px; padding: 9px 11px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; cursor: pointer; }.checklist-item:last-child { border-bottom: 0; }.checklist-item:hover { background: var(--surface-alt); }.checklist-item i { width: 20px; height: 20px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 7px; color: white; font-size: 9px; font-style: normal; font-weight: 950; }.checklist-item > span { font-size: 10px; line-height: 1.35; }.checklist-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }.checklist-item.done i { border-color: var(--green); background: var(--green); }.checklist-item.done > span { color: var(--muted); text-decoration: line-through; }.checklist-item.done small { text-decoration: none; }
.message.mine .message-checklist { color: var(--ink); }.message.mine .checklist-item,.message.mine .checklist-title { color: var(--ink); }
.composer-tools { display: flex; align-items: end; gap: 4px; }
.chat-tool { position: relative; display: grid; place-items: center; width: 34px; height: 42px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 11px; color: var(--primary); background: var(--primary-soft); cursor: pointer; font-size: 17px; }
.chat-tool input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chat-disabled { padding: 15px; color: var(--muted); border-top: 1px solid var(--line); background: var(--white); text-align: center; font-size: 11px; }
.emoji-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.emoji-button { display: grid; place-items: center; aspect-ratio: 1; border: 0; border-radius: 12px; background: var(--soft); cursor: pointer; font-size: 25px; }
.mention-list { display: grid; gap: 7px; }
.mention-person { width: 100%; border: 0; text-align: left; cursor: pointer; }
.recording-box { display: grid; place-items: center; gap: 13px; min-height: 260px; margin: 18px 0; padding: 24px; border-radius: 22px; color: white; background: radial-gradient(circle at 50% 30%, #405c9d, var(--navy)); }
.recording-box > b { font-size: 27px; }
.recording-box > p { max-width: 500px; margin: 0; color: rgba(255,255,255,.72); text-align: center; font-size: 11px; }
.recording-circle { width: min(260px, 65vw); aspect-ratio: 1; border: 7px solid rgba(255,255,255,.65); border-radius: 50%; object-fit: cover; background: #111; }
.recording-wave { display: flex; align-items: center; gap: 5px; font-size: 50px; }
.recording-wave i { display: block; width: 5px; height: 35px; border-radius: 9px; background: var(--cyan); animation: wave .7s ease-in-out infinite alternate; }
.recording-wave i:nth-child(2) { animation-delay: .15s; }.recording-wave i:nth-child(3) { animation-delay: .3s; }.recording-wave i:nth-child(4) { animation-delay: .45s; }
@keyframes wave { to { height: 70px; } }
.knowledge-hero { min-height: 210px; display: flex; align-items: center; justify-content: space-between; gap: 25px; overflow: hidden; margin-bottom: 24px; padding: 30px; color: white; background: linear-gradient(125deg, var(--navy), var(--primary)); }
.knowledge-hero h2 { margin: 6px 0 10px; font-size: clamp(27px,4vw,43px); letter-spacing: -.04em; }
.knowledge-hero p:last-child { max-width: 700px; margin: 0; color: rgba(255,255,255,.72); line-height: 1.5; }
.knowledge-hero > span { display: grid; place-items: center; width: 135px; height: 135px; flex: 0 0 auto; border: 5px double rgba(255,255,255,.55); border-radius: 50%; color: white; font-size: 70px; font-weight: 950; transform: rotate(-8deg); }
.link-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; margin-bottom: 28px; }
.important-link { display: flex; align-items: center; gap: 12px; padding: 15px; color: var(--ink); text-decoration: none; transition: transform .18s; }
.important-link:hover { transform: translateY(-2px); }
.important-link > span { font-size: 27px; }
.important-link div { min-width: 0; }
.important-link b, .important-link small { display: block; overflow: hidden; text-overflow: ellipsis; }
.important-link b { font-size: 12px; white-space: nowrap; }.important-link small { margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.knowledge-heading { margin-top: 12px; }
.knowledge-tools { margin-bottom: 18px; padding: 14px; }
.knowledge-tools input { margin-bottom: 10px; }
.category-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.chip { flex: 0 0 auto; padding: 8px 10px; border: 0; border-radius: 999px; color: var(--muted); background: var(--soft); cursor: pointer; font-size: 10px; font-weight: 800; }
.chip.active { color: white; background: var(--primary); }
.knowledge-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.knowledge-card { min-height: 210px; padding: 19px; cursor: pointer; }
.knowledge-icon { display: block; margin-bottom: 14px; font-size: 31px; }
.knowledge-card small { color: var(--primary); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.knowledge-card h3 { margin: 7px 0; font-size: 16px; }.knowledge-card p { color: var(--muted); font-size: 11px; line-height: 1.5; }.knowledge-card > b { color: var(--primary); font-size: 10px; }
.reader-text { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.72; }
.reader-text.document-reader { max-height: 62vh; overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.resource-link { display: inline-flex; margin-top: 18px; text-decoration: none; }
.document-frame { width: 100%; height: min(68vh, 760px); border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.profile-layout { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(0,1.3fr); gap: 20px; align-items: start; }
.profile-card { padding: 28px; text-align: center; }
.profile-card h2 { margin: 8px 0 4px; }.profile-card > p:not(.eyebrow) { color: var(--muted); }
.profile-visual { width: 190px; max-width: 70%; aspect-ratio: 1; margin: 0 auto 22px; display: grid; place-items: center; border: 7px solid var(--white); border-radius: 50%; object-fit: cover; color: white; background: linear-gradient(135deg,var(--primary),var(--cyan)); box-shadow: 0 14px 40px rgba(34,54,104,.2); font-size: 54px; font-weight: 950; }
.video-avatar { background: #111; }
.profile-settings { min-width: 0; }
.push-settings { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; margin: 14px 0 20px; padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-alt); }
.push-settings.enabled { border-color: var(--green); }
.push-settings-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--primary-soft); font-size: 20px; }
.push-settings-icon .ui-icon { width: 21px; height: 21px; color: var(--primary); }
.push-settings b, .push-settings small { display: block; }
.push-settings small { margin-top: 3px; color: var(--muted); }
.push-settings-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.push-diagnostics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:16px 0; }.push-diagnostic { min-width:0; display:flex; align-items:center; gap:10px; padding:11px; border:1px solid var(--line); border-radius:14px; background:var(--surface-alt); }.push-diagnostic > span { width:34px; height:34px; display:grid; place-items:center; flex:0 0 auto; border-radius:11px; color:var(--green); background:color-mix(in srgb,var(--green) 13%,var(--white)); }.push-diagnostic.problem > span { color:var(--red); background:color-mix(in srgb,var(--red) 12%,var(--white)); }.push-diagnostic .ui-icon { width:18px; height:18px; }.push-diagnostic b,.push-diagnostic small { display:block; }.push-diagnostic b { font-size:11px; }.push-diagnostic small { margin-top:3px; color:var(--muted); font-size:9px; line-height:1.35; }.push-help-steps { margin-top:17px; padding:15px 17px; border-radius:16px; background:var(--primary-soft); }.push-help-steps h3 { margin:0 0 8px; font-size:14px; }.push-help-steps ol { margin:0; padding-left:20px; }.push-help-steps li { margin:6px 0; color:var(--ink); font-size:11px; line-height:1.5; }
.online-people-list { display:grid; gap:8px; }.online-person-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; padding:9px; border:1px solid var(--line); border-radius:16px; background:var(--surface-alt); }.online-person-main { min-width:0; display:flex; align-items:center; gap:11px; padding:2px; border:0; color:var(--ink); background:transparent; text-align:left; cursor:pointer; }.online-person-main > span:not(.avatar) { min-width:0; flex:1; }.online-person-main b,.online-person-main small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.online-person-main b { font-size:12px; }.online-person-main small { margin-top:3px; color:var(--muted); font-size:9px; }.online-presence-dot { width:9px; height:9px; margin-left:auto; border:2px solid var(--white); border-radius:50%; background:var(--green); box-shadow:0 0 0 3px color-mix(in srgb,var(--green) 15%,transparent); }.online-message-button { width:36px; height:36px; color:var(--primary); box-shadow:none; }.online-message-button .ui-icon { width:18px; height:18px; }.online-empty { display:grid; justify-items:center; gap:5px; border:1px dashed var(--line); border-radius:16px; }.online-empty .empty-line-icon { width:30px; height:30px; margin-bottom:4px; color:var(--muted); }.online-empty b { color:var(--ink); }.online-empty span { font-size:10px; }.online-legend { display:flex; align-items:flex-start; gap:8px; margin-top:12px; padding:10px 12px; border-radius:12px; color:var(--muted); background:var(--surface-alt); font-size:9px; line-height:1.45; }.online-legend .ui-icon { width:16px; height:16px; flex:0 0 auto; }
.profile-save { position: sticky; z-index: 4; bottom: 0; padding: 12px 0 2px; background: var(--white); }
.role-checks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; max-height: 240px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 13px; }
.credential-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:10px; padding:12px; border-radius:14px; background:var(--primary-soft); }.credential-actions small { width:100%; color:var(--muted); }
.knowledge-category-select { max-width: 520px; margin-bottom: 0; }
.public-profile { text-align: center; }
.admin-tabs { max-width: 100%; overflow-x: auto; }
.admin-user-list { display: grid; gap: 8px; }
.admin-user { min-height: 62px; display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.admin-user.inactive { opacity: .55; }
.admin-user > div:nth-child(2) { min-width: 0; flex: 1; }.admin-user b,.admin-user small { display: block; }.admin-user b { font-size: 12px; }.admin-user small { margin-top: 3px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.admin-user-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.access-legend { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-bottom: 14px; padding: 13px 15px; color: var(--muted); font-size: 10px; }
.access-settings { margin: 16px 0; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-alt); transition: opacity .18s; }
.access-settings.is-disabled { opacity: .45; }
.access-settings.is-disabled::before { content: "Выберите ограниченный доступ, чтобы эти настройки применились"; display: block; margin-bottom: 9px; color: var(--muted); font-size: 10px; font-weight: 700; }
.access-settings h3,.form-section h3 { margin: 13px 0 5px; font-size: 13px; }
.access-settings h3:first-child { margin-top: 0; }
.access-settings > p,.form-section > p { margin: 0 0 9px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.form-section { margin: 17px 0; }
.create-chat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.create-chat-card { display: grid; gap: 7px; padding: 20px; border: 1px solid var(--line); color: var(--ink); background: var(--white); text-align: left; cursor: pointer; }
.create-chat-card:hover { border-color: var(--primary); background: var(--primary-soft); }
.create-chat-card > span { font-size: 28px; }.create-chat-card b { font-size: 14px; }.create-chat-card small { color: var(--muted); line-height: 1.45; }
.group-avatar-editor { display: flex; align-items: center; gap: 14px; margin: 16px 0; }
.group-avatar-editor > img,.group-avatar-editor > span,.group-info-avatar { width: 72px; height: 72px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 24px; background: linear-gradient(135deg,var(--primary),var(--cyan)); color: white; font-size: 28px; font-weight: 900; object-fit: cover; }
.group-avatar-editor label { margin: 0; }
.group-info-head { display: flex; align-items: center; gap: 16px; margin: 7px 0 18px; }.group-info-head > div { min-width: 0; }.group-info-head p { margin: 4px 0 0; color: var(--muted); }
.group-info-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.member-list { display: grid; gap: 7px; max-height: 310px; overflow-y: auto; padding: 13px; border: 1px solid var(--line); border-radius: 16px; }.member-list h3 { margin: 0 0 5px; font-size: 13px; }
.member-row { display: flex; align-items: center; gap: 9px; padding: 7px; border-radius: 11px; background: var(--surface-alt); }.member-row > span:last-child { min-width: 0; }.member-row b,.member-row small { display: block; }.member-row b { font-size: 11px; }.member-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.qr-card { display: grid; justify-items: center; gap: 12px; margin: 18px 0; padding: 18px; border-radius: 18px; background: white; }.qr-card img { width: min(270px,70vw); height: auto; }.qr-card code { max-width: 100%; color: #111; overflow-wrap: anywhere; font-size: 10px; }
.invite-create-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) auto; align-items: end; gap: 9px; margin-bottom: 18px; }.invite-create-form label { margin: 0; }.invite-create-form .button { margin-bottom: 1px; }
.invite-list { display: grid; gap: 10px; }.invite-card { display: grid; grid-template-columns: minmax(0,1fr) 86px; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-alt); }.invite-card.inactive { opacity: .55; }.invite-card b,.invite-card small { display: block; }.invite-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }.invite-card img { grid-row: span 2; width: 86px; height: 86px; background: white; border-radius: 10px; }.invite-card code { min-width: 0; overflow-wrap: anywhere; font-size: 9px; }.invite-card > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; }.invite-note { padding: 11px; border-radius: 12px; color: var(--muted); background: var(--surface-alt); font-size: 11px; }
.role-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.role-card { padding: 17px; }.role-card > span { font-size: 26px; }.role-card h3 { margin: 10px 0 4px; font-size: 13px; }.role-card p { color: var(--muted); font-size: 10px; }
.admin-content-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.admin-content-row { display: grid; grid-template-columns: 30px minmax(0,1fr) auto auto; align-items: center; gap: 7px; padding: 9px 0; border-top: 1px solid var(--line); }
.admin-content-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.settings-card { max-width: 760px; }.tall { min-height: 270px; }
.permission-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; max-height: 55vh; overflow-y: auto; }
.permission-item { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); }
.permission-item input,.inherit-toggle input { width: 17px; height: 17px; flex: 0 0 auto; margin: 1px 0 0; box-shadow: none; }
.permission-item b,.permission-item small { display: block; }.permission-item b { font-size: 10px; }.permission-item small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.inherit-toggle { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--primary-soft); }
.permission-note { font-size: 10px; }
.voice-enhancement-setting { align-self:end; min-height:67px; padding:10px 11px; border:1px solid var(--line); }
.voice-enhancement-setting input { flex:0 0 auto; }
.voice-enhancement-setting span { display:grid; gap:3px; }
.voice-enhancement-setting b { font-size:10px; }
.voice-enhancement-setting small { color:var(--muted); font-size:8px; line-height:1.4; }
.character-counter { display:block; margin:-8px 2px 11px; color:var(--muted); text-align:right; font-size:9px; font-variant-numeric:tabular-nums; transition:color .16s; }
.character-counter.near-limit { color:var(--orange); font-weight:900; }
.lost-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.lost-grid > .empty { grid-column: 1 / -1; }
.lost-card { overflow: hidden; cursor: pointer; }
.lost-photo { position: relative; aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg,var(--primary-soft),var(--soft)); }
.lost-photo img { width: 100%; height: 100%; object-fit: cover; }.lost-photo > span { font-size: 60px; }
.lost-status { position: absolute; left: 10px; bottom: 10px; padding: 6px 9px; border-radius: 999px; color: #684700; background: var(--yellow); font-style: normal; font-size: 9px; font-weight: 900; }
.lost-status.returned { color: white; background: var(--green); }
.lost-body { padding: 15px; }.lost-body h3 { margin: 0 0 7px; font-size: 15px; }.lost-body p { margin: 0 0 8px; color: var(--ink); font-size: 11px; }.lost-body small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.lost-detail-photo { width: 100%; max-height: 420px; margin: 10px 0 18px; border-radius: 18px; object-fit: contain; background: var(--soft); }

.home-rules { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.home-rule-card { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 14px; cursor: pointer; }.home-rule-card > span { font-size: 25px; }.home-rule-card b { font-size: 12px; }.home-rule-card p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }.home-rule-card i { color: var(--muted); font-size: 20px; }
.welcome-hero { position:relative; overflow:hidden; min-height:170px; display:grid; align-items:end; margin-bottom:22px; padding:28px; border-radius:24px; color:#fff; background:linear-gradient(135deg,var(--navy),var(--primary)); box-shadow:var(--shadow); }.welcome-hero > img,.welcome-hero > video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }.welcome-hero.has-media::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(9,17,43,.9),rgba(9,17,43,.28)); }.welcome-hero > div { position:relative; z-index:1; max-width:680px; }.welcome-hero .eyebrow { color:var(--yellow); }.welcome-hero h2 { margin:5px 0 8px; font-size:clamp(27px,4vw,48px); }.welcome-hero p:last-child { margin:0; color:rgba(255,255,255,.82); font-size:14px; line-height:1.5; }
.page-cover { min-height:120px; display:flex; align-items:center; gap:18px; margin-bottom:20px; padding:24px; border-radius:22px; color:#fff; background-size:cover; background-position:center; box-shadow:var(--shadow); }.page-cover > span { width:52px; height:52px; display:grid; place-items:center; border-radius:16px; background:rgba(255,255,255,.2); font-size:26px; font-weight:900; backdrop-filter:blur(8px); }.page-cover small,.page-cover b { display:block; }.page-cover small { color:rgba(255,255,255,.75); font-size:9px; letter-spacing:.12em; }.page-cover b { margin-top:5px; font-size:24px; }
.page-design-list { display:grid; gap:12px; }.page-design-row { display:grid; gap:12px; padding:15px; border:1px solid var(--line); border-radius:17px; background:var(--surface-alt); }.page-design-title { display:flex; align-items:center; gap:10px; }.page-design-title small { display:block; margin-top:2px; color:var(--muted); font-size:9px; }.page-design-fields { display:grid; grid-template-columns:90px minmax(140px,1fr) minmax(180px,1.3fr) 90px; gap:9px; }.page-design-fields label,.page-design-actions label { margin:0; }.page-design-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }.page-cover-preview,.welcome-admin-preview { width:100%; max-height:230px; object-fit:cover; border-radius:14px; }.compact-check { margin:0; }
.plan-progress { display: flex; align-items: center; gap: 20px; margin: 0 0 14px; padding: 18px 20px; }.plan-progress h2 { margin: 2px 0 5px; font-size: 19px; }.plan-progress p:last-child { margin: 0; color: var(--muted); font-size: 11px; }.progress-ring { width: 82px; height: 82px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) var(--progress), var(--surface-alt) 0); }.progress-ring::before { content:""; grid-area: 1/1; width: 61px; height: 61px; border-radius: 50%; background: var(--white); }.progress-ring span { z-index: 1; grid-area: 1/1; font-size: 15px; font-weight: 950; }.plan-tabs .tab span { margin-left: 4px; padding: 2px 6px; border-radius: 999px; background: var(--soft); font-size: 9px; }.completion-note { margin-top: 13px; padding: 11px 13px; border-radius: 12px; color: #087856; background: #e8f8f1; font-size: 11px; font-weight: 800; }
.role-card code { display: inline-block; padding: 3px 6px; border-radius: 7px; color: var(--primary); background: var(--primary-soft); font-size: 9px; }.role-actions { display: flex; gap: 6px; flex-wrap: wrap; }.admin-subheading { margin-top: 27px; }.page-settings-list { display: grid; gap: 8px; }.page-setting-row { display: grid; grid-template-columns: 42px minmax(180px,1fr) 115px 130px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }.page-setting-row label { margin: 0; }.page-setting-row.compact { grid-template-columns: 42px minmax(180px,1fr) 115px 130px; }.page-setting-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); font-weight: 900; }.setting-switch { display: flex; align-items: center; gap: 7px; }.setting-switch input { width: 18px; height: 18px; flex: 0 0 auto; box-shadow: none; }.setting-switch span { font-size: 10px; }.transfer-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }.transfer-grid h3 { margin: 0 0 7px; font-size: 15px; }.deleted-message-list { display: grid; gap: 10px; }.deleted-message-card { padding: 15px; }.deleted-message-head { display: flex; align-items: center; gap: 10px; }.deleted-message-head > div { min-width: 0; flex: 1; }.deleted-message-head b,.deleted-message-head small { display: block; }.deleted-message-head b { font-size: 12px; }.deleted-message-head small { margin-top: 3px; color: var(--muted); font-size: 9px; }.deleted-message-card blockquote { margin: 13px 0 8px; padding: 11px 13px; border-left: 3px solid var(--red); border-radius: 0 10px 10px 0; background: var(--soft); font-size: 12px; line-height: 1.5; }.deleted-message-card footer { margin-top: 9px; color: var(--muted); font-size: 9px; }.danger-pill { color: var(--red); background: #fff0f2; }
.scheduled-notification-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.scheduled-notification-list.history { opacity:.92; }
.scheduled-notification-card { position:relative; overflow:hidden; padding:16px; border-left:4px solid var(--primary); }
.scheduled-notification-card.status-sending { border-left-color:var(--orange); }
.scheduled-notification-card.status-sent { border-left-color:var(--green); }
.scheduled-notification-card.status-error { border-left-color:var(--red); }
.scheduled-notification-card.status-cancelled { border-left-color:var(--muted); opacity:.72; }
.scheduled-notification-card > header { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:10px; }
.scheduled-notification-card > header > div { min-width:0; }
.scheduled-notification-card > header b,.scheduled-notification-card > header small { display:block; }
.scheduled-notification-card > header b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.scheduled-notification-card > header small { margin-top:3px; color:var(--muted); font-size:9px; }
.scheduled-notification-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; color:var(--primary); background:var(--primary-soft); }
.scheduled-notification-icon .ui-icon { width:19px; height:19px; }
.scheduled-notification-card > p { margin:13px 0 0; color:var(--ink); white-space:pre-wrap; font-size:11px; line-height:1.55; }
.scheduled-notification-card > footer { display:flex; flex-wrap:wrap; gap:5px 12px; margin-top:12px; padding-top:9px; border-top:1px solid var(--line); color:var(--muted); font-size:8px; }
.scheduled-notification-card .form-actions { margin-top:12px; }
.scheduled-notification-error { margin-top:10px; padding:9px 10px; border-radius:10px; color:#9f2430; background:var(--red-soft); font-size:9px; line-height:1.45; }
.scheduled-timezone-note { display:flex; align-items:flex-start; gap:7px; margin:14px 0 0; padding:10px 12px; border:1px solid var(--line); border-radius:11px; color:var(--muted); background:var(--soft); font-size:10px; line-height:1.45; }
.scheduled-timezone-note .ui-icon { width:17px; height:17px; flex:0 0 auto; color:var(--primary); }

[data-theme="dark"] { --ink:#e7eaf2; --muted:#aeb6c9; --soft:#121621; --line:#333b4d; --white:#1b2230; --navy:#151a29; --navy-2:#20283a; --primary:#a99bf5; --primary-strong:#5b45d6; --primary-soft:#2a2748; --surface-alt:#222a3a; --surface-overlay:rgba(18,22,33,.97); --chat-bg:#151a25; --nav-muted:#b6bed0; --focus-ring:#8bb8ff; --shadow:0 16px 45px rgba(5,8,16,.42); --page-tint:rgba(18,22,33,.9); --chat-wallpaper-tint:rgba(18,22,33,.72); color-scheme:dark; color:var(--ink); background:var(--soft); }
[data-theme="dark"] body { color:var(--ink); background:var(--soft); }
[data-theme="dark"] .card,[data-theme="dark"] .modal-card,[data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea { color:var(--ink); }
[data-theme="dark"] .message.mine .message-body { color:#fff; }
[data-theme="dark"] .message:not(.mine) .message-body { color:var(--ink); background:var(--white); }
[data-theme="light"] .message:not(.mine) .message-body { color:var(--ink); background:var(--white); }
[data-text-scale="large"] .message-text,[data-text-scale="large"] .card p,[data-text-scale="large"] .activity-main p,[data-text-scale="large"] .thread-item b { font-size:15px; }
[data-text-scale="xlarge"] .message-text,[data-text-scale="xlarge"] .card p,[data-text-scale="xlarge"] .activity-main p,[data-text-scale="xlarge"] .thread-item b { font-size:17px; line-height:1.55; }
[data-theme="dark"] .detail-section p,[data-theme="dark"] .detail-section li { color:var(--muted); }
[data-theme="dark"] .button.danger { color:#ffb3c1; background:#3b1e2a; }
[data-theme="dark"] .test-login-note,[data-theme="dark"] .test-warning,[data-theme="dark"] .test-mode-label { color:#ffe7a3; background:#2b2100; }
[data-theme="dark"] .pill { color:var(--muted); }
[data-theme="dark"] .pill.status-active { color:#9ff1d2; background:#103528; }
[data-theme="dark"] .pill.status-ready { color:#b9dcff; background:#102b45; }
[data-theme="dark"] .pill.status-completed { color:#d0d4dc; background:#292929; }
[data-theme="dark"] .pill.status-changed { color:#ffd0a7; background:#412612; }
[data-theme="dark"] .mention { color:#d8e7ff; background:#31547a; }
[data-theme="dark"] .poll-option { color:var(--ink); }
[data-theme="dark"] .news-read { color:#b8f5e1; background:#123b31; }
[data-theme="dark"] .import-alert.error { color:#ffc2ce; background:#411823; }
[data-theme="dark"] .import-alert.warning { color:#ffd0a7; background:#412612; }
[data-theme="dark"] .import-alert.success { color:#b8f5e1; background:#123b31; }
[data-theme="dark"] .completion-note { color:#b8f5e1; background:#123b31; }
[data-theme="dark"] .danger-pill { color:#ffc2ce; background:#411823; }
[data-theme="light"] .welcome-hero:not(.has-media) { color:var(--ink); border:1px solid color-mix(in srgb,var(--primary) 18%,var(--line)); background:linear-gradient(135deg,#fff,#eef1ff); box-shadow:var(--card-shadow); }
[data-theme="light"] .welcome-hero:not(.has-media) .eyebrow { color:var(--primary); }
[data-theme="light"] .welcome-hero:not(.has-media) p:last-child { color:var(--muted); }
[data-theme="light"] .ranking-hero { color:var(--ink); border:1px solid color-mix(in srgb,var(--primary) 18%,var(--line)); background:radial-gradient(circle at 82% 5%,rgba(47,185,197,.12),transparent 34%),linear-gradient(135deg,#fff,#eef1ff); box-shadow:var(--card-shadow); }
[data-theme="light"] .ranking-hero::after { background:rgba(91,69,214,.08); }
[data-theme="light"] .podium-place { color:var(--ink); background:rgba(91,69,214,.07); }
[data-theme="light"] .podium-place.first { background:linear-gradient(160deg,rgba(255,200,87,.28),rgba(91,69,214,.08)); }
[data-theme="light"] .podium-place small { color:var(--muted); }
[data-theme="light"] .podium-rank,[data-theme="light"] .podium-rank span { color:var(--primary); }

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior:auto; }
  *,*::before,*::after {
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    scroll-behavior:auto !important;
    transition-duration:.01ms !important;
  }
}

@media (max-width: 1080px) {
  .app { grid-template-columns: 88px minmax(0,1fr); }
  .sidebar { padding-inline: 14px; }
  .sidebar-brand div, .desktop-nav .nav-label, .sidebar-profile, .sidebar-hub { display: none; }
  .sidebar-brand { justify-content: center; padding-inline: 0; }
  .nav-button { justify-content: center; padding: 13px 8px; }
  .nav-button span:first-child { width: auto; }
  .leader-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .people-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .media-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .knowledge-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .role-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .login-screen { display: block; min-height: 100svh; }
  .login-art { display: none; }
  .login-panel { min-height: 100svh; padding: 28px 22px; }
  .mobile-logo { display: flex; }
  .app { min-height:100dvh; display: block; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .topbar { height:auto; min-height:calc(76px + env(safe-area-inset-top)); padding:calc(12px + env(safe-area-inset-top)) max(17px,env(safe-area-inset-right)) 12px max(17px,env(safe-area-inset-left)); }
  .topbar h1 { font-size: 21px; }
  .topbar .eyebrow { font-size: 9px; }
  .topbar-actions { gap:5px; }
  .topbar-actions .icon-button { flex:0 0 44px; }
  .connection span { display: none; }
  .connection.offline span, .connection.syncing span { display: inline; }
  .test-mode-label { padding: 7px 8px; font-size: 9px; }
  .content { padding: 6px max(14px,env(safe-area-inset-right)) 30px max(14px,env(safe-area-inset-left)); }
  .content.chat-content { height: calc(var(--app-height, 100dvh) - 148px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding-bottom: 6px; }
  .mobile-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(var(--mobile-nav-count, 6),1fr); padding: 7px max(5px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left)); border-top: 1px solid var(--line); background: var(--surface-overlay); backdrop-filter: blur(16px); }
  .mobile-nav .nav-button { min-height:48px; display: grid; justify-items: center; gap: 2px; padding: 4px 1px; color: var(--nav-muted); background: transparent; font-size: 9px; }
  .mobile-nav .nav-button span:first-child { font-size: 18px; }
  .mobile-nav .nav-button.active { color: var(--primary); }
  .page-grid { display: block; }
  .page-grid > * + * { margin-top: 20px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .activity-card { grid-template-columns: 66px minmax(0,1fr); }
  .activity-card .arrow { display: none; }
  .task-grid, .more-grid, .people-grid { grid-template-columns: 1fr; }
  .leader-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .leader-overview { grid-template-columns:1fr; }.leader-row { grid-template-columns:38px minmax(0,1fr) 18px; }.leader-row strong { display:none; }.leader-task-row { grid-template-columns:32px minmax(0,1fr) 18px; }.leader-task-row > .pill { display:none; }
  .media-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .storage-card { grid-template-columns: 1fr; gap: 11px; }
  .attachments { grid-template-columns: 1fr; }
  .media-checks { grid-template-columns: 1fr; }
  .disco-track { grid-template-columns: 35px minmax(0,1fr); }
  .disco-track > .button { grid-column: 2; justify-self: start; }
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  .toolbar label { min-width: 0; }
  .toolbar .button { margin: 0; }
  .ranking-row { grid-template-columns: 38px minmax(0,1fr) 85px; }
  body.chat-page { height: var(--app-height,100dvh); overflow: hidden; }
  .chat-page .app { height: var(--app-height,100dvh); min-height: 0; overflow: hidden; }
  .chat-page .app-column { height: 100%; min-height: 0; overflow: hidden; }
  .chat-page .content.chat-content { min-height: 0; overflow: hidden; }
  .chat-layout { height: 100%; min-height: 0; grid-template-columns: 1fr; border-radius: 18px 18px 0 0; }
  .chat-layout { position:relative; }
  .chat-sidebar { display: none; border: 0; }
  .chat-layout.show-list .chat-sidebar { display: block; }
  .chat-layout.show-list .chat-main { display: none; }
  .chat-layout.chat-back-swiping .chat-sidebar { position:absolute; z-index:0; inset:0; display:block; background:var(--white); }
  .chat-layout.chat-back-swiping .chat-main { position:relative; z-index:2; width:100%; transform:translate3d(var(--chat-back-x,0px),0,0); transition:none; box-shadow:-14px 0 34px rgba(12,22,52,.2); will-change:transform; }
  .chat-layout.chat-back-settling .chat-main { transition:transform .2s cubic-bezier(.2,.76,.28,1); }
  .chat-layout.chat-back-ready .chat-main { box-shadow:-18px 0 42px rgba(12,22,52,.26); }
  .chat-back { display: grid !important; }
  .message { max-width:min(82%,calc(100% - 48px)); }
  .message-form { gap: 5px; padding: 8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }
  .message-form textarea { min-height: 42px; padding: 10px 11px; font-size: 16px; }
  .composer-menu .composer-tools { width: min(255px,calc(100vw - 28px)); max-height: min(360px,55vh); overflow-y: auto; }
  .chat-tool { width: 31px; height: 40px; }
  .composer-mention { display: none; }
  .message-form .send-button { width: 43px; padding-inline: 0; }
  .message-poll { min-width: min(270px, 72vw); }
  .reaction-picker { grid-template-columns: repeat(4,1fr); }
  .home-rules,.transfer-grid { grid-template-columns: 1fr; }
  .plan-progress { align-items: flex-start; gap: 13px; padding: 15px; }.progress-ring { width: 66px; height: 66px; }.progress-ring::before { width: 49px; height: 49px; }.progress-ring span { font-size: 12px; }
  .knowledge-hero { min-height: 185px; padding: 22px; }
  .knowledge-hero > span { width: 85px; height: 85px; font-size: 43px; }
  .link-grid,.knowledge-grid,.profile-layout,.admin-content-grid { grid-template-columns: 1fr; }
  .profile-card { padding: 20px; }
  .profile-settings { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .push-settings { grid-template-columns: auto minmax(0,1fr); align-items: start; }
  .push-settings-actions { grid-column: 1 / -1; justify-content: stretch; }
  .push-settings-actions .button { flex: 1 1 auto; }
  .push-diagnostics { grid-template-columns: 1fr; }
  .menu-card { min-height:112px; grid-template-columns:48px minmax(0,1fr) 26px; gap:12px; padding:16px; }.menu-card .menu-icon { width:46px; height:46px; border-radius:15px; }.menu-card .menu-card-icon { width:23px; height:23px; }.menu-card h3 { font-size:14px; }
  .profile-save { margin: 18px -20px -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .profile-save .button { width: 100%; }
  .role-checks { grid-template-columns: 1fr; }
  .lost-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .role-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-setting-row,.page-setting-row.compact { grid-template-columns: 38px minmax(0,1fr) 90px; }.page-setting-row .setting-switch { grid-column: 2 / -1; }
  .page-design-fields { grid-template-columns:1fr; }.page-design-actions { align-items:stretch; flex-direction:column; }.page-design-actions > label { width:100%; }
  .admin-user { align-items: flex-start; flex-wrap: wrap; }
  .admin-user-actions { width: 100%; justify-content: flex-start; padding-left: 47px; }
  .admin-content-row { grid-template-columns: 28px minmax(0,1fr) auto; }
  .admin-content-row .button.danger { grid-column: 3; }
  .permission-grid { grid-template-columns: 1fr; }
  .document-frame { height: 67svh; }
  .emoji-grid { grid-template-columns: repeat(5,1fr); }
  .modal { padding: 0; align-items: end; }
  .modal-card { width: 100%; max-height: 94svh; border-radius: 24px 24px 0 0; }
  #modal-content { padding: 23px 18px 30px; }
  .upload-actions { bottom: -30px; margin: 22px -18px -30px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .upload-actions .button { flex: 1 1 auto; }
  .form-grid { display: block; }
  .detail-grid { grid-template-columns: 1fr; }
  .test-diagnostics { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: repeat(2, 1fr); }
  .toast-region { left: 12px; right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); }
  .toast { min-width: 0; max-width: none; }
  .voice-player { width: 100%; min-width: 0; grid-template-columns: 38px minmax(84px,1fr) 32px; gap: 7px; }
  .message-checklist { min-width: min(285px,76vw); }
}

@media (max-width: 760px) {
  body.keyboard-open .app { padding-bottom: 0; }
  body.keyboard-open .mobile-nav { display: none; }
  body.keyboard-open .content.chat-content { height: calc(var(--app-height,100dvh) - 76px); padding-bottom: 0; }
  body.keyboard-open .chat-layout { border-radius: 0; }
  body.keyboard-open .messages { padding-bottom: 10px; }
  body.keyboard-open .message-form { padding-bottom: max(7px,env(safe-area-inset-bottom)); }
  body.keyboard-open .topbar { position: relative; }
}

@media (max-width: 760px) {
  .chat-head { gap: 7px; padding-inline: 9px; }
  .chat-head-actions { gap: 2px; }
  .chat-head-actions .icon-button { width: 31px; height: 31px; font-size: 13px; }
  .chat-head-actions .chat-design-button { display: grid; }
  .create-chat-grid { grid-template-columns: 1fr; }
  .invite-create-form { grid-template-columns: 1fr; }
  .invite-create-form .button { width: 100%; }
  .invite-card { grid-template-columns: minmax(0,1fr) 72px; }
  .invite-card img { width: 72px; height: 72px; }
  .group-info-head { align-items: flex-start; }
  .group-avatar-editor > img,.group-avatar-editor > span,.group-info-avatar { width: 58px; height: 58px; border-radius: 19px; font-size: 23px; }
  .group-info-actions .button { flex: 1 1 auto; }
}

