/* ============================================================
   Windows 3.x — classic Program Manager / Win3 look
   Solid navy title bars, thick borders, flat gray, less bevel than 95
   ============================================================ */

html[data-theme="win3x"] {
  --w3-face: #c0c0c0;
  --w3-white: #ffffff;
  --w3-black: #000000;
  --w3-navy: #000080;
  --w3-desktop: #808080;
  --w3-window: #ffffff;
  --w3-hilite: #000080;

  --bg: #dfdfdf;
  --panel: var(--w3-face);
  --ink: #000000;
  --muted: #404040;
  --line: #000000;
  --accent: #000080;
  --accent-2: #000080;
  --accent-dark: #000060;
  --accent-soft: #c0c0c0;
  --bubble-in: #ffffff;
  --bubble-out: #ffffcc;
  --bubble-out-ink: #000000;
  --shadow: none;
  --chat-bg-top: #ffffff;
  --chat-bg-bot: #ffffff;
  --glow: none;
  --glow-strong: none;
  --input-glow: transparent;
  --danger: #800000;
  --radius-bubble: 0;
  --chip-pressed: #808080;
  --select-fill: #000080;
  --online: #00ff00;
  --font: "Tahoma", "MS Sans Serif", "Segoe UI", sans-serif;
  --neon-spread: 0.15;
  --sidebar-texture: none;
}

html[data-theme="win3x"] body {
  font-family: "Tahoma", "MS Sans Serif", "Segoe UI", sans-serif !important;
  font-size: calc(0.92rem * var(--font-scale, 1));
  background: var(--w3-desktop) !important;
  color: #000;
}

html[data-theme="win3x"] .app-shell {
  background: var(--w3-desktop) !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  gap: 0.5rem;
  padding: 0.5rem;
  overflow: hidden !important;
}

html[data-theme="win3x"] .sidebar,
html[data-theme="win3x"] .chat-pane,
html[data-theme="win3x"] .auth-card,
html[data-theme="win3x"] .card,
html[data-theme="win3x"] .console-nav,
html[data-theme="win3x"] .console-main,
html[data-theme="win3x"] .ui-dialog,
html[data-theme="win3x"] .info-panel,
html[data-theme="win3x"] .me-chip,
html[data-theme="win3x"] .composer,
html[data-theme="win3x"] .new-menu,
html[data-theme="win3x"] .emoji-panel,
html[data-theme="win3x"] .msg-ctx,
html[data-theme="win3x"] .send-menu,
html[data-theme="win3x"] .pinned-bar {
  border-radius: 0 !important;
  background: var(--w3-face) !important;
  border: 2px solid #000 !important;
  box-shadow: 2px 2px 0 #000 !important;
  backdrop-filter: none !important;
}

html[data-theme="win3x"] .chat-pane {
  display: grid !important;
  grid-template-rows: auto 1fr auto auto !important;
  min-height: 0;
}
html[data-theme="win3x"] .messages-stage {
  min-height: 0;
  overflow: hidden;
  background: #fff;
}
html[data-theme="win3x"] .messages-stage::before {
  display: none !important;
}
html[data-theme="win3x"] .composer-wrap {
  background: var(--w3-face);
  flex-shrink: 0;
}

html[data-theme="win3x"] .sidebar-header,
html[data-theme="win3x"] .chat-header,
html[data-theme="win3x"] .console-brand,
html[data-theme="win3x"] .info-panel > header,
html[data-theme="win3x"] .ui-dialog h3 {
  background: var(--w3-navy) !important;
  color: #fff !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  font-weight: 700;
  text-shadow: none !important;
  padding: 0.3rem 0.5rem;
}

html[data-theme="win3x"] .brand,
html[data-theme="win3x"] #chat-title,
html[data-theme="win3x"] .console-brand h2 {
  color: #fff !important;
  font-family: "Tahoma", "MS Sans Serif", sans-serif !important;
  text-shadow: none !important;
  font-size: 0.95rem !important;
  font-weight: 700;
  text-transform: none;
}
html[data-theme="win3x"] .auth-card h1 {
  color: var(--w3-navy) !important;
  text-shadow: none !important;
}
html[data-theme="win3x"] .chat-subtitle,
html[data-theme="win3x"] .console-brand .console-sub {
  color: #d0d0ff !important;
}
html[data-theme="win3x"] .me-chip-text strong {
  color: #000 !important;
  text-transform: none;
}
html[data-theme="win3x"] #me-user,
html[data-theme="win3x"] .me-chip-text .muted {
  color: #008000 !important;
  text-transform: none !important;
}

html[data-theme="win3x"] input,
html[data-theme="win3x"] textarea,
html[data-theme="win3x"] select,
html[data-theme="win3x"] .search-wrap input,
html[data-theme="win3x"] #message-input,
html[data-theme="win3x"] .messages {
  border-radius: 0 !important;
  background: #fff !important;
  border: 2px solid #000 !important;
  box-shadow: none !important;
  color: #000 !important;
  font-family: "Tahoma", "MS Sans Serif", sans-serif !important;
  text-transform: none;
}
html[data-theme="win3x"] .messages {
  margin: 0.35rem;
  background: #fff !important;
}

html[data-theme="win3x"] .btn-primary,
html[data-theme="win3x"] .btn-ghost,
html[data-theme="win3x"] .icon-btn,
html[data-theme="win3x"] .send-btn,
html[data-theme="win3x"] .chip,
html[data-theme="win3x"] .tab,
html[data-theme="win3x"] .theme-opt,
html[data-theme="win3x"] .info-action {
  border-radius: 0 !important;
  background: var(--w3-face) !important;
  color: #000 !important;
  border: 2px solid #000 !important;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #808080 inset !important;
  filter: none !important;
  text-shadow: none !important;
}
html[data-theme="win3x"] .chip.active,
html[data-theme="win3x"] .tab.active,
html[data-theme="win3x"] .theme-opt.active,
html[data-theme="win3x"] .send-btn.has-text,
html[data-theme="win3x"] .btn-primary {
  background: #fff !important;
  box-shadow: -1px -1px 0 #fff inset, 1px 1px 0 #808080 inset !important;
}
html[data-theme="win3x"] .send-btn {
  width: auto !important;
  height: auto !important;
  padding: 0.5rem 0.85rem !important;
  white-space: nowrap;
}
html[data-theme="win3x"] .send-btn .send-ico-default { display: none !important; }
html[data-theme="win3x"] .send-btn .send-label-pixel {
  display: inline !important;
  font-family: "Tahoma", "MS Sans Serif", sans-serif !important;
}

html[data-theme="win3x"] .chat-list li button {
  border-radius: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #000 !important;
}
html[data-theme="win3x"] .chat-list li button.active {
  background: var(--w3-navy) !important;
  color: #fff !important;
}
html[data-theme="win3x"] .chat-list li button.active strong,
html[data-theme="win3x"] .chat-list li button.active .preview,
html[data-theme="win3x"] .chat-list li button.active .chat-item-meta {
  color: #fff !important;
  text-shadow: none !important;
}
html[data-theme="win3x"] .chat-list li button strong {
  color: #000 !important;
  text-shadow: none !important;
  font-size: 0.9rem !important;
  text-transform: none;
}
html[data-theme="win3x"] .chat-unread-badge {
  border-radius: 0 !important;
  background: #800000 !important;
  color: #fff !important;
  border: 1px solid #000 !important;
  box-shadow: none !important;
}

html[data-theme="win3x"] .messages .row .bubble:not(.deleted) {
  border-radius: 0 !important;
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #000 !important;
  box-shadow: none !important;
  filter: none !important;
}
html[data-theme="win3x"] .messages .row.mine .bubble:not(.deleted) {
  background: #ffffcc !important;
}
html[data-theme="win3x"] .messages .row .sender-name,
html[data-theme="win3x"] .messages .row.mine .sender-name {
  color: var(--neon, var(--w3-navy)) !important;
  text-shadow: none !important;
  font-weight: 700;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  text-transform: none;
}
html[data-theme="win3x"] .day-sep {
  border-radius: 0 !important;
  background: var(--w3-face) !important;
  color: #000 !important;
  border: 1px solid #000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html[data-theme="win3x"] .avatar,
html[data-theme="win3x"] .avatar-wrap,
html[data-theme="win3x"] .avatar-img { border-radius: 0 !important; }
html[data-theme="win3x"] .avatar:not(.has-img) {
  background-image: none !important;
  background-color: var(--av, #808080) !important;
  text-shadow: none !important;
  border: 1px solid #000;
}
html[data-theme="win3x"] .avatar:not(.has-img)::after { display: none !important; }
html[data-theme="win3x"] .avatar-wrap::after,
html[data-theme="win3x"] #chat-avatar-wrap::after {
  border-radius: 0 !important;
  box-shadow: 0 0 0 1px #000 !important;
}
html[data-theme="win3x"] .status-dot {
  border-radius: 0 !important;
  border: 1px solid #000 !important;
  width: 12px !important;
  height: 12px !important;
  box-shadow: none !important;
}
html[data-theme="win3x"] .status-dot.online {
  background: #00ff00 !important;
  box-shadow: none !important;
}

html[data-theme="win3x"] .composer-prompt,
html[data-theme="win3x"] .composer-hints,
html[data-theme="win3x"] .pixel-rpg-hud { display: none !important; }

html[data-theme="win3x"] .console-screen,
html[data-theme="win3x"] #settings-screen,
html[data-theme="win3x"] #admin-screen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10060 !important;
  background: var(--w3-desktop) !important;
  overflow: auto !important;
}
html[data-theme="win3x"] .console-back,
html[data-theme="win3x"] .console-item,
html[data-theme="win3x"] .console-signed,
html[data-theme="win3x"] .console-main,
html[data-theme="win3x"] .console-main .muted,
html[data-theme="win3x"] .console-main p {
  color: #000 !important;
  text-shadow: none !important;
}
html[data-theme="win3x"] .console-item {
  border-radius: 0 !important;
}
html[data-theme="win3x"] .console-item.active {
  background: var(--w3-navy) !important;
  color: #fff !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html[data-theme="win3x"] .console-brand h2,
html[data-theme="win3x"] .console-brand .console-sub { color: #fff !important; }

html[data-theme="win3x"] .auth-screen,
html[data-theme="win3x"] .boot-splash {
  background: var(--w3-desktop) !important;
}
html[data-theme="win3x"] .ui-toast {
  border-radius: 0 !important;
  background: #ffffe1 !important;
  color: #000 !important;
  border: 2px solid #000 !important;
  box-shadow: 2px 2px 0 #000 !important;
}
html[data-theme="win3x"] .btn-jump-bottom {
  border-radius: 0 !important;
  background: var(--w3-face) !important;
  color: #000 !important;
  border: 2px solid #000 !important;
  box-shadow: none !important;
}
