/*
  soc.pymehackers.com
  Visual language of the TryHackMe SOC Simulator (green accent, Ubuntu
  headings, 10px rem base, layout) on PYMEHackers' neutral charcoal grey
  instead of the simulator's navy, with the PYMEHackers brand.
  Surfaces (provisional trial) use X11 greys, the light ones mirroring the
  dark ones (grayN is N % of white): dark gray10 #1a1a1a (page), gray15
  #262626 (panels) and gray20 #333333 (secondary panels); light gray90
  #e5e5e5, gray85 #d9d9d9 and gray80 #cccccc. Hovered and expanded rows:
  gray25 #404040 / gray75 #bfbfbf. gray10 is also the brand's dark for
  text, PDFs and the QR code.
  Dark is the default; [data-theme="light"] is the light variant.
*/

@font-face {
  font-family: "Ubuntu";
  src: url("/static/fonts/Ubuntu-R.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu";
  src: url("/static/fonts/Ubuntu-M.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu";
  src: url("/static/fonts/Ubuntu-B.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu Mono";
  src: url("/static/fonts/UbuntuMono-R.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg-page: #1a1a1a;
  --bg-panel: #262626;
  --bg-panel-2: #333333;
  --bg-hover: #404040;
  --bg-input: #262626;
  --bg-sunken: #1a1a1a;
  --border: #3d3d3d;
  --border-soft: #333333;
  --text: #f9f9f9;
  --text-2: #ededed;
  --text-muted: #bdbdbd;
  --text-dim: #a3a3a3;
  --text-invert: #1a1a1a;
  --accent: #a3ea2a;
  --accent-text: #a3ea2a;
  --accent-soft: rgba(163, 234, 42, 0.3);
  --info: #719cf9;
  --info-strong: #1153e4;
  --info-soft: rgba(113, 156, 249, 0.12);
  --success: #3bc81e;
  --success-bg: #224633;
  --warning: #ffbb45;
  --warning-bg: #49433b;
  --error: #ff6c77;
  --error-bg: #493042;
  --purple: #dd6cff;
  --purple-bg: #412e60;
  --grey-tag: #3d3d3d;
  --shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.25);
  --shadow-pop: 0 8px 26px rgba(0, 0, 0, 0.55);
  --scrim: rgba(0, 0, 0, 0.7);
  --neutral-dot: #8a8a8a;
  --scrollbar: #6b6b6b;
}

[data-theme="light"] {
  color-scheme: light;
  /* Surfaces mirror the dark ones: as far from white as those from black. */
  --bg-page: #e5e5e5;
  --bg-panel: #d9d9d9;
  --bg-panel-2: #cccccc;
  --bg-hover: #bfbfbf;
  --bg-input: #d9d9d9;
  --bg-sunken: #e5e5e5;
  --border: #c2c2c2;
  --border-soft: #cccccc;
  /* Texts keep 4.5:1 on --bg-panel-2 (--text-muted also on --bg-hover). */
  --text: #1a1a1a;
  --text-2: #262626;
  --text-muted: #4c4c4c;
  --text-dim: #555555;
  --text-invert: #1a1a1a;
  --accent: #a3ea2a;
  --accent-text: #326005;
  --accent-soft: rgba(163, 234, 42, 0.35);
  --info: #2650ae;
  --info-strong: #0f49ca;
  --info-soft: rgba(113, 156, 249, 0.14);
  --success: #1a630b;
  --success-bg: #dff3d8;
  --warning: #7e4900;
  --warning-bg: #fdf0d8;
  --error: #a3232d;
  --error-bg: #fbe1e3;
  --purple: #8329a7;
  --purple-bg: #f2e1fa;
  --grey-tag: #c2c2c2;
  --shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 8px 26px rgba(0, 0, 0, 0.18);
  --scrim: rgba(26, 26, 26, 0.45);
  --neutral-dot: #8a8a8a;
  --scrollbar: #9e9e9e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  background-color: var(--bg-page);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-page);
  color: var(--text);
  font-family: "Source Sans Pro", "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 2.4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar) transparent;
}

h1,
h2,
h3,
h4 {
  font-family: "Ubuntu", "Source Sans Pro", sans-serif;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  overflow-wrap: anywhere;
}

h1 { font-size: 2.4rem; line-height: 3rem; }
h2 { font-size: 1.8rem; line-height: 2.4rem; }
h3 { font-size: 1.6rem; line-height: 2.2rem; }
h4 { font-size: 1.5rem; line-height: 2rem; }

p {
  margin: 0;
  overflow-wrap: anywhere;
}

a {
  color: var(--info);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

svg.icon {
  width: 1.8rem;
  height: 1.8rem;
  flex-shrink: 0;
}

.mono {
  font-family: "Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 1.4rem;
  line-height: 2rem;
}

.prewrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cell-break {
  overflow-wrap: anywhere;
  min-width: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 1.2rem 1.6rem;
  border-radius: 0.6rem;
  background: #121212;
  color: #f9f9fb;
}

.skip-link:focus-visible {
  position: fixed;
  left: 1.6rem;
  top: 1.6rem;
}

/* ---------- application shell ---------- */

.app {
  display: grid;
  grid-template-columns: 27rem minmax(0, 1fr);
  min-height: 100vh;
}

/* Two rows: the brand and the menu (which scrolls when the window is
   short) and, always at the bottom, the separator and "Sign out". */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  /* The visible height on phones, so the browser bar never hides "Sign out". */
  height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background-color: var(--bg-panel);
  z-index: 20;
  min-width: 0;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 3.2rem;
  padding: 3.2rem 3.2rem 1.2rem;
  background-color: var(--bg-panel);
  overflow-y: auto;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 5.2rem;
  height: 5.2rem;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-family: "Ubuntu", sans-serif;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-2);
}

.brand-product {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: 0.05em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-separator {
  border: 0;
  border-top: 0.1rem solid var(--border);
  width: 100%;
  margin: 1.4rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  width: 100%;
  min-width: 0;
  padding: 1.1rem 0;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-family: "Source Sans Pro", "Source Sans 3", system-ui, sans-serif;
  font-size: 1.4rem;
  line-height: 2rem;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover {
  color: var(--accent-text);
  text-decoration: none;
}

.nav-item.active {
  color: var(--accent-text);
}

.nav-item svg {
  width: 1.9rem;
  height: 1.9rem;
}

.nav-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.nav-count {
  min-width: 2.2rem;
  padding: 0 0.7rem;
  border-radius: 1.1rem;
  background-color: var(--accent);
  color: var(--text-invert);
  font-family: "Ubuntu", sans-serif;
  font-size: 1.2rem;
  line-height: 2.2rem;
  text-align: center;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 0 3.2rem 2.4rem;
  background-color: var(--bg-panel);
  min-width: 0;
}

/* Same line and spacing as the separators of the menu: 1.8rem between the
   last item and the line (padding of the menu + margin) and between the
   line and the button (margin + gap). */
.sidebar-bottom .nav-separator {
  margin: 0.6rem 0;
}

.sidebar-scrim {
  display: none;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.content {
  padding: 3.2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
  font-size: 1.4rem;
  line-height: 2rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  min-width: 0;
}

/* Title bar of every section: same colour as the panels (the header of the
   dashboard card), the title on the left and the language, the theme and
   the UTC clock on the right. */
.page-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  flex-wrap: wrap;
  min-width: 0;
  padding: 1.2rem 3.2rem;
  border-radius: 0.5rem;
  background-color: var(--bg-panel);
}

.page-title-group {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  min-width: 0;
  flex-wrap: wrap;
}

.page-title {
  font-size: 2rem;
  line-height: 2.6rem;
  min-width: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  min-width: 0;
}

.mobile-bar {
  display: none;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 3.2rem;
  height: 3.2rem;
  flex-shrink: 0;
  border: 0.1rem solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--bg-input);
  color: var(--text-muted);
  font-size: 1.4rem;
}

.icon-button:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.icon-button svg {
  width: 1.8rem;
  height: 1.8rem;
}

.theme-icon-light {
  display: none;
}

[data-theme="light"] .theme-icon-light {
  display: block;
}

[data-theme="light"] .theme-icon-dark {
  display: none;
}

.icon-badge {
  position: absolute;
  top: -0.6rem;
  right: -0.6rem;
  min-width: 1.8rem;
  padding: 0 0.5rem;
  border-radius: 0.9rem;
  background-color: var(--error);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.8rem;
  text-align: center;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  max-width: 100%;
  min-height: 3.2rem;
  padding: 0.5rem 1.4rem;
  border: 0.1rem solid transparent;
  border-radius: 0.5rem;
  font-family: "Ubuntu", sans-serif;
  font-size: 1.4rem;
  line-height: 2rem;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
  overflow-wrap: anywhere;
}

.button:hover {
  text-decoration: none;
}

.button svg {
  width: 1.4rem;
  height: 1.4rem;
}

.button-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #1a1a1a;
}

.button-primary:hover:not(:disabled) {
  background-color: var(--accent-soft);
  color: var(--text);
}

.button-secondary {
  background-color: var(--bg-sunken);
  border-color: var(--border);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  background-color: #ededed;
  border-color: #ededed;
  color: #1a1a1a;
}

.button-danger {
  background-color: transparent;
  border-color: var(--error);
  color: var(--error);
}

.button-danger:hover:not(:disabled) {
  background-color: var(--error);
  color: #1a1a1a;
}

.button-link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 1.3rem;
}

.button-link:hover {
  text-decoration: underline;
}

.button-small {
  min-height: 2.8rem;
  padding: 0.3rem 1rem;
  font-size: 1.3rem;
  line-height: 1.8rem;
}

.button-block {
  width: 100%;
}

/* The sidebar keeps its own sizes (the content area uses smaller controls). */
.sidebar .button {
  min-height: 3.6rem;
  padding: 0.6rem 1.6rem;
  font-size: 1.6rem;
  line-height: 2.2rem;
}

.sidebar .button svg {
  width: 1.6rem;
  height: 1.6rem;
}

.button:disabled {
  background-color: #9e9e9e;
  border-color: #9e9e9e;
  color: #6b6b6b;
  cursor: not-allowed;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  min-width: 0;
}

/* ---------- form controls ---------- */

.input,
.select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3.2rem;
  padding: 0.5rem 1rem 0.5rem 1.2rem;
  border: 0.1rem solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--bg-input);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 2rem;
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--info);
}

select.input,
.select {
  appearance: none;
  padding-right: 3.2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 1.7rem) 55%, calc(100% - 1.2rem) 55%;
  background-size: 0.5rem 0.5rem, 0.5rem 0.5rem;
  background-repeat: no-repeat;
}

textarea.input {
  min-height: 12rem;
  resize: vertical;
  line-height: 2.2rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

.field-label {
  font-size: 1.4rem;
  color: var(--text-2);
}

.field-help {
  font-size: 1.3rem;
  line-height: 1.8rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.6rem;
  min-width: 0;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
}

.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  cursor: pointer;
  color: var(--text-2);
}

.check input {
  width: 1.6rem;
  height: 1.6rem;
  margin: 0.3rem 0 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.check span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-box {
  position: relative;
  min-width: 0;
  flex: 0 1 36rem;
}

.search-box svg {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  width: 1.6rem;
  height: 1.6rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box .input {
  padding-left: 3.6rem;
}

.inline-form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form .input {
  flex: 1 1 20rem;
  width: auto;
}

/* Radio pills of the case report ("True positive" / "False positive"). */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  min-width: 0;
}

.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.2rem;
  padding: 0.5rem 1.2rem 0.5rem 1rem;
  border: 0.1rem solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--bg-sunken);
  color: var(--text-2);
  cursor: pointer;
}

.choice input {
  appearance: none;
  width: 1.8rem;
  height: 1.8rem;
  margin: 0;
  border: 0.1rem solid var(--border);
  border-radius: 50%;
  background-color: transparent;
  flex-shrink: 0;
}

.choice input:checked {
  border: 0.6rem solid var(--accent);
}

.choice:has(input:checked) {
  border-color: var(--accent);
}

.choice:hover {
  border-color: var(--text-muted);
}

/* Segmented switch ("Alert types" / "Alert severity"). */
.switch-group {
  display: inline-flex;
  border-radius: 0.5rem;
  flex-wrap: wrap;
}

.switch-button {
  min-height: 3.2rem;
  padding: 0.5rem 1.4rem;
  border: 0.1rem solid var(--accent);
  margin-left: -0.1rem;
  background-color: var(--bg-panel);
  color: var(--text);
  font-size: 1.4rem;
}

.switch-button:first-child {
  border-radius: 0.5rem 0 0 0.5rem;
  margin-left: 0;
}

.switch-button:last-child {
  border-radius: 0 0.5rem 0.5rem 0;
}

.switch-button[aria-pressed="true"] {
  background-color: var(--accent);
  color: #1a1a1a;
}

.switch-button:hover:not([aria-pressed="true"]) {
  background-color: var(--accent-soft);
}

/* ---------- cards ---------- */

.card {
  background-color: var(--bg-panel);
  border-radius: 0.5rem;
  padding: 2.4rem;
  min-width: 0;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
  min-width: 0;
}

.card-title {
  font-size: 1.6rem;
  line-height: 2.2rem;
  min-width: 0;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1.8rem;
}

.card-body {
  min-width: 0;
}

.card-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  min-width: 0;
}

.panel-subtitle {
  font-size: 1.4rem;
  line-height: 2rem;
  margin: 0.8rem 0 0;
}

.section-title {
  font-size: 1.6rem;
  line-height: 2.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 0.1rem solid var(--border);
  margin-bottom: 2.4rem;
}

/* Header card of the dashboards (the simulator's scenario card). */
.overview {
  border-radius: 0.5rem;
  overflow: hidden;
  min-width: 0;
}

.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.8rem 3.2rem;
  background-color: var(--bg-panel);
}

.overview-identity {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  min-width: 0;
}

.overview-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: var(--bg-sunken);
  border: 0.1rem solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.overview-avatar img {
  width: 2.6rem;
  height: 2.6rem;
}

.overview-text {
  min-width: 0;
}

.overview-text h2 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.overview-text p {
  font-size: 1.3rem;
  line-height: 1.8rem;
  color: var(--text-2);
}

.clock-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border: 0.1rem solid var(--border);
  border-radius: 0.5rem;
  font-size: 1.4rem;
  line-height: 1.8rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.clock-box span {
  color: var(--accent-text);
}

.overview-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.4rem;
  padding: 1.2rem 3.2rem;
  background-color: var(--bg-panel-2);
  font-size: 1.4rem;
  color: var(--text-2);
}

.overview-strip strong {
  color: var(--accent-text);
  font-weight: 600;
  margin-right: 0.4rem;
}

/* Stat cards ("Total alerts / within ... / 5 alerts"). */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding: 2.4rem;
  background-color: var(--bg-panel);
  border-radius: 0.5rem;
  min-width: 0;
}

.stat-head {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  min-width: 0;
}

.stat-title {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
}

.stat-title h3 {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.6rem;
  line-height: 2.2rem;
}

.stat-title h3 svg {
  width: 1.8rem;
  height: 1.8rem;
  color: var(--accent-text);
}

.stat-title p {
  font-size: 1.3rem;
  line-height: 1.8rem;
  color: var(--text-muted);
}

.stat-info {
  color: var(--neutral-dot);
  width: 1.8rem;
  height: 1.8rem;
  flex-shrink: 0;
}

.stat-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.8rem;
  font-weight: 600;
  color: #f0f0f0;
  min-width: 0;
}

[data-theme="light"] .stat-value {
  color: var(--text);
}

.stat-value b {
  font-size: 3.2rem;
  line-height: 3.4rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.stat-value span {
  font-size: 1.4rem;
  line-height: 2rem;
}

.stat-card.tone-danger .stat-title h3 svg { color: var(--error); }
.stat-card.tone-warning .stat-title h3 svg { color: var(--warning); }
.stat-card.tone-info .stat-title h3 svg { color: var(--info); }
.stat-card.tone-purple .stat-title h3 svg { color: var(--purple); }

.dashboard-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}

.chart-card {
  padding: 2.4rem;
}

.donut-wrap {
  display: flex;
  justify-content: center;
  margin: 3.6rem 0;
}

.donut {
  position: relative;
  width: 17rem;
  max-width: 100%;
  aspect-ratio: 1 / 1;
}

.donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.donut-center b {
  font-size: 2.6rem;
  line-height: 3rem;
  font-weight: 600;
}

.donut-center span {
  font-size: 1.3rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.2rem;
  border: 0.1rem solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--bg-sunken);
  color: var(--text);
  min-width: 0;
}

.legend-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.legend-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 0.1rem;
  flex-shrink: 0;
}

/* ---------- badges, tags, severity ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: max-content;
  max-width: 100%;
  padding: 0.4rem 1.2rem;
  border-radius: 3rem;
  background-color: var(--grey-tag);
  color: var(--text);
  font-family: "Ubuntu", sans-serif;
  font-size: 1.3rem;
  line-height: 1.7rem;
  overflow-wrap: anywhere;
}

.badge.status::before,
.badge.class-tp::before,
.badge.class-fp::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background-color: var(--neutral-dot);
  flex-shrink: 0;
}

.status-awaiting::before { background-color: var(--neutral-dot); }

.badge.status-progress {
  background-color: var(--info-soft);
}

.status-progress::before { background-color: var(--info) !important; }

.badge.status-resolved,
.badge.class-fp {
  background-color: var(--success-bg);
}

.status-resolved::before,
.class-fp::before {
  background-color: var(--success) !important;
}

.badge.class-tp {
  background-color: var(--error-bg);
}

.class-tp::before {
  background-color: var(--error) !important;
}

.badge.escalated {
  background-color: var(--purple-bg);
  color: var(--text);
}

.badge.muted-badge {
  background-color: var(--bg-panel-2);
  color: var(--text-muted);
}

.inline-badge {
  margin-left: 0.8rem;
  vertical-align: middle;
}

.badge-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* The simulator shows severity as coloured text. */
.badge.severity {
  padding: 0;
  border-radius: 0;
  background: none;
  font-family: "Source Sans Pro", "Source Sans 3", system-ui, sans-serif;
  font-size: 1.4rem;
  line-height: 2rem;
}

.severity-low { color: var(--success); }
.severity-medium { color: var(--info); }
.severity-high { color: var(--warning); }
.severity-critical { color: var(--error); font-weight: 600; }

.select-compact {
  width: auto;
  min-width: 10.4rem;
}

/* ---------- tables (the simulator's alert table) ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 0.5rem;
  box-shadow: 0 3px 13px 0 rgba(0, 0, 0, 0.07);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.4rem;
  line-height: 2rem;
  color: var(--text);
}

/* Column headers of every table: upper case, centred in their column. */
.table th {
  padding: 1.2rem 1.4rem;
  background-color: var(--bg-panel-2);
  border: 0.1rem solid var(--bg-panel-2);
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  line-height: 2.4rem;
  white-space: nowrap;
  color: var(--text);
  font-size: 1.3rem;
}

/* The content of every column is centred too. */
.table td {
  padding: 1.2rem 1.4rem;
  border: 0.1rem solid var(--bg-panel-2);
  vertical-align: middle;
  text-align: center;
  min-width: 0;
}

.table tbody tr:nth-child(odd) {
  background-color: var(--bg-panel);
}

.table tbody tr:nth-child(even) {
  background-color: var(--bg-panel-2);
}

.table tbody tr.clickable {
  cursor: pointer;
}

.table tbody tr.clickable:hover,
.table tbody tr.expanded {
  background-color: var(--bg-hover);
}

[data-theme="light"] .table tbody tr.clickable:hover,
[data-theme="light"] .table tbody tr.expanded {
  background-color: var(--bg-hover);
}

.table tr.expanded-row,
.table tr.expanded-row:hover {
  background-color: var(--bg-panel);
  cursor: default;
}

.table tr.expanded-row > td {
  padding: 2rem 1.4rem 2rem 6.4rem;
}

.table .cell-rule {
  min-width: 22rem;
  overflow-wrap: anywhere;
}

.table .cell-action {
  text-align: center;
  white-space: nowrap;
}

.table .cell-stack,
.cell-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
}

/* Flex groups inside a cell (status + owner, action buttons) follow the
   centred content of the column. */
.table td .cell-stack {
  align-items: center;
}

.table td .button-row {
  justify-content: center;
}

.table .mono {
  white-space: nowrap;
}

.empty-row td {
  text-align: center;
}

.empty-state {
  padding: 2rem 1.4rem;
  color: var(--text-muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.2rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}

.pager-label {
  color: var(--text-muted);
}

.rule-chevron {
  width: 1.4rem;
  height: 1.4rem;
  margin-left: 0.8rem;
  vertical-align: middle;
  color: var(--text-2);
  transition: transform 0.2s;
}

tr.expanded .rule-chevron {
  transform: rotate(180deg);
}

/* Filters bar above a table. */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 2rem;
  margin-bottom: 1.6rem;
  min-width: 0;
}

.filters .select {
  width: 15rem;
}

.filters-right {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 2rem;
  min-width: 0;
}

/* Alert details: label column and value column, as in the expanded row. */
.details-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
  min-width: 0;
}

.details-row {
  display: grid;
  grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
  gap: 1.6rem;
  min-width: 0;
}

.details-row dt {
  color: var(--text-2);
  overflow-wrap: anywhere;
  min-width: 0;
}

.details-row dt::after {
  content: ":";
}

.details-row dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
  min-width: 0;
}

.expanded-panel {
  min-width: 0;
}

.expanded-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  gap: 3.2rem;
  min-width: 0;
}

.expanded-main,
.expanded-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.expanded-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.4rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 1.6rem;
  min-width: 0;
  padding: 0.6rem 0;
  border-bottom: 0.1rem solid var(--border-soft);
}

.meta-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.meta-row > :first-child {
  /* The label keeps its words whole; a long value wraps instead. */
  flex: 0 0 auto;
  max-width: 45%;
  overflow-wrap: normal;
}

.meta-row > :last-child {
  flex: 1 1 auto;
  text-align: right;
}

/* Compact list without header (open alerts of the dashboards). */
.table.compact td {
  padding: 1rem;
}

.table.compact .cell-rule {
  min-width: 0;
}

/* ---------- callout ("Assigned alert" box of the queue) ---------- */

.callout {
  border-radius: 0.5rem;
  overflow: hidden;
  min-width: 0;
}

.callout-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 2rem;
  background-color: var(--bg-panel);
  font-size: 1.5rem;
}

.callout-body {
  padding: 1.2rem 1.4rem;
  background-color: var(--bg-panel-2);
}

.callout-inner {
  padding: 1.2rem 1.6rem;
  border: 0.1rem dashed rgba(113, 156, 249, 0.55);
  border-radius: 0.2rem;
  background-color: var(--info-soft);
  font-size: 1.4rem;
  overflow-wrap: anywhere;
}

.callout-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.callout-list a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  align-items: center;
  color: var(--text);
}

.alerts-progress {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  color: var(--text-muted);
  min-width: 0;
}

.progress {
  width: 10rem;
  height: 1.1rem;
  border-radius: 11rem;
  background-color: var(--bg-panel-2);
  overflow: hidden;
  flex-shrink: 0;
}

.progress-fill {
  height: 100%;
  background-color: var(--info-strong);
  border-radius: 11rem;
}

/* ---------- in-card tabs (the simulator's documentation tabs) ---------- */

.subtabs {
  display: flex;
  gap: 0.4rem 2.4rem;
  flex-wrap: wrap;
  border-bottom: 0.1rem solid var(--border);
  margin-bottom: 2.4rem;
}

.subtab {
  padding: 0.8rem 0.8rem 1rem;
  border: 0;
  border-bottom: 0.2rem solid transparent;
  margin-bottom: -0.1rem;
  background: transparent;
  color: var(--text-2);
  font-size: 1.4rem;
}

.subtab.active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

/* ---------- alert investigation page ---------- */

.back-title {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-width: 0;
}

.back-title a {
  display: inline-flex;
  color: var(--info);
}

.back-title svg {
  width: 2rem;
  height: 2rem;
}

.summary-table td {
  vertical-align: top;
}

.alert-head-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.watch-banner {
  padding: 1.2rem 1.6rem;
  border: 0.1rem dashed rgba(113, 156, 249, 0.55);
  border-radius: 0.5rem;
  background-color: var(--info-soft);
  overflow-wrap: anywhere;
}

.investigation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.siem-link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.4rem;
  margin-top: 1.2rem;
  border: 0.1rem solid var(--accent);
  border-radius: 0.5rem;
  background-color: var(--bg-sunken);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.siem-link:hover {
  background-color: var(--accent-soft);
  text-decoration: none;
}

.siem-link-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: "Ubuntu", sans-serif;
  font-size: 1.5rem;
  color: var(--accent-text);
}

.siem-link-url {
  font-family: "Ubuntu Mono", ui-monospace, monospace;
  font-size: 1.3rem;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

details.disclosure {
  min-width: 0;
}

details.disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--info);
  cursor: pointer;
  list-style: none;
}

details.disclosure > summary::-webkit-details-marker {
  display: none;
}

details.disclosure > summary svg {
  width: 1.4rem;
  height: 1.4rem;
  transition: transform 0.2s;
}

details.disclosure[open] > summary svg {
  transform: rotate(180deg);
}

details.disclosure > .disclosure-body {
  margin-top: 1.6rem;
}

pre.code-block,
pre.writeup-pre {
  margin: 0;
  padding: 1.6rem;
  border-radius: 0.5rem;
  background-color: var(--bg-sunken);
  border: 0.1rem solid var(--border);
  color: var(--text-2);
  font-family: "Ubuntu Mono", ui-monospace, monospace;
  font-size: 1.4rem;
  line-height: 2rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 42rem;
  overflow-y: auto;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 52rem;
  overflow-y: auto;
}

.timeline.compact {
  max-height: 30rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 1.2rem;
  padding: 0 0 1.6rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 1.6rem;
  bottom: 0;
  width: 0.2rem;
  background-color: var(--border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.5rem;
  border-radius: 50%;
  background-color: var(--border);
  border: 0.3rem solid var(--bg-panel);
  position: relative;
  z-index: 1;
}

.kind-assigned .timeline-dot { background-color: var(--info); }
.kind-note .timeline-dot { background-color: var(--accent); }
.kind-report_submitted .timeline-dot,
.kind-report_published .timeline-dot { background-color: var(--success); }
.kind-released .timeline-dot,
.kind-released_by_admin .timeline-dot,
.kind-released_automatically .timeline-dot { background-color: var(--warning); }

.timeline-content {
  min-width: 0;
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.8rem;
  align-items: baseline;
  font-size: 1.4rem;
  line-height: 2rem;
}

.timeline-who {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
  min-width: 0;
}

.timeline-what {
  color: var(--text-2);
}

.timeline-when {
  color: var(--text-dim);
  font-size: 1.2rem;
  /* Native time without spaces: 2026/10/19@05:33:19.000 */
  min-width: 0;
  overflow-wrap: anywhere;
}

.timeline-body {
  margin-top: 0.6rem;
  padding: 1rem 1.2rem;
  border-radius: 0.5rem;
  background-color: var(--bg-panel-2);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 2rem;
}

.note-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.6rem;
}

.note-form textarea.input {
  min-height: 8rem;
}

/* Incident report form: label column on the left, control on the right. */
.report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.4rem 2.8rem;
  padding: 1.8rem 0;
  min-width: 0;
}

.report-row-label {
  min-width: 0;
}

.report-row-label > span {
  display: block;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.report-row-label p {
  color: var(--text-dim);
  font-size: 1.4rem;
  line-height: 2rem;
}

.editor {
  border: 0.1rem solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--bg-sunken);
  overflow: hidden;
  min-width: 0;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
  padding: 1rem 1.6rem;
  border-bottom: 0.1rem solid var(--border);
  background-color: var(--bg-panel-2);
}

.editor textarea {
  display: block;
  width: 100%;
  min-height: 28rem;
  padding: 1.6rem;
  border: 0;
  background-color: transparent;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 2.2rem;
  resize: vertical;
}

.editor textarea:focus {
  outline: none;
}

.draft-status {
  font-size: 1.3rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.report-submit {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.6rem;
  padding-top: 2.4rem;
}

.writeup-view {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.6rem;
  border: 0.1rem solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--bg-sunken);
  overflow-wrap: anywhere;
  min-width: 0;
}

.writeup-heading {
  font-family: "Source Sans Pro", "Source Sans 3", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin-top: 1rem;
}

.writeup-heading:first-child {
  margin-top: 0;
}

.report-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  align-items: center;
  margin-bottom: 1.6rem;
}

/* ---------- access matrix ---------- */

.matrix-table th.matrix-head {
  text-align: center;
  min-width: 12rem;
  max-width: 18rem;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 2rem;
}

/* Client names (column heads) and analysts' names and e-mails (row heads)
   are data: they keep their case. Only the "Analyst" label is upper case. */
.matrix-table th.matrix-head,
.matrix-table tbody th {
  text-transform: none;
}

.matrix-cell {
  text-align: center;
}

.matrix-check {
  width: 1.8rem;
  height: 1.8rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: var(--bg-panel-2);
  min-width: 20rem;
}

.matrix-table tbody tr:nth-child(odd) .sticky-col {
  background-color: var(--bg-panel);
}

/* ---------- documentation / integration ---------- */

.doc-card .card-body {
  color: var(--text-2);
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.doc-section h3 {
  margin-bottom: 1rem;
}

.doc-section p,
.doc-section li {
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.doc-section ul,
.doc-section ol {
  margin: 0.6rem 0 0;
  padding-left: 2.4rem;
}

code.inline {
  padding: 0.1rem 0.6rem;
  border-radius: 0.4rem;
  background-color: rgba(255, 138, 0, 0.1);
  color: var(--warning);
  font-family: "Ubuntu Mono", ui-monospace, monospace;
  font-size: 1.3rem;
  overflow-wrap: anywhere;
}

.secret-box {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: flex-start;
}

.secret-value {
  display: block;
  width: 100%;
  padding: 1.2rem 1.4rem;
  border-radius: 0.5rem;
  border: 0.1rem dashed var(--accent);
  background-color: var(--bg-sunken);
  color: var(--accent-text);
  font-family: "Ubuntu Mono", ui-monospace, monospace;
  font-size: 1.4rem;
  overflow-wrap: anywhere;
}

/* ---------- modal, toasts, notifications ---------- */

/* Every pop-up (dialogs and toasts) appears in the centre of the window. */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.6rem;
  background-color: var(--scrim);
  overflow-y: auto;
}

.modal {
  /* Auto margins centre the dialog; a dialog taller than the window starts
     at the top and scrolls instead of being cut off. */
  margin: auto;
  width: 100%;
  max-width: 56rem;
  border-radius: 0.5rem;
  background-color: var(--bg-panel);
  border: 0.1rem solid var(--border);
  box-shadow: var(--shadow-pop);
  min-width: 0;
  font-size: 1.4rem;
  line-height: 2rem;
}

.modal-wide {
  max-width: 96rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  padding: 1.6rem 2rem;
  border-bottom: 0.1rem solid var(--border);
}

.modal-title {
  font-size: 1.6rem;
  line-height: 2.2rem;
  min-width: 0;
}

.modal-body {
  padding: 2rem;
  min-width: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.4rem 2rem;
  border-top: 0.1rem solid var(--border);
}

.toast-region {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.6rem;
  pointer-events: none;
}

.toast {
  max-width: min(42rem, 100%);
  width: max-content;
  padding: 1.2rem 1.6rem;
  border-radius: 0.6rem;
  border: 0.1rem solid var(--border);
  border-left: 0.4rem solid var(--info);
  background-color: var(--bg-page);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.24);
  color: var(--text);
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: auto;
  transition: opacity 0.3s, transform 0.3s;
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--error); }
.toast-leaving {
  opacity: 0;
  transform: translateY(0.8rem);
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notification {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.2rem 1.4rem;
  border-radius: 0.5rem;
  background-color: var(--bg-panel-2);
  border-left: 0.3rem solid transparent;
  min-width: 0;
}

.notification.unread {
  border-left-color: var(--accent);
}

.notification-text {
  overflow-wrap: anywhere;
}

.notification-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.notification-meta > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.loading {
  color: var(--text-muted);
  padding: 1.6rem;
}

/* ---------- login ---------- */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3.2rem;
  padding: 4.6rem;
  background-color: var(--bg-panel);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.auth-side::after {
  content: "";
  position: absolute;
  right: -12rem;
  bottom: -12rem;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  border: 0.2rem solid rgba(163, 234, 42, 0.12);
  box-shadow: 0 0 0 4rem rgba(163, 234, 42, 0.04), 0 0 0 9rem rgba(163, 234, 42, 0.03);
  pointer-events: none;
}

.auth-hero {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  max-width: 52rem;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.auth-hero h1 {
  font-size: 4rem;
  line-height: 4.6rem;
}

.auth-hero h1 .accent {
  color: var(--accent-text);
}

.auth-hero p {
  color: var(--text-muted);
  font-size: 1.8rem;
  line-height: 2.6rem;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.auth-features li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  color: var(--text-2);
  min-width: 0;
}

.auth-features svg {
  width: 2rem;
  height: 2rem;
  color: var(--accent-text);
  margin-top: 0.2rem;
}

.auth-main {
  display: flex;
  flex-direction: column;
  padding: 3.2rem 4.6rem;
  min-width: 0;
}

.auth-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.2rem 0;
}

.auth-card {
  width: 100%;
  max-width: 44rem;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.auth-card h2 {
  font-size: 3.2rem;
  line-height: 3.8rem;
}

.auth-card p {
  color: var(--text-muted);
}

.password-wrap {
  position: relative;
}

.password-wrap .input {
  padding-right: 5rem;
}

.password-wrap .icon-button {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: 0;
  background: transparent;
}

.form-error {
  padding: 1.2rem 1.4rem;
  border-radius: 0.5rem;
  background-color: var(--error-bg);
  color: var(--text);
  border-left: 0.3rem solid var(--error);
  overflow-wrap: anywhere;
}

.page-plain {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.6rem;
}

.plain-box {
  text-align: center;
}

/* ---------- responsive ---------- */

/* ---------- escalations, agreed times (SLA), notices, two-step verification ---------- */

.badge.status-escalated {
  background-color: var(--purple-bg);
}

.status-escalated::before {
  background-color: var(--purple) !important;
}

/* Time left to take an alert within its agreed time. */
.sla-chip {
  display: inline-block;
  max-width: 100%;
  font-size: 1.3rem;
  line-height: 1.8rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.sla-chip.sla-soon {
  color: var(--warning);
}

.sla-chip.sla-overdue {
  color: var(--error);
  font-weight: 600;
}

.sla-rate.sla-good { color: var(--success); }
.sla-rate.sla-fair { color: var(--warning); }
.sla-rate.sla-bad { color: var(--error); font-weight: 600; }

.table tbody tr.total-row td {
  font-weight: 600;
}

/* Ten columns with long headers: they may wrap, so the table fits. */
.sla-report-table th {
  white-space: normal;
  line-height: 2.2rem;
}

.sla-form .input {
  min-width: 0;
  max-width: 12rem;
  margin: 0 auto;
  text-align: center;
}

.fieldset {
  min-width: 0;
  margin: 0;
  padding: 1.6rem;
  border: 0.1rem solid var(--border);
  border-radius: 0.5rem;
}

.fieldset legend {
  padding: 0 0.6rem;
  font-family: "Ubuntu", sans-serif;
}

.escalation-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  padding: 1.4rem 1.6rem;
  border-radius: 0.5rem;
  border-left: 0.3rem solid var(--purple);
  background-color: var(--bg-panel-2);
  overflow-wrap: anywhere;
}

.escalation-box.is-acknowledged {
  border-left-color: var(--success);
}

.escalation-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  align-items: center;
  margin-bottom: 0.6rem;
  min-width: 0;
}

.callout-alarm .callout-head {
  border-left: 0.4rem solid var(--purple);
}

.callout-alarm .callout-inner {
  border-color: var(--purple);
  background-color: var(--purple-bg);
}

.escalation-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.escalation-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.6rem;
  min-width: 0;
  padding: 0.8rem 1.2rem;
  border-radius: 0.4rem;
  background-color: var(--bg-panel);
}

.escalation-item-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.2rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding-left: 2.2rem;
  overflow-wrap: anywhere;
}

/* Two-step verification: QR code next to the secret, recovery codes. */
.mfa-setup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  min-width: 0;
}

.qr-image {
  display: block;
  width: 20rem;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  background-color: #ffffff;
}

.otp-input {
  font-family: "Ubuntu Mono", ui-monospace, monospace;
  font-size: 2rem;
  letter-spacing: 0.3rem;
  text-align: center;
}

.code-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.6rem;
  margin: 0;
  padding: 1.4rem 1.6rem;
  border: 0.1rem dashed var(--accent);
  border-radius: 0.5rem;
  background-color: var(--bg-sunken);
  list-style: none;
  font-size: 1.5rem;
  color: var(--accent-text);
}

.code-list li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-card.auth-card-wide {
  max-width: 60rem;
}

/* The acknowledgement page of an escalation has no side panel. */
.auth-page.ack-page {
  grid-template-columns: minmax(0, 1fr);
}

.ack-page .auth-toolbar {
  align-items: center;
}

.ack-page .auth-toolbar .brand {
  margin-right: auto;
}

.ack-title {
  font-size: 3.2rem;
  line-height: 3.8rem;
}

.ack-result {
  padding: 1.2rem 1.4rem;
  border-radius: 0.5rem;
  border-left: 0.3rem solid var(--success);
  background-color: var(--success-bg);
  overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .investigation-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1024px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(30rem, 86%);
    transform: translateX(-100%);
    transition: transform 0.25s ease-in-out;
    box-shadow: var(--shadow-pop);
    z-index: 60;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: var(--scrim);
  }

  body.sidebar-open .sidebar-scrim {
    display: block;
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    min-height: 6rem;
    padding: 0.8rem 1.6rem;
    background-color: var(--bg-panel-2);
    border-bottom: 0.1rem solid var(--border);
  }

  .mobile-bar .brand img {
    width: 3.6rem;
    height: 3.6rem;
  }

  .mobile-bar .brand-name {
    font-size: 1.2rem;
  }

  .mobile-bar .brand-product {
    font-size: 1.7rem;
  }

  .dashboard-panels,
  .card-split,
  .auth-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-side {
    padding: 3.2rem 2.4rem;
  }

  .content {
    padding: 2.8rem 2.4rem;
  }
}

@media (max-width: 768px) {
  .page-bar,
  .overview-head,
  .overview-strip {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .report-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .expanded-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .table tr.expanded-row > td {
    padding: 1.6rem;
  }

  .details-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .form-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .chart-card {
    padding: 2.4rem;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 2.4rem 1.6rem;
  }

  .page-bar {
    padding: 1rem 1.6rem;
  }

  /* Bell, language, theme and clock in one row from 360 px. */
  .page-actions {
    gap: 0.8rem;
  }

  .page-bar .select-compact {
    min-width: 8.6rem;
  }

  .page-title {
    font-size: 1.8rem;
    line-height: 2.4rem;
  }

  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
  }

  .stat-card {
    gap: 1.6rem;
    padding: 2rem;
  }

  .stat-value b {
    font-size: 2.8rem;
    line-height: 3rem;
  }

  .card {
    padding: 2rem 1.6rem;
  }

  .filters .select,
  .search-box {
    width: 100%;
    flex: 1 1 100%;
  }

  .filters-right {
    margin-left: 0;
    width: 100%;
  }

  .filters-right .select {
    flex: 1 1 14rem;
    width: auto;
  }

  .filters-right .button-link {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .table th,
  .table td {
    padding: 1rem 1.2rem;
  }

  .table .cell-rule {
    min-width: 18rem;
  }

  /* On phones the main tables become one card per row with labelled
     fields, as the simulator does ("ID:", "Alert rule:"...). */
  .table-stack thead {
    display: none;
  }

  .table-stack,
  .table-stack tbody,
  .table-stack tr {
    display: block;
    width: 100%;
  }

  .table-stack tbody tr {
    padding: 0.8rem 0;
    border-bottom: 0.1rem solid var(--border);
  }

  .table-stack td {
    display: grid;
    grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
    column-gap: 1.2rem;
    row-gap: 0.2rem;
    align-items: center;
    width: 100%;
    padding: 0.6rem 1.2rem;
    border: 0;
    /* Native times (2026/10/29@13:59:59.723) and alert codes have no spaces. */
    overflow-wrap: anywhere;
  }

  /* The label takes the first column; every piece of the value (rule,
     chevron, client...) stacks in the second one. */
  .table-stack td::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
    color: var(--text-muted);
    overflow-wrap: anywhere;
  }

  .table-stack td > * {
    grid-column: 2;
    justify-self: center;
    min-width: 0;
  }

  .table-stack .cell-rule {
    min-width: 0;
  }

  .table-stack td.cell-action {
    text-align: center;
  }

  .table-stack tr.expanded-row > td,
  .table-stack tr.empty-row > td {
    display: block;
  }

  .table-stack tr.expanded-row > td::before,
  .table-stack tr.empty-row > td::before {
    content: none;
  }

  pre.code-block,
  pre.writeup-pre {
    padding: 1rem;
    font-size: 1.2rem;
    line-height: 1.7rem;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 1.6rem;
    padding-right: 1.6rem;
  }

  .auth-main {
    padding: 2rem 1.6rem;
  }

  .auth-hero h1 {
    font-size: 3rem;
    line-height: 3.6rem;
  }

  .clock-box {
    font-size: 1.4rem;
  }

  .legend-item {
    padding: 0.6rem 1rem;
  }
}

@media (max-width: 480px) {
  /* One filter per line: two would truncate their labels. */
  .filters-right .select {
    flex-basis: 100%;
  }

  .mfa-setup {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .code-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .ack-title {
    font-size: 2.6rem;
    line-height: 3.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
