:root {
  --bg: #f6f8ff;
  --panel: #ffffff;
  --ink: #17222c;
  --muted: #62717e;
  --line: #dbe3e8;
  --navy: #102838;
  --teal: #047c75;
  --indigo: #4f46e5;
  --indigo-strong: #2f37df;
  --indigo-soft: #eef0ff;
  --teal-soft: #dff3ef;
  --red: #b42318;
  --red-soft: #fde8e4;
  --green: #1f7a3f;
  --green-soft: #e5f5e8;
  --shadow: 0 16px 38px rgba(16, 40, 56, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

[hidden] {
  display: none !important;
}

.session-loading {
  display: none;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 25% 20%, rgba(79, 70, 229, 0.18), transparent 34%),
    radial-gradient(circle at 78% 10%, rgba(4, 124, 117, 0.14), transparent 30%),
    linear-gradient(135deg, #071423 0%, #0d2234 54%, #102838 100%);
  color: #ffffff;
}

body.auth-checking {
  min-height: 100vh;
  background: #071423;
}

body.auth-checking #landing-view,
body.auth-checking #app-shell,
body.auth-checking #auth-modal {
  display: none !important;
}

body.auth-checking .session-loading {
  display: grid;
}

.session-loading-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: min(360px, 100%);
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.session-loading-logo {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.session-loading-logo img {
  width: 30px;
  height: 30px;
}

.session-loading-card strong,
.session-loading-card span {
  display: block;
}

.session-loading-card strong {
  font-size: 1rem;
  letter-spacing: 0;
}

.session-loading-card span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.landing {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow-x: hidden;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(6, 18, 28, 0.93) 0%, rgba(9, 31, 45, 0.82) 42%, rgba(9, 31, 45, 0.34) 100%),
    url("/images/cyber-hero.jpg") center / cover no-repeat;
}

.landing-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.78) 55%, transparent 100%);
  pointer-events: none;
}

.landing-header,
.landing-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-header {
  min-height: 86px;
  display: flex;
  align-items: center;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-brand strong,
.landing-brand span:not(.brand-logo) {
  display: block;
}

.landing-brand strong {
  font-size: 1.02rem;
}

.landing-brand span:not(.brand-logo) {
  color: rgba(237, 248, 248, 0.78);
  font-size: 0.86rem;
}

.landing-content {
  display: flex;
  min-height: calc(100vh - 86px);
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 44px 0 86px;
}

.landing-kicker {
  color: #67ded1;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing h1 {
  max-width: 820px;
  margin-top: 18px;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 0.96;
}

.landing p {
  max-width: 650px;
  margin: 22px 0 0;
  color: rgba(242, 250, 250, 0.85);
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.6;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.landing-button {
  display: inline-flex;
  align-items: center;
  min-width: 140px;
  min-height: 48px;
  justify-content: center;
  font-size: 0.98rem;
}

.landing .secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 28px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(242, 250, 250, 0.82);
}

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

.footer-column h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 0.98rem;
}

.footer-column a,
.footer-column span {
  display: block;
  color: rgba(242, 250, 250, 0.78);
  font-size: 0.94rem;
  line-height: 1.55;
  text-decoration: none;
}

.footer-column a {
  margin-top: 10px;
}

.footer-column a:hover {
  color: #67ded1;
}

.footer-trust strong {
  display: block;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.2;
}

.footer-trust span {
  margin-top: 8px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 790px;
}

.footer-copy p {
  margin: 0;
  max-width: none;
  color: rgba(242, 250, 250, 0.82);
  font-size: 0.94rem;
  line-height: 1.6;
}

.footer-mark,
.social-links a {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.footer-mark {
  width: 38px;
  height: 34px;
  border: 1px solid rgba(103, 222, 209, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-links a {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.social-links a:hover {
  border-color: rgba(103, 222, 209, 0.9);
  background: rgba(103, 222, 209, 0.16);
  color: #67ded1;
}

.info-sections {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  width: 100%;
  margin: 2px 0 0;
  display: grid;
  gap: 16px;
}

.info-section {
  display: none;
  scroll-margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 18, 29, 0.72);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  color: #f4fbfb;
  padding: 24px;
}

.info-section:target {
  display: block;
  border-color: rgba(103, 222, 209, 0.95);
  box-shadow: 0 0 0 1px rgba(103, 222, 209, 0.26), 0 24px 60px rgba(0, 0, 0, 0.24);
}

.info-kicker {
  display: block;
  color: #67ded1;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-section h2 {
  margin-top: 8px;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.info-section p {
  max-width: 860px;
  margin: 12px 0 0;
  color: rgba(242, 250, 250, 0.84);
  font-size: 1rem;
  line-height: 1.65;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.info-grid h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
}

.info-grid p {
  margin-top: 8px;
  font-size: 0.94rem;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 19, 29, 0.72);
  backdrop-filter: blur(10px);
}

.auth-dialog {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
  padding: 22px;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.auth-heading {
  padding-right: 44px;
}

.auth-heading h2 {
  margin-top: 4px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7f7;
}

.auth-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-tab.active {
  background: #ffffff;
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(16, 40, 56, 0.08);
}

.auth-message {
  min-height: 0;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-message:not(:empty) {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.auth-message.success {
  border-color: #bfdfc7;
  background: var(--green-soft);
  color: var(--green);
}

.auth-message.error {
  border-color: #f0c6be;
  background: var(--red-soft);
  color: var(--red);
}

.auth-form label:first-child {
  margin-top: 0;
}

.auth-submit {
  width: 100%;
  margin-top: 14px;
}

.link-button {
  width: 100%;
  min-height: 36px;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 900;
  text-align: center;
}

.actions .link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0 14px;
  text-decoration: none;
}

.compact-actions {
  margin-top: 10px;
}

.reset-panel {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  background:
    radial-gradient(circle at 78% 0%, rgba(30, 117, 167, 0.11), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #f4f8fb 58%, #f8fafc 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 0%, rgba(20, 184, 166, 0.18), transparent 26%),
    linear-gradient(180deg, #06101f 0%, #07172a 54%, #04101f 100%);
  color: #f4f7ff;
  padding: 28px 14px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  box-shadow: 14px 0 34px rgba(5, 13, 33, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
}

.brand-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    rgba(15, 31, 54, 0.7);
  box-shadow: 0 16px 28px rgba(0, 12, 28, 0.22);
}

.brand-logo img {
  display: block;
  width: 43px;
  height: 43px;
  object-fit: contain;
}

.brand span:not(.brand-logo),
.brand strong {
  display: block;
}

.brand span:not(.brand-logo) {
  color: rgba(236, 241, 255, 0.76);
  font-size: 0.88rem;
  line-height: 1.3;
}

.brand strong {
  color: #ffffff;
  font-size: 1.34rem;
  line-height: 1.1;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(236, 241, 255, 0.7);
  text-align: left;
  padding: 0 14px;
  font-weight: 760;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(236, 241, 255, 0.18);
  border-radius: 10px;
  color: rgba(236, 241, 255, 0.78);
  background: rgba(255, 255, 255, 0.04);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-button:hover,
.nav-button.active {
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(45, 102, 255, 0.11));
  border-color: rgba(45, 212, 191, 0.22);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #2dd4bf;
}

.nav-button.active .nav-icon,
.nav-button:hover .nav-icon {
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(45, 212, 191, 0.12);
  color: #ffffff;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main {
  min-width: 0;
  padding: 34px 38px;
  position: relative;
}

.main::before {
  content: "";
  position: fixed;
  top: -90px;
  right: -60px;
  width: 520px;
  height: 220px;
  background:
    repeating-radial-gradient(ellipse at center, rgba(20, 184, 166, 0.11) 0 1px, transparent 1px 20px);
  opacity: 0.45;
  transform: rotate(-12deg);
  pointer-events: none;
}

.topbar,
.section-title,
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--navy);
  padding: 3px 11px 3px 3px;
  font-size: 0.84rem;
  font-weight: 800;
}

.user-pill:hover {
  border-color: #b9ddd6;
  background: var(--teal-soft);
}

.user-avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #b9ddd6;
  border-radius: 999px;
  background: linear-gradient(135deg, #047c75, #102838);
  color: #ffffff;
  font-weight: 900;
  background-position: center;
  background-size: cover;
  text-transform: uppercase;
}

.user-avatar.has-image {
  color: transparent;
}

.user-avatar-small {
  width: 28px;
  height: 28px;
  font-size: 0.72rem;
}

.user-avatar-large {
  width: 96px;
  height: 96px;
  font-size: 1.65rem;
}

.logout-button {
  min-height: 30px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.topbar {
  min-height: 70px;
}

.topbar-heading {
  display: grid;
  gap: 7px;
  max-width: min(760px, 100%);
  padding-left: 16px;
  position: relative;
}

.topbar-heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 4px;
  height: calc(100% - 10px);
  border-radius: 999px;
  background: linear-gradient(180deg, #14b8a6, #2563eb);
}

.topbar-heading h1 {
  color: #071126;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  font-weight: 950;
  line-height: 0.98;
}

.topbar-subtitle {
  align-items: center;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.13), rgba(37, 99, 235, 0.08));
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 999px;
  color: #0f766e;
  display: inline-flex;
  font-size: 0.94rem;
  font-weight: 850;
  gap: 9px;
  margin: 0;
  max-width: 100%;
  padding: 8px 13px;
  width: fit-content;
}

.topbar-subtitle > span[aria-hidden="true"] {
  background: #14b8a6;
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(20, 184, 166, 0.13);
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.section-title {
  margin: 22px 0 24px;
  align-items: flex-end;
}

.section-title p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

#incident-view .section-title h2 {
  color: #071126;
  font-size: clamp(1.65rem, 2.35vw, 2.15rem);
  line-height: 1.05;
}

#incident-view .section-title p {
  color: #6b728f;
  font-size: 1rem;
}

#incident-view .section-title {
  position: relative;
  overflow: hidden;
  align-items: center;
  min-height: 110px;
  border: 1px solid rgba(150, 164, 196, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.88)),
    radial-gradient(circle at 88% 12%, rgba(93, 92, 255, 0.18), transparent 28%),
    radial-gradient(circle at 70% 86%, rgba(20, 184, 166, 0.14), transparent 24%);
  box-shadow: 0 26px 68px rgba(28, 38, 78, 0.1);
  padding: 22px 26px;
}

#incident-view .section-title::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 62%, rgba(79, 70, 229, 0.08) 62% 63%, transparent 63%),
    repeating-linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0 1px, transparent 1px 18px);
  opacity: 0.55;
  pointer-events: none;
}

#incident-view .section-title > * {
  position: relative;
  z-index: 1;
}

.incident-history-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  min-height: 42px;
  border-color: rgba(20, 184, 166, 0.32);
  color: #0f766e;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.1);
}

.incident-history-button span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-weight: 900;
}

.status,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.status {
  color: var(--green);
  background: var(--green-soft);
}

.status.neutral {
  color: var(--navy);
  background: #e8eef2;
}

.badge {
  color: var(--red);
  background: var(--red-soft);
}

.badge.neutral {
  color: var(--navy);
  background: #e8eef2;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.metrics article,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metrics article {
  min-height: 120px;
  padding: 16px;
}

.metrics span,
.metrics small {
  display: block;
  color: var(--muted);
}

.metrics strong {
  display: block;
  margin: 8px 0 3px;
  font-size: 2rem;
}

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

.finding {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 12px;
}

.finding span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.finding strong {
  display: block;
  margin-top: 4px;
}

.grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.grid.two {
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
}

.panel {
  padding: 16px;
}

.profile-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.profile-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

.profile-preview p {
  margin: 6px 0 0;
  color: var(--muted);
}

.alert-list,
.detail,
.chat-log {
  display: grid;
  gap: 10px;
}

.alert-card {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  text-align: left;
}

.alert-card.medium {
  border-left-color: #996f00;
}

.alert-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(4, 124, 117, 0.12);
}

.alert-card strong,
.alert-card span {
  display: block;
}

.alert-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.muted-box,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 12px;
  line-height: 1.5;
}

.log-analysis-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(280px, 0.55fr);
  gap: 14px;
  align-items: start;
}

.log-analysis-result-panel {
  grid-column: 1 / -1;
}

.log-analysis-input-panel textarea {
  min-height: 260px;
  font-family: "Cascadia Mono", "Consolas", monospace;
  line-height: 1.55;
}

.log-upload-box {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  border: 1px dashed rgba(4, 124, 117, 0.32);
  border-radius: 8px;
  background: #f6fbfb;
  padding: 12px;
}

.log-upload-box small {
  color: var(--muted);
}

.log-analysis-actions,
.log-analysis-result-actions {
  flex-wrap: wrap;
}

.log-analysis-history {
  display: grid;
  gap: 8px;
}

.log-analysis-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 11px;
  text-align: left;
}

.log-analysis-history-item:hover,
.log-analysis-history-item.active {
  border-color: var(--teal);
  background: #f4fbfa;
}

.log-analysis-history-item strong,
.log-analysis-history-item small {
  display: block;
}

.log-analysis-history-item small,
.log-analysis-history-item em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.log-analysis-progress {
  position: relative;
  height: 32px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(4, 124, 117, 0.2);
  border-radius: 8px;
  background: #eef7f6;
}

.log-analysis-progress span {
  display: block;
  width: var(--bar-width, 0%);
  height: 100%;
  background: linear-gradient(90deg, #0f766e, #2563eb);
  transition: width 180ms ease;
}

.log-analysis-progress strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #0b2430;
  font-size: 0.82rem;
  font-weight: 900;
}

.log-analysis-result {
  gap: 12px;
}

.log-analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.log-analysis-summary-grid article,
.log-analysis-facts div,
.log-finding-card,
.log-mitre-card,
.log-evidence-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.log-analysis-summary-grid span,
.log-analysis-summary-grid small,
.log-analysis-facts span,
.log-finding-card span,
.log-finding-card small,
.log-mitre-card span,
.log-evidence-card small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.log-analysis-summary-grid strong {
  display: block;
  margin: 3px 0;
  color: var(--navy);
  font-size: 1.15rem;
}

.log-analysis-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.log-analysis-tabs button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-weight: 900;
}

.log-analysis-tabs button.active {
  color: var(--teal);
  box-shadow: inset 0 -2px 0 var(--teal);
}

.log-analysis-tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--ink);
  font-size: 0.72rem;
}

.log-analysis-tab-body {
  display: grid;
  gap: 12px;
}

.log-analysis-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.log-analysis-facts strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
}

.log-finding-card {
  display: grid;
  gap: 10px;
}

.log-finding-card h4,
.log-finding-card h5,
.log-finding-card p {
  margin: 0;
}

.log-finding-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.log-finding-meta strong,
.log-finding-meta span,
.log-chip-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafb;
  padding: 6px 10px;
  color: var(--ink);
}

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

.log-timeline {
  display: grid;
  gap: 10px;
}

.log-timeline article {
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 12px 12px 14px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.log-timeline time,
.log-timeline small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.log-timeline p {
  margin: 6px 0;
  color: var(--ink);
}

.log-table {
  display: grid;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.log-table > div {
  display: grid;
  grid-template-columns: 140px minmax(220px, 1fr) 140px 110px 80px;
  gap: 10px;
  min-width: 760px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.log-table > div:first-child {
  border-top: 0;
  background: #f8fafb;
}

.log-mitre-card,
.log-evidence-card {
  display: grid;
  gap: 6px;
}

.log-mitre-card p,
.log-evidence-card p {
  margin: 0;
}

.success-box {
  border-color: rgba(22, 125, 84, 0.24);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}

.incident-success-message {
  border-color: rgba(22, 125, 84, 0.34);
  background: linear-gradient(135deg, rgba(230, 247, 238, 0.98), rgba(240, 253, 244, 0.98));
  color: #0f7a4f;
  font-weight: 900;
}

#analyzer-view {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(240, 253, 250, 0.68)),
    radial-gradient(circle at 8% 4%, rgba(20, 184, 166, 0.14), transparent 32%),
    radial-gradient(circle at 94% 0%, rgba(37, 99, 235, 0.11), transparent 28%);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

#analyzer-view .log-analysis-shell {
  grid-template-columns: minmax(360px, 0.92fr) minmax(320px, 0.56fr);
  gap: 18px;
}

#analyzer-view .log-glass-panel {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.09);
  backdrop-filter: blur(18px);
}

#analyzer-view .log-panel-title {
  align-items: flex-start;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  margin: -2px -2px 16px;
  padding: 2px 2px 16px;
}

.log-title-lockup {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.log-title-lockup h3 {
  color: #071126;
  font-size: 1.08rem;
}

.log-title-lockup p {
  margin: 5px 0 0;
  max-width: 680px;
}

.log-ui-icon,
.log-kpi-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
}

.log-ui-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.log-ui-icon svg,
.log-kpi-icon svg,
.log-upload-icon svg,
.log-analyst-summary svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.log-ui-icon.teal {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
}

.log-ui-icon.blue {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.log-ui-icon.purple {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.log-source-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.log-source-row label {
  color: #334155;
  font-size: 0.86rem;
  font-weight: 900;
}

.log-editor-card {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.72);
  border-radius: 8px;
  background: #0f172a;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

#analyzer-view .log-analysis-input-panel textarea {
  min-height: 340px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.1) 0 42px, transparent 42px),
    #0b1120;
  color: #dbeafe;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 0.9rem;
  line-height: 1.65;
  padding: 16px 16px 16px 56px;
  resize: vertical;
}

#analyzer-view .log-analysis-input-panel textarea::placeholder {
  color: #64748b;
}

#analyzer-view .log-analysis-input-panel textarea:focus {
  box-shadow: inset 0 0 0 2px rgba(20, 184, 166, 0.55);
}

#analyzer-view .log-upload-box {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  border: 1px dashed rgba(20, 184, 166, 0.5);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.09), rgba(37, 99, 235, 0.06));
  padding: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#analyzer-view .log-upload-box.dragging,
#analyzer-view .log-upload-box:hover {
  border-color: rgba(37, 99, 235, 0.72);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.log-upload-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #ffffff;
  color: #0f766e;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.15);
}

#analyzer-view .log-upload-box label {
  display: block;
  color: #0f172a;
  cursor: pointer;
  font-weight: 950;
}

#analyzer-view .log-upload-box input {
  grid-column: 2;
  max-width: 100%;
}

#analyzer-view .log-analysis-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

#analyzer-view .log-analysis-actions button,
#analyzer-view .log-analysis-result-actions button {
  border-radius: 8px;
}

#analyzer-view .upload-analysis-button {
  border-color: rgba(14, 165, 233, 0.38);
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(14, 116, 144, 0.2);
}

#analyzer-view .upload-analysis-button:hover {
  border-color: rgba(14, 165, 233, 0.58);
  background: linear-gradient(135deg, #0369a1 0%, #0f766e 100%);
}

#analyzer-view .clear-analysis-button {
  border-color: rgba(220, 38, 38, 0.34);
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.18);
}

#analyzer-view .clear-analysis-button:hover {
  border-color: rgba(185, 28, 28, 0.55);
  background: #b91c1c;
}

#analyzer-view .log-analysis-history {
  max-height: 528px;
  overflow: auto;
  padding-right: 2px;
}

#analyzer-view .log-analysis-history-item {
  position: relative;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#analyzer-view .log-analysis-history-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #64748b;
}

#analyzer-view .log-analysis-history-item.tone-critical::before {
  background: #dc2626;
}

#analyzer-view .log-analysis-history-item.tone-critical {
  border-color: rgba(220, 38, 38, 0.32);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.98), rgba(255, 255, 255, 0.86));
}

#analyzer-view .log-analysis-history-item.tone-high::before {
  background: #f97316;
}

#analyzer-view .log-analysis-history-item.tone-high {
  border-color: rgba(249, 115, 22, 0.32);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(255, 255, 255, 0.86));
}

#analyzer-view .log-analysis-history-item.tone-medium::before {
  background: #eab308;
}

#analyzer-view .log-analysis-history-item.tone-medium {
  border-color: rgba(234, 179, 8, 0.34);
  background: linear-gradient(135deg, rgba(254, 252, 232, 0.98), rgba(255, 255, 255, 0.86));
}

#analyzer-view .log-analysis-history-item.tone-low::before {
  background: #0ea5e9;
}

#analyzer-view .log-analysis-history-item.tone-low {
  border-color: rgba(14, 165, 233, 0.3);
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.98), rgba(255, 255, 255, 0.86));
}

#analyzer-view .log-analysis-history-item.tone-informational::before {
  background: #64748b;
}

#analyzer-view .log-analysis-history-item.tone-informational {
  border-color: rgba(100, 116, 139, 0.26);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.86));
}

#analyzer-view .log-analysis-history-item em {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: #0f172a;
  font-weight: 900;
}

#analyzer-view .log-analysis-history-item em b {
  font-size: 1.25rem;
}

#analyzer-view .log-analysis-history-item em small {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
}

#analyzer-view .log-analysis-history-item.tone-critical em b {
  color: #b91c1c;
}

#analyzer-view .log-analysis-history-item.tone-critical em small {
  background: #fee2e2;
  color: #991b1b;
}

#analyzer-view .log-analysis-history-item.tone-high em b {
  color: #c2410c;
}

#analyzer-view .log-analysis-history-item.tone-high em small {
  background: #ffedd5;
  color: #9a3412;
}

#analyzer-view .log-analysis-history-item.tone-medium em b {
  color: #a16207;
}

#analyzer-view .log-analysis-history-item.tone-medium em small {
  background: #fef3c7;
  color: #854d0e;
}

#analyzer-view .log-analysis-history-item.tone-low em b {
  color: #0369a1;
}

#analyzer-view .log-analysis-history-item.tone-low em small {
  background: #e0f2fe;
  color: #075985;
}

#analyzer-view .log-analysis-history-item.tone-informational em b {
  color: #475569;
}

#analyzer-view .log-analysis-history-item.tone-informational em small {
  background: #e2e8f0;
  color: #334155;
}

#analyzer-view .log-analysis-progress {
  height: 42px;
  border-color: rgba(37, 99, 235, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(20, 184, 166, 0.1));
}

#analyzer-view .log-analysis-progress span {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.22) 0 9px, transparent 9px 18px),
    linear-gradient(90deg, #14b8a6, #2563eb, #7c3aed);
  animation: log-progress-flow 1.3s linear infinite;
}

@keyframes log-progress-flow {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 38px 0, 0 0;
  }
}

#analyzer-view .log-analysis-result {
  gap: 16px;
}

.log-result-hero {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 118, 110, 0.86)),
    radial-gradient(circle at 88% 12%, rgba(37, 99, 235, 0.34), transparent 34%);
  color: #ffffff;
  padding: 20px;
}

.log-result-hero.tone-critical {
  background:
    linear-gradient(135deg, #1f0f18, #7f1d1d),
    radial-gradient(circle at 88% 12%, rgba(248, 113, 113, 0.35), transparent 34%);
}

.log-result-hero.tone-high {
  background:
    linear-gradient(135deg, #1f1308, #9a3412),
    radial-gradient(circle at 88% 12%, rgba(251, 146, 60, 0.32), transparent 34%);
}

.log-result-hero.tone-medium {
  background:
    linear-gradient(135deg, #1f1a08, #854d0e),
    radial-gradient(circle at 88% 12%, rgba(250, 204, 21, 0.24), transparent 34%);
}

.log-risk-gauge {
  display: grid;
  place-items: center;
  width: 152px;
  height: 152px;
  border-radius: 999px;
  background: conic-gradient(#22c55e 0 var(--bar-width, 0%), rgba(255, 255, 255, 0.18) 0 100%);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.08), 0 18px 34px rgba(15, 23, 42, 0.22);
}

.log-risk-gauge > div {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
}

.log-risk-gauge span,
.log-risk-gauge small,
.log-result-hero-copy p,
.log-status-chip {
  color: rgba(255, 255, 255, 0.78);
}

.log-risk-gauge strong {
  color: #ffffff;
  font-size: 2.45rem;
  line-height: 1;
}

.log-result-hero-copy {
  min-width: 0;
}

.log-result-hero-copy h3 {
  margin: 9px 0 8px;
  color: #ffffff;
  font-size: clamp(1.45rem, 2.5vw, 2.35rem);
}

.log-result-hero-copy p {
  max-width: 920px;
  margin: 0;
}

.log-status-chip {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.log-signal-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.log-signal-chart div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.log-signal-chart span,
.log-signal-chart strong {
  color: #ffffff;
}

.log-signal-chart i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.log-signal-chart i::before {
  content: "";
  display: block;
  width: var(--bar-width, 4%);
  height: 100%;
  border-radius: inherit;
  background: #14b8a6;
}

.log-signal-chart .tone-blue i::before {
  background: #60a5fa;
}

.log-signal-chart .tone-red i::before {
  background: #f87171;
}

.log-signal-chart .tone-purple i::before {
  background: #c084fc;
}

#analyzer-view .log-kpi-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.log-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.log-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), transparent 56%);
  pointer-events: none;
}

.log-kpi-icon {
  --log-kpi-icon-box-size: 42px;
  --log-kpi-icon-size: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--log-kpi-icon-box-size);
  height: var(--log-kpi-icon-box-size);
  min-width: var(--log-kpi-icon-box-size);
  aspect-ratio: 1;
  margin-bottom: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0f766e;
  line-height: 1;
  box-sizing: border-box;
}

.log-kpi-icon svg {
  display: block;
  width: var(--log-kpi-icon-size);
  height: var(--log-kpi-icon-size);
  flex: 0 0 var(--log-kpi-icon-size);
}

.log-kpi-card.tone-critical .log-kpi-icon,
.log-kpi-card.tone-high .log-kpi-icon {
  background: transparent;
  color: #dc2626;
}

.log-kpi-card.tone-medium .log-kpi-icon {
  background: transparent;
  color: #a16207;
}

.log-kpi-card.tone-blue .log-kpi-icon {
  background: transparent;
  color: #1d4ed8;
}

.log-kpi-card.tone-purple .log-kpi-icon {
  background: transparent;
  color: #6d28d9;
}

.log-kpi-card > span:not(.log-kpi-icon) {
  color: #64748b;
  font-weight: 900;
  text-transform: uppercase;
}

.log-kpi-card strong {
  font-size: 1.9rem;
}

.log-kpi-progress {
  display: block;
  height: 7px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.log-kpi-progress::before {
  content: "";
  display: block;
  width: var(--bar-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #2563eb);
}

#analyzer-view .log-analysis-tabs {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#analyzer-view .log-analysis-tabs button {
  min-height: 52px;
  color: #475569;
}

#analyzer-view .log-analysis-tabs button:hover,
#analyzer-view .log-analysis-tabs button.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(37, 99, 235, 0.06));
  color: #0f766e;
}

#analyzer-view .log-analysis-tabs span {
  background: #e2e8f0;
}

.log-analyst-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(239, 246, 255, 0.82));
  padding: 16px;
}

.log-analyst-summary > span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #ffffff;
  color: #0f766e;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.14);
}

.log-analyst-summary p {
  margin: 6px 0 0;
}

#analyzer-view .log-analysis-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#analyzer-view .log-analysis-facts div,
#analyzer-view .log-finding-card,
#analyzer-view .log-mitre-card,
#analyzer-view .log-evidence-card {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#analyzer-view .log-finding-card {
  border-left: 4px solid #64748b;
}

#analyzer-view .log-finding-card.tone-critical {
  border-left-color: #dc2626;
}

#analyzer-view .log-finding-card.tone-high {
  border-left-color: #f97316;
}

#analyzer-view .log-finding-card.tone-medium {
  border-left-color: #eab308;
}

#analyzer-view .log-finding-card h4 {
  color: #071126;
  font-size: 1.12rem;
}

#analyzer-view .log-finding-meta strong,
#analyzer-view .log-finding-meta span,
#analyzer-view .log-chip-row span {
  border-color: rgba(148, 163, 184, 0.24);
  background: #f8fafc;
}

#analyzer-view .log-timeline {
  position: relative;
  padding-left: 22px;
}

#analyzer-view .log-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 10px;
  width: 2px;
  background: linear-gradient(180deg, #14b8a6, #2563eb, #7c3aed);
}

#analyzer-view .log-timeline article {
  position: relative;
  border-left: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  padding-left: 18px;
}

.log-timeline-marker {
  position: absolute;
  left: -31px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
}

#analyzer-view .log-table {
  border-color: rgba(148, 163, 184, 0.24);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#analyzer-view .log-table > div:first-child {
  background: #f1f5f9;
  color: #0f172a;
}

.log-mitre-map {
  display: grid;
  gap: 12px;
}

#analyzer-view .log-mitre-card {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.log-mitre-technique {
  display: block;
  margin: 3px 0 7px;
  color: #6d28d9;
  font-size: 0.78rem;
  font-weight: 900;
}

#analyzer-view .log-recommendations {
  display: grid;
  gap: 10px;
}

#analyzer-view .log-recommendations article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#analyzer-view .log-recommendations span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #0f766e;
  font-weight: 950;
}

#analyzer-view .log-recommendations p {
  margin: 3px 0 0;
}

#analyzer-view .log-evidence-card {
  border-left: 4px solid #2563eb;
}

.log-analysis-empty-state,
.log-analysis-empty {
  border: 1px dashed rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
  padding: 18px;
  text-align: center;
}

.width-0 { --bar-width: 0%; }
.width-5 { --bar-width: 5%; }
.width-10 { --bar-width: 10%; }
.width-15 { --bar-width: 15%; }
.width-20 { --bar-width: 20%; }
.width-25 { --bar-width: 25%; }
.width-30 { --bar-width: 30%; }
.width-35 { --bar-width: 35%; }
.width-40 { --bar-width: 40%; }
.width-45 { --bar-width: 45%; }
.width-50 { --bar-width: 50%; }
.width-55 { --bar-width: 55%; }
.width-60 { --bar-width: 60%; }
.width-65 { --bar-width: 65%; }
.width-70 { --bar-width: 70%; }
.width-75 { --bar-width: 75%; }
.width-80 { --bar-width: 80%; }
.width-85 { --bar-width: 85%; }
.width-90 { --bar-width: 90%; }
.width-95 { --bar-width: 95%; }
.width-100 { --bar-width: 100%; }

.upload-facts {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.intel-help-card {
  margin-top: 14px;
}

.intel-report {
  display: grid;
  gap: 12px;
}

.intel-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #f8fbfc;
  padding: 14px;
}

.intel-hero.tone-critical,
.intel-hero.tone-high {
  border-left-color: var(--red);
  background: #fff7f7;
}

.intel-hero.tone-medium {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.intel-hero span,
.intel-answer-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.intel-hero h3 {
  margin: 4px 0;
  color: var(--navy);
}

.intel-hero p {
  margin: 0;
  color: var(--ink);
}

.intel-score {
  text-align: right;
}

.intel-score strong {
  display: block;
  color: var(--navy);
  font-size: 2rem;
}

.intel-score span {
  text-transform: none;
}

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

.intel-answer-grid div,
.intel-section-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.intel-answer-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
}

.intel-section-card h4 {
  margin: 0 0 8px;
}

.intel-workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.intel-workflow-actions button {
  min-height: 34px;
}

.intel-report-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.intel-report-note .panel-title {
  margin-bottom: 10px;
}

.intel-report-note textarea {
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
}

.intel-provider-list {
  display: grid;
  gap: 8px;
}

.intel-provider-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.intel-provider-row strong,
.intel-provider-row span {
  display: block;
}

.intel-provider-row span,
.intel-provider-row p {
  color: var(--muted);
  margin: 4px 0 0;
}

body.intel-view-active {
  background: #07111d;
}

body.intel-view-active .shell {
  background: #07111d;
}

body.intel-view-active .sidebar {
  background:
    linear-gradient(180deg, #06101c 0%, #071728 58%, #050b14 100%);
  border-right-color: rgba(117, 158, 205, 0.16);
}

body.intel-view-active .main {
  background:
    radial-gradient(circle at 75% 0%, rgba(61, 100, 190, 0.18), transparent 34%),
    linear-gradient(180deg, #07111d 0%, #0a1724 100%);
}

body.intel-view-active .topbar {
  border-color: rgba(117, 158, 205, 0.18);
  background: rgba(7, 17, 29, 0.88);
  color: #eef6ff;
}

body.intel-view-active .topbar h1,
body.intel-view-active .topbar .eyebrow {
  color: #eef6ff;
}

.intel-console {
  display: grid;
  gap: 14px;
  min-height: calc(100vh - 160px);
  color: #eef6ff;
}

.intel-command-bar {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(340px, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(117, 158, 205, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(12, 27, 45, 0.96), rgba(7, 17, 29, 0.96));
  padding: 12px 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.intel-brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.intel-brand-lockup .brand-logo {
  width: 38px;
  height: 38px;
  box-shadow: 0 0 0 1px rgba(86, 147, 255, 0.28), 0 14px 30px rgba(30, 88, 210, 0.18);
}

.intel-brand-lockup strong,
.intel-brand-lockup span:not(.brand-logo) {
  display: block;
}

.intel-brand-lockup strong {
  color: #ffffff;
  font-size: 0.98rem;
}

.intel-brand-lockup span:not(.brand-logo) {
  color: rgba(220, 232, 247, 0.66);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.intel-search {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: center;
}

.intel-search input,
.intel-search select {
  min-height: 42px;
  border-color: rgba(117, 158, 205, 0.2);
  background: rgba(5, 14, 25, 0.86);
  color: #eef6ff;
}

.intel-search input::placeholder {
  color: rgba(220, 232, 247, 0.52);
}

.intel-search button {
  min-height: 42px;
}

.intel-tenant-pill {
  display: grid;
  gap: 2px;
  min-width: 128px;
  border: 1px solid rgba(117, 158, 205, 0.16);
  border-radius: 8px;
  background: rgba(5, 14, 25, 0.62);
  padding: 8px 11px;
}

.intel-tenant-pill span {
  color: rgba(220, 232, 247, 0.58);
  font-size: 0.72rem;
}

.intel-tenant-pill strong {
  color: #ffffff;
  font-size: 0.86rem;
}

.intel-output {
  min-height: 560px;
}

.intel-history-panel {
  border: 1px solid rgba(117, 158, 205, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 24, 41, 0.94), rgba(6, 15, 27, 0.96));
  padding: 14px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.intel-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.intel-history-heading h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
}

.intel-history-heading p {
  margin: 3px 0 0;
  color: rgba(220, 232, 247, 0.62);
  font-size: 0.84rem;
}

.intel-history-heading .danger-soft {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(127, 29, 29, 0.3);
  color: #fecaca;
}

.intel-history-heading .danger-soft:not(:disabled):hover,
.intel-history-heading .danger-soft:focus-visible {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(185, 28, 28, 0.42);
  color: #ffffff;
}

.intel-lookup-history-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.intel-history-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  border: 1px solid rgba(117, 158, 205, 0.16);
  border-radius: 8px;
  background: rgba(5, 14, 25, 0.72);
  color: #eef6ff;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.intel-history-item:hover,
.intel-history-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(86, 147, 255, 0.52);
  background: rgba(16, 38, 68, 0.88);
  outline: none;
}

.intel-history-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 30px;
  border-radius: 8px;
  background: rgba(64, 126, 255, 0.14);
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.intel-history-value {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.intel-history-value strong,
.intel-history-value small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intel-history-value strong {
  color: #ffffff;
  font-size: 0.9rem;
}

.intel-history-value small {
  color: rgba(220, 232, 247, 0.58);
  font-size: 0.76rem;
}

.intel-history-score {
  font-weight: 950;
  font-size: 0.84rem;
}

.intel-history-empty,
.intel-history-skeleton {
  grid-column: 1 / -1;
  border: 1px dashed rgba(117, 158, 205, 0.2);
  border-radius: 8px;
  background: rgba(5, 14, 25, 0.54);
  color: rgba(220, 232, 247, 0.64);
  padding: 16px;
  text-align: center;
}

.intel-history-empty.error {
  border-color: rgba(248, 113, 113, 0.36);
  color: #fecaca;
}

.intel-history-skeleton {
  display: grid;
  gap: 8px;
}

.intel-history-skeleton span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(117, 158, 205, 0.1), rgba(117, 158, 205, 0.32), rgba(117, 158, 205, 0.1));
  animation: shimmer 1.3s linear infinite;
}

.intel-history-skeleton span:nth-child(2) {
  width: 74%;
}

.intel-history-skeleton span:nth-child(3) {
  width: 48%;
}

@keyframes shimmer {
  0% {
    background-position: -220px 0;
  }

  100% {
    background-position: 220px 0;
  }
}

.intel-empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 560px;
  border: 1px solid rgba(117, 158, 205, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(36, 91, 194, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(10, 24, 41, 0.94), rgba(6, 15, 27, 0.96));
  padding: 40px;
  text-align: center;
}

.intel-empty-state h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.8rem;
}

.intel-empty-state p {
  max-width: 680px;
  margin: 0;
  color: rgba(220, 232, 247, 0.7);
}

.intel-empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(86, 147, 255, 0.42);
  border-radius: 8px;
  background: linear-gradient(135deg, #214eaa, #5f37d5);
  color: #ffffff;
  font-weight: 950;
  box-shadow: 0 18px 34px rgba(40, 86, 200, 0.24);
}

.intel-error-state .intel-empty-icon {
  border-color: rgba(248, 113, 113, 0.5);
  background: linear-gradient(135deg, #9f1d2e, #df3a38);
}

.intel-empty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(720px, 100%);
  margin-top: 8px;
}

.intel-empty-grid div {
  border: 1px solid rgba(117, 158, 205, 0.16);
  border-radius: 8px;
  background: rgba(5, 14, 25, 0.68);
  padding: 13px;
}

.intel-empty-grid strong,
.intel-empty-grid span {
  display: block;
}

.intel-empty-grid span {
  color: rgba(220, 232, 247, 0.6);
  font-size: 0.82rem;
  margin-top: 4px;
}

.intel-result-shell {
  display: grid;
  gap: 14px;
}

.intel-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(220, 232, 247, 0.58);
  font-size: 0.82rem;
}

.intel-breadcrumbs span::after {
  content: ">";
  margin-left: 8px;
  color: rgba(220, 232, 247, 0.36);
}

.intel-breadcrumbs strong {
  color: #ffffff;
}

.intel-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

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

.intel-title-row h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  word-break: break-word;
}

.icon-button,
.intel-type-badge {
  border: 1px solid rgba(117, 158, 205, 0.22);
  border-radius: 8px;
  background: rgba(5, 14, 25, 0.74);
  color: rgba(220, 232, 247, 0.82);
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.intel-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  text-transform: uppercase;
}

.intel-inline-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 14px;
}

.intel-inline-stats div {
  display: grid;
  gap: 5px;
  min-width: 128px;
  border-left: 1px solid rgba(117, 158, 205, 0.22);
  padding: 0 20px;
}

.intel-inline-stats div:first-child {
  padding-left: 0;
  border-left: 0;
}

.intel-inline-stats span,
.intel-card h3 + p,
.intel-info-list span {
  color: rgba(220, 232, 247, 0.62);
}

.intel-inline-stats strong {
  color: #ffffff;
  font-size: 0.98rem;
}

.intel-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.intel-header-actions button,
.intel-quick-actions button,
.intel-review-tray button {
  min-height: 38px;
  border: 1px solid rgba(117, 158, 205, 0.24);
  border-radius: 8px;
  background: rgba(5, 14, 25, 0.82);
  color: #eaf3ff;
  padding: 0 13px;
  font-size: 0.82rem;
  font-weight: 900;
}

.intel-header-actions button.is-loading,
.intel-quick-actions button.is-loading,
.intel-review-tray button.is-loading {
  opacity: 0.72;
  cursor: wait;
}

.intel-header-actions .primary,
.analyst-review-button {
  border-color: rgba(153, 91, 255, 0.48);
  background: linear-gradient(135deg, #4338ca, #772ab8);
  color: #ffffff;
}

.intel-review-tray,
.intel-report-note,
body.intel-view-active #intel-action-message {
  border: 1px solid rgba(117, 158, 205, 0.18);
  border-radius: 8px;
  background: rgba(8, 21, 36, 0.92);
  color: #eef6ff;
  padding: 12px;
}

.intel-review-tray {
  display: grid;
  gap: 10px;
}

.intel-review-note-label {
  color: rgba(220, 232, 247, 0.72);
  font-size: 0.8rem;
  font-weight: 900;
}

.intel-review-tray textarea {
  min-height: 82px;
  border: 1px solid rgba(117, 158, 205, 0.22);
  border-radius: 8px;
  background: #07111d;
  color: #eaf3ff;
  padding: 10px 12px;
  resize: vertical;
}

.intel-review-tray span {
  color: rgba(220, 232, 247, 0.66);
}

.intel-review-tray div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intel-report-note textarea {
  min-height: 260px;
  border-color: rgba(117, 158, 205, 0.18);
  background: #07111d;
  color: #eaf3ff;
}

.intel-card,
.intel-section-card {
  border: 1px solid rgba(117, 158, 205, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 30, 49, 0.95), rgba(8, 20, 34, 0.96));
  color: #eef6ff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.tone-danger {
  color: #ff5b5f !important;
}

.tone-warning,
.tone-critical,
.tone-high,
.tone-medium {
  color: #ff9f43 !important;
}

.tone-safe,
.tone-low {
  color: #48d597 !important;
}

.tone-neutral {
  color: #9fc3f7 !important;
}

.intel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.intel-main-column,
.intel-side-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.intel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid rgba(117, 158, 205, 0.16);
  border-radius: 8px 8px 0 0;
  background: rgba(10, 25, 42, 0.92);
  overflow: hidden;
}

.intel-tabs button {
  min-height: 48px;
  border: 0;
  border-right: 1px solid rgba(117, 158, 205, 0.12);
  background: transparent;
  color: rgba(220, 232, 247, 0.78);
  padding: 0 17px;
  font-weight: 900;
}

.intel-tabs button.active {
  color: #78adff;
  box-shadow: inset 0 -2px 0 #4f8cff;
}

.intel-tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(220, 232, 247, 0.12);
  color: #ffffff;
  margin-left: 6px;
  font-size: 0.72rem;
}

.intel-tab-content {
  display: grid;
  gap: 12px;
}

.intel-tab-panel {
  display: grid;
  gap: 12px;
  animation: intel-panel-in 160ms ease-out;
}

@keyframes intel-panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intel-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr 2fr;
  gap: 12px;
}

.intel-card,
.intel-section-card {
  padding: 14px;
}

.intel-threat-assessment-card {
  padding-left: 24px;
}

.intel-card h3,
.intel-section-card h4 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 0.98rem;
}

.intel-card p,
.intel-section-card p {
  color: rgba(220, 232, 247, 0.76);
  line-height: 1.55;
}

.intel-investigation-summary {
  background:
    radial-gradient(circle at top left, rgba(86, 147, 255, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(13, 30, 49, 0.97), rgba(7, 17, 30, 0.98));
}

.intel-summary-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.intel-summary-card {
  min-height: 86px;
  border: 1px solid rgba(117, 158, 205, 0.14);
  border-radius: 8px;
  background: rgba(5, 14, 25, 0.54);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.intel-summary-card span,
.intel-summary-card small {
  display: block;
  color: rgba(220, 232, 247, 0.58);
}

.intel-summary-card strong {
  display: block;
  margin: 5px 0;
  color: #ffffff;
  font-size: 1.05rem;
}

.intel-summary-card.tone-danger,
.intel-summary-card.tone-critical,
.intel-summary-card.tone-high {
  border-color: rgba(255, 91, 95, 0.32);
  background: rgba(74, 21, 33, 0.38);
}

.intel-summary-card.tone-warning,
.intel-summary-card.tone-medium {
  border-color: rgba(255, 159, 67, 0.3);
  background: rgba(72, 46, 17, 0.34);
}

.intel-summary-card.tone-safe,
.intel-summary-card.tone-low {
  border-color: rgba(72, 213, 151, 0.28);
  background: rgba(18, 68, 52, 0.28);
}

.intel-summary-card.tone-neutral {
  border-color: rgba(117, 158, 205, 0.18);
}

.intel-priority-banner {
  margin-top: 12px;
  border: 1px solid rgba(117, 158, 205, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 38, 64, 0.9), rgba(6, 17, 31, 0.96));
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.intel-priority-banner.tone-warning,
.intel-priority-banner.tone-medium {
  border-color: rgba(255, 184, 92, 0.36);
  background:
    linear-gradient(135deg, rgba(96, 58, 18, 0.72), rgba(16, 24, 37, 0.95));
}

.intel-priority-banner.tone-danger,
.intel-priority-banner.tone-critical,
.intel-priority-banner.tone-high {
  border-color: rgba(255, 91, 95, 0.38);
  background:
    linear-gradient(135deg, rgba(88, 24, 35, 0.72), rgba(16, 24, 37, 0.95));
}

.intel-priority-banner.tone-safe,
.intel-priority-banner.tone-low {
  border-color: rgba(72, 213, 151, 0.34);
  background:
    linear-gradient(135deg, rgba(18, 78, 59, 0.7), rgba(16, 24, 37, 0.95));
}

.intel-priority-banner strong {
  display: block;
  margin-bottom: 5px;
  color: #ffffff;
}

.intel-priority-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

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

.intel-evidence-list {
  border: 1px solid rgba(117, 158, 205, 0.14);
  border-radius: 8px;
  background: rgba(5, 14, 25, 0.42);
  padding: 12px;
}

.intel-evidence-list h4 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 0.88rem;
}

.intel-evidence-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intel-evidence-list li {
  position: relative;
  padding-left: 18px;
  color: rgba(238, 246, 255, 0.84);
  line-height: 1.45;
}

.intel-evidence-list li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.64em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #9fc3f7;
}

.intel-evidence-list.tone-safe li::before {
  background: #48d597;
}

.intel-evidence-list.tone-warning li::before {
  background: #ffb85c;
}

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

.intel-domain-grid div {
  border: 1px solid rgba(117, 158, 205, 0.14);
  border-radius: 8px;
  background: rgba(5, 14, 25, 0.42);
  padding: 11px 12px;
  min-width: 0;
}

.intel-domain-grid span,
.intel-domain-grid strong {
  display: block;
}

.intel-domain-grid span {
  color: rgba(220, 232, 247, 0.58);
  font-size: 0.78rem;
}

.intel-domain-grid strong {
  margin-top: 4px;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.intel-limitation-box {
  border: 1px solid rgba(255, 184, 92, 0.22);
  border-radius: 8px;
  background: rgba(72, 46, 17, 0.28);
  color: #ffe1b0;
  padding: 11px 12px;
  line-height: 1.45;
}

.intel-assessment-list,
.intel-info-list {
  display: grid;
}

.intel-assessment-list div,
.intel-info-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid rgba(117, 158, 205, 0.12);
  padding: 10px 0;
}

.intel-assessment-list div:first-child,
.intel-info-list div:first-child {
  border-top: 0;
}

.intel-assessment-list strong,
.intel-info-list strong {
  color: #ffffff;
  overflow-wrap: anywhere;
}

.intel-tag-groups .tag-row,
.intel-two-column {
  display: grid;
  gap: 12px;
}

.intel-tag-groups .tag-row {
  display: flex;
  flex-wrap: wrap;
  margin: 12px 0;
}

body.intel-view-active .tag {
  border-color: rgba(86, 147, 255, 0.22);
  background: rgba(86, 147, 255, 0.14);
  color: #b8d4ff;
}

.intel-status-details {
  display: grid;
  gap: 7px;
  border-top: 1px solid rgba(117, 158, 205, 0.12);
  padding-top: 12px;
}

.intel-status-details p {
  margin: 0;
}

.intel-chart-card {
  grid-row: span 1;
}

.intel-line-chart {
  display: block;
  width: 100%;
  min-height: 170px;
  border: 1px solid rgba(117, 158, 205, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(rgba(117, 158, 205, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 158, 205, 0.08) 1px, transparent 1px);
  background-size: 44px 36px;
}

.intel-line-chart .grid-lines line {
  stroke: rgba(117, 158, 205, 0.18);
}

.intel-line-chart .line {
  fill: none;
  stroke-width: 3;
}

.intel-line-chart .line-blue {
  stroke: #5794ff;
}

.intel-line-chart .line-red {
  stroke: #ff4b55;
}

.intel-chart-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  color: rgba(220, 232, 247, 0.62);
  font-size: 0.78rem;
}

.intel-chart-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 6px;
}

.intel-chart-legend .blue::before {
  background: #5794ff;
}

.intel-chart-legend .red::before {
  background: #ff4b55;
}

.intel-category-card {
  grid-column: 3;
}

.intel-donut-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.intel-donut {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #0b1726 0 45%, transparent 46%),
    conic-gradient(#5f6ee8 0 calc(var(--score) * 1%), #ff5b5f 0 70%, #ff8a3d 0 84%, #48d597 0 100%);
}

.intel-donut strong {
  color: #ffffff;
}

.intel-category-list {
  display: grid;
  gap: 9px;
}

.intel-category-list div {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: rgba(220, 232, 247, 0.74);
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.swatch-0 { background: #5f6ee8; }
.swatch-1 { background: #ff5b5f; }
.swatch-2 { background: #ff8a3d; }
.swatch-3 { background: #48d597; }
.swatch-4 { background: #a991ff; }

.intel-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.intel-section-card .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intel-card-title-row,
.intel-card-title-row span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.intel-card-title-row span {
  color: rgba(220, 232, 247, 0.58);
  font-size: 0.82rem;
}

.intel-provider-table-wrap {
  overflow-x: auto;
}

.intel-provider-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  color: rgba(238, 246, 255, 0.86);
}

.intel-provider-table th,
.intel-provider-table td {
  border-top: 1px solid rgba(117, 158, 205, 0.12);
  padding: 10px;
  text-align: left;
  font-size: 0.82rem;
}

.intel-provider-table th {
  color: rgba(220, 232, 247, 0.58);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.intel-table-status,
.intel-freshness {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 8px;
  font-weight: 900;
}

.intel-confidence-bar {
  display: inline-flex;
  width: 58px;
  height: 7px;
  border-radius: 999px;
  background: rgba(117, 158, 205, 0.2);
  margin-right: 8px;
  overflow: hidden;
}

.intel-confidence-bar em {
  display: block;
  border-radius: inherit;
  background: #5794ff;
}

.intel-provider-list {
  display: grid;
  gap: 8px;
}

.intel-provider-table-wrap + .intel-provider-list {
  display: none;
}

.intel-provider-row {
  border: 1px solid rgba(117, 158, 205, 0.14);
  background: rgba(5, 14, 25, 0.42);
}

.intel-relationship-list,
.intel-mitre-list,
.intel-recommendation-list,
.intel-history-timeline {
  display: grid;
  gap: 10px;
}

.intel-relationship-list div,
.intel-mitre-list div,
.intel-recommendation-list div,
.intel-history-timeline div {
  border: 1px solid rgba(117, 158, 205, 0.14);
  border-radius: 8px;
  background: rgba(5, 14, 25, 0.42);
  padding: 12px;
}

.intel-relationship-list div {
  display: grid;
  grid-template-columns: minmax(130px, 0.45fr) minmax(120px, 0.4fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.intel-relationship-list span,
.intel-relationship-list em,
.intel-relationship-list small,
.intel-mitre-list span,
.intel-history-timeline span,
.intel-history-timeline small {
  color: rgba(220, 232, 247, 0.62);
  font-style: normal;
}

.intel-relationship-list strong,
.intel-mitre-list strong,
.intel-history-timeline strong {
  color: #ffffff;
}

.intel-mitre-list div {
  display: grid;
  gap: 6px;
}

.intel-recommendation-list div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.intel-recommendation-list span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(86, 147, 255, 0.16);
  color: #9fc3f7;
  font-weight: 950;
}

.intel-recommendation-list p,
.intel-history-timeline p {
  margin: 0;
}

.intel-history-timeline div {
  position: relative;
  padding-left: 18px;
}

.intel-history-timeline div::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #5794ff;
}

.intel-history-timeline span,
.intel-history-timeline strong,
.intel-history-timeline small {
  display: block;
}

.intel-history-timeline strong {
  margin: 4px 0;
}

.intel-side-column .intel-card {
  padding: 14px;
}

.intel-quick-actions {
  display: grid;
  gap: 8px;
}

.intel-quick-actions button {
  display: grid;
  gap: 3px;
  justify-content: flex-start;
  text-align: left;
  min-height: 58px;
  padding: 10px 12px;
}

.intel-quick-actions button strong,
.intel-quick-actions button small {
  display: block;
}

.intel-quick-actions button strong {
  color: #ffffff;
}

.intel-quick-actions button small {
  color: rgba(220, 232, 247, 0.58);
  font-weight: 700;
  line-height: 1.35;
}

.intel-sighting-stack {
  display: grid;
  gap: 10px;
}

.intel-sighting-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.intel-sighting-row > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 159, 67, 0.16);
  color: #ffb85c;
  font-weight: 950;
}

.intel-sighting-row strong,
.intel-sighting-row small {
  display: block;
}

.intel-sighting-row small {
  color: rgba(220, 232, 247, 0.56);
}

.selected-file-summary {
  min-height: 36px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 9px 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--navy);
  font-size: 0.92rem;
}

.upload-progress span {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(4, 124, 117, 0.24);
  border-top-color: var(--teal);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

.upload-notification {
  margin-bottom: 10px;
}

.upload-toast {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.35;
}

.upload-toast.success {
  border-color: rgba(22, 125, 84, 0.24);
  background: var(--green-soft);
  color: var(--green);
}

.upload-toast.error {
  border-color: rgba(188, 55, 55, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.upload-toast.neutral {
  background: #eef6f6;
  color: var(--navy);
}

.upload-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.upload-table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 920px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fafc, #eefdf8);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.upload-table-actions > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.upload-delete-all {
  min-height: 34px;
  border-color: transparent;
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(185, 28, 28, 0.18);
}

.upload-delete-all:not(:disabled):hover {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

.upload-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.upload-table th,
.upload-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.upload-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.upload-table td:nth-child(1) {
  min-width: 180px;
}

.hash-value {
  display: inline-block;
  max-width: 180px;
  font-family: Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.hash-actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.hash-actions button,
.table-action {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 9px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  border-color: transparent;
  background: var(--teal);
  color: #ffffff;
}

.hash-actions button:focus-visible,
.table-action:focus-visible,
.primary:focus-visible,
.secondary:focus-visible,
.nav-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(4, 124, 117, 0.24);
  outline-offset: 2px;
}

button:disabled,
.table-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.upload-meta-grid span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  min-width: 0;
  word-break: break-word;
}

.upload-meta-grid b {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.danger-action {
  color: var(--red);
  border-color: rgba(188, 55, 55, 0.28);
}

.knowledge-table .danger-action {
  border-color: transparent;
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(220, 38, 38, 0.16);
}

.knowledge-table .danger-action:hover {
  background: #b91c1c;
  color: #ffffff;
}

.status.error {
  color: var(--red);
  background: var(--red-soft);
}

.knowledge-page-title {
  align-items: center;
  margin-bottom: 8px;
}

.knowledge-hero {
  border: 1px solid rgba(4, 124, 117, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(230, 247, 244, 0.92), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 90% 20%, rgba(33, 98, 183, 0.15), transparent 32%);
  padding: 18px;
  box-shadow: var(--shadow);
}

.knowledge-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.knowledge-service-status {
  min-height: 22px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.knowledge-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.knowledge-metrics article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  min-height: 104px;
  gap: 14px;
}

.knowledge-metrics strong {
  margin: 3px 0;
  font-size: 1.7rem;
}

.knowledge-metrics .metric-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4fbfa;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 950;
}

.knowledge-metrics .metric-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.knowledge-metrics .metric-icon.ready {
  background: var(--green-soft);
  color: var(--green);
}

.knowledge-metrics .metric-icon.processing {
  background: #fff5df;
  color: #a45f00;
}

.knowledge-metrics .metric-icon.failed {
  background: var(--red-soft);
  color: var(--red);
}

.compact-knowledge-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.compact-knowledge-metrics article {
  display: block;
  min-height: 0;
  padding: 12px 14px;
}

.compact-knowledge-metrics article div {
  display: grid;
  gap: 4px;
}

.compact-knowledge-metrics span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compact-knowledge-metrics strong {
  margin: 0;
  color: #0f172a;
  font-size: 1.32rem;
  line-height: 1;
}

.knowledge-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.knowledge-library-column {
  min-width: 0;
}

.knowledge-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0;
  width: 100%;
}

.knowledge-tab {
  position: relative;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 0 10px;
  font-weight: 900;
}

.knowledge-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.knowledge-tab.active {
  color: var(--teal);
}

.knowledge-tab.active::after {
  background: var(--teal);
}

.knowledge-tab:focus-visible {
  outline: 3px solid rgba(4, 124, 117, 0.24);
  outline-offset: 2px;
}

.knowledge-tab-panel {
  display: none;
}

.knowledge-tab-panel.active {
  display: block;
}

.knowledge-panel {
  padding: 16px;
}

.knowledge-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 190px 160px auto;
  align-items: end;
  gap: 10px;
  margin: 10px 0 14px;
}

.add-uploaded-document {
  min-height: 44px;
  align-self: end;
  background: linear-gradient(135deg, #0f766e, #0ea5a0);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.18);
}

.knowledge-toolbar label {
  margin: 0;
}

.knowledge-toolbar label span,
.field-help {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.knowledge-message {
  margin-bottom: 10px;
}

.knowledge-table-region {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(236, 253, 245, 0.42)),
    #ffffff;
}

.knowledge-document-card-list {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.knowledge-document-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 5px solid #14b8a6;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.58)),
    #ffffff;
  padding: 16px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.knowledge-document-card.pdf {
  border-left-color: #f97316;
}

.knowledge-document-card.json {
  border-left-color: #8b5cf6;
}

.knowledge-document-card.txt,
.knowledge-document-card.log {
  border-left-color: #2563eb;
}

.knowledge-document-card.csv {
  border-left-color: #16a34a;
}

.knowledge-card-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.knowledge-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-card-title-row h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.3;
}

.knowledge-card-title-row p,
.knowledge-card-summary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.knowledge-card-summary {
  max-width: 880px;
  color: #334155;
}

.knowledge-card-topics,
.knowledge-detail-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.knowledge-card-topics span,
.knowledge-detail-topics span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 900;
}

.knowledge-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.knowledge-card-question {
  display: grid;
  gap: 6px;
  max-width: 720px;
}

.knowledge-card-question span {
  color: #0f766e;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.knowledge-card-question button,
.knowledge-detail-questions button {
  justify-content: flex-start;
  min-height: 38px;
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 8px;
  background: #f0fdfa;
  color: #0f172a;
  padding: 8px 11px;
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
}

.knowledge-card-question button:hover,
.knowledge-card-question button:focus-visible,
.knowledge-detail-questions button:hover,
.knowledge-detail-questions button:focus-visible {
  border-color: rgba(20, 184, 166, 0.42);
  background: #ccfbf1;
  color: #0f766e;
}

.knowledge-card-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 190px;
}

.knowledge-insight-section {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.94));
  padding: 14px;
}

.knowledge-insight-section h3,
.knowledge-detail-section-title h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.96rem;
}

.knowledge-insight-section p {
  margin: 0;
  color: #334155;
  line-height: 1.6;
}

.knowledge-detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-detail-questions {
  display: grid;
  gap: 8px;
}

.knowledge-table {
  font-size: 0.86rem;
  border-collapse: separate;
  border-spacing: 0;
}

.knowledge-table th {
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(135deg, #f8fafc, #eefdf8);
  color: #334155;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.knowledge-table tr {
  min-height: 78px;
}

.knowledge-table tbody tr {
  background: rgba(255, 255, 255, 0.86);
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.knowledge-table tbody tr td:first-child {
  border-left: 4px solid #14b8a6;
  padding-left: 12px;
}

.knowledge-table tbody tr:hover {
  background: #ffffff;
  box-shadow: inset 0 0 0 999px rgba(20, 184, 166, 0.035);
  transform: translateY(-1px);
}

.knowledge-table tbody tr.pdf td:first-child {
  border-left-color: #f97316;
}

.knowledge-table tbody tr.json td:first-child {
  border-left-color: #8b5cf6;
}

.knowledge-table tbody tr.txt td:first-child,
.knowledge-table tbody tr.log td:first-child {
  border-left-color: #2563eb;
}

.knowledge-table tbody tr.csv td:first-child {
  border-left-color: #16a34a;
}

.knowledge-document-cell {
  display: block;
  min-width: 230px;
  padding-left: 6px;
}

.knowledge-document-cell strong {
  display: block;
  color: #0f172a;
  font-size: 0.94rem;
  line-height: 1.35;
}

.knowledge-table td:first-child small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  word-break: break-word;
}

.knowledge-type-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 28px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 999px;
  background: #eafaf7;
  color: #0f766e;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.knowledge-collection-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 28px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 11px;
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.knowledge-type-chip.pdf {
  border-color: rgba(249, 115, 22, 0.24);
  background: #fff7ed;
  color: #c2410c;
}

.knowledge-type-chip.json {
  border-color: rgba(139, 92, 246, 0.24);
  background: #f5f3ff;
  color: #6d28d9;
}

.knowledge-type-chip.txt,
.knowledge-type-chip.log {
  border-color: rgba(37, 99, 235, 0.22);
  background: #eff6ff;
  color: #1d4ed8;
}

.knowledge-type-chip.csv {
  border-color: rgba(22, 163, 74, 0.22);
  background: #f0fdf4;
  color: #15803d;
}

.knowledge-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 0 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.knowledge-status-chip.success {
  border-color: rgba(31, 122, 63, 0.24);
  background: #ecfdf5;
  color: #15803d;
}

.knowledge-status-chip.error {
  border-color: rgba(180, 35, 24, 0.24);
  background: #fef2f2;
  color: #b91c1c;
}

.knowledge-status-chip.info {
  border-color: rgba(4, 124, 117, 0.22);
  background: #ecfeff;
  color: #0e7490;
}

.knowledge-status-chip.muted {
  border-color: rgba(100, 116, 139, 0.2);
  color: #64748b;
  background: #f8fafc;
}

.knowledge-table .knowledge-collection-chip,
.knowledge-table .knowledge-type-chip,
.knowledge-table .knowledge-status-chip {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.knowledge-table td[data-label="Collection"],
.knowledge-table td[data-label="Type"],
.knowledge-table td[data-label="File Type"],
.knowledge-table td[data-label="Status"],
.knowledge-table td[data-label="Processing Status"] {
  text-align: center;
}

.knowledge-progress-cell {
  display: grid;
  gap: 6px;
  min-width: 110px;
}

.knowledge-progress-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #d6dde2;
}

.knowledge-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0b6fbd;
}

.knowledge-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #ffffff;
  padding: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.knowledge-page-controls,
.knowledge-page-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.knowledge-page-number {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--navy);
  font-weight: 900;
}

.knowledge-page-number.active {
  border-color: transparent;
  background: var(--teal);
  color: #ffffff;
}

.knowledge-page-size-label {
  display: grid;
  grid-template-columns: 1fr;
  min-width: 110px;
  margin: 0 0 0 8px;
}

.knowledge-page-size-label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.knowledge-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.knowledge-file-list {
  display: grid;
  gap: 8px;
  max-height: 310px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 8px;
}

.knowledge-file-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  cursor: pointer;
}

.knowledge-file-option input {
  width: auto;
  margin-top: 4px;
}

.knowledge-file-option small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.knowledge-ask-card {
  max-width: 980px;
}

.knowledge-ask-card .panel-title {
  align-items: flex-start;
}

.knowledge-ask-card .panel-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.knowledge-ask-card textarea {
  min-height: 110px;
}

#knowledge-question {
  border-color: rgba(148, 163, 184, 0.24);
  background: #fbfdff;
  box-shadow: none;
}

#knowledge-question:focus,
#knowledge-question:focus-visible {
  border-color: rgba(148, 163, 184, 0.34);
  outline: none;
  box-shadow: none;
}

.knowledge-advanced {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 10px 12px;
}

.knowledge-advanced.compact {
  margin-top: 12px;
}

.knowledge-advanced summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
}

.retrieval-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.retrieval-grid label {
  margin: 0;
}

.retrieval-grid label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.knowledge-ask-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.knowledge-ask-feedback {
  min-height: 34px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 0.84rem;
  line-height: 1.35;
}

.knowledge-ask-feedback.success {
  border-color: rgba(31, 122, 63, 0.22);
  background: var(--green-soft);
  color: var(--green);
}

.knowledge-ask-feedback.error {
  border-color: rgba(180, 35, 24, 0.22);
  background: var(--red-soft);
  color: var(--red);
}

.knowledge-answer {
  min-height: 190px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.knowledge-answer-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.knowledge-answer-card h3 {
  margin: 0 0 8px;
}

.knowledge-answer-card p {
  margin: 0;
  line-height: 1.6;
}

.knowledge-citations {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.knowledge-citations h4 {
  margin: 0;
  color: #0f172a;
  font-size: 0.9rem;
}

.knowledge-citation-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
}

.knowledge-citation-card summary,
.knowledge-citation-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.knowledge-citation-card summary {
  cursor: pointer;
  list-style: none;
}

.knowledge-citation-card summary::-webkit-details-marker {
  display: none;
}

.knowledge-citation-card summary span,
.knowledge-citation-heading span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 24px;
  border-radius: 7px;
  background: #0f766e;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 950;
}

.knowledge-citation-card summary strong,
.knowledge-citation-heading strong {
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-citation-card summary small,
.knowledge-citation-heading small {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.knowledge-citation-card summary em {
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.knowledge-citation-card[open] summary em {
  background: #ccfbf1;
}

.knowledge-citation-excerpt {
  margin: 10px 0 0;
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  line-height: 1.55;
}

.knowledge-citation-card .table-action {
  margin-top: 10px;
}

.knowledge-history-list {
  display: grid;
  gap: 10px;
}

.danger-soft-button {
  min-height: 36px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  padding: 0 13px;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.danger-soft-button:hover:not(:disabled),
.danger-soft-button:focus-visible {
  border-color: rgba(220, 38, 38, 0.36);
  background: #dc2626;
  color: #ffffff;
}

.knowledge-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.74)),
    #ffffff;
  color: inherit;
  padding: 12px;
  text-align: left;
}

.knowledge-history-item strong,
.knowledge-history-item small {
  display: block;
}

.knowledge-history-item strong {
  color: #0f172a;
  line-height: 1.35;
}

.knowledge-history-item small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.grounded-pill {
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 4px 9px;
  font-size: 0.75rem;
  font-weight: 950;
}

.grounded-pill.warning {
  background: #fff5df;
  color: #7a4a00;
}

.grounded-pill.info {
  background: #e0f2fe;
  color: #075985;
}

.no-context-card {
  border-color: rgba(164, 95, 0, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(255, 255, 255, 0.92)),
    #fffaf0;
}

.clarification-card {
  border-color: rgba(37, 99, 235, 0.18);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.94)),
    #eff6ff;
}

.no-context-card .no-context-summary {
  color: #1f2937;
  font-weight: 850;
}

.no-context-card .no-context-detail {
  margin-top: 8px;
  color: #64748b;
  font-size: 0.92rem;
}

.knowledge-suggestions {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.source-card-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

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

.knowledge-detail-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 10px;
}

.knowledge-detail-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.knowledge-description {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.knowledge-page-title {
  margin-bottom: 8px;
}

.knowledge-page-title h2 {
  margin-bottom: 4px;
}

.knowledge-page-title p {
  color: #52637a;
  font-weight: 500;
}

.compact-knowledge-metrics article {
  min-height: 72px;
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.52)),
    #ffffff;
  padding: 10px 13px;
}

.compact-knowledge-metrics span {
  font-weight: 750;
}

.compact-knowledge-metrics strong {
  font-size: 1.18rem;
  font-weight: 850;
}

.knowledge-workspace {
  gap: 10px;
}

.knowledge-tabs {
  margin-top: 0;
}

.knowledge-panel {
  padding: 14px;
}

.knowledge-toolbar {
  grid-template-columns: minmax(220px, 1fr) 150px 170px 145px auto;
  margin-top: 2px;
}

.knowledge-table-region {
  border: 0;
  background: transparent;
}

.knowledge-document-card-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 4px 0 0;
}

.knowledge-document-card {
  position: relative;
  grid-template-columns: 1fr;
  min-height: 310px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-left: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.54)),
    #ffffff;
  padding: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.knowledge-document-card:hover {
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.knowledge-card-main {
  align-content: start;
}

.knowledge-card-title-row {
  align-items: flex-start;
}

.knowledge-card-title-group {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.knowledge-file-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.knowledge-file-icon.pdf {
  background: linear-gradient(135deg, #ffedd5, #fff7ed);
  color: #c2410c;
}

.knowledge-file-icon.json {
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
  color: #6d28d9;
}

.knowledge-file-icon.csv {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  color: #15803d;
}

.knowledge-card-title-row h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-weight: 780;
}

.knowledge-card-title-row p {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-card-file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.knowledge-card-file-meta span {
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 760;
}

.knowledge-card-summary {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #334155;
  font-weight: 500;
}

.knowledge-card-topics span,
.knowledge-detail-topics span {
  min-height: 25px;
  border-color: rgba(37, 99, 235, 0.12);
  background: #eef6ff;
  font-weight: 760;
}

.knowledge-card-meta {
  gap: 6px 10px;
  font-weight: 650;
}

.knowledge-card-question {
  max-width: 100%;
}

.knowledge-card-question .knowledge-suggestion-card,
.knowledge-context-questions button,
.knowledge-detail-questions button {
  display: grid;
  width: 100%;
  min-height: 0;
  gap: 4px;
  border-color: rgba(14, 165, 160, 0.22);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.68)),
    #f8fafc;
  padding: 10px 12px;
}

.knowledge-card-question .knowledge-suggestion-card span {
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.knowledge-card-question .knowledge-suggestion-card strong {
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.35;
}

.knowledge-card-actions {
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  margin-top: 4px;
}

.knowledge-primary-action,
.knowledge-secondary-action {
  min-height: 38px;
}

.knowledge-primary-action {
  background: linear-gradient(135deg, #0f766e, #0ea5a0);
  box-shadow: 0 10px 22px rgba(14, 165, 160, 0.18);
}

.knowledge-overflow {
  position: relative;
  margin-left: auto;
}

.knowledge-overflow-trigger {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  font-weight: 900;
}

.knowledge-overflow-trigger:hover,
.knowledge-overflow-trigger:focus-visible {
  border-color: rgba(20, 184, 166, 0.38);
  color: #0f766e;
  outline: 3px solid rgba(20, 184, 166, 0.16);
  outline-offset: 1px;
}

.knowledge-overflow-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 10;
  display: grid;
  min-width: 210px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.knowledge-menu-item {
  width: 100%;
  min-height: 38px;
  border: 0;
  background: #ffffff;
  color: #1f2937;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: left;
}

.knowledge-menu-item:hover,
.knowledge-menu-item:focus-visible {
  background: #f8fafc;
  color: #0f766e;
  outline: none;
}

.danger-menu-action {
  color: #b91c1c;
}

.danger-menu-action:hover,
.danger-menu-action:focus-visible {
  background: #fef2f2;
  color: #991b1b;
}

.knowledge-toast {
  position: fixed;
  top: 82px;
  right: 24px;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 4px solid #0f766e;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  padding: 12px;
}

.knowledge-toast strong,
.knowledge-toast small {
  display: block;
}

.knowledge-toast strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.knowledge-toast small {
  margin-top: 3px;
  color: #52637a;
  font-size: 0.82rem;
  line-height: 1.35;
}

.knowledge-toast.error {
  border-left-color: #dc2626;
}

.knowledge-toast.neutral {
  border-left-color: #2563eb;
}

.knowledge-toast button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
}

.knowledge-selected-document-context {
  margin: 6px 0 12px;
}

.knowledge-selected-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(14, 165, 160, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(239, 246, 255, 0.72)),
    #ffffff;
  padding: 12px;
}

.knowledge-selected-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.knowledge-selected-head strong,
.knowledge-selected-head small {
  display: block;
}

.knowledge-selected-head strong {
  color: #0f172a;
  font-weight: 780;
}

.knowledge-selected-head small,
.knowledge-selected-card p {
  color: #52637a;
  font-size: 0.84rem;
  font-weight: 500;
}

.knowledge-selected-card p {
  margin: 0;
  line-height: 1.45;
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.knowledge-context-questions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.knowledge-ask-card {
  max-width: 1040px;
}

.knowledge-ask-card textarea {
  min-height: 86px;
}

.knowledge-ask-actions {
  margin-top: 10px;
}

.knowledge-ask-feedback {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 550;
}

.knowledge-answer-card {
  border-color: rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.knowledge-answer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.knowledge-answer-head h3 {
  margin: 3px 0 0;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 780;
}

.knowledge-answer-body {
  color: #263445;
  font-size: 0.94rem;
  font-weight: 500;
}

.knowledge-evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.knowledge-evidence-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  background: #f8fafc;
  padding: 10px;
}

.knowledge-evidence-grid span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 720;
  text-transform: uppercase;
}

.knowledge-evidence-grid strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-citation-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.knowledge-citation-title-row span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 650;
}

.knowledge-citation-card {
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.knowledge-skeleton {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #e2e8f0;
}

.knowledge-skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  animation: knowledge-skeleton 1.25s infinite;
  content: "";
}

.knowledge-skeleton.square {
  width: 42px;
  height: 42px;
}

.knowledge-skeleton.title {
  width: min(260px, 48vw);
  height: 18px;
}

.knowledge-skeleton.text {
  width: 100%;
  height: 13px;
}

.knowledge-skeleton.text.short {
  width: 58%;
}

.knowledge-skeleton.pill {
  width: 90px;
  height: 28px;
  border-radius: 999px;
}

.knowledge-skeleton.chip {
  width: 82px;
  height: 25px;
  border-radius: 999px;
}

@keyframes knowledge-skeleton {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* RAG Knowledge Base visual polish */
.knowledge-page-title {
  position: relative;
  overflow: hidden;
  min-height: 106px;
  border: 1px solid rgba(14, 165, 160, 0.2);
  border-left: 5px solid #0f766e;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(236, 253, 245, 0.92) 42%, rgba(239, 246, 255, 0.9) 100%),
    repeating-linear-gradient(135deg, rgba(14, 165, 160, 0.08) 0 1px, transparent 1px 18px);
  padding: 18px 20px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.knowledge-page-title::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 55%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #14b8a6, #f59e0b);
  content: "";
}

.knowledge-page-title h2 {
  color: #09243f;
  font-size: 1.7rem;
  letter-spacing: 0;
}

.knowledge-page-title p {
  max-width: 680px;
  color: #31506f;
}

.knowledge-page-title .actions {
  position: relative;
  z-index: 1;
  gap: 10px;
}

.knowledge-page-title .actions button {
  min-height: 42px;
  white-space: nowrap;
}

.knowledge-page-title .actions .secondary {
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: #14304f;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.knowledge-page-title .actions .secondary:hover,
.knowledge-page-title .actions .secondary:focus-visible {
  border-color: rgba(37, 99, 235, 0.36);
  background: #eff6ff;
  color: #1d4ed8;
}

.knowledge-page-title .actions .primary,
.knowledge-page-title .actions .primary.add-uploaded-document,
.add-uploaded-document {
  border: 0;
  background: linear-gradient(135deg, #047c75 0%, #0891b2 55%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(8, 145, 178, 0.24);
}

.knowledge-page-title .actions .primary:hover,
.knowledge-page-title .actions .primary:focus-visible,
.add-uploaded-document:hover,
.add-uploaded-document:focus-visible {
  background: linear-gradient(135deg, #0f766e 0%, #0369a1 54%, #4338ca 100%);
}

.compact-knowledge-metrics article {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.compact-knowledge-metrics article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  content: "";
}

.compact-knowledge-metrics article:nth-child(1) {
  border-color: rgba(8, 145, 178, 0.18);
  background: linear-gradient(135deg, #ffffff, #ecfeff);
}

.compact-knowledge-metrics article:nth-child(1)::before {
  background: #0891b2;
}

.compact-knowledge-metrics article:nth-child(2) {
  border-color: rgba(22, 163, 74, 0.18);
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
}

.compact-knowledge-metrics article:nth-child(2)::before {
  background: #16a34a;
}

.compact-knowledge-metrics article:nth-child(3) {
  border-color: rgba(245, 158, 11, 0.22);
  background: linear-gradient(135deg, #ffffff, #fffbeb);
}

.compact-knowledge-metrics article:nth-child(3)::before {
  background: #f59e0b;
}

.compact-knowledge-metrics article:nth-child(4) {
  border-color: rgba(225, 29, 72, 0.18);
  background: linear-gradient(135deg, #ffffff, #fff1f2);
}

.compact-knowledge-metrics article:nth-child(4)::before {
  background: #e11d48;
}

.compact-knowledge-metrics article:nth-child(1) span,
.compact-knowledge-metrics article:nth-child(1) strong {
  color: #075985;
}

.compact-knowledge-metrics article:nth-child(2) span,
.compact-knowledge-metrics article:nth-child(2) strong {
  color: #166534;
}

.compact-knowledge-metrics article:nth-child(3) span,
.compact-knowledge-metrics article:nth-child(3) strong {
  color: #92400e;
}

.compact-knowledge-metrics article:nth-child(4) span,
.compact-knowledge-metrics article:nth-child(4) strong {
  color: #9f1239;
}

.knowledge-tabs {
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(240, 253, 250, 0.76));
  padding: 6px;
}

.knowledge-tab {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 13px;
}

.knowledge-tab::after {
  display: none;
}

.knowledge-tab.active {
  background: #ffffff;
  color: #0f766e;
  box-shadow: inset 0 -2px 0 #14b8a6, 0 10px 20px rgba(15, 118, 110, 0.08);
}

.knowledge-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.98)),
    #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.knowledge-toolbar {
  border: 1px solid rgba(14, 165, 160, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.78), rgba(239, 246, 255, 0.84)),
    #ffffff;
  padding: 12px;
}

.knowledge-toolbar label span,
.knowledge-toolbar .field-help {
  color: #416177;
}

.knowledge-toolbar input,
.knowledge-toolbar select,
.knowledge-ask-card textarea {
  border-color: rgba(100, 116, 139, 0.24);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.knowledge-toolbar input:focus,
.knowledge-toolbar select:focus,
.knowledge-ask-card textarea:focus {
  border-color: rgba(8, 145, 178, 0.58);
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.14);
}

.knowledge-document-card {
  overflow: hidden;
  border-color: rgba(8, 145, 178, 0.28);
  background:
    linear-gradient(135deg, #ffffff 0%, #ecfeff 42%, #eef2ff 100%),
    #ffffff;
  box-shadow:
    0 24px 58px rgba(15, 23, 42, 0.1),
    0 8px 18px rgba(8, 145, 178, 0.1);
}

.knowledge-document-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, #047c75 0%, #14b8a6 34%, #2563eb 72%, #7c3aed 100%);
  content: "";
}

.knowledge-document-card.pdf {
  border-color: rgba(249, 115, 22, 0.3);
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 44%, #eef2ff 100%);
}

.knowledge-document-card.pdf::before {
  background: linear-gradient(90deg, #ef4444, #f97316, #f59e0b);
}

.knowledge-document-card.json {
  border-color: rgba(139, 92, 246, 0.3);
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 44%, #ecfeff 100%);
}

.knowledge-document-card.json::before {
  background: linear-gradient(90deg, #7c3aed, #2563eb, #14b8a6);
}

.knowledge-document-card.txt,
.knowledge-document-card.log {
  border-color: rgba(37, 99, 235, 0.3);
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 42%, #f0fdfa 100%);
}

.knowledge-document-card.txt::before,
.knowledge-document-card.log::before {
  background: linear-gradient(90deg, #2563eb, #0891b2, #14b8a6);
}

.knowledge-document-card.csv {
  border-color: rgba(22, 163, 74, 0.3);
  background: linear-gradient(135deg, #ffffff 0%, #dcfce7 42%, #ecfeff 100%);
}

.knowledge-document-card.csv::before {
  background: linear-gradient(90deg, #16a34a, #14b8a6, #0891b2);
}

.knowledge-document-card:hover {
  border-color: rgba(8, 145, 178, 0.52);
  box-shadow:
    0 30px 70px rgba(15, 23, 42, 0.14),
    0 12px 28px rgba(37, 99, 235, 0.14);
}

.knowledge-file-icon {
  --file-accent: #047c75;
  --file-accent-soft: #ccfbf1;
  position: relative;
  display: inline-grid;
  place-items: end center;
  isolation: isolate;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #ecfeff 0%, #dbeafe 100%);
  color: #ffffff;
  padding-bottom: 9px;
  font-size: 0.62rem;
  box-shadow:
    inset 0 0 0 1px rgba(8, 145, 178, 0.14),
    0 14px 26px rgba(37, 99, 235, 0.16);
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.18);
}

.knowledge-file-icon::before {
  position: absolute;
  top: 6px;
  left: 50%;
  z-index: -1;
  width: 34px;
  height: 42px;
  border: 1px solid rgba(8, 145, 178, 0.26);
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 0 68%, rgba(8, 145, 178, 0.16) 69% 100%) top right / 13px 13px no-repeat,
    linear-gradient(to bottom, #ffffff 0 60%, var(--file-accent) 60% 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  content: "";
  transform: translateX(-50%);
}

.knowledge-file-icon::after {
  position: absolute;
  top: 7px;
  right: 10px;
  z-index: 1;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--file-accent-soft), #ffffff);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  content: "";
}

.knowledge-file-icon.pdf {
  --file-accent: #dc2626;
  --file-accent-soft: #fee2e2;
  background: linear-gradient(135deg, #fff1f2 0%, #ffedd5 100%);
  color: #ffffff;
}

.knowledge-file-icon.json {
  --file-accent: #6d28d9;
  --file-accent-soft: #ede9fe;
  background: linear-gradient(135deg, #f5f3ff 0%, #dbeafe 100%);
  color: #ffffff;
}

.knowledge-file-icon.csv {
  --file-accent: #15803d;
  --file-accent-soft: #dcfce7;
  background: linear-gradient(135deg, #f0fdf4 0%, #ccfbf1 100%);
  color: #ffffff;
}

.knowledge-file-icon.txt,
.knowledge-file-icon.log {
  --file-accent: #047c75;
  --file-accent-soft: #ccfbf1;
  background: linear-gradient(135deg, #ecfeff 0%, #dbeafe 100%);
  color: #ffffff;
}

.knowledge-card-title-row h3 {
  color: #071326;
  font-weight: 850;
}

.knowledge-card-title-row p {
  color: #52637a;
}

.knowledge-card-file-meta span,
.knowledge-type-chip,
.knowledge-collection-chip {
  border: 1px solid rgba(79, 70, 229, 0.16);
  background: linear-gradient(135deg, #eef2ff 0%, #ecfeff 100%);
  color: #3730a3;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.06);
}

.knowledge-card-topics span,
.knowledge-detail-topics span {
  border-color: rgba(14, 165, 160, 0.28);
  background: linear-gradient(135deg, #ccfbf1 0%, #dbeafe 100%);
  color: #0f766e;
  box-shadow: 0 6px 14px rgba(14, 165, 160, 0.08);
}

.knowledge-card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #52637a;
  padding: 0 9px;
}

.knowledge-status-chip {
  text-align: center;
}

.knowledge-status-chip.success {
  border-color: rgba(22, 163, 74, 0.34);
  background: linear-gradient(135deg, #bbf7d0 0%, #dcfce7 100%);
  color: #14532d;
  box-shadow: 0 8px 16px rgba(22, 163, 74, 0.12);
}

.knowledge-status-chip.info {
  border-color: rgba(8, 145, 178, 0.24);
  background: linear-gradient(135deg, #cffafe, #eff6ff);
  color: #075985;
}

.knowledge-status-chip.error {
  border-color: rgba(225, 29, 72, 0.24);
  background: linear-gradient(135deg, #ffe4e6, #fff1f2);
  color: #be123c;
}

.knowledge-card-question .knowledge-suggestion-card,
.knowledge-context-questions button,
.knowledge-detail-questions button {
  border-color: rgba(8, 145, 178, 0.28);
  background:
    linear-gradient(135deg, rgba(204, 251, 241, 0.98) 0%, rgba(219, 234, 254, 0.96) 58%, rgba(245, 243, 255, 0.9) 100%),
    #ffffff;
  box-shadow: 0 14px 26px rgba(8, 145, 178, 0.12);
}

.knowledge-card-question .knowledge-suggestion-card span {
  color: #047c75;
}

.knowledge-card-question .knowledge-suggestion-card strong {
  color: #071326;
  font-weight: 760;
}

.knowledge-card-question .knowledge-suggestion-card:hover,
.knowledge-card-question .knowledge-suggestion-card:focus-visible,
.knowledge-context-questions button:hover,
.knowledge-context-questions button:focus-visible,
.knowledge-detail-questions button:hover,
.knowledge-detail-questions button:focus-visible {
  border-color: rgba(8, 145, 178, 0.42);
  background:
    linear-gradient(135deg, rgba(204, 251, 241, 0.96), rgba(219, 234, 254, 0.94)),
    #ffffff;
  color: #0f766e;
}

.knowledge-primary-action {
  background: linear-gradient(135deg, #047c75 0%, #0891b2 58%, #2563eb 100%);
  box-shadow: 0 14px 28px rgba(8, 145, 178, 0.24);
}

.knowledge-primary-action:hover,
.knowledge-primary-action:focus-visible {
  background: linear-gradient(135deg, #0f766e 0%, #0369a1 58%, #4338ca 100%);
}

.knowledge-secondary-action,
.knowledge-overflow-trigger {
  border-color: rgba(37, 99, 235, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: #24415f;
}

.knowledge-answer-card {
  border-color: rgba(8, 145, 178, 0.18);
  background:
    linear-gradient(135deg, #ffffff 0%, #f8fffd 52%, #eff6ff 100%),
    #ffffff;
}

.knowledge-answer-head {
  border-bottom: 1px solid rgba(14, 165, 160, 0.12);
  padding-bottom: 10px;
}

.knowledge-answer-head h3 {
  color: #09243f;
}

.knowledge-answer-body {
  color: #25364a;
}

.knowledge-evidence-grid div {
  border-color: rgba(14, 165, 160, 0.16);
  background: linear-gradient(135deg, #f8fafc, #ecfeff);
}

.knowledge-evidence-grid div:nth-child(2n) {
  border-color: rgba(37, 99, 235, 0.16);
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

.knowledge-citation-card,
.knowledge-history-item {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.5)),
    #ffffff;
}

.grounded-pill {
  border-color: rgba(22, 163, 74, 0.2);
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  color: #166534;
}

.grounded-pill.warning {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  color: #92400e;
}

.grounded-pill.info {
  border-color: rgba(8, 145, 178, 0.24);
  background: linear-gradient(135deg, #cffafe, #eff6ff);
  color: #075985;
}

.error-box {
  margin-top: 12px;
  border-color: rgba(180, 35, 24, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

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

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: #ffffff;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
}

label {
  display: block;
  margin: 12px 0 8px;
  color: var(--navy);
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  margin: 8px 0;
}

.chat-web-search {
  margin: 0;
  white-space: nowrap;
}

select,
input {
  min-height: 40px;
  padding: 0 10px;
}

textarea {
  min-height: 230px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.actions,
.chat-form {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.chat-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.chat-input {
  min-height: 44px;
  max-height: 150px;
  resize: none;
  overflow: auto;
}

.chat-upload-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--teal);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.chat-upload-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-upload-button:hover,
.chat-upload-button:focus-visible {
  border-color: rgba(0, 129, 122, 0.42);
  box-shadow: 0 10px 22px rgba(0, 129, 122, 0.16);
  transform: translateY(-1px);
}

.chat-upload-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.chat-file-preview {
  grid-column: 1 / -1;
}

.chat-file-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0, 129, 122, 0.24);
  border-radius: 8px;
  background: rgba(20, 184, 166, 0.08);
  padding: 10px;
}

.chat-file-type {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(37, 99, 235, 0.12));
  color: var(--teal-strong);
  font-size: 0.7rem;
  font-weight: 950;
}

.chat-file-details {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-file-details strong,
.chat-file-details small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-details strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.chat-file-details small {
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-file-remove {
  min-height: 34px;
  border: 1px solid rgba(201, 48, 48, 0.28);
  border-radius: 8px;
  background: rgba(254, 226, 226, 0.78);
  color: var(--red);
  font-weight: 900;
  cursor: pointer;
}

.chat-file-remove:hover,
.chat-file-remove:focus-visible {
  border-color: rgba(201, 48, 48, 0.45);
  background: rgba(254, 202, 202, 0.92);
}

.chat-file-remove:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary,
.secondary {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 800;
}

.primary {
  background: var(--teal);
  color: #ffffff;
}

.secondary {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.vuln-workspace {
  display: grid;
  gap: 16px;
}

.vuln-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 20px 0 6px;
}

.vuln-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.module-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #eef6f6;
  color: var(--teal);
}

.module-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vuln-header h2 {
  font-size: clamp(1.55rem, 2vw, 2rem);
}

.vuln-header p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.vuln-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vuln-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.vuln-input-panel,
.vuln-result-panel,
.vuln-history-panel {
  padding: 20px;
}

.vuln-input-panel textarea {
  min-height: 260px;
}

.field-counter {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.vuln-switches {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.switch-control {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  min-height: 34px;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-control span {
  position: relative;
  width: 44px;
  height: 24px;
  border: 1px solid #cbd8df;
  border-radius: 999px;
  background: #e9eff2;
  transition: background 160ms ease, border-color 160ms ease;
}

.switch-control span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 40, 56, 0.18);
  transition: transform 160ms ease;
}

.switch-control input:checked + span {
  border-color: var(--teal);
  background: var(--teal);
}

.switch-control input:checked + span::after {
  transform: translateX(20px);
}

.switch-control input:focus-visible + span {
  outline: 3px solid rgba(4, 124, 117, 0.24);
  outline-offset: 2px;
}

.switch-control strong {
  font-size: 0.92rem;
}

.vuln-help-box {
  border: 1px solid #bfe0dc;
  border-radius: 8px;
  background: #f1fbf9;
  padding: 14px;
  color: var(--navy);
}

.vuln-help-box strong {
  color: var(--teal);
}

.vuln-help-box ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.vuln-submit {
  width: 100%;
  margin-top: 16px;
}

.vuln-empty-state {
  min-height: 520px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.vuln-empty-state strong {
  color: var(--navy);
  font-size: 1.05rem;
}

.vuln-empty-state p {
  max-width: 480px;
  margin: 0;
  line-height: 1.5;
}

.vuln-empty-state.error {
  border-color: #f0c6be;
  background: var(--red-soft);
  color: var(--red);
}

.vuln-result-content {
  display: grid;
  gap: 14px;
}

.vuln-result-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1.2fr);
  gap: 14px;
}

.vuln-severity-card,
.vuln-meta-card,
.vuln-stat-card,
.vuln-section-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.vuln-severity-card {
  display: grid;
  gap: 6px;
  min-height: 150px;
  padding: 20px;
}

.vuln-severity-card span,
.vuln-severity-card small,
.vuln-meta-card span,
.vuln-stat-card span,
.vuln-stat-card small {
  color: var(--muted);
  font-size: 0.82rem;
}

.vuln-severity-card > strong {
  font-size: 1.4rem;
}

.vuln-score strong {
  font-size: 2rem;
}

.vuln-score span {
  margin-left: 4px;
  color: var(--ink);
  font-weight: 800;
}

.tone-critical,
.tone-high {
  border-color: #f0c6be;
  background: linear-gradient(180deg, #fff6f4, #ffffff);
  color: var(--red);
}

.tone-medium {
  border-color: #f1d9a4;
  background: linear-gradient(180deg, #fff9eb, #ffffff);
  color: #8a5a00;
}

.tone-low {
  border-color: #bfdfc7;
  background: linear-gradient(180deg, #f2fbf4, #ffffff);
  color: var(--green);
}

.vuln-meta-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.vuln-meta-card div {
  min-height: 74px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.vuln-meta-card div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.vuln-meta-card div:last-child {
  grid-column: 1 / -1;
  border-right: 0;
  border-bottom: 0;
}

.vuln-meta-card strong,
.vuln-stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--navy);
}

.vuln-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.vuln-stat-card {
  min-height: 110px;
  padding: 14px;
}

.vuln-stat-card strong {
  color: var(--teal);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.vuln-section-card {
  padding: 14px;
}

.vuln-section-card h4 {
  margin: 0 0 10px;
  color: var(--navy);
}

.vuln-section-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.vuln-section-card ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.55;
}

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

.vuln-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafb;
  padding: 0 10px;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 800;
}

.vuln-history-panel {
  margin-top: 2px;
}

.vuln-history-list {
  display: grid;
  gap: 8px;
}

.vuln-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.vuln-history-item:hover,
.vuln-history-item:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(4, 124, 117, 0.12);
}

.vuln-history-item span {
  display: grid;
  gap: 3px;
}

.vuln-history-item small {
  color: var(--muted);
}

.badge.vuln-badge-critical,
.badge.vuln-badge-high {
  color: var(--red);
  background: var(--red-soft);
}

.badge.vuln-badge-medium {
  color: #8a5a00;
  background: #fff4d8;
}

.badge.vuln-badge-low {
  color: var(--green);
  background: var(--green-soft);
}

.chat-panel {
  margin-top: 14px;
}

.chat-title {
  margin-bottom: 12px;
}

.prompt-chip {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.86rem;
}

.ai-status-panel {
  margin-top: 14px;
}

.persistent-chat {
  min-height: 640px;
}

.chat-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.conversation-sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 12px;
  min-height: 540px;
}

.conversation-sidebar label {
  margin: 0;
  font-weight: 900;
}

.new-chat-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  background: #ffffff;
  color: #162033;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.new-chat-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.new-chat-button:hover,
.new-chat-button:focus-visible {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.new-chat-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.conversation-list {
  display: grid;
  gap: 8px;
  max-height: 470px;
  overflow: auto;
  padding-bottom: 88px;
}

.conversation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
  position: relative;
}

.conversation-row.menu-open {
  z-index: 30;
}

.conversation-row > button:first-child {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.conversation-row.active > button:first-child,
.conversation-row > button:first-child:hover {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(4, 124, 117, 0.12);
}

.conversation-row strong,
.conversation-row small,
.conversation-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row small,
.conversation-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.conversation-action-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
}

.conversation-menu-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.conversation-row:hover .conversation-menu-button,
.conversation-row.active .conversation-menu-button,
.conversation-row.menu-open .conversation-menu-button,
.conversation-menu-button[aria-expanded="true"],
.conversation-menu-button:focus-visible {
  opacity: 1;
}

.conversation-menu-button:hover,
.conversation-menu-button:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
  background: #ffffff;
  transform: translateY(-1px);
}

.conversation-menu {
  position: absolute;
  top: 38px;
  right: 0;
  z-index: 40;
  min-width: 138px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  padding: 6px;
}

.conversation-menu button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #162033;
  padding: 9px 10px;
  text-align: left;
  font-size: 0.86rem;
  font-weight: 800;
}

.conversation-menu button:hover,
.conversation-menu button:focus-visible {
  background: rgba(37, 99, 235, 0.08);
}

.conversation-menu button.danger {
  color: #dc2626;
}

.conversation-menu button.danger:hover,
.conversation-menu button.danger:focus-visible {
  background: rgba(220, 38, 38, 0.1);
}

.conversation-rename-form {
  display: grid;
  gap: 9px;
  width: 100%;
  border: 1px solid rgba(37, 99, 235, 0.32);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.conversation-rename-form label {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.conversation-rename-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.conversation-rename-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.chat-main-panel {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto auto auto;
  min-width: 0;
}

.chat-main-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.chat-main-actions {
  display: flex;
  gap: 8px;
}

.chat-empty-state {
  align-self: center;
  justify-self: center;
  max-width: 520px;
  text-align: center;
  color: var(--muted);
}

.chat-empty-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(45, 212, 191, 0.26);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.1);
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 1.34rem;
  margin-bottom: 8px;
}

.chat-empty-state p {
  margin: 0 auto;
  max-width: 420px;
  line-height: 1.6;
}

.chat-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.chat-empty-action {
  min-height: 38px;
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.chat-empty-action:hover {
  border-color: rgba(20, 184, 166, 0.38);
  color: var(--teal-strong);
  transform: translateY(-1px);
}

.chat-privacy-note {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 10px 0 0;
}

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

.chat-input-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-input-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.chat-input-meta .near-limit {
  color: var(--red);
}

.message.failed {
  border: 1px solid rgba(201, 48, 48, 0.35);
  background: var(--red-soft);
}

.message.pending {
  opacity: 0.75;
}

.retry-chat {
  margin-top: 10px;
}

.message pre {
  position: relative;
}

.copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
}

.ai-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.config-grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.config-grid label {
  margin: 0;
}

.ai-status-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  min-width: 0;
}

.ai-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-status-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.chat-log {
  min-height: 360px;
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 16px;
}

.message {
  max-width: 78ch;
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.message pre {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1f2b;
  color: #edf7f8;
  padding: 12px;
  white-space: pre;
}

.message code {
  border-radius: 5px;
  background: #e8eef2;
  padding: 2px 5px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.message pre code {
  background: transparent;
  padding: 0;
}

.message .markdown-heading {
  display: block;
  margin-top: 4px;
}

.message small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.source-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.source-list strong {
  font-size: 0.82rem;
}

.source-list a {
  color: var(--teal);
  overflow-wrap: anywhere;
}

.incident-terms-panel {
  margin-top: 14px;
}

.incident-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.incident-summary-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.incident-summary-grid span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.incident-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.incident-metrics article,
.empty-state,
.incident-action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.incident-metrics span,
.incident-action-card small {
  color: var(--muted);
  font-size: 0.82rem;
}

.incident-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 1.45rem;
}

.incident-create-panel {
  margin-bottom: 14px;
}

.incident-guided-panel {
  margin-bottom: 18px;
  padding: 32px;
  border-color: rgba(139, 150, 178, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    #ffffff;
  box-shadow: 0 22px 56px rgba(21, 32, 68, 0.1);
}

.incident-guided-panel .panel-title {
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 22px;
}

.incident-guided-panel .panel-title > div {
  min-width: 0;
}

.incident-guided-panel .panel-title #incident-quick-sample {
  margin-left: auto;
  min-width: 118px;
  white-space: nowrap;
}

#incident-view label {
  color: #101936;
  font-weight: 900;
}

#incident-view input,
#incident-view textarea,
#incident-view select {
  border-color: #cfd7e8;
  background: rgba(255, 255, 255, 0.9);
  color: #17203a;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.03);
}

#incident-view input:focus,
#incident-view textarea:focus,
#incident-view select:focus {
  border-color: #6875ff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

#incident-view input::placeholder,
#incident-view textarea::placeholder {
  color: #98a2b8;
}

.incident-mvp-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.incident-stepper {
  --incident-progress: 0%;
  position: relative;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(126, 139, 175, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.94)),
    radial-gradient(circle at 12% 20%, rgba(20, 184, 166, 0.12), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(79, 70, 229, 0.14), transparent 30%);
  padding: 18px;
  box-shadow: 0 22px 60px rgba(10, 24, 54, 0.1);
  isolation: isolate;
}

.incident-stepper::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 64px;
  left: 64px;
  height: 5px;
  border-radius: 999px;
  background: #dbe2f1;
  transform: translateY(-50%);
}

.incident-stepper::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 64px;
  width: calc((100% - 128px) * var(--incident-progress) / 100);
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6, #4f46e5);
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.24);
  transform: translateY(-50%);
  transition: width 220ms ease;
}

.incident-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 106px;
  border: 1px solid rgba(126, 139, 175, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: #6e7892;
  padding: 14px;
  text-align: left;
  box-shadow: 0 12px 24px rgba(22, 34, 67, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.incident-step.complete {
  border-color: rgba(20, 184, 166, 0.26);
  background: rgba(239, 253, 250, 0.92);
}

.incident-step.active {
  border-color: rgba(79, 70, 229, 0.38);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 255, 0.96));
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.14);
  transform: translateY(-2px);
}

.incident-step.complete.active {
  border-color: rgba(20, 184, 166, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.96));
  box-shadow: 0 18px 34px rgba(20, 184, 166, 0.16);
}

.incident-stepper.report-complete .incident-step[data-incident-step="4"]::after {
  content: "Report ready";
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.01em;
}

.incident-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #eef1f7;
  color: #6d7486;
  font-weight: 900;
  font-size: 1.08rem;
  box-shadow: 0 8px 20px rgba(10, 24, 54, 0.08);
}

.incident-step.complete .incident-step-number {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  color: #ffffff;
}

.incident-step.complete .incident-step-number::before {
  content: "";
  width: 15px;
  height: 8px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
}

.incident-step.complete .incident-step-number {
  font-size: 0;
}

.incident-step.active .incident-step-number {
  background: linear-gradient(135deg, #14b8a6, #4f46e5);
  color: #ffffff;
  box-shadow: 0 18px 30px rgba(79, 70, 229, 0.26);
}

.incident-step-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.incident-step strong {
  color: #17203a;
  font-size: 0.98rem;
  line-height: 1.2;
}

.incident-step.active strong {
  color: #17203a;
}

.incident-step small {
  display: block;
  color: #667085;
  font-size: 0.78rem;
  line-height: 1.35;
}

.incident-mvp-steps > span {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--navy);
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 900;
}

.incident-composer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}

.incident-composer-main {
  display: grid;
  gap: 18px;
  padding-right: 0;
  border-right: 0;
}

.incident-composer-side {
  display: none;
}

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

.required {
  color: #d92d20;
}

#incident-description {
  min-height: 104px;
}

.incident-panel-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(135deg, #13b8a6, #2563eb);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 18px 30px rgba(15, 118, 110, 0.24);
}

.incident-panel-icon svg,
.incident-history-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.incident-help-card {
  border: 1px solid rgba(90, 96, 230, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(90, 96, 230, 0.08), rgba(255, 255, 255, 0)),
    #ffffff;
  padding: 18px;
}

.incident-help-card strong {
  color: #3f48d9;
}

.incident-help-card ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.incident-help-card li {
  position: relative;
  padding-left: 24px;
  color: var(--ink);
}

.incident-help-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #61708a;
  font-weight: 900;
}

.incident-source-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.incident-source-options {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.incident-source-card {
  display: grid;
  grid-template-columns: 18px 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 78px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 12px 14px;
  text-align: left;
}

.incident-source-card:first-child {
  border-top: 0;
}

.incident-source-card.active {
  background: #f7f8ff;
}

.incident-source-card strong,
.incident-source-card small {
  display: block;
}

.incident-source-card small {
  margin-top: 4px;
  color: var(--muted);
}

.incident-source-dot {
  width: 16px;
  height: 16px;
  border: 2px solid #c5ccda;
  border-radius: 999px;
}

.incident-source-card.active .incident-source-dot {
  border: 5px solid #13b8a6;
}

.incident-source-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #ecfdf9;
  color: #0f766e;
}

.incident-source-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.incident-upload-zone {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 86px;
  border: 1px dashed #95a5d8;
  border-radius: 8px;
  background: #fbfcff;
  color: var(--navy);
  padding: 18px;
  text-align: center;
  cursor: pointer;
}

.incident-upload-zone:hover,
.incident-upload-zone.dragover,
.incident-upload-zone:focus-visible {
  border-color: #5660e8;
  background: #f5f7ff;
}

.incident-upload-zone span {
  color: #3f48d9;
}

.incident-upload-zone small {
  color: var(--muted);
}

.incident-upload-summary {
  border: 1px solid rgba(0, 137, 123, 0.18);
  border-radius: 8px;
  background: rgba(0, 137, 123, 0.06);
  color: var(--navy);
  padding: 10px 12px;
  font-weight: 800;
}

.incident-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  align-items: center;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.incident-analyze-button {
  display: inline-grid;
  grid-template-columns: 1fr;
  justify-items: start;
  min-width: min(360px, 100%);
  min-height: 58px;
  padding-inline: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2138f5, #7440f2);
  box-shadow: 0 18px 32px rgba(79, 70, 229, 0.28);
}

.incident-analyze-button span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 700;
}

.incident-guided-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.4fr);
  gap: 18px;
  align-items: stretch;
}

.incident-guided-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.incident-guided-copy h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.05rem);
}

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

.incident-guided-form textarea {
  min-height: 220px;
  resize: vertical;
}

.incident-easy-steps,
.incident-guided-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.incident-easy-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(0, 137, 123, 0.18);
  border-radius: 999px;
  background: rgba(0, 137, 123, 0.08);
  color: var(--teal);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

.incident-advanced-options {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px 12px;
}

.incident-advanced-options summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
}

.incident-advanced-options[open] summary {
  margin-bottom: 10px;
}

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

.incident-coach-detail-card {
  grid-column: 1 / -1;
}

.incident-facts-panel {
  margin-top: 14px;
  border-top: 1px solid rgba(126, 139, 175, 0.2);
  padding-top: 12px;
}

.incident-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.incident-summary-head > div {
  min-width: 0;
}

.incident-summary-head strong {
  display: block;
  color: #101828;
  font-size: 1.28rem;
  line-height: 1.2;
}

.incident-summary-head p {
  margin: 8px 0 0;
  color: #475467;
  line-height: 1.5;
}

.incident-decision-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 16px;
  align-items: stretch;
}

.incident-decision-overview > div {
  min-width: 0;
}

.incident-decision-overview strong {
  display: block;
  color: #0f172a;
  font-size: 1.36rem;
  line-height: 1.18;
}

.incident-decision-overview p {
  margin: 9px 0 0;
  color: #475569;
  line-height: 1.55;
}

.incident-risk-tile {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 132px;
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.incident-risk-tile span,
.incident-risk-tile small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.incident-risk-tile strong {
  color: #0f172a;
  font-size: 1.35rem;
}

.incident-risk-tile.severity-critical {
  background: linear-gradient(135deg, #fee2e2, #fff7ed);
  border-color: rgba(220, 38, 38, 0.22);
}

.incident-risk-tile.severity-high {
  background: linear-gradient(135deg, #ffedd5, #fff7ed);
  border-color: rgba(234, 88, 12, 0.24);
}

.incident-risk-tile.severity-medium {
  background: linear-gradient(135deg, #fef3c7, #ffffff);
  border-color: rgba(245, 158, 11, 0.24);
}

.incident-risk-tile.severity-low {
  background: linear-gradient(135deg, #dcfce7, #ffffff);
  border-color: rgba(22, 163, 74, 0.2);
}

.incident-decision-stats {
  margin-top: 14px;
}

.incident-main-reasons {
  margin-top: 14px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.78), #ffffff);
  padding: 13px 14px 4px;
}

.incident-main-reasons > strong {
  display: block;
  color: #0f172a;
}

.incident-summary-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.incident-summary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.incident-summary-columns > div,
.incident-why-panel {
  border: 1px solid rgba(126, 139, 175, 0.2);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  padding: 12px;
}

.incident-why-panel {
  margin-top: 14px;
}

.incident-why-panel summary {
  cursor: pointer;
  color: #0f766e;
  font-weight: 900;
}

.incident-section-heading {
  margin-bottom: 12px;
}

.incident-section-heading strong {
  display: block;
  color: #101828;
  font-size: 1.08rem;
}

.incident-check-list {
  display: grid;
  gap: 12px;
}

.incident-check-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.86), rgba(255, 255, 255, 0.96)),
    #ffffff;
  padding: 13px 14px;
}

.incident-check-card strong {
  display: block;
  color: #101828;
}

.incident-check-card p {
  margin: 7px 0 0;
  color: #475467;
  line-height: 1.45;
}

.incident-check-card p span,
.incident-action-details span {
  color: #0f766e;
  font-weight: 900;
}

.incident-check-status {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 94px;
  min-height: 28px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3538cd;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.incident-progress-strip {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(110px, 0.7fr));
  gap: 10px;
  margin-bottom: 12px;
}

.incident-progress-strip > div {
  border: 1px solid rgba(126, 139, 175, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.76)),
    #ffffff;
  padding: 12px;
}

.incident-progress-strip span,
.incident-task-category,
.incident-finding-form span,
.incident-finding-values span {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.incident-progress-strip strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 1.02rem;
}

.incident-analyst-path {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.incident-analyst-path span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(238, 242, 255, 0.92), rgba(255, 255, 255, 0.96)),
    #ffffff;
  color: #344054;
  font-size: 0.8rem;
  font-weight: 850;
  text-align: center;
}

.incident-analyst-path span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -8px;
  width: 8px;
  height: 1px;
  background: rgba(79, 70, 229, 0.28);
}

.incident-next-recommendation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.88), rgba(255, 255, 255, 0.95)),
    #ffffff;
  padding: 14px;
}

.incident-next-recommendation.incident-decision-status.pending {
  border-color: rgba(245, 158, 11, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.92), rgba(255, 255, 255, 0.97)),
    #ffffff;
}

.incident-next-recommendation.incident-decision-status.ready {
  border-color: rgba(22, 163, 74, 0.28);
  background:
    linear-gradient(135deg, rgba(240, 253, 244, 0.95), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.incident-next-recommendation strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 1.05rem;
}

.incident-next-recommendation p {
  margin: 6px 0 0;
  color: #475569;
  line-height: 1.48;
}

.incident-warning-text {
  color: #92400e !important;
  font-weight: 850;
}

.warning-box {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fffbeb;
  color: #92400e;
}

.incident-recommendation-priority {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.incident-task-list {
  display: grid;
  gap: 12px;
}

.incident-task-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(126, 139, 175, 0.18);
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    #ffffff;
  padding: 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.incident-task-card.in-progress {
  border-left-color: #2563eb;
}

.incident-task-card.completed {
  border-left-color: #16a34a;
}

.incident-task-card.blocked {
  border-left-color: #f97316;
}

.incident-task-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.incident-task-head strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 1rem;
}

.incident-task-head p {
  margin: 6px 0 0;
  color: #475569;
  line-height: 1.45;
}

.incident-task-head p span {
  color: #0f766e;
  font-weight: 900;
}

.incident-task-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  min-height: 30px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 0 11px;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.incident-task-status.in-progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.incident-task-status.completed {
  background: #dcfce7;
  color: #166534;
}

.incident-task-status.blocked {
  background: #ffedd5;
  color: #9a3412;
}

.incident-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.incident-mini-action {
  min-height: 38px;
  padding-inline: 14px;
}

.incident-finding-form,
.incident-task-complete-summary,
.incident-task-finding-view {
  border: 1px solid rgba(126, 139, 175, 0.18);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.incident-finding-title {
  margin-bottom: 10px;
}

.incident-finding-title strong {
  display: block;
  color: #0f172a;
}

.incident-finding-title p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

.incident-finding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.incident-finding-grid .wide {
  grid-column: 1 / -1;
}

.incident-conditional-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.incident-conditional-fields.wide {
  grid-column: 1 / -1;
}

.incident-conditional-fields > label:first-child {
  grid-column: 1 / -1;
}

.incident-finding-form label {
  display: grid;
  gap: 5px;
}

.incident-finding-form input,
.incident-finding-form select,
.incident-finding-form textarea {
  width: 100%;
  border: 1px solid rgba(126, 139, 175, 0.28);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 11px;
}

.incident-finding-form input:focus,
.incident-finding-form select:focus,
.incident-finding-form textarea:focus {
  border-color: rgba(37, 99, 235, 0.54);
  outline: 3px solid rgba(37, 99, 235, 0.16);
}

.incident-task-complete-summary > strong {
  display: block;
  color: #166534;
}

.incident-task-complete-summary p {
  margin: 6px 0 0;
  color: #475569;
}

.incident-finding-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.incident-finding-values > div {
  border: 1px solid rgba(126, 139, 175, 0.14);
  border-radius: 8px;
  background: #ffffff;
  padding: 9px 10px;
}

.incident-finding-values strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.incident-investigation-support {
  margin-top: 14px;
}

.incident-context-details {
  margin-top: 14px;
}

.incident-verified-findings {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.incident-verified-findings article {
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-left: 5px solid #16a34a;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.92), #ffffff);
  padding: 13px;
}

.incident-verified-findings article > span {
  display: block;
  color: #15803d;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.incident-verified-findings article > strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
}

.incident-verified-findings article > p {
  margin: 6px 0 0;
  color: #475569;
  line-height: 1.45;
}

.incident-subsection-heading {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(126, 139, 175, 0.18);
}

.incident-subsection-heading strong {
  display: block;
  color: #17203a;
}

.incident-score-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.incident-severity-compact {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(126, 139, 175, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.86), rgba(255, 255, 255, 0.96)),
    #ffffff;
  padding: 13px;
}

.incident-severity-compact > div:first-child span,
.incident-severity-columns span {
  display: block;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.incident-severity-compact > div:first-child strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 1.06rem;
}

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

.incident-severity-columns section {
  border: 1px solid rgba(126, 139, 175, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  padding: 11px 12px;
}

.incident-severity-columns p {
  margin: 7px 0 0;
  color: #475569;
  line-height: 1.4;
}

.incident-severity-columns p strong {
  color: #0f766e;
}

.incident-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid rgba(126, 139, 175, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
  padding: 10px 12px;
}

.incident-score-row span {
  display: block;
  color: #17203a;
  font-weight: 900;
}

.incident-score-row small {
  display: block;
  margin-top: 3px;
  color: #667085;
  line-height: 1.35;
}

.incident-score-row > strong {
  color: #0f766e;
  white-space: nowrap;
}

.incident-score-bar {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eaf3;
}

.incident-score-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #4f46e5);
}

.incident-change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.incident-change-grid > div,
.incident-hypothesis-card,
.incident-coach-card,
.incident-coach-grid > div {
  border: 1px solid rgba(126, 139, 175, 0.22);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.incident-hypothesis-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.incident-hypothesis-card {
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.07), rgba(79, 70, 229, 0.05)),
    #ffffff;
}

.incident-hypothesis-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.incident-hypothesis-head span,
.incident-action-meta {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
  padding: 0 9px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.incident-hypothesis-card details {
  margin-top: 10px;
}

.incident-hypothesis-card summary {
  cursor: pointer;
  color: #344054;
  font-weight: 900;
}

.incident-hypothesis-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.incident-hypothesis-details > .wide,
.incident-hypothesis-details > div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.incident-hypothesis-details p {
  margin: 6px 0 0;
  color: #475569;
  line-height: 1.46;
}

.incident-coach-card {
  margin-top: 12px;
  border-color: rgba(79, 70, 229, 0.22);
  background:
    radial-gradient(circle at 8% 18%, rgba(79, 70, 229, 0.16), transparent 28%),
    linear-gradient(135deg, #f8fbff, #ffffff);
}

.incident-coach-card h4 {
  margin: 4px 0 6px;
  color: #17203a;
  font-size: 1.04rem;
}

.incident-next-investigation-card {
  display: grid;
  gap: 10px;
  align-items: start;
}

.incident-next-investigation-card > strong {
  color: #17203a;
  font-size: 0.86rem;
}

.incident-next-investigation-card p {
  margin: 0;
  color: #475569;
  line-height: 1.48;
}

.incident-coach-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.incident-coach-wide {
  grid-column: 1 / -1;
}

.incident-investigation-grid,
.incident-resolution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.incident-investigation-grid > div,
.incident-resolution-grid > div {
  min-width: 0;
  border: 1px solid rgba(126, 139, 175, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92)),
    #ffffff;
  padding: 12px;
}

.incident-investigation-grid strong,
.incident-resolution-grid strong {
  display: block;
  color: #17203a;
  overflow-wrap: anywhere;
}

.incident-resolution-card {
  margin: 12px 0 16px;
}

.incident-containment-strip {
  margin: 12px 0;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(255, 255, 255, 0.96)),
    #ffffff;
  padding: 12px 14px;
}

.incident-containment-strip > strong {
  display: block;
  margin-bottom: 8px;
  color: #92400e;
}

.incident-resolution-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.incident-resolution-head p {
  margin-bottom: 0;
}

.incident-resolution-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.incident-resolution-status.ready {
  background: #dcfce7;
  color: #166534;
}

.incident-resolution-status.not-ready {
  background: #fff7d6;
  color: #946200;
}

.incident-resolution-grid span {
  display: block;
  margin-bottom: 5px;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 900;
}

.incident-readiness-meter {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.incident-readiness-meter strong {
  color: #17203a;
}

.incident-readiness-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.incident-readiness-list > div,
.incident-readiness-list > article {
  border: 1px solid rgba(126, 139, 175, 0.18);
  border-radius: 8px;
  background: #ffffff;
  padding: 11px 12px;
}

.incident-readiness-list > div.complete,
.incident-readiness-list > article.complete {
  border-color: rgba(22, 163, 74, 0.22);
  background: rgba(240, 253, 244, 0.82);
}

.incident-readiness-list > div.open,
.incident-readiness-list > article.open {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(255, 251, 235, 0.76);
}

.incident-readiness-list > article.not-applicable {
  border-color: rgba(59, 130, 246, 0.2);
  background: rgba(239, 246, 255, 0.82);
}

.incident-closure-requirement .closure-status.complete,
.incident-closure-requirement.complete .closure-status {
  background: #dcfce7;
  color: #166534;
}

.incident-closure-requirement .closure-status.not-applicable,
.incident-closure-requirement.not-applicable .closure-status {
  background: #dbeafe;
  color: #1d4ed8;
}

.incident-closure-requirement .closure-status.open,
.incident-closure-requirement.open .closure-status {
  background: #fff7d6;
  color: #946200;
}

.incident-readiness-list span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.incident-readiness-list strong {
  display: block;
  margin-top: 7px;
  color: #0f172a;
}

.incident-closure-requirement-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.incident-closure-requirement small {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-size: 0.78rem;
}

.incident-final-validation {
  margin-top: 12px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(238, 242, 255, 0.9), rgba(255, 255, 255, 0.96)),
    #ffffff;
  padding: 14px;
}

.incident-final-validation-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.incident-final-validation-head strong {
  display: block;
  margin: 3px 0 5px;
  color: #17203a;
  font-size: 1rem;
}

.incident-final-validation-head p {
  margin: 0;
  color: #52637a;
  line-height: 1.45;
}

.incident-final-validation-head > span {
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.incident-final-validation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.incident-final-validation-form label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 850;
}

.incident-final-validation-form label.wide,
.incident-final-validation-form .wide {
  grid-column: 1 / -1;
}

.incident-final-validation-form input,
.incident-final-validation-form select,
.incident-final-validation-form textarea {
  width: 100%;
  border: 1px solid rgba(126, 139, 175, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  padding: 10px 11px;
  font-weight: 700;
}

.incident-closure-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid rgba(126, 139, 175, 0.2);
  padding-top: 12px;
}

.incident-closure-form label {
  margin: 0;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
}

.incident-closure-form input,
.incident-closure-form select,
.incident-closure-form textarea {
  width: 100%;
  border: 1px solid rgba(126, 139, 175, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 9px 10px;
}

.incident-checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-weight: 700;
}

.incident-checkbox-line input {
  width: auto;
}

.incident-closure-ready-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.incident-readiness-list p,
.incident-remaining-risk p,
.incident-readiness-details p {
  margin: 5px 0 0;
  color: #475569;
  line-height: 1.45;
}

.incident-remaining-risk {
  margin-top: 12px;
  border: 1px solid rgba(126, 139, 175, 0.18);
  border-left: 5px solid #4f46e5;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(238, 242, 255, 0.82), rgba(255, 255, 255, 0.96)),
    #ffffff;
  padding: 12px;
}

.incident-remaining-risk.ready {
  border-left-color: #16a34a;
  background:
    linear-gradient(135deg, rgba(240, 253, 244, 0.9), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.incident-remaining-risk strong {
  display: block;
  margin-top: 3px;
  color: #17203a;
}

.incident-readiness-details {
  margin-top: 12px;
  border: 1px solid rgba(126, 139, 175, 0.2);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.8);
  padding: 10px 12px;
}

.incident-readiness-details summary {
  cursor: pointer;
  color: #344054;
  font-weight: 900;
}

.incident-filters,
.incident-inline-form,
.incident-header-actions,
.incident-status-actions,
.incident-action-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.incident-filters input {
  min-width: min(360px, 100%);
  flex: 1 1 280px;
}

.incident-workspace {
  margin-top: 14px;
}

.incident-history-drawer {
  margin-bottom: 14px;
  border-color: rgba(0, 137, 123, 0.18);
  background: #fbfefd;
}

.incident-history-list {
  display: grid;
  gap: 10px;
}

.incident-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.incident-history-item:hover,
.incident-history-item:focus-visible {
  border-color: rgba(0, 137, 123, 0.45);
  box-shadow: 0 10px 24px rgba(0, 137, 123, 0.1);
}

.incident-history-item span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.incident-history-item strong,
.incident-history-item small {
  overflow-wrap: anywhere;
}

.incident-history-item small {
  color: var(--muted);
  font-size: 0.82rem;
}

.incident-mvp-section {
  display: grid;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.incident-mvp-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.incident-workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.incident-workspace-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.incident-status-actions {
  margin: 14px 0;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.tab {
  min-height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tab.active,
.tab:focus-visible {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.incident-tab-panel {
  display: grid;
  gap: 14px;
}

.incident-guidance-review {
  margin-top: 14px;
}

.incident-guidance-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 14px;
}

.incident-guidance-preview article {
  border: 1px solid rgba(126, 139, 175, 0.2);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  padding: 12px;
}

.incident-guidance-preview strong,
.incident-guidance-preview small {
  display: block;
}

.incident-guidance-preview small {
  margin-top: 4px;
  color: #667085;
  line-height: 1.35;
}

.incident-decision-panel,
.incident-execution-panel {
  display: grid;
  gap: 14px;
}

.incident-execution-panel {
  margin-top: 18px;
}

.incident-recommendation-panel {
  margin-top: 0;
}

.incident-pending-recommendation {
  margin-bottom: 12px;
  border-color: rgba(245, 158, 11, 0.24);
  background: #fffbeb;
  color: #92400e;
}

.incident-pending-response-card {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-left: 5px solid #f59e0b;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.92), rgba(255, 255, 255, 0.98)),
    #ffffff;
  padding: 14px;
}

.incident-pending-response-card strong {
  color: #0f172a;
  font-size: 1rem;
}

.incident-pending-response-card p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.incident-response-actions-label {
  margin: 0 0 10px;
}

.incident-response-actions-label strong {
  display: block;
  margin-top: 2px;
  color: #17203a;
  font-size: 0.98rem;
}

.incident-recommendation-list {
  display: grid;
  gap: 12px;
}

.incident-recommendation-card {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-left: 5px solid #14b8a6;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(255, 255, 255, 0.98)),
    #ffffff;
  padding: 14px;
}

.incident-recommendation-card.priority-high,
.incident-recommendation-card.priority-high-priority {
  border-left-color: #dc2626;
  background:
    linear-gradient(135deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.incident-recommendation-card.priority-medium,
.incident-recommendation-card.priority-medium-priority,
.incident-recommendation-card.priority-pending-evidence {
  border-left-color: #f59e0b;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.92), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.incident-recommendation-card.priority-low,
.incident-recommendation-card.priority-low-priority {
  border-left-color: #2563eb;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.incident-recommendation-card span {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.incident-recommendation-card strong {
  color: #0f172a;
  font-size: 1rem;
}

.incident-recommendation-card p {
  margin: 0;
  color: #475569;
  line-height: 1.48;
}

.incident-recommendation-source {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
  padding: 0 9px;
  font-size: 0.75rem;
  font-weight: 900;
}

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

.incident-decision-card {
  display: grid;
  gap: 14px;
  align-content: start;
  border: 1px solid rgba(126, 139, 175, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.94)),
    #ffffff;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.06);
  padding: 16px;
}

.incident-decision-card.recommended,
.incident-decision-card.high-impact-recommended {
  border-color: rgba(20, 184, 166, 0.34);
  background:
    linear-gradient(145deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.incident-decision-card.high-impact-option,
.incident-decision-card.consider {
  border-color: rgba(245, 158, 11, 0.36);
  background:
    linear-gradient(145deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.incident-decision-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.incident-decision-head h4 {
  margin: 4px 0 0;
  color: #111827;
  font-size: 1.02rem;
  line-height: 1.25;
}

.incident-decision-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: #3730a3;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.incident-decision-card.recommended .incident-decision-badge,
.incident-decision-card.high-impact-recommended .incident-decision-badge {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
}

.incident-decision-card.high-impact-option .incident-decision-badge,
.incident-decision-card.consider .incident-decision-badge {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

.incident-decision-body {
  display: grid;
  gap: 12px;
}

.incident-decision-body strong,
.incident-decision-impact strong {
  display: block;
  color: #17203a;
  font-size: 0.86rem;
}

.incident-decision-body p,
.incident-decision-impact p {
  margin: 5px 0 0;
  color: #475467;
  line-height: 1.45;
}

.incident-decision-body details {
  border: 1px solid rgba(126, 139, 175, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 12px;
}

.incident-decision-body summary {
  cursor: pointer;
  color: #344054;
  font-weight: 900;
}

.incident-decision-impact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.incident-decision-impact > div {
  border: 1px solid rgba(126, 139, 175, 0.16);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.82);
  padding: 10px;
}

.incident-execution-empty {
  margin-top: 16px;
  border: 1px dashed rgba(20, 184, 166, 0.35);
  border-radius: 8px;
  background: rgba(240, 253, 250, 0.7);
  padding: 16px;
}

.incident-response-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.incident-plan-summary {
  margin: 12px 0;
  border: 1px solid rgba(0, 137, 123, 0.18);
  border-radius: 8px;
  background: rgba(0, 137, 123, 0.06);
  color: var(--navy);
  padding: 10px 12px;
  font-size: 0.86rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.incident-summary-edit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.incident-confirmed-button {
  border: 1px solid rgba(22, 163, 74, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(22, 163, 74, 0.2);
  cursor: default;
  opacity: 1;
}

.incident-confirmed-button:disabled {
  opacity: 1;
}

.incident-bullet-list {
  margin: 8px 0 14px;
  padding-left: 18px;
}

.incident-bullet-list li {
  margin: 5px 0;
  color: var(--ink);
}

.incident-response-accordion {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.incident-response-accordion + .incident-response-accordion {
  margin-top: 10px;
}

.incident-response-accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  cursor: pointer;
  background: #f7faf9;
  color: var(--navy);
  padding: 10px 14px;
  font-weight: 900;
}

.incident-response-accordion summary > span {
  display: grid;
  gap: 3px;
}

.incident-response-accordion summary small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.incident-response-accordion summary em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
  padding: 0 10px;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.incident-guidance-actions {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}

.incident-action-card {
  display: grid;
  gap: 8px;
}

.incident-simple-action {
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
  align-items: start;
  margin: 12px;
}

.incident-action-details {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.incident-simple-action.status-completed {
  border-color: rgba(22, 101, 52, 0.2);
  background:
    linear-gradient(145deg, rgba(240, 253, 244, 0.72), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.incident-simple-action.status-skipped {
  opacity: 0.82;
}

.incident-execution-bulk,
.incident-phase-toolbar,
.incident-action-control,
.incident-action-control > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.incident-execution-bulk {
  justify-content: flex-end;
}

.incident-phase-toolbar {
  justify-content: space-between;
  margin: 12px;
  border: 1px solid rgba(126, 139, 175, 0.2);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
  color: #475467;
  font-size: 0.84rem;
  font-weight: 800;
}

.incident-action-control {
  justify-content: flex-end;
}

.incident-action-control > div {
  justify-content: flex-end;
}

.incident-action-control button,
.incident-phase-toolbar button,
.incident-execution-bulk button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.incident-action-control button[data-action-next-status="COMPLETED"],
.incident-phase-toolbar button[data-action-bulk-status="COMPLETED"],
.incident-execution-bulk button[data-action-bulk-status="COMPLETED"] {
  border-color: rgba(22, 163, 74, 0.32);
  background: rgba(220, 252, 231, 0.86);
  color: #166534;
}

.incident-action-control button[data-action-next-status="SKIPPED"] {
  border-color: rgba(100, 116, 139, 0.24);
  background: rgba(241, 245, 249, 0.9);
  color: #475467;
}

.incident-action-control button[data-action-next-status="PENDING"],
.incident-phase-toolbar button[data-action-bulk-status="PENDING"],
.incident-execution-bulk button[data-action-bulk-status="PENDING"] {
  border-color: rgba(245, 158, 11, 0.26);
  background: rgba(255, 251, 235, 0.92);
  color: #92400e;
}

.incident-action-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
}

.incident-action-status.status-pending {
  background: #fff7d6;
  color: #946200;
}

.incident-action-status.status-completed {
  background: #dcfce7;
  color: #166534;
}

.incident-action-status.status-skipped {
  background: #eef2f7;
  color: #475467;
}

.incident-action-card-head {
  justify-content: space-between;
}

.incident-action-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.incident-phase {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.incident-phase h4 {
  margin: 0;
}

.incident-table td span,
.upload-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.severity-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 900;
}

.severity-critical {
  background: #fde7e7;
  color: #b42318;
}

.severity-high {
  background: #ffefe6;
  color: #c2410c;
}

.severity-medium {
  background: #fff7d6;
  color: #946200;
}

.severity-low {
  background: #e8eefb;
  color: #2451a6;
}

.empty-state {
  display: grid;
  gap: 8px;
  justify-items: start;
  color: var(--muted);
}

.empty-state strong {
  color: var(--navy);
}

.incident-timeline {
  display: grid;
  gap: 10px;
}

.incident-timeline article {
  position: relative;
  border-left: 3px solid var(--teal);
  padding: 4px 0 8px 14px;
}

.incident-timeline span,
.incident-timeline small {
  color: var(--muted);
  font-size: 0.82rem;
}

.incident-timeline p {
  margin: 4px 0;
}

#incident-report-output {
  min-height: 380px;
  font-family: Consolas, "Courier New", monospace;
}

.incident-report-panel {
  display: grid;
  gap: 10px;
}

.term-table {
  display: grid;
  gap: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.term-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.4fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 44px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.term-row:first-child {
  border-top: 0;
}

.term-head {
  min-height: 38px;
  background: #eef5f4;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.term-row strong,
.term-row span {
  overflow-wrap: anywhere;
}

.message.assistant {
  background: #ffffff;
  border: 1px solid var(--line);
}

.message.assistant.pending {
  color: var(--muted);
}

.message.user {
  margin-left: auto;
  background: var(--teal-soft);
  border: 1px solid #b9ddd6;
}

body.chat-view-active {
  background: #000000;
}

body.chat-view-active .shell {
  background:
    linear-gradient(90deg, #000000 0%, #050505 18%, #000000 100%);
}

body.chat-view-active .sidebar {
  background:
    linear-gradient(180deg, #050b17 0%, #071327 58%, #040814 100%);
  border-right: 1px solid rgba(133, 165, 255, 0.12);
  box-shadow: 18px 0 38px rgba(0, 0, 0, 0.22);
}

body.chat-view-active .main {
  padding: 26px 30px;
  background:
    linear-gradient(180deg, rgba(6, 10, 18, 0.7), #000000);
}

body.chat-view-active .main::before {
  background:
    linear-gradient(rgba(80, 132, 255, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 132, 255, 0.075) 1px, transparent 1px);
  background-size: 28px 28px;
  inset: 0 0 auto 276px;
  width: auto;
  height: 100vh;
  opacity: 0.32;
  transform: none;
}

body.chat-view-active .topbar {
  border-color: rgba(132, 165, 255, 0.16);
  background: rgba(7, 16, 32, 0.82);
  color: #f8fbff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

body.chat-view-active .topbar h1,
body.chat-view-active .section-title h2 {
  color: #f8fbff;
}

body.chat-view-active .topbar .eyebrow,
body.chat-view-active .section-title p {
  color: rgba(215, 226, 255, 0.68);
}

.chat-section-title {
  border: 1px solid rgba(132, 165, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(14, 31, 63, 0.9), rgba(6, 14, 29, 0.9));
  padding: 18px 20px;
  color: #ffffff;
}

body.chat-view-active .persistent-chat {
  min-height: calc(100vh - 190px);
  border: 1px solid rgba(132, 165, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(7, 7, 7, 0.98), #000000);
  color: #f8fbff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

body.chat-view-active .persistent-chat .chat-title {
  display: none;
}

body.chat-view-active .chat-workspace {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  min-height: calc(100vh - 240px);
  gap: 12px;
}

body.chat-view-active .conversation-sidebar,
body.chat-view-active .chat-main-panel {
  border: 1px solid rgba(132, 165, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(9, 9, 9, 0.96), rgba(0, 0, 0, 0.98));
}

body.chat-view-active .conversation-sidebar {
  min-height: 620px;
  padding: 18px;
}

body.chat-view-active .new-chat-button {
  justify-content: flex-start;
  border-color: rgba(101, 151, 255, 0.35);
  background:
    linear-gradient(135deg, rgba(52, 97, 255, 0.96), rgba(101, 57, 255, 0.92));
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(39, 77, 208, 0.28);
}

body.chat-view-active .new-chat-button:hover,
body.chat-view-active .new-chat-button:focus-visible {
  border-color: rgba(167, 190, 255, 0.68);
  box-shadow: 0 20px 42px rgba(68, 99, 255, 0.36);
}

.conversation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.chat-view-active .conversation-heading label,
body.chat-view-active .conversation-sidebar label {
  color: #ffffff;
  font-size: 1.08rem;
}

.conversation-heading span {
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.12);
  color: #8ff0ad;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 900;
}

body.chat-view-active .conversation-sidebar input {
  min-height: 42px;
  border-color: rgba(132, 165, 255, 0.18);
  background: rgba(3, 10, 24, 0.78);
  color: #f8fbff;
}

body.chat-view-active .conversation-sidebar input::placeholder,
body.chat-view-active .chat-input::placeholder {
  color: rgba(213, 224, 255, 0.54);
}

body.chat-view-active .conversation-list {
  max-height: calc(100vh - 385px);
  padding-right: 4px;
}

body.chat-view-active .conversation-list-empty {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px dashed rgba(132, 165, 255, 0.24);
  border-radius: 8px;
  background: rgba(4, 12, 28, 0.52);
  color: rgba(215, 226, 255, 0.66);
  padding: 18px;
  text-align: center;
}

body.chat-view-active .conversation-row {
  grid-template-columns: minmax(0, 1fr);
}

body.chat-view-active .conversation-row > button:first-child {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  border-color: rgba(132, 165, 255, 0.15);
  background:
    linear-gradient(135deg, rgba(12, 28, 58, 0.72), rgba(6, 15, 31, 0.82));
  color: #ffffff;
  padding: 13px 48px 13px 13px;
}

body.chat-view-active .conversation-row.active > button:first-child,
body.chat-view-active .conversation-row > button:first-child:hover {
  border-color: rgba(83, 122, 255, 0.55);
  background:
    linear-gradient(135deg, rgba(37, 72, 207, 0.42), rgba(11, 25, 57, 0.92));
  box-shadow: 0 0 0 3px rgba(83, 122, 255, 0.16);
}

.conversation-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

body.chat-view-active .conversation-row small,
body.chat-view-active .conversation-row span {
  color: rgba(215, 226, 255, 0.67);
}

.conversation-time {
  align-self: end;
  justify-self: end;
}

body.chat-view-active .conversation-menu-button {
  border-color: rgba(132, 165, 255, 0.22);
  background: rgba(8, 18, 38, 0.86);
  color: rgba(230, 239, 255, 0.92);
}

body.chat-view-active .conversation-menu-button:hover,
body.chat-view-active .conversation-menu-button:focus-visible,
body.chat-view-active .conversation-menu-button[aria-expanded="true"] {
  border-color: rgba(101, 151, 255, 0.58);
  background: rgba(18, 35, 76, 0.96);
}

body.chat-view-active .conversation-menu {
  border-color: rgba(132, 165, 255, 0.2);
  background: rgba(8, 18, 38, 0.98);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.36);
}

body.chat-view-active .conversation-menu button {
  color: rgba(236, 244, 255, 0.94);
}

body.chat-view-active .conversation-menu button:hover,
body.chat-view-active .conversation-menu button:focus-visible {
  background: rgba(83, 122, 255, 0.16);
}

body.chat-view-active .conversation-menu button.danger {
  color: #ff8a8a;
}

body.chat-view-active .conversation-menu button.danger:hover,
body.chat-view-active .conversation-menu button.danger:focus-visible {
  background: rgba(239, 68, 68, 0.16);
}

body.chat-view-active .conversation-rename-form {
  border-color: rgba(101, 151, 255, 0.38);
  background:
    linear-gradient(135deg, rgba(12, 28, 58, 0.86), rgba(6, 15, 31, 0.92));
  box-shadow: 0 0 0 3px rgba(83, 122, 255, 0.15);
}

body.chat-view-active .conversation-rename-form label {
  color: rgba(236, 244, 255, 0.94);
}

body.chat-view-active .conversation-rename-form input {
  border-color: rgba(132, 165, 255, 0.28);
  background: rgba(3, 10, 24, 0.72);
  color: #ffffff;
}

body.chat-view-active .chat-main-panel {
  grid-template-rows: auto minmax(420px, 1fr) auto auto auto;
  min-height: 620px;
  overflow: hidden;
}

body.chat-view-active .chat-main-header {
  min-height: 74px;
  margin: 0;
  border-bottom: 1px solid rgba(132, 165, 255, 0.14);
  padding: 14px 18px;
}

.chat-heading-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
}

.chat-shield-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(43, 105, 255, 0.95), rgba(101, 57, 255, 0.9));
  box-shadow: 0 14px 28px rgba(20, 52, 170, 0.24);
}

.chat-shield-mark img {
  width: 32px;
  height: 32px;
}

body.chat-view-active #conversation-title {
  border: 0;
  background: transparent;
  color: #ffffff;
  padding: 0;
  font-size: 1.08rem;
  font-weight: 950;
}

body.chat-view-active #conversation-title:focus {
  box-shadow: none;
}

body.chat-view-active .chat-main-actions .secondary {
  border-color: rgba(132, 165, 255, 0.17);
  background: rgba(4, 12, 28, 0.62);
  color: rgba(235, 241, 255, 0.82);
}

body.chat-view-active .chat-log {
  position: relative;
  align-content: start;
  min-height: 430px;
  max-height: none;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #000000;
  background-size: 24px 24px, 24px 24px, 100% 100%;
  padding: 24px 18px;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.message-row.user {
  justify-content: flex-end;
}

.message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(87, 131, 255, 0.7);
  border-radius: 50%;
  background: linear-gradient(135deg, #174dff, #7939ff);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 950;
  box-shadow: 0 0 0 4px rgba(101, 57, 255, 0.16);
}

body.chat-view-active .message {
  max-width: min(68ch, 74%);
  border-radius: 8px;
  padding: 14px 16px;
  color: #f8fbff;
  font-size: 0.96rem;
  line-height: 1.58;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

body.chat-view-active .message.assistant {
  border-color: rgba(132, 165, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(17, 36, 70, 0.96), rgba(11, 24, 47, 0.96));
}

body.chat-view-active .message.user {
  border-color: rgba(89, 124, 255, 0.54);
  background:
    linear-gradient(135deg, #1e43d8, #172da9);
}

body.chat-view-active .message small {
  color: rgba(215, 226, 255, 0.62);
  text-align: right;
}

body.chat-view-active .message.assistant small {
  text-align: left;
}

body.chat-view-active .message.failed {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(127, 29, 29, 0.28);
}

body.chat-view-active .message code {
  border: 1px solid rgba(45, 212, 191, 0.22);
  background: rgba(3, 10, 24, 0.72);
  color: #b7fff4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.chat-view-active .message pre code {
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
}

body.chat-view-active .prompt-chip {
  border-color: rgba(132, 165, 255, 0.17);
  background: rgba(8, 19, 41, 0.86);
  color: rgba(235, 241, 255, 0.82);
}

body.chat-view-active .prompt-chip:hover {
  border-color: rgba(83, 122, 255, 0.5);
  color: #ffffff;
}

body.chat-view-active .chat-privacy-note {
  margin: 8px 18px 0;
  color: rgba(215, 226, 255, 0.48);
  text-align: center;
  font-size: 0.78rem;
}

body.chat-view-active .persistent-chat .chat-form {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 58px;
  align-items: end;
  gap: 10px;
  margin: 14px 18px 18px;
  border: 1px solid rgba(132, 165, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(12, 12, 12, 0.98), rgba(0, 0, 0, 0.98));
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.chat-view-active .chat-upload-button {
  width: 50px;
  height: 50px;
  border-color: rgba(132, 165, 255, 0.24);
  background: rgba(8, 8, 8, 0.96);
  color: rgba(221, 232, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.chat-view-active .chat-upload-button:hover,
body.chat-view-active .chat-upload-button:focus-visible {
  border-color: rgba(91, 131, 255, 0.62);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(49, 91, 255, 0.2);
}

body.chat-view-active .chat-file-chip {
  border-color: rgba(45, 212, 191, 0.22);
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.16), rgba(30, 64, 175, 0.12));
}

body.chat-view-active .chat-file-type {
  background: rgba(13, 148, 136, 0.22);
  color: #99f6e4;
}

body.chat-view-active .chat-file-details strong {
  color: #f8fbff;
}

body.chat-view-active .chat-file-details small {
  color: rgba(215, 226, 255, 0.58);
}

body.chat-view-active .chat-file-remove {
  border-color: rgba(248, 113, 113, 0.26);
  background: rgba(127, 29, 29, 0.24);
  color: #fecaca;
}

body.chat-view-active .chat-file-remove:hover,
body.chat-view-active .chat-file-remove:focus-visible {
  border-color: rgba(248, 113, 113, 0.46);
  background: rgba(127, 29, 29, 0.38);
  color: #ffffff;
}

body.chat-view-active .chat-input {
  min-height: 52px;
  border: 0;
  background: transparent;
  color: #f8fbff;
  padding: 9px 4px 4px;
}

body.chat-view-active .chat-input:focus {
  box-shadow: none;
}

body.chat-view-active .chat-input-meta {
  color: rgba(215, 226, 255, 0.52);
}

body.chat-view-active #send-chat {
  min-width: 0;
  width: 50px;
  min-height: 50px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2c64ff, #6d3cff);
  color: transparent;
  position: relative;
  padding: 0;
  box-shadow: 0 14px 26px rgba(49, 91, 255, 0.28);
}

body.chat-view-active #send-chat::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border-top: 3px solid #ffffff;
  border-right: 3px solid #ffffff;
  transform: rotate(45deg) translate(-1px, 1px);
}

body.chat-view-active .chat-empty-state {
  color: rgba(215, 226, 255, 0.68);
}

body.chat-view-active .chat-empty-kicker {
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}

body.chat-view-active .chat-empty-state strong {
  color: #ffffff;
}

body.chat-view-active .chat-empty-action {
  border-color: rgba(132, 165, 255, 0.18);
  background: rgba(8, 19, 41, 0.86);
  color: rgba(235, 241, 255, 0.86);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

body.chat-view-active .chat-empty-action:hover {
  border-color: rgba(45, 212, 191, 0.46);
  color: #ffffff;
}

.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;
}

body.dashboard-view-active {
  background: #06101d;
}

body.dashboard-view-active .shell {
  grid-template-columns: 260px minmax(0, 1fr);
  background:
    radial-gradient(circle at 75% 0%, rgba(37, 99, 235, 0.16), transparent 30%),
    linear-gradient(90deg, #06101d 0%, #071526 18%, #081725 100%);
}

body.dashboard-view-active .sidebar {
  background:
    radial-gradient(circle at 18% 4%, rgba(37, 99, 235, 0.2), transparent 28%),
    linear-gradient(180deg, #020813 0%, #06162a 52%, #040c18 100%);
  border-right: 1px solid rgba(126, 164, 255, 0.13);
  box-shadow: 18px 0 38px rgba(0, 0, 0, 0.2);
}

body.dashboard-view-active .brand span:not(.brand-logo),
body.dashboard-view-active .nav-button {
  color: rgba(225, 235, 255, 0.76);
}

body.dashboard-view-active .nav-button:hover,
body.dashboard-view-active .nav-button.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.46), rgba(79, 70, 229, 0.34));
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow:
    inset 3px 0 0 #60a5fa,
    0 14px 28px rgba(37, 99, 235, 0.18);
}

body.dashboard-view-active .main {
  min-height: 100vh;
  padding: 18px 24px 28px;
  background:
    linear-gradient(rgba(45, 88, 160, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 88, 160, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 74% 0%, rgba(37, 99, 235, 0.16), transparent 32%),
    linear-gradient(180deg, #07111d 0%, #081829 100%);
  background-size: 30px 30px, 30px 30px, 100% 100%, 100% 100%;
}

body.dashboard-view-active .main::before {
  display: none;
}

body.dashboard-view-active .topbar {
  min-height: 58px;
  margin: -18px -24px 18px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(126, 164, 255, 0.12);
  background: rgba(3, 9, 20, 0.78);
  color: #f8fbff;
  backdrop-filter: blur(18px);
}

body.dashboard-view-active .topbar h1 {
  color: #f8fbff;
  font-size: 1rem;
}

body.dashboard-view-active .topbar .eyebrow {
  color: rgba(166, 190, 255, 0.76);
}

body.dashboard-view-active .user-pill,
body.dashboard-view-active .logout-button,
body.dashboard-view-active .status {
  border-color: rgba(126, 164, 255, 0.16);
  background: rgba(9, 21, 42, 0.82);
  color: #eaf2ff;
}

body.dashboard-view-active #api-status {
  background: rgba(34, 197, 94, 0.12) !important;
  color: #86efac !important;
}

.view.dashboard-console {
  display: none;
}

.view.dashboard-console.active {
  display: grid;
  gap: 14px;
  color: #eaf2ff;
}

.dashboard-command-bar {
  display: grid;
  grid-template-columns: auto minmax(260px, 520px) minmax(240px, 1fr);
  gap: 14px;
  align-items: center;
}

.dashboard-menu-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(126, 164, 255, 0.18);
  border-radius: 8px;
  background: rgba(9, 21, 42, 0.82);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.dashboard-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 2px 0;
  border-radius: 999px;
  background: rgba(225, 235, 255, 0.82);
}

.dashboard-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(126, 164, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 31, 57, 0.88), rgba(8, 18, 35, 0.92));
  padding: 0 10px 0 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-search svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: rgba(200, 214, 255, 0.72);
  stroke-width: 2;
}

.dashboard-search input {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #f8fbff;
  padding: 0 10px;
}

.dashboard-search input:focus {
  box-shadow: none;
  outline: 0;
}

.dashboard-search input::placeholder {
  color: rgba(207, 220, 255, 0.52);
}

.dashboard-search kbd {
  border-radius: 6px;
  background: rgba(96, 165, 250, 0.12);
  color: rgba(221, 232, 255, 0.76);
  padding: 4px 7px;
  font-size: 0.76rem;
  font-weight: 800;
}

.dashboard-top-widgets {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-top-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(126, 164, 255, 0.14);
  border-radius: 8px;
  background: rgba(9, 21, 42, 0.7);
  color: rgba(230, 239, 255, 0.8);
  cursor: pointer;
  font: inherit;
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.dashboard-top-pill:hover,
.dashboard-top-pill.active {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(37, 99, 235, 0.24);
  color: #ffffff;
  transform: translateY(-1px);
}

.dashboard-top-pill strong {
  min-width: 24px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  padding: 3px 7px;
  text-align: center;
}

.dashboard-data-drawer {
  border: 1px solid rgba(126, 164, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(12, 25, 46, 0.96), rgba(7, 17, 32, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  padding: 14px;
}

.dashboard-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.dashboard-drawer-head strong,
.dashboard-drawer-head span {
  display: block;
}

.dashboard-drawer-head strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
}

.dashboard-drawer-head span {
  margin-top: 3px;
  color: rgba(213, 226, 255, 0.62);
  font-size: 0.82rem;
}

.dashboard-drawer-head button {
  min-height: 34px;
  border: 1px solid rgba(126, 164, 255, 0.18);
  border-radius: 8px;
  background: rgba(9, 21, 42, 0.72);
  color: rgba(230, 239, 255, 0.82);
  cursor: pointer;
  font-weight: 850;
  padding: 0 12px;
}

.dashboard-drawer-head button:hover {
  border-color: rgba(96, 165, 250, 0.42);
  color: #ffffff;
}

.dashboard-drawer-list {
  display: grid;
  gap: 8px;
  max-height: min(360px, 45vh);
  overflow: auto;
  padding-right: 2px;
}

.dashboard-drawer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  border: 1px solid rgba(126, 164, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 20, 38, 0.72);
  color: #f8fbff;
  padding: 11px 12px;
  text-align: left;
}

button.dashboard-drawer-row {
  cursor: pointer;
}

button.dashboard-drawer-row:hover,
button.dashboard-drawer-row.active {
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(37, 99, 235, 0.17);
}

.dashboard-drawer-row strong,
.dashboard-drawer-row small {
  display: block;
  min-width: 0;
}

.dashboard-drawer-row strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 920;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-drawer-row small {
  margin-top: 3px;
  color: rgba(213, 226, 255, 0.58);
  font-size: 0.78rem;
}

.dashboard-drawer-row em {
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.14);
  color: #bfdbfe;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 950;
  padding: 5px 9px;
  white-space: nowrap;
}

.dashboard-drawer-row.tone-critical em {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.dashboard-drawer-row.tone-high em {
  background: rgba(249, 115, 22, 0.2);
  color: #fed7aa;
}

.dashboard-drawer-row.tone-medium em {
  background: rgba(250, 204, 21, 0.18);
  color: #fde68a;
}

.dashboard-drawer-row.tone-low em,
.dashboard-drawer-row.update-row em {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

.dashboard-welcome-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 2px 4px;
}

.dashboard-welcome-row h2 {
  color: #ffffff;
  font-size: clamp(1.42rem, 2.2vw, 2rem);
  line-height: 1.12;
}

.dashboard-welcome-row p {
  margin: 6px 0 0;
  color: rgba(213, 226, 255, 0.68);
}

.dashboard-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-controls select,
.dashboard-controls button {
  min-height: 42px;
  border-radius: 8px;
}

.dashboard-controls select {
  border: 1px solid rgba(126, 164, 255, 0.18);
  background: rgba(9, 21, 42, 0.86);
  color: #f8fbff;
  padding: 0 14px;
}

.dashboard-controls .primary {
  background: linear-gradient(135deg, #1d4ed8, #4338ca);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.dashboard-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-metrics .dashboard-metric-card {
  appearance: none;
  position: relative;
  overflow: hidden;
  min-height: 126px;
  border: 1px solid rgba(126, 164, 255, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.06), transparent 36%),
    linear-gradient(135deg, rgba(15, 31, 57, 0.92), rgba(8, 18, 35, 0.96));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  color: #f8fbff;
  cursor: pointer;
  font: inherit;
  padding: 16px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-metrics .dashboard-metric-card:hover,
.dashboard-metrics .dashboard-metric-card.active {
  border-color: rgba(96, 165, 250, 0.58);
  box-shadow: 0 22px 46px rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
}

.dashboard-metrics .dashboard-metric-card.tone-red {
  background:
    radial-gradient(circle at 88% 18%, rgba(248, 113, 113, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(127, 29, 29, 0.74), rgba(8, 18, 35, 0.96));
}

.dashboard-metrics .dashboard-metric-card.tone-orange {
  background:
    radial-gradient(circle at 88% 18%, rgba(251, 146, 60, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(124, 45, 18, 0.74), rgba(8, 18, 35, 0.96));
}

.dashboard-metrics .dashboard-metric-card.tone-purple {
  background:
    radial-gradient(circle at 88% 18%, rgba(167, 139, 250, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(76, 29, 149, 0.72), rgba(8, 18, 35, 0.96));
}

.dashboard-metrics .dashboard-metric-card.tone-blue,
.dashboard-metrics .dashboard-metric-card.tone-low {
  background:
    radial-gradient(circle at 88% 18%, rgba(56, 189, 248, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(30, 64, 175, 0.72), rgba(8, 18, 35, 0.96));
}

.dashboard-metrics .dashboard-metric-card.tone-green {
  background:
    radial-gradient(circle at 88% 18%, rgba(34, 197, 94, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(6, 95, 70, 0.72), rgba(8, 18, 35, 0.96));
}

.dashboard-metrics .dashboard-metric-card.tone-medium {
  background:
    radial-gradient(circle at 88% 18%, rgba(250, 204, 21, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(113, 63, 18, 0.72), rgba(8, 18, 35, 0.96));
}

.dashboard-metrics .dashboard-metric-card.tone-high,
.dashboard-metrics .dashboard-metric-card.tone-critical {
  background:
    radial-gradient(circle at 88% 18%, rgba(248, 113, 113, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(127, 29, 29, 0.74), rgba(8, 18, 35, 0.96));
}

.dashboard-metric-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.dashboard-metric-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.dashboard-metric-card.tone-red .dashboard-metric-icon,
.dashboard-alert-row.tone-critical .dashboard-alert-icon,
.dashboard-activity-item.tone-critical i {
  background: linear-gradient(135deg, #be123c, #ef4444);
}

.dashboard-metric-card.tone-orange .dashboard-metric-icon,
.dashboard-alert-row.tone-high .dashboard-alert-icon,
.dashboard-activity-item.tone-high i {
  background: linear-gradient(135deg, #c2410c, #f97316);
}

.dashboard-metric-card.tone-purple .dashboard-metric-icon {
  background: linear-gradient(135deg, #5b21b6, #8b5cf6);
}

.dashboard-metric-card.tone-blue .dashboard-metric-icon,
.dashboard-alert-row.tone-low .dashboard-alert-icon,
.dashboard-activity-item.tone-low i {
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
}

.dashboard-metric-card.tone-green .dashboard-metric-icon,
.dashboard-activity-item.tone-medium i {
  background: linear-gradient(135deg, #047857, #22c55e);
}

.dashboard-metric-card.tone-medium .dashboard-metric-icon {
  background: linear-gradient(135deg, #ca8a04, #facc15);
}

.dashboard-metric-card.tone-high .dashboard-metric-icon,
.dashboard-metric-card.tone-critical .dashboard-metric-icon {
  background: linear-gradient(135deg, #b91c1c, #f97316);
}

.dashboard-metric-card.tone-low .dashboard-metric-icon {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.dashboard-metric-card span,
.dashboard-metric-card small {
  color: rgba(213, 226, 255, 0.64);
}

.dashboard-metric-card strong {
  color: #ffffff;
  font-size: clamp(1.42rem, 2vw, 1.85rem);
}

.dashboard-sparkline {
  width: 100%;
  height: 44px;
  margin-top: 8px;
}

.dashboard-sparkline polyline {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 8px rgba(14, 165, 233, 0.24));
}

.dashboard-risk-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(126, 164, 255, 0.14);
  margin-top: 18px;
  overflow: hidden;
}

.dashboard-risk-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #facc15, #f97316, #ef4444);
}

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

.dashboard-card {
  min-width: 0;
  border: 1px solid rgba(126, 164, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 31, 57, 0.92), rgba(8, 18, 35, 0.95));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  padding: 16px;
}

.dashboard-card-wide,
#dashboard-alert-trend,
#dashboard-recent-incidents {
  grid-column: span 5;
}

#dashboard-severity-panel,
#dashboard-assets {
  grid-column: span 3;
}

.dashboard-card-tall,
#dashboard-activity {
  grid-column: span 4;
}

#dashboard-techniques,
#dashboard-indicators,
#dashboard-category-panel {
  grid-column: span 4;
}

#dashboard-triage-panel {
  grid-column: 1 / -1;
}

.dashboard-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-card-title h3 {
  color: #ffffff;
  font-size: 0.98rem;
}

.dashboard-card-title span,
.dashboard-card-title button,
.dashboard-card-note {
  color: rgba(166, 190, 255, 0.8);
  font-size: 0.8rem;
}

.dashboard-card-title button {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 800;
}

.dashboard-card-title select {
  min-height: 34px;
  border: 1px solid rgba(126, 164, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 17, 32, 0.8);
  color: rgba(230, 239, 255, 0.86);
  padding: 0 10px;
}

.dashboard-trend-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
}

.dashboard-trend-counts button {
  min-height: 58px;
  border: 1px solid rgba(126, 164, 255, 0.16);
  border-radius: 8px;
  background: rgba(9, 22, 40, 0.78);
  color: rgba(230, 239, 255, 0.86);
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 10px 12px;
  cursor: pointer;
}

.dashboard-trend-counts button:hover,
.dashboard-trend-counts button.active,
.dashboard-trend-counts button:focus-visible {
  border-color: rgba(96, 165, 250, 0.7);
  transform: translateY(-1px);
}

.dashboard-trend-counts button span {
  color: rgba(213, 226, 255, 0.66);
  font-size: 0.74rem;
}

.dashboard-trend-counts button strong {
  font-size: 1.2rem;
  color: #f8fbff;
}

.dashboard-trend-counts .critical {
  background: linear-gradient(135deg, rgba(255, 59, 79, 0.26), rgba(9, 22, 40, 0.86));
}

.dashboard-trend-counts .high {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.24), rgba(9, 22, 40, 0.86));
}

.dashboard-trend-counts .medium {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(9, 22, 40, 0.86));
}

.dashboard-trend-counts .low {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.26), rgba(9, 22, 40, 0.86));
}

.dashboard-line-chart {
  width: 100%;
  min-height: 210px;
}

.dashboard-line-chart polyline {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-chart-grid line {
  stroke: rgba(126, 164, 255, 0.12);
  stroke-width: 1;
}

.dashboard-chart-labels text {
  fill: rgba(213, 226, 255, 0.52);
  font-size: 12px;
}

.dashboard-line-chart .line-critical {
  stroke: #ff3b4f;
}

.dashboard-line-chart .line-high {
  stroke: #fb923c;
}

.dashboard-line-chart .line-medium {
  stroke: #facc15;
}

.dashboard-line-chart .line-low {
  stroke: #2563eb;
}

.dashboard-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  color: rgba(213, 226, 255, 0.68);
  font-size: 0.82rem;
}

.dashboard-chart-legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
}

.dashboard-chart-legend .critical::before {
  background: #ff3b4f;
}

.dashboard-chart-legend .high::before {
  background: #fb923c;
}

.dashboard-chart-legend .medium::before {
  background: #facc15;
}

.dashboard-chart-legend .low::before {
  background: #2563eb;
}

.dashboard-card-note {
  margin: 10px 0 0;
  text-align: center;
}

.dashboard-donut-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.dashboard-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 146px;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
}

.dashboard-donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: #0a1829;
}

.dashboard-donut-center-button {
  appearance: none;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 72px;
  height: 58px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.dashboard-donut-center-button:hover,
.dashboard-donut-center-button.active,
.dashboard-donut-center-button:focus-visible {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(37, 99, 235, 0.16);
  outline: 0;
}

.dashboard-donut span,
.dashboard-donut small {
  position: relative;
  z-index: 1;
  display: block;
}

.dashboard-donut span {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 950;
}

.dashboard-donut small {
  margin-top: -8px;
  color: rgba(213, 226, 255, 0.58);
}

.dashboard-donut-legend {
  display: grid;
  gap: 10px;
}

.dashboard-donut-legend div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: rgba(230, 239, 255, 0.88);
  font-size: 0.86rem;
}

.dashboard-donut-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dashboard-donut-legend strong {
  color: #ffffff;
  font-weight: 800;
}

.dashboard-bars {
  display: grid;
  gap: 12px;
}

.dashboard-bar-row {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) minmax(90px, 1.5fr) auto;
  align-items: center;
  gap: 12px;
  color: rgba(230, 239, 255, 0.82);
  font-size: 0.85rem;
}

.dashboard-bar-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bar-row div {
  height: 9px;
  border-radius: 999px;
  background: rgba(126, 164, 255, 0.12);
  overflow: hidden;
}

.dashboard-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.dashboard-bar-row .bar-0 {
  background: #ff3b4f;
}

.dashboard-bar-row .bar-1 {
  background: #fb923c;
}

.dashboard-bar-row .bar-2 {
  background: #facc15;
}

.dashboard-bar-row .bar-3 {
  background: #2563eb;
}

.dashboard-bar-row .bar-4 {
  background: #2dd4bf;
}

.dashboard-bar-row strong {
  color: #ffffff;
  font-size: 0.85rem;
}

.dashboard-alert-list {
  display: grid;
  gap: 4px;
}

.dashboard-alert-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  border: 0;
  border-top: 1px solid rgba(126, 164, 255, 0.1);
  background: transparent;
  color: #f8fbff;
  padding: 10px 0;
  text-align: left;
}

.dashboard-alert-row:first-child {
  border-top: 0;
}

.dashboard-alert-row:hover,
.dashboard-alert-row.active {
  background: rgba(96, 165, 250, 0.08);
}

.dashboard-alert-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 950;
}

.dashboard-alert-row strong,
.dashboard-alert-row small {
  display: block;
}

.dashboard-alert-row strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-alert-row small {
  margin-top: 3px;
  color: rgba(213, 226, 255, 0.56);
}

.dashboard-alert-row em {
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.18);
  color: #ffb4b4;
  padding: 5px 8px;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 900;
}

.dashboard-table {
  display: grid;
  gap: 0;
  overflow-x: auto;
}

.dashboard-table > div {
  display: grid;
  align-items: center;
  min-width: 520px;
  border-top: 1px solid rgba(126, 164, 255, 0.1);
  color: rgba(230, 239, 255, 0.78);
  padding: 10px 0;
  font-size: 0.84rem;
}

.dashboard-table > div:first-child {
  border-top: 0;
  color: rgba(166, 190, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 900;
}

.dashboard-table strong {
  color: #ffffff;
  font-size: 0.84rem;
}

.dashboard-incident-link {
  appearance: none;
  width: fit-content;
  border: 0;
  border-radius: 6px;
  background: rgba(96, 165, 250, 0.1);
  color: #bfdbfe;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 950;
  padding: 4px 7px;
  text-align: left;
}

.dashboard-incident-link:hover,
.dashboard-incident-link:focus-visible {
  background: rgba(96, 165, 250, 0.2);
  color: #ffffff;
  outline: 1px solid rgba(96, 165, 250, 0.45);
}

.dashboard-indicator-table > div {
  grid-template-columns: minmax(150px, 1.5fr) minmax(90px, 0.9fr) minmax(90px, 0.9fr) 50px;
  gap: 12px;
}

.dashboard-incident-table > div {
  grid-template-columns: 110px minmax(190px, 1.5fr) 95px 100px 90px;
  gap: 12px;
}

.sidebar-plan-card {
  margin: 14px 16px 0;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, .28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 184, 166, .16), rgba(59, 130, 246, .10));
  color: #e8fbff;
  display: grid;
  gap: 8px;
}

.sidebar-plan-label {
  color: rgba(232, 251, 255, .72);
  font-size: 12px;
}

.sidebar-plan-card strong {
  letter-spacing: .08em;
  font-size: 18px;
}

.sidebar-plan-action {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 7px;
  background: rgba(255, 255, 255, .10);
  color: #fff;
  padding: 9px 10px;
  font-weight: 800;
  cursor: pointer;
}

.billing-title {
  align-items: flex-start;
}

.billing-message {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(20, 184, 166, .22);
  background: #eefdf8;
  color: #075f55;
  font-weight: 800;
}

.billing-message.warning {
  background: #fff7e6;
  border-color: #f8d783;
  color: #8a5200;
}

.billing-message.error {
  background: #fff0f0;
  border-color: #fecaca;
  color: #991b1b;
}

.billing-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.billing-current-card,
.billing-plan-card {
  border-radius: 8px;
}

.billing-current-header,
.billing-plan-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.billing-current-header h3,
.billing-plan-head h3 {
  margin: 3px 0 0;
}

.billing-status-chip,
.billing-current-badge {
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 7px 10px;
  font-weight: 900;
  font-size: 12px;
}

.billing-current-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.billing-current-grid div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.billing-current-grid span,
.billing-note {
  color: var(--muted);
}

.billing-current-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
}

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

.danger-soft {
  border: 1px solid #fecaca;
  background: #fff0f0;
  color: #b91c1c;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}

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

.billing-plan-card {
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.billing-plan-card.current {
  border-color: rgba(20, 184, 166, .55);
  box-shadow: 0 18px 45px rgba(20, 184, 166, .13);
}

.billing-plan-price {
  font-size: 32px;
  color: var(--navy);
}

.billing-mini-list,
.billing-quota-list {
  display: grid;
  gap: 8px;
}

.billing-mini-list span,
.billing-quota-list small {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 10px;
  background: #f8fafc;
  color: var(--ink);
}

.billing-quota-list small {
  color: var(--muted);
  background: #fff;
}

.administration-title h2 {
  margin-bottom: 4px;
}

.administration-message {
  margin: 0 0 14px;
  border: 1px solid rgba(4, 124, 117, 0.24);
  border-radius: 8px;
  padding: 12px 14px;
  background: #eefcf8;
  color: #075e57;
  font-weight: 800;
}

.administration-message.error {
  border-color: #fecaca;
  background: #fff1f1;
  color: #b91c1c;
}

.administration-message.success {
  border-color: #bbf7d0;
  background: #effdf4;
  color: #15803d;
}

.administration-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.administration-summary-card {
  min-height: 100px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(79, 70, 229, 0.08), rgba(4, 124, 117, 0.08)),
    #ffffff;
  box-shadow: var(--shadow);
}

.administration-summary-card span,
.administration-summary-card small {
  display: block;
  color: var(--muted);
}

.administration-summary-card strong {
  display: block;
  margin: 7px 0 2px;
  color: var(--navy);
  font-size: 1.8rem;
  line-height: 1;
}

.administration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 14px;
}

.administration-panel-title {
  align-items: flex-start;
}

.administration-panel-title h3 {
  margin: 0 0 4px;
}

.administration-panel-title p {
  margin: 0;
  color: var(--muted);
}

.administration-role-select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--ink);
}

.administration-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.administration-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.administration-table th,
.administration-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

.administration-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.administration-table td strong,
.administration-table td span {
  display: block;
}

.administration-table td span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.85rem;
}

.administration-table tr:last-child td {
  border-bottom: 0;
}

.administration-status-toggle {
  min-width: 92px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 11px;
  font-weight: 900;
}

.administration-status-toggle.enabled {
  background: var(--green-soft);
  color: var(--green);
}

.administration-status-toggle.disabled {
  background: var(--red-soft);
  color: var(--red);
}

.administration-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.administration-system-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.administration-system-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fafc;
}

.administration-system-list span {
  color: var(--muted);
}

.administration-audit-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.administration-audit-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
}

.administration-audit-item strong,
.administration-audit-item span {
  display: block;
}

.administration-audit-item span,
.administration-audit-item small {
  color: var(--muted);
}

body.administration-view-active {
  background: #eef4fb;
}

body.administration-view-active .shell {
  display: block;
  min-height: 100vh;
  background: #eef4fb;
}

body.administration-view-active .sidebar,
body.administration-view-active .topbar {
  display: none;
}

body.administration-view-active .main {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 34%),
    linear-gradient(135deg, #eef4fb 0%, #f8fbff 46%, #eff8f7 100%);
}

body.administration-view-active .main > .view:not(.active) {
  display: none;
}

.administration-workspace {
  min-height: 100vh;
  padding: 0;
}

.administration-workspace.active {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.admin-shell-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 18px;
  background: linear-gradient(180deg, #071326 0%, #0b1f38 58%, #092c39 100%);
  color: #e5eefc;
  box-shadow: 18px 0 40px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.admin-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.13);
}

.admin-brand-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.22), rgba(37, 99, 235, 0.3));
  border: 1px solid rgba(125, 211, 252, 0.36);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.admin-brand-mark svg {
  width: 29px;
  height: 29px;
}

.admin-brand-shield {
  fill: rgba(45, 212, 191, 0.18);
  stroke: #67e8f9;
  stroke-width: 1.8;
}

.admin-brand-check {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.admin-brand strong,
.admin-brand span {
  display: block;
}

.admin-brand strong {
  color: #f8fbff;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.admin-brand span {
  color: #a9b8d0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.admin-shell-nav {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 7px;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-color: rgba(125, 211, 252, 0.42) rgba(15, 23, 42, 0.24);
  scrollbar-width: thin;
}

.admin-shell-nav::-webkit-scrollbar {
  width: 8px;
}

.admin-shell-nav::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.24);
  border-radius: 999px;
}

.admin-shell-nav::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.64), rgba(96, 165, 250, 0.54));
  border-radius: 999px;
}

.admin-nav-group-label {
  margin: 14px 0 2px;
  color: #93a7c4;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-nav-group-label:first-child {
  margin-top: 0;
}

.admin-shell-nav button,
.admin-shell-footer button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  background: transparent;
  color: #cbd7e9;
  font-weight: 800;
  cursor: pointer;
}

.admin-shell-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 1rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}

.admin-shell-nav button:hover,
.admin-shell-nav button:focus-visible,
.admin-shell-nav button.active {
  background: rgba(20, 184, 166, 0.16);
  border-color: rgba(45, 212, 191, 0.26);
  color: #ffffff;
  outline: none;
}

.admin-shell-footer {
  flex: 0 0 auto;
  margin-top: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.13);
  padding-top: 16px;
}

.admin-shell-footer .secondary {
  width: 100%;
  color: #dbeafe;
  border-color: rgba(191, 219, 254, 0.2);
  background: rgba(15, 23, 42, 0.28);
}

.admin-shell-main {
  min-width: 0;
  padding: 26px;
}

.admin-shell-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-shell-header h2 {
  margin: 4px 0 6px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
  color: #071326;
}

.admin-shell-header p {
  margin: 0;
  max-width: 760px;
  color: #53657c;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: grid;
  gap: 16px;
}

.admin-ai-management-panel {
  display: grid;
  gap: 16px;
}

.admin-ai-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.86);
}

.admin-ai-tabs button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 12px;
  background: transparent;
  color: #475569;
  font-weight: 800;
  cursor: pointer;
}

.admin-ai-tabs button:hover,
.admin-ai-tabs button:focus-visible,
.admin-ai-tabs button.active {
  border-color: rgba(20, 184, 166, 0.32);
  background: #ffffff;
  color: #0f766e;
  outline: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.admin-ai-note-card p {
  max-width: 860px;
  margin: 8px 0 0;
  color: #53657c;
}

.admin-ai-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 14px 16px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.admin-ai-status-strip span,
.admin-ai-status-strip strong {
  display: block;
}

.admin-ai-status-strip span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-ai-status-strip strong {
  margin-top: 3px;
  color: #0f172a;
  font-size: 1.2rem;
}

.admin-ai-status-strip p {
  margin: 0;
  color: #53657c;
  text-align: right;
}

.admin-ai-status-strip.success {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.admin-ai-status-strip.warning {
  border-color: rgba(245, 158, 11, 0.34);
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.admin-ai-status-strip.error {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(135deg, #fef2f2, #ffffff);
}

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

.admin-knowledge-metric-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-knowledge-metric-card {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-top: 5px solid #2563eb;
  border-radius: 8px;
  padding: 14px;
  text-align: left;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.admin-knowledge-metric-card:hover,
.admin-knowledge-metric-card:focus-visible,
.admin-knowledge-metric-card.active {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
  outline: none;
}

.admin-knowledge-metric-card span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-knowledge-metric-card strong {
  font-size: 2rem;
  line-height: 1;
}

.admin-knowledge-metric-card small {
  color: #53657c;
}

.admin-knowledge-metric-card em {
  align-self: end;
  color: #2563eb;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.admin-knowledge-metric-card.green {
  border-top-color: #16a34a;
  background: linear-gradient(150deg, #f0fdf4, #ffffff);
}

.admin-knowledge-metric-card.amber {
  border-top-color: #f59e0b;
  background: linear-gradient(150deg, #fffbeb, #ffffff);
}

.admin-knowledge-metric-card.red {
  border-top-color: #ef4444;
  background: linear-gradient(150deg, #fef2f2, #ffffff);
}

.admin-knowledge-metric-card.purple {
  border-top-color: #7c3aed;
  background: linear-gradient(150deg, #f5f3ff, #ffffff);
}

.admin-knowledge-metric-card.teal {
  border-top-color: #0d9488;
  background: linear-gradient(150deg, #ecfdf5, #ffffff);
}

.admin-security-vertical-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.admin-security-rail {
  position: sticky;
  top: 18px;
  min-width: 0;
  display: grid;
  gap: 14px;
}

.admin-security-rail-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.admin-security-rail-heading span {
  color: #0d9488;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-security-rail-heading strong {
  color: #0f172a;
  font-size: 1.1rem;
}

.admin-security-rail-heading small {
  color: #64748b;
  line-height: 1.4;
}

.admin-security-rail-list {
  display: grid;
  gap: 10px;
}

.admin-security-rail-item {
  position: relative;
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.admin-security-rail-item:hover,
.admin-security-rail-item:focus-visible,
.admin-security-rail-item.active {
  transform: translateX(3px);
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.11);
  outline: none;
}

.admin-security-rail-item.active::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  border-right: 1px solid rgba(148, 163, 184, 0.24);
  background: inherit;
  transform: translateY(-50%) rotate(45deg);
}

.admin-security-rail-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-security-rail-copy strong {
  color: #0f172a;
  font-size: 0.92rem;
  line-height: 1.25;
}

.admin-security-rail-copy small {
  color: #64748b;
  line-height: 1.35;
}

.admin-security-rail-count {
  min-width: 46px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 1.1rem;
  font-weight: 900;
}

.admin-security-rail-item.red {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, #fff7f7, #ffffff);
}

.admin-security-rail-item.red .admin-security-rail-count {
  background: #fee2e2;
  color: #991b1b;
}

.admin-security-rail-item.green {
  border-left-color: #16a34a;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.admin-security-rail-item.green .admin-security-rail-count {
  background: #dcfce7;
  color: #166534;
}

.admin-security-rail-item.amber {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.admin-security-rail-item.amber .admin-security-rail-count {
  background: #fef3c7;
  color: #92400e;
}

.admin-security-rail-item.teal {
  border-left-color: #0d9488;
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
}

.admin-security-rail-item.teal .admin-security-rail-count {
  background: #ccfbf1;
  color: #115e59;
}

.admin-security-rail-item.purple {
  border-left-color: #7c3aed;
  background: linear-gradient(135deg, #f5f3ff, #ffffff);
}

.admin-security-rail-item.purple .admin-security-rail-count {
  background: #ede9fe;
  color: #5b21b6;
}

.admin-security-detail-panel {
  min-width: 0;
}

.admin-security-table td:last-child {
  max-width: 460px;
  line-height: 1.45;
}

.admin-audit-vertical-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.admin-audit-rail {
  position: sticky;
  top: 18px;
  min-width: 0;
  display: grid;
  gap: 14px;
  overflow: hidden;
}

.admin-audit-rail-heading {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.admin-audit-rail-heading span {
  color: #2563eb;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-audit-rail-heading strong {
  color: #0f172a;
  font-size: 1.1rem;
}

.admin-audit-rail-heading small {
  color: #64748b;
  line-height: 1.4;
}

.admin-audit-rail-list {
  display: grid;
  gap: 10px;
}

.admin-audit-rail-item {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.admin-audit-rail-item:hover,
.admin-audit-rail-item:focus-visible,
.admin-audit-rail-item.active {
  transform: translateX(3px);
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.11);
  outline: none;
}

.admin-audit-rail-item.active::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  border-right: 1px solid rgba(148, 163, 184, 0.24);
  background: inherit;
  transform: translateY(-50%) rotate(45deg);
}

.admin-audit-rail-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-audit-rail-copy strong {
  color: #0f172a;
  font-size: 0.92rem;
  line-height: 1.25;
}

.admin-audit-rail-copy small {
  color: #64748b;
  line-height: 1.35;
}

.admin-audit-rail-token {
  min-width: 48px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 900;
}

.admin-audit-rail-item.blue {
  border-left-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.admin-audit-rail-item.teal {
  border-left-color: #0d9488;
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
}

.admin-audit-rail-item.purple {
  border-left-color: #7c3aed;
  background: linear-gradient(135deg, #f5f3ff, #ffffff);
}

.admin-audit-rail-item.green {
  border-left-color: #16a34a;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.admin-audit-rail-item.amber,
.admin-audit-rail-item.orange {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.admin-audit-rail-item.red {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, #fff7f7, #ffffff);
}

.admin-audit-rail-item.cyan {
  border-left-color: #0891b2;
  background: linear-gradient(135deg, #ecfeff, #ffffff);
}

.admin-audit-rail-item.slate {
  border-left-color: #475569;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.admin-audit-rail-item.teal .admin-audit-rail-token,
.admin-audit-rail-item.green .admin-audit-rail-token,
.admin-audit-rail-item.cyan .admin-audit-rail-token {
  background: #ccfbf1;
  color: #115e59;
}

.admin-audit-rail-item.purple .admin-audit-rail-token {
  background: #ede9fe;
  color: #5b21b6;
}

.admin-audit-rail-item.amber .admin-audit-rail-token,
.admin-audit-rail-item.orange .admin-audit-rail-token {
  background: #fef3c7;
  color: #92400e;
}

.admin-audit-rail-item.red .admin-audit-rail-token {
  background: #fee2e2;
  color: #991b1b;
}

.admin-audit-rail-item.slate .admin-audit-rail-token {
  background: #e2e8f0;
  color: #334155;
}

.admin-audit-detail-panel {
  min-width: 0;
}

.admin-audit-detail-title h3 {
  letter-spacing: 0;
}

.admin-audit-filter-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) 130px auto;
  gap: 10px;
  margin: 14px 0;
}

.admin-audit-filter-row input,
.admin-audit-filter-row select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
}

.admin-audit-loading {
  display: grid;
  gap: 4px;
  min-height: 96px;
  align-content: center;
  border: 1px dashed rgba(37, 99, 235, 0.28);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.95));
  color: #64748b;
}

.admin-audit-loading strong {
  color: #0f172a;
}

.admin-audit-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.admin-audit-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.admin-audit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(135deg, #f8fafc, #eef6ff);
  color: #475569;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.admin-audit-table td {
  vertical-align: top;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  color: #0f172a;
}

.admin-audit-table tr:nth-child(even) td {
  background: #fbfdff;
}

.admin-audit-table tr:hover td {
  background: #f0fdfa;
}

.admin-audit-table tr:last-child td {
  border-bottom: 0;
}

.admin-audit-table th:nth-child(1),
.admin-audit-table td:nth-child(1) {
  width: 150px;
}

.admin-audit-table th:nth-child(2),
.admin-audit-table td:nth-child(2) {
  width: 150px;
}

.admin-audit-table th:nth-child(3),
.admin-audit-table td:nth-child(3) {
  width: 160px;
}

.admin-audit-table th:nth-child(4),
.admin-audit-table td:nth-child(4) {
  width: 190px;
}

.admin-audit-table th:nth-child(5),
.admin-audit-table td:nth-child(5) {
  width: auto;
}

.admin-audit-time,
.admin-audit-resource {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-audit-time strong,
.admin-audit-actor,
.admin-audit-resource strong {
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.3;
}

.admin-audit-time small,
.admin-audit-resource small {
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-audit-actor {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #f1f5f9;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-audit-details {
  display: block;
  max-width: 100%;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-audit-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #64748b;
  font-size: 0.84rem;
}

.admin-audit-pagination > div {
  display: inline-flex;
  gap: 8px;
}

.admin-knowledge-detail-panel {
  min-width: 0;
}

.admin-knowledge-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.45fr) 170px 130px auto auto;
  gap: 10px;
  margin: 14px 0;
}

.admin-knowledge-filter-row input,
.admin-knowledge-filter-row select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
}

.admin-knowledge-table td span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.78rem;
}

.admin-collection-pill,
.admin-knowledge-status {
  display: inline-flex !important;
  width: max-content;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.74rem !important;
  font-weight: 900;
}

.admin-collection-pill {
  background: #eef2ff;
  color: #3730a3 !important;
}

.admin-knowledge-status.success {
  background: #dcfce7;
  color: #166534 !important;
}

.admin-knowledge-status.warning {
  background: #fef3c7;
  color: #92400e !important;
}

.admin-knowledge-status.error {
  background: #fee2e2;
  color: #991b1b !important;
}

.admin-knowledge-status.neutral {
  background: #f1f5f9;
  color: #334155 !important;
}

.admin-knowledge-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #64748b;
}

.admin-knowledge-pagination div {
  display: flex;
  gap: 8px;
}

.admin-grid.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.admin-grid.two.balanced {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-usage-table-panel,
.admin-usage-events-panel {
  min-width: 0;
}

.admin-usage-trend-panel {
  min-width: 0;
}

.admin-usage-trend {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.admin-usage-trend-row {
  display: grid;
  grid-template-columns: 64px minmax(120px, 1fr) 54px minmax(160px, auto);
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 0.86rem;
}

.admin-usage-trend-row strong {
  color: #0f172a;
}

.admin-usage-trend-row small {
  text-align: right;
}

.admin-usage-trend-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.admin-usage-trend-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #2563eb);
}

.admin-usage-table th,
.admin-usage-table td {
  white-space: nowrap;
}

.admin-usage-table td span:not(.admin-pill) {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.78rem;
}

.admin-gradient-card,
.administration-workspace .administration-summary-card {
  min-height: 108px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.82)),
    #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.administration-workspace .administration-summary-card strong {
  color: #0f172a;
}

#administration-summary.admin-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-dashboard-metric {
  position: relative;
  display: grid;
  gap: 7px;
  align-content: start;
  border-top: 5px solid #2563eb;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.admin-dashboard-metric:hover,
.admin-dashboard-metric:focus-visible,
.admin-dashboard-metric.active {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.13);
  outline: none;
}

.admin-dashboard-metric.active {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 24px 50px rgba(15, 23, 42, 0.13);
}

.admin-dashboard-metric span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-dashboard-metric strong {
  margin: 0;
  color: #0f172a;
  font-size: 2.05rem;
  line-height: 1;
}

.admin-dashboard-metric-amounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.admin-dashboard-metric-amount {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(16, 185, 129, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 22px rgba(16, 185, 129, 0.09);
}

.admin-dashboard-metric-amounts .admin-dashboard-metric-amount:nth-child(2) {
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(236, 253, 245, 0.96));
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 12px 26px rgba(245, 158, 11, 0.14);
}

.admin-dashboard-metric .admin-dashboard-metric-amount span {
  color: #047857;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-dashboard-metric .admin-dashboard-metric-amount strong {
  color: #065f46;
  font-size: 1.05rem;
  line-height: 1.1;
}

.admin-dashboard-metric-amounts .admin-dashboard-metric-amount strong {
  font-size: 1rem;
  font-weight: 950;
}

.admin-dashboard-metric-amounts .admin-dashboard-metric-amount:nth-child(2) span {
  color: #b45309;
}

.admin-dashboard-metric-amounts .admin-dashboard-metric-amount:nth-child(2) strong {
  color: #047857;
}

.admin-dashboard-metric small {
  min-height: 34px;
  color: #475569;
  line-height: 1.35;
}

.admin-dashboard-metric em {
  color: #2563eb;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.admin-dashboard-metric.teal {
  border-top-color: #0d9488;
  background: linear-gradient(145deg, #ecfdf5, #ffffff);
}

.admin-dashboard-metric.blue {
  border-top-color: #2563eb;
  background: linear-gradient(145deg, #eff6ff, #ffffff);
}

.admin-dashboard-metric.purple {
  border-top-color: #7c3aed;
  background: linear-gradient(145deg, #f5f3ff, #ffffff);
}

.admin-dashboard-metric.green {
  border-top-color: #16a34a;
  background: linear-gradient(145deg, #f0fdf4, #ffffff);
}

.admin-dashboard-metric.amber {
  border-top-color: #f59e0b;
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

.admin-dashboard-metric.amber strong,
.admin-dashboard-detail-panel.amber .admin-dashboard-detail-head span {
  color: #92400e;
}

.admin-dashboard-metric.cyan {
  border-top-color: #0891b2;
  background: linear-gradient(145deg, #ecfeff, #ffffff);
}

.admin-dashboard-metric.red {
  border-top-color: #ef4444;
  background: linear-gradient(145deg, #fff7f7, #ffffff);
}

.admin-dashboard-metric.slate {
  border-top-color: #475569;
  background: linear-gradient(145deg, #f8fafc, #ffffff);
}

.admin-dashboard-detail-empty,
.admin-dashboard-detail-panel {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.admin-dashboard-detail-empty {
  min-height: 116px;
  display: grid;
  align-items: center;
  border-style: dashed;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.96));
}

.admin-dashboard-detail-empty span,
.admin-dashboard-detail-head span {
  color: #0d9488;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-dashboard-detail-empty strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 1.15rem;
}

.admin-dashboard-detail-empty p {
  max-width: 760px;
  margin: 6px 0 0;
  color: #53657c;
  line-height: 1.5;
}

.admin-dashboard-detail-panel {
  display: grid;
  gap: 14px;
  border-top: 5px solid #2563eb;
}

.admin-dashboard-detail-panel.teal {
  border-top-color: #0d9488;
}

.admin-dashboard-detail-panel.blue {
  border-top-color: #2563eb;
}

.admin-dashboard-detail-panel.purple {
  border-top-color: #7c3aed;
}

.admin-dashboard-detail-panel.green {
  border-top-color: #16a34a;
}

.admin-dashboard-detail-panel.amber {
  border-top-color: #f59e0b;
}

.admin-dashboard-detail-panel.cyan {
  border-top-color: #0891b2;
}

.admin-dashboard-detail-panel.red {
  border-top-color: #ef4444;
}

.admin-dashboard-detail-panel.slate {
  border-top-color: #475569;
}

.admin-dashboard-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-dashboard-detail-head h3 {
  margin: 4px 0 5px;
  color: #0f172a;
  font-size: 1.24rem;
}

.admin-dashboard-detail-head p {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.admin-dashboard-detail-list {
  display: grid;
  gap: 10px;
}

.admin-dashboard-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 12px 13px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.admin-dashboard-detail-row:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: #ffffff;
}

.admin-dashboard-detail-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-dashboard-detail-copy strong {
  color: #0f172a;
  line-height: 1.25;
}

.admin-dashboard-detail-copy span,
.admin-dashboard-detail-copy small {
  color: #64748b;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-dashboard-empty-list {
  display: grid;
  gap: 4px;
  border: 1px dashed rgba(148, 163, 184, 0.36);
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
  color: #64748b;
}

.admin-dashboard-empty-list strong {
  color: #0f172a;
}

.admin-health-workspace {
  display: grid;
  gap: 16px;
}

.admin-health-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 230px);
  gap: 18px;
  align-items: center;
  min-height: 170px;
  border-color: rgba(37, 99, 235, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.92)),
    #ffffff;
}

.admin-health-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent 36%),
    radial-gradient(circle at 92% 18%, rgba(20, 184, 166, 0.16), transparent 34%);
}

.admin-health-hero > * {
  position: relative;
  z-index: 1;
}

.admin-health-hero.success {
  border-color: rgba(22, 163, 74, 0.28);
}

.admin-health-hero.warning {
  border-color: rgba(245, 158, 11, 0.34);
}

.admin-health-hero.error {
  border-color: rgba(239, 68, 68, 0.32);
}

.admin-health-hero-copy {
  display: grid;
  gap: 7px;
}

.admin-health-hero-copy span {
  width: max-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-health-hero-copy h3 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.admin-health-hero-copy p {
  max-width: 720px;
  margin: 0;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.55;
}

.admin-health-hero-meter {
  display: grid;
  justify-items: center;
  gap: 5px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.84);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: center;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.admin-health-hero-meter:hover,
.admin-health-hero-meter:focus-visible,
.admin-health-hero-meter.active {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.16);
  outline: none;
  transform: translateY(-1px);
}

.admin-health-hero-meter strong {
  color: #0f172a;
  font-size: 2rem;
  line-height: 1;
}

.admin-health-hero-meter span {
  color: #334155;
  font-weight: 900;
}

.admin-health-hero-meter small {
  color: #64748b;
}

.admin-health-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-health-summary-card {
  min-height: 96px;
  display: grid;
  gap: 4px;
  align-content: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-top: 4px solid #64748b;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.admin-health-summary-card:hover,
.admin-health-summary-card:focus-visible,
.admin-health-summary-card.active {
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  outline: none;
  transform: translateY(-2px);
}

.admin-health-summary-card.active {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 18px 42px rgba(15, 23, 42, 0.12);
}

.admin-health-summary-card.success {
  border-top-color: #16a34a;
  background: linear-gradient(145deg, #f0fdf4, #ffffff);
}

.admin-health-summary-card.warning {
  border-top-color: #f59e0b;
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

.admin-health-summary-card.error {
  border-top-color: #ef4444;
  background: linear-gradient(145deg, #fef2f2, #ffffff);
}

.admin-health-summary-card.neutral {
  border-top-color: #2563eb;
  background: linear-gradient(145deg, #eff6ff, #ffffff);
}

.admin-health-summary-card span {
  color: #64748b;
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-health-summary-card strong {
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1;
}

.admin-health-summary-card small {
  color: #64748b;
  line-height: 1.35;
}

.admin-health-services-panel {
  min-width: 0;
}

.admin-health-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: start;
  gap: 16px;
}

.admin-health-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-health-service-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-health-service-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) minmax(150px, auto);
  gap: 13px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  padding: 13px 14px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.admin-health-service-row:hover,
.admin-health-service-row:focus-visible,
.admin-health-service-row.active {
  background: linear-gradient(135deg, #ffffff, #eef6ff);
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
  outline: none;
  transform: translateX(2px);
}

.admin-health-service-row.active {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 18px 38px rgba(15, 23, 42, 0.1);
}

.admin-health-service-row.success {
  border-left: 5px solid #16a34a;
}

.admin-health-service-row.warning {
  border-left: 5px solid #f59e0b;
}

.admin-health-service-row.error {
  border-left: 5px solid #ef4444;
}

.admin-health-service-row.neutral {
  border-left: 5px solid #2563eb;
}

.admin-health-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 5px rgba(100, 116, 139, 0.12);
}

.admin-health-service-row.success .admin-health-status-dot {
  background: #16a34a;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.14);
}

.admin-health-service-row.warning .admin-health-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.16);
}

.admin-health-service-row.error .admin-health-status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.14);
}

.admin-health-service-row.neutral .admin-health-status-dot {
  background: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.13);
}

.admin-health-service-main {
  min-width: 0;
}

.admin-health-service-main strong {
  display: block;
  color: #0f172a;
  font-size: 0.98rem;
  line-height: 1.25;
}

.admin-health-service-main p {
  margin: 4px 0 0;
  color: #475569;
  line-height: 1.45;
}

.admin-health-service-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.admin-health-service-meta small {
  color: #64748b;
  font-weight: 800;
}

.admin-health-detail-panel {
  position: sticky;
  top: 18px;
  min-width: 0;
  display: grid;
  gap: 14px;
  border-top: 4px solid #2563eb;
}

.admin-health-detail-panel.success {
  border-top-color: #16a34a;
  background: linear-gradient(145deg, #f0fdf4, #ffffff);
}

.admin-health-detail-panel.warning {
  border-top-color: #f59e0b;
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

.admin-health-detail-panel.error {
  border-top-color: #ef4444;
  background: linear-gradient(145deg, #fef2f2, #ffffff);
}

.admin-health-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-health-detail-header h3 {
  margin: 4px 0 0;
  color: #0f172a;
}

.admin-health-detail-block {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.admin-health-detail-block span {
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-health-detail-block p {
  margin: 0;
  color: #334155;
  line-height: 1.5;
}

.admin-health-detail-action {
  justify-self: start;
  margin-top: 4px;
}

.admin-health-detail-block small {
  color: #64748b;
  line-height: 1.45;
}

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

.admin-service-grid.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-service-card,
.admin-module-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

button.admin-service-card {
  width: 100%;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button.admin-service-card:hover,
button.admin-service-card:focus-visible {
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.admin-service-card strong,
.admin-service-card span,
.admin-module-card strong,
.admin-module-card p {
  display: block;
}

.admin-service-card span,
.admin-module-card p {
  margin: 5px 0 0;
  color: #64748b;
}

.admin-service-card.success {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.admin-service-card.warning {
  border-color: rgba(245, 158, 11, 0.32);
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.admin-service-card.error {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(135deg, #fef2f2, #ffffff);
}

.admin-module-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
  gap: 10px;
  margin: 14px 0;
}

.admin-filter-row input,
.admin-filter-row select,
.admin-setting-input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--ink);
}

.admin-settings-workspace {
  display: grid;
  gap: 16px;
}

.admin-settings-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px);
  gap: 18px;
  align-items: center;
  border-color: rgba(37, 99, 235, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94)),
    #ffffff;
}

.admin-settings-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent 38%),
    repeating-linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0 1px, transparent 1px 18px);
}

.admin-settings-hero > * {
  position: relative;
  z-index: 1;
}

.admin-settings-hero h3 {
  margin: 4px 0 8px;
  color: #071326;
  font-size: 1.45rem;
}

.admin-settings-hero p {
  max-width: 780px;
  margin: 0;
  color: #53657c;
  line-height: 1.55;
}

.admin-settings-hero-badge {
  display: grid;
  gap: 5px;
  justify-items: center;
  color: inherit;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font: inherit;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.admin-settings-hero-badge:hover,
.admin-settings-hero-badge:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.14);
  outline: none;
}

.admin-settings-hero-badge strong {
  color: #1d4ed8;
  font-size: 2rem;
  line-height: 1;
}

.admin-settings-hero-badge span {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-settings-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-settings-summary-card {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 5px;
  color: inherit;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: left;
  background: #ffffff;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.admin-settings-summary-card:hover,
.admin-settings-summary-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
  outline: none;
}

.admin-settings-summary-card span {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-settings-summary-card strong {
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1;
}

.admin-settings-summary-card small {
  color: #53657c;
}

.admin-settings-summary-card.blue {
  border-left-color: #2563eb;
  background: linear-gradient(145deg, #eff6ff, #ffffff);
}

.admin-settings-summary-card.teal {
  border-left-color: #0d9488;
  background: linear-gradient(145deg, #ecfdf5, #ffffff);
}

.admin-settings-summary-card.green {
  border-left-color: #16a34a;
  background: linear-gradient(145deg, #f0fdf4, #ffffff);
}

.admin-settings-summary-card.amber {
  border-left-color: #f59e0b;
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

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

.admin-setting-group {
  display: grid;
  gap: 14px;
  border-top: 5px solid #2563eb;
}

.admin-setting-group.teal {
  border-top-color: #0d9488;
}

.admin-setting-group.purple {
  border-top-color: #7c3aed;
}

.admin-setting-group.amber {
  border-top-color: #f59e0b;
}

.admin-setting-group.slate {
  border-top-color: #475569;
}

.admin-setting-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-setting-group-head span:not(.admin-pill) {
  color: #0d9488;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-setting-group-head h3 {
  margin: 4px 0 5px;
  color: #0f172a;
  font-size: 1.18rem;
}

.admin-setting-group-head p {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.admin-setting-list {
  display: grid;
  gap: 10px;
}

.admin-setting-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.58fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  padding: 13px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.admin-setting-control:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: #ffffff;
}

.admin-setting-control:focus,
.admin-setting-control.is-highlighted {
  border-color: rgba(13, 148, 136, 0.56);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14), 0 18px 36px rgba(15, 23, 42, 0.08);
}

.admin-setting-control-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-setting-control-copy > div {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.admin-setting-control-copy strong {
  color: #0f172a;
  line-height: 1.25;
}

.admin-setting-control-copy p,
.admin-setting-control-copy small {
  margin: 0;
  color: #64748b;
  line-height: 1.4;
}

.admin-setting-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-setting-type.teal {
  background: #ccfbf1;
  color: #0f766e;
}

.admin-setting-type.purple {
  background: #ede9fe;
  color: #5b21b6;
}

.admin-setting-type.amber {
  background: #fef3c7;
  color: #92400e;
}

.admin-setting-type.slate {
  background: #f1f5f9;
  color: #334155;
}

.admin-setting-control-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-setting-control-editor .admin-setting-input {
  width: 100%;
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-setting-control-editor .admin-setting-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.admin-setting-save {
  min-width: 84px;
  background: linear-gradient(135deg, #0d9488, #2563eb);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.admin-settings-empty {
  display: grid;
  gap: 4px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.88);
}

.admin-settings-empty strong {
  color: #0f172a;
}

.admin-settings-empty span {
  color: #64748b;
}

.admin-pill {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.76rem;
  font-weight: 900;
}

.admin-pill.success {
  background: #dcfce7;
  color: #166534;
}

.admin-pill.error {
  background: #fee2e2;
  color: #991b1b;
}

.admin-pill.warning {
  background: #fef3c7;
  color: #92400e;
}

.admin-pill.neutral {
  background: #f1f5f9;
  color: #334155;
}

.admin-pill.critical {
  background: #fee2e2;
  color: #991b1b;
}

.admin-pill.high {
  background: #ffedd5;
  color: #9a3412;
}

.admin-pill.medium {
  background: #fef3c7;
  color: #92400e;
}

.admin-pill.low,
.admin-pill.informational {
  background: #dbeafe;
  color: #1d4ed8;
}

.admin-stack-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-stack-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
}

.admin-stack-list strong,
.admin-stack-list span {
  display: block;
}

.admin-stack-list span {
  margin-top: 3px;
  color: var(--muted);
}

.compact-panel {
  min-height: 260px;
}

.compact {
  min-height: 34px;
  padding: 7px 10px;
}

.badge.success {
  background: #dcfce7;
  color: #15803d;
}

.badge.warning {
  background: #fef3c7;
  color: #b45309;
}

.badge.error {
  background: #fee2e2;
  color: #b91c1c;
}

.badge.neutral {
  background: #eef2ff;
  color: #3730a3;
}

.admin-users-loading {
  min-height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef4f8 0%, #f8fbfd 48%, #eef4f8 100%);
}

.admin-users-loading.muted {
  opacity: 0.74;
}

.admin-users-loading.short {
  max-width: 62%;
}

.admin-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px;
  color: var(--muted);
}

.admin-empty-state strong {
  color: var(--ink);
}

.admin-user-row {
  cursor: pointer;
}

.admin-user-row:hover td {
  background: #f8fbfd;
}

.admin-user-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-avatar {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0 !important;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #ffffff !important;
  font-size: 0.8rem !important;
  font-weight: 900;
}

.admin-role-chip,
.admin-status-chip,
.admin-user-activity-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.admin-role-chip.admin {
  background: #eef2ff;
  color: #3730a3;
}

.admin-role-chip.analyst {
  background: #ecfeff;
  color: #0e7490;
}

.admin-role-chip.user {
  background: #f1f5f9;
  color: #334155;
}

.admin-role-chip.plan {
  background: #f0fdfa;
  color: #0f766e;
}

.admin-status-chip.active {
  background: #dcfce7;
  color: #15803d;
}

.admin-status-chip.locked {
  background: #fef3c7;
  color: #b45309;
}

.admin-status-chip.disabled {
  background: #fee2e2;
  color: #b91c1c;
}

.admin-user-activity-chip {
  margin-top: 6px;
  background: #fef3c7;
  color: #92400e;
}

.admin-last-login-cell {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.admin-user-badge-row .admin-user-activity-chip,
.admin-last-login-cell .admin-user-activity-chip {
  margin-top: 0;
}

.admin-user-activity-chip.regular {
  background: #dcfce7;
  color: #166534;
}

.admin-user-activity-chip.irregular {
  background: #fef3c7;
  color: #92400e;
}

.admin-lock-note {
  display: block;
  margin-top: 5px;
  color: #b45309;
  font-size: 0.76rem;
}

.admin-row-actions {
  position: relative;
  width: 92px;
}

.admin-kebab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.admin-kebab:hover,
.admin-kebab:focus-visible {
  border-color: rgba(20, 184, 166, 0.42);
  color: #0f766e;
  outline: none;
}

.admin-user-menu {
  position: absolute;
  top: 40px;
  right: 12px;
  z-index: 30;
  width: 176px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.admin-user-menu button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  font-weight: 800;
}

.admin-user-menu button:hover,
.admin-user-menu button:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.admin-user-menu button.danger {
  color: #b91c1c;
}

.admin-user-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
}

.admin-user-pagination strong {
  color: var(--ink);
}

.admin-user-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-user-page-controls select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #ffffff;
  color: var(--ink);
}

.admin-user-drawer {
  position: fixed;
  top: 82px;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  width: min(440px, calc(100vw - 36px));
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 75px rgba(15, 23, 42, 0.22);
}

.admin-user-drawer[hidden] {
  display: none;
}

.admin-user-drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-user-drawer-header h3 {
  margin: 4px 0 4px;
}

.admin-user-drawer-header p {
  margin: 0;
  color: var(--muted);
}

.admin-drawer-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
}

.admin-user-badge-row,
.admin-user-drawer-actions,
.admin-user-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.admin-user-detail-section {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.admin-user-detail-section h4,
.admin-user-action-panel h4 {
  margin: 0 0 10px;
}

.admin-user-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 9px 12px;
  color: var(--muted);
}

.admin-user-detail-grid strong {
  color: var(--ink);
}

.admin-user-action-panel {
  margin-top: 16px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: #eefcf8;
}

.admin-user-action-panel.danger {
  border-color: #fecaca;
  background: #fff1f1;
}

.admin-user-action-panel p {
  margin: 0 0 12px;
  color: #53657c;
}

.admin-user-action-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.admin-user-action-panel select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
}

@media (max-width: 1100px) {
  .administration-workspace.active {
    grid-template-columns: 1fr;
  }

  .admin-shell-sidebar {
    position: static;
    height: auto;
    overflow: visible;
  }

  .admin-shell-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    padding-right: 0;
  }

  .admin-metric-grid,
  .admin-card-grid,
  .admin-knowledge-metric-grid,
  .admin-health-summary-grid,
  .admin-settings-summary-grid,
  .admin-service-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-health-hero {
    grid-template-columns: 1fr;
  }

  .admin-health-main-grid {
    grid-template-columns: 1fr;
  }

  .admin-setting-control {
    grid-template-columns: 1fr;
  }

  .admin-health-detail-panel {
    position: static;
  }

  .admin-grid.two {
    grid-template-columns: 1fr;
  }

  .admin-security-vertical-layout,
  .admin-audit-vertical-layout {
    grid-template-columns: 1fr;
  }

  .admin-security-rail,
  .admin-audit-rail {
    position: static;
  }

  .admin-security-rail-list,
  .admin-audit-rail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-security-rail-item.active::after,
  .admin-audit-rail-item.active::after {
    display: none;
  }

  .admin-audit-table {
    min-width: 760px;
  }
}

@media (max-width: 760px) {
  .admin-shell-main {
    padding: 18px;
  }

  .admin-shell-header,
  .admin-header-actions,
  .admin-module-card {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-shell-nav,
  .admin-metric-grid,
  .admin-card-grid,
  .admin-health-summary-grid,
  .admin-settings-summary-grid,
  .admin-service-grid,
  .admin-service-grid.wide,
  .admin-filter-row,
  .admin-knowledge-filter-row,
  .admin-audit-filter-row {
    grid-template-columns: 1fr;
  }

  .admin-knowledge-pagination,
  .admin-audit-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-security-rail-list,
  .admin-audit-rail-list {
    grid-template-columns: 1fr;
  }

  .admin-health-service-row {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .admin-settings-hero,
  .admin-setting-control-editor {
    grid-template-columns: 1fr;
  }

  .admin-settings-hero-badge,
  .admin-setting-save {
    justify-items: start;
    width: 100%;
  }

  .admin-health-service-meta {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }

  .admin-health-actions {
    justify-content: flex-start;
  }

  .admin-audit-table-wrap {
    overflow-x: visible;
  }

  .admin-audit-table {
    min-width: 0;
  }

  .admin-audit-table thead {
    display: none;
  }

  .admin-audit-table,
  .admin-audit-table tbody,
  .admin-audit-table tr,
  .admin-audit-table td {
    display: block;
    width: 100%;
  }

  .admin-audit-table td:nth-child(1),
  .admin-audit-table td:nth-child(2),
  .admin-audit-table td:nth-child(3),
  .admin-audit-table td:nth-child(4),
  .admin-audit-table td:nth-child(5) {
    width: 100%;
  }

  .admin-audit-table tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    padding: 10px 0;
  }

  .admin-audit-table tr:last-child {
    border-bottom: 0;
  }

  .admin-audit-table td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border-bottom: 0;
    padding: 8px 12px;
  }

  .admin-audit-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
}

.dashboard-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  width: max-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.75rem;
  font-weight: 900;
}

.dashboard-status-chip.tone-critical {
  background: rgba(239, 68, 68, 0.18);
  color: #ffb4b4;
}

.dashboard-status-chip.tone-high {
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
}

.dashboard-status-chip.tone-medium {
  background: rgba(250, 204, 21, 0.18);
  color: #fde68a;
}

.dashboard-status-chip.tone-low {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

.dashboard-status-chip.tone-neutral {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.dashboard-activity-list {
  display: grid;
  gap: 12px;
}

.dashboard-activity-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 8px;
  background: transparent;
  color: #fde68a;
  padding: 10px;
  box-shadow: inset 3px 0 0 rgba(250, 204, 21, 0.55);
}

.dashboard-activity-item i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.dashboard-activity-item strong,
.dashboard-activity-item small,
.dashboard-activity-item em {
  display: block;
}

.dashboard-activity-item strong {
  color: #fbbf24;
  font-size: 0.84rem;
  font-weight: 950;
}

.dashboard-activity-item small,
.dashboard-activity-item em {
  color: #fde68a;
  font-size: 0.78rem;
}

.dashboard-activity-item em {
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  color: #fef3c7;
  font-style: normal;
  font-weight: 900;
  padding: 4px 8px;
  white-space: nowrap;
}

.dashboard-triage-detail {
  gap: 14px;
}

.dashboard-triage-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  border: 1px solid rgba(126, 164, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 17, 32, 0.72);
  padding: 16px;
}

.dashboard-triage-card span,
.dashboard-triage-card p,
.dashboard-triage-section li {
  color: rgba(213, 226, 255, 0.7);
}

.dashboard-triage-card h4,
.dashboard-triage-section h4 {
  margin: 5px 0 8px;
  color: #ffffff;
}

.dashboard-triage-card p {
  margin: 0;
  line-height: 1.55;
}

.dashboard-triage-facts {
  display: grid;
  gap: 8px;
  min-width: min(280px, 100%);
}

.dashboard-triage-facts span {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(126, 164, 255, 0.12);
  border-radius: 8px;
  background: rgba(12, 28, 51, 0.72);
  padding: 10px 12px;
}

.dashboard-triage-facts strong {
  color: #ffffff;
}

.dashboard-triage-section {
  border: 1px solid rgba(126, 164, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 17, 32, 0.64);
  padding: 14px;
}

body.dashboard-view-active .tag {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(96, 165, 250, 0.12);
  color: #cfe0ff;
}

body.dashboard-view-active .muted,
body.dashboard-view-active .muted-box {
  color: rgba(213, 226, 255, 0.68);
}

body.dashboard-view-active .muted-box {
  border-color: rgba(126, 164, 255, 0.14);
  background: rgba(7, 17, 32, 0.72);
}

body.dashboard-view-active ol {
  margin: 8px 0 0;
  padding-left: 22px;
}

body.dashboard-view-active li + li {
  margin-top: 5px;
}

@media (max-width: 1320px) {
  .dashboard-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #dashboard-alert-trend,
  #dashboard-severity-panel,
  .dashboard-card-tall,
  #dashboard-techniques,
  #dashboard-indicators,
  #dashboard-category-panel,
  #dashboard-recent-incidents,
  #dashboard-assets,
  #dashboard-activity {
    grid-column: span 6;
  }
}

@media (max-width: 980px) {
  body.dashboard-view-active .shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .dashboard-command-bar,
  .dashboard-welcome-row,
  .dashboard-triage-card {
    grid-template-columns: 1fr;
  }

  .dashboard-command-bar,
  .dashboard-welcome-row {
    align-items: stretch;
  }

  .dashboard-top-widgets,
  .dashboard-controls {
    justify-content: flex-start;
  }

  .dashboard-metrics,
  .dashboard-donut-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboard-alert-trend,
  #dashboard-severity-panel,
  .dashboard-card-tall,
  #dashboard-techniques,
  #dashboard-indicators,
  #dashboard-category-panel,
  #dashboard-recent-incidents,
  #dashboard-assets,
  #dashboard-activity {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body.dashboard-view-active .main {
    padding: 14px;
  }

  body.dashboard-view-active .topbar {
    margin: -14px -14px 14px;
    padding: 12px 14px;
  }

  .dashboard-metrics,
  .dashboard-donut-layout,
  .dashboard-bar-row,
  .dashboard-activity-item,
  .dashboard-drawer-row {
    grid-template-columns: 1fr;
  }

  .dashboard-controls,
  .dashboard-top-widgets {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-controls button,
  .dashboard-controls select,
  .dashboard-top-pill {
    width: 100%;
  }

  .dashboard-table > div {
    min-width: 620px;
  }
}

#report-output {
  min-height: 420px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

@media (max-width: 1240px) {
  body.chat-view-active .chat-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  body.chat-view-active .conversation-sidebar {
    min-height: auto;
  }

  body.chat-view-active .conversation-list {
    max-height: 300px;
  }

  body.chat-view-active .chat-main-panel {
    min-height: 560px;
  }
}

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

  .sidebar {
    position: sticky;
    padding: 22px 10px;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .brand {
    padding: 0 10px;
  }

  .brand strong {
    font-size: 1.18rem;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-logo img {
    width: 38px;
    height: 38px;
  }

  .main {
    padding: 28px 24px;
  }

  .grid.two,
  .metrics,
  .incident-mvp-steps,
  .incident-decision-grid,
  .incident-metrics,
  .incident-progress-strip,
  .incident-finding-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-workspace {
    grid-template-columns: 1fr;
  }

  .vuln-layout {
    grid-template-columns: 1fr;
  }

  .vuln-result-grid {
    grid-template-columns: 1fr;
  }

  .incident-guided-grid {
    grid-template-columns: 1fr;
  }

  .incident-composer {
    grid-template-columns: 1fr;
  }

  .incident-composer-main {
    padding-right: 0;
    border-right: 0;
  }

  .incident-stepper::before,
  .incident-stepper::after {
    display: none;
  }

  #incident-view .section-title {
    min-height: auto;
    padding: 24px;
  }

  .incident-stepper {
    padding: 14px;
  }

  .incident-step {
    min-height: 96px;
  }

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

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

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

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: static;
    min-height: auto;
    gap: 18px;
  }

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

@media (max-width: 640px) {
  .landing-header,
  .landing-content,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .knowledge-document-card {
    grid-template-columns: 1fr;
  }

  .knowledge-card-title-row,
  .knowledge-detail-section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-card-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .landing-content {
    min-height: calc(100vh - 78px);
    padding: 32px 0 54px;
  }

  .landing h1 {
    font-size: clamp(2.25rem, 14vw, 3.45rem);
    line-height: 1;
  }

  .landing-actions,
  .landing-button {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-copy {
    flex-direction: column;
  }

  .info-section {
    padding: 20px;
  }

  .profile-preview {
    align-items: flex-start;
    flex-direction: column;
  }

  .main,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .section-title,
  .vuln-header,
  .incident-workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .nav,
  .metrics,
  .knowledge-metrics,
  .knowledge-metrics article,
  .ai-status-grid,
  .config-grid,
  .finding-grid,
  .grid.two,
  .knowledge-workspace,
  .knowledge-toolbar,
  .knowledge-detail-grid,
  .retrieval-grid,
  .vuln-result-grid,
  .vuln-stat-grid,
  .incident-metrics,
  .incident-mvp-steps,
  .incident-decision-grid,
  .incident-decision-impact,
  .incident-investigation-grid,
  .incident-progress-strip,
  .incident-analyst-path,
  .incident-finding-grid,
  .incident-finding-values,
  .incident-resolution-grid,
  .incident-final-validation-form,
  .incident-summary-columns,
  .incident-guidance-preview,
  .incident-guided-grid,
  .incident-composer,
  .incident-two-fields,
  .incident-create-grid,
  .incident-overview-grid,
  .incident-summary-grid,
  .upload-meta-grid,
  .intel-hero,
  .intel-answer-grid,
  .term-row,
  .chat-form,
  .actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .incident-summary-head,
  .incident-check-card,
  .incident-next-recommendation,
  .incident-task-head {
    flex-direction: column;
  }

  .incident-check-status,
  .incident-task-status,
  .incident-recommendation-priority {
    align-self: flex-start;
  }

  .knowledge-tabs {
    gap: 10px;
  }

  .knowledge-tab {
    min-height: 38px;
    font-size: 0.84rem;
  }

  .knowledge-history-item,
  .knowledge-citation-card summary {
    grid-template-columns: 1fr;
  }

  .incident-filters,
  .incident-inline-form,
  .incident-header-actions,
  .incident-status-actions,
  .incident-summary-edit,
  .incident-simple-action,
  .incident-form-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .incident-phase-toolbar,
  .incident-action-control,
  .incident-execution-bulk,
  .incident-resolution-head {
    align-items: stretch;
    flex-direction: column;
  }

  .incident-phase-toolbar > div,
  .incident-action-control > div,
  .incident-action-control button,
  .incident-phase-toolbar button,
  .incident-execution-bulk button {
    width: 100%;
  }

  .incident-stepper {
    padding: 18px;
  }

  .incident-step {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 82px;
    padding: 12px;
  }

  .incident-step-number {
    width: 42px;
    height: 42px;
  }

  .incident-step small {
    font-size: 0.76rem;
  }

  .incident-analyze-button {
    width: 100%;
  }

  .vuln-title-row {
    align-items: flex-start;
  }

  .vuln-header-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .vuln-input-panel,
  .vuln-result-panel,
  .vuln-history-panel {
    padding: 14px;
  }

  .vuln-empty-state {
    min-height: 260px;
  }

  .vuln-meta-card {
    grid-template-columns: 1fr;
  }

  .vuln-meta-card div,
  .vuln-meta-card div:nth-child(odd) {
    border-right: 0;
  }

  .chat-workspace,
  .chat-main-header,
  .persistent-chat .chat-form {
    grid-template-columns: 1fr;
  }

  .conversation-sidebar {
    min-height: auto;
  }

  .conversation-list {
    max-height: 260px;
  }

  .chat-main-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .upload-table,
  .upload-table thead,
  .upload-table tbody,
  .upload-table tr,
  .upload-table td {
    display: block;
    width: 100%;
  }

  .upload-table thead {
    display: none;
  }

  .upload-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 10px;
    padding: 8px;
  }

  .upload-table td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 8px;
    border-bottom: 0;
    padding: 6px 2px;
  }

  .upload-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .table-actions,
  .hash-actions {
    margin-top: 0;
  }

  .knowledge-tabs,
  .knowledge-pagination,
  .knowledge-service-status,
  .knowledge-page-actions,
  .knowledge-page-controls,
  .source-card-title {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-tabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .knowledge-tab,
  .knowledge-pagination button {
    width: 100%;
  }

  .knowledge-document-cell {
    grid-template-columns: 1fr;
  }

  .knowledge-page-size-label {
    margin-left: 0;
  }
}

@media (max-width: 1240px) {
  .intel-command-bar,
  .intel-detail-header,
  .intel-layout,
  .intel-overview-grid,
  .intel-summary-card-grid,
  .intel-evidence-grid {
    grid-template-columns: 1fr;
  }

  .intel-category-card {
    grid-column: auto;
  }

  .intel-header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .intel-command-bar,
  .intel-search,
  .intel-detail-header,
  .intel-layout,
  .intel-overview-grid,
  .intel-two-column,
  .intel-empty-grid,
  .intel-donut-row,
  .intel-summary-card-grid,
  .intel-evidence-grid,
  .intel-domain-grid {
    grid-template-columns: 1fr;
  }

  .intel-console {
    min-height: auto;
  }

  .intel-empty-state,
  .intel-output {
    min-height: 360px;
  }

  .intel-inline-stats div {
    min-width: 50%;
    padding: 10px 12px;
  }

  .intel-provider-table-wrap {
    display: none;
  }

  .intel-provider-table-wrap + .intel-provider-list {
    display: grid;
  }

  .intel-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .intel-tabs button {
    justify-content: flex-start;
    text-align: left;
    border-right: 0;
  }

  .intel-header-actions,
  .intel-review-tray div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .intel-header-actions button,
  .intel-review-tray button,
  .intel-quick-actions button {
    width: 100%;
  }
}

@media (max-width: 1180px) {
  .billing-layout,
  .billing-plan-grid {
    grid-template-columns: 1fr;
  }

  #analyzer-view .log-analysis-shell,
  .log-result-hero {
    grid-template-columns: 1fr;
  }

  #analyzer-view .log-analysis-summary-grid,
  #analyzer-view .log-kpi-grid,
  #analyzer-view .log-analysis-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #analyzer-view .log-analysis-history {
    max-height: none;
  }
}

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

  .billing-actions button,
  .billing-plan-card button {
    width: 100%;
  }

  #analyzer-view {
    padding: 12px;
  }

  #analyzer-view .log-panel-title,
  #analyzer-view .log-analysis-actions,
  #analyzer-view .log-analysis-result-actions,
  #analyzer-view .log-source-row,
  #analyzer-view .log-analysis-summary-grid,
  #analyzer-view .log-kpi-grid,
  #analyzer-view .log-analysis-facts,
  .log-signal-chart {
    grid-template-columns: 1fr;
  }

  #analyzer-view .log-panel-title,
  .log-title-lockup {
    align-items: flex-start;
  }

  #analyzer-view .log-analysis-actions button,
  #analyzer-view .log-analysis-result-actions button {
    width: 100%;
  }

  .log-result-hero {
    padding: 16px;
  }

  .log-risk-gauge {
    justify-self: center;
  }

  #analyzer-view .log-analysis-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  #analyzer-view .log-analysis-tabs button {
    justify-content: space-between;
    border-right: 0;
    text-align: left;
  }

  #analyzer-view .log-upload-box,
  #analyzer-view .log-mitre-card {
    grid-template-columns: 1fr;
  }

  #analyzer-view .log-upload-box input {
    grid-column: auto;
  }
}

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

  .administration-layout {
    grid-template-columns: 1fr;
  }

  .knowledge-document-card-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .compact-knowledge-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-card-title-row,
  .knowledge-selected-head,
  .knowledge-answer-head,
  .knowledge-citation-title-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .knowledge-card-title-group {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .knowledge-file-icon {
    width: 38px;
    height: 38px;
  }

  .knowledge-card-actions,
  .knowledge-ask-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .knowledge-overflow {
    margin-left: 0;
  }

  .knowledge-overflow-trigger {
    width: 100%;
  }

  .knowledge-overflow-menu {
    right: auto;
    left: 0;
    bottom: calc(100% + 8px);
    width: 100%;
  }

  .knowledge-context-questions,
  .knowledge-evidence-grid {
    grid-template-columns: 1fr;
  }
}

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

  .compact-knowledge-metrics,
  .knowledge-toolbar {
    grid-template-columns: 1fr;
  }

  .knowledge-toast {
    top: 16px;
    right: 16px;
  }
}
