:root {
  color-scheme: dark;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: #f6f5fb;
  background: #171416;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --panel: #23191c;
  --line: rgba(255, 255, 255, .09);
  --muted: #aaa9b8;
  --accent: #c93645;
  --bright: #ff6876;
  --surface: #211a1d;
  --surface-raised: #2b2024;
  --surface-border: rgba(255, 255, 255, .09);
  --surface-border-hover: rgba(255, 255, 255, .16);
  --radius-card: 15px;
  --shadow-card: 0 12px 34px rgba(0, 0, 0, .16);
}

* { box-sizing: border-box; }

html { scrollbar-gutter: stable; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 84% 3%, rgba(121, 26, 42, .2), transparent 38rem),
    radial-gradient(ellipse at 5% 48%, rgba(67, 34, 48, .1), transparent 35rem),
    #171416;
}

button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--bright);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.shell { width: min(100% - 40px, 1320px); margin-inline: auto; }
.topbar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255, 104, 118, .38); border-radius: 13px; background: linear-gradient(145deg, rgba(201, 54, 69, .35), #100c0e); box-shadow: 0 5px 16px rgba(201, 54, 69, .12); color: var(--bright); font-size: 12px; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account { display: flex; align-items: center; gap: 14px; color: #cbc9d4; font-size: 12px; }

.login-view { max-width: 660px; padding: clamp(65px, 12vh, 130px) 0; }
.eyebrow { color: #aaa9b8; font-family: Consolas, monospace; font-size: 10px; letter-spacing: .14em; }
h1, h2, h3, p { margin-top: 0; }
.login-view h1 { margin: 17px 0; font-size: clamp(38px, 7vw, 68px); letter-spacing: -.07em; line-height: 1.03; }
.login-view h1 span { color: var(--bright); }
.login-view > p { max-width: 580px; margin-bottom: 25px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.login-view .feedback { margin-top: 15px; }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 30px; padding: 25px 27px; border: 1px solid var(--surface-border); border-radius: 16px; background: linear-gradient(115deg, rgba(43, 32, 36, .94), rgba(31, 25, 28, .82)); box-shadow: var(--shadow-card); }
.page-heading h1 { margin: 8px 0 7px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.055em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.server-picker { width: min(100%, 320px); }
.server-picker > span, label { display: grid; gap: 7px; color: #c6c4cf; font-size: 11px; }
.server-picker-control { position: relative; min-width: 0; }
.server-picker-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 104, 118, .28);
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(201, 54, 69, .12), #181517 70%);
  color: #f6f5fb;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}
.server-picker-button:hover, .server-picker-button[aria-expanded="true"] {
  border-color: rgba(255, 104, 118, .58);
  background-color: #1b1618;
}
.server-picker-button > span:first-child { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-picker-chevron { display: block; width: 8px; height: 8px; flex: 0 0 auto; border-right: 1.5px solid #ff9aa4; border-bottom: 1.5px solid #ff9aa4; transform: rotate(45deg) translateY(-2px); transition: transform .16s; }
.server-picker-button[aria-expanded="true"] .server-picker-chevron { transform: rotate(225deg) translate(-2px, -1px); }
.server-picker-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: grid;
  max-height: min(320px, 50vh);
  gap: 3px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(255, 104, 118, .25);
  border-radius: 12px;
  background: linear-gradient(145deg, #2b2024, #191517);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
.server-picker-option {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #c6c4cf;
  cursor: pointer;
  font-size: 11px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.server-picker-option:hover, .server-picker-option:focus-visible {
  border-color: rgba(255, 104, 118, .2);
  background: rgba(201, 54, 69, .13);
  color: #fff;
  outline: none;
}
.server-picker-option[aria-selected="true"] {
  background: linear-gradient(100deg, rgba(201, 54, 69, .25), rgba(201, 54, 69, .08));
  color: #ff9aa4;
}
label input:not([type=checkbox]), label select, label textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background-color: #181517;
  color: #f6f5fb;
  font-size: 12px;
  transition: border-color .16s, background-color .16s, box-shadow .16s;
}
label input:not([type=checkbox]):hover, label select:hover, label textarea:hover { border-color: rgba(255, 255, 255, .22); }
label input:not([type=checkbox]):focus, label select:focus, label textarea:focus { border-color: rgba(255, 104, 118, .65); background-color: #1b1618; box-shadow: 0 0 0 3px rgba(201, 54, 69, .12); outline: none; }
label textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
label input[type=color] { width: 100%; height: 40px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #171416; }
.select-control { position: relative; width: 100%; min-width: 0; }
.select-native { display: none !important; }
.select-control-button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(201, 54, 69, .08), #181517 70%);
  color: #f6f5fb;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: border-color .16s, background-color .16s, box-shadow .16s;
}
.select-control-button:hover, .select-control-button[aria-expanded="true"] {
  border-color: rgba(255, 104, 118, .48);
  background-color: #1b1618;
}
.select-control-button[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(201, 54, 69, .1); }
.select-control-button:disabled { cursor: not-allowed; opacity: .55; }
.select-control-value { display: block; min-width: 0; overflow: hidden; color: inherit; text-overflow: ellipsis; white-space: nowrap; }
.select-control-chevron { display: block; width: 8px; height: 8px; flex: 0 0 auto; border-right: 1.5px solid #ff9aa4; border-bottom: 1.5px solid #ff9aa4; transform: rotate(45deg) translateY(-2px); transition: transform .16s; }
.select-control-button[aria-expanded="true"] .select-control-chevron { transform: rotate(225deg) translate(-2px, -1px); }
.select-control-options {
  position: fixed;
  z-index: 1000;
  display: grid;
  max-height: min(320px, 50vh);
  gap: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid rgba(255, 104, 118, .25);
  border-radius: 12px;
  background: linear-gradient(145deg, #2b2024, #191517);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
.select-control-option {
  min-height: 36px;
  padding: 9px 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #c6c4cf;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select-control-option:hover, .select-control-option:focus-visible {
  border-color: rgba(255, 104, 118, .2);
  background: rgba(201, 54, 69, .13);
  color: #fff;
  outline: none;
}
.select-control-option[aria-selected="true"] {
  background: linear-gradient(100deg, rgba(201, 54, 69, .25), rgba(201, 54, 69, .08));
  color: #ff9aa4;
}
.select-control-option[aria-disabled="true"] { cursor: not-allowed; opacity: .45; }

.dashboard-layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); align-items: start; gap: 25px; padding: 22px 0 42px; }
.tabs { position: sticky; top: 16px; display: grid; gap: 4px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 13px 10px; border: 1px solid var(--surface-border); border-radius: 15px; background: rgba(29, 23, 26, .9); box-shadow: var(--shadow-card); backdrop-filter: blur(14px); }
.nav-label { padding: 5px 9px 7px; color: #85828f; font-family: Consolas, monospace; font-size: 9px; letter-spacing: .14em; }
.nav-label-tools { margin-top: 9px; padding-top: 13px; border-top: 1px solid var(--line); }
.tab { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 10px 9px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #aaa9b8; cursor: pointer; font-size: 12px; font-weight: 700; text-align: left; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.tab:hover { background: rgba(255, 255, 255, .04); color: #f6f5fb; }
.tab:active { transform: scale(.985); }
.tab-index { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: #898693; font-family: Consolas, monospace; font-size: 9px; }
.tab.active { border-color: rgba(255, 104, 118, .24); background: linear-gradient(100deg, rgba(201, 54, 69, .2), rgba(201, 54, 69, .07)); color: #ff9aa4; box-shadow: inset 2px 0 0 var(--bright); }
.tab.active .tab-index { border-color: rgba(255, 104, 118, .3); background: rgba(201, 54, 69, .2); color: #ff9aa4; }
.tab-content { min-width: 0; }
.tab-panel { min-width: 0; animation: panel-enter .18s ease-out; }
@keyframes panel-enter { from { opacity: .55; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 5px 0 19px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 6px 0 0; font-size: clamp(22px, 2.3vw, 27px); letter-spacing: -.04em; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding-bottom: 42px; }
.card { position: relative; display: grid; min-width: 0; align-content: start; gap: 15px; padding: 20px; overflow: hidden; border: 1px solid var(--surface-border); border-radius: var(--radius-card); background: linear-gradient(145deg, rgba(43, 32, 36, .94), rgba(29, 23, 26, .96)); box-shadow: 0 7px 22px rgba(0, 0, 0, .12); transition: border-color .18s, transform .18s, box-shadow .18s; }
.card:hover { border-color: var(--surface-border-hover); box-shadow: 0 12px 28px rgba(0, 0, 0, .2); }
.card h3 { margin: 0 0 1px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 13px; letter-spacing: .015em; }
.card > .help { line-height: 1.75; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.switch-row { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 10px; background: rgba(9, 8, 9, .18); }
.switch-row input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--accent); cursor: pointer; }
.help { margin: -5px 0 0; color: #9998a8; font-size: 10px; line-height: 1.65; }
.help-guide { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; background: rgba(9, 8, 9, .2); }
#tab-categories > .help-guide, #tab-statistics > .help-guide { margin-bottom: 15px; }
.help-guide summary { color: #ffb0b8; cursor: pointer; font-size: 10px; font-weight: 750; line-height: 1.5; }
.help-guide summary:hover { color: #ffd2d7; }
.help-guide ul { display: grid; gap: 7px; margin: 0; padding-left: 17px; color: #aaa9b8; font-size: 10px; line-height: 1.6; }
.help-guide li strong { color: #e5e2eb; }
.help-guide code { padding: 1px 4px; border-radius: 4px; background: rgba(255, 255, 255, .07); color: #f0d6da; font-family: Consolas, monospace; }
.form-actions { display: flex; grid-column: 1 / -1; align-items: center; gap: 14px; min-height: 42px; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; color: #fff; cursor: pointer; font-size: 11px; font-weight: 800; text-decoration: none; transition: filter .15s, transform .15s, border-color .15s, box-shadow .15s; }
.button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.button-primary { background: linear-gradient(110deg, #a51f31, #d63b4d); box-shadow: 0 6px 18px rgba(163, 31, 49, .22); }
.button-primary:focus-visible { box-shadow: 0 0 0 3px rgba(255, 104, 118, .2), 0 6px 18px rgba(163, 31, 49, .22); }
.button-secondary { border-color: rgba(255, 104, 118, .3); background: rgba(201, 54, 69, .13); color: #ff9aa4; }
.button-quiet { min-height: 35px; border-color: rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .025); color: #c9c8d5; }
.button-quiet:hover { border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); }
.button:disabled { cursor: not-allowed; filter: grayscale(.35); opacity: .55; transform: none; }
.feedback { color: #9ce4bd; font-size: 11px; }
.feedback.error { color: #ff9aa4; }
.notice { margin-bottom: 18px; padding: 14px 17px; border: 1px solid rgba(255, 104, 118, .24); border-radius: 12px; background: linear-gradient(110deg, rgba(201, 54, 69, .12), rgba(201, 54, 69, .055)); color: #e0dce3; font-size: 12px; line-height: 1.7; }
.notice-warning { border-color: rgba(239, 189, 105, .25); background: rgba(239, 189, 105, .07); }
.app-loading { max-width: 540px; margin: 12vh auto 24px; padding: 20px; border: 1px solid var(--surface-border); border-radius: 14px; background: rgba(29, 23, 26, .94); color: #c9c8d5; text-align: center; }
.guild-status { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.guild-status[hidden] { display: none; }
.inline-field { display: inline-grid; width: 180px; margin-right: 12px; vertical-align: middle; }
.item-list { display: grid; gap: 9px; }
.item-row { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--surface-border); border-radius: 11px; background: rgba(12, 10, 11, .24); color: #aaa9b8; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; transition: border-color .15s, background .15s; }
.item-row:hover { border-color: var(--surface-border-hover); background: rgba(12, 10, 11, .34); }
.item-row strong { color: #f6f5fb; font-size: 12px; }
.item-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.item-controls .button, .item-row > .button { min-height: 31px; padding-inline: 10px; font-size: 10px; }
.report-status-group { display: grid; align-content: start; gap: 9px; padding: 13px; border: 1px solid var(--surface-border); border-radius: 12px; background: rgba(12, 10, 11, .2); }
.report-status-group + .report-status-group { margin: 0; padding-top: 13px; }
#report-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.report-status-heading { display: flex; align-items: center; gap: 8px; margin: 0; color: #d8d5df; font-size: 11px; }
.report-status-heading::before { width: 7px; height: 7px; border-radius: 50%; background: #aaa9b8; content: ""; }
.report-status-open .report-status-heading::before { background: #69d7a3; }
.report-status-assigned .report-status-heading::before,
.report-status-under_review .report-status-heading::before { background: #e7bb69; }
.report-status-awaiting_info .report-status-heading::before { background: #8bb6ff; }
.report-status-closed .report-status-heading::before { background: #777481; }
.button-danger { border-color: rgba(255, 104, 118, .3); background: rgba(201, 54, 69, .13); color: #ff9aa4; }
.detail-block { display: grid; gap: 7px; max-height: 360px; overflow: auto; padding: 15px; border: 1px solid var(--surface-border); border-radius: 11px; background: rgba(12, 10, 11, .24); color: #bcbac7; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-block strong { color: #f6f5fb; }
.detail-block h4 { margin: 8px 0 0; color: #ff9aa4; }
.status-ok { border-left: 3px solid #69d7a3; }
.status-warning { border-left: 3px solid #e7bb69; }
.status-error { border-left: 3px solid #ff6876; }
.status-not-configured { border-left: 3px solid #777481; }
.diagnostic-heading { align-items: center; gap: 18px; }
.diagnostic-heading .help { margin: 8px 0 0; }
.diagnostic-heading .button { flex: 0 0 auto; }
.diagnostic-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.diagnostic-count { display: flex; min-height: 72px; flex-direction: column; justify-content: center; gap: 4px; padding: 12px 15px; border: 1px solid var(--line); border-left: 3px solid #777481; border-radius: 10px; background: rgba(29, 23, 26, .78); }
.diagnostic-count strong { color: #f6f5fb; font-size: 21px; line-height: 1; }
.diagnostic-count span { color: var(--muted); font-size: 10px; }
.diagnostic-count.status-ok { border-left-color: #69d7a3; }
.diagnostic-count.status-warning { border-left-color: #e7bb69; }
.diagnostic-count.status-error { border-left-color: #ff6876; }
.diagnostic-updated { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; text-align: right; }
.diagnostic-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.diagnostic-group { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg, rgba(45, 32, 36, .8), rgba(29, 23, 26, .94)); }
.diagnostic-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.diagnostic-group-heading h3 { margin: 0; font-size: 13px; }
.diagnostic-group-heading > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.diagnostic-items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.diagnostic-check { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-left: 3px solid #777481; border-radius: 9px; background: rgba(12, 10, 11, .22); }
.diagnostic-check[role="button"] { cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.diagnostic-check[role="button"]:hover { border-color: var(--surface-border-hover); background: rgba(255, 255, 255, .045); transform: translateY(-1px); }
.diagnostic-check[role="button"]:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px; }
.diagnostic-check.status-ok { border-left-color: #69d7a3; }
.diagnostic-check.status-warning { border-left-color: #e7bb69; }
.diagnostic-check.status-error { border-left-color: #ff6876; }
.diagnostic-copy { min-width: 0; }
.diagnostic-copy strong { color: #f6f5fb; font-size: 11px; }
.diagnostic-copy p { margin: 5px 0 0; color: #aaa9b8; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.diagnostic-status { flex: 0 0 auto; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: #c9c8d5; font-size: 9px; white-space: nowrap; }
.status-ok .diagnostic-status { border-color: rgba(105, 215, 163, .25); color: #9ce4bd; }
.status-warning .diagnostic-status { border-color: rgba(231, 187, 105, .25); color: #f0cb83; }
.status-error .diagnostic-status { border-color: rgba(255, 104, 118, .25); color: #ff9aa4; }
.diagnostic-footnote { margin-top: 15px; }
.statistics-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; }
.statistics-toolbar .button { flex: 0 0 auto; }
.statistics-toolbar .help { flex: 1 1 300px; margin: 0; line-height: 1.5; }
.statistics-updated { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.metric-card { min-height: 78px; }
.metric-card span { color: var(--muted); font-size: 11px; }
.metric-card strong { color: #ff9aa4; font-size: 24px; }
.statistics-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 10px; }
.statistics-summary .metric-card { min-height: 78px; align-content: center; gap: 6px; padding: 12px 14px; }
.statistics-summary .metric-card span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.35; }
.statistics-summary .metric-card strong { font-size: 20px; line-height: 1.1; }
.statistics-summary .metric-card small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.statistics-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; margin-top: 14px; }
.statistics-detail-card { gap: 12px; padding: 17px; }
.statistics-subsection { display: grid; gap: 8px; }
.statistics-subsection + .statistics-subsection { padding-top: 11px; border-top: 1px solid var(--line); }
.statistics-subsection h4 { margin: 0; color: #c6c4cf; font-size: 10px; font-weight: 700; }
.statistics-details .item-list { gap: 5px; }
.statistics-details .item-row { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; font-size: 10px; line-height: 1.4; }
.statistics-details .item-row strong { flex: 0 0 auto; }
.statistics-empty { margin: 0; color: var(--muted); font-size: 10px; }
#statistics-content { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 15px; padding-bottom: 42px; }
.item-row a, .detail-block a { color: #ff9aa4; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 3; max-width: min(420px, calc(100vw - 40px)); padding: 13px 16px; transform: translateY(20px); border: 1px solid rgba(101, 215, 163, .28); border-radius: 10px; background: #221b1e; color: #bdf0d2; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { transform: translateY(0); opacity: 1; }
.toast.error { border-color: rgba(255, 104, 118, .3); color: #ffabb3; }

@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 1320px); }
  .page-heading { align-items: stretch; flex-direction: column; gap: 18px; margin-top: 22px; padding: 20px; }
  .server-picker { width: 100%; }
  .dashboard-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tabs { position: sticky; top: 0; z-index: 2; display: flex; max-height: none; gap: 5px; margin-inline: -14px; overflow-x: auto; overflow-y: hidden; padding: 9px 14px; border-width: 0 0 1px; border-radius: 0; background: rgba(23, 20, 22, .96); box-shadow: 0 8px 18px rgba(0, 0, 0, .15); scrollbar-width: thin; }
  .nav-label { display: none; }
  .tab { flex: 0 0 auto; gap: 7px; padding: 7px 9px; white-space: nowrap; }
  .tab-index { width: 22px; height: 22px; }
  .settings-grid { grid-template-columns: 1fr; }
  .statistics-toolbar { align-items: flex-start; }
  .statistics-toolbar .help { flex-basis: calc(100% - 170px); }
  .statistics-details { grid-template-columns: minmax(0, 1fr); }
  #report-list { grid-template-columns: minmax(0, 1fr); }
  .diagnostic-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diagnostic-heading { align-items: stretch; flex-direction: column; }
  .diagnostic-heading .button { align-self: flex-start; }
  .field-pair { grid-template-columns: 1fr 1fr; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .form-actions .feedback { align-self: flex-start; }
}

@media (max-width: 540px) {
  .statistics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .account { gap: 7px; font-size: 10px; }
  .field-pair { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .page-heading { padding: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
