/* Mono II — monochrome theme on top of the legacy styles (palette literals are
   recoloured server-side by mono_theme.py; this sheet sets tokens, fonts, shapes). */
@font-face { font-family: 'Commissioner'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/ui-fonts/commissioner-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Commissioner'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/ui-fonts/commissioner-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(/ui-fonts/unbounded-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(/ui-fonts/unbounded-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Roboto Mono'; font-style: normal; font-display: swap; font-weight: 100 700;
  src: url(/ui-fonts/roboto-mono-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Roboto Mono'; font-style: normal; font-display: swap; font-weight: 100 700;
  src: url(/ui-fonts/roboto-mono-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@layer boxpoint-mono {
html:root {
  --mono-bg: #000; --mono-s1: #0a0a0a; --mono-s2: #121212; --mono-s3: #1a1a1a; --mono-s4: #222;
  --mono-line: #1c1c1c; --mono-line-2: #2a2a2a; --mono-line-3: #3a3a3a;
  --mono-text: #f5f5f4; --mono-text-2: #b3b3b0; --mono-text-3: #8a8a87; --mono-text-4: #5c5c5a;
  --mono-ok: #7fd1a8; --mono-warn: #e6c37a; --mono-bad: #e88b8b;
  --mono-font: 'Commissioner', 'Segoe UI', Roboto, system-ui, sans-serif;
  --mono-display: 'Unbounded', 'Commissioner', 'Segoe UI', sans-serif;
  --mono-code: 'Roboto Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --bg-color: #000 !important;
  --accent-color: #f5f5f4 !important;
  --accent-hover: #fff !important;
  --text-main: #f5f5f4 !important;
  --text-color: #f5f5f4 !important;
  --text-muted: #8a8a87 !important;
  --border-color: rgba(255, 255, 255, 0.08) !important;
  --border-strong: rgba(255, 255, 255, 0.14) !important;
  --danger: #e88b8b !important; --danger-text: #e88b8b !important;
  --success: #7fd1a8 !important; --success-text: #7fd1a8 !important;
  --warning: #e6c37a !important;
  --control-rgb: 245, 245, 244;
  --glass-chrome-bg: rgba(14, 14, 14, 0.72) !important;
  --glass-scrim-bg: transparent !important;
  --glass-popover-fill: rgba(18, 18, 18, 0.96) !important;
  --glass-border: rgba(255, 255, 255, 0.1) !important;
  --glass-inset: rgba(255, 255, 255, 0.04) !important;
  --glass-window-dim: rgba(0, 0, 0, 0.5) !important;
  --ink-bg: #0a0a0a !important;
  --panel-card-bg: #0a0a0a !important;
  --page-glow: #000 !important;
  --card-contour-shadow: none !important;
  color-scheme: dark;
}
html:root, html:root body { background: #000 !important; }
html:root body { font-family: var(--mono-font) !important; color: var(--mono-text); -webkit-font-smoothing: antialiased; }
html:root body :is(button, input, textarea, select, .nav-label) { font-family: inherit; }
html:root body :is(code, pre, kbd, samp, .xterm, .xterm *, .admin-log-line, .admin-logs-output) { font-family: var(--mono-code) !important; }
html:root body ::selection { background: #f5f5f4; color: #000; }
html:root body #pageParticleField, html:root body .glass-accent { display: none !important; }

/* Headings and window titles in the display face. */
html:root body :is(.panel-window-title, .auth-card h1, .auth-card h2, .modal-title, .modal-content h2, .modal-content h3:not(.note-title)) {
  font-family: var(--mono-display) !important; font-weight: 500 !important; letter-spacing: -0.01em; text-transform: none;
}

/* Primary actions: white pill, black label. */
html:root body :is(.admin-perms-save, .admin-logs-btn:not(.is-ghost), .confirm-ok.is-primary, .notes-save-btn, .notes-modal-btn.primary, .scp-modal-btn.primary, .chat-avatar.is-saved, .chat-unread-badge, .chat-msg-check.is-on, .chat-admin-check, .auth-card button[type="submit"], form button[type="submit"]) {
  background: #f5f5f4 !important; background-image: none !important; color: #000 !important; border-color: #f5f5f4 !important;
}
html:root body :is(.admin-perms-save, .admin-logs-btn:not(.is-ghost), .confirm-ok.is-primary, .notes-save-btn, .notes-modal-btn.primary, .scp-modal-btn.primary, .auth-card button[type="submit"], form button[type="submit"]):not(:disabled):hover {
  background: #fff !important; color: #000 !important; box-shadow: none !important;
}
html:root body :is(.admin-logs-btn, .revoked-btn, .confirm-ok, .chat-confirm-ok).is-ghost {
  background: transparent !important; color: var(--mono-text) !important; border: 1px solid var(--mono-line-2) !important;
}
html:root body :is(.admin-logs-btn, .revoked-btn, .confirm-ok, .chat-confirm-ok).is-ghost:not(:disabled):hover { background: var(--mono-s2) !important; border-color: var(--mono-line-3) !important; }
html:root body :is(.chat-msg-check.is-on, .chat-admin-check) svg { color: #000 !important; stroke: #000 !important; }

/* Focus ring and range/progress accents. */
html:root body :focus-visible { outline-color: #f5f5f4; }
html:root body progress { accent-color: #f5f5f4; }
}

/* Shapes and type — second block, same theme layer. */
@layer boxpoint-mono {
  /* Buttons: sentence case, pill radius. */
  html:root body :is(.card-action-btn, .admin-tech-btn, .admin-perms-save, .revoked-btn, .choice-btn, .confirm-ok, .chat-confirm-ok,
      .admin-logs-btn, .ai-document-action, .notes-save-btn, .notes-modal-btn, .scp-modal-btn, .connect-btn, .disconnect-btn,
      .admin-perms-preset, .admin-perms-extend-custom, .media-capture-choice, .auth-card button[type="submit"]) {
    text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; border-radius: 999px !important;
  }
  html:root body :is(.card-action-btn, .admin-tech-btn, .revoked-btn.is-ghost, .choice-btn, .notes-modal-btn:not(.primary), .scp-modal-btn:not(.primary), .admin-perms-preset) {
    background: transparent !important; border: 1px solid var(--mono-line-2) !important; color: var(--mono-text) !important;
  }
  html:root body :is(.card-action-btn, .revoked-btn, .confirm-ok, .choice-btn):is(.danger, .is-danger, [class*="danger"], [class*="revoke"]) {
    color: var(--mono-bad) !important; border-color: rgba(232, 139, 139, 0.35) !important;
  }
  /* Universal hover: soft dark fill + subtle line + crisp text, zero glow across ALL controls and cards */
  html:root body :is(
    .card-action-btn, .admin-tech-btn, .choice-btn, .confirm-ok:not(.is-primary), .chat-confirm-ok,
    .revoked-btn:not(.solid), .admin-perms-preset:not(.is-active):not([aria-pressed="true"]),
    .confirm-actions button:not(.is-primary), .m-dialog-actions button:not(.solid),
    .chat-confirm-actions button, .m-dialog-status button:not(.solid),
    .confirm-card button:not(.is-primary), .choice-card button, .revoked-card button:not(.solid),
    .m-btn:not(.solid), .admin-logs-btn:is(.is-ghost, :not(.primary)), .notes-modal-btn:not(.primary),
    .scp-modal-btn:not(.primary), .connect-btn:not(.primary), .disconnect-btn, .panel-head-icon-btn,
    .admin-perms-extend-custom, .media-capture-choice, .revoke-btn, .unblock-btn, .close-btn,
    .admin-link-card, .admin-tech-item, .admin-perms-extend-card, .admin-push-target, .admin-alert-item.is-journal-link,
    .admin-stat-card, .admin-session-card, .admin-journal-card, .admin-metric-card,
    .file-item, .note-item, .notes-create-cta, .scp-drop, .scp-mkdir-btn,
    .ai-history-item:not(.is-active), .ai-jump-item:not(.is-active), .ai-model-option:not(.is-active),
    .server-dropdown-option:not(.is-active), .panel-head-menu-item, .ai-attach-option,
    .ai-rag-knowledge-card, .ai-rag-batch-row, .m-rag-card, .m-rag-tag-chip:not(.is-active),
    .admin-perm-chip:not(.is-active), .admin-tab:not(.is-active),
    .m-chip:not(.is-on):not(.is-active), .m-hbtn, .m-find, .ai-msg-action, .ai-composer-icon-btn
  ):not(:disabled):hover,
  html:root body :is(
    .card-action-btn, .revoked-btn, .confirm-ok, .choice-btn
  ):is(.danger, .is-danger, [class*="danger"], [class*="revoke"]):not(:disabled):hover {
    background: var(--mono-s4) !important;
    border-color: var(--mono-line-3) !important;
    color: var(--mono-text) !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
  }
  /* Kill all remaining glows / box-shadows on hover/active/focus throughout the entire site */
  html:root body :is(
    button, [role="button"], a.nav-btn, .admin-stat-card, .admin-session-card, .admin-journal-card,
    .admin-metric-card, .admin-tech-item, .admin-link-card, .admin-push-target, .admin-alert-item,
    .file-item, .note-item, .notes-create-cta, .scp-drop, .scp-mkdir-btn, .ai-history-item, .ai-jump-item,
    .ai-rag-knowledge-card, .ai-rag-batch-row, .m-rag-card, .admin-tab, .admin-perm-chip,
    .choice-btn, .confirm-ok, .chat-confirm-ok, .revoked-btn, .card-action-btn, .m-btn, .m-chip
  ):is(:hover, :focus-visible, :active) {
    box-shadow: none !important;
  }
  html:root body .admin-perms-preset:is(.active, .is-active, [aria-pressed="true"]) { background: #f5f5f4 !important; color: #000 !important; border-color: #f5f5f4 !important; }

  /* Small labels: mono caps, quiet. */
  html:root body :is(.admin-stat-label, .admin-metric-kicker, .admin-table th, .admin-proc-head, .admin-metric-foot-label, .admin-ai-quota-head,
      .admin-perms-group-title, .admin-push-targets-label, .admin-logs-field-label, .ai-attach-option-label, .chat-admin-selected-label,
      .admin-metric-net-kpi-label, .ai-older-turns, #aiRagViewHome .ai-rag-batch-group) {
    font-family: var(--mono-code) !important; font-size: 11px !important; letter-spacing: 0.08em !important; color: var(--mono-text-3) !important; font-weight: 500 !important;
  }
  /* Titles: display face, no caps. */
  html:root body :is(.panel-window-title, .terminal-title, .modal-header h3, .section-title, .admin-metric-title, .admin-alert-title,
      .revoked-title, .choice-title, .ai-denied-title, .chat-denied-title, .admin-logs-title, .ai-sheet-title) {
    font-family: var(--mono-display) !important; text-transform: none !important; letter-spacing: -0.01em !important; font-weight: 500 !important;
  }
  /* Badges and chips: mono pills. */
  html:root body :is(.status-badge, .admin-session-badge, .admin-logs-badge, .ai-msg-badge, .glass-chip) {
    font-family: var(--mono-code) !important; letter-spacing: 0.04em !important; border-radius: 999px !important;
  }

  /* Cards and windows. */
  html:root body :is(.admin-stat-bar, .file-item, .note-item,
      .notes-create-cta, .scp-drop, .scp-mkdir-btn, .admin-link-card, .admin-tech-item, .admin-perms-extend-card) {
    border-radius: 22px !important;
  }
  html:root body #scpManagerContainer .scp-body :is(.file-item, .scp-drop, .scp-mkdir-btn),
  html:root body #notesManagerContainer .notes-panel-body :is(.note-item, .notes-create-cta) {
    background: var(--mono-s1) !important; border: 1px solid var(--mono-line) !important; box-shadow: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  @media (hover: hover) and (pointer: fine) {
    html:root body #scpManagerContainer .scp-body :is(.file-item, .scp-drop, .scp-mkdir-btn):not(:disabled):hover,
    html:root body #notesManagerContainer .notes-panel-body :is(.note-item, .notes-create-cta):not(:disabled):hover {
      background: var(--mono-s4) !important;
      border-color: var(--mono-line-3) !important;
      color: var(--mono-text) !important;
      box-shadow: none !important;
    }
  }

  /* Inputs: black field, quiet border, white focus. */
  html:root body :is(input[type="text"], input[type="search"], input[type="url"], input[type="password"], input[type="number"], input:not([type]), textarea, select):not(.xterm-helper-textarea) {
    caret-color: #f5f5f4;
  }
}

@layer boxpoint-mono {
  /* Admin Sessions / Blocks / Metrics: segmented control with a white sliding pill. */
  html:root body .admin-tabs { background: var(--mono-s1) !important; border: 1px solid var(--mono-line-2) !important; border-radius: 22px !important; box-shadow: none !important; }
  html:root body .admin-tab-pill { background: #f5f5f4 !important; border: 0 !important; border-radius: 18px !important; box-shadow: none !important; z-index: 0 !important; }
  html:root body .admin-tab { position: relative; z-index: 1; color: var(--mono-text-3) !important; background: transparent !important; border-color: transparent !important; box-shadow: none !important; border-radius: 18px !important; }
  html:root body .admin-tab:not(.is-active):hover { color: var(--mono-text) !important; }
  html:root body .admin-tab.is-active { background: #f5f5f4 !important; }
  html:root body .admin-tab.is-active, html:root body .admin-tab.is-active * { color: #000 !important; }
  html:root body .admin-perm-chip { border-radius: 999px !important; font-family: var(--mono-code) !important; letter-spacing: 0.02em; }
  html:root body .chat-admin-chip.is-active {
    background: #f5f5f4 !important; color: #000 !important; border-color: #f5f5f4 !important;
  }
}

@layer boxpoint-mono {
  /* Menu tiles (model picker, server/service dropdowns, burger menus): near-solid black glass. */
  html:root body :is(.ai-model-option, .server-dropdown-option, .panel-head-menu-item, .ai-attach-option) {
    background-color: rgba(16, 16, 16, 0.94) !important; border: 1px solid var(--mono-line-2) !important;
    backdrop-filter: blur(14px) !important; -webkit-backdrop-filter: blur(14px) !important;
  }
  html:root body :is(.ai-model-option, .server-dropdown-option, .panel-head-menu-item, .ai-attach-option):not(:disabled):hover { background-color: rgba(30, 30, 30, 0.96) !important; border-color: var(--mono-line-3) !important; }
  html:root body :is(.ai-model-option, .server-dropdown-option).is-active { border-color: rgba(245, 245, 244, 0.55) !important; }
  html:root body .server-dropdown-option.is-active:hover { background: rgba(30, 30, 30, 0.96) !important; color: var(--mono-text) !important; }
}

@layer boxpoint-mono {
  /* Switches: off = dark track, on = white track with a black knob. */
  html:root body .admin-perm-toggle-track { background: var(--mono-s4) !important; border: 1px solid var(--mono-line-3) !important; }
  html:root body .admin-perm-toggle-knob { background: var(--mono-text-3) !important; top: 2px !important; left: 2px !important; }
  html:root body .admin-perm-toggle-track:has(input:checked) { background: #f5f5f4 !important; border-color: #f5f5f4 !important; }
  html:root body .admin-perm-toggle-track input:checked + .admin-perm-toggle-knob { background: #000 !important; }
  html:root body .admin-perm-toggle-track:has(input:disabled) { opacity: 0.45; }
}


