/* ZVOnilka — единая дизайн-система матового пластика.
   Без фоновых свечений, неоновых ореолов, бликов и декоративных анимаций. */
:root{
  --m-bg:#0c1018;--m-body:#131924;--m-plate-hi:#212a3d;--m-plate-lo:#171e2d;
  --m-well:rgba(9,12,20,.58);--m-line:rgba(255,255,255,.06);--m-line-2:rgba(255,255,255,.1);
  --m-text:#e6ebf4;--m-text-2:#9ea9bd;--m-text-3:#6d7890;
  --m-accent:#4d7cff;--m-accent-hi:#5a88ff;--m-accent-lo:#3c69e4;
  --m-online:#3ba55d;--m-offline:#5b6477;--m-danger:#e06b6b;--m-ok:#6fcf97;
  --m-r-lg:22px;--m-r-md:16px;--m-r-sm:12px;
  --m-plate:linear-gradient(180deg,var(--m-plate-hi),var(--m-plate-lo));
  --m-plate-shadow:inset 0 1px 0 rgba(255,255,255,.045),0 1px 0 rgba(0,0,0,.35),0 6px 14px rgba(0,0,0,.22);
  --m-well-shadow:inset 0 2px 5px rgba(0,0,0,.5),inset 0 0 0 1px rgba(0,0,0,.35),0 1px 0 rgba(255,255,255,.035);
  --m-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- сброс системных бликов и тактильность ---------- */
#profile.pm-dialog,#profile.pm-dialog *,.mt-admin,.mt-admin *,.audio-player,.audio-player *,.sound-player,.sound-player *,.voice-recorder-panel,.voice-recorder-panel *,.voice-record-trigger{-webkit-tap-highlight-color:transparent}
#profile.pm-dialog button,.mt-admin button,.mt-admin .mt-file,.audio-player button,.sound-player button,.voice-recorder-panel button,.voice-record-trigger{touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#profile.pm-dialog input,#profile.pm-dialog textarea,.mt-admin input,.mt-admin textarea{-webkit-user-select:text;user-select:text}
#profile.pm-dialog :focus{outline:none}
#profile.pm-dialog :focus-visible,.mt-admin :focus-visible{outline:2px solid color-mix(in srgb,var(--m-accent) 70%,transparent);outline-offset:2px}

/* ---------- окно профиля ---------- */
#profile.pm-dialog{
  width:min(440px,calc(100vw - 16px));max-width:none;max-height:min(92vh,900px);max-height:min(92dvh,900px);
  margin:auto;padding:0;border:1px solid var(--m-line);border-radius:28px;
  background:var(--m-bg);color:var(--m-text);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  box-shadow:0 24px 60px rgba(0,0,0,.55);backdrop-filter:none;-webkit-backdrop-filter:none;scrollbar-width:none;
  font-family:inherit;
}
#profile.pm-dialog::-webkit-scrollbar{display:none}
#profile.pm-dialog::backdrop{background:rgba(5,7,12,.74);backdrop-filter:none;-webkit-backdrop-filter:none}
#profile .pm-shell{
  --banner-tint:#2f5596;position:relative;min-width:0;overflow-x:hidden;
  background:var(--m-grain),linear-gradient(180deg,color-mix(in srgb,var(--banner-tint) 13%,var(--m-body)) 0,var(--m-body) 260px);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--banner-tint) 16%,transparent);border-radius:inherit;
}
#profile .pm-screen{min-width:0}
#profile .pm-screen[hidden],#profile .pm-panel[hidden],#profile [hidden]{display:none!important}
#profile *,#profile *::before,#profile *::after{box-sizing:border-box;min-width:0}
#profile svg{display:block;width:100%;height:100%}
#profile .pm-ico{display:inline-grid;place-items:center;width:18px;height:18px;flex:0 0 auto}

/* баннер */
#profile .pm-banner{position:relative;height:118px;background-size:cover;background-position:center;border-bottom:1px solid rgba(0,0,0,.35)}
#profile .pm-banner::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(12,16,24,0) 40%,rgba(12,16,24,.35));pointer-events:none}
#profile .pm-chassis-btn{
  display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid var(--m-line-2);border-radius:12px;
  background:linear-gradient(180deg,rgba(33,42,61,.92),rgba(23,30,45,.92));color:var(--m-text);cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 2px 0 rgba(0,0,0,.35);transition:transform .08s,box-shadow .08s;
}
#profile .pm-chassis-btn svg{width:18px;height:18px}
#profile .pm-chassis-btn:active{transform:translateY(1px);box-shadow:inset 0 2px 4px rgba(0,0,0,.45)}
#profile .pm-close{position:absolute;top:12px;right:12px;z-index:2}

/* тело и аватар */
#profile .pm-body{position:relative;display:flex;flex-direction:column;gap:12px;padding:0 16px 18px}
#profile .pm-hero{display:flex;align-items:flex-end;margin-top:-48px;height:96px;position:relative;z-index:1}
#profile .pm-avatar-wrap{position:relative;width:96px;height:96px;flex:0 0 auto}
#profile .pm-avatar{
  width:96px;height:96px;border-radius:26px;border:5px solid var(--m-body);display:grid;place-items:center;
  background-size:cover;background-position:center;overflow:hidden;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--banner-tint) 30%,rgba(255,255,255,.06)),0 6px 14px rgba(0,0,0,.35);
}
#profile .pm-avatar-letter{font-size:34px;font-weight:800;color:#fff}
#profile .pm-led{position:absolute;right:-3px;bottom:-3px;width:22px;height:22px;border-radius:50%;border:5px solid var(--m-body);background:var(--m-offline)}
#profile .pm-led.is-online{background:var(--m-online)}
#profile .pm-identity{display:flex;flex-direction:column;gap:5px;min-width:0}
#profile .pm-name{margin:0;font-size:21px;line-height:1.2;font-weight:800;letter-spacing:-.01em;color:var(--m-text);overflow-wrap:anywhere}
#profile .pm-subline{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
#profile .pm-tag{font-size:13.5px;color:var(--m-text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}

/* единая капсула значков: проверка первой, Freeze второй, без подписей */
#profile .pm-badges{
  display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 8px;border-radius:9px;
  background:var(--m-well);box-shadow:var(--m-well-shadow);
  border:1px solid color-mix(in srgb,var(--banner-tint) 42%,rgba(255,255,255,.06));
}
#profile .pm-badge{display:grid;place-items:center;width:16px;height:16px;padding:0;border:0;background:none;box-shadow:none;border-radius:0}
#profile .pm-badge-verify{color:var(--m-accent-hi)}
#profile .pm-badge-freeze{color:#9cc8f5}
#profile .pm-badges.is-empty{padding:0 10px}
#profile .pm-badges-empty{font-size:12px;color:var(--m-text-3)}

/* кнопки */
#profile .pm-accent-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;height:42px;padding:0 16px;border:1px solid rgba(0,0,0,.35);border-radius:14px;
  background:linear-gradient(180deg,var(--m-accent-hi),var(--m-accent-lo));color:#fff;font:inherit;font-size:14px;font-weight:700;cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 2px 0 rgba(0,0,0,.4);transition:transform .08s,box-shadow .08s,filter .08s;
}
#profile .pm-accent-btn:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 5px rgba(0,0,0,.35)}
#profile .pm-accent-btn:disabled{filter:saturate(.35) brightness(.75);cursor:default}
#profile .pm-edit-btn{width:100%}
#profile .pm-plate-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:0 13px;border:1px solid var(--m-line);border-radius:12px;
  background:var(--m-plate);color:var(--m-text);font:inherit;font-size:13px;font-weight:600;cursor:pointer;box-shadow:var(--m-plate-shadow);transition:transform .08s,box-shadow .08s;
}
#profile .pm-plate-btn:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 5px rgba(0,0,0,.45)}
#profile .pm-plate-btn:disabled{opacity:.45;cursor:default}
#profile .pm-plate-btn.is-danger{color:var(--m-danger)}
#profile .pm-btn-row{display:flex;flex-wrap:wrap;gap:8px}
#profile .pm-btn-row>*{flex:1 1 130px}

/* сегментный переключатель в утопленном пазу */
#profile .pm-segment{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border-radius:14px;background:var(--m-well);box-shadow:var(--m-well-shadow)}
#profile .pm-seg-btn{height:34px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--m-text-2);font:inherit;font-size:13.5px;font-weight:700;cursor:pointer;transition:transform .08s}
#profile .pm-seg-btn[aria-selected="true"]{background:var(--m-plate);border-color:var(--m-line);color:var(--m-text);box-shadow:var(--m-plate-shadow)}
#profile .pm-seg-btn:active{transform:translateY(1px)}

/* матовые пластины */
#profile .pm-panel{display:flex;flex-direction:column;gap:10px}
#profile .pm-plate{display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:18px;background:var(--m-plate);border:1px solid var(--m-line);box-shadow:var(--m-plate-shadow)}
#profile .pm-plate-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
#profile .pm-label{margin:0;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--m-text-3)}
#profile .pm-count{min-width:22px;height:20px;padding:0 7px;border-radius:7px;background:var(--m-well);box-shadow:var(--m-well-shadow);font-size:11.5px;font-weight:700;color:var(--m-text-2);display:inline-grid;place-items:center}
#profile .pm-bio{margin:0;font-size:14px;line-height:1.5;color:var(--m-text);white-space:pre-wrap;overflow-wrap:anywhere}
#profile .pm-bio.is-empty{color:var(--m-text-3)}
#profile .pm-since{display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding-top:10px;border-top:1px solid var(--m-line);font-size:13px;color:var(--m-text-2)}
#profile .pm-since .pm-ico{width:16px;height:16px;color:var(--m-text-3)}
#profile .pm-since strong{color:var(--m-text);font-weight:600}
#profile .pm-empty{margin:0;font-size:13px;color:var(--m-text-3)}

/* лента «Друзья» */
#profile .pm-friends{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(62px,1fr);gap:8px;overflow-x:auto;overflow-y:hidden;padding:2px;scrollbar-width:none;overscroll-behavior-x:contain}
#profile .pm-friends::-webkit-scrollbar{display:none}
#profile .pm-friend{display:flex;flex-direction:column;align-items:center;gap:6px;width:100%;padding:8px 4px 7px;border:1px solid transparent;border-radius:14px;background:var(--m-well);box-shadow:var(--m-well-shadow);color:var(--m-text-2);font:inherit;cursor:pointer;transition:transform .08s}
#profile .pm-friend:active{transform:translateY(1px)}
#profile .pm-friend-ava{position:relative;display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background-size:cover;background-position:center}
#profile .pm-friend-ava .pm-avatar-letter{font-size:17px}
#profile .pm-friend-dot{position:absolute;right:-3px;bottom:-3px;width:13px;height:13px;border-radius:50%;background:var(--m-online);border:3px solid #10151f}
#profile .pm-friend-name{display:block;width:100%;font-size:12px;line-height:1.25;font-weight:600;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* вкладка «События»: активности ПК-клиента, без зелёных индикаторов */
#profile .pm-activities{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
#profile .pm-activity{display:flex;align-items:center;gap:11px;padding:10px;border-radius:14px;background:var(--m-well);box-shadow:var(--m-well-shadow)}
#profile .pm-activity-ico{display:grid;place-items:center;width:42px;height:42px;flex:0 0 auto;padding:10px;border-radius:12px;background:var(--m-plate);border:1px solid color-mix(in srgb,var(--banner-tint) 35%,var(--m-line));color:color-mix(in srgb,var(--banner-tint) 45%,#dfe6f3);box-shadow:var(--m-plate-shadow)}
#profile .pm-activity-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
#profile .pm-activity-top{display:flex;align-items:baseline;gap:8px;min-width:0}
#profile .pm-activity-name{font-size:14px;font-weight:700;color:var(--m-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#profile .pm-activity-kind{flex:0 0 auto;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--m-text-3)}
#profile .pm-activity-detail{font-size:12.5px;color:var(--m-text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#profile .pm-activity-meta{font-size:11.5px;color:var(--m-text-3);font-variant-numeric:tabular-nums}
#profile .pm-source{display:flex;align-items:center;gap:6px;margin:0;font-size:11.5px;color:var(--m-text-3)}
#profile .pm-source .pm-ico{width:14px;height:14px}
#profile .pm-activity-empty{display:flex;flex-direction:column;align-items:center;gap:4px;padding:14px 8px;border-radius:14px;background:var(--m-well);box-shadow:var(--m-well-shadow);text-align:center}
#profile .pm-activity-empty p{margin:4px 0 0;font-size:13.5px;font-weight:700;color:var(--m-text)}
#profile .pm-activity-empty span:not(.pm-ico){font-size:12px;color:var(--m-text-3);line-height:1.4}
#profile .pm-empty-ico{width:26px;height:26px;color:var(--m-text-3)}

/* ---------- отдельный экран «Редактор профиля» ---------- */
#profile .pm-editor{display:flex;flex-direction:column;gap:10px;padding:0 14px 18px}
#profile .pm-editor-top{position:sticky;top:0;z-index:3;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;margin:0 -14px;padding:12px 14px;background:color-mix(in srgb,var(--banner-tint) 8%,var(--m-body));border-bottom:1px solid var(--m-line)}
#profile .pm-editor-title{margin:0;font-size:16px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#profile .pm-save{height:36px;padding:0 14px;font-size:13px}
#profile .pm-editor-preview{position:relative;height:126px;margin-top:2px}
#profile .pm-banner-mini{height:86px;border-radius:16px;border:1px solid var(--m-line)}
#profile .pm-banner-mini::after{border-radius:inherit}
#profile .pm-avatar-wrap-mini{position:absolute;left:12px;bottom:0;width:72px;height:72px}
#profile .pm-avatar-wrap-mini .pm-avatar{width:72px;height:72px;border-radius:22px;border-width:4px}
#profile .pm-avatar-wrap-mini .pm-avatar-letter{font-size:26px}
#profile .pm-edit-section{gap:8px}
#profile .pm-edit-body{display:flex;flex-direction:column;gap:6px}
#profile .pm-hint{margin:-2px 0 2px;font-size:12px;line-height:1.4;color:var(--m-text-3)}
#profile .pm-well{position:relative;display:flex;align-items:center;border-radius:12px;background:var(--m-well);box-shadow:var(--m-well-shadow);border:1px solid rgba(0,0,0,.25)}
#profile .pm-input,#profile .pm-textarea{width:100%;margin:0;border:0;outline:0;background:transparent;color:var(--m-text);font:inherit;font-size:14px;box-shadow:none}
#profile .pm-input{height:42px;padding:0 40px 0 12px}
#profile .pm-textarea{min-height:92px;padding:10px 12px;resize:vertical;line-height:1.45}
#profile .pm-well:focus-within{border-color:color-mix(in srgb,var(--m-accent) 55%,transparent)}
#profile .pm-clear{position:absolute;right:7px;top:50%;display:grid;place-items:center;width:28px;height:28px;padding:5px;margin-top:-14px;border:0;border-radius:9px;background:var(--m-plate);color:var(--m-text-2);cursor:pointer;box-shadow:var(--m-plate-shadow)}
#profile .pm-clear:active{transform:translateY(1px);box-shadow:inset 0 2px 4px rgba(0,0,0,.45)}
#profile .pm-counter{align-self:flex-end;font-size:11px;color:var(--m-text-3);font-variant-numeric:tabular-nums}
#profile .pm-swatches{display:flex;flex-wrap:wrap;gap:8px;padding:6px;border-radius:14px;background:var(--m-well);box-shadow:var(--m-well-shadow)}
#profile .pm-swatch{width:36px;height:36px;padding:0;border:1px solid rgba(0,0,0,.4);border-radius:11px;cursor:pointer;background:linear-gradient(180deg,color-mix(in srgb,var(--sw) 88%,#fff 12%),var(--sw));box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 2px 0 rgba(0,0,0,.35);transition:transform .08s}
#profile .pm-swatch:active{transform:translateY(1px)}
#profile .pm-swatch[aria-checked="true"]{box-shadow:inset 0 0 0 2px var(--m-body),0 0 0 2px var(--m-text)}
#profile .pm-editor-status{min-height:18px;margin:0;font-size:12.5px;color:var(--m-text-2)}
#profile .pm-editor-status.is-error{color:var(--m-danger)}
#profile .pm-toast{position:sticky;bottom:12px;left:0;z-index:5;width:max-content;max-width:calc(100% - 32px);margin:-46px auto 12px;padding:9px 14px;border-radius:12px;background:var(--m-plate);border:1px solid var(--m-line-2);color:var(--m-text);font-size:13px;font-weight:600;box-shadow:var(--m-plate-shadow);opacity:0;pointer-events:none;transition:opacity .15s}
#profile .pm-toast.is-visible{opacity:1}
#profile .pm-toast.is-error{color:var(--m-danger)}

@media (max-width:520px){
  #profile.pm-dialog{width:calc(100vw - 12px);max-height:calc(100vh - 12px);max-height:calc(100dvh - 12px);border-radius:24px}
  #profile .pm-body{padding:0 12px 16px}
  #profile .pm-banner{height:104px}
  #profile .pm-hero{margin-top:-44px;height:88px}
  #profile .pm-avatar-wrap:not(.pm-avatar-wrap-mini),#profile .pm-avatar-wrap:not(.pm-avatar-wrap-mini) .pm-avatar{width:88px;height:88px}
  #profile .pm-name{font-size:19px}
}
@media (prefers-reduced-motion:reduce){#profile *,.mt-admin *{transition:none!important}}

/* ---------- компактные голосовые, звуки и музыка ---------- */
.audio-player{width:min(100%,300px)!important;margin:4px 0!important}
.audio-bubble{grid-template-columns:32px minmax(0,1fr)!important;gap:9px!important;padding:6px 10px 6px 7px!important;border-radius:14px!important;align-items:center}
.audio-bubble::after,.audio-bubble::before,.audio-player.is-playing .audio-play::before,.audio-player.is-playing .audio-play::after{content:none!important;display:none!important;animation:none!important}
.audio-player .audio-play,.audio-play{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 1px 0 rgba(0,0,0,.35)!important;animation:none!important}
.audio-play svg{width:14px!important;height:14px!important}
.audio-play:active{transform:translateY(1px)}
.audio-content{gap:2px!important}
.audio-waveform{height:18px!important;gap:1.5px!important}
.audio-wave-bar{max-width:3px!important}
.audio-footer{gap:5px!important;font-size:10.5px!important;line-height:1.2}
.audio-speed{height:18px!important;min-width:28px!important;padding:0 5px!important;font-size:9.5px!important;border-radius:6px!important}
.audio-player .video-status{margin-top:2px!important;font-size:11px}
.audio-player .media-timeline.audio-timeline::-webkit-slider-thumb{width:10px;height:10px}
.audio-player .media-timeline.audio-timeline::-moz-range-thumb{width:10px;height:10px}
.sound-player{width:min(100%,300px)!important}
.sound-player .media-controls.sound-controls{grid-template-columns:32px minmax(0,1fr)!important;gap:9px!important;padding:7px 9px!important;border-radius:14px!important;align-items:center}
.sound-player .sound-play{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 1px 0 rgba(0,0,0,.35)!important}
.sound-player .sound-play svg{width:14px!important;height:14px!important}
.sound-player .sound-play:active{transform:translateY(1px)}
.sound-card{gap:3px!important}
.sound-heading{gap:6px!important}
.sound-icon{width:20px!important;height:20px!important;font-size:12px!important;border-radius:6px!important}
.sound-details{gap:5px!important}
.sound-title{font-size:12px!important}
.sound-format{font-size:9.5px!important}
.sound-player .media-timeline{height:4px!important}
.sound-footer{gap:5px!important;font-size:10.5px!important}
.sound-download{width:26px!important;min-width:26px!important;height:26px!important;font-size:13px!important;border-radius:8px!important}
.voice-record-trigger{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important}
.voice-record-trigger svg{width:17px!important;height:17px!important}
.voice-recorder-panel{gap:8px!important;margin:0 0 6px!important;padding:6px 10px!important;border-radius:12px!important}
.voice-recorder-info{gap:7px!important}
.voice-recorder-title{font-size:12px!important}
.voice-recorder-time{font-size:11px!important}
.voice-recorder-dot{width:7px!important;height:7px!important;box-shadow:none!important;animation:none!important}
.voice-recorder-actions{gap:5px!important}
.voice-recorder-actions button{min-height:30px!important;padding:4px 10px!important;font-size:12px!important;border-radius:9px!important}
.voice-recorder-preview{width:min(100%,280px)!important;height:30px!important}
.voice-recorder-status{margin:2px 8px 4px!important;font-size:11px!important}
#incomingCall .muted{font-size:12px}

/* ---------- админ-панель в том же матовом стиле ---------- */
body.mt-admin{background:var(--m-grain),var(--m-bg)!important;color:var(--m-text);overflow-x:hidden}
body.mt-admin::before,body.mt-admin::after{content:none!important;display:none!important}
.mt-admin main{max-width:1120px;min-width:0;padding:24px 18px 56px}
.mt-admin *,.mt-admin *::before,.mt-admin *::after{min-width:0}
.mt-admin header{padding:18px 20px;border-radius:var(--m-r-lg);background:var(--m-body);border:1px solid var(--m-line);box-shadow:var(--m-plate-shadow)}
.mt-admin h1{font-size:clamp(24px,3.4vw,32px);color:var(--m-text)}
.mt-admin .eyebrow{color:var(--m-text-3)}
.mt-admin .sub,.mt-admin .status,.mt-admin .muted{color:var(--m-text-2)}
.mt-admin .back{color:var(--m-text-2)}
.mt-admin .panel{background:var(--m-plate)!important;border:1px solid var(--m-line)!important;border-radius:var(--m-r-lg)!important;box-shadow:var(--m-plate-shadow)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;padding:18px}
.mt-admin .panel h2{font-size:15px;font-weight:800;color:var(--m-text);letter-spacing:.01em}
.mt-admin button,.mt-admin .button{min-height:38px;padding:0 14px;border-radius:12px;border:1px solid rgba(0,0,0,.35);background:linear-gradient(180deg,var(--m-accent-hi),var(--m-accent-lo));color:#fff;font-size:13.5px;font-weight:700;box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 2px 0 rgba(0,0,0,.4);transition:transform .08s,box-shadow .08s}
.mt-admin button:hover,.mt-admin .button:hover{background:linear-gradient(180deg,#6590ff,#4472ea)}
.mt-admin button:active:not(:disabled),.mt-admin .button:active{transform:translateY(1px);box-shadow:inset 0 2px 5px rgba(0,0,0,.35)}
.mt-admin .secondary,.mt-admin button.secondary,.mt-admin .button.secondary{background:var(--m-plate);color:var(--m-text);border:1px solid var(--m-line-2);box-shadow:var(--m-plate-shadow)}
.mt-admin .secondary:hover{background:linear-gradient(180deg,#263049,#1a2234);color:#fff;border-color:var(--m-line-2)}
.mt-admin .danger,.mt-admin button.danger{background:linear-gradient(180deg,#b84a4f,#963a3f);box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 2px 0 rgba(0,0,0,.4)}
.mt-admin button:disabled{opacity:.45;cursor:default}
.mt-admin input:not([type=color]):not([type=file]),.mt-admin select,.mt-admin textarea{min-height:40px;border-radius:12px;border:1px solid rgba(0,0,0,.3);background:var(--m-well);color:var(--m-text);box-shadow:var(--m-well-shadow)}
.mt-admin input:focus,.mt-admin select:focus{border-color:color-mix(in srgb,var(--m-accent) 55%,transparent);box-shadow:var(--m-well-shadow)}
.mt-admin label{color:var(--m-text-2)}
.mt-admin .user-row,.mt-admin .invite-row,.mt-admin .log-row{border-top-color:var(--m-line)}
.mt-admin .protection-note span{background:var(--m-well);box-shadow:var(--m-well-shadow);border-color:transparent;color:var(--m-text-2)}
.mt-admin .new-request{background:color-mix(in srgb,var(--m-accent) 12%,transparent);animation:none}

/* общие матовые элементы админки */
.mt-well{border-radius:14px;background:var(--m-well);box-shadow:var(--m-well-shadow)}
.mt-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.mt-head h2{margin:0!important}
.mt-count{display:inline-grid;place-items:center;min-width:24px;height:22px;padding:0 8px;border-radius:8px;background:var(--m-well);box-shadow:var(--m-well-shadow);font-size:12px;font-weight:700;color:var(--m-text-2)}
.mt-segment{display:inline-grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px;padding:4px;border-radius:14px;background:var(--m-well);box-shadow:var(--m-well-shadow);max-width:100%}
.mt-admin .mt-segment button{min-height:32px;padding:0 14px;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--m-text-2);box-shadow:none;font-size:13px}
.mt-admin .mt-segment button:hover{background:transparent;color:var(--m-text)}
.mt-admin .mt-segment button[aria-pressed="true"],.mt-admin .mt-segment button[aria-selected="true"]{background:var(--m-plate);color:var(--m-text);border-color:var(--m-line);box-shadow:var(--m-plate-shadow)}
.mt-ico{display:inline-grid;place-items:center;width:18px;height:18px;flex:0 0 auto}
.mt-ico svg{display:block;width:100%;height:100%}

/* активности: форма */
.mt-activity-form{display:grid;grid-template-columns:minmax(0,1.3fr) auto minmax(0,1fr) minmax(0,1fr) auto;gap:10px;align-items:end;margin:10px 0 14px}
.mt-activity-form label{display:grid;gap:6px;font-size:12.5px}
.mt-activity-form .mt-kind{display:grid;gap:6px;font-size:12.5px;color:var(--m-text-2);font-weight:500}
.mt-activity-form button[type=submit]{min-height:40px}
.mt-tabs{margin:6px 0 12px}
/* активности: список распознавания */
.mt-activity-list{list-style:none;margin:0;padding:6px;display:flex;flex-direction:column;gap:6px}
.mt-activity-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;background:var(--m-plate);border:1px solid var(--m-line);box-shadow:var(--m-plate-shadow)}
.mt-activity-row.is-stopped{opacity:.62}
.mt-activity-ico{display:grid;place-items:center;width:38px;height:38px;padding:9px;border-radius:11px;background:var(--m-well);box-shadow:var(--m-well-shadow);color:#c9d6ee}
.mt-activity-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.mt-activity-title{display:flex;align-items:baseline;gap:8px;min-width:0;flex-wrap:wrap}
.mt-activity-title strong{font-size:14px;color:var(--m-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.mt-chip{flex:0 0 auto;font-size:10.5px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--m-text-3)}
.mt-activity-meta{font-size:12px;color:var(--m-text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mt-activity-meta code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;color:var(--m-text-2)}
.mt-activity-actions{display:flex;align-items:center;gap:6px}
.mt-admin .mt-toggle{min-height:32px;min-width:118px;padding:0 10px;font-size:12.5px;border-radius:10px;background:var(--m-well);color:var(--m-text-2);border:1px solid rgba(0,0,0,.3);box-shadow:var(--m-well-shadow)}
.mt-admin .mt-toggle:hover{background:var(--m-well);color:var(--m-text)}
.mt-admin .mt-toggle[aria-pressed="true"]{background:var(--m-plate);color:var(--m-text);border-color:var(--m-line);box-shadow:var(--m-plate-shadow)}
.mt-toggle-knob{display:inline-block;width:8px;height:8px;margin-right:7px;border-radius:2px;background:var(--m-text-3)}
.mt-toggle[aria-pressed="true"] .mt-toggle-knob{background:var(--m-accent-hi)}
.mt-admin .mt-icon-btn{display:grid;place-items:center;width:32px;min-width:32px;min-height:32px;height:32px;padding:7px;border-radius:10px;background:var(--m-plate);color:var(--m-danger);border:1px solid var(--m-line);box-shadow:var(--m-plate-shadow)}
.mt-admin .mt-icon-btn:hover{background:var(--m-plate);color:#ff8a8a}
.mt-empty{margin:0;padding:14px;text-align:center;font-size:13px;color:var(--m-text-3)}
/* превью вкладки «События» */
.mt-preview{max-width:440px;padding:14px;border-radius:20px;background:var(--m-grain),linear-gradient(180deg,color-mix(in srgb,var(--banner-tint,#2f5596) 13%,var(--m-body)),var(--m-body) 180px);border:1px solid var(--m-line)}
.mt-preview-seg{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin-bottom:10px;border-radius:14px;background:var(--m-well);box-shadow:var(--m-well-shadow)}
.mt-preview-seg span{display:grid;place-items:center;height:30px;border-radius:10px;font-size:13px;font-weight:700;color:var(--m-text-2)}
.mt-preview-seg span.is-on{background:var(--m-plate);color:var(--m-text);border:1px solid var(--m-line);box-shadow:var(--m-plate-shadow)}
.mt-preview-card{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:16px;background:var(--m-plate);border:1px solid var(--m-line);box-shadow:var(--m-plate-shadow)}
.mt-preview-card .mt-label{margin:0;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--m-text-3)}
.mt-preview-row{display:flex;align-items:center;gap:11px;padding:9px;border-radius:13px;background:var(--m-well);box-shadow:var(--m-well-shadow)}
.mt-preview-row .mt-activity-ico{background:var(--m-plate);box-shadow:var(--m-plate-shadow);border:1px solid color-mix(in srgb,var(--banner-tint,#2f5596) 35%,var(--m-line))}
.mt-preview-note{margin:10px 0 0;font-size:12px;color:var(--m-text-3)}

/* звук звонка — компактный блок */
.mt-ring{display:flex;flex-direction:column;gap:10px}
.mt-ring-current{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:12.5px;color:var(--m-text-2)}
.mt-ring-current strong{color:var(--m-text);font-weight:700;overflow-wrap:anywhere}
.mt-ring-player{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:9px;padding:6px 10px 6px 6px;border-radius:12px;background:var(--m-well);box-shadow:var(--m-well-shadow)}
.mt-admin .mt-ring-play{display:grid;place-items:center;width:30px;min-width:30px;height:30px;min-height:30px;padding:8px;border-radius:9px}
.mt-ring-info{display:flex;flex-direction:column;gap:4px;min-width:0}
.mt-ring-name{font-size:12px;font-weight:600;color:var(--m-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mt-ring-bar{position:relative;height:3px;border-radius:2px;background:rgba(255,255,255,.08);overflow:hidden}
.mt-ring-bar i{position:absolute;inset:0 auto 0 0;width:0;background:var(--m-accent-hi);border-radius:inherit}
.mt-ring-time{font-size:10.5px;color:var(--m-text-3);font-variant-numeric:tabular-nums;white-space:nowrap}
.mt-ring-actions{display:flex;flex-wrap:wrap;gap:8px}
.mt-ring-actions>*{flex:1 1 140px}
.mt-file{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:0 14px;border-radius:12px;background:var(--m-plate);border:1px solid var(--m-line-2);box-shadow:var(--m-plate-shadow);color:var(--m-text)!important;font-size:13.5px!important;font-weight:700!important;cursor:pointer}
.mt-file:active{transform:translateY(1px);box-shadow:inset 0 2px 5px rgba(0,0,0,.45)}
.mt-file input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.mt-file:focus-within{outline:2px solid color-mix(in srgb,var(--m-accent) 70%,transparent);outline-offset:2px}

@media (max-width:900px){.mt-activity-form{grid-template-columns:1fr 1fr}.mt-activity-form button[type=submit]{grid-column:1/-1}}
@media (max-width:560px){
  .mt-admin main{padding:14px 10px 40px}
  .mt-admin .panel{padding:14px}
  .mt-activity-form{grid-template-columns:1fr}
  .mt-activity-row{grid-template-columns:auto minmax(0,1fr);row-gap:8px}
  .mt-activity-actions{grid-column:1/-1}
  .mt-activity-actions .mt-toggle{flex:1}
}
.mt-subtitle{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--m-text-3)}
/* Встроенные страницы (/freeze, /shop, /friends, /palette, /admin) поверх области чата */
#pageView[hidden]{display:none!important}
#pageView{position:absolute;inset:0;z-index:6;display:flex;min-width:0;overflow:hidden;background:var(--main,#0c1018)}
#pageFrame{display:block;flex:1;width:100%;height:100%;min-width:0;border:0;background:transparent;color-scheme:dark}
#sideLinks a.active{background:rgba(9,12,20,.58);box-shadow:inset 0 1px 2px rgba(0,0,0,.45);color:var(--text,#e6ebf4)}
