/* CERBER workspace v2 — final structural layer for account, chat and administration. */

.cabinet-window[aria-busy="true"] { cursor: progress; }
.cabinet-session-stage {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 32px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(var(--accent-rgb), .08), transparent 20rem),
    linear-gradient(145deg, #08171c, #061116);
}
.cabinet-session-stage small { color: var(--accent); font-size: 8px; letter-spacing: .16em; }
.cabinet-session-stage strong { margin-top: 7px; color: #e8f1f2; font-size: 20px; font-weight: 560; }
.cabinet-session-stage p { max-width: 390px; margin: 0; color: #71868c; font-size: 11px; line-height: 1.65; }
.session-stage-radar { position: relative; width: 82px; height: 82px; margin-bottom: 16px; overflow: visible; border: 1px solid rgba(var(--accent-rgb), .38); border-radius: 50%; }
.session-stage-radar::before,
.session-stage-radar::after { content: ""; position: absolute; background: rgba(var(--accent-rgb), .25); }
.session-stage-radar::before { left: -12px; right: -12px; top: 50%; height: 1px; }
.session-stage-radar::after { top: -12px; bottom: -12px; left: 50%; width: 1px; }
.session-stage-radar i { position: absolute; inset: 14px; border: 1px solid rgba(var(--accent-rgb), .25); border-radius: 50%; }
.session-stage-radar span { position: absolute; inset: 4px; border-radius: 50%; background: conic-gradient(rgba(var(--accent-rgb), .66), transparent 18%, transparent); animation: workspace-radar 1.8s linear infinite; }
.session-stage-radar b { position: absolute; width: 6px; height: 6px; left: 53px; top: 23px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

.cabinet-entry-close,
.cabinet-dashboard-close {
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #294047;
  border-radius: 7px;
  background: #09181d;
  color: #91a7ac;
  transition: border-color .18s, background .18s, color .18s, transform .18s;
}
.cabinet-entry-close::before,
.cabinet-entry-close::after { display: none !important; }
.cabinet-entry-close > span,
.cabinet-dashboard-close > span { position: relative; width: 15px; height: 15px; display: block; }
.cabinet-entry-close > span::before,
.cabinet-entry-close > span::after,
.cabinet-dashboard-close > span::before,
.cabinet-dashboard-close > span::after { content: ""; position: absolute; left: 1px; top: 7px; width: 13px; height: 1px; border-radius: 1px; background: currentColor; }
.cabinet-entry-close > span::before,
.cabinet-dashboard-close > span::before { transform: rotate(45deg); }
.cabinet-entry-close > span::after,
.cabinet-dashboard-close > span::after { transform: rotate(-45deg); }
.cabinet-entry-close:hover,
.cabinet-dashboard-close:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), .055); color: #fff; transform: translateY(-1px); }
.cabinet-dashboard-close { position: static; flex: 0 0 auto; }

/* Keep every radar sweep anchored to its own circular viewport. */
.account-page .login-radar { position: relative; isolation: isolate; }
.account-page .login-radar > span { transform-origin: 50% 50%; }

/* The earlier modal layer intentionally makes the button text transparent. */
.account-page .cabinet-entry-close { color: #b9c8cb !important; }
.account-page .cabinet-entry-close:hover { color: #fff !important; }
.account-page .cabinet-entry-close > span::before,
.account-page .cabinet-entry-close > span::after { background: currentColor !important; }

/* Live protection marker used both at the gateway and in an open session. */
.account-page :is(.encryption-note > i, .session-security-chip > i) {
  position: relative;
  background: rgba(var(--accent-rgb), .18);
  box-shadow: 0 0 7px rgba(var(--accent-rgb), .45), inset 0 0 5px rgba(var(--accent-rgb), .25);
  animation: workspace-security-pulse 1.45s ease-in-out infinite;
}
.account-page :is(.encryption-note > i, .session-security-chip > i)::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--accent);
  opacity: .78;
}

.cabinet-dashboard-v2 { grid-template-columns: 218px minmax(0, 1fr); background: #071217; }
.cabinet-dashboard-v2 .cabinet-sidebar { padding: 27px 16px 18px; background: linear-gradient(180deg, #061216, #050f13); }
.cabinet-dashboard-v2 .cabinet-logo { padding: 0 11px 22px; }
.cabinet-dashboard-v2 .cabinet-sidebar nav { margin-top: 20px; }
.cabinet-dashboard-v2 .cabinet-tab,
.cabinet-dashboard-v2 .cabinet-page-link { min-height: 44px; border-radius: 7px; }
.cabinet-dashboard-v2 .cabinet-content { padding: 24px 28px 34px; scrollbar-color: var(--accent) transparent; }
.cabinet-dashboard-v2 .cabinet-content::-webkit-scrollbar { width: 6px; }
.cabinet-dashboard-v2 .cabinet-content::-webkit-scrollbar-track { background: transparent; }
.cabinet-dashboard-v2 .cabinet-content::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(var(--accent-rgb), .52); }
.cabinet-dashboard-v2 .cabinet-content-head {
  position: sticky;
  top: -24px;
  z-index: 4;
  min-height: 76px;
  margin: 0 -5px 18px;
  padding: 14px 14px 14px 18px;
  border-color: #263b41;
  border-radius: 9px;
  background: rgba(8, 23, 28, .93);
  backdrop-filter: blur(18px);
}
.cabinet-dashboard-v2 .cabinet-content-head h2 { font-size: clamp(20px, 2.1vw, 27px); letter-spacing: -.025em; }
.cabinet-head-profile { display: flex; align-items: center; gap: 8px; }

.pending-access-card { border-radius: 8px; }
.overview-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.overview-status-grid > article {
  min-height: 102px;
  padding: 15px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid #263a40;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(13, 31, 37, .96), rgba(7, 20, 25, .98));
}
.status-index { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(138, 220, 123, .34); border-radius: 50%; color: #8adc7b; font-size: 8px; }
.status-index.orange { border-color: rgba(239, 192, 113, .34); color: #efc071; }
.status-index.blue { border-color: rgba(128, 196, 241, .34); color: #80c4f1; }
.overview-status-grid small { color: #617980; font-size: 7px; letter-spacing: .1em; }
.overview-status-grid strong { display: block; margin-top: 7px; overflow: hidden; color: #e1eaec; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.overview-status-grid strong em { color: #efc071; font-style: normal; }
.overview-status-grid p { margin: 3px 0 0; color: #5d737a; font-size: 8px; line-height: 1.35; }
.overview-command-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(265px, .72fr); gap: 10px; margin-top: 10px; }
.overview-command-grid .dashboard-card { border-radius: 8px; }
.overview-product-list { margin-top: 13px; display: grid; gap: 8px; }
.overview-product {
  min-height: 116px;
  padding: 14px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border: 1px solid #25383e;
  border-radius: 7px;
  background: #07151a;
}
.overview-product.product-p { border-left-color: #8adc7b; }
.overview-product.product-d { border-left-color: #efc071; }
.overview-product-mark { height: 40px; display: flex; align-items: end; justify-content: center; gap: 4px; color: #8adc7b; }
.overview-product-mark i { width: 5px; height: 13px; border-radius: 2px 2px 0 0; background: currentColor; }
.overview-product-mark i:nth-child(2) { height: 25px; }
.overview-product-mark i:nth-child(3) { height: 17px; }
.overview-product-mark i:nth-child(4) { height: 34px; }
.overview-product-mark i:nth-child(5) { height: 21px; }
.overview-product-mark.pulse { align-items: center; gap: 8px; color: #efc071; }
.overview-product-mark.pulse i { width: 8px; height: 8px; border-radius: 50%; }
.overview-product small { color: #60777e; font-size: 7px; letter-spacing: .08em; }
.overview-product h3 { margin: 3px 0; font-size: 18px; font-weight: 560; }
.overview-product h3 em { color: var(--accent); font-style: normal; }
.overview-product.product-d h3 em { color: #efc071; }
.overview-product p { margin: 0; color: #71868c; font-size: 9px; }
.overview-product > a { min-width: 105px; min-height: 36px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #2b4249; border-radius: 5px; color: #bed0d3; font-size: 8px; }
.overview-product > a:hover { border-color: var(--accent); color: #fff; }
.overview-actions-card nav { margin-top: 13px; display: grid; }
.overview-actions-card nav a { min-height: 73px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid #25363b; }
.overview-actions-card nav a > i { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #294047; border-radius: 50%; color: var(--accent); font-size: 7px; font-style: normal; }
.overview-actions-card nav strong { display: block; color: #cdd9db; font-size: 10px; }
.overview-actions-card nav small { display: block; margin-top: 3px; color: #5f767d; font-size: 8px; }
.overview-actions-card nav b { color: var(--accent); font-weight: 400; }

.cabinet-panel-intro { min-height: 94px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid #263a40; border-radius: 8px; background: linear-gradient(125deg, rgba(var(--accent-rgb), .045), transparent 48%), #08171c; }
.cabinet-panel-intro small { color: var(--accent); font-size: 7px; letter-spacing: .12em; }
.cabinet-panel-intro h3 { margin: 4px 0 3px; font-size: 21px; font-weight: 540; }
.cabinet-panel-intro p { max-width: 610px; margin: 0; color: #698087; font-size: 9px; line-height: 1.5; }
.release-filters { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.release-filters button { min-height: 34px; padding: 0 12px; border: 1px solid #294047; border-radius: 5px; background: #07151a; color: #71888f; font-size: 8px; }
.release-filters button:hover,
.release-filters button.is-active { border-color: rgba(var(--accent-rgb), .5); background: rgba(var(--accent-rgb), .065); color: #edf5f5; }
.release-catalog-v2 { margin-top: 10px; display: grid; gap: 10px; }
.release-product-group { padding: 17px; border-radius: 8px; }
.release-product-group > header { min-height: 57px; padding: 0 2px 14px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid #273a40; }
.release-product-index { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 50%; color: var(--accent); font-size: 8px; }
.product-d-group .release-product-index { border-color: rgba(239, 192, 113, .36); color: #efc071; }
.release-product-group > header small { color: #60777e; font-size: 7px; letter-spacing: .1em; }
.release-product-group > header h3 { margin: 2px 0 0; font-size: 18px; }
.release-product-group > header h3 em { color: var(--accent); font-style: normal; }
.product-d-group > header h3 em { color: #efc071; }
.release-product-group > header b { color: #60777e; font-size: 7px; font-weight: 500; letter-spacing: .09em; }
.release-platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding-top: 10px; }
.release-platform-grid .release-row { margin: 0; min-height: 69px; padding: 10px; grid-template-columns: 38px minmax(0, 1fr) auto 32px; gap: 10px; border-radius: 6px; }
.release-platform-grid .file-icon { width: 36px; height: 36px; }
.release-platform-grid .release-row a { width: 31px; height: 31px; border-radius: 4px; }
.release-platform-grid .release-row strong { font-size: 10px; }
.release-platform-grid .release-row small,
.release-platform-grid .release-row > span { font-size: 7px; }

.profile-state-chip { min-width: 82px; min-height: 34px; display: grid; place-items: center; border: 1px solid rgba(var(--accent-rgb), .38); border-radius: 5px; color: var(--accent); font-size: 8px; letter-spacing: .1em; }
.profile-state-chip.pending { border-color: rgba(239, 192, 113, .4); color: #efc071; }
.profile-layout-v2 { margin-top: 10px; display: grid; grid-template-columns: minmax(280px, .82fr) minmax(0, 1.38fr); gap: 10px; }
.profile-layout-v2 .dashboard-card { border-radius: 8px; }
.profile-identity-card { min-height: 480px; }
.profile-identity-hero { min-height: 170px; padding-bottom: 20px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #273a40; }
.profile-identity-hero .profile-avatar { width: 92px; height: 92px; border-radius: 9px; font-size: 22px; }
.profile-identity-hero small { color: var(--accent); font-size: 7px; letter-spacing: .12em; }
.profile-identity-hero h3 { margin: 6px 0 0; font-size: 24px; }
.profile-identity-hero p { margin: 2px 0 14px; color: #6a8188; font-size: 10px; }
.profile-identity-card dl > div { min-height: 56px; align-items: center; }
.profile-identity-card dt { max-width: 42%; }
.profile-identity-card dd { max-width: 55%; text-align: right; color: #c7d5d7; overflow-wrap: anywhere; }
.profile-security-column { display: grid; align-content: start; gap: 10px; }
.profile-security-card ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.profile-security-card li { min-height: 64px; padding: 11px; display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; border: 1px solid #273a40; border-radius: 6px; background: #07151a; }
.profile-security-card li > i { width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px rgba(var(--accent-rgb), .55); }
.profile-security-card li strong { display: block; color: #c7d4d6; font-size: 9px; }
.profile-security-card li small { display: block; margin-top: 4px; color: #627980; font-size: 8px; line-height: 1.45; }
.password-form-v2 { min-height: 250px; }
.profile-password-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.password-form-v2 label { margin: 0; }
.password-form-v2 .button { width: 100%; margin-top: 12px; }

@keyframes workspace-radar { to { transform: rotate(360deg); } }
@keyframes workspace-security-pulse {
  0%, 100% { opacity: .62; box-shadow: 0 0 5px rgba(var(--accent-rgb), .34), inset 0 0 4px rgba(var(--accent-rgb), .18); }
  50% { opacity: 1; box-shadow: 0 0 13px rgba(var(--accent-rgb), .9), inset 0 0 7px rgba(var(--accent-rgb), .48); }
}

@media (max-width: 1040px) {
  .overview-status-grid { grid-template-columns: 1fr; }
  .overview-status-grid > article { min-height: 78px; }
  .overview-command-grid { grid-template-columns: 1fr; }
  .release-platform-grid { grid-template-columns: 1fr; }
  .profile-layout-v2 { grid-template-columns: 1fr; }
  .profile-identity-card { min-height: 0; }
}

@media (max-width: 820px) {
  .cabinet-dashboard-v2 { grid-template-columns: 1fr; }
  .cabinet-dashboard-v2 .cabinet-content { padding: 16px 12px 26px; }
  .cabinet-dashboard-v2 .cabinet-content-head { top: -16px; min-height: 66px; margin-bottom: 12px; }
  .cabinet-dashboard-v2 .cabinet-sidebar { padding: 10px 54px 10px 10px; }
  .cabinet-panel-intro { align-items: flex-start; flex-direction: column; gap: 12px; }
  .release-filters { justify-content: flex-start; }
  .overview-product { grid-template-columns: 50px minmax(0, 1fr); }
  .overview-product > a { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 560px) {
  .session-security-chip { display: none; }
  .cabinet-dashboard-v2 .cabinet-content-head { padding: 11px 10px 11px 13px; }
  .cabinet-dashboard-v2 .cabinet-content-head h2 { font-size: 18px; }
  .cabinet-dashboard-close { width: 38px; height: 38px; }
  .overview-status-grid > article { grid-template-columns: 30px minmax(0, 1fr); padding: 12px; }
  .status-index { width: 28px; height: 28px; }
  .overview-command-grid .dashboard-card,
  .release-product-group,
  .profile-layout-v2 .dashboard-card { padding: 14px; }
  .overview-product { padding: 11px; gap: 10px; }
  .overview-product-mark { width: 42px; }
  .overview-product h3 { font-size: 16px; }
  .release-product-group > header { grid-template-columns: 34px minmax(0, 1fr); }
  .release-product-group > header > b { display: none; }
  .release-platform-grid .release-row { grid-template-columns: 36px minmax(0, 1fr) 32px; }
  .release-platform-grid .release-row > span:nth-child(3) { display: none; }
  .profile-identity-hero { align-items: flex-start; flex-direction: column; }
  .profile-password-grid { grid-template-columns: 1fr; }
}

/* Forum workflow: rich editor, attachments, statuses and immutable action archive. */
.workspace-body[data-workspace-page="forum"] { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.workspace-body[data-workspace-page="forum"] > .workspace-header,
.workspace-body[data-workspace-page="forum"] > .workspace-footer { flex: 0 0 auto; }
.workspace-body[data-workspace-page="forum"] > .workspace-main { flex: 1 0 auto; }
.workspace-body[data-workspace-page="forum"] > .workspace-footer { margin-top: auto; }

.thread-row-heading { display: flex; align-items: center; gap: 10px; }
.thread-row-heading h4 { min-width: 0; }
.thread-status { min-height: 22px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #315048; border-radius: 4px; background: rgba(88, 227, 143, .045); color: #8ed5aa; font-size: var(--type-micro); font-weight: 650; letter-spacing: .08em; white-space: nowrap; }
.thread-status.locked { border-color: rgba(239, 192, 113, .38); background: rgba(239, 192, 113, .055); color: #efc071; }
.thread-title-block { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.thread-title-block > div:first-child { min-width: 0; }
.thread-title-block .thread-status { margin-bottom: 9px; }
.thread-title-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.thread-title-actions .button { min-height: 35px; padding: 0 12px; }
.post-body { min-width: 0; white-space: normal; }
.forum-rich-text { color: #c3d0d2; font-size: var(--type-body); line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.forum-rich-text strong { color: #edf3f4; font-weight: 700; }
.forum-rich-text a { color: #7ed8f2; text-decoration: underline; text-decoration-color: rgba(126, 216, 242, .4); text-underline-offset: 3px; }
.forum-rich-text ul,
.forum-rich-text ol { margin: 8px 0; padding-left: 24px; white-space: normal; }
.forum-rich-text li { margin: 4px 0; }
.forum-quote { margin: 10px 0; padding: 12px 14px; border-left: 3px solid var(--accent); background: rgba(var(--accent-rgb), .045); color: #aebfc2; white-space: pre-wrap; }
.forum-code { margin: 10px 0; padding: 12px 14px; display: block; overflow-x: auto; border: 1px solid #294047; border-radius: 5px; background: #030d11; color: #9fcce0; font-family: Consolas, "Courier New", monospace; font-size: 12px; white-space: pre; }
.post-meta { margin-top: 18px; display: flex; align-items: center; gap: 12px; color: #6e858b; font-size: var(--type-micro); }
.post-date { margin: 0; }
.forum-post-attachments { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.forum-post-image { min-width: 0; min-height: 128px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #2a444b; border-radius: 6px; background: #041014; color: #91a6ab; }
.forum-post-image img { width: 100%; height: 150px; display: block; object-fit: cover; }
.forum-post-image span { padding: 8px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--type-micro); }
.forum-post-file { min-height: 64px; padding: 10px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; border: 1px solid #2a444b; border-radius: 6px; background: #07171c; color: #a9babd; }
.forum-post-file > b { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(var(--accent-rgb), .4); border-radius: 4px; color: var(--accent); }
.forum-post-file > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.forum-post-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--type-support); }
.forum-post-file small { color: #6f868c; font-size: var(--type-micro); }
.forum-post-attachments .is-archived { position: relative; opacity: .72; border-style: dashed; }
.forum-post-file.is-archived { grid-template-columns: 34px minmax(0, 1fr) auto; }
.forum-post-attachments .is-archived > em { margin: 7px; padding: 3px 6px; align-self: center; border: 1px solid rgba(239, 192, 113, .4); border-radius: 3px; color: var(--orange, #efc071); font-size: var(--type-micro); font-style: normal; letter-spacing: .08em; }
.forum-post-image.is-archived > em { position: absolute; top: 7px; right: 7px; background: rgba(7, 17, 20, .9); }
.forum-closed-note { min-height: 100px; margin-top: 12px; padding: 18px; display: flex; align-items: center; justify-content: center; gap: 14px; border: 1px dashed rgba(239, 192, 113, .32); border-radius: 6px; background: rgba(239, 192, 113, .025); }
.forum-closed-note i { color: #efc071; font-size: 24px; font-style: normal; }
.forum-closed-note strong { color: #e0d0af; font-size: var(--type-section); }
.forum-closed-note p { margin: 4px 0 0; color: #927f62; font-size: var(--type-support); }
.comment-form-head { margin-bottom: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.comment-form-head small { color: var(--accent); font-size: var(--type-micro); letter-spacing: .1em; }
.comment-form-head h4 { margin: 4px 0 0; }
.comment-form > .button { margin-top: 11px; }

.forum-compose-open { overflow: hidden; }
.forum-editor-dialog { width: min(820px, 100%); max-height: calc(100dvh - 36px); overflow-y: auto; padding: 28px; }
.forum-editor-dialog > header > small { color: var(--accent); font-size: var(--type-micro); letter-spacing: .12em; }
.forum-editor-dialog > header h3 { margin: 6px 0 5px; }
.forum-editor-dialog > header p { margin: 0 0 18px; color: #80969c; font-size: var(--type-support); }
.forum-title-field > span { margin-bottom: 7px; display: block; color: #849ba0; font-size: var(--type-label); }
.forum-rich-editor { overflow: hidden; border: 1px solid #2c454c; border-radius: 7px; background: #061318; }
.forum-editor-head { min-height: 42px; padding: 0 11px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #294047; background: #091b21; }
.forum-editor-head > span { color: #85a0a6; font-size: var(--type-micro); letter-spacing: .11em; }
.forum-editor-tabs { display: flex; gap: 4px; }
.forum-editor-tabs button { min-height: 29px; padding: 0 9px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #72898f; font: inherit; font-size: var(--type-micro); cursor: pointer; }
.forum-editor-tabs button.active { border-color: rgba(var(--accent-rgb), .32); background: rgba(var(--accent-rgb), .055); color: #dce8e4; }
.forum-editor-toolbar { min-height: 43px; padding: 6px 9px; display: flex; align-items: center; gap: 5px; overflow-x: auto; border-bottom: 1px solid #263b41; scrollbar-width: thin; }
.forum-editor-toolbar > i { width: 1px; height: 23px; margin: 0 3px; flex: 0 0 auto; background: #2c4147; }
.forum-editor-toolbar button { min-width: 31px; min-height: 30px; padding: 0 8px; flex: 0 0 auto; border: 1px solid #293f45; border-radius: 4px; background: #08181d; color: #a7b8bb; font: inherit; font-size: var(--type-support); cursor: pointer; }
.forum-editor-toolbar button:hover { border-color: rgba(var(--accent-rgb), .55); color: #fff; }
.forum-rich-editor textarea { min-height: 190px; padding: 15px; border: 0; border-radius: 0; background: #051116; box-shadow: none; line-height: 1.65; }
.forum-rich-editor.compact textarea { min-height: 130px; }
.forum-editor-preview { min-height: 190px; padding: 15px; background: #051116; }
.forum-rich-editor.compact .forum-editor-preview { min-height: 130px; }
.forum-preview-empty { color: #60777d; }
.forum-editor-foot { min-height: 34px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #263b41; color: #607a80; font-size: var(--type-micro); }
.forum-editor-foot b { color: #81989e; font-weight: 500; }
.forum-upload-zone { min-height: 70px; margin-top: 11px; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px dashed #365158; border-radius: 7px; background: rgba(var(--accent-rgb), .018); }
.forum-upload-zone > div > span { color: #93a9ae; font-size: var(--type-micro); letter-spacing: .1em; }
.forum-upload-zone p { margin: 4px 0 0; color: #71888e; font-size: var(--type-micro); }
.forum-upload-zone label { min-height: 36px; margin: 0; flex: 0 0 auto; }
.forum-upload-zone input { display: none; }
.forum-upload-zone.uploading { opacity: .58; pointer-events: none; }
.forum-pending-files { margin-top: 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.forum-pending-file { min-width: 0; min-height: 52px; padding: 7px 8px; display: grid; grid-template-columns: 32px minmax(0, 1fr) 28px; align-items: center; gap: 8px; border: 1px solid #2a4249; border-radius: 6px; background: #07171c; }
.forum-pending-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(var(--accent-rgb), .36); border-radius: 4px; color: var(--accent); }
.forum-pending-file > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.forum-pending-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c2d0d2; font-size: var(--type-support); }
.forum-pending-file small { color: #6d858b; font-size: var(--type-micro); }
.forum-pending-file button { width: 28px; height: 28px; border: 0; background: transparent; color: #748a90; font-size: 17px; cursor: pointer; }
.forum-pending-file button:hover { color: #ff6872; }
.forum-thread-mode { min-height: 62px; margin: 11px 0 0 !important; padding: 11px 13px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; column-gap: 10px; border: 1px solid #2b4349; border-radius: 7px; cursor: pointer; }
.forum-thread-mode input { position: absolute; opacity: 0; pointer-events: none; }
.forum-thread-mode > span { width: 34px; height: 20px; padding: 2px; grid-row: 1 / span 2; border: 1px solid #385158; border-radius: 10px; background: #061318; }
.forum-thread-mode > span::after { content: ""; width: 14px; height: 14px; display: block; border-radius: 50%; background: #587078; transition: .2s; }
.forum-thread-mode input:checked + span::after { transform: translateX(14px); background: #efc071; box-shadow: 0 0 10px rgba(239, 192, 113, .6); }
.forum-thread-mode b { color: #cbd7d9; font-size: var(--type-support); }
.forum-thread-mode small { color: #738a90; font-size: var(--type-micro); line-height: 1.45; }
.forum-editor-actions { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }
.forum-editor-actions .button { margin: 0; }

.admin-thread-actions { display: flex; align-items: center; gap: 6px; }
.admin-thread-actions > a,
.admin-status-action { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #30464c; border-radius: 4px; background: #07161b; color: #90a5aa; font: inherit; font-size: var(--type-micro); cursor: pointer; }
.admin-thread-actions > a { width: 30px; padding: 0; color: var(--accent); }
.admin-status-action:hover,
.admin-thread-actions > a:hover { border-color: rgba(var(--accent-rgb), .55); color: #fff; }
.admin-forum-thread > span > .thread-status { align-self: flex-start; margin-bottom: 1px; min-height: 18px; font-size: 8px; }
.admin-forum-audit { margin-top: 10px; }
.forum-audit-toolbar { margin-top: 14px; display: grid; grid-template-columns: minmax(220px, 1fr) 180px 190px auto; align-items: end; gap: 8px; }
.forum-audit-toolbar label { margin: 0; }
.forum-audit-toolbar label > span { margin-bottom: 6px; display: block; color: #7f969c; font-size: var(--type-micro); }
.forum-audit-toolbar .button { min-height: 42px; }
.forum-action-list { margin-top: 12px; display: grid; gap: 7px; }
.forum-action-row { min-height: 76px; padding: 11px 12px; display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; align-items: center; gap: 13px; border: 1px solid #2a4047; border-radius: 6px; background: #07171c; }
.forum-action-kind { min-height: 27px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #375159; border-radius: 4px; color: #8da3a8; font-size: var(--type-micro); letter-spacing: .06em; }
.forum-action-kind.create { border-color: rgba(88, 227, 143, .38); color: #8ed5aa; }
.forum-action-kind.edit,
.forum-action-kind.status { border-color: rgba(126, 216, 242, .4); color: #87cae2; }
.forum-action-kind.delete { border-color: rgba(239, 192, 113, .4); color: #efc071; }
.forum-action-row > div:nth-child(2) { min-width: 0; }
.forum-action-row small { color: #688087; font-size: var(--type-micro); }
.forum-action-row strong { margin-top: 3px; display: block; overflow: hidden; color: #ccd9db; font-size: var(--type-support); text-overflow: ellipsis; white-space: nowrap; }
.forum-action-row p { margin: 4px 0 0; color: #71878d; font-size: var(--type-micro); }
.forum-action-controls { display: flex; align-items: center; gap: 6px; }
.forum-action-controls a,
.forum-action-controls button { min-height: 32px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #30474d; border-radius: 4px; background: #071419; color: #91a5aa; font: inherit; font-size: var(--type-micro); cursor: pointer; }
.forum-action-controls a { width: 32px; padding: 0; color: var(--accent); }
.forum-action-controls button:hover { border-color: rgba(var(--accent-rgb), .5); color: #fff; }
.forum-action-archived { min-height: 28px; padding: 0 8px; display: inline-flex; align-items: center; border: 1px solid rgba(239, 192, 113, .3); border-radius: 4px; color: #bba173; font-size: var(--type-micro); }
.forum-action-more { margin: 10px auto 0; }
.forum-archive-open { overflow: hidden; }
.forum-archive-dialog { width: min(920px, 100%); max-height: calc(100dvh - 36px); overflow-y: auto; }
.forum-archive-meta { min-height: 42px; margin-bottom: 11px; padding: 9px 11px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid #2d454c; border-radius: 6px; background: #07161b; }
.forum-archive-meta span,
.forum-archive-meta time { padding-right: 9px; border-right: 1px solid #2d4349; color: #879ca1; font-size: var(--type-micro); }
.forum-archive-version { margin-top: 8px; overflow: hidden; border: 1px solid #2d454c; border-radius: 6px; background: #061318; }
.forum-archive-version summary { min-height: 44px; padding: 0 13px; display: flex; align-items: center; cursor: pointer; color: #c3d0d2; font-size: var(--type-support); }
.forum-archive-version > div { padding: 13px; border-top: 1px solid #2a4147; }
.forum-archive-snapshot > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.forum-archive-snapshot > header small { color: #71888e; font-size: var(--type-micro); }
.forum-archive-snapshot > header strong { margin-top: 3px; display: block; color: #e0e8e9; font-size: var(--type-section); }
.forum-archive-body { margin-top: 12px; padding: 12px; border: 1px solid #293f45; border-radius: 5px; background: #041015; }
.forum-archive-comments { margin-top: 10px; }
.forum-archive-comments summary { color: #9cafb3; font-size: var(--type-support); cursor: pointer; }
.forum-archive-comments article { margin-top: 7px; padding: 11px; border: 1px solid #293f45; border-radius: 5px; }
.forum-archive-comments article > small { color: #71888e; font-size: var(--type-micro); }
.forum-archive-comments .forum-rich-text { margin-top: 7px; }
.forum-archive-snapshot dl { margin: 12px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.forum-archive-snapshot dl > div { padding: 9px; border: 1px solid #293f45; border-radius: 5px; }
.forum-archive-snapshot dt { color: #6f858b; font-size: var(--type-micro); }
.forum-archive-snapshot dd { margin: 4px 0 0; color: #b8c7ca; font-size: var(--type-support); overflow-wrap: anywhere; }
.forum-archive-empty { color: #71888e; font-size: var(--type-support); }

@media (max-width: 900px) {
  .thread-title-block { align-items: flex-start; flex-direction: column; }
  .thread-title-actions { justify-content: flex-start; }
  .forum-post-attachments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forum-audit-toolbar { grid-template-columns: 1fr 1fr; }
  .forum-action-row { grid-template-columns: 105px minmax(0, 1fr); }
  .forum-action-controls { grid-column: 1 / -1; justify-content: flex-end; }
  .forum-archive-snapshot dl { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .thread-row-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .forum-editor-dialog { max-height: 100dvh; padding: 20px 12px; border-radius: 0; }
  .forum-upload-zone { align-items: stretch; flex-direction: column; }
  .forum-upload-zone label { justify-content: center; }
  .forum-pending-files,
  .forum-post-attachments,
  .forum-audit-toolbar,
  .forum-archive-snapshot dl { grid-template-columns: 1fr; }
  .forum-editor-foot span { display: none; }
  .forum-action-row { grid-template-columns: 1fr; }
  .forum-action-kind { justify-self: start; }
  .admin-forum-thread { align-items: flex-start; flex-direction: column; }
  .admin-thread-actions { width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .session-stage-radar span { animation: none; }
}

/* Administration control center */
.admin-control-center { padding: 0; overflow: hidden; border-radius: 10px; }
.admin-section-tabs { min-height: 67px; padding: 10px 12px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; border-bottom: 1px solid #263a40; background: #061419; }
.admin-section-tabs button { position: relative; min-height: 46px; padding: 0 12px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #6f858c; font: inherit; font-size: 9px; cursor: pointer; }
.admin-section-tabs button i { color: #5c747b; font-size: 13px; font-style: normal; }
.admin-section-tabs button b { min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: rgba(239, 192, 113, .12); color: #efc071; font-size: 7px; }
.admin-section-tabs button:hover { border-color: #2a4148; background: #08191f; color: #d8e4e5; }
.admin-section-tabs button.is-active { border-color: rgba(var(--accent-rgb), .38); background: rgba(var(--accent-rgb), .065); color: #f0f6f6; box-shadow: inset 0 -2px 0 var(--accent); }
.admin-section-tabs button.is-active i { color: var(--accent); }
.admin-section-panel { min-height: 580px; padding: 22px; }
.admin-panel-heading { min-height: 88px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid #263a40; border-radius: 8px; background: linear-gradient(120deg, rgba(var(--accent-rgb), .045), transparent 42%), #07161b; }
.admin-panel-heading > div { min-width: 0; }
.admin-panel-heading small { color: var(--accent); font-size: 7px; letter-spacing: .13em; }
.admin-panel-heading h2 { margin: 4px 0 3px; color: #e6eeef; font-size: 21px; font-weight: 550; letter-spacing: -.02em; }
.admin-panel-heading p { max-width: 700px; margin: 0; color: #688087; font-size: 9px; line-height: 1.5; }
.admin-panel-heading > span { display: flex; align-items: center; gap: 8px; color: #698087; font-size: 8px; letter-spacing: .08em; }
.admin-panel-heading > span > i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent); }
.admin-panel-count { min-width: 104px; min-height: 42px; padding: 0 12px; display: flex !important; align-items: center; justify-content: center; border: 1px solid #2a4148; border-radius: 6px; }
.admin-panel-count b { margin-right: 6px; color: var(--accent); font-size: 16px; }
.admin-summary-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.admin-summary-grid > button { min-height: 172px; padding: 16px; display: flex; align-items: flex-start; flex-direction: column; border: 1px solid #273b41; border-radius: 8px; background: linear-gradient(145deg, #0a1c21, #07151a); color: inherit; text-align: left; cursor: pointer; transition: transform .18s, border-color .18s, background .18s; }
.admin-summary-grid > button:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb), .42); background: #0b1e24; }
.summary-index { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(239, 192, 113, .35); border-radius: 50%; color: #efc071; font-size: 7px; }
.summary-index.green { border-color: rgba(138, 220, 123, .35); color: #8adc7b; }
.summary-index.orange { border-color: rgba(239, 192, 113, .35); color: #efc071; }
.summary-index.blue { border-color: rgba(128, 196, 241, .35); color: #80c4f1; }
.admin-summary-grid small { margin-top: 18px; color: #617980; font-size: 7px; letter-spacing: .09em; }
.admin-summary-grid strong { margin-top: 3px; color: #edf3f3; font-size: 28px; font-weight: 560; }
.admin-summary-grid p { margin: 2px 0 12px; color: #637a81; font-size: 8px; line-height: 1.4; }
.admin-summary-grid b { margin-top: auto; color: var(--accent); font-size: 8px; font-weight: 500; }
.admin-command-grid-v2 { margin-top: 10px; }
.admin-section-panel .dashboard-card { border-radius: 8px; }
.admin-section-panel .admin-requests-card,
.admin-section-panel .admin-news-card,
.admin-section-panel .security-log-card { margin: 10px 0 0; }
.admin-users-layout { margin-top: 10px; display: grid; grid-template-columns: minmax(290px, .58fr) minmax(0, 1.42fr); align-items: start; gap: 10px; }
.admin-users-layout .admin-form { position: sticky; top: 78px; }
.admin-users-layout .admin-users-card { margin: 0; }
.admin-forum-layout { margin-top: 10px; display: grid; grid-template-columns: minmax(290px, .52fr) minmax(0, 1.48fr); align-items: start; gap: 10px; }
.admin-forum-layout .admin-form { position: sticky; top: 78px; }
.admin-forum-layout .admin-forum-card { margin: 0; }

.security-toolbar { padding: 0 0 14px; display: grid; grid-template-columns: minmax(220px, 1fr) 180px 180px auto; align-items: end; gap: 9px; border-bottom: 1px solid #273a40; }
.security-toolbar label { margin: 0; display: grid; gap: 6px; }
.security-toolbar label > span { color: #637b82; font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
.security-toolbar input,
.security-toolbar select { width: 100%; height: 39px; padding: 0 11px; border: 1px solid #294047; border-radius: 5px; background: #061419; color: #cbd8da; font: inherit; font-size: 9px; }
.security-toolbar select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-repeat: no-repeat; background-size: 5px 5px; }
.security-visible-count { min-width: 115px; height: 39px; padding: 0 11px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #294047; border-radius: 5px; background: #07161b; }
.security-visible-count strong { color: var(--accent); font-size: 16px; }
.security-visible-count span { max-width: 60px; color: #60777e; font-size: 6px; line-height: 1.25; }
.security-events-v2 { max-height: 650px; margin-top: 12px; padding-right: 4px; display: grid; gap: 8px; scrollbar-color: var(--accent) transparent; }
.security-events-v2 > .security-event-card { min-height: 0; padding: 14px; display: block; border: 1px solid #263a40; border-radius: 7px; background: #07151a; font-size: inherit; }
.security-event-card > header { display: flex; align-items: center; gap: 6px; }
.security-event-card > header time { margin-left: auto; color: #60777e; font-size: 8px; }
.security-severity,
.security-group { min-height: 22px; padding: 0 7px; display: inline-flex; align-items: center; border: 1px solid #2a4047; border-radius: 4px; color: #779096; font-size: 6px; letter-spacing: .08em; }
.security-severity.success { border-color: rgba(138, 220, 123, .35); color: #8adc7b; }
.security-severity.warning { border-color: rgba(239, 192, 113, .38); color: #efc071; }
.security-severity.critical { border-color: rgba(255, 91, 103, .4); color: #ff7c85; }
.security-severity.info { border-color: rgba(128, 196, 241, .38); color: #80c4f1; }
.security-event-copy { margin-top: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.security-event-copy small { color: #526a71; font-size: 6px; letter-spacing: .1em; }
.security-event-copy h3 { margin: 3px 0 4px; color: #dbe6e8; font-size: 13px; font-weight: 560; }
.security-event-copy p { margin: 0; color: #6f858b; font-size: 9px; line-height: 1.5; }
.security-result { flex: 0 0 auto; min-height: 30px; padding: 0 9px; display: grid; place-items: center; border-radius: 5px; background: rgba(128, 196, 241, .055); color: #80c4f1; font-size: 7px; font-weight: 500; }
.security-result.success { background: rgba(138, 220, 123, .06); color: #8adc7b; }
.security-result.warning { background: rgba(239, 192, 113, .06); color: #efc071; }
.security-result.critical { background: rgba(255, 91, 103, .07); color: #ff7c85; }
.security-event-card dl { margin: 12px 0 0; display: grid; grid-template-columns: .8fr 1fr 1.5fr; gap: 7px; }
.security-event-card dl > div { min-height: 55px; padding: 9px; display: block; border: 1px solid #22353b; border-radius: 5px; background: #061318; }
.security-event-card dt { color: #526b72; font-size: 6px; letter-spacing: .08em; text-transform: uppercase; }
.security-event-card dd { margin: 5px 0 0; color: #afc0c3; font-size: 8px; line-height: 1.4; }
.security-event-card dd small { display: block; margin-top: 2px; color: #5d747b; font-size: 7px; }
.security-event-card details { margin-top: 8px; padding-top: 8px; border-top: 1px solid #22343a; }
.security-event-card summary { width: max-content; color: #617a81; font-size: 7px; cursor: pointer; }
.security-event-card code { display: block; margin-top: 8px; padding: 8px; border-radius: 4px; background: #040f13; color: #82999f; font: 8px/1.5 Consolas, monospace; overflow-wrap: anywhere; }
.security-empty { border: 1px dashed #2a4047; border-radius: 7px; }

.activation-dialog-close { display: grid; place-items: center; font-size: 0; border-radius: 7px; }
.activation-dialog-close::before,
.activation-dialog-close::after { content: ""; position: absolute; width: 13px; height: 1px; border-radius: 1px; background: currentColor; }
.activation-dialog-close::before { transform: rotate(45deg); }
.activation-dialog-close::after { transform: rotate(-45deg); }

@media (max-width: 1180px) {
  .admin-summary-grid { grid-template-columns: 1fr 1fr; }
  .admin-users-layout,
  .admin-forum-layout { grid-template-columns: 1fr; }
  .admin-users-layout .admin-form,
  .admin-forum-layout .admin-form { position: static; }
  .security-toolbar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .admin-section-tabs { grid-template-columns: repeat(6, max-content); overflow-x: auto; scrollbar-width: none; }
  .admin-section-tabs::-webkit-scrollbar { display: none; }
  .admin-section-tabs button { min-width: 116px; }
  .admin-section-panel { padding: 14px; }
  .security-event-card dl { grid-template-columns: 1fr 1fr; }
  .security-event-card dl > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .admin-section-panel { min-height: 0; padding: 9px; }
  .admin-panel-heading { align-items: flex-start; flex-direction: column; min-height: 0; padding: 14px; }
  .admin-summary-grid { grid-template-columns: 1fr; }
  .admin-summary-grid > button { min-height: 145px; }
  .security-toolbar { grid-template-columns: 1fr; }
  .security-visible-count { width: 100%; }
  .security-event-copy { flex-direction: column; gap: 10px; }
  .security-event-card dl { grid-template-columns: 1fr; }
  .security-event-card dl > div:last-child { grid-column: auto; }
  .security-event-card > header { flex-wrap: wrap; }
  .security-event-card > header time { width: 100%; margin: 4px 0 0; }
}

/* Three-column operator chat */
.chat-page .chat-workspace-main { grid-template-rows: auto minmax(0, 1fr); }
.chat-page .chat-titlebar { min-height: 67px; margin-bottom: 10px; }
.chat-page .chat-titlebar h1 { margin-top: 2px; font-size: clamp(27px, 2.6vw, 38px); }
.chat-page .chat-titlebar p { margin-top: 3px; text-align: left; }
.chat-shell-v2 { min-height: 0; display: grid; grid-template-columns: 218px minmax(0, 1fr) 265px; gap: 9px; }
.chat-channel-rail,
.chat-context-rail { min-height: 0; overflow: hidden; border: 1px solid #263a40; border-radius: 8px; background: linear-gradient(155deg, #091a20, #061318); }
.chat-channel-rail { padding: 15px; display: flex; flex-direction: column; }
.chat-channel-rail > header { padding: 3px 3px 14px; border-bottom: 1px solid #25373d; }
.chat-channel-rail > header small,
.chat-context-rail > header small { color: var(--accent); font-size: 7px; letter-spacing: .12em; }
.chat-channel-rail > header strong,
.chat-context-rail > header strong { display: block; margin-top: 4px; color: #dbe6e8; font-size: 14px; }
.chat-channel-rail nav { margin-top: 10px; }
.chat-channel-rail nav .chat-channel-select { width: 100%; min-height: 61px; padding: 9px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 6px; align-items: center; gap: 9px; border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 6px; background: rgba(var(--accent-rgb), .055); color: inherit; text-align: left; }
.channel-symbol { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 50%; color: var(--accent); }
.chat-channel-rail nav strong { display: block; color: #d1dddf; font-size: 9px; }
.chat-channel-rail nav small { display: block; margin-top: 2px; color: #60777e; font-size: 7px; }
.chat-channel-rail nav .chat-channel-select > i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.chat-rail-status { margin-top: 12px; padding: 12px; border: 1px solid #24373d; border-radius: 6px; background: #061419; }
.chat-rail-status > span { display: flex; align-items: center; gap: 6px; color: #8ba199; font-size: 7px; letter-spacing: .08em; }
.chat-rail-status > span i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.chat-rail-status dl { margin: 10px 0 0; }
.chat-rail-status dl > div { min-height: 29px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #213239; }
.chat-rail-status dt { color: #566e75; font-size: 7px; }
.chat-rail-status dd { margin: 0; color: #a9b9bc; font-size: 7px; }
.chat-rail-link { min-height: 39px; margin-top: auto; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #273b41; border-radius: 5px; color: #778e95; font-size: 8px; }
.chat-rail-link b { color: var(--accent); font-weight: 400; }
.chat-rail-link:hover { border-color: var(--accent); color: #e5eded; }
.chat-shell-v2 .chat-panel { height: auto; min-height: 0; border-radius: 8px; }
.chat-shell-v2 .chat-panel-head { min-height: 59px; padding-inline: 17px; }
.chat-shell-v2 .chat-panel-head > div:first-child { flex-direction: column; }
.chat-shell-v2 .chat-panel-head small { color: var(--accent); font-size: 6px; letter-spacing: .11em; }
.chat-shell-v2 .chat-panel-head strong { font-size: 11px; }
.chat-shell-v2 .chat-feed { scrollbar-color: var(--accent) transparent; }
.chat-shell-v2 .chat-feed::-webkit-scrollbar { width: 6px; }
.chat-shell-v2 .chat-feed::-webkit-scrollbar-track { background: transparent; }
.chat-shell-v2 .chat-feed::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(var(--accent-rgb), .5); }
.chat-shell-v2 .chat-composer { min-height: 70px; }
.chat-shell-v2 .chat-composer textarea { border-radius: 6px; background: #061419; }
.chat-shell-v2 .chat-attach,
.chat-shell-v2 .chat-send { border-radius: 6px; }
.chat-context-rail { padding: 15px; overflow-y: auto; scrollbar-color: var(--accent) transparent; }
.chat-context-rail > header { padding: 3px 3px 15px; border-bottom: 1px solid #25373d; }
.chat-context-rail > header > span { margin-top: 9px; display: flex; align-items: center; gap: 6px; color: #799087; font-size: 7px; letter-spacing: .09em; }
.chat-context-rail > header > span i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 7px var(--accent); }
.chat-context-rail > section { padding: 15px 3px; border-bottom: 1px solid #25373d; }
.chat-context-rail section > small { color: #5d757c; font-size: 6px; letter-spacing: .11em; }
.chat-context-rail section > p { margin: 7px 0 0; color: #788e94; font-size: 8px; line-height: 1.6; }
.chat-context-rail ul { margin: 9px 0 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.chat-context-rail li { display: grid; grid-template-columns: 6px 1fr; gap: 7px; color: #82979c; font-size: 8px; }
.chat-context-rail li i { width: 5px; height: 5px; margin-top: 3px; border-radius: 50%; background: var(--accent); }
.chat-context-warning { margin-top: 10px; padding: 12px !important; border: 1px solid rgba(239, 192, 113, .22) !important; border-radius: 6px; background: rgba(239, 192, 113, .035); }
.chat-context-warning > small { color: #efc071 !important; }

@media (max-width: 1180px) {
  .chat-shell-v2 { grid-template-columns: 218px minmax(0, 1fr); }
  .chat-context-rail { display: none; }
}

@media (max-width: 820px) {
  .chat-shell-v2 { grid-template-columns: minmax(0, 1fr); }
  .chat-channel-rail { display: none; }
  .chat-page .chat-titlebar { padding-inline: 4px; flex-direction: row; }
}

@media (max-width: 560px) {
  .chat-page .chat-titlebar p { display: none; }
  .chat-page .chat-titlebar h1 { font-size: 23px; }
  .chat-shell-v2 .chat-panel { border-inline: 0; border-radius: 0; }
  .chat-shell-v2 .chat-feed { padding-inline: 10px; }
  .chat-shell-v2 .chat-composer { grid-template-columns: 40px minmax(0, 1fr) 42px; padding-inline: 9px; }
  .chat-shell-v2 .chat-send { width: 42px; padding: 0; justify-content: center; }
  .chat-shell-v2 .chat-send span { display: none; }
  .chat-shell-v2 .chat-composer-note span:last-child { display: none; }
}

/* Readability and operator-interface pass. This final layer intentionally wins
   over the compact legacy rules loaded above it. */
:root {
  --type-micro: 11px;
  --type-label: 12px;
  --type-support: 13px;
  --type-body: 14px;
  --type-section: 17px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.workspace-body { font-size: var(--type-body); }
.cabinet-shell small { font-size: var(--type-micro); }
.workspace-body :where(input, select, textarea) { font-size: var(--type-support); }
.workspace-profile-copy small,
.workspace-footer,
.workspace-back,
.workspace-admin-note,
.workspace-titlebar small,
.dashboard-card-head span,
.dashboard-card-head b,
.forum-loading,
.chat-composer-note { font-size: var(--type-micro); }
.workspace-titlebar p,
.admin-card-intro { font-size: var(--type-support); line-height: 1.6; }
.workspace-nav a,
.cabinet-sidebar :where(a, button) { font-size: var(--type-label); }

/* Cabinet overview, releases and profile. */
.cabinet-session-stage small,
.overview-status-grid small,
.overview-product small,
.cabinet-panel-intro small,
.release-product-group > header small,
.release-product-group > header b,
.profile-identity-hero small,
.cabinet-command-strip small { font-size: var(--type-micro); }
.cabinet-session-stage p,
.overview-status-grid p,
.overview-product p,
.overview-actions-card nav small,
.cabinet-panel-intro p,
.profile-identity-hero p,
.profile-security-card li small { font-size: var(--type-support); line-height: 1.55; }
.overview-status-grid strong,
.overview-actions-card nav strong,
.release-platform-grid .release-row strong,
.profile-security-card li strong { font-size: var(--type-body); }
.overview-product > a,
.release-filters button,
.profile-state-chip,
.release-platform-grid .release-row > span { font-size: var(--type-micro); }

/* Administrative overview and forms. */
.admin-section-tabs button { min-height: 50px; font-size: var(--type-label); }
.admin-section-tabs button b,
.summary-index { font-size: var(--type-micro); }
.admin-panel-heading small,
.admin-summary-grid small,
.admin-command-grid small { font-size: var(--type-micro); }
.admin-panel-heading p,
.admin-summary-grid p,
.admin-command-grid span { font-size: var(--type-support); line-height: 1.55; }
.admin-panel-heading > span,
.admin-summary-grid b,
.admin-command-grid strong { font-size: var(--type-label); }
.admin-summary-grid > button { min-height: 184px; padding: 20px; }
.admin-summary-grid strong { font-size: 30px; }
.admin-form label,
.admin-news-form label { color: #92a6ab; font-size: var(--type-label); line-height: 1.4; }
.admin-form :where(input, select, textarea),
.admin-news-form :where(input, select, textarea),
.security-toolbar :where(input, select) { min-height: 43px; font-size: var(--type-support); }
.admin-form .button,
.admin-news-form .button { min-height: 40px; font-size: var(--type-label); }

/* Forum structure: resilient last-layer layout, independent of cached legacy CSS. */
.admin-forum-card { margin: 0; }
.admin-forum-tree { display: grid; gap: 14px; }
.admin-forum-section { overflow: hidden; border: 1px solid #2a4248; border-radius: 9px; background: linear-gradient(145deg, #09191e, #061318); }
.admin-forum-section > header { padding: 17px 18px; display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: center; gap: 18px; border-bottom: 1px solid #294047; background: linear-gradient(100deg, rgba(var(--accent-rgb), .075), transparent 48%); }
.admin-forum-section > header > div:first-child { min-width: 0; }
.admin-forum-section > header small { color: var(--accent); font-size: var(--type-micro); letter-spacing: .12em; }
.admin-forum-section > header strong { display: block; margin-top: 5px; color: #e6eeef; font-size: var(--type-section); font-weight: 590; overflow-wrap: anywhere; }
.admin-forum-section > header p { margin: 5px 0 0; color: #81969b; font-size: var(--type-support); line-height: 1.5; }
.admin-forum-metrics { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.admin-forum-metrics > span { min-height: 38px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #30464c; border-radius: 6px; color: #8da0a5; font-size: var(--type-micro); white-space: nowrap; }
.admin-forum-metrics b { color: #e0e9ea; font-size: var(--type-body); }
.admin-forum-boards { padding: 12px; display: grid; gap: 10px; }
.admin-forum-board { overflow: hidden; border: 1px solid #294047; border-left: 3px solid rgba(var(--accent-rgb), .72); border-radius: 7px; background: #08171c; }
.admin-forum-board-head { padding: 14px 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.admin-forum-board-head > div:first-child { min-width: 0; }
.admin-forum-board-head > div:first-child > span { display: block; color: #83b49d; font-size: var(--type-micro); letter-spacing: .1em; }
.admin-forum-board-head > div:first-child > span.restricted { color: #efc071; }
.admin-forum-board-head strong { display: block; margin: 5px 0; color: #dae5e7; font-size: 15px; font-weight: 580; overflow-wrap: anywhere; }
.admin-forum-board-head p { margin: 0; color: #82969b; font-size: var(--type-support); line-height: 1.45; }
.admin-forum-board-head > div:last-child { display: flex; align-items: flex-end; flex-direction: column; gap: 8px; }
.admin-forum-board-head > div:last-child small { color: #7a9197; font-size: var(--type-micro); white-space: nowrap; }
.admin-forum-threads { border-top: 1px solid #263b41; }
.admin-forum-thread { min-height: 58px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid rgba(41, 60, 66, .7); }
.admin-forum-thread:last-child { border-bottom: 0; }
.admin-forum-thread > span { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.admin-forum-thread strong { overflow: hidden; color: #cbd8da; font-size: var(--type-support); font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.admin-forum-thread small { color: #748a90; font-size: var(--type-micro); }
.admin-forum-empty { padding: 18px; color: #82969b; font-size: var(--type-support); text-align: center; }
.admin-danger-action { min-height: 36px; padding: 0 12px; border: 1px solid rgba(255, 91, 103, .36); border-radius: 6px; background: rgba(255, 91, 103, .045); color: #e98b92; font: inherit; font-size: var(--type-micro); cursor: pointer; transition: .18s; }
.admin-danger-action:hover { border-color: #ff6670; background: rgba(255, 91, 103, .1); color: #ff9aa1; }
.admin-danger-action.compact { min-height: 34px; }
.admin-danger-action.icon { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; display: grid; place-items: center; font-size: 17px; }
.forum-delete-open { overflow: hidden; }
.forum-delete-dialog { width: min(620px, 100%); border-color: rgba(255, 91, 103, .42); background: linear-gradient(145deg, #142126, #091419); }
.forum-delete-dialog header small { color: #ff7d86; }
.forum-delete-dialog > p { margin: 0 0 15px; color: #92a5aa; font-size: var(--type-support); line-height: 1.6; }
.forum-delete-target { padding: 15px; border: 1px solid rgba(255, 91, 103, .28); border-radius: 7px; background: rgba(255, 91, 103, .04); }
.forum-delete-target small { display: block; color: #d27c83; font-size: var(--type-micro); letter-spacing: .12em; }
.forum-delete-target strong { display: block; margin-top: 6px; color: #edf2f3; font-size: var(--type-section); overflow-wrap: anywhere; }
.forum-delete-impact { margin-top: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.forum-delete-impact div { min-height: 72px; padding: 11px; display: flex; flex-direction: column; justify-content: center; gap: 5px; border: 1px solid #304349; border-radius: 6px; background: #071419; }
.forum-delete-impact strong { color: #e5edef; font-size: 20px; }
.forum-delete-impact span { color: #7c9297; font-size: var(--type-micro); text-transform: uppercase; }
.forum-delete-warning { margin-top: 14px !important; padding: 13px; display: grid; grid-template-columns: 8px 1fr; gap: 11px; border: 1px solid rgba(239, 192, 113, .3); border-radius: 6px; background: rgba(239, 192, 113, .045); }
.forum-delete-warning i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #efc071; box-shadow: 0 0 9px rgba(239, 192, 113, .6); }
.forum-delete-warning span { color: #9c8867; font-size: var(--type-micro); line-height: 1.5; }
.forum-delete-warning strong { color: #e0cca5; font-size: var(--type-label); }
.forum-delete-dialog .button.danger { background: #96363e; color: #fff; }

/* Security log and summary legibility. */
.security-toolbar label > span,
.security-visible-count span,
.security-event-copy small,
.security-event-card dt,
.security-event-card summary,
.security-event-card dd small,
.security-severity,
.security-group { font-size: var(--type-micro); }
.security-event-copy h3 { font-size: 15px; }
.security-event-copy p,
.security-event-card dd { font-size: var(--type-support); line-height: 1.5; }
.security-event-card > header time,
.security-result { font-size: var(--type-micro); }
.security-event-card code { font: 11px/1.55 Consolas, monospace; }
.security-event-card dl > div { min-height: 67px; }

/* Channels and chat side rails. */
.chat-channel-rail nav { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; display: grid; align-content: start; gap: 8px; scrollbar-color: var(--accent) transparent; }
.chat-channel-entry { position: relative; min-width: 0; }
.chat-channel-rail nav .chat-channel-select { min-width: 0; cursor: pointer; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.chat-channel-rail nav .chat-channel-select:not(.is-active) { border-color: #263b41; background: #07161b; }
.chat-channel-rail nav .chat-channel-select:hover { border-color: rgba(var(--accent-rgb), .62); box-shadow: inset 2px 0 0 rgba(var(--accent-rgb), .72); }
.chat-channel-entry.has-delete .chat-channel-select { padding-right: 43px; }
.chat-channel-rail nav .chat-channel-delete { position: absolute; z-index: 2; top: 8px; right: 8px; width: 29px; min-width: 29px; height: 29px; min-height: 29px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255, 91, 103, .3); border-radius: 5px; background: rgba(8, 20, 24, .94); color: #bf747b; cursor: pointer; transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease; }
.chat-channel-delete span,
.chat-channel-delete span::before { width: 12px; height: 1px; border-radius: 2px; background: currentColor; }
.chat-channel-delete span { position: relative; display: block; transform: rotate(45deg); }
.chat-channel-delete span::before { content: ""; position: absolute; inset: 0; transform: rotate(90deg); }
.chat-channel-rail nav .chat-channel-delete:hover,
.chat-channel-rail nav .chat-channel-delete.armed { border-color: #ff6670; background: rgba(255, 91, 103, .12); color: #ff9ca3; box-shadow: 0 0 12px rgba(255, 91, 103, .18); }
.chat-channel-rail nav .chat-channel-delete.armed span { transform: none; width: auto; height: auto; background: none; font-size: 0; }
.chat-channel-rail nav .chat-channel-delete.armed span::before { content: "!"; position: static; width: auto; height: auto; background: none; font-size: 15px; font-weight: 700; transform: none; }
.chat-channel-rail nav .chat-channel-delete:disabled { opacity: .42; cursor: wait; }
.chat-channel-rail > header small,
.chat-context-rail > header small,
.chat-shell-v2 .chat-panel-head small,
.chat-context-rail section > small { font-size: var(--type-micro); }
.chat-channel-rail > header strong,
.chat-context-rail > header strong { font-size: 16px; }
.chat-channel-rail nav strong { font-size: var(--type-support); }
.chat-channel-rail nav small { font-size: var(--type-micro); line-height: 1.35; }
.chat-rail-status > span,
.chat-rail-status dt,
.chat-rail-status dd,
.chat-context-rail > header > span { font-size: var(--type-micro); }
.chat-rail-link { font-size: var(--type-label); }
.chat-shell-v2 .chat-panel-head strong { font-size: var(--type-body); }
.chat-context-rail section > p,
.chat-context-rail li { font-size: var(--type-label); line-height: 1.55; }
.chat-message-text { font-size: var(--type-body); line-height: 1.55; }
.chat-message-meta strong { font-size: var(--type-support); }
.chat-message-meta time,
.chat-admin-badge,
.chat-file-copy small { font-size: var(--type-micro); }
.chat-empty p { font-size: var(--type-support); }
.chat-panel-actions { display: flex; align-items: center; gap: 8px; }
.chat-title-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.chat-create-channel,
.chat-notifications { min-height: 36px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #2d454b; border-radius: 6px; background: #07171c; color: #8da2a7; font: inherit; font-size: var(--type-micro); cursor: pointer; }
.chat-create-channel { border-color: rgba(var(--accent-rgb), .38); color: var(--accent); }
.chat-create-channel:hover,
.chat-notifications:hover { border-color: var(--accent); color: #e8f0f1; }
.chat-mobile-channel-switch { display: none; }
.chat-channel-modal[hidden] { display: none !important; }
.chat-channel-modal { position: fixed; z-index: 120; inset: 0; padding: 20px; display: grid; place-items: center; background: rgba(1, 7, 9, .78); backdrop-filter: blur(10px); }
.chat-channel-modal-backdrop { position: absolute; inset: 0; border: 0; background: transparent; cursor: default; }
.chat-channel-dialog { position: relative; z-index: 1; width: min(520px, 100%); padding: 24px; display: grid; gap: 15px; border: 1px solid rgba(var(--accent-rgb), .46); border-radius: 10px; background: linear-gradient(145deg, #122127, #081419); box-shadow: 0 28px 90px rgba(0, 0, 0, .5); }
.chat-channel-dialog > small { color: var(--accent); font-size: var(--type-micro); letter-spacing: .12em; }
.chat-channel-dialog h2 { margin: -4px 0 2px; color: #edf3f4; font-size: 23px; }
.chat-channel-dialog > p { margin: -4px 36px 2px 0; color: #82979c; font-size: var(--type-support); line-height: 1.55; }
.chat-channel-dialog > label { display: grid; gap: 7px; color: #9aadb1; font-size: var(--type-label); }
.chat-channel-dialog :where(input, textarea) { width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid #30464c; border-radius: 6px; background: #061419; color: #e2ebec; font: inherit; font-size: var(--type-body); resize: vertical; }
.chat-channel-dialog :where(input, textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .1); }
.chat-channel-dialog-close { position: absolute; top: 13px; right: 13px; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border: 1px solid #30464c; border-radius: 7px; background: #07161b; color: #8ba0a5; cursor: pointer; }
.chat-channel-dialog-close::before,
.chat-channel-dialog-close::after { content: ""; position: absolute; width: 14px; height: 1px; border-radius: 2px; background: currentColor; }
.chat-channel-dialog-close::before { transform: rotate(45deg); }
.chat-channel-dialog-close::after { transform: rotate(-45deg); }
.chat-channel-dialog-close:hover { border-color: var(--accent); color: #e8f0f1; }
.chat-channel-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.chat-channel-dialog-actions .button { min-height: 40px; }

@media (max-width: 820px) {
  .chat-mobile-channel-switch { padding: 10px 13px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; border-bottom: 1px solid #294047; background: #07161b; }
  .chat-mobile-channel-switch span { color: #81969b; font-size: var(--type-micro); }
  .chat-mobile-channel-switch select { width: 100%; min-height: 39px; padding: 0 35px 0 11px; border: 1px solid #30474d; border-radius: 6px; background: #061419; color: #dce6e8; font: inherit; font-size: var(--type-support); }
}

@media (max-width: 760px) {
  .admin-forum-section > header,
  .admin-forum-board-head { grid-template-columns: 1fr; align-items: start; }
  .admin-forum-metrics { justify-content: flex-start; }
  .admin-forum-board-head > div:last-child { align-items: flex-start; }
  .admin-forum-thread strong { white-space: normal; }
  .forum-delete-impact { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .workspace-body :where(input, select, textarea) { font-size: 16px; }
  .chat-create-channel span,
  .chat-notifications span { display: none; }
  .chat-channel-dialog { padding: 20px 16px; }
  .chat-channel-dialog-actions { display: grid; grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .account-page :is(.encryption-note > i, .session-security-chip > i) { animation: none; opacity: 1; }
}
