/* Dashboard design system. Layouts remain in style.css's legacy layer. */
:root {
  --ui-font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-page: #f6f6f9;
  --ui-surface: #ffffff;
  --ui-inset: #f7f9fb;
  --ui-hover: #edf1f5;
  --ui-text: #363949;
  --ui-muted: #677483;
  --ui-border: #e0e6ed;
  --ui-control-border: #c6d0db;
  --ui-primary: #009d12;
  --ui-primary-hover: #00830e;
  --ui-invite: #087d19;
  --ui-invite-hover: #066815;
  --ui-accent: #00b800;
  --ui-success-soft: #e2f7e5;
  --ui-danger: #d22d43;
  --ui-danger-hover: #b71f34;
  --ui-danger-text: #c51d36;
  --ui-danger-soft: #ffeaee;
  --ui-info: #2b73f6;
  --ui-info-text: #2458c6;
  --ui-info-soft: #eaf0fb;
  --ui-warning: #f0b329;
  --ui-warning-text: #b17300;
  --ui-warning-soft: #faf1dd;
  --ui-focus: #557ebc;
  --ui-shadow: 0 2rem 3rem rgba(132, 139, 200, 0.18);
  --ui-dialog-shadow: 0 20px 60px rgba(13, 24, 38, 0.2);
  --ui-overlay: rgba(15, 23, 34, 0.5);
  --ui-radius-card: 18px;
  --ui-radius-inner: 12px;
  --ui-radius-control: 9px;
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-6: 24px;
  --ui-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23637184' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  /* Compatibility aliases keep existing layouts and status text on this palette. */
  --color-background: var(--ui-page);
  --color-white: var(--ui-surface);
  --color-dark: var(--ui-text);
  --color-dark-variant: var(--ui-muted);
  --color-info-dark: var(--ui-muted);
  --color-light: var(--ui-border);
  --color-primary: var(--ui-accent);
  --color-secondary: var(--ui-surface);
  --color-secprimary: var(--ui-info-text);
  --color-danger: var(--ui-danger-text);
  --color-success: var(--ui-accent);
  --color-warning: var(--ui-warning-text);
  --color-lime: var(--ui-accent);
  --card-border-radius: var(--ui-radius-card);
  --border-radius-1: var(--ui-radius-control);
  --border-radius-2: var(--ui-radius-inner);
  --card-padding: 24px;
  --box-shadow: var(--ui-shadow);
  color-scheme: light;
}

.dark-mode-variables {
  --ui-page: #181a1e;
  --ui-surface: #202528;
  --ui-inset: #191f22;
  --ui-hover: #2b3439;
  --ui-text: #edeffd;
  --ui-muted: #a3bdcc;
  --ui-border: #323c47;
  --ui-control-border: #475461;
  --ui-accent: #00ef1c;
  --ui-success-soft: #15391e;
  --ui-danger-text: #ff657b;
  --ui-danger-soft: #42232b;
  --ui-info-text: #8ebcff;
  --ui-info-soft: #203659;
  --ui-warning-text: #ffd05b;
  --ui-warning-soft: #3a3325;
  --ui-focus: #8cafe6;
  --ui-shadow: 0 2rem 3rem rgba(0, 0, 0, 0.4);
  --ui-dialog-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --ui-overlay: rgba(5, 10, 16, 0.65);
  --ui-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23a1afbf' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  --color-background: var(--ui-page);
  --color-white: var(--ui-surface);
  --color-dark: var(--ui-text);
  --color-dark-variant: var(--ui-muted);
  --color-info-dark: var(--ui-muted);
  --color-light: var(--ui-border);
  --color-primary: var(--ui-accent);
  --color-secondary: var(--ui-surface);
  --color-secprimary: var(--ui-info-text);
  --color-danger: var(--ui-danger-text);
  --color-success: var(--ui-accent);
  --color-warning: var(--ui-warning-text);
  --color-lime: var(--ui-accent);
  --box-shadow: var(--ui-shadow);
  color-scheme: dark;
}

body {
  font-family: var(--ui-font);
  color: var(--ui-text);
  background: var(--ui-page);
}

:where(button, input, select, textarea) { font-family: inherit; }
:where(h1, h2, h3, h4) { color: var(--ui-text); }
:where(h2, h3, h4) { font-weight: 600; }
:where(main > h1) { margin-bottom: 12px; letter-spacing: -0.025em; }
:where(p) { line-height: 1.55; }
:where(a:hover) { color: var(--ui-accent); }
:where(.text-muted, .server-list-status, .tickets-admin-page) { color: var(--ui-muted); }

/* One neutral surface for top-level cards; status and categories live inside. */
:where(
  main .analyse > div, main .new-users .user-list, main .tickets > div,
  main .recent-servers table, main .acrecent-servers table,
  main .usersrecent-servers table, main .licensesrecent-servers table,
  .tickets-filter-form, .server-module, .server-control-command-main,
  .analytics-mobile-server-card, .users-mobile-card, .licenses-mobile-card,
  .ticket-transcript-panel, .right-section .user-profile,
  .right-section .reminders .notification, .vote-link-card, .suspended-card, .aliaxy-login-box
) {
  background: var(--ui-surface);
  color: var(--ui-text);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-card);
  box-shadow: var(--ui-shadow);
  transition: box-shadow 300ms ease, border-color 160ms ease;
}

:where(main .analyse > div, main .new-users .user-list, .server-module) { cursor: default; }
:where(main .analyse > div:hover, main .new-users .user-list:hover, .server-module:hover,
  main .tickets > div:hover, main table:hover, .right-section .user-profile:hover,
  .right-section .reminders .notification:hover, .analytics-mobile-server-card:hover,
  .users-mobile-card:hover, .licenses-mobile-card:hover, .vote-link-card:hover) {
  box-shadow: none;
  transform: none;
}
:where(.server-selection-card .status) { gap: 16px; }
:where(.server-selection-card .info) { min-width: 0; }
:where(.server-selection-card h2) { overflow-wrap: anywhere; }
.server-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Server management fits the overview's existing center column and side panel. */
.server-management { margin-top: 20px; }
.server-management-group + .server-management-group { margin-top: 28px; }
.server-group-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.server-group-heading h2 { margin: 0; }
.server-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 26px;
  padding: 2px 8px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  background: var(--ui-inset);
  color: var(--ui-muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.server-group-empty { color: var(--ui-muted); }
.server-management-grid.analyse {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.server-management-grid .server-selection-card { display: flex; align-items: center; min-width: 0; margin-top: 0; }
.server-management-grid .server-selection-card .status { width: 100%; }
.server-management-grid .server-selection-card .info { flex: 1; }
.server-management-grid .server-selection-card .progresss { flex: 0 0 92px; }
.server-management-grid .server-selection-card h2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.3;
  height: 2.6em;
  overflow: hidden;
}
.server-management .server-card-actions .server-button { white-space: nowrap; }
.server-management .server-button.configure {
  --button-bg: var(--ui-invite);
  --button-hover: var(--ui-invite-hover);
}
.server-selection-empty { grid-column: 1 / -1; }
.server-selection-empty p { margin-top: 8px; color: var(--ui-muted); }

/* Center visible stat artwork, rather than its text baseline or transparent canvas. */
main .analyse .progresss .percentage {
  position: static;
  inset: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

main .analyse .progresss .percentage p {
  display: block;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1;
  /* Color emoji glyphs sit below the optical center of their em box. */
  transform: translateY(-0.08em);
}

main .analyse .progresss > img[src$="/logoa_little.png"],
main .analyse .progresss > img[src$="/servers_little.png"] {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  /* The 500px PNGs have visible artwork centered 19px/21px above the canvas center. */
  transform: translateY(var(--stat-art-offset));
}

main .analyse .progresss > img[src$="/logoa_little.png"] { --stat-art-offset: 3.8%; }
main .analyse .progresss > img[src$="/servers_little.png"] { --stat-art-offset: 4.2%; }

:where(.update-listing-head, .update-view-head) { border-color: var(--ui-border); }
:where(.update-listing-head p, .update-composer-head p, .update-view-head time,
  .update-listing-content p, .update-listing-date, .update-feed-preview, .update-feed-date,
  .update-view-section p, .update-delete-modal-card p, .users-action-modal-card p,
  .license-create-modal-card p, .license-remove-modal-card p, .license-remove-confirm-card p) {
  color: var(--ui-muted);
  line-height: 1.55;
}
:where(.update-listing .update-listing-card, .update-composer .update-composer-card,
  .update-view .update-view-card) { padding: clamp(16px, 2vw, 24px); }
:where(.update-listing-grid) { gap: 12px; }
:where(.update-listing-item, .update-view-section, .license-remove-list,
  .server-control-stat-card, .server-module-meta-row, .server-module-words,
  .analytics-mobile-server-meta span, .users-mobile-card-meta span, .licenses-mobile-meta span) {
  background: var(--ui-inset);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-inner);
  box-shadow: none;
  color: var(--ui-text);
}
:where(.update-listing-item) { padding: 16px; border-inline-start: 3px solid var(--ui-tone, var(--ui-border)); }
:where(.update-listing-item:hover) { background: var(--ui-hover); border-color: var(--ui-control-border); transform: none; box-shadow: none; }
:where(.update-listing-item:hover) { border-inline-start-color: var(--ui-tone, var(--ui-control-border)); }
:where(.update-listing-content h3) { color: var(--ui-text); font-weight: 600; }
:where(.update-listing-label, .update-feed-label, .update-view-section h3) { color: var(--ui-tone, var(--ui-muted)); }
:where(.update-tone-features) { --ui-tone: var(--ui-accent); --ui-tone-soft: var(--ui-success-soft); }
:where(.update-tone-bugs) { --ui-tone: var(--ui-danger-text); --ui-tone-soft: var(--ui-danger-soft); }
:where(.update-tone-improvements) { --ui-tone: var(--ui-info-text); --ui-tone-soft: var(--ui-info-soft); }
:where(.update-tone-soon) { --ui-tone: var(--ui-warning-text); --ui-tone-soft: var(--ui-warning-soft); }
:where(.update-view-section) { border-inline-start: 3px solid var(--ui-tone, var(--ui-border)); }
:where(.update-listing-icon, .updates-feed .update-feed-item .icon) {
  color: var(--ui-tone, var(--ui-info-text));
  background: var(--ui-tone-soft, var(--ui-info-soft));
  border: 0;
  border-radius: 9px;
  box-shadow: none;
}

/* A shared button anatomy, with solid primary/destructive and neutral actions. */
:where(.ui-button, .server-button, .ticket-button, .license-button, .admin-button,
  #searchButton, #searchButtonMobile, .update-listing-create-btn, .update-submit-btn,
  .update-delete-btn, .update-delete-modal-actions button, .users-action-modal-actions button,
  .license-create-actions button, .license-remove-actions button, .license-remove-confirm-actions button,
  .server-copy-id, .server-control-back, .tickets-admin-pager-btn, .page-button,
  .vote-link-button, .suspended-btn, .aliaxy-login-discord-btn) {
  --button-bg: var(--ui-inset);
  --button-hover: var(--ui-hover);
  --button-text: var(--ui-text);
  --button-border: var(--ui-control-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  margin: 0;
  border: 1px solid var(--button-border);
  border-radius: var(--ui-radius-control);
  background: var(--button-bg);
  color: var(--button-text);
  font-family: var(--ui-font);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  box-shadow: none;
  opacity: 1;
  filter: none;
  transform: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

:where(.ui-button, .server-button, .ticket-button, .license-button, .admin-button,
  #searchButton, #searchButtonMobile, .update-listing-create-btn, .update-submit-btn,
  .update-delete-btn, .update-delete-modal-actions button, .users-action-modal-actions button,
  .license-create-actions button, .license-remove-actions button, .license-remove-confirm-actions button,
  .server-copy-id, .server-control-back, .tickets-admin-pager-btn, .page-button,
  .vote-link-button, .suspended-btn, .aliaxy-login-discord-btn):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--button-hover);
  color: var(--button-text);
  border-color: var(--button-border);
  box-shadow: none;
  transform: none;
  filter: none;
  opacity: 1;
}

:where(.ui-button-primary, .server-button.edit, .server-button.configure, .license-button.add,
  .update-listing-create-btn, .update-submit-btn, .license-create-submit,
  .users-action-modal-confirm.is-safe, .ticket-button.download, .vote-link-button,
  .suspended-btn.primary, .aliaxy-login-discord-btn) {
  --button-bg: var(--ui-primary);
  --button-hover: var(--ui-primary-hover);
  --button-border: transparent;
  --button-text: #ffffff;
}
:where(.ui-button-danger, .license-button.remove, .update-delete-modal-confirm,
  .license-remove-delete, .license-remove-confirm-delete, .users-action-modal-confirm.is-danger) {
  --button-bg: var(--ui-danger);
  --button-hover: var(--ui-danger-hover);
  --button-border: transparent;
  --button-text: #ffffff;
}
:where(.update-delete-btn, .admin-button.minus, .admin-button.suspend, .admin-button.stopserver) {
  --button-bg: var(--ui-danger-soft);
  --button-hover: var(--ui-hover);
  --button-border: var(--ui-border);
  --button-text: var(--ui-danger-text);
}
:where(.ticket-button.open-discord, .admin-button.plus) {
  --button-bg: var(--ui-info-soft);
  --button-hover: var(--ui-hover);
  --button-border: var(--ui-border);
  --button-text: var(--ui-info-text);
}
:where(.admin-button.unsuspend) {
  --button-bg: var(--ui-success-soft);
  --button-hover: var(--ui-hover);
  --button-border: var(--ui-border);
  --button-text: var(--ui-accent);
}
:where(.ui-button-secondary) {
  --button-bg: var(--ui-inset);
  --button-hover: var(--ui-hover);
  --button-border: var(--ui-control-border);
  --button-text: var(--ui-text);
}
:where(.server-button.dezactivate, button:disabled, .ui-button[aria-disabled="true"], .page-button.is-disabled) {
  background: var(--ui-inset);
  color: var(--ui-muted);
  border-color: var(--ui-border);
  box-shadow: none;
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
:where(.ticket-button, .update-delete-btn, .server-copy-id, .page-button, .tickets-admin-pager-btn) {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.76rem;
}
:where(.admin-button) { min-width: 34px; min-height: 34px; padding: 6px; margin: 2px; }
:where(.ui-button, .server-button, .license-button, .admin-button,
  .update-listing-create-btn, .update-submit-btn, .update-delete-btn, .server-control-back,
  #searchButton, #searchButtonMobile) .material-icons-sharp {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.15rem; height: 1.15rem; padding: 0; margin: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  color: inherit; font-size: 1.15rem; line-height: 1; flex-shrink: 0;
}
.ticket-button .ticket-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: inherit;
}
.ticket-button .ticket-btn-icon-discord { font-size: 0; }
.ticket-button .ticket-btn-icon svg { display: block; width: 100%; height: 100%; }
.server-list-search > .material-icons-sharp { font-size: 1.25rem; line-height: 1; flex-shrink: 0; }
:where(.page-number) { background: transparent; color: var(--ui-muted); font-size: 0.8rem; cursor: default; }
:where(.pagination) { align-items: center; gap: 6px; }

/* Identical field styling and chevrons for filters, search, and dialog forms. */
:where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea) {
  min-height: 38px;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ui-control-border);
  border-radius: var(--ui-radius-control);
  background: var(--ui-inset);
  color: var(--ui-text);
  font-family: var(--ui-font);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  outline: none;
  box-shadow: none;
  transform: none;
  transition: border-color 160ms ease;
  user-select: text;
}
:where(input::placeholder, textarea::placeholder) { color: var(--ui-muted); opacity: 1; }
:where(select) {
  -webkit-appearance: none;
  appearance: none;
  padding-inline-end: 34px;
  background-image: var(--ui-select-arrow);
  background-position: right 12px center;
  background-size: 12px;
  background-repeat: no-repeat;
  cursor: pointer;
  color-scheme: inherit;
}
:where(select option) { background: var(--ui-surface); color: var(--ui-text); font: inherit; font-weight: 500; }
.tickets-select-arrow { display: none; }
:where(input:hover, textarea:hover) { border-color: var(--ui-muted); }
:where(input:focus, textarea:focus) { border-color: var(--ui-focus); box-shadow: none; transform: none; }
:where(a, button, input, textarea, [tabindex]:not(select)):focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 3px;
  box-shadow: none;
}
select:hover,
select:focus,
select:focus-visible {
  border-color: var(--ui-control-border);
  outline: none;
  box-shadow: none;
  transform: none;
}
:where(.server-list-search) {
  min-height: 38px; padding: 8px 12px;
  background: var(--ui-inset); color: var(--ui-muted);
  border: 1px solid var(--ui-control-border); border-radius: var(--ui-radius-control);
}
:where(.server-list-search input) { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.server-list-search input:focus-visible { outline: none; }
:where(.server-list-search:focus-within) { outline: none; border-color: var(--ui-focus); }
:where(.server-list-search:has(input:focus-visible)) { outline: 2px solid var(--ui-focus); outline-offset: 3px; }
:where(.search-box) { gap: 8px; padding: 0; }
:where(.search-box input) { flex: 1; min-width: 0; }
:where(#usernameSearch, #usernameSearchMobile, #licenseSearch) { margin-right: 0; }
:where(.license-container) { flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
:where(.license-container h2) { margin: 0; }
:where(.license-container .search-box) { flex: 1 1 240px; min-width: min(100%, 240px); margin: 0; }
:where(.licensesbuttons) { gap: 8px; margin: 0; }
:where(.tickets-filter-form) { padding: 12px 16px; }
:where(.tickets-server-select) { min-width: 240px; }
:where(.tickets-filter-form .text-muted, .server-list-sort) { font-size: 0.78rem; color: var(--ui-muted); }
:where(.update-form-group label, .license-create-form label, .license-remove-label) {
  color: var(--ui-text); font-size: 0.82rem; font-weight: 600; letter-spacing: 0; text-transform: none;
}
:where(.license-create-error, .license-remove-error) { color: var(--ui-danger-text); }

/* Dialogs have neutral surfaces; the action, rather than the whole dialog, is red. */
:where(.update-delete-modal, .users-action-modal, .license-create-modal,
  .license-remove-modal, .license-remove-confirm-modal) { background: var(--ui-overlay); }
:where(.update-delete-modal-card, .users-action-modal-card, .license-create-modal-card,
  .license-remove-modal-card, .license-remove-confirm-card) {
  background: var(--ui-surface); color: var(--ui-text);
  border: 1px solid var(--ui-border); border-radius: var(--ui-radius-card);
  box-shadow: var(--ui-dialog-shadow); padding: 24px;
}
:where(.update-delete-modal-card, .users-action-modal-card, .license-create-modal-card, .license-remove-confirm-card) {
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
:where(.update-delete-modal-card h3, .users-action-modal-card h3, .license-create-modal-card h3,
  .license-remove-modal-card h3, .license-remove-confirm-card h3) { color: var(--ui-text); font-weight: 600; }
:where(.license-remove-list) { scrollbar-color: var(--ui-control-border) var(--ui-inset); }
:where(.license-remove-list::-webkit-scrollbar-track) { background: var(--ui-inset); }
:where(.license-remove-list::-webkit-scrollbar-thumb) { background: var(--ui-control-border); border-color: var(--ui-inset); }
:where(.license-remove-item) { background: var(--ui-surface); color: var(--ui-text); border-color: var(--ui-border); border-radius: var(--ui-radius-control); }
:where(.license-remove-item:hover) { background: var(--ui-hover); border-color: var(--ui-control-border); }
:where(.license-remove-item.selected) { background: var(--ui-info-soft); color: var(--ui-text); border-color: var(--ui-focus); }
:where(.license-remove-item-meta, .license-remove-empty) { color: var(--ui-muted); }

/* Status information keeps semantic color, without neon fills or glowing borders. */
:where(.ticket-card-open, .ticket-view-status-open, .ticket-view-status-created, .server-module-status-on) {
  --ui-status: var(--ui-accent); --ui-status-soft: var(--ui-success-soft);
}
:where(.ticket-status-open, .ticket-status-created) {
  --ui-status: var(--ui-accent); --ui-status-soft: var(--ui-success-soft);
}
:where(.ticket-status-closed) {
  --ui-status: var(--ui-danger-text); --ui-status-soft: var(--ui-danger-soft);
}
:where(.ticket-status-expired, .ticket-status-unknown) {
  --ui-status: var(--ui-muted); --ui-status-soft: var(--ui-inset);
}
:where(.ticket-card-closed, .ticket-view-status-closed, .server-module-status-off) {
  --ui-status: var(--ui-danger-text); --ui-status-soft: var(--ui-danger-soft);
}
:where(.ticket-card-expired, .ticket-view-status-expired, .ticket-view-status-unknown, .server-module-status-na) {
  --ui-status: var(--ui-muted); --ui-status-soft: var(--ui-inset);
}
:where(main .tickets > div:not(.ticket-empty-state)) { border-inline-start: 3px solid var(--ui-status, var(--ui-border)); }
:where(.ticket-status-badge, .ticket-view-status, .server-module-status, .server-control-head-badge, .suspended-pill) {
  background: var(--ui-status-soft, var(--ui-success-soft));
  color: var(--ui-status, var(--ui-accent));
  border: 1px solid var(--ui-border); border-radius: 999px;
  font-weight: 600; letter-spacing: 0.02em; box-shadow: none;
}
:where(.suspended-pill) { --ui-status: var(--ui-danger-text); --ui-status-soft: var(--ui-danger-soft); }
:where(.ticket-view-owner, .ticket-owner-row .ticket-owner-name, .server-control-stat-value,
  .server-control-ticket-lines strong, .server-module-meta-row strong, .server-module-meta-value) { color: var(--ui-text); }
:where(.ticket-transcript-content) { color: var(--ui-text); background: var(--ui-inset); line-height: 1.65; user-select: text; }
:where(.server-control-stat-card small, .server-control-ticket-lines span) { color: var(--ui-muted); }
:where(.server-control-stat-head .material-icons-sharp, .server-module-icon) { color: var(--ui-accent); }
:where(.server-module-icon) { background: var(--ui-success-soft); }
:where(.server-module-chip) { background: var(--ui-inset); border-color: var(--ui-border); color: var(--ui-text); font-weight: 600; }
:where(.server-module-chip.more) { background: var(--ui-success-soft); color: var(--ui-accent); }
:where(.server-control-id img) { border-color: var(--ui-border); box-shadow: none; }
:where(.ticket-footer-row) { flex-wrap: wrap; }

/* Tables, profile menus, and navigation share the same quiet borders and surfaces. */
:where(main table) { border-spacing: 0; }
:where(main table thead th) { color: var(--ui-muted); font-size: 0.78rem; font-weight: 600; }
:where(main table tbody td) { border-color: var(--ui-border); color: var(--ui-text); font-size: 0.82rem; }
:where(main table tbody tr:last-child td) { border-bottom: 0; }
:where(.king-plan) { color: var(--ui-warning-text); font-weight: 600; }
:where(.soldier-plan) { color: var(--ui-info-text); font-weight: 600; }
:where(.buffoon-plan) { color: var(--ui-danger-text); font-weight: 600; }
:where(#recentServersTableBody .danger, #recentServersTableBody .warning, #recentServersTableBody .primary) { color: var(--ui-text); }
:where(.dropdown) { background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-inner); box-shadow: var(--ui-dialog-shadow); }
:where(.dropdown-item, .dropdown-item a) { color: var(--ui-text); }
:where(.dropdown-item:hover) { background: var(--ui-hover); }
:where(.dropdown-divider, .menu-divider) { background: var(--ui-border); }
:where(aside .sidebar) { border: 1px solid var(--ui-border); box-shadow: var(--ui-shadow); }
:where(aside .sidebar) { transition: box-shadow 300ms ease; }
:where(aside .sidebar:hover) { box-shadow: none; }
:where(aside .sidebar a h3) { color: inherit; }
:where(aside .sidebar a.active) { color: var(--ui-accent); background: var(--ui-success-soft); }
:where(aside .sidebar a:hover:not(.is-disabled)) { color: var(--ui-accent); }
:where(aside .sidebar a:not(.active):hover span) { margin-left: 0; }
:where(aside .sidebar a.active:hover span:not(.message-count)) { margin-left: calc(1rem - 3px); }
:where(aside .sidebar .message-count) { background: var(--ui-success-soft); color: var(--ui-accent); font-weight: 600; }
.right-section .dark-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  flex: 0 0 auto;
  width: 4.4rem;
  height: 1.9rem;
  padding: 2px;
  background: var(--ui-inset);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-control);
  overflow: hidden;
}
.right-section .dark-mode > .material-icons-sharp {
  display: grid;
  place-items: center;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 6px;
  color: var(--ui-muted);
}
.right-section .dark-mode > .material-icons-sharp.active { background: var(--ui-primary); color: #fff; }
:where(.right-section .reminders .header .updates-bell.has-unread) { color: var(--ui-warning-text); }

/* Branded premium artwork remains distinct; its surrounding UI stays neutral. */
:where(.server-control-plan-panel h3) { color: #f0fff7; }
:where(.vote-hero p) { color: var(--ui-muted); }
:where(.vote-link-card:hover) { transform: none; border-color: var(--ui-control-border); }
:where(.vote-link-button) { box-shadow: none; }
.dashboard-standalone { min-height: 100vh; height: auto; }
:where(.dashboard-standalone .suspended-card) { margin: 0; }
:where(.dashboard-standalone .suspended-card h1) { color: var(--ui-text); }
:where(.dashboard-standalone .suspended-card p) { color: var(--ui-muted); }
:where(.aliaxy-login-title) { color: var(--ui-text); }
:where(.aliaxy-login-desc, .aliaxy-login-note) { color: var(--ui-muted); }
:where(.aliaxy-login-box) { animation: none; }
:where(.aliaxy-login-image) { border: 2px solid var(--ui-border); box-shadow: none; }
:where(.aliaxy-login-bg-light, .aliaxy-login-bg-diamond, .aliaxy-login-particles) { opacity: 0.2; }

@media (max-width: 700px) {
  :where(.tickets-server-select) { min-width: 0; width: 100%; }
  :where(.tickets-select-wrap) { width: 100%; }
  :where(.tickets-filter-form) { width: min(100%, 480px); }
  :where(.update-listing-head) { flex-wrap: wrap; align-items: flex-start; }
  :where(.license-container .search-box) { flex: 0 1 auto; width: 100%; }
  :where(.update-delete-modal-card, .users-action-modal-card, .license-create-modal-card,
    .license-remove-modal-card, .license-remove-confirm-card) { padding: 20px; }
}

@media (max-width: 480px) {
  .server-management-grid .server-selection-card .progresss {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(*, *::before, *::after) { transition-duration: 0s; animation-duration: 0.01ms; animation-iteration-count: 1; scroll-behavior: auto; }
}

@media (forced-colors: active) {
  :where(select) { appearance: auto; background-image: none; }
  :where(button, input, select, textarea) { border-color: ButtonText; }
  :where(a, button, input, textarea, [tabindex]:not(select)):focus-visible { outline-color: Highlight; }
}
