:root {
  --bg0: #050a14;
  --bg1: #091428;

  --surface: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.08);

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.7);
  --muted2: rgba(255, 255, 255, 0.56);

  --teal: #00ffbf;
  --teal2: #2ef2b1;

  --danger: #ff4f7a;
  --danger2: #ff335f;

  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  --radius: 18px;
  --radius-sm: 12px;

  --ring: 0 0 0 2px rgba(64, 255, 192, 0.35);

  --bg-soft: rgba(255, 255, 255, 0.03);
  --bg-input: rgba(0, 0, 0, 0.25);
  --line2: rgba(255, 255, 255, 0.12);
  --panel2: rgba(255, 255, 255, 0.03);

  --font:
    "Manrope", "Terminal Dosis", "Space Grotesk", ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Segoe UI Emoji";
  --font-head: "Space Grotesk", "Manrope", ui-sans-serif, system-ui, sans-serif;

  /* Type scale (consistent sizes app-wide) */
  --fs-h1: clamp(24px, 2.2vw, 30px);
  --fs-h2: 20px;
  --fs-h3: 16px;
  --fs-h4: 14px;
  --fs-body: 14px;
  --fs-sm: 12.5px;
  --fs-xs: 11.5px;

  /* Font weights (loaded: Manrope 400/500/600/700/800, Space Grotesk 500/600/700) */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background-color: #080c16;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(
    180deg,
    rgba(11, 18, 32, 0.96),
    rgba(8, 12, 22, 0.96)
  );
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  opacity: 0.18;
  pointer-events: none;
  mix-blend-mode: overlay;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: var(--fw-bold);
  line-height: 1.2;
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}
h4 {
  font-size: var(--fs-h4);
}

[hidden] {
  display: none !important;
}

/* Allow dropdown menus to escape containers */
.panel,
.section-edit,
.wizard-shell {
  overflow: visible;
}

/* The workspace wrapper is a layout container, not a card. Drop the panel
   tint/border/blur so it doesn't render as a lighter band that "cuts off"
   where the shell ends; the sidebar and inner panels provide the structure.
   Uses .panel.wizard-shell to out-specify the later `.panel` rule. */
.panel.wizard-shell {
  /* 
  border: 0;
  border-radius: 0;
  backdrop-filter: none; */
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  backdrop-filter: none;
}

.bg-transparent {
  background: transparent !important;
}

.height-auto {
  height: auto !important;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-uppercase {
  text-transform: uppercase !important;
}

optgroup,
select,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* ===============================
   Helpers
================================ */
.m-0 {
  margin: 0 !important;
}
.m-1 {
  margin: 0.25rem !important;
}
.m-2 {
  margin: 0.5rem !important;
}
.m-3 {
  margin: 1rem !important;
}
.m-4 {
  margin: 1.5rem !important;
}
.m-5 {
  margin: 3rem !important;
}
.m-auto {
  margin: auto !important;
}

.mx-0 {
  margin-right: 0 !important;
  margin-left: 0 !important;
}
.mx-1 {
  margin-right: 0.25rem !important;
  margin-left: 0.25rem !important;
}
.mx-2 {
  margin-right: 0.5rem !important;
  margin-left: 0.5rem !important;
}
.mx-3 {
  margin-right: 1rem !important;
  margin-left: 1rem !important;
}
.mx-4 {
  margin-right: 1.5rem !important;
  margin-left: 1.5rem !important;
}
.mx-5 {
  margin-right: 3rem !important;
  margin-left: 3rem !important;
}
.mx-auto {
  margin-right: auto !important;
  margin-left: auto !important;
}

.my-0 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.my-1 {
  margin-top: 0.25rem !important;
  margin-bottom: 0.25rem !important;
}
.my-2 {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}
.my-3 {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}
.my-4 {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}
.my-5 {
  margin-top: 3rem !important;
  margin-bottom: 3rem !important;
}
.my-auto {
  margin-top: auto !important;
  margin-bottom: auto !important;
}

.mt-0 {
  margin-top: 0 !important;
}
.mt-1 {
  margin-top: 0.25rem !important;
}
.mt-2 {
  margin-top: 0.5rem !important;
}
.mt-3 {
  margin-top: 1rem !important;
}
.mt-4 {
  margin-top: 1.5rem !important;
}
.mt-5 {
  margin-top: 3rem !important;
}
.mt-auto {
  margin-top: auto !important;
}

.me-0 {
  margin-right: 0 !important;
}
.me-1 {
  margin-right: 0.25rem !important;
}
.me-2 {
  margin-right: 0.5rem !important;
}
.me-3 {
  margin-right: 1rem !important;
}
.me-4 {
  margin-right: 1.5rem !important;
}
.me-5 {
  margin-right: 3rem !important;
}
.me-auto {
  margin-right: auto !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1 {
  margin-bottom: 0.25rem !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-3 {
  margin-bottom: 1rem !important;
}
.mb-4 {
  margin-bottom: 1.5rem !important;
}
.mb-5 {
  margin-bottom: 3rem !important;
}
.mb-auto {
  margin-bottom: auto !important;
}

.mb-6 {
  margin-bottom: 0.875rem !important;
}

.ms-0 {
  margin-left: 0 !important;
}
.ms-1 {
  margin-left: 0.25rem !important;
}
.ms-2 {
  margin-left: 0.5rem !important;
}
.ms-3 {
  margin-left: 1rem !important;
}
.ms-4 {
  margin-left: 1.5rem !important;
}
.ms-5 {
  margin-left: 3rem !important;
}
.ms-auto {
  margin-left: auto !important;
}

.p-0 {
  padding: 0 !important;
}
.p-1 {
  padding: 0.25rem !important;
}
.p-2 {
  padding: 0.5rem !important;
}
.p-3 {
  padding: 1rem !important;
}
.p-4 {
  padding: 1.5rem !important;
}
.p-5 {
  padding: 3rem !important;
}

.px-0 {
  padding-right: 0 !important;
  padding-left: 0 !important;
}
.px-1 {
  padding-right: 0.25rem !important;
  padding-left: 0.25rem !important;
}
.px-2 {
  padding-right: 0.5rem !important;
  padding-left: 0.5rem !important;
}
.px-3 {
  padding-right: 1rem !important;
  padding-left: 1rem !important;
}
.px-4 {
  padding-right: 1.5rem !important;
  padding-left: 1.5rem !important;
}
.px-5 {
  padding-right: 3rem !important;
  padding-left: 3rem !important;
}

.py-0 {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.py-1 {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}
.py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}
.py-3 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}
.py-4 {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}
.py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.pt-0 {
  padding-top: 0 !important;
}
.pt-1 {
  padding-top: 0.25rem !important;
}
.pt-2 {
  padding-top: 0.5rem !important;
}
.pt-3 {
  padding-top: 1rem !important;
}
.pt-4 {
  padding-top: 1.5rem !important;
}
.pt-5 {
  padding-top: 3rem !important;
}

.pe-0 {
  padding-right: 0 !important;
}
.pe-1 {
  padding-right: 0.25rem !important;
}
.pe-2 {
  padding-right: 0.5rem !important;
}
.pe-3 {
  padding-right: 1rem !important;
}
.pe-4 {
  padding-right: 1.5rem !important;
}
.pe-5 {
  padding-right: 3rem !important;
}

.pb-0 {
  padding-bottom: 0 !important;
}
.pb-1 {
  padding-bottom: 0.25rem !important;
}
.pb-2 {
  padding-bottom: 0.5rem !important;
}
.pb-3 {
  padding-bottom: 1rem !important;
}
.pb-4 {
  padding-bottom: 1.5rem !important;
}
.pb-5 {
  padding-bottom: 3rem !important;
}

.ps-0 {
  padding-left: 0 !important;
}
.ps-1 {
  padding-left: 0.25rem !important;
}
.ps-2 {
  padding-left: 0.5rem !important;
}
.ps-3 {
  padding-left: 1rem !important;
}
.ps-4 {
  padding-left: 1.5rem !important;
}
.ps-5 {
  padding-left: 3rem !important;
}

.d-none {
  display: none !important;
}

.border-bottom-none {
  border-bottom: none !important;
}

.border-bottom {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.cursor-pointer {
  cursor: pointer;
}

/* Rename casename */
#assessmentCaseName {
  position: relative;
  cursor: text;
}

#assessmentCaseName:hover {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

/* icon hidden by default */
.edit-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* show icon on hover */
#assessmentCaseName:hover .edit-icon {
  opacity: 0.6;
}

/* clearer feedback while editing */
#assessmentCaseName:focus {
  outline: 2px dashed var(--teal2);
}

.case-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.case-title {
  margin: 0;
  outline: none;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  opacity: 0.75;
  transition: 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.is-hidden {
  display: none !important;
}

/* Optional: show subtle editing state */
.case-title.is-editing {
  text-decoration: underline dotted rgba(255, 255, 255, 0.35);
  text-underline-offset: 6px;
}

/* ONE mono definition */
.mono {
  font-variant-numeric: tabular-nums;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

/* ===============================
   Dechefr Alerts
================================ */
.alert-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.alert:empty,
.msg:empty {
  display: none !important;
}

.alert {
  position: relative;
  padding: 12px 42px 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.35;
  backdrop-filter: blur(10px);
  border: 1px solid transparent;
  animation: fadeIn 0.2s ease-out;
}

.alert .close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  background: transparent;
  color: inherit;
  opacity: 0.7;
}
.alert .close:hover {
  opacity: 1;
}

.alert.error {
  background: rgba(255, 80, 110, 0.12);
  border-color: rgba(255, 80, 110, 0.35);
  color: #ff8fa3;
}
.alert.success {
  background: rgba(64, 255, 192, 0.12);
  border-color: rgba(64, 255, 192, 0.35);
  color: #7fffd4;
}
.alert.warning {
  background: rgba(255, 200, 120, 0.12);
  border-color: rgba(255, 200, 120, 0.35);
  color: #ffd59a;
}
.alert.info {
  background: rgba(120, 170, 255, 0.12);
  border-color: rgba(120, 170, 255, 0.35);
  color: #b8ccff;
}

/* ERROR MESSAGES */
.error-status {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-areas:
    "icon title"
    "icon text"
    "icon sub"
    "icon actions";
  gap: 8px;
}

.error-status__icon {
  grid-area: icon;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.error-status__title {
  grid-area: title;
  margin: 0;
}
.error-status__text {
  grid-area: text;
  margin: 0;
}
.error-status__subtext {
  grid-area: sub;
  margin: 0;
  opacity: 0.75;
}
.error-status__actions {
  grid-area: actions;
  margin-top: 8px;
}

/* state */
.error-status--error .error-status__icon {
  background: rgba(255, 86, 86, 0.12);
  border: 1px solid rgba(255, 86, 86, 0.35);
}

.kpi.immediate {
  background: rgba(255, 70, 70, 0.14);
  border-color: rgba(255, 70, 70, 0.26);
}

.active {
  border-color: rgba(64, 255, 192, 0.26);
  background: rgba(64, 255, 192, 0.1);
}

.immediate {
  background: rgba(255, 70, 70, 0.14);
  border-color: rgba(255, 70, 70, 0.26);
}

.high {
  background: rgba(255, 60, 120, 0.14);
  border-color: rgba(255, 60, 120, 0.26);
}

.medium {
  background: rgba(255, 196, 120, 0.14);
  border-color: rgba(255, 196, 120, 0.26);
}

.low {
  background: rgba(60, 210, 140, 0.14);
  border-color: rgba(60, 210, 140, 0.26);
}

.ok {
  border-color: rgba(64, 255, 192, 0.22);
  background: rgba(64, 255, 192, 0.1);
}

.warn {
  border-color: rgba(255, 196, 120, 0.22);
  background: rgba(255, 196, 120, 0.1);
}

.bad {
  border-color: rgba(255, 79, 122, 0.24);
  background: rgba(255, 79, 122, 0.1);
}

/* ===============================
   Top nav
================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  width: min(1200px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(64, 255, 192, 0.12);
  border: 1px solid rgba(64, 255, 192, 0.25);
  color: var(--teal);
  flex: 0 0 auto;
}

.brand-name {
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 13px;
  opacity: 0.95;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  justify-content: flex-end;
}

/* ===============================
   Search (single definition; responsive display below)
================================ */
.search {
  width: min(520px, 100%);
  position: relative;
  flex: 1;
  max-width: 520px;
}

.search input {
  width: 100%;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  outline: none;
  padding: 0 12px 0 40px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.search input:focus {
  border-color: rgba(64, 255, 192, 0.55);
  box-shadow: var(--ring);
  background: rgba(0, 0, 0, 0.24);
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

/* ===============================
   Icon button (single definition; size overrides scoped)
================================ */
.iconbtn {
  width: 32px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}

.iconbtn:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.iconbtn svg {
  width: 18px;
  height: 18px;
}

/* Account dropdown (Dechefr dark/teal) */
.user {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  user-select: none;
}

.user:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(64, 255, 192, 0.14);
  border-color: rgba(64, 255, 192, 0.28);
}

.user-ava {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(64, 255, 192, 0.1);
  border: 1px solid rgba(64, 255, 192, 0.18);
}

.user-ava svg {
  width: 18px;
  height: 18px;
  color: rgba(64, 255, 192, 0.9);
}

.user-label {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.user-caret svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.65);
}

/* Menu */
.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 220px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(10, 14, 24, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  display: none;
  transform: translateY(-6px);
  opacity: 0;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
  z-index: 1000;
}

.user.is-open .user-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-weight: 750;
  font-size: 13px;
  border: 1px solid transparent;
}

.user-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.user-item:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(64, 255, 192, 0.12);
}

.user-item .mi {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
}

.user-item .mi svg {
  width: 16px;
  height: 16px;
}

.user-sep {
  height: 1px;
  margin: 8px 6px;
  background: rgba(255, 255, 255, 0.08);
}

/* Danger (logout) */
.user-item.danger {
  color: rgba(255, 120, 155, 0.95);
}
.user-item.danger .mi {
  background: rgba(255, 79, 122, 0.1);
  border-color: rgba(255, 79, 122, 0.18);
  color: rgba(255, 120, 155, 0.95);
}
.user-item.danger:hover {
  background: rgba(255, 79, 122, 0.08);
  border-color: rgba(255, 79, 122, 0.18);
}

/* ===============================
   Main container / layout
================================ */
.main {
  display: flex;
  justify-content: center;
  padding: 34px 22px 56px;
}

/* ONE .container definition (no duplicate) */
.container {
  width: min(1200px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px; /* base gap for most pages */
}

/* If you want the larger spacing on the dashboard main container */
.main .container {
  gap: 20px;
}

/* Page header row (ONE definition; dashboard can override font-size) */
.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.pagehead h1 {
  margin: 0 0 6px;
  font-size: var(--fs-h1);
  letter-spacing: 0.2px;
}

.pagehead p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 740px;
}

/* Dashboard variant */

/* Head actions (kept) */
.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===============================
   Buttons
================================ */
.btn {
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
  white-space: nowrap;
  user-select: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-sm {
  height: 30px;
  padding: 0 8px;
}

.btn-primary {
  color: #02110c;
  border: 0;
  background: linear-gradient(135deg, var(--teal2), var(--teal));
}
.btn-primary:hover {
  filter: brightness(1.03);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(64, 255, 192, 0.4);
  color: var(--teal);
}
.btn-outline:hover {
  background: rgba(64, 255, 192, 0.1);
}

.btn-soft {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}
.btn-soft:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Save-button states: clean (saved, no changes) = muted/inert */
.btn.is-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* dirty (unsaved changes) = small indicator dot on the primary button */
.btn.is-dirty::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(2, 17, 12, 0.85);
}

/* ===============================
   Panels (ONE definition)
================================ */
.panel {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.panel-hd {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.em__panelHd,
.si__panelHd {
  padding: 10px 18px !important;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: var(--fw-black);
  font-size: var(--fs-h3);
  letter-spacing: 0.2px;
}

.panel-title svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.85);
}

.panel-sub {
  color: var(--muted2);
  font-size: var(--fs-sm);
  margin-top: 2px;
  font-weight: var(--fw-semibold);
}

.panel-bd {
  padding: 16px;
}

/* ===============================
   Quick actions / grids
================================ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.quick-rows {
  display: flex;
  flex-direction: column;
  gap: 14px; /* same gap as your grid */
}

.quick-grid--2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.quick-grid--3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

@media (max-width: 720px) {
  .quick-grid--2,
  .quick-grid--3 {
    grid-template-columns: 1fr;
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tile {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease;
  min-height: 96px;
  overflow: hidden;
}

.tile:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(64, 255, 192, 0);
  transition: background 0.14s ease;
}

.tile:hover::before {
  background: rgba(64, 255, 192, 0.55);
}

.tile-primary {
  border-color: rgba(64, 255, 192, 0.22);
  background: linear-gradient(
    180deg,
    rgba(64, 255, 192, 0.08),
    rgba(255, 255, 255, 0.04)
  );
}
.tile-primary::before {
  background: rgba(64, 255, 192, 0.55);
}

.tile-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(64, 255, 192, 0.12);
  border: 1px solid rgba(64, 255, 192, 0.22);
  color: var(--teal);
  flex: 0 0 auto;
}

.badge.muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.tile-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tile-title {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 15.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-desc {
  color: var(--muted2);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-arrow {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  flex: 0 0 auto;
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease;
}

.tile:hover .tile-arrow {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

/* ===============================
   Activity / tables
================================ */
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th,
.table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted2);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.table td {
  color: rgba(255, 255, 255, 0.86);
}

.rowlink {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 700;
}
.rowlink:hover {
  color: var(--teal);
}

.chip.teal {
  border-color: rgba(64, 255, 192, 0.26);
  background: rgba(64, 255, 192, 0.1);
  color: rgba(255, 255, 255, 0.88);
}

.chip.gray {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
}

.chip.amber {
  border-color: rgba(255, 196, 120, 0.22);
  background: rgba(255, 196, 120, 0.1);
  color: rgba(255, 255, 255, 0.86);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  max-width: 100%;
}

.chip-file {
  color: inherit;
  text-decoration: none;
}

.chip-label {
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chip-edit {
  padding-right: 6px;
}

.chip-delete {
  border: 0;
  background: transparent;
  color: #ff6b6b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.chip-delete:hover {
  color: #ff3b3b;
}

.chip.is-marked-delete {
  opacity: 0.45;
  text-decoration: line-through;
}

.empty {
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ===============================
   KPI cards
================================ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.kpi {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 12px;
}

.kpi-label {
  color: var(--muted2);
  font-size: var(--fs-sm);
}

.kpi-value {
  font-size: 18px;
  font-weight: 800;
  margin-top: 6px;
}

/* ===============================
   Generic page wrappers
================================ */
.page {
  display: flex;
  min-height: calc(100vh - 60px);
  padding: 34px 22px 56px;
  color: var(--text);
  font-family: var(--font);
}

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===============================
   Toolbar (table pages)
================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

/* Toolbar-specific search tweaks (no duplicate .search block) */
.toolbar .search {
  min-width: 260px;
}
.toolbar .search input {
  padding: 0 12px 0 38px;
}
.toolbar .search svg {
  width: 16px;
  height: 16px;
}

.search-right {
  margin-left: auto;
}

/* ===============================
   Filter chips
================================ */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.chipbtn {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 800;
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

.chipbtn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.chipbtn.active {
  border-color: rgba(64, 255, 192, 0.3);
  background: rgba(64, 255, 192, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

/* ===============================
   Big table styles
================================ */
.tablewrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  font-size: 13.5px;
}

thead th {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  color: var(--muted2);
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.25px;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.link {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 800;
}
.link:hover {
  color: var(--teal);
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
}

.pill.active {
  border-color: rgba(64, 255, 192, 0.26);
  background: rgba(64, 255, 192, 0.1);
}

.pill.immediate {
  background: rgba(255, 70, 70, 0.14);
  border-color: rgba(255, 70, 70, 0.26);
}
.pill.high {
  background: rgba(255, 60, 120, 0.14);
  border-color: rgba(255, 60, 120, 0.26);
}
.pill.medium {
  background: rgba(255, 196, 120, 0.14);
  border-color: rgba(255, 196, 120, 0.26);
}
.pill.low {
  background: rgba(60, 210, 140, 0.14);
  border-color: rgba(60, 210, 140, 0.26);
}
.pill.ok {
  border-color: rgba(64, 255, 192, 0.22);
  background: rgba(64, 255, 192, 0.1);
}
.pill.warn {
  border-color: rgba(255, 196, 120, 0.22);
  background: rgba(255, 196, 120, 0.1);
}
.pill.bad {
  border-color: rgba(255, 79, 122, 0.24);
  background: rgba(255, 79, 122, 0.1);
}

/* Icon actions: smaller iconbtn ONLY in this area (no duplicate .iconbtn block) */
.icon-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.icon-actions .iconbtn {
  width: 36px;
  height: 36px;
}

.iconbtn.view {
  color: var(--teal);
}
.iconbtn.delete {
  color: rgba(255, 80, 120, 0.95);
}

/* Footer / pager */
.footerbar {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--muted2);
  font-size: 13px;
}

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagebtn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.pagebtn.active {
  border-color: rgba(64, 255, 192, 0.3);
  background: rgba(64, 255, 192, 0.1);
}

/* ===============================
   Modal
================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.modal {
  width: min(560px, 100%);
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(18, 24, 38, 0.98),
    rgba(10, 14, 24, 0.98)
  );
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  opacity: 0;
  animation: modalIn 0.18s ease-out forwards;
}

@keyframes modalIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (prefers-contrast: more) {
  .modal {
    background: #0b0f1a;
    border-color: rgba(255, 255, 255, 0.22);
  }
}

.modal-hd {
  padding: 16px 16px 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 79, 122, 0.12);
  border: 1px solid rgba(255, 79, 122, 0.22);
  color: rgba(255, 255, 255, 0.92);
  flex: 0 0 auto;
}

.modal-icon svg {
  width: 22px;
  height: 22px;
  color: var(--danger);
}

.modal-titles h3 {
  margin: 0 0 4px 0;
  font-size: var(--fs-h3);
  letter-spacing: 0.2px;
}

.modal-titles p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13.5px;
  line-height: 1.45;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-bd {
  padding: 14px 16px 6px;
}

.modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

.modal-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.modal-value {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13.5px;
  font-weight: 800;
  text-align: right;
  max-width: 68%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-ft {
  padding: 12px 16px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger2), var(--danger));
  color: #20060d;
}
.btn-danger:hover {
  filter: brightness(1.02);
}

/* KV inside modal only (prevents conflicts elsewhere) */
.modal .kv {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.modal .k {
  color: var(--muted2);
  font-weight: 800;
}
.modal .v {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

/* ===============================
   Dechefr case wrapper
================================ */
.dechefr-lingmark-color {
  color: var(--teal2);
}
.dechefr-case {
  background:
    radial-gradient(
      1200px 600px at 20% -10%,
      rgba(64, 255, 192, 0.08),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  min-height: 100vh;
  color: var(--text);
}

.kv {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
}

.k {
  color: var(--muted2);
  font-weight: 800;
}

.v {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

/* Link button */
.link-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.textblock {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  padding: 12px 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  line-height: 1.6;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tag {
  height: 38px;
  padding: 10px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  font-size: 12px;
}

/* ===============================
   Case page header / file list
================================ */
/* Minimal icon button that matches Dechefr buttons */
.btn.btn-icon {
  height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
  font-weight: var(--fw-black);
  cursor: pointer;
  line-height: 1;
}

.btn.btn-icon:hover {
  border-color: rgba(64, 255, 192, 0.25);
  background: rgba(64, 255, 192, 0.08);
}

/* ======================================================
   EDIT MODE WRAPPER
====================================================== */
.case-page .section-edit {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background:
    radial-gradient(
      800px 200px at 10% 0%,
      rgba(64, 255, 192, 0.1),
      transparent 55%
    ),
    var(--bg-soft);
  animation: editIn 0.15s ease-out;
}

@keyframes editIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-edit label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12px;
  color: var(--muted);
}

.section-edit input,
.section-edit textarea,
.section-edit select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
}

.section-edit textarea {
  min-height: 96px;
  resize: vertical;
}

.section-edit input::placeholder,
.section-edit textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.section-edit input:focus,
.section-edit textarea:focus,
.section-edit select:focus {
  outline: none;
  border-color: rgba(64, 255, 192, 0.55);
}

.section-edit input[type="date"],
.section-edit input[type="datetime-local"] {
  color-scheme: dark;
}

.section-edit .btn {
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.section-edit .btn-save,
.section-edit .btn-success,
.section-edit .btn-fill-dechefr {
  background: linear-gradient(135deg, var(--teal2), var(--teal));
  border: none;
  color: #03130d;
}

.section-edit .btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
}

.section-edit .btn-outline-danger {
  background: rgba(255, 79, 122, 0.14);
  border: 1px solid rgba(255, 79, 122, 0.35);
  color: var(--text);
}

/* ===============================
   Dechefr unified dropdown
================================ */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  width: 100%;
  height: 35px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.dropdown-toggle::after {
  content: "▾";
  color: rgba(255, 255, 255, 0.6);
}

.dropdown-menu {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  padding: 6px;
  border-radius: 14px;
  background: rgba(10, 14, 24, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: none;
}

.dropdown.is-open .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 750;
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(64, 255, 192, 0.12);
}

.dropdown-multi .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.dropdown-multi input[type="checkbox"] {
  display: none;
}

.dropdown-multi .checkmark {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
}

.dropdown-multi input[type="checkbox"]:checked + .checkmark {
  background: rgba(64, 255, 192, 0.25);
  border-color: rgba(64, 255, 192, 0.9);
}

.dropdown-multi input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  font-size: 12px;
  color: #bfffe8;
}

.dropdown-multi .item-text {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

/* Group wrapper */
.dropdown-group {
  padding: 6px 0;
}

/* Group title (non-clickable) */
.dropdown-group__title {
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: var(--fw-black);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.65;
  pointer-events: none;
}

/* Sub-items container */
.dropdown-group__items {
  display: flex;
  flex-direction: column;
}

/* Indented clickable items */
.dropdown-subitem {
  padding-left: 28px;
}

/* Hover */
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
/* ===============================
   Flyout submenu (Dechefr)
   Opens on hover, to the LEFT
================================ */

#emo-score-compare .dropdown-menu {
  overflow: visible;
  font-size: 13px;
  font-weight: 500;
}

#si-score-compare .dropdown-menu {
  overflow: visible;
  font-size: 13px;
  font-weight: 500;
}

/* Make sure the right column/panel doesn't clip the flyout */
#panel-similarity-assessment,
#panel-similarity-assessment .panel,
#panel-similarity-assessment .panel-hd,
#panel-similarity-assessment .panel-bd {
  overflow: visible;
}

/* Also ensure dropdown itself can overflow */
#sim-add-compare,
#sim-add-compare .dropdown-menu {
  overflow: visible;
  font-size: 13px;
  font-weight: 500;
}

#sim-add-compare .dropdown-menu {
  inset-inline: auto 0;
  width: max-content;
  min-width: 220px;
  max-width: 320px;
}

/* Each submenu row becomes the positioning anchor */
.dropdown-submenu {
  position: relative;
}

/* Parent row layout with caret aligned right */
.dropdown-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Optional: slightly dim caret */
.dropdown-parent__caret {
  opacity: 0.7;
}

.dropdown-submenu > .dropdown-submenu-menu {
  position: absolute !important;

  /* force left flyout */
  right: calc(100%) !important;
  left: auto !important;

  /* align with the parent item */
  top: 0 !important;

  /* sizing */
  min-width: 200px;
  width: max-content;
  padding: 6px;
  border-radius: 14px;
  background: rgba(10, 14, 24, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.6);

  /* show above everything */
  z-index: 99999;

  /* hidden until hover */
  display: none;
}

.dropdown-submenu:hover > .dropdown-submenu-menu,
.dropdown-submenu > .dropdown-submenu-menu:hover {
  display: block;
}

.dechefr-checkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 14px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.92);
}

/* Hide native checkbox */
.checkbox-item input[type="checkbox"] {
  display: none;
}

/* Custom checkbox */
.checkbox-item .checkmark {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

/* Checked state */
.checkbox-item input[type="checkbox"]:checked + .checkmark {
  background: rgba(64, 255, 192, 0.18);
  border-color: rgba(64, 255, 192, 0.9);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  font-size: 12px;
  color: rgba(255, 255, 255, 0.92);
}

.checkbox-item .item-text {
  line-height: 1.2;
}

.section-edit .checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.section-edit .checkbox input {
  display: none;
}

.section-edit .checkbox span {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  position: relative;
}

.section-edit .checkbox input:checked + span {
  background: rgba(64, 255, 192, 0.16);
  border-color: rgba(64, 255, 192, 0.6);
}

.section-edit .checkbox input:checked + span::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
}

.section-edit .file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-soft);
}

.btn-row {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Scoped spacing helpers (no global duplicates) */
.case-page .section-edit .mb-3 {
  margin-bottom: 12px;
}
.case-page .section-edit .mb-0 {
  margin-bottom: 0;
}
.case-page .section-edit hr {
  border-color: rgba(255, 255, 255, 0.08);
}

/* ===============================
   Two-factor / billing (scoped step styles; avoids conflict with Help .step)
================================ */
.stack-row {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.twofa-steps {
  display: grid;
  gap: 12px;
}

.twofa-steps .step {
  border: 1px solid var(--line2);
  background: var(--panel2);
  border-radius: 14px;
  padding: 12px;
}

.twofa-steps .step-title {
  font-weight: var(--fw-black);
  margin-bottom: 6px;
}

.twofa-setup {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: start;
}

.qr {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr img {
  width: 160px;
  height: 160px;
  display: block;
  border-radius: 10px;
}

.verify-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.field.small input {
  max-width: 220px;
  letter-spacing: 0.25em;
  font-weight: var(--fw-black);
}

.recovery {
  margin-top: 12px;
  border-top: 1px solid var(--line2);
  padding-top: 12px;
}

.recovery-title {
  font-weight: var(--fw-black);
  margin-bottom: 6px;
}

.recovery-codes {
  margin: 10px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.88);
  overflow: auto;
}

.twofa-manage .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line2);
  background: var(--panel2);
  border-radius: 14px;
  margin-bottom: 10px;
}

.twofa-manage .row.danger {
  border-color: rgba(255, 79, 122, 0.18);
}

.billing-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===============================
   Help page
================================ */
.help-hero {
  padding: 10px 0 18px;
}

.help-hero h1 {
  margin: 0 0 10px;
  font-size: var(--fs-h1);
  letter-spacing: 0.2px;
  font-weight: var(--fw-black);
}

.lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 650;
}

.help-section {
  margin-top: 22px;
  padding: 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

.help-section h2 {
  margin: 0 0 10px;
  font-size: var(--fs-h2);
  font-weight: var(--fw-black);
  letter-spacing: 0.2px;
}

.help-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 650;
}

/* Steps list */
.steps {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.steps .step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 12px 12px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.step-k {
  color: rgba(255, 255, 255, 0.8);
  font-weight: var(--fw-black);
  padding-top: 2px;
}

.steps .step-title {
  font-weight: var(--fw-black);
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 4px;
}

.step-desc {
  color: var(--muted);
  line-height: 1.55;
  font-weight: 650;
}

.note {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(64, 255, 192, 0.06);
  border: 1px solid rgba(64, 255, 192, 0.14);
  color: rgba(255, 255, 255, 0.8);
}

.kbd {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
  font-size: 12px;
}

/* Indicators header */
.indicators-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.indicators-hd h2 {
  margin-bottom: 8px;
}

/* Sentence panel */
.sentPanel__hd .panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sentPanel__count {
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: var(--fw-black);
  color: rgba(255, 255, 255, 0.88);
}

/* List */
.sentList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.sentItem {
  list-style: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
}

.sentItem:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.sentItem + .sentItem {
  margin-top: 8px;
}

.sentList .is-hidden {
  display: none;
}

/* Hide extra items in collapsed mode */
.sentItem.is-hidden {
  display: none;
}

/* Checkbox row */
.sentCheck {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

/* Hide native checkbox */
.sentCheck__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Custom checkbox */
.sentCheck__box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  flex: 0 0 auto;
  margin-top: 2px;
  position: relative;
}

.sentCheck__input:checked + .sentCheck__box {
  border-color: rgba(64, 255, 192, 0.55);
  background: rgba(64, 255, 192, 0.14);
}

.sentCheck__input:checked + .sentCheck__box::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 3px;
  background: rgba(64, 255, 192, 0.85);
}

.sentText {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
  font-weight: 500;
}

/* Footer */
.sentPanel__footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sentPanel__meta {
  font-size: 13px;
}

/* Optional: when expanded, cap height + scroll */
.sentList.is-expanded {
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
}

.sentItem.is-hidden {
  display: none;
}
/* NER */
.ner-items.is-highlighted {
  outline: 1px solid currentColor;
  opacity: 0.9;
}

.ner-toggle-btn {
  color: var(--teal);
  margin-left: 8px;
  cursor: pointer;
  background: transparent;
  border: 0;
  text-decoration: underline;
  padding: 4px 6px;
}

/* Accordion */
.accordion {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 14, 24, 0.7);
}

.acc {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.acc:first-child {
  border-top: none;
}

.acc-sum {
  list-style: none;
  cursor: pointer;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

.acc-sum::-webkit-details-marker {
  display: none;
}

.acc-title {
  font-weight: var(--fw-black);
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
}

.acc-ico {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: var(--fw-black);
  color: rgba(255, 255, 255, 0.8);
}

.acc[open] .acc-ico {
  border-color: rgba(64, 255, 192, 0.22);
  background: rgba(64, 255, 192, 0.08);
  color: rgba(64, 255, 192, 0.95);
}

.acc-bd {
  padding: 0 14px 14px;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 650;
}

.acc-bd p {
  margin: 0;
}

/* ===============================
   About page
================================ */
.about-hero {
  padding: 8px 0 14px;
}

.about-hero h1 {
  margin: 0 0 10px;
  font-size: var(--fs-h1);
  letter-spacing: 0.2px;
  font-weight: var(--fw-black);
}

.about-section {
  margin-top: 18px;
  padding: 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

.about-section h2 {
  margin: 0 0 10px;
  font-size: var(--fs-h2);
  font-weight: var(--fw-black);
  letter-spacing: 0.2px;
}

.bullets {
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  font-weight: 650;
}

.bullets li {
  margin: 6px 0;
}

.tier {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 12px 12px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.tier-k {
  color: rgba(255, 255, 255, 0.82);
  font-weight: var(--fw-black);
  padding-top: 2px;
}

.tier-title {
  font-weight: var(--fw-black);
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 4px;
}

.tier-desc {
  color: var(--muted);
  line-height: 1.6;
  font-weight: 650;
}

.closing {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cta-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===============================
   Settings page
================================ */
.settings-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.settings-head h1 {
  margin: 0 0 6px;
  font-size: var(--fs-h1);
  font-weight: var(--fw-black);
  letter-spacing: 0.2px;
}

.settings-head .muted {
  font-weight: 650;
  line-height: 1.55;
  margin: 0;
}

.settings-head .muted.small {
  font-size: 13px;
  color: var(--muted2);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.settings-grid.grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid-span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .settings-grid.grid-2x2 {
    grid-template-columns: 1fr;
  }

  .grid-span-2 {
    grid-column: auto;
  }
}

.settings-col {
  display: grid;
  gap: 14px;
}

.divider {
  height: 1px;
  background: var(--line2);
  margin: 14px 0;
}

.security-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.summary-item {
  padding: 10px 12px;
  border: 1px solid var(--line2);
  background: var(--panel2);
  border-radius: 14px;
}

.summary-item .k {
  color: var(--muted2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.summary-item .v {
  margin-top: 6px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
}

/* KV for settings only (prevents conflicts) */
.settings-grid .kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 12px;
  align-items: center;
}

@media (max-width: 520px) {
  .settings-grid .kv {
    grid-template-columns: 1fr;
  }
}

.section-edit.d-none,
.d-none {
  display: none !important;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.88);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(64, 255, 192, 0.55);
  box-shadow: 0 0 0 3px rgba(64, 255, 192, 0.16);
}

.hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted2);
  font-weight: 650;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 750;
}

.check input {
  display: none;
}

.check span {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}

.check input:checked + span {
  border-color: rgba(64, 255, 192, 0.35);
  background: rgba(64, 255, 192, 0.1);
}

.check input:checked + span::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 3px;
  background: rgba(64, 255, 192, 0.75);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

/* ===============================
   Indicators
================================ */
.em__col--grow {
  flex: 1 1 auto;
  min-width: 0;
}

/* Make the right column wider if needed */
.em__col--side {
  flex: 0 0 380px; /* adjust (e.g. 480–620) */
  min-width: 420px;
}

/* ===============================
   Generic Fixed Assessment Cards
================================ */

.assCardFixed {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(10, 14, 24, 0.92);
  border-radius: 20px;
  width: min(520px, calc(100vw - 40px));
  z-index: 999; /* above charts, below modals */
  display: none; /* hidden by default */
}

.assCardFixed.is-open {
  display: block;
}

/* Minimized state: hide body */
.assCardFixed.is-minimized .assCardFixed__bd {
  display: none;
}

.assCardFixed.is-minimized {
  width: min(360px, calc(100vw - 40px));
}

/* Header layout */
.assCardFixed__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Toggle icon rotation (optional) */
.assCardFixed__toggleBtn svg {
  transition: transform 180ms ease;
}

.assCardFixed.is-minimized .assCardFixed__toggleBtn svg {
  transform: rotate(180deg);
}

/* Body spacing (inherits your panel-bd too, but safe) */
.assCardFixed__question {
  margin: 0 0 12px 0;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.9);
}

.assCardFixed__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* list */
.emAssFixed__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* rows */
.emAssFixed__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 12px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}

/* hide native checkbox */
.emAssFixed__row input[type="checkbox"] {
  display: none;
}

/* red Dechefr-style toggle */
.emAssFixed__toggle {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(220, 40, 40, 0.25);
  border: 1px solid rgba(220, 40, 40, 0.45);
  position: relative;
  flex: 0 0 auto;
}

.emAssFixed__toggle::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(220, 40, 40, 0.95);
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  transition: transform 160ms ease;
}

.emAssFixed__row input:checked + .emAssFixed__toggle::after {
  transform: translate(16px, -50%);
}

.emAssFixed__label {
  font-weight: 100;
  color: rgba(255, 255, 255, 0.92);
}

/* ===============================
   Dechefr toggle — OFF (unchecked)
================================ */

.emAssFixed__row input[type="checkbox"] {
  display: none;
}

.emAssFixed__toggle {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;

  /* OFF state (grey) */
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.emAssFixed__toggle::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;

  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);

  background: rgba(255, 255, 255, 0.65);
  transition:
    transform 160ms ease,
    background 160ms ease;
}

/* ===============================
   ON state (checked) — RED
================================ */

.emAssFixed__row input:checked + .emAssFixed__toggle {
  background: rgba(220, 40, 40, 0.32);
  border-color: rgba(220, 40, 40, 0.75);
}

.emAssFixed__row input:checked + .emAssFixed__toggle::after {
  background: rgba(220, 40, 40, 0.95);
  transform: translate(16px, -50%);
}

/* Optional hover polish */
.emAssFixed__row:hover .emAssFixed__toggle {
  border-color: rgba(255, 255, 255, 0.4);
}

/* Mobile */
@media (max-width: 720px) {
  .assCardFixed {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

/* ===============================
   Minimize / maximize behavior
================================ */

.emAssFixed {
  display: none;
}

.emAssFixed.is-open {
  display: block;
}

/* Collapsed state */
.emAssFixed.is-minimized .emAssFixed__bd {
  display: none;
}

.emAssFixed.is-minimized {
  width: min(360px, calc(100vw - 40px));
}

/* Header button icon rotation */
.emAssFixed__toggleBtn svg {
  transition: transform 180ms ease;
}

.emAssFixed.is-minimized .emAssFixed__toggleBtn svg {
  transform: rotate(180deg);
}

.affiliationPanel {
  width: 60%;
  margin-left: auto;
  margin-right: auto;
}

/* mobile */
@media (max-width: 720px) {
  .emAssFixed {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

/* Stack on smaller screens */
@media (max-width: 980px) {
  .em__row--top {
    flex-wrap: wrap;
  }

  .em__col--side {
    flex: 1 1 520px;
    min-width: 300px;
  }
}

/* ===============================
   Responsive
================================ */
@media (max-width: 980px) {
  .pagehead {
    flex-direction: column;
  }
  .head-actions {
    justify-content: flex-start;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .nav-actions {
    min-width: auto;
  }
  .user-meta {
    display: none;
  }

  .help-section {
    padding: 16px 14px;
  }
  .indicators-hd {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
  }
}

/* Search display rules (single place) */
@media (min-width: 980px) {
  .search {
    display: block;
  }
}
@media (max-width: 980px) {
  .search {
    display: none;
  }
}
@media (max-width: 720px) {
  .search {
    display: none;
  }
}

@media (max-width: 980px) {
  .wizard-card-bd section[style*="flex-wrap:nowrap"] {
    flex-wrap: wrap !important;
  }
  #readability-panel,
  #panel-highlighted-entities {
    flex: 1 1 360px !important;
    min-width: 300px !important;
  }
}

/* Guide screenshots (about.html) */
.screenshot {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}

.sentinel-login-info {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(13, 110, 253, 0.25);
  border-radius: 10px;
  background: rgba(13, 110, 253, 0.08);
  color: #173b67;
  line-height: 1.5;
}

.sentinel-login-info .msg {
  display: block;
  font-weight: 500;
}
