:root {
  --page: #eef1f5; --surface: #fff; --surface-soft: #f6f7f9; --ink: #121722;
  --muted: #697386; --line: #d9dee7; --line-strong: #c5ccd8;
  --charcoal: #171c26; --charcoal-soft: #232a37; --red: #e52f3c;
  --red-dark: #bd202c; --green: #16835d; --blue: #2463d4;
  --shadow: 0 12px 32px rgba(17, 24, 39, .09);
  --page-image: url("assets/background-light.png?v=2");
  --field: #fff;
  --panel-hover: #fafbfc;
  --admin-surface: #f6f7f9;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
html[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d1118; --surface: #181e28; --surface-soft: #202734; --ink: #edf1f7;
  --muted: #9ba6b7; --line: #303949; --line-strong: #445064;
  --charcoal: #11161f; --charcoal-soft: #202836; --red: #f13d49;
  --red-dark: #cf2a35; --green: #35c28b; --blue: #6f9cff;
  --shadow: 0 14px 34px rgba(0, 0, 0, .3);
  --page-image: url("assets/background-dark.png?v=2");
  --field: #111722; --panel-hover: #202734; --admin-surface: #141a23;
}
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background-color: var(--page); background-image: var(--page-image); background-repeat: no-repeat; background-position: center top; background-size: cover; background-attachment: fixed; transition: color 180ms ease, background-color 180ms ease; }
button, input, select { font: inherit; }
button { border: 0; }
a { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(36, 99, 212, .32); outline-offset: 2px; }
.app-shell { width: min(1240px, calc(100vw - 40px)); margin: 20px auto 28px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; padding: 18px 20px; color: #fff; background: var(--charcoal); border-top: 3px solid var(--red); border-radius: 8px 8px 0 0; box-shadow: var(--shadow); }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark { display: grid; width: 48px; height: 48px; place-items: center; flex: 0 0 auto; color: #fff; background: var(--red); border-radius: 6px; font-size: 16px; font-weight: 900; }
.hero h1 { margin: 1px 0 0; font-size: 26px; line-height: 1.1; letter-spacing: 0; }
.eyebrow { margin: 0 0 5px; color: #8a96a9; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.status-pill { display: flex; align-items: center; gap: 11px; width: min(390px, 100%); min-height: 56px; padding: 10px 13px; color: #f8fafc; background: var(--charcoal-soft); border: 1px solid #363f50; border-radius: 6px; }
.status-pill strong, .status-pill span { display: block; }
.status-pill strong { font-size: 13px; }
.status-pill span:not(.pulse) { margin-top: 2px; color: #aeb8c8; font-size: 11px; line-height: 1.35; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle, .logout-button { display: inline-flex; min-height: 56px; align-items: center; justify-content: center; padding: 0 13px; color: #dce3ed; background: var(--charcoal-soft); border: 1px solid #363f50; border-radius: 6px; font-size: 11px; font-weight: 800; cursor: pointer; }
.theme-toggle:hover { background: #2b3444; }
.logout-button:hover { color: #fff; border-color: #6d788b; background: #2b3444; }
.theme-icon { font-size: 18px; line-height: 1; }
.pulse { width: 9px; height: 9px; flex: 0 0 auto; background: #37c88b; border-radius: 50%; box-shadow: 0 0 0 4px rgba(55, 200, 139, .14); }
.is-offline .pulse { background: #ff5864; box-shadow: 0 0 0 4px rgba(255, 88, 100, .14); }
.intro-bar { display: grid; grid-template-columns: 120px 140px 145px minmax(0, 1fr); align-items: center; min-height: 68px; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; box-shadow: var(--shadow); }
.intro-bar > div { display: grid; gap: 1px; padding: 0 20px; border-right: 1px solid var(--line); }
.intro-bar strong { font-size: 17px; }
.intro-bar span { color: var(--muted); font-size: 10px; }
.intro-bar p { margin: 0; padding: 0 22px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.dashboard { display: grid; grid-template-columns: minmax(420px, 1.08fr) minmax(380px, .92fr); gap: 18px; margin-top: 18px; }
.groups-panel { grid-column: 1; grid-row: 1 / span 2; }
.profile-panel { grid-column: 2; grid-row: 1; align-self: start; }
.side-stack { display: grid; grid-column: 2; grid-row: 2; align-content: start; gap: 18px; }
.panel { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; padding: 16px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.panel-top h2 { margin: 0; font-size: 19px; line-height: 1.15; }
.panel-top.split { align-items: center; }
.badge, .mini-rule { color: #394357; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; font-size: 11px; font-weight: 750; }
.badge { padding: 7px 9px; }
.mini-rule { display: grid; gap: 1px; min-width: 135px; padding: 8px 10px; text-align: right; }
.mini-rule span { color: var(--muted); font-weight: 650; }
.group-grid { display: grid; padding: 0 18px; }
.empty-groups, .empty-tree { display: grid; gap: 4px; margin: 18px 0; padding: 16px; color: var(--muted); background: var(--surface-soft); border: 1px dashed var(--line-strong); border-radius: 6px; }
.empty-groups strong, .empty-tree strong { color: var(--ink); }
.empty-groups span, .empty-tree span { font-size: 12px; }
.group-card { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 10px 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.group-card:last-child { border-bottom: 0; }
.group-heading { padding-top: 3px; }
.group-heading strong { display: block; font-size: 12px; }
.group-heading span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.group-choice { display: grid; grid-column: 2; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 8px; }
.group-icon-slot { display: grid; width: 36px; height: 36px; place-items: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; }
.group-icon-slot img { display: block; max-width: 22px; max-height: 22px; object-fit: contain; }
.group-icon-slot .icon-fallback { color: #8993a5; background: transparent; font-size: 11px; font-weight: 850; }
.groups-actions { display: grid; gap: 10px; padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.groups-actions .message { margin: 0; }
.profile-body { display: grid; gap: 16px; padding: 18px; }
.profile-identity { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 13px; }
.profile-avatar { display: grid; width: 56px; height: 56px; place-items: center; color: #fff; background: var(--red); border: 1px solid rgba(255, 255, 255, .18); border-radius: 7px; box-shadow: inset 0 -8px 18px rgba(120, 0, 10, .12); font-size: 17px; font-weight: 900; }
.profile-name { min-width: 0; }
.profile-name .eyebrow { margin-bottom: 4px; }
.profile-name h2 { overflow: hidden; margin: 0 0 5px; font-size: 20px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.profile-connection { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.profile-connection::before { width: 7px; height: 7px; flex: 0 0 auto; background: var(--red); border-radius: 50%; content: ""; box-shadow: 0 0 0 3px rgba(229, 47, 60, .12); }
.profile-connection.is-connected::before { background: var(--green); box-shadow: 0 0 0 3px rgba(22, 131, 93, .12); }
.profile-facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-facts > div { display: grid; gap: 3px; min-width: 0; padding: 11px 12px 11px 0; }
.profile-facts > div + div { padding-left: 13px; border-left: 1px solid var(--line); }
.profile-facts span { color: var(--muted); font-size: 10px; }
.profile-facts strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-groups { display: flex; flex-wrap: wrap; gap: 7px; min-height: 29px; align-items: center; }
.profile-group { display: inline-flex; max-width: 170px; min-height: 29px; align-items: center; gap: 6px; padding: 4px 8px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 5px; font-size: 10px; font-weight: 750; }
.profile-group > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-group img { width: 17px; height: 17px; flex: 0 0 auto; object-fit: contain; }
.profile-group-fallback { display: grid; width: 17px; height: 17px; place-items: center; flex: 0 0 auto; color: #fff; background: #697386; border-radius: 3px; font-size: 8px; }
.profile-more { display: inline-grid; min-width: 29px; height: 29px; place-items: center; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 5px; font-size: 10px; font-weight: 850; }
.profile-empty { color: var(--muted); font-size: 11px; }
.profile-notifications { display: grid; border-top: 1px solid var(--line); }
.profile-notifications-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 8px; }
.profile-notifications-head strong { font-size: 11px; }.profile-notifications-head > span { display: grid; min-width: 22px; height: 22px; place-items: center; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); font-size: 9px; font-weight: 900; }
.profile-notification { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.notification-mark { display: grid; width: 25px; height: 25px; place-items: center; color: #fff; background: #697386; font-size: 9px; font-weight: 900; }
.profile-notification.is-warning .notification-mark { background: #d8910d; }.profile-notification.is-danger .notification-mark { background: var(--red); }
.profile-notification > div { min-width: 0; }.profile-notification strong { display: block; font-size: 10px; }.profile-notification p { margin: 3px 0; color: var(--muted); font-size: 9px; line-height: 1.4; }.profile-notification time { color: var(--muted); font-size: 8px; }
.profile-notifications-empty { display: flex; align-items: center; gap: 10px; padding: 10px 0 2px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; }.profile-notifications-empty .notification-mark { background: var(--green); }
select, input { width: 100%; min-height: 38px; padding: 0 11px; color: var(--ink); background: var(--field); border: 1px solid var(--line-strong); border-radius: 6px; outline: none; }
select { text-align: left; }
input::placeholder { color: #98a1b1; }
select:hover, input:hover { border-color: #aab3c2; }
select:focus, input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 99, 212, .11); }
.creator-form { display: grid; gap: 14px; padding: 18px; }
.field { display: grid; gap: 6px; color: #30394b; font-size: 11px; font-weight: 800; }
.big-field input { min-height: 44px; font-size: 14px; font-weight: 650; }
.channel-builder-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.channel-builder-head > div { display: flex; align-items: baseline; gap: 8px; }
.channel-builder-head strong { color: var(--ink); font-size: 12px; }
.channel-builder-head span { color: var(--muted); font-size: 10px; font-weight: 750; }
.add-channel-button { min-height: 34px; padding: 0 10px; color: var(--blue); background: var(--field); border: 1px solid var(--line-strong); border-radius: 5px; font-size: 10px; font-weight: 850; cursor: pointer; }
.add-channel-button:hover:not(:disabled) { border-color: var(--blue); }
.add-channel-button:disabled { cursor: not-allowed; opacity: .45; }
.password-grid, .channel-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.channel-config { display: grid; gap: 10px; padding: 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; }
.channel-config-head { display: flex; min-height: 24px; align-items: center; justify-content: space-between; gap: 10px; }
.channel-config-head strong { color: var(--ink); font-size: 11px; }
.remove-channel-button { display: grid; width: 26px; height: 26px; place-items: center; flex: 0 0 auto; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 4px; font-size: 18px; line-height: 1; cursor: pointer; }
.remove-channel-button:hover:not(:disabled) { color: var(--red); background: var(--field); border-color: var(--line-strong); }
.remove-channel-button:disabled { cursor: not-allowed; opacity: .3; }
.primary-button, .danger-button { min-height: 42px; padding: 0 15px; color: #fff; border-radius: 6px; font-weight: 850; cursor: pointer; transition: background 140ms ease, transform 140ms ease, opacity 140ms ease; }
.primary-button { background: var(--red); }
.primary-button:hover:not(:disabled) { background: var(--red-dark); transform: translateY(-1px); }
.danger-button { background: var(--charcoal); }
.danger-button:hover:not(:disabled) { background: #000; transform: translateY(-1px); }
.primary-button:disabled, .danger-button:disabled { cursor: not-allowed; opacity: .48; }
.message { margin: 0 18px 18px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; line-height: 1.4; }
.message.is-success { color: #145c43; background: #effbf6; border-color: #bce8d5; }
.message.is-error { color: #8b1e28; background: #fff2f3; border-color: #f3c3c7; }
.tree-body { padding: 16px 18px 18px; }
.room-card { margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.room-expiry { display: grid; gap: 7px; padding: 11px 14px 12px; background: var(--surface-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.room-expiry > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.room-expiry span, .room-expiry small { color: var(--muted); font-size: 9px; }.room-expiry strong { font-size: 10px; }
.room-expiry-track { height: 3px; overflow: hidden; background: var(--line); }.room-expiry-track i { display: block; height: 100%; background: var(--green); transition: width .4s ease; }
.room-expiry.is-warning .room-expiry-track i { background: #e0a01a; }.room-expiry.is-warning strong { color: #a86c00; }
.room-expiry.is-danger .room-expiry-track i { background: var(--red); }.room-expiry.is-danger strong { color: var(--red); }
.thick-line { height: 7px; overflow: hidden; color: transparent; background: #252c38; border-bottom: 2px solid #0d1118; }
.room-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 14px; color: var(--ink); background: var(--surface); border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.room-main:hover { background: var(--panel-hover); }
.room-main span { font-weight: 850; }
.room-main small { color: var(--muted); font-weight: 650; }
.channel-list { display: grid; gap: 7px; margin: 0; padding: 12px 14px 14px; list-style: none; }
.channel-list li { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 12px; }
.check { display: inline-grid; width: 17px; height: 17px; place-items: center; color: #fff; background: #6878c8; border-radius: 4px; font-size: 10px; font-weight: 900; }
.lock { margin-left: auto; padding: 3px 6px; color: #7d4f00; background: #fff6dd; border-radius: 4px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.admin-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 14px; background: var(--admin-surface); border-top: 1px solid var(--line); }
.admin-panel .wide { grid-column: 1 / -1; }
.password-editor { display: grid; align-content: start; gap: 9px; padding: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.admin-actions { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr auto; gap: 10px; }
.auth-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); margin-top: 18px; }
.auth-copy { padding: 34px; color: #fff; background: var(--charcoal); border-right: 4px solid var(--red); }
.auth-copy h2 { max-width: 520px; margin: 0 0 12px; font-size: 28px; line-height: 1.18; }
.auth-copy > p:not(.eyebrow) { max-width: 590px; margin: 0; color: #b8c1cf; font-size: 13px; line-height: 1.6; }
.auth-steps { display: grid; gap: 8px; margin: 23px 0 0; padding-left: 20px; color: #e8edf4; font-size: 12px; font-weight: 700; }
.auth-action { display: grid; align-content: center; gap: 13px; min-height: 290px; padding: 34px; background: var(--surface); }
.auth-action .message { margin: 0; }
.identity-box { display: grid; gap: 4px; padding: 15px; background: var(--surface-soft); border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 6px; }
.identity-box span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.identity-box strong { font-size: 15px; }
.identity-box.is-warning { border-left-color: var(--red); }
.code-form { display: grid; gap: 12px; }
.code-input { min-height: 54px; text-align: center; font-size: 24px; font-weight: 900; letter-spacing: .2em; }
.text-button { min-height: 34px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.text-button:hover { color: var(--ink); text-decoration: underline; }
.loading-panel { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 180px; margin-top: 18px; color: var(--muted); }
.loader { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.temporary-block { display: grid; gap: 5px; padding-top: 10px; color: #171c26; text-align: center; border-top: 3px solid #171c26; }
.protected-line { padding-left: 12px; overflow: hidden; text-align: left; font-size: 17px; line-height: 1; }
.temporary-block strong { font-size: 11px; }
.temporary-block span { color: #4c5566; font-size: 11px; letter-spacing: 1px; }
.view-switcher { display: inline-flex; gap: 3px; margin-top: 18px; padding: 4px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 5px 18px rgba(17, 24, 39, .06); }
.view-switcher button { min-height: 36px; padding: 0 15px; color: var(--muted); background: transparent; border-radius: 5px; font-size: 11px; font-weight: 850; cursor: pointer; }
.view-switcher button:hover { color: var(--ink); background: var(--surface-soft); }
.view-switcher button.is-active { color: #fff; background: var(--charcoal); }
.admin-dashboard { display: grid; gap: 14px; margin-top: 12px; }
.admin-heading { display: flex; min-height: 112px; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; color: #fff; background: var(--charcoal); border-left: 4px solid var(--red); border-radius: 8px; box-shadow: var(--shadow); }
.admin-heading h2 { margin: 0 0 7px; font-size: 23px; letter-spacing: 0; }
.admin-heading p:not(.eyebrow) { margin: 0; color: #abb5c5; font-size: 12px; }
.admin-heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.readonly-badge, .refresh-button { min-height: 36px; padding: 0 12px; border-radius: 5px; font-size: 10px; font-weight: 850; }
.readonly-badge { display: inline-flex; align-items: center; color: #aeb8c8; background: #212936; border: 1px solid #3a4557; text-transform: uppercase; }
.readonly-badge.is-manage { color: #ffd9dc; background: #3a1b22; border-color: #74323b; }
.refresh-button { color: #fff; background: var(--red); cursor: pointer; }
.refresh-button:hover:not(:disabled) { background: var(--red-dark); }
.refresh-button:disabled { cursor: wait; opacity: .65; }
.admin-warning { padding: 11px 13px; color: #7a4c00; background: #fff6dd; border: 1px solid #eed394; border-radius: 6px; font-size: 11px; font-weight: 700; }
.admin-action-message { padding: 11px 13px; border: 1px solid; border-radius: 6px; font-size: 11px; font-weight: 750; }
.admin-action-message.is-success { color: #145c43; background: #effbf6; border-color: #bce8d5; }
.admin-action-message.is-error { color: #8b1e28; background: #fff2f3; border-color: #f3c3c7; }
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.metric-strip > div { position: relative; display: grid; gap: 2px; min-width: 0; padding: 17px 20px 17px 37px; border-right: 1px solid var(--line); }
.metric-strip > div:last-child { border-right: 0; }
.metric-strip strong { overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.metric-strip small { color: var(--muted); font-size: 10px; }
.metric-dot { position: absolute; top: 24px; left: 20px; width: 8px; height: 8px; background: var(--muted); border-radius: 50%; }
.metric-dot.is-good { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 15%, transparent); }
.metric-dot.is-alert { background: #e0a01a; box-shadow: 0 0 0 3px rgba(224, 160, 26, .15); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 14px; align-items: start; }
.alerts-section { overflow: hidden; }
.alerts-list { display: grid; }
.alerts-head-actions { display: flex; align-items: center; gap: 8px; }
.mark-all-button, .alert-read-button { min-height: 30px; padding: 0 10px; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: 4px; cursor: pointer; font-size: 9px; font-weight: 850; }
.mark-all-button:hover:not(:disabled), .alert-read-button:hover:not(:disabled) { color: #fff; background: var(--charcoal); border-color: var(--charcoal); }.mark-all-button:disabled, .alert-read-button:disabled { cursor: wait; opacity: .55; }
.admin-alert { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 72px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.admin-alert.is-unread { background: color-mix(in srgb, var(--red) 4%, var(--surface)); box-shadow: inset 3px 0 var(--red); }.admin-alert:last-child { border-bottom: 0; }.admin-alert.is-resolved.is-read { opacity: .7; }
.admin-alert-mark { display: grid; width: 28px; height: 28px; place-items: center; color: #fff; background: var(--green); font-size: 11px; font-weight: 900; }
.admin-alert.is-active .admin-alert-mark { background: #e0a01a; }.admin-alert.is-critical.is-active .admin-alert-mark { background: var(--red); }
.admin-alert > div { min-width: 0; }.admin-alert p { margin: 4px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }.admin-alert small { color: var(--muted); font-size: 8px; }
.alert-title-line { display: flex; align-items: center; gap: 7px; }.alert-title-line b { padding: 2px 5px; color: #fff; background: var(--red); font-size: 7px; letter-spacing: .05em; text-transform: uppercase; }
.admin-alert-controls { display: grid; justify-items: end; gap: 7px; }
.admin-alert-state { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.alerts-empty { display: grid; justify-items: center; gap: 5px; padding: 25px; color: var(--muted); text-align: center; }.alerts-empty strong { color: var(--ink); font-size: 11px; }.alerts-empty span { font-size: 9px; }
.admin-section { min-width: 0; box-shadow: 0 8px 22px rgba(17, 24, 39, .06); }
.admin-section-head { display: flex; min-height: 69px; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.admin-section-head h3 { margin: 0; font-size: 16px; }
.health-section { grid-column: 1; }
.rate-section { grid-column: 2; }
.sessions-section, .rooms-section, .audit-section { grid-column: 1 / -1; }
.health-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 5px 17px 12px; }
.health-list > div { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.health-list > div:nth-last-child(-n + 2) { border-bottom: 0; }
.health-list > div:nth-child(odd) { padding-right: 18px; }
.health-list > div:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
.health-list dt { color: var(--muted); font-size: 10px; font-weight: 700; }
.health-list dd { overflow: hidden; margin: 0; font-size: 11px; font-weight: 850; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.value-good { color: var(--green); }
.value-alert { color: #b77600; }
.status-chip { display: inline-flex; min-height: 25px; align-items: center; justify-content: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.status-chip.is-success { color: #126447; background: #ebf8f2; border-color: #bce2d1; }
.status-chip.is-danger { color: #9b2932; background: #fff0f1; border-color: #f0c0c4; }
.rate-list { display: grid; padding: 6px 17px 12px; }
.rate-list > div { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.rate-list > div:last-of-type { border-bottom: 0; }
.rate-list span { display: grid; min-width: 0; gap: 2px; }
.rate-list strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rate-list small { color: var(--muted); font-size: 9px; }
.rate-list b { display: grid; min-width: 30px; height: 27px; place-items: center; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 4px; font-size: 10px; }
.room-status-list { display: grid; padding: 5px 17px 12px; }
.room-status-list > div { display: flex; min-height: 57px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.room-status-list > div:last-of-type { border-bottom: 0; }
.room-status-list > div > span:first-child { display: grid; min-width: 0; gap: 3px; }
.room-status-list strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.room-status-list small { color: var(--muted); font-size: 9px; }
.room-admin-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.table-action { min-height: 29px; padding: 0 9px; color: #344054; background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: 5px; font-size: 9px; font-weight: 850; cursor: pointer; white-space: nowrap; }
.table-action:hover:not(:disabled) { color: var(--ink); background: var(--panel-hover); border-color: #9ba6b7; }
.table-action.is-danger { color: #a02631; background: #fff3f4; border-color: #efc3c7; }
.table-action.is-danger:hover:not(:disabled) { color: #fff; background: var(--red-dark); border-color: var(--red-dark); }
.table-action:disabled { cursor: not-allowed; opacity: .5; }
.empty-admin-row { margin: 0; padding: 17px 0; color: var(--muted); font-size: 11px; }
.admin-table-wrap { max-width: 100%; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.admin-table th { padding: 9px 14px; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); font-size: 9px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.admin-table td { min-height: 46px; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--panel-hover); }
.admin-table td strong, .admin-table td small { display: block; }
.admin-table td small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.admin-table .empty-table { padding: 20px 14px; color: var(--muted); text-align: center; }
.audit-section { overflow: hidden; }
.audit-section-head { border-bottom: 0; }
.audit-toolbar { display: flex; gap: 4px; padding: 0 17px 12px; border-bottom: 1px solid var(--line); }
.audit-toolbar button { display: inline-flex; min-height: 32px; align-items: center; gap: 8px; padding: 0 10px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 5px; font-size: 10px; font-weight: 800; cursor: pointer; }
.audit-toolbar button:hover { color: var(--ink); background: var(--surface-soft); }
.audit-toolbar button.is-active { color: var(--ink); background: var(--field); border-color: var(--line-strong); }
.audit-toolbar b { display: grid; min-width: 20px; height: 19px; place-items: center; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-size: 8px; }
.audit-toolbar button.is-active b { color: #fff; background: var(--charcoal); border-color: var(--charcoal); }
.audit-feed { max-height: 640px; overflow-y: auto; scrollbar-color: var(--line-strong) transparent; }
.audit-entry { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 13px 17px; border-bottom: 1px solid var(--line); transition: background 140ms ease; }
.audit-entry:last-child { border-bottom: 0; }
.audit-entry:hover { background: var(--panel-hover); }
.audit-event-icon { display: grid; width: 30px; height: 30px; place-items: center; color: #fff; background: #687386; border-radius: 5px; font-size: 12px; font-weight: 900; }
.audit-event-icon.is-room { background: #315fa8; }
.audit-event-icon.is-access { background: #667085; }
.audit-event-icon.is-group { background: #16835d; }
.audit-entry.is-failure .audit-event-icon { background: var(--red-dark); }
.audit-entry-body { display: grid; min-width: 0; gap: 5px; }
.audit-entry-title { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.audit-entry-title > strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.audit-outcome { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.audit-outcome::before { width: 6px; height: 6px; background: var(--muted); border-radius: 50%; content: ""; }
.audit-outcome.is-success { color: var(--green); }
.audit-outcome.is-success::before { background: var(--green); }
.audit-outcome.is-failure { color: var(--red-dark); }
.audit-outcome.is-failure::before { background: var(--red); }
.audit-entry-meta { display: flex; min-width: 0; align-items: center; gap: 0; color: var(--muted); font-size: 9px; }
.audit-entry-meta > * { overflow: hidden; max-width: 190px; text-overflow: ellipsis; white-space: nowrap; }
.audit-entry-meta > * + *::before { margin: 0 7px; color: var(--line-strong); content: "·"; }
.audit-entry-meta time { margin-left: auto; padding-left: 14px; }
.audit-entry-meta time::before { display: none; }
.audit-actor { color: var(--ink); font-weight: 800; }
.audit-error-detail { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 4px; padding: 8px 9px; color: #84202a; background: #fff4f5; border-left: 3px solid var(--red); font-size: 9px; line-height: 1.4; }
.audit-error-detail strong { font-size: 8px; text-transform: uppercase; }
.audit-error-detail code { padding: 2px 4px; color: #84202a; background: #ffe4e7; border-radius: 3px; font-size: 8px; }
.audit-empty { display: grid; justify-items: center; gap: 4px; padding: 34px 17px; color: var(--muted); text-align: center; }
.audit-empty strong { color: var(--ink); font-size: 11px; }
.audit-empty span { font-size: 9px; }
.admin-updated { margin: -2px 2px 0; color: var(--muted); font-size: 9px; text-align: right; }
.admin-loading { margin-top: 12px; }
.admin-unavailable { display: grid; justify-items: start; gap: 8px; margin-top: 12px; padding: 26px; }
.admin-unavailable h2, .admin-unavailable p { margin: 0; }
.admin-unavailable p:not(.eyebrow) { color: var(--muted); font-size: 12px; }
.admin-unavailable .primary-button { margin-top: 7px; }
.footer { margin-top: 18px; padding: 16px 18px; color: var(--muted); background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(17, 24, 39, .05); text-align: center; font-size: 11px; }
.footer a { color: #313a4b; font-weight: 800; text-decoration: none; }
.footer a:hover { color: var(--red); text-decoration: underline; }
.heart { color: var(--red); font-weight: 900; }
html[data-theme="dark"] .panel-top { background: var(--surface); }
html[data-theme="dark"] .field { color: #cbd3df; }
html[data-theme="dark"] .group-icon-slot { background: #111722; }
html[data-theme="dark"] .empty-groups, html[data-theme="dark"] .empty-tree { background: #141a23; }
html[data-theme="dark"] .message.is-success { color: #8fe0bd; background: #11261f; border-color: #285d49; }
html[data-theme="dark"] .message.is-error { color: #ffadb4; background: #2b1519; border-color: #6f3037; }
html[data-theme="dark"] .admin-warning { color: #f0c675; background: #302611; border-color: #695321; }
html[data-theme="dark"] .admin-action-message.is-success { color: #8fe0bd; background: #11261f; border-color: #285d49; }
html[data-theme="dark"] .admin-action-message.is-error { color: #ffadb4; background: #2b1519; border-color: #6f3037; }
html[data-theme="dark"] .table-action { color: #d3dae5; background: #202734; border-color: #445064; }
html[data-theme="dark"] .table-action.is-danger { color: #ffb3b9; background: #2b1519; border-color: #6f3037; }
html[data-theme="dark"] .status-chip.is-success { color: #8ce0bd; background: #10271f; border-color: #285d49; }
html[data-theme="dark"] .status-chip.is-danger { color: #ffabb2; background: #2b1519; border-color: #6f3037; }
html[data-theme="dark"] .room-expiry.is-warning strong { color: #f0c675; }
html[data-theme="dark"] .audit-error-detail { color: #ffb2b9; background: #2b1519; border-left-color: #f13d49; }
html[data-theme="dark"] .audit-error-detail code { color: #ffc5ca; background: #411d23; }
html[data-theme="dark"] .temporary-block { color: #eef2f7; border-top-color: #d7dde7; }
html[data-theme="dark"] .temporary-block span { color: #a7b0bf; }
html[data-theme="dark"] .footer a { color: #e3e8ef; }
@media (max-width: 960px) {
  .app-shell { width: min(100% - 24px, 760px); margin-top: 12px; }
  .dashboard { grid-template-columns: 1fr; }
  .groups-panel, .profile-panel, .side-stack { grid-column: 1; grid-row: auto; }
  .auth-panel { grid-template-columns: 1fr; }
  .auth-copy { border-right: 0; border-bottom: 4px solid var(--red); }
  .admin-grid { grid-template-columns: 1fr; }
  .health-section, .rate-section, .sessions-section, .rooms-section, .audit-section { grid-column: 1; }
}
@media (max-width: 650px) {
  body { background-attachment: scroll; background-position: center top; }
  .hero { align-items: stretch; flex-direction: column; }
  .header-actions { align-items: stretch; }
  .theme-toggle { min-height: 52px; }
  .status-pill { width: 100%; }
  .intro-bar { grid-template-columns: repeat(3, 1fr); }
  .intro-bar > div { padding: 12px; }
  .intro-bar p { grid-column: 1 / -1; padding: 13px; border-top: 1px solid var(--line); }
  .group-card { grid-template-columns: 1fr; }
  .group-choice { grid-column: 1; }
  .password-grid, .channel-config-grid, .admin-panel { grid-template-columns: 1fr; }
  .admin-actions { grid-template-columns: 1fr; }
  .profile-facts { grid-template-columns: 1fr 1fr; }
  .auth-copy, .auth-action { padding: 24px; }
  .auth-action { min-height: 0; align-content: start; }
  .panel-top, .panel-top.split, .room-main { align-items: flex-start; }
  .view-switcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .admin-heading { align-items: flex-start; flex-direction: column; padding: 20px; }
  .admin-heading-actions { width: 100%; }
  .refresh-button { flex: 1; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-strip > div:nth-child(2) { border-right: 0; }
  .metric-strip > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .health-list { grid-template-columns: 1fr; }
  .health-list > div:nth-child(odd), .health-list > div:nth-child(even) { padding-right: 0; padding-left: 0; border-left: 0; }
  .health-list > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .admin-table { min-width: 620px; }
  .alerts-head { align-items: flex-start; }.alerts-head-actions { align-items: flex-end; flex-direction: column; }.admin-alert { grid-template-columns: 28px minmax(0, 1fr); }.admin-alert-controls { grid-column: 2; justify-items: start; }.admin-alert-state { grid-column: auto; }
  .rooms-section .room-status-list > div { align-items: flex-start; padding: 12px 0; }
  .room-admin-controls { align-items: flex-end; flex-direction: column; }
  .audit-feed { max-height: none; }
  .audit-entry { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px 14px; }
  .audit-entry-title { align-items: flex-start; }
  .audit-entry-title > strong { white-space: normal; }
  .audit-entry-meta { flex-wrap: wrap; row-gap: 3px; }
  .audit-entry-meta time { width: 100%; margin: 2px 0 0; padding: 0; }
  .audit-error-detail { grid-template-columns: 1fr; gap: 3px; }
  .audit-error-detail code { justify-self: start; }
}
@media (max-width: 430px) {
  .app-shell { width: 100%; margin: 0; }
  .hero, .intro-bar, .panel { border-radius: 0; }
  .dashboard { gap: 10px; margin-top: 10px; }
  .panel-top { padding: 15px; }
  .group-grid { padding: 0 15px; }
  .creator-form, .tree-body, .profile-body { padding: 15px; }
  .mini-rule { min-width: 0; }
  .header-actions { flex-direction: column-reverse; }
  .theme-toggle, .logout-button { width: 100%; min-height: 44px; }
  .footer { margin-top: 10px; border-right: 0; border-left: 0; border-radius: 0; }
  .view-switcher, .admin-dashboard { margin-right: 10px; margin-left: 10px; }
  .view-switcher { width: auto; }
  .admin-heading { border-radius: 6px; }
  .audit-toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-right: 14px; padding-left: 14px; }
  .audit-toolbar button { justify-content: center; padding: 0 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* LegendZ Control Center v3 */
:root {
  --page: #edf0f4; --surface: rgba(255,255,255,.9); --surface-soft: rgba(245,247,249,.88);
  --ink: #10151e; --muted: #657084; --line: rgba(26,35,49,.14); --line-strong: rgba(26,35,49,.25);
  --charcoal: #0e141d; --charcoal-soft: #19212d; --red: #ed2939; --red-dark: #bd1728;
  --green: #008c61; --blue: #008fa7; --shadow: 0 22px 70px rgba(19,25,36,.14);
  --field: rgba(255,255,255,.92); --panel-hover: rgba(239,242,246,.82); --admin-surface: rgba(242,244,247,.9);
}
html[data-theme="dark"] {
  --page: #080b10; --surface: rgba(16,21,29,.9); --surface-soft: rgba(25,32,43,.9);
  --ink: #f4f6f8; --muted: #9aa7b8; --line: rgba(188,202,222,.15); --line-strong: rgba(188,202,222,.27);
  --charcoal: #090d13; --charcoal-soft: #161e29; --red: #ff3548; --red-dark: #d01f32;
  --green: #31d39a; --blue: #36c8de; --shadow: 0 28px 90px rgba(0,0,0,.4);
  --field: rgba(10,15,22,.92); --panel-hover: rgba(29,37,49,.92); --admin-surface: rgba(12,17,24,.92);
}
body::before { position: fixed; z-index: -1; inset: 0; background: color-mix(in srgb, var(--page) 60%, transparent); content: ""; }
.app-shell { width: min(1360px, calc(100vw - 48px)); margin: 18px auto 30px; }
.hero { display: grid; grid-template-columns: minmax(220px,1fr) auto minmax(360px,1fr); min-height: 78px; padding: 11px 14px; color: var(--ink); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 0; box-shadow: 0 14px 45px rgba(0,0,0,.14); backdrop-filter: blur(20px); }
.brand-lockup { color: inherit; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; background: var(--red); border-radius: 0; box-shadow: 7px 7px 0 color-mix(in srgb, var(--red) 17%, transparent); font-size: 13px; }
.hero h1 { margin-top: 0; font-size: 16px; }
.hero .eyebrow { margin-bottom: 2px; color: var(--muted); font-size: 8px; letter-spacing: .13em; }
.panel-links { display: flex; align-items: center; justify-content: center; gap: 3px; }
.panel-links a { position: relative; display: grid; min-height: 40px; place-items: center; padding: 0 13px; color: var(--muted); font-size: 10px; font-weight: 850; text-decoration: none; }
.panel-links a::after { position: absolute; right: 13px; bottom: 3px; left: 13px; height: 2px; background: var(--red); content: ""; transform: scaleX(0); transition: transform .18s ease; }
.panel-links a:hover { color: var(--ink); }.panel-links a:hover::after { transform: scaleX(1); }
.header-actions { justify-self: end; }
.theme-toggle, .logout-button { min-width: 43px; min-height: 44px; padding: 0 12px; color: var(--muted); background: var(--surface-soft); border-color: var(--line); border-radius: 0; }
.theme-toggle { gap: 7px; }.theme-toggle span:first-child { color: var(--blue); font-size: 17px; }.theme-toggle:hover, .logout-button:hover { color: var(--ink); background: var(--panel-hover); border-color: var(--line-strong); }
.status-pill { width: min(310px,100%); min-height: 52px; color: #f7f9fc; background: #0f1620; border-color: #344052; border-radius: 0; }
.status-pill strong { font-size: 11px; }.status-pill span:not(.pulse) { color: #8f9db0; font-size: 9px; }
.intro-bar { grid-template-columns: 115px 130px 150px minmax(0,1fr); min-height: 72px; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0; backdrop-filter: blur(18px); }
.intro-bar > div { position: relative; min-height: 42px; justify-content: center; padding-left: 27px; }
.intro-bar > div::before { position: absolute; top: 14px; left: 14px; width: 5px; height: 5px; background: var(--blue); border-radius: 50%; content: ""; box-shadow: 0 0 12px color-mix(in srgb,var(--blue) 70%,transparent); }
.intro-bar strong { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 15px; }.intro-bar p { font-size: 10px; }
.dashboard { grid-template-columns: minmax(460px,1.1fr) minmax(390px,.9fr); gap: 16px; margin-top: 16px; }
.side-stack { gap: 16px; }.panel { background: var(--surface); border-color: var(--line); border-radius: 0; box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.panel-top { min-height: 78px; padding: 17px 20px; background: transparent; }
.panel-top h2 { font-size: 18px; }.eyebrow { color: var(--blue); font-size: 8px; letter-spacing: .14em; }
.badge, .mini-rule { border-radius: 0; }.badge { font-size: 9px; }.mini-rule { color: var(--ink); background: transparent; border: 0; border-left: 2px solid var(--red); }
.group-grid { padding: 0 20px; }.group-card { grid-template-columns: 145px minmax(0,1fr); padding: 17px 0; }
.group-heading strong { font-size: 11px; }.group-heading span { font-size: 9px; }
.group-icon-slot { width: 38px; height: 38px; border-radius: 0; }.group-choice { grid-template-columns: 38px minmax(0,1fr); }
select, input { min-height: 42px; border-radius: 0; font-size: 11px; }.field > span { font-size: 9px; }
.primary-button, .danger-button, .add-channel-button { border-radius: 0; }
.primary-button { min-height: 46px; background: var(--red); box-shadow: 0 10px 26px color-mix(in srgb,var(--red) 22%,transparent); }
.primary-button:hover:not(:disabled) { background: var(--red-dark); transform: translateY(-1px); }
.add-channel-button { color: var(--blue); background: color-mix(in srgb,var(--blue) 8%,transparent); border-color: color-mix(in srgb,var(--blue) 35%,var(--line)); }
.channel-config, .password-editor { background: var(--surface-soft); border-color: var(--line); border-radius: 0; }
.profile-avatar { border-radius: 0; background: #111822; box-shadow: inset 0 0 0 1px #3b4657, 7px 7px 0 color-mix(in srgb,var(--red) 18%,transparent); }
.profile-group, .profile-more, .profile-group-fallback { border-radius: 0; }
.profile-facts { grid-template-columns: 1fr 1fr; }
.room-card { border-radius: 0; }.thick-line { height: 5px; background: #090c12; }.channel-list li { font-size: 10px; }
.lock { color: var(--red); background: color-mix(in srgb,var(--red) 8%,transparent); border-color: color-mix(in srgb,var(--red) 28%,var(--line)); border-radius: 0; }
.temporary-block { color: var(--ink); border-top-color: var(--ink); }.temporary-block span { color: var(--muted); }
.auth-panel { grid-template-columns: .9fr 1.1fr; border-radius: 0; }
.auth-copy { position: relative; min-height: 350px; overflow: hidden; background: #0e141d; border-right: 0; }
.auth-copy::after { position: absolute; right: -90px; bottom: -120px; width: 270px; height: 270px; border: 1px solid #3a4555; border-radius: 50%; box-shadow: 0 0 0 35px rgba(255,255,255,.02), 0 0 0 70px rgba(255,255,255,.015); content: ""; }
.auth-copy h2 { max-width: 390px; font-size: 30px; line-height: 1.08; }.auth-action { background: transparent; }
.identity-box { border-left: 3px solid var(--green); border-radius: 0; }
.code-input { letter-spacing: .18em; }
.view-switcher { display: grid; grid-template-columns: repeat(2,minmax(140px,1fr)); width: min(380px,100%); margin-top: 16px; padding: 0; background: var(--surface); border-radius: 0; backdrop-filter: blur(15px); }
.view-switcher button { min-height: 42px; border-radius: 0; }.view-switcher button.is-active { background: #0e141d; box-shadow: inset 0 -2px var(--red); }
.nav-alert-count { display: inline-grid; min-width: 18px; height: 18px; margin-left: 7px; place-items: center; color: #fff; background: var(--red); font-size: 8px; font-weight: 900; }
.admin-heading { min-height: 130px; padding: 25px 28px; background: #0e141d; border-left: 0; border-top: 3px solid var(--red); border-radius: 0; }
.admin-heading h2 { font-size: 27px; }.readonly-badge, .refresh-button, .admin-warning, .admin-action-message { border-radius: 0; }
.metric-strip { border-radius: 0; backdrop-filter: blur(18px); }.metric-strip > div { padding-top: 20px; padding-bottom: 20px; }.metric-strip strong { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.admin-section { box-shadow: var(--shadow); }.status-chip, .table-action, .mark-all-button, .alert-read-button, .audit-toolbar button, .audit-toolbar b, .audit-event-icon, .audit-error-detail code { border-radius: 0; }
.audit-entry { padding-top: 15px; padding-bottom: 15px; }.audit-event-icon { background: #344054; }.audit-event-icon.is-room { background: #246b7a; }.audit-event-icon.is-group { background: #087d59; }
.footer { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 28px; margin-top: 18px; padding: 17px 4px 7px; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; backdrop-filter: none; text-align: right; }
.footer-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.footer-brand .brand-mark { width: 36px; height: 36px; box-shadow: none; font-size: 11px; }
.footer-brand > span:last-child { display: grid; gap: 1px; text-align: left; }
.footer-brand strong { font-size: 13px; line-height: 1.1; }
.footer-brand small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.footer p { margin: 0; color: var(--muted); font-size: 10px; }
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr auto; }.panel-links { grid-row: 2; grid-column: 1/-1; border-top: 1px solid var(--line); }.hero { padding-bottom: 0; }
  .dashboard { grid-template-columns: 1fr; }.groups-panel, .profile-panel, .side-stack { grid-column: 1; grid-row: auto; }
}
@media (max-width: 700px) {
  .app-shell { width: 100%; margin: 0; }.hero { grid-template-columns: 1fr auto; gap: 10px; padding: 11px 12px 0; }.header-actions { justify-content: end; }.status-pill { grid-column: 1/-1; width: 100%; }
  .panel-links { grid-row: 3; overflow-x: auto; justify-content: flex-start; }.theme-toggle span:last-child, .logout-button { display: none; }
  .theme-toggle { width: 44px; min-width: 44px; }.intro-bar { grid-template-columns: repeat(3,1fr); }.intro-bar p { grid-column: 1/-1; }
  .dashboard { margin-top: 10px; }.panel, .hero, .intro-bar { border-right: 0; border-left: 0; }.auth-panel { grid-template-columns: 1fr; }.auth-copy { min-height: auto; border-bottom: 3px solid var(--red); }
  .footer { min-height: 0; align-items: flex-start; flex-direction: column; gap: 14px; margin: 10px 12px 0; padding: 20px 0; text-align: left; }.footer p { line-height: 1.6; }.view-switcher, .admin-dashboard { margin-right: 10px; margin-left: 10px; }.view-switcher { width: calc(100% - 20px); }
}

/* Operational workspace */
.maintenance-banner { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 13px; margin: 12px 0; padding: 13px 17px; color: #fff; background: #17120d; border: 1px solid #704a16; border-left: 3px solid #e0a01a; box-shadow: var(--shadow); }
.maintenance-banner p { margin: 3px 0 0; color: #d8c4a4; font-size: 10px; }.maintenance-icon { display: grid; width: 30px; height: 30px; place-items: center; color: #17120d; background: #e0a01a; font-weight: 950; }
.template-picker { display: grid; gap: 8px; }.template-picker > span { font-size: 10px; font-weight: 850; }.template-picker > div, .room-filter-bar, .alert-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.template-picker button, .room-filter-bar button, .alert-filter-bar button { min-height: 34px; padding: 0 12px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); font-size: 9px; font-weight: 850; cursor: pointer; }
.template-picker button:hover, .room-filter-bar button:hover, .alert-filter-bar button:hover, .template-picker button.is-active, .room-filter-bar button.is-active, .alert-filter-bar button.is-active { color: var(--ink); border-color: var(--red); box-shadow: inset 0 -2px var(--red); }.template-picker button:disabled { cursor: not-allowed; opacity: .45; }
.room-filter-bar, .alert-filter-bar { padding: 10px 16px; border-bottom: 1px solid var(--line); }.alert-filter-bar button { display: inline-flex; align-items: center; gap: 8px; }.alert-filter-bar b { display: grid; min-width: 18px; height: 18px; place-items: center; padding: 0 4px; color: var(--ink); background: var(--line); font-size: 8px; }
.operations-chart-section { overflow: hidden; }.operations-chart { display: grid; height: 180px; grid-template-columns: repeat(24,minmax(3px,1fr)); align-items: end; gap: 6px; padding: 25px 20px 12px; }.operations-bar { display: grid; height: 128px; grid-template-rows: 1fr 17px; align-items: end; gap: 6px; }.operations-bar i { display: block; min-height: 8px; background: var(--green); border-top: 2px solid color-mix(in srgb,var(--green) 72%,#fff); }.operations-bar.is-partial i { background: #d99618; }.operations-bar.is-empty i { background: var(--line-strong); }.operations-bar span { color: var(--muted); font: 700 7px ui-monospace,SFMono-Regular,Consolas,monospace; }
.operations-legend { display: flex; align-items: center; gap: 18px; padding: 12px 20px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }.operations-legend span { display: inline-flex; align-items: center; gap: 6px; }.operations-legend i { width: 8px; height: 8px; background: var(--green); }.operations-legend i.is-partial { background: #d99618; }.operations-legend strong { margin-left: auto; color: var(--ink); }
.maintenance-section.is-active { border-color: #d99618; }.maintenance-control { display: grid; gap: 14px; padding: 17px; }.maintenance-control p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }.maintenance-control button { justify-self: start; }
.compact-action, .download-button { display: inline-grid; min-height: 34px; place-items: center; padding: 0 12px; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line-strong); font-size: 9px; font-weight: 900; text-decoration: none; cursor: pointer; }.compact-action:hover, .download-button:hover { color: #fff; background: var(--red); border-color: var(--red); }
.backup-list { display: grid; }.backup-row { display: grid; grid-template-columns: 28px minmax(0,1fr) 34px; align-items: center; gap: 11px; min-height: 60px; padding: 9px 16px; border-bottom: 1px solid var(--line); }.backup-row:last-child { border-bottom: 0; }.backup-row > span:nth-child(2) { display: grid; gap: 3px; }.backup-row strong { font-size: 10px; }.backup-row small { color: var(--muted); font-size: 8px; }.backup-state { display: grid; width: 25px; height: 25px; place-items: center; color: #fff; background: var(--red); font-size: 9px; font-weight: 950; }.backup-state.is-ok { background: var(--green); }.download-button { width: 32px; min-height: 32px; padding: 0; font-size: 16px; }
.incident-timeline { position: relative; display: grid; padding: 6px 17px 12px 37px; }.incident-timeline::before { position: absolute; top: 19px; bottom: 24px; left: 22px; width: 1px; background: var(--line-strong); content: ""; }.incident-timeline article { position: relative; padding: 12px 0 13px 13px; border-bottom: 1px solid var(--line); }.incident-timeline article:last-of-type { border-bottom: 0; }.timeline-node { position: absolute; z-index: 1; top: 18px; left: -20px; width: 11px; height: 11px; background: var(--red); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--red); }.is-resolved > .timeline-node { background: var(--green); box-shadow: 0 0 0 1px var(--green); }.timeline-body { display: grid; gap: 6px; }.timeline-body > div:first-child { display: flex; justify-content: space-between; gap: 12px; }.timeline-body strong { font-size: 11px; }.timeline-body > div > span { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }.timeline-body small { color: var(--muted); font-size: 8px; }.timeline-body p, .staff-note { margin: 2px 0; padding: 8px 10px; color: var(--muted); background: var(--surface-soft); border-left: 2px solid var(--cyan); font-size: 9px; line-height: 1.5; }
.inline-note-form { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 6px; margin-top: 5px; }.inline-note-form input { min-width: 0; min-height: 34px; padding: 0 10px; color: var(--ink); background: var(--field); border: 1px solid var(--line-strong); }.inline-note-form button, .text-action { min-height: 30px; padding: 0 9px; color: var(--ink); background: transparent; border: 1px solid var(--line); font-size: 8px; font-weight: 850; cursor: pointer; }.text-action { justify-self: start; }.inline-note-form button:hover, .text-action:hover { color: var(--red); border-color: var(--red); }
.admin-skeleton { pointer-events: none; }.skeleton-block { min-height: 120px; overflow: hidden; background: linear-gradient(100deg,var(--surface) 30%,var(--surface-soft) 44%,var(--surface) 58%); background-size: 250% 100%; border: 1px solid var(--line); animation: skeleton-shimmer 1.4s ease infinite; }.skeleton-heading { min-height: 130px; }.skeleton-metrics { min-height: 86px; }.skeleton-feed { min-height: 220px; }.skeleton-card { min-height: 260px; }@keyframes skeleton-shimmer { to { background-position-x: -200%; } }
.toast-region { position: fixed; z-index: 80; top: 18px; right: 18px; width: min(370px,calc(100% - 36px)); }.toast { display: grid; grid-template-columns: 28px minmax(0,1fr) 28px; align-items: center; gap: 10px; padding: 11px 12px; color: #fff; background: #101721; border: 1px solid #354254; border-left: 3px solid var(--green); box-shadow: 0 18px 50px rgba(0,0,0,.32); font-size: 10px; font-weight: 750; }.toast.is-error { border-left-color: var(--red); }.toast-mark { display: grid; width: 25px; height: 25px; place-items: center; background: var(--green); font-weight: 950; }.toast.is-error .toast-mark { background: var(--red); }.toast button { color: #aab5c4; background: transparent; border: 0; font-size: 20px; cursor: pointer; }
.modal-backdrop { position: fixed; z-index: 90; display: grid; inset: 0; place-items: center; padding: 20px; background: rgba(4,7,11,.76); backdrop-filter: blur(9px); }.confirm-dialog { display: grid; width: min(480px,100%); grid-template-columns: 48px minmax(0,1fr); gap: 17px; padding: 24px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-top: 3px solid var(--cyan); box-shadow: 0 30px 90px rgba(0,0,0,.42); }.confirm-dialog h2 { margin: 4px 0 7px; font-size: 21px; }.confirm-dialog p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }.confirm-symbol { display: grid; width: 46px; height: 46px; place-items: center; color: #fff; background: var(--cyan); font-size: 20px; font-weight: 950; }.confirm-symbol.is-danger { background: var(--red); }.confirm-actions { display: flex; grid-column: 1/-1; justify-content: flex-end; gap: 8px; padding-top: 5px; }
.mobile-command-bar { display: none; }
.diagnostics-section { overflow: hidden; border-top: 2px solid var(--line-strong); }.diagnostics-section.is-pass { border-top-color: var(--green); }.diagnostics-section.is-warn { border-top-color: #d99618; }.diagnostics-section.is-fail { border-top-color: var(--red); }
.diagnostics-empty { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 14px; padding: 22px 18px; }.diagnostics-empty > span { display: grid; width: 40px; height: 40px; place-items: center; color: var(--cyan); background: color-mix(in srgb,var(--cyan) 10%,var(--surface-soft)); border: 1px solid color-mix(in srgb,var(--cyan) 35%,var(--line)); font-size: 22px; }.diagnostics-empty strong { font-size: 11px; }.diagnostics-empty p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.diagnostics-summary { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px 17px; background: var(--surface-soft); border-bottom: 1px solid var(--line); }.diagnostics-overall { display: grid; width: 34px; height: 34px; place-items: center; color: #fff; background: var(--green); font-size: 15px; font-weight: 950; }.diagnostics-overall.is-warn { color: #17120d; background: #d99618; }.diagnostics-overall.is-fail { background: var(--red); }.diagnostics-summary > div { display: grid; gap: 3px; }.diagnostics-summary strong { font-size: 11px; }.diagnostics-summary small, .diagnostics-summary time { color: var(--muted); font-size: 8px; }.diagnostics-summary time { text-align: right; }
.diagnostics-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }.diagnostics-list article { display: grid; grid-template-columns: 27px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 66px; padding: 11px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }.diagnostics-list article:nth-child(even) { border-right: 0; }.diagnostics-list article > span { display: grid; width: 25px; height: 25px; place-items: center; color: #fff; background: var(--green); font-size: 10px; font-weight: 950; }.diagnostics-list article.is-warn > span { color: #17120d; background: #d99618; }.diagnostics-list article.is-fail > span { background: var(--red); }.diagnostics-list article > div { min-width: 0; }.diagnostics-list strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.diagnostics-list p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.4; }.diagnostics-list b { color: var(--green); font-size: 7px; text-transform: uppercase; }.diagnostics-list .is-warn b { color: #b77600; }.diagnostics-list .is-fail b { color: var(--red); }
@media (max-width: 650px) { .diagnostics-list { grid-template-columns: 1fr; }.diagnostics-list article { border-right: 0; }.diagnostics-summary { grid-template-columns: 34px minmax(0,1fr); }.diagnostics-summary time { grid-column: 2; text-align: left; } }
@media (max-width: 650px) { .mobile-command-bar { grid-template-columns: none !important; grid-auto-columns: minmax(0,1fr); grid-auto-flow: column; } }
@media (max-width: 650px) { body { padding-bottom: 72px; }.operations-chart { gap: 3px; padding-right: 12px; padding-left: 12px; }.operations-bar span { display: none; }.operations-legend { flex-wrap: wrap; gap: 10px; }.operations-legend strong { width: 100%; margin-left: 0; }.inline-note-form { grid-template-columns: 1fr 1fr; }.inline-note-form input { grid-column: 1/-1; }.timeline-body > div:first-child { align-items: flex-start; flex-direction: column; gap: 4px; }.mobile-command-bar { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); min-height: 62px; padding: 5px max(7px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left)); background: color-mix(in srgb,var(--surface) 94%,transparent); border-top: 1px solid var(--line-strong); box-shadow: 0 -12px 35px rgba(0,0,0,.14); backdrop-filter: blur(18px); }.mobile-command-bar button { position: relative; display: grid; min-width: 0; place-items: center; gap: 2px; color: var(--muted); background: transparent; border: 0; font-size: 8px; font-weight: 850; cursor: pointer; }.mobile-command-bar button:hover { color: var(--red); }.mobile-command-bar span { font-size: 17px; line-height: 1; }.mobile-command-bar b { position: absolute; top: 1px; right: 20%; display: grid; min-width: 16px; height: 16px; place-items: center; color: #fff; background: var(--red); border-radius: 50%; font-size: 7px; }.toast-region { top: 10px; right: 10px; width: calc(100% - 20px); }.confirm-dialog { grid-template-columns: 40px minmax(0,1fr); padding: 19px; }.confirm-symbol { width: 40px; height: 40px; }.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; }.maintenance-banner { margin-right: 10px; margin-left: 10px; } }

/* LegendZ panel visual system v22 */
@font-face { font-family: "Manrope"; src: url("assets/fonts/manrope-latin.woff2") format("woff2"); font-style: normal; font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Sora"; src: url("assets/fonts/sora-latin.woff2") format("woff2"); font-style: normal; font-weight: 500 700; font-display: swap; }
:root { --page:#edf2f6; --surface:rgba(255,255,255,.86); --surface-soft:rgba(241,246,249,.92); --ink:#111820; --muted:#647483; --line:rgba(28,45,58,.13); --line-strong:rgba(28,45,58,.23); --charcoal:#0d141c; --charcoal-soft:#17212b; --red:#e2263b; --red-dark:#bd172b; --green:#07805b; --blue:#087e95; --shadow:0 20px 60px rgba(20,38,52,.11); --page-image:url("assets/background-light-v3.png?v=1"); --field:rgba(255,255,255,.9); --panel-hover:rgba(238,244,248,.9); --admin-surface:rgba(238,244,248,.65); }
html[data-theme="dark"] { --page:#080c11; --surface:rgba(14,21,29,.88); --surface-soft:rgba(24,34,44,.9); --ink:#f0f5f8; --muted:#97a7b5; --line:rgba(184,210,225,.13); --line-strong:rgba(184,210,225,.24); --charcoal:#090e14; --charcoal-soft:#17212b; --red:#ff4053; --red-dark:#d5263a; --green:#40d69f; --blue:#45c5dc; --shadow:0 26px 80px rgba(0,0,0,.34); --page-image:url("assets/background-dark-v3.png?v=1"); --field:rgba(9,15,21,.84); --panel-hover:rgba(27,38,49,.9); --admin-surface:rgba(8,14,20,.48); }
* { letter-spacing:0 !important; }
body { font-family:"Manrope","Segoe UI",sans-serif; background-position:center top; background-size:cover; }
body::before { position:fixed; z-index:-1; inset:0; background:color-mix(in srgb,var(--page) 40%,transparent); content:""; backdrop-filter:saturate(.9); }
h1,h2,h3,.brand-mark,.profile-avatar,.admin-metrics strong { font-family:"Sora","Manrope",sans-serif; }
.app-shell { width:min(1320px,calc(100vw - 40px)); margin:14px auto 28px; }
.hero { position:relative; min-height:78px; padding:13px 16px; color:#f0f5f8; background:rgba(8,14,20,.92); border:1px solid rgba(185,210,225,.16); border-top:1px solid rgba(185,210,225,.16); border-radius:8px; box-shadow:0 16px 52px rgba(0,0,0,.22); backdrop-filter:blur(24px); }.hero::before { position:absolute; top:14px; bottom:14px; left:0; width:3px; background:var(--red); content:""; }.hero h1,.hero .panel-links a { color:#f0f5f8; }.hero .brand-lockup .eyebrow,.hero .panel-links a:not(:hover) { color:#9aabba; }
.brand-mark { width:42px; height:42px; border-radius:6px; font-size:13px; }.hero h1 { font-size:21px; }.eyebrow { font-size:9px; }.status-pill { min-height:50px; background:rgba(26,37,48,.9); border-color:rgba(185,210,225,.16); border-radius:6px; }.theme-toggle,.logout-button { min-height:50px; border-radius:6px; }
.intro-bar { grid-template-columns:125px 145px 155px minmax(0,1fr); min-height:64px; margin-top:10px; background:color-mix(in srgb,var(--surface) 86%,transparent); border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); backdrop-filter:blur(22px); }.intro-bar > div { padding:0 18px; }.intro-bar strong { font-family:"Sora",sans-serif; font-size:15px; }
.view-switcher { margin-top:14px; padding:4px; background:color-mix(in srgb,var(--surface) 88%,transparent); border-radius:7px; backdrop-filter:blur(18px); }.view-switcher button { min-height:38px; border-radius:5px; }.view-switcher button.is-active { background:var(--red); }
.dashboard { grid-template-columns:minmax(430px,1.08fr) minmax(390px,.92fr); gap:14px; margin-top:14px; }.side-stack { gap:14px; }.panel { background:color-mix(in srgb,var(--surface) 90%,transparent); border-color:var(--line); border-radius:8px; box-shadow:var(--shadow); backdrop-filter:blur(22px); }.panel-top { min-height:70px; padding:15px 18px; background:transparent; }.panel-top h2 { font-size:17px; }.badge,.mini-rule { border-radius:5px; }
.profile-avatar { border-radius:6px; box-shadow:none; }.profile-group,.profile-more,.group-icon-slot,.identity-box,.channel-config,.room-card,.password-editor,.message { border-radius:6px; }
select,input { min-height:42px; background:var(--field); border-radius:6px; }.big-field input { min-height:48px; }.field { color:var(--ink); }.primary-button,.danger-button { min-height:44px; border-radius:6px; }.primary-button { box-shadow:0 10px 28px color-mix(in srgb,var(--red) 20%,transparent); }.add-channel-button { border-radius:5px; }
.auth-panel { margin-top:14px; overflow:hidden; border-radius:8px; box-shadow:var(--shadow); }.auth-copy { background:rgba(8,14,20,.94); border-right:0; border-left:3px solid var(--red); }.auth-action { background:color-mix(in srgb,var(--surface) 94%,transparent); backdrop-filter:blur(22px); }.auth-copy h2 { font-size:26px; }
.admin-dashboard { gap:14px; margin-top:14px; }.admin-hero,.admin-metrics,.admin-section { border-radius:8px; }.admin-metrics { gap:8px; background:transparent; border:0; box-shadow:none; }.admin-metrics > div { background:color-mix(in srgb,var(--surface) 90%,transparent); border:1px solid var(--line); border-radius:7px; box-shadow:0 12px 35px rgba(20,38,52,.07); backdrop-filter:blur(18px); }.admin-section-head { min-height:70px; }.diagnostics-list article { min-height:72px; }.audit-item,.timeline-item { transition:background .18s ease; }
.temporary-block { color:var(--ink); border-top-color:var(--ink); }.temporary-block span { color:var(--muted); }
.site-footer { margin-top:20px; padding-top:22px; }
@media (max-width:980px) { .app-shell { width:min(100% - 24px,900px); }.dashboard { grid-template-columns:1fr; }.groups-panel,.profile-panel,.side-stack { grid-column:auto; grid-row:auto; }.profile-panel { order:-1; } }
@media (max-width:650px) { .app-shell { width:100%; margin-top:0; }.hero { border-right:0; border-left:0; border-radius:0; }.intro-bar { width:calc(100vw - 20px); min-width:0; max-width:calc(100vw - 20px); grid-template-columns:repeat(3,minmax(0,1fr)) !important; margin:8px 10px 0; overflow:hidden; }.intro-bar > div { min-width:0; padding:10px 8px; }.intro-bar strong,.intro-bar span { max-width:100%; overflow:hidden; text-overflow:ellipsis; }.intro-bar p { min-width:0; max-width:100%; padding:11px 10px; overflow-wrap:anywhere; }.view-switcher { margin-right:10px; margin-left:10px; }.dashboard,#admin-area,.auth-panel,.loading-panel { margin-right:10px; margin-left:10px; }.panel-top h2 { font-size:16px; }.group-card { grid-template-columns:1fr; }.group-choice { grid-column:1; }.auth-panel { border-radius:8px; }.admin-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }.site-footer { padding-right:12px; padding-left:12px; } }

/* LegendZ administration workspace v23 */
#admin-area { --admin-cyan:#26b5ca; --admin-amber:#d79519; --admin-red:var(--red); --admin-green:var(--green); }
.admin-dashboard { gap:16px; }
.admin-heading { position:relative; min-height:174px; overflow:hidden; padding:28px 30px; background:linear-gradient(112deg,#0a1118 0%,#101b25 58%,#16232d 100%); border:1px solid rgba(164,194,210,.16); border-radius:8px; box-shadow:0 24px 70px rgba(0,0,0,.24); isolation:isolate; }
.admin-heading::before { position:absolute; z-index:-1; top:-95px; right:20%; width:250px; height:250px; border:1px solid rgba(65,190,211,.14); border-radius:50%; box-shadow:0 0 0 38px rgba(65,190,211,.025),0 0 0 76px rgba(65,190,211,.018); content:""; }
.admin-heading::after { position:absolute; right:0; bottom:0; left:0; height:3px; background:linear-gradient(90deg,var(--admin-red) 0 18%,var(--admin-cyan) 18% 34%,var(--admin-green) 34% 48%,transparent 48%); content:""; }
.admin-heading-copy { position:relative; z-index:1; max-width:650px; }
.admin-heading-kicker { display:flex; align-items:center; gap:9px; margin:0 0 11px !important; color:#79d7e5 !important; font-size:9px !important; font-weight:850; text-transform:uppercase; }
.admin-heading-kicker > span { width:7px; height:7px; background:var(--admin-green); border-radius:50%; box-shadow:0 0 0 4px rgba(64,214,159,.1),0 0 16px rgba(64,214,159,.58); }
.admin-heading h2 { max-width:620px; margin:0 0 9px; font-size:30px; line-height:1.1; }
.admin-heading p:not(.admin-heading-kicker) { max-width:600px; color:#9fb0bd; font-size:12px; line-height:1.55; }
.admin-heading-side { position:relative; z-index:1; display:grid; min-width:300px; justify-items:end; gap:15px; }
.admin-command-state { display:flex; min-width:286px; align-items:center; gap:11px; padding:11px 13px; background:rgba(7,13,19,.5); border:1px solid rgba(164,194,210,.13); border-radius:6px; }
.command-state-dot { flex:0 0 auto; width:9px; height:9px; background:var(--admin-green); border-radius:50%; box-shadow:0 0 0 5px rgba(64,214,159,.08),0 0 18px rgba(64,214,159,.48); }
.admin-command-state > div { display:grid; gap:2px; }.admin-command-state strong { color:#eef6f8; font-size:10px; }.admin-command-state small { color:#8294a2; font-size:8px; }
.admin-heading-actions { justify-content:flex-end; }.readonly-badge,.refresh-button { min-height:38px; border-radius:5px; }.readonly-badge { color:#a9bac7; background:rgba(25,38,50,.82); border-color:rgba(164,194,210,.18); }.readonly-badge.is-manage { color:#ffe4e7; background:rgba(125,27,43,.3); border-color:rgba(255,85,105,.34); }
.refresh-button { display:inline-flex; align-items:center; gap:7px; padding:0 14px; box-shadow:0 9px 24px rgba(226,38,59,.2); }.refresh-button > span { font-size:15px; font-weight:500; }
.metric-strip { gap:8px; padding:0; background:transparent; border:0; border-radius:0; box-shadow:none; }
.metric-strip > .admin-metric { min-height:104px; padding:18px 18px 16px; background:color-mix(in srgb,var(--surface) 93%,transparent); border:1px solid var(--line); border-radius:7px; box-shadow:0 12px 36px rgba(17,29,39,.08); backdrop-filter:blur(20px); }
.metric-strip > .admin-metric::after { position:absolute; right:0; bottom:0; left:0; height:2px; background:var(--admin-green); opacity:.62; content:""; }.metric-strip > .admin-metric.has-alert::after { background:var(--admin-amber); }
.metric-index { position:absolute; top:15px; right:16px; color:color-mix(in srgb,var(--muted) 65%,transparent); font:750 8px "Sora",sans-serif; }
.metric-strip .metric-dot { position:static; width:7px; height:7px; margin-bottom:8px; }.metric-strip strong { font-family:"Sora","Manrope",sans-serif; font-size:20px; line-height:1.1; }.metric-strip small { margin-top:4px; color:var(--muted); font-size:9px; }
.admin-section { overflow:hidden; background:color-mix(in srgb,var(--surface) 94%,transparent); border:1px solid var(--line); border-radius:8px; box-shadow:0 16px 48px rgba(18,32,43,.09); backdrop-filter:blur(20px); }
.admin-section-head { min-height:76px; padding:16px 19px; background:linear-gradient(180deg,color-mix(in srgb,var(--surface-soft) 62%,transparent),transparent); }.admin-section-head h3 { margin-top:3px; font-size:16px; }.admin-section-head .eyebrow { color:var(--admin-cyan); }
.diagnostics-section { border-top:1px solid var(--line); }.diagnostics-section.is-pass { box-shadow:inset 0 3px var(--admin-green),0 16px 48px rgba(18,32,43,.09); }.diagnostics-section.is-warn { box-shadow:inset 0 3px var(--admin-amber),0 16px 48px rgba(18,32,43,.09); }.diagnostics-section.is-fail { box-shadow:inset 0 3px var(--admin-red),0 16px 48px rgba(18,32,43,.09); }
.compact-action,.mark-all-button,.alert-read-button,.table-action,.text-action,.inline-note-form button { border-radius:5px; }.compact-action { min-height:36px; padding:0 13px; }
.alert-filter-bar,.room-filter-bar,.audit-toolbar { gap:7px; padding:11px 18px; background:color-mix(in srgb,var(--surface-soft) 58%,transparent); }.alert-filter-bar button,.room-filter-bar button,.audit-toolbar button { min-height:34px; border:1px solid transparent; border-radius:5px; }.alert-filter-bar button.is-active,.room-filter-bar button.is-active,.audit-toolbar button.is-active { background:var(--field); border-color:var(--line-strong); box-shadow:inset 0 -2px var(--admin-red); }
.admin-alert { grid-template-columns:34px minmax(0,1fr) auto; gap:14px; min-height:82px; padding:15px 18px; }.admin-alert-mark { width:32px; height:32px; border-radius:6px; }.admin-alert.is-unread { background:color-mix(in srgb,var(--admin-red) 4%,var(--surface)); box-shadow:inset 3px 0 var(--admin-red); }.admin-alert p { font-size:10px; line-height:1.55; }.admin-alert small { font-size:8px; }
.operations-chart { height:205px; gap:7px; padding:28px 22px 13px; }.operations-bar { height:148px; }.operations-bar i { border-radius:3px 3px 0 0; }.operations-legend { padding:13px 20px 17px; }
.health-list { padding:7px 19px 14px; }.health-list > div { min-height:48px; }.health-list dt { font-size:9px; }.health-list dd { font-size:10px; }
.rate-list { padding:7px 19px 14px; }.rate-list > div { min-height:52px; }.rate-list b { min-width:34px; height:30px; border-radius:5px; }
.admin-table th { padding:11px 16px; background:color-mix(in srgb,var(--surface-soft) 78%,transparent); font-size:8px; }.admin-table td { height:54px; padding:12px 16px; font-size:10px; }.admin-table tbody tr { transition:background .16s ease; }
.room-status-list { padding:6px 19px 14px; }.room-status-list > div { min-height:66px; }.status-chip { min-height:27px; border-radius:5px; }
.incident-timeline { padding:8px 19px 14px 42px; }.incident-timeline::before { left:25px; }.incident-timeline article { padding:14px 0 15px 15px; }.timeline-node { left:-22px; border-radius:50%; }.staff-note,.timeline-body p { border-radius:0 5px 5px 0; }
.audit-toolbar { border-bottom:1px solid var(--line); }.audit-feed { max-height:610px; }.audit-entry { grid-template-columns:38px minmax(0,1fr); gap:14px; padding:15px 19px; }.audit-event-icon { width:34px; height:34px; border-radius:6px; }.audit-entry-title > strong { font-size:11px; }.audit-entry-meta { margin-top:1px; font-size:8px; }.audit-error-detail { margin-top:6px; padding:9px 11px; border-radius:0 5px 5px 0; }
.admin-updated { margin:0 4px; font-size:9px; }
.admin-command-bar { display:flex; align-items:center; gap:7px; overflow-x:auto; padding:9px; background:color-mix(in srgb,var(--surface) 94%,transparent); border:1px solid var(--line); border-radius:8px; box-shadow:0 12px 32px rgba(18,32,43,.07); }
.admin-command-bar > span,.admin-command-bar a { display:inline-flex; min-height:36px; flex:0 0 auto; align-items:center; gap:8px; padding:0 12px; color:var(--muted); background:var(--surface-soft); border:1px solid var(--line); border-radius:5px; font-size:10px; font-weight:800; text-decoration:none; }
.admin-command-bar > span { color:var(--ink); background:color-mix(in srgb,var(--red) 7%,var(--surface-soft)); border-color:color-mix(in srgb,var(--red) 22%,var(--line)); }.admin-command-bar b { color:var(--red); font-size:11px; }.admin-command-bar a:hover { color:var(--ink); border-color:var(--admin-cyan); }
.room-tools { display:grid; grid-template-columns:minmax(250px,1fr) auto; align-items:center; gap:10px; padding:11px 18px; background:color-mix(in srgb,var(--surface-soft) 58%,transparent); border-bottom:1px solid var(--line); }.room-tools .room-filter-bar { padding:0; background:transparent; }.admin-search { display:grid; min-height:38px; grid-template-columns:30px minmax(0,1fr); align-items:center; background:var(--field); border:1px solid var(--line-strong); border-radius:5px; }.admin-search > span { color:var(--admin-cyan); font-size:17px; text-align:center; }.admin-search input { width:100%; min-width:0; height:36px; padding:0 10px 0 0; color:var(--ink); background:transparent; border:0; outline:0; font-size:11px; }.admin-search:focus-within { border-color:var(--admin-cyan); box-shadow:0 0 0 3px color-mix(in srgb,var(--admin-cyan) 12%,transparent); }
.auth-code-status { display:flex; min-height:36px; align-items:center; gap:9px; padding:0 11px; color:var(--muted); background:var(--surface-soft); border:1px solid var(--line); border-radius:5px; font-size:10px; }.auth-code-status > span { color:var(--green); }.auth-code-status.is-expired { color:var(--red); border-color:color-mix(in srgb,var(--red) 32%,var(--line)); }.auth-code-status.is-expired > span { color:var(--red); }
.admin-table th { font-size:10px; }.admin-table td { font-size:12px; }.audit-entry-title > strong { font-size:12px; }.audit-entry-meta,.admin-updated { font-size:10px; }.admin-alert p,.health-list dd,.rate-list span { font-size:11px; }
html[data-theme="dark"] .metric-strip > .admin-metric,html[data-theme="dark"] .admin-section { box-shadow:0 18px 52px rgba(0,0,0,.22); }
@media (max-width:900px) { .admin-heading { align-items:flex-start; flex-direction:column; }.admin-heading-side { width:100%; min-width:0; grid-template-columns:minmax(0,1fr) auto; align-items:center; justify-items:stretch; }.admin-command-state { min-width:0; }.admin-heading-actions { justify-self:end; } }
@media (max-width:650px) { body { overflow-x:hidden; } #admin-area { width:calc(100vw - 20px); max-width:calc(100vw - 20px); }.admin-dashboard,.admin-dashboard > *,.admin-heading-copy,.admin-heading-side,.admin-command-state,.admin-heading-actions { min-width:0; max-width:100%; }.admin-dashboard { gap:11px; }.admin-heading { min-height:0; padding:22px 19px; }.admin-heading::before { right:-110px; }.admin-heading h2 { font-size:22px; overflow-wrap:anywhere; }.admin-heading-side { grid-template-columns:1fr; }.admin-command-state { width:100%; box-sizing:border-box; }.admin-heading-actions { display:grid; width:100%; grid-template-columns:minmax(0,1fr) minmax(0,1fr); justify-self:stretch; }.readonly-badge,.refresh-button { min-width:0; justify-content:center; padding-right:8px; padding-left:8px; font-size:8px; }.metric-strip { gap:7px; }.metric-strip > .admin-metric { min-height:94px; padding:15px; }.metric-strip .metric-index { top:13px; right:13px; }.metric-strip strong { font-size:17px; }.admin-section-head { min-height:68px; padding:14px 15px; }.admin-section-head > div { min-width:0; }.admin-section-head h3 { overflow-wrap:anywhere; }.diagnostics-section .admin-section-head .compact-action { flex:0 1 44%; min-width:0; padding-right:8px; padding-left:8px; white-space:normal; }.alert-filter-bar,.room-filter-bar,.audit-toolbar { padding:9px 12px; overflow-x:auto; flex-wrap:nowrap; }.alert-filter-bar button,.room-filter-bar button,.audit-toolbar button { flex:0 0 auto; }.admin-alert { grid-template-columns:30px minmax(0,1fr); padding:13px 14px; }.admin-alert-mark { width:29px; height:29px; }.operations-chart { gap:3px; }.admin-table th,.admin-table td { padding-right:13px; padding-left:13px; }.audit-entry { grid-template-columns:32px minmax(0,1fr); gap:11px; padding:13px 14px; }.audit-event-icon { width:31px; height:31px; } }
@media (max-width:650px) { .room-tools { grid-template-columns:1fr; padding:10px 12px; }.room-tools .room-filter-bar { padding:0; }.admin-command-bar { border-radius:0; }.admin-search input { font-size:12px; } }

/* Room ownership workspace v24 */
.owner-room-card { position:relative; background:linear-gradient(155deg,color-mix(in srgb,var(--surface) 96%,transparent),color-mix(in srgb,var(--surface-soft) 91%,transparent)); border-color:var(--line-strong); box-shadow:0 18px 48px rgba(18,32,43,.11); }
.owner-room-command { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:20px 20px 17px; border-bottom:1px solid var(--line); }
.owner-room-command h3 { margin:4px 0 6px; font-size:20px; line-height:1.2; }.owner-room-command > div:first-child > span { color:var(--muted); font-size:9px; }
.owner-room-actions { display:grid; flex:0 0 auto; justify-items:end; gap:9px; }.owner-room-actions .secondary-button { min-height:37px; padding:0 14px; border-radius:5px; font-size:9px; font-weight:850; }
.manage-room-hint { display:inline-flex; max-width:220px; align-items:center; gap:8px; color:var(--muted); font-size:8px; font-weight:750; line-height:1.4; text-align:right; }.manage-room-hint i { display:grid; flex:0 0 auto; width:25px; height:25px; place-items:center; color:#fff; background:var(--red); border-radius:5px; font-style:normal; }
.owner-manage-button { display:inline-grid; min-height:40px; grid-template-columns:20px minmax(0,1fr) 16px; align-items:center; gap:7px; padding:0 12px; color:#fff; background:linear-gradient(135deg,var(--red),var(--red-dark)); border:1px solid color-mix(in srgb,var(--red) 72%,#fff); border-radius:6px; box-shadow:0 10px 26px color-mix(in srgb,var(--red) 24%,transparent); font-size:9px; font-weight:900; cursor:pointer; transition:transform .16s ease,box-shadow .16s ease; }.owner-manage-button:hover { transform:translateY(-1px); box-shadow:0 14px 32px color-mix(in srgb,var(--red) 32%,transparent); }.owner-manage-button > span { font-size:13px; }.owner-manage-button > b { font-size:12px; }
.owner-state { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:8px; font-weight:850; text-transform:uppercase; }.owner-state i { width:7px; height:7px; background:#8895a1; border-radius:50%; }.owner-state.is-online { color:var(--green); }.owner-state.is-online i { background:var(--green); box-shadow:0 0 0 4px color-mix(in srgb,var(--green) 12%,transparent),0 0 14px color-mix(in srgb,var(--green) 48%,transparent); }
.owner-room-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-bottom:1px solid var(--line); }.owner-room-metrics > div { display:grid; gap:3px; padding:14px 17px; border-right:1px solid var(--line); }.owner-room-metrics > div:last-child { border-right:0; }.owner-room-metrics span { color:var(--muted); font-size:8px; font-weight:800; text-transform:uppercase; }.owner-room-metrics strong { font-family:"Sora",sans-serif; font-size:15px; }.owner-room-metrics small { color:var(--muted); font-size:8px; }
.legacy-room-note { display:flex; align-items:center; gap:11px; margin:14px 17px 0; padding:11px 12px; color:var(--ink); background:color-mix(in srgb,var(--blue) 7%,var(--surface-soft)); border:1px solid color-mix(in srgb,var(--blue) 24%,var(--line)); border-left:3px solid var(--blue); }.legacy-room-note > span { color:var(--blue); font-size:18px; }.legacy-room-note > div { display:grid; gap:2px; }.legacy-room-note strong { font-size:9px; }.legacy-room-note small { color:var(--muted); font-size:8px; }
.owner-channel-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:14px 17px 17px; }.owner-channel-grid article { display:grid; min-width:0; min-height:58px; grid-template-columns:28px minmax(0,1fr) 17px; align-items:center; gap:10px; padding:10px 11px; background:var(--field); border:1px solid var(--line); border-radius:6px; }.owner-channel-index { color:var(--muted); font:750 8px "Sora",sans-serif; }.owner-channel-grid article > div { min-width:0; }.owner-channel-grid strong { display:block; overflow:hidden; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }.owner-channel-grid small { display:block; margin-top:3px; color:var(--muted); font-size:8px; }.owner-channel-security { color:var(--green); font-size:13px; }.owner-channel-security.is-locked { color:#d79519; }
.owner-editor { border-top:1px solid var(--line-strong); background:color-mix(in srgb,var(--surface-soft) 68%,transparent); }.owner-editor-intro { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:3px; }.owner-editor-intro > div { display:grid; gap:3px; }.owner-editor-intro strong { font-size:11px; }.owner-editor-intro > span { color:var(--muted); font-size:8px; font-weight:850; }
.recovery-section { grid-column:1/-1; box-shadow:inset 0 3px var(--admin-cyan),0 16px 48px rgba(18,32,43,.09); }.recovery-layout { display:grid; grid-template-columns:minmax(230px,.8fr) minmax(440px,1.4fr); gap:18px; padding:19px; }.recovery-explainer { display:flex; gap:13px; padding:15px; background:linear-gradient(135deg,#0d1720,#162631); border:1px solid rgba(97,198,215,.2); border-radius:7px; }.recovery-symbol { display:grid; flex:0 0 auto; width:38px; height:38px; place-items:center; color:#071116; background:#54cfe0; border-radius:6px; font-size:20px; font-weight:950; }.recovery-explainer strong { color:#f1f7f9; font-size:11px; }.recovery-explainer p { margin:6px 0 0; color:#9fb1bd; font-size:9px; line-height:1.55; }
.recovery-form { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto; align-items:end; gap:10px; }.recovery-form .primary-button { min-width:150px; padding:0 14px; }.recovery-current { display:grid; grid-column:1/-1; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; padding:10px 12px; background:var(--surface-soft); border:1px solid var(--line); border-radius:6px; }.recovery-current span,.recovery-current small { color:var(--muted); font-size:8px; }.recovery-current strong { font-size:10px; }.recovery-safeguards { display:flex; grid-column:1/-1; flex-wrap:wrap; gap:7px; padding-top:2px; }.recovery-safeguards span { display:inline-flex; align-items:center; gap:7px; min-height:31px; padding:0 10px; color:var(--muted); background:var(--surface-soft); border:1px solid var(--line); border-radius:5px; font-size:8px; }.recovery-safeguards b { color:var(--admin-cyan); font:750 8px "Sora",sans-serif; }
html[data-theme="dark"] .owner-room-card { box-shadow:0 20px 60px rgba(0,0,0,.26); }
@media (max-width:980px) { .recovery-layout { grid-template-columns:1fr; }.recovery-form { grid-template-columns:1fr 1fr; }.recovery-form .primary-button { grid-column:1/-1; }.recovery-current { grid-column:1/-1; } }
@media (max-width:650px) { .manage-room-hint { display:none; }.owner-room-command { flex-direction:column; padding:16px; }.owner-room-actions { width:100%; grid-template-columns:1fr; align-items:stretch; justify-items:stretch; }.owner-manage-button { width:100%; }.owner-room-metrics { grid-template-columns:1fr; }.owner-room-metrics > div { grid-template-columns:minmax(0,1fr) auto; align-items:center; border-right:0; border-bottom:1px solid var(--line); }.owner-room-metrics > div:last-child { border-bottom:0; }.owner-room-metrics small { grid-column:1/-1; }.owner-channel-grid { grid-template-columns:1fr; padding:12px; }.legacy-room-note { margin:12px 12px 0; }.owner-editor-intro { align-items:flex-start; flex-direction:column; }.recovery-layout { gap:12px; padding:14px; }.recovery-form { grid-template-columns:1fr; }.recovery-form .primary-button,.recovery-current { grid-column:1; }.recovery-current { grid-template-columns:1fr auto; }.recovery-current small { grid-column:1/-1; }.recovery-safeguards { display:grid; }.recovery-safeguards span { width:100%; box-sizing:border-box; } }
