:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #1e3a8a;
  --primary-soft: #dbeafe;
  --accent: #2563eb;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #15803d;
  --radius: 18px;
  --shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body,
input,
button,
select,
textarea {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", Tahoma, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 82px;
}

.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
}

.topbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand-block {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.icon-button {
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.hero-card {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: white;
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  opacity: 0.8;
}

.hero-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.hero-text {
  margin: 10px 0 0;
  color: #dbeafe;
  line-height: 1.45;
}

.section-title {
  margin: 24px 0 12px;
  font-size: 18px;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  min-height: 72px;
}

.quick-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
  flex: 0 0 auto;
}

.quick-title {
  font-weight: 800;
}

.quick-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  font-size: 30px;
  font-weight: 900;
  margin-top: 6px;
}

.feed {
  display: grid;
  gap: 12px;
}

.feed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.feed-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.feed-title {
  font-weight: 800;
}

.feed-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge-success {
  color: #166534;
  background: #dcfce7;
}

.badge-warning {
  color: #92400e;
  background: #fef3c7;
}

.badge-danger {
  color: #991b1b;
  background: #fee2e2;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 7px 8px;
}

.bottom-link {
  text-decoration: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 12px;
  border-radius: 14px;
}

.bottom-link strong {
  font-size: 18px;
  line-height: 1;
}

.bottom-link.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.login-brand {
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 18px;
}

.login-card h1 {
  margin: 0 0 8px;
}

.login-subtitle,
.login-footnote {
  color: var(--muted);
}

.login-card label {
  display: block;
  font-weight: 700;
  margin: 16px 0;
}

.login-card input {
  width: 100%;
  margin-top: 7px;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font-size: 16px;
}

.login-card button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
}

.logout-form {
  margin: 0;
}

.logout-button {
  border: 1px solid var(--border);
  background: white;
  border-radius: 14px;
  min-height: 44px;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

@media (min-width: 720px) {
  .page {
    padding: 26px;
  }

  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-title {
    font-size: 32px;
  }
}

@media (min-width: 1100px) {
  .app-shell {
    padding-bottom: 0;
  }

  .bottom-nav {
    max-width: 1180px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  .page {
    padding-bottom: 112px;
  }
}


.incident-create-shell {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 34rem),
    linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
}

.incident-create-page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 112px;
}

.create-hero {
  display: grid;
  gap: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #2563eb 100%);
  color: #ffffff;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.20);
  margin-bottom: 18px;
}

.create-eyebrow {
  margin: 0 0 8px;
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.create-hero h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.create-hero p {
  margin: 10px 0 0;
  color: #dbeafe;
  line-height: 1.55;
}

.create-status-card {
  justify-self: start;
  min-width: 148px;
  border: 1px solid rgba(219, 234, 254, 0.30);
  background: rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: 14px;
}

.create-status-card span,
.create-status-card small {
  display: block;
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
}

.create-status-card strong {
  display: block;
  margin: 3px 0;
  font-size: 22px;
}

.form-errors {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.form-errors h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.form-errors ul {
  margin: 0;
  padding-left: 20px;
}

.create-form {
  display: grid;
  gap: 18px;
}

.create-section {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.create-section-urgent {
  border-color: #fecaca;
}

.create-section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf2f7;
  margin-bottom: 16px;
}

.section-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 950;
  font-size: 13px;
}

.create-section-urgent .section-number {
  background: #fee2e2;
  color: #991b1b;
}

.create-section-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.create-section-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.emergency-callout,
.upload-placeholder {
  display: grid;
  gap: 4px;
  border-radius: 18px;
  padding: 14px 16px;
  line-height: 1.5;
  font-size: 14px;
  margin-bottom: 16px;
}

.emergency-callout {
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #7f1d1d;
}

.upload-placeholder {
  border: 1px dashed #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}

.create-grid {
  display: grid;
  gap: 14px;
}

.create-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.create-field:last-child {
  margin-bottom: 0;
}

.create-field span,
.checkbox-line span {
  color: #111827;
  font-size: 14px;
  font-weight: 850;
}

.create-field b {
  color: #dc2626;
}

.create-field em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.create-field input,
.create-field select,
.create-field textarea {
  appearance: none;
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  padding: 12px 13px;
  font-size: 15px;
  line-height: 1.4;
}

.create-field select:not([multiple]) {
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.create-field select[multiple] {
  min-height: 132px;
}

.create-field textarea {
  min-height: 112px;
  resize: vertical;
}

.create-field input:focus,
.create-field select:focus,
.create-field textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

.create-field input::placeholder,
.create-field textarea::placeholder {
  color: #94a3b8;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
}

.create-actions {
  position: sticky;
  bottom: 84px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}

.cancel-action,
.draft-action,
.submit-action {
  min-height: 50px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.cancel-action {
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #1e3a8a;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.draft-action {
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}

.submit-action {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

@media (min-width: 760px) {
  .incident-create-page {
    padding: 28px 26px 126px;
  }

  .create-hero {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 30px;
  }

  .create-hero h2 {
    font-size: 38px;
  }

  .create-section {
    padding: 24px;
  }

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

  .create-actions {
    grid-template-columns: 160px 180px 1fr;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 1100px) {
  .create-form {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
  }
}


.taxonomy-priority-row {
  margin-bottom: 16px;
}

.taxonomy-priority-row .create-field {
  margin-bottom: 0;
}

@media (min-width: 760px) {
  .create-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


.safety-screening-row {
  align-items: end;
}

.safety-screening-row .create-field {
  margin-bottom: 0;
}

@media (min-width: 760px) {
  .safety-screening-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


@media (max-width: 560px) {
  .login-page {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
  }

  .login-card {
    width: 100%;
    max-width: none;
    padding: 30px 22px;
    border-radius: 26px;
  }

  .login-brand {
    font-size: 18px;
    margin-bottom: 22px;
  }

  .login-card h1 {
    font-size: 30px;
    line-height: 1.12;
  }

  .login-subtitle,
  .login-footnote {
    font-size: 15px;
    line-height: 1.45;
  }

  .login-card label {
    font-size: 15px;
    margin: 18px 0;
  }

  .login-card input {
    min-height: 54px;
    font-size: 17px;
    padding: 14px;
  }

  .login-card button {
    min-height: 56px;
    font-size: 17px;
  }
}


.create-grid.two {
  align-items: start;
}

.create-grid.two .create-field {
  margin-bottom: 0;
}

.create-section .create-grid.two {
  margin-bottom: 18px;
}

.create-section > .create-field {
  margin-top: 4px;
}

.create-field textarea {
  display: block;
  width: 100%;
}

.create-actions {
  bottom: 88px;
}

@media (max-width: 759px) {
  .create-section .create-grid.two {
    gap: 16px;
  }

  .create-grid.two .create-field {
    margin-bottom: 0;
  }

  .create-actions {
    bottom: 78px;
  }
}


@media (max-width: 640px) {
  body:has(.login-page) {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
  }

  .login-page {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100dvh !important;
    width: 100% !important;
    padding: 16px !important;
  }

  .login-card {
    width: min(100%, 430px) !important;
    max-width: none !important;
    padding: 34px 24px !important;
    border-radius: 28px !important;
  }

  .login-card h1 {
    font-size: 32px !important;
  }

  .login-card input,
  .login-card button {
    min-height: 56px !important;
    font-size: 17px !important;
  }
}


.checkbox-grid {
  display: grid;
  gap: 10px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 750;
}

.checkbox-grid input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

@media (min-width: 760px) {
  .checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.compact-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-check-grid label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

.compact-check-grid input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .compact-check-grid {
    gap: 7px;
  }

  .compact-check-grid label {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12.5px;
  }
}

.compact-check-grid {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 8px 16px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #f8fafc;
}

.compact-check-grid label {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #111827;
}

.compact-check-grid input {
  width: 16px !important;
  height: 16px !important;
  margin: 0;
  flex: 0 0 auto;
}

@media (min-width: 760px) {
  .compact-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.compact-check-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 8px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.compact-check-grid label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 30px !important;
  padding: 5px 9px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 12.5px !important;
  font-weight: 750 !important;
  line-height: 1.1 !important;
}

.compact-check-grid input {
  width: 13px !important;
  height: 13px !important;
  min-height: 13px !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  accent-color: #2563eb;
}

.compact-check-grid input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  flex: 0 0 auto !important;
}

.compact-check-grid label {
  cursor: pointer;
  user-select: none;
}

.incident-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.small-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.small-action.primary {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
}

.detail-grid {
  display: grid;
  gap: 18px;
}

.detail-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-page .feed-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 24px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.detail-page .feed-card:hover {
  border-color: #b8cbe0;
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.detail-page .section-title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
  color: #111827;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.detail-list {
  display: grid;
  gap: 0;
}

.detail-list dt {
  padding: 13px 0 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  padding: 0 0 13px;
  border-bottom: 1px solid #eef3f8;
  color: #0f172a;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
}

.detail-list dd:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-text {
  margin: 0;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fbff;
  color: #0f172a;
  line-height: 1.7;
}

.detail-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 800;
}

.detail-notes-block,
.timeline-reference {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fbff;
}

.detail-notes-block h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #1e3a8a;
}

.detail-notes-block p,
.timeline-reference {
  color: #475569;
  line-height: 1.6;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid #dbe3ef;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.timeline-item:hover {
  border-color: #b8cbe0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.timeline-item strong {
  color: #1e3a8a;
  font-size: 15px;
}

.timeline-item span {
  color: #64748b;
  font-size: 13px;
}

.timeline-item pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}

.audit-dropdown {
  display: grid;
  gap: 16px;
}

.audit-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
}

.audit-dropdown summary::-webkit-details-marker {
  display: none;
}

.audit-dropdown summary span {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.audit-dropdown summary small {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 900;
}

.audit-dropdown summary::after {
  content: "Show";
  min-width: 58px;
  text-align: center;
  padding: 7px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 900;
}

.audit-dropdown[open] summary {
  padding-bottom: 14px;
  border-bottom: 1px solid #edf2f7;
}

.audit-dropdown[open] summary::after {
  content: "Hide";
  background: #f8fafc;
}

@media (min-width: 760px) {
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-list {
    grid-template-columns: minmax(150px, 190px) 1fr;
    column-gap: 18px;
  }

  .detail-list dt,
  .detail-list dd {
    padding-top: 13px;
    padding-bottom: 13px;
    border-bottom: 1px solid #eef3f8;
  }
}

.login-card {
  width: min(92vw, 430px);
  padding: 26px 28px 28px;
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 2px;
  line-height: 0;
}

.login-brand picture {
  display: block;
  line-height: 0;
}

.login-brand-image {
  display: block;
  width: min(100%, 300px);
  height: auto;
  margin: 0 auto;
}

.login-card h1 {
  margin: 0 0 8px;
  text-align: center;
  color: #071a3a;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.login-card h1::after {
  display: none;
}

.login-card p {
  max-width: none;
  margin: 0 0 18px;
  text-align: left;
  color: #64748b;
  font-size: 16px;
  line-height: 1.5;
}

.login-card label {
  margin-top: 12px;
  color: #071a3a;
  font-weight: 900;
}

.login-card input {
  min-height: 46px;
  background: #ffffff;
}

.login-card button {
  min-height: 50px;
  margin-top: 16px;
}

@media (min-width: 760px) {
  .login-card {
    width: 470px;
    padding: 30px 42px 32px;
  }

  .login-brand-image {
    width: min(100%, 370px);
  }
}
.topbar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-action:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
.internal-note-form {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.internal-note-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  background: #ffffff;
  resize: vertical;
  font-size: 15px;
  line-height: 1.6;
}

.internal-note-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.internal-notes-list {
  display: grid;
  gap: 14px;
}

.internal-note-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid #dbe3ef;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.internal-note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.internal-note-meta strong {
  color: #1e3a8a;
  font-size: 14px;
}

.internal-note-meta span {
  color: #64748b;
  font-size: 12px;
}

.internal-note-card p {
  margin: 0;
  color: #334155;
  line-height: 1.7;
}
.evidence-upload-form {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.evidence-upload-box,
.evidence-description {
  display: grid;
  gap: 7px;
}

.evidence-upload-box {
  padding: 16px;
  border: 1px dashed #93c5fd;
  border-radius: 18px;
  background: #eff6ff;
}

.evidence-upload-box span,
.evidence-description span {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.evidence-upload-box small {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.evidence-description textarea {
  width: 100%;
  min-height: 104px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  font-size: 15px;
  resize: vertical;
}

.evidence-file-choice {
  display: grid;
  gap: 12px;
}

.evidence-choice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, background 150ms ease;
}

.evidence-choice-card:hover {
  transform: translateY(-1px);
  border-color: #60a5fa;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.1);
}

.evidence-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.evidence-choice-icon {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 22px;
}

.evidence-choice-title {
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 950;
}

.evidence-choice-card small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.evidence-file-upload-choice {
  display: grid;
}

@media (min-width: 760px) {
  .evidence-photo-choice {
    display: none !important;
  }

  .evidence-file-upload-choice {
    display: grid !important;
  }

  .evidence-file-choice {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 759px) {
  .evidence-photo-choice,
  .evidence-file-upload-choice {
    display: grid !important;
  }
}

.evidence-file-icon {
  width: 48px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.evidence-file-icon span {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.evidence-file-icon-image {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
}

.evidence-file-icon-video {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  color: #5b21b6;
}

.evidence-file-icon-audio {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #047857;
}

.evidence-file-icon-pdf {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff1f2 0%, #fee2e2 100%);
  color: #991b1b;
}

.evidence-file-icon-document {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
}

.evidence-file-icon-generic {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  color: #334155;
}

.evidence-library {
  display: grid;
  gap: 10px;
}

.evidence-library-head {
  display: none;
}

.evidence-library-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.evidence-library-type {
  grid-row: span 4;
}

.evidence-library-description {
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}

.evidence-library-date,
.evidence-library-access {
  display: grid;
  gap: 3px;
  color: #334155;
  font-size: 12px;
}

.evidence-library-date small,
.evidence-library-access small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}

.evidence-library-access {
  font-weight: 800;
}

.evidence-library-action {
  margin-top: 2px;
}

.evidence-download-action {
  width: fit-content;
}

@media (min-width: 900px) {
  .evidence-library {
    gap: 0;
    border: 1px solid #dbe3ef;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
  }

  .evidence-library-head,
  .evidence-library-row {
    display: grid;
    grid-template-columns: 72px minmax(340px, 1.8fr) 150px 130px 112px;
    align-items: center;
  }

  .evidence-library-head {
    padding: 12px 14px;
    background: #f8fbff;
    border-bottom: 1px solid #dbe3ef;
  }

  .evidence-library-head span {
    color: #64748b;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .evidence-library-row {
    gap: 12px;
    padding: 14px;
    border: 0;
    border-bottom: 1px solid #eef3f8;
    border-radius: 0;
    background: #ffffff;
  }

  .evidence-library-row:last-child {
    border-bottom: 0;
  }

  .evidence-library-row:hover {
    background: #f8fbff;
  }

  .evidence-library-type {
    grid-row: auto;
  }

  .evidence-file-icon {
    width: 44px;
    height: 52px;
  }

  .evidence-library-action {
    margin-top: 0;
  }
}

.audit-case-reference {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 950;
  vertical-align: middle;
}

.timeline-reference {
  margin-top: 4px;
  padding: 9px 11px;
  font-size: 13px;
}
.evidence-library-size {
  display: grid;
  gap: 3px;
}

.evidence-library-size small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}
.evidence-library-access {
  display: grid;
  gap: 3px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.evidence-library-access small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
@media (min-width: 900px) {
  .evidence-library-head,
  .evidence-library-row {
    grid-template-columns: 72px minmax(340px, 1.8fr) 150px 130px 112px;
  }
}
.evidence-library-date {
  display: grid;
  gap: 3px;
}

.evidence-library-date small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}

.evidence-access-history {
    margin-top: 0.5rem;
}

.evidence-access-history summary {
    cursor: pointer;
    font-size: 0.8rem;
    color: #475569;
}

.evidence-access-history-list {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.evidence-access-history-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    font-size: 0.8rem;
}

.evidence-history-open {
    margin-top: 0.45rem;
    width: 100%;
    text-align: center;
}

.evidence-access-history-dialog {
    width: min(92vw, 520px);
    max-height: 82vh;
    border: 0;
    border-radius: 1rem;
    padding: 0;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.evidence-access-history-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.evidence-access-history-modal {
    padding: 1rem;
}

.evidence-access-history-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.evidence-access-history-modal-head h3 {
    margin: 0;
    font-size: 1rem;
}

.evidence-history-close {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 640px) {
    .evidence-access-history-dialog {
        width: 96vw;
        max-height: 86vh;
    }

    .evidence-access-history-modal {
        padding: 0.9rem;
    }
}

.evidence-library-action {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: stretch;
}

.evidence-library-action .small-action,
.evidence-history-open {
    display: block;
    width: 100%;
    min-height: 2.35rem;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.25rem;
}

.evidence-history-open {
    margin-top: 0;
}

@media (max-width: 640px) {
    .evidence-library-action {
        width: 100%;
    }

    .evidence-library-action .small-action,
    .evidence-history-open {
        width: 100%;
    }
}


/* ===== Final incident detail record sections ===== */

.evidence-library-dropdown,
.internal-notes-dropdown,
.audit-records-section .audit-records-dropdown {
    margin-top: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
    padding: 0;
    box-shadow: none;
}

.evidence-library-dropdown > summary,
.internal-notes-dropdown > summary,
.audit-records-section .audit-records-dropdown > summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    width: 100%;
    min-height: 54px;
    padding: 1rem;
    background: #f8fafc;
    border: 0;
    list-style: none;
    cursor: pointer;
    box-sizing: border-box;
}

.evidence-library-dropdown > summary::-webkit-details-marker,
.internal-notes-dropdown > summary::-webkit-details-marker,
.audit-records-section .audit-records-dropdown > summary::-webkit-details-marker {
    display: none;
}

.evidence-library-dropdown > summary span,
.internal-notes-dropdown > summary span,
.audit-records-section .audit-records-dropdown > summary span {
    justify-self: start;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    color: #020617;
}

.evidence-library-dropdown > summary small,
.internal-notes-dropdown > summary small,
.audit-records-section .audit-records-dropdown > summary small {
    justify-self: center;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    color: #64748b;
    background: transparent;
    border: 0;
    padding: 0;
    border-radius: 0;
    text-align: center;
}

.evidence-library-dropdown > summary::after,
.internal-notes-dropdown > summary::after,
.audit-records-section .audit-records-dropdown > summary::after {
    content: "Open";
    justify-self: end;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1e3a8a;
}

.evidence-library-dropdown[open] > summary::after,
.internal-notes-dropdown[open] > summary::after,
.audit-records-section .audit-records-dropdown[open] > summary::after {
    content: "Close";
}

.evidence-library-dropdown .evidence-library,
.internal-notes-dropdown .internal-notes-list,
.audit-records-section .timeline,
.audit-records-section .feed-meta {
    padding: 1rem;
}

.audit-records-section {
    padding: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: none;
    overflow: hidden;
}

.audit-records-section .audit-records-dropdown {
    margin-top: 0;
}

.audit-records-section .audit-case-reference {
    display: none;
}

/* Evidence records */

.evidence-library {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.evidence-library-row {
    display: grid;
    grid-template-columns: 72px minmax(220px, 1fr) minmax(150px, 180px) minmax(150px, 180px);
    gap: 1rem;
    align-items: start;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.evidence-library-head {
    display: grid;
    grid-template-columns: 72px minmax(220px, 1fr) minmax(150px, 180px) minmax(150px, 180px);
    gap: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fafc;
    padding: 0.75rem 1rem;
}

.evidence-library-head span:nth-child(5) {
    display: none;
}

.evidence-library-action {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
    padding: 0.8rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 14px;
}

.evidence-library-action .evidence-action-button {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    min-height: 44px;
    margin: 0;
    padding: 0.65rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #0f2f75;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    line-height: 1.15;
    cursor: pointer;
}

.evidence-access-history-dialog {
    width: min(92vw, 520px);
    max-height: 82vh;
    border: 0;
    border-radius: 1rem;
    padding: 0;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.evidence-access-history-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.evidence-access-history-modal {
    padding: 1rem;
}

.evidence-access-history-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.evidence-access-history-modal-head h3 {
    margin: 0;
    font-size: 1rem;
}

.evidence-history-close {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.evidence-access-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.evidence-access-history-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    font-size: 0.8rem;
}

@media (max-width: 760px) {
    .evidence-library-head {
        display: none;
    }

    .evidence-library-row {
        grid-template-columns: 56px 1fr;
        gap: 0.85rem;
    }

    .evidence-library-type {
        grid-column: 1;
        grid-row: 1;
    }

    .evidence-library-description {
        grid-column: 2;
        grid-row: 1;
    }

    .evidence-library-date,
    .evidence-library-access,
    .evidence-library-action {
        grid-column: 1 / -1;
    }

    .evidence-library-action {
        flex-direction: column;
        width: 100%;
    }

    .evidence-library-action .evidence-action-button {
        width: 100%;
    }

    .evidence-library-dropdown .evidence-library,
    .internal-notes-dropdown .internal-notes-list,
    .audit-records-section .timeline,
    .audit-records-section .feed-meta {
        padding: 0.75rem;
    }
}


/* ===== Case export request card ===== */

.case-export-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.case-export-card-head .section-title {
    margin-bottom: 0.25rem;
}

.case-export-button {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .case-export-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .case-export-button {
        width: 100%;
    }
}

/* ===== Case export request card ===== */

.case-export-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.case-export-card-head .section-title {
    margin-bottom: 0.25rem;
}

.case-export-button {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .case-export-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .case-export-button {
        width: 100%;
    }
}

/* ===== Case export positioned with audit records ===== */

.case-export-card {
    display: none !important;
}

.case-export-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.case-export-inline .section-title {
    margin-bottom: 0.25rem;
}

.case-export-inline .feed-meta {
    margin: 0;
}

@media (max-width: 760px) {
    .case-export-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .case-export-inline .case-export-button {
        width: 100%;
    }
}

/* ===== Case export positioned with audit records ===== */

.case-export-card {
    display: none !important;
}

.case-export-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.case-export-inline .section-title {
    margin-bottom: 0.25rem;
}

.case-export-inline .feed-meta {
    margin: 0;
}

@media (max-width: 760px) {
    .case-export-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .case-export-inline .case-export-button {
        width: 100%;
    }
}

/* ===== Softer case export button ===== */

.case-export-inline .case-export-button {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #cbd5e1 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: #1e3a8a !important;
    box-shadow: none !important;
    padding: 0.7rem 1rem !important;
    min-height: 44px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    cursor: pointer !important;
}

.case-export-inline .case-export-button:hover {
    background: #f8fafc !important;
}

@media (max-width: 760px) {
    .case-export-inline .case-export-button {
        width: 100% !important;
    }
}

/* ===== Softer case export button ===== */

.case-export-inline .case-export-button {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #cbd5e1 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: #1e3a8a !important;
    box-shadow: none !important;
    padding: 0.7rem 1rem !important;
    min-height: 44px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    cursor: pointer !important;
}

.case-export-inline .case-export-button:hover {
    background: #f8fafc !important;
}

@media (max-width: 760px) {
    .case-export-inline .case-export-button {
        width: 100% !important;
    }
}

/* ===== Bottom nav export action ===== */

.bottom-link-form {
    margin: 0;
    padding: 0;
    display: contents;
}

.bottom-link-button {
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.bottom-link-button strong,
.bottom-link-button span {
    pointer-events: none;
}


/* ===== Final home dashboard sections ===== */

.latest-report-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.latest-report-card:hover {
    background: #f8fafc;
}

.home-records-dropdown,
.home-activity-dropdown {
    margin-top: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
}

.home-records-dropdown > summary,
.home-activity-dropdown > summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    min-height: 54px;
    padding: 1rem;
    background: #f8fafc;
    cursor: pointer;
    list-style: none;
}

.home-records-dropdown > summary::-webkit-details-marker,
.home-activity-dropdown > summary::-webkit-details-marker {
    display: none;
}

.home-records-dropdown > summary span,
.home-activity-dropdown > summary span {
    justify-self: start;
    font-size: 1rem;
    font-weight: 800;
    color: #020617;
}

.home-records-dropdown > summary small,
.home-activity-dropdown > summary small {
    justify-self: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
}

.home-records-dropdown > summary::after,
.home-activity-dropdown > summary::after {
    content: "Open";
    justify-self: end;
    font-size: 0.82rem;
    font-weight: 800;
    color: #1e3a8a;
}

.home-records-dropdown[open] > summary::after,
.home-activity-dropdown[open] > summary::after {
    content: "Close";
}

.home-dropdown-list,
.home-activity-list {
    padding: 1rem;
}

@media (max-width: 760px) {
    .home-dropdown-list,
    .home-activity-list {
        padding: 0.75rem;
    }
}


/* ===== Bottom More menu ===== */

.bottom-more-dialog {
    width: min(92vw, 420px);
    border: 0;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.bottom-more-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.bottom-more-panel {
    padding: 1rem;
    background: #ffffff;
}

.bottom-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.bottom-more-close {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.bottom-more-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bottom-more-item {
    display: block;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #0f2f75;
    padding: 0.8rem 1rem;
    box-sizing: border-box;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.bottom-more-item:hover {
    background: #f8fafc;
}

.bottom-more-logout-form {
    margin: 0;
}

.bottom-more-logout {
    color: #991b1b;
}

/* ===== Bottom More menu ===== */

.bottom-more-dialog {
    width: min(92vw, 420px);
    border: 0;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.bottom-more-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.bottom-more-panel {
    padding: 1rem;
    background: #ffffff;
}

.bottom-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.bottom-more-close {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.bottom-more-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bottom-more-item {
    display: block;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #0f2f75;
    padding: 0.8rem 1rem;
    box-sizing: border-box;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.bottom-more-item:hover {
    background: #f8fafc;
}

.bottom-more-logout-form {
    margin: 0;
}

.bottom-more-logout {
    color: #991b1b;
}

/* ===== Fix bottom More visual parity and interaction ===== */

.bottom-nav .bottom-link-button,
.bottom-nav button.bottom-link {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: 0 !important;
    background: transparent !important;
    font: inherit !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.bottom-nav .bottom-link-button strong,
.bottom-nav .bottom-link-button span {
    font: inherit !important;
}

.bottom-nav .bottom-link-button strong {
    font-size: inherit !important;
    font-weight: 800 !important;
}

.bottom-nav .bottom-link-button:hover,
.bottom-nav .bottom-link:hover {
    color: #1e3a8a !important;
    background: rgba(30, 58, 138, 0.06) !important;
}

.bottom-nav .bottom-link-button.active {
    color: #1e3a8a !important;
    background: rgba(30, 58, 138, 0.1) !important;
}

/* ===== Stable bottom nav + More dialog reset ===== */

.bottom-nav .bottom-link-button {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: 0 !important;
    background: transparent !important;
    font: inherit !important;
    color: inherit !important;
    margin: 0 !important;
    cursor: pointer !important;
}

.bottom-nav .bottom-link-button strong,
.bottom-nav .bottom-link-button span {
    pointer-events: none;
}

.bottom-nav .bottom-link:hover,
.bottom-nav .bottom-link.active {
    color: #1e3a8a !important;
    background: rgba(30, 58, 138, 0.1) !important;
}

.bottom-more-dialog {
    width: min(92vw, 420px);
    border: 0;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.bottom-more-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.bottom-more-panel {
    padding: 1rem;
    background: #ffffff;
}

.bottom-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.bottom-more-close {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.bottom-more-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bottom-more-item {
    display: block;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #0f2f75;
    padding: 0.8rem 1rem;
    box-sizing: border-box;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.bottom-more-item:hover {
    background: #f8fafc;
}

.bottom-more-logout-form {
    margin: 0;
}

.bottom-more-logout {
    color: #991b1b;
}

/* ===== Admin user management ===== */

.admin-create-user-form {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.admin-create-user-form label {
    display: grid;
    gap: 0.35rem;
    font-weight: 800;
    color: #0f172a;
}

.admin-create-user-form input,
.admin-create-user-form select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    font: inherit;
    box-sizing: border-box;
}

.admin-checkbox-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 0.6rem !important;
}

.admin-checkbox-row input {
    width: auto;
    min-height: auto;
}

/* ===== Admin user status controls ===== */

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.admin-user-actions form {
    margin: 0;
}

.admin-secondary-button {
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #1e3a8a;
    padding: 0.6rem 0.9rem;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.admin-secondary-button:hover {
    background: #f8fafc;
}

/* ===== Admin role editor ===== */

.admin-role-editor {
    margin-top: 0.85rem;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
}

.admin-role-editor > summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    min-height: 48px;
    padding: 0.85rem;
    background: #f8fafc;
    cursor: pointer;
    list-style: none;
}

.admin-role-editor > summary::-webkit-details-marker {
    display: none;
}

.admin-role-editor > summary span {
    justify-self: start;
    font-weight: 800;
    color: #020617;
}

.admin-role-editor > summary small {
    justify-self: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-align: center;
}

.admin-role-editor > summary::after {
    content: "Open";
    justify-self: end;
    font-size: 0.78rem;
    font-weight: 800;
    color: #1e3a8a;
}

.admin-role-editor[open] > summary::after {
    content: "Close";
}

.admin-role-editor form {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
}

.admin-role-editor label {
    display: grid;
    gap: 0.35rem;
    font-weight: 800;
}

.admin-role-editor select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    font: inherit;
    box-sizing: border-box;
}

/* ===== Platform admin home ===== */

.admin-panel-grid {
    display: grid;
    gap: 1rem;
}

.admin-panel-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #ffffff;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.admin-panel-card:hover {
    background: #f8fafc;
}

.admin-panel-card strong {
    display: block;
    color: #020617;
    font-size: 1rem;
}

.admin-panel-card small {
    display: block;
    margin-top: 0.2rem;
    color: #64748b;
    font-weight: 700;
}

.admin-panel-card.disabled {
    opacity: 0.62;
    pointer-events: none;
}

.admin-panel-icon {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #eff6ff;
    font-size: 1.35rem;
}

.admin-back-link {
    display: inline-flex;
    margin-bottom: 1rem;
    color: #1e3a8a;
    font-weight: 800;
    text-decoration: none;
}

/* ===== CSS-only bottom More menu ===== */

.bottom-more-details {
    position: relative;
    margin: 0;
    padding: 0;
}

.bottom-more-details > summary {
    list-style: none;
}

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

.bottom-more-details[open] > summary {
    color: #1e3a8a !important;
    background: rgba(30, 58, 138, 0.1) !important;
}

.bottom-more-popover {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 82px;
    z-index: 1000;
    display: grid;
    gap: 0.5rem;
    max-width: 420px;
    margin: 0 auto;
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.bottom-more-item {
    display: block;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #0f2f75;
    padding: 0.8rem 1rem;
    box-sizing: border-box;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.bottom-more-item:hover {
    background: #f8fafc;
}

.bottom-more-logout-form {
    margin: 0;
}

.bottom-more-logout {
    color: #991b1b;
}

/* ===== Admin password reset ===== */

.admin-password-reset {
    margin-top: 0.85rem;
    border: 1px solid #fee2e2;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
}

.admin-password-reset > summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    min-height: 48px;
    padding: 0.85rem;
    background: #fff7ed;
    cursor: pointer;
    list-style: none;
}

.admin-password-reset > summary::-webkit-details-marker {
    display: none;
}

.admin-password-reset > summary span {
    justify-self: start;
    font-weight: 800;
    color: #7f1d1d;
}

.admin-password-reset > summary small {
    justify-self: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #9a3412;
    text-align: center;
}

.admin-password-reset > summary::after {
    content: "Open";
    justify-self: end;
    font-size: 0.78rem;
    font-weight: 800;
    color: #991b1b;
}

.admin-password-reset[open] > summary::after {
    content: "Close";
}

.admin-password-reset form {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
}

.admin-password-reset label {
    display: grid;
    gap: 0.35rem;
    font-weight: 800;
}

.admin-password-reset input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    font: inherit;
    box-sizing: border-box;
}

.admin-danger-button {
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff1f2;
    color: #991b1b;
    padding: 0.65rem 0.9rem;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.admin-danger-button:hover {
    background: #ffe4e6;
}

/* ===== Admin reset link ===== */

.admin-reset-link {
    margin-top: 0.85rem;
}

.admin-copy-field {
    width: 100%;
    min-height: 46px;
    margin-top: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    font: inherit;
    box-sizing: border-box;
}

/* ===== Admin dashboard stats ===== */

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.admin-stat-card {
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.admin-stat-card span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
}

.admin-stat-card strong {
    display: block;
    margin-top: 0.35rem;
    color: #020617;
    font-size: 1.7rem;
    line-height: 1;
}

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

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

/* ===== Google Workspace admin readiness ===== */

.google-workspace-readiness {
    margin-bottom: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.workspace-readiness-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.workspace-readiness-grid article {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    padding: 0.85rem;
}

.workspace-readiness-grid strong {
    display: block;
    color: #020617;
    font-size: 0.92rem;
}

.workspace-readiness-grid small {
    display: block;
    margin-top: 0.25rem;
    color: #64748b;
    font-weight: 700;
    line-height: 1.35;
}

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

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

/* ===== Admin user search/filter ===== */

.admin-user-filter-card {
    margin-bottom: 1rem;
}

.admin-user-filter {
    display: grid;
    grid-template-columns: 1fr minmax(160px, 220px);
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.admin-user-filter input,
.admin-user-filter select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    font: inherit;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .admin-user-filter {
        grid-template-columns: 1fr;
    }
}

.evidence-access-history-modal {
    max-height: min(80vh, 620px);
    overflow: hidden;
}

.evidence-access-history-list {
    max-height: calc(min(80vh, 620px) - 96px);
    overflow-y: auto;
    padding-right: 0.25rem;
}


/* ===== Retention governance ===== */

.retention-governance-card {
    border-left: 4px solid #1e3a8a;
}

.retention-governance-summary {
    margin-bottom: 1rem;
}

.retention-governance-form {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.retention-governance-form label {
    display: grid;
    gap: 0.35rem;
    color: #334155;
    font-weight: 700;
}

.retention-governance-form input[type="date"],
.retention-governance-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    font: inherit;
    font-weight: 500;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
}

.retention-checkbox {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 0.6rem !important;
    padding: 0.8rem 0.9rem;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fafc;
}

.retention-checkbox input {
    width: 18px;
    height: 18px;
}

/* ===== Retention governance modal ===== */

.retention-modal-button {
    width: auto;
}

.retention-governance-dialog {
    width: min(560px, calc(100vw - 2rem));
    border: 0;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.retention-governance-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.retention-governance-modal {
    padding: 1.25rem;
    background: #ffffff;
}

.retention-governance-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.retention-governance-modal-head h2 {
    margin: 0;
    font-size: 1.1rem;
}

.retention-governance-modal .retention-governance-form {
    margin-top: 1rem;
}

/* ===== Governance status panel ===== */

.governance-summary-label {
    align-self: start;
}

.governance-summary-value {
    display: block;
}

.governance-status-panel {
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: #f8fbff;
    padding: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.governance-status-heading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    color: #0f172a;
}

.governance-status-icon {
    display: inline-flex;
    width: 1.55rem;
    height: 1.55rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-weight: 900;
}

.governance-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #dbeafe;
}

.governance-status-item {
    display: grid;
    gap: 0.25rem;
}

.governance-status-label {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.governance-status-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-weight: 900;
}

.governance-status-badge::before {
    content: "";
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: #64748b;
}

.governance-status-badge-active {
    background: #dcfce7;
    color: #166534;
}

.governance-status-badge-active::before {
    background: #16a34a;
}

.governance-status-reason {
    display: grid;
    gap: 0.2rem;
    margin-top: 0.85rem;
}

.governance-status-reason span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.governance-update-button {
    margin-top: 0.9rem;
    width: fit-content;
}

.governance-help-box {
    padding: 0.8rem 0.9rem;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
    color: #1e3a8a;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

    .governance-update-button {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Governance status compact layout ===== */

.governance-status-panel {
    padding-top: 0.85rem;
}

.governance-status-grid {
    margin-top: 0;
}

/* ===== Governance status compact layout ===== */

.governance-status-panel {
    padding-top: 0.85rem;
}

.governance-status-grid {
    margin-top: 0;
}

/* ===== Clean governance status sub-card ===== */

.governance-summary-wide {
    grid-column: 1 / -1;
    display: block;
    padding-top: 0.5rem;
}

.clean-governance-panel {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.35rem;
    padding: 1rem 1.1rem;
}

.clean-governance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid #dbeafe;
    padding-bottom: 0.8rem;
}

.clean-governance-item {
    display: grid;
    gap: 0.35rem;
    padding: 0 1.1rem;
    border-left: 1px solid #dbeafe;
}

.clean-governance-item:first-child {
    border-left: 0;
    padding-left: 0;
}

.clean-governance-item span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.clean-governance-item strong {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #0f172a;
    font-size: 0.95rem;
}

.governance-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    background: #64748b;
}

.governance-dot-active {
    background: #22c55e;
}

.clean-governance-reason {
    display: grid;
    gap: 0.25rem;
    padding-top: 0.85rem;
}

.clean-governance-reason span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.clean-governance-reason strong {
    color: #0f172a;
}

.clean-governance-panel .governance-update-button {
    margin-top: 0.9rem;
}

@media (max-width: 760px) {
    .clean-governance-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .clean-governance-item {
        border-left: 0;
        padding: 0;
    }

    .clean-governance-panel .governance-update-button {
        width: 100%;
        justify-content: center;
    }
}

.directory-readiness-panel {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: #eff6ff;
    color: #1e3a8a;
}

.directory-readiness-panel strong {
    color: #0f172a;
}

.directory-readiness-panel span {
    font-weight: 700;
}

.admin-diagnostics-actions {
    display: flex;
    justify-content: flex-start;
    margin: 0.85rem 0 1rem;
}

.diagnostics-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.diagnostics-status-card {
    display: grid;
    gap: 0.35rem;
    padding: 1.15rem;
    border: 1px solid #dbeafe;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.diagnostics-status-card span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.diagnostics-status-card strong {
    color: #0f172a;
    font-size: 1.55rem;
    line-height: 1.1;
}

.diagnostics-status-card small {
    color: #64748b;
    font-weight: 700;
}

.diagnostics-status-primary {
    background: linear-gradient(135deg, #11204a, #285ee8);
    border-color: transparent;
}

.diagnostics-status-primary span,
.diagnostics-status-primary strong,
.diagnostics-status-primary small {
    color: #ffffff;
}

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

.diagnostics-panel {
    padding: 1.2rem;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.diagnostics-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.85rem;
}

.diagnostics-panel-head h3 {
    margin: 0;
    color: #0f172a;
}

.diagnostics-panel-head p {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-weight: 700;
}

.diagnostics-metric-list {
    display: grid;
    gap: 0.65rem;
}

.diagnostics-metric-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eef2f7;
}

.diagnostics-metric-list div:last-child {
    border-bottom: 0;
}

.diagnostics-metric-list span {
    color: #475569;
    font-weight: 800;
}

.diagnostics-metric-list strong {
    color: #0f172a;
    font-size: 1.05rem;
}

@media (max-width: 900px) {
    .diagnostics-status-grid,
    .diagnostics-section-grid {
        grid-template-columns: 1fr;
    }
}

.diagnostics-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.diagnostics-hero-card {
    display: grid;
    gap: 0.35rem;
    padding: 1.15rem;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.diagnostics-hero-card span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.diagnostics-hero-card strong {
    color: #0f172a;
    font-size: 1.7rem;
    line-height: 1.1;
}

.diagnostics-hero-card small {
    color: #64748b;
    font-weight: 700;
}

.diagnostics-hero-primary {
    background: linear-gradient(135deg, #11204a, #2563eb);
    border-color: transparent;
}

.diagnostics-hero-primary span,
.diagnostics-hero-primary strong,
.diagnostics-hero-primary small {
    color: #ffffff;
}

.diagnostics-panel-wide {
    grid-column: 1 / -1;
}

.diagnostics-runtime-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
}

.diagnostics-runtime-grid div {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.diagnostics-runtime-grid span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.diagnostics-runtime-grid strong {
    color: #0f172a;
}

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

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

@media (max-width: 700px) {
    .diagnostics-hero-grid,
    .diagnostics-runtime-grid {
        grid-template-columns: 1fr;
    }
}

.diagnostics-version-box {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.9rem;
    padding: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.diagnostics-version-box span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.diagnostics-version-box strong {
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.35;
}

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

.executive-bar-list {
    display: grid;
    gap: 0.85rem;
}

.executive-bar-list div {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #eef2f7;
}

.executive-bar-list div:last-child {
    border-bottom: 0;
}

.executive-bar-list span {
    color: #475569;
    font-weight: 900;
}

.executive-bar-list strong {
    color: #0f172a;
    font-size: 1.05rem;
}

.executive-bar-list i {
    grid-column: 1 / -1;
    display: block;
    height: 0.55rem;
    min-width: 0.35rem;
    max-width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1e3a8a, #2563eb);
}

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


/* ===== Executive analytics trend charts ===== */

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

.executive-trend-wide {
    grid-column: 1 / -1;
}

.executive-trend-bars {
    display: grid;
    grid-template-columns: repeat(30, minmax(4px, 1fr));
    align-items: end;
    gap: 0.28rem;
    min-height: 180px;
    padding: 1rem 0.25rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.executive-trend-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    min-height: 150px;
    gap: 0.35rem;
}

.executive-trend-bar span {
    width: 100%;
    min-height: 4px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, #2563eb, #0f172a);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.executive-trend-bar small {
    font-size: 0.62rem;
    color: #64748b;
}

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

    .executive-trend-bars {
        gap: 0.18rem;
        overflow-x: auto;
        grid-template-columns: repeat(30, minmax(9px, 1fr));
    }
}

/* ===== Tenant onboarding modal ===== */

.tenant-modal-open {
    border: 0;
    cursor: pointer;
}

.tenant-modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.56);
    z-index: 1000;
}

.tenant-modal-backdrop.is-open {
    display: flex;
}

.tenant-modal-card {
    width: min(720px, 100%);
    max-height: calc(100vh - 3rem);
    overflow: auto;
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    padding: 1.25rem;
}

.tenant-modal-close {
    border: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.tenant-modal-card .admin-create-user-form {
    margin-top: 1rem;
}

@media (max-width: 720px) {
    .tenant-modal-backdrop {
        padding: 0.75rem;
        align-items: stretch;
    }

    .tenant-modal-card {
        max-height: calc(100vh - 1.5rem);
    }
}

/* ===== Compact tenant list ===== */

.tenant-list-panel {
    display: grid;
    gap: 0.75rem;
}

.tenant-compact-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1.25rem;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.tenant-compact-card summary {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    list-style: none;
}

.tenant-compact-card summary::-webkit-details-marker {
    display: none;
}

.tenant-compact-card summary::after {
    content: "⌄";
    color: #64748b;
    font-size: 1rem;
}

.tenant-compact-card[open] summary::after {
    transform: rotate(180deg);
}

.tenant-compact-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tenant-compact-main strong {
    color: #0f172a;
    font-size: 1rem;
}

.tenant-compact-main small {
    color: #64748b;
    font-size: 0.82rem;
}

.tenant-compact-stats {
    display: flex;
    gap: 0.75rem;
    color: #64748b;
    font-size: 0.82rem;
    white-space: nowrap;
}

.tenant-compact-stats strong {
    color: #0f172a;
}

.tenant-compact-details {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1rem;
    background: #f8fafc;
}

@media (max-width: 800px) {
    .tenant-compact-card summary {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .tenant-compact-stats {
        flex-wrap: wrap;
        white-space: normal;
    }
}


/* ===== Refined tenant list ===== */

.clean-tenant-list {
    display: grid;
    gap: 0.7rem;
}

.tenant-row-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1.15rem;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
    overflow: hidden;
}

.tenant-row-card summary {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto 1.5rem;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    list-style: none;
}

.tenant-row-card summary::-webkit-details-marker {
    display: none;
}

.tenant-row-card summary::after {
    content: "⌄";
    color: #64748b;
    font-size: 1rem;
    justify-self: end;
}

.tenant-row-card[open] summary::after {
    transform: rotate(180deg);
}

.tenant-row-name strong {
    color: #0f172a;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.tenant-row-stats {
    display: flex;
    gap: 0.65rem;
    color: #64748b;
    font-size: 0.82rem;
    white-space: nowrap;
}

.tenant-row-stats span {
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.tenant-row-stats strong {
    color: #0f172a;
}

.tenant-row-status {
    justify-self: end;
}

.tenant-row-dropdown {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1rem;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.tenant-row-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.tenant-row-detail-grid div {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    padding: 0.85rem;
    background: #ffffff;
}

.tenant-row-detail-grid span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    margin-bottom: 0.25rem;
}

.tenant-row-detail-grid strong {
    color: #0f172a;
    font-size: 1.25rem;
}

.tenant-row-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.85rem;
}

@media (max-width: 840px) {
    .tenant-row-card summary {
        grid-template-columns: 1fr auto;
    }

    .tenant-row-stats,
    .tenant-row-status {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .tenant-row-stats {
        flex-wrap: wrap;
        white-space: normal;
    }

    .tenant-row-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Shared admin alert badges */

.alert-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.alert-badge-critical {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-badge-high {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.alert-badge-medium {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-badge-low {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-badge-on_hold {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.alert-badge-open {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-badge-completed {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-summary-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Admin audit filters and records */

.admin-audit-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.admin-audit-filter-field {
    margin: 0;
}

.admin-audit-filter-field select,
.admin-audit-filter-field input {
    width: 100%;
}

.admin-audit-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.admin-audit-record summary {
    gap: 1rem;
}

.admin-audit-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.admin-audit-summary > span:last-child {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.admin-audit-summary strong {
    color: #111827;
}

.admin-audit-summary small {
    color: #64748b;
    font-weight: 700;
}

.admin-audit-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-audit-detail-grid > div,
.admin-audit-detail-note {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #f8fafc;
    padding: 0.85rem;
}

.admin-audit-detail-grid span,
.admin-audit-detail-note span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-audit-detail-grid strong,
.admin-audit-detail-note strong {
    display: block;
    margin-top: 0.25rem;
    color: #111827;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.admin-audit-detail-note {
    margin-top: 0.75rem;
}

@media (max-width: 960px) {
    .admin-audit-filter-grid,
    .admin-audit-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .admin-audit-filter-grid,
    .admin-audit-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-audit-filter-actions {
        justify-content: stretch;
    }

    .admin-audit-filter-actions .small-action {
        width: 100%;
        text-align: center;
    }
}

/* Admin audit record summary polish */

.admin-audit-record .evidence-access-detail > summary {
    align-items: stretch;
    flex-direction: column;
}

.admin-audit-record-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.admin-audit-record-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.admin-audit-record-title > span:last-child {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.admin-audit-record-title strong {
    color: #111827;
    font-size: 1rem;
    line-height: 1.25;
}

.admin-audit-record-title small,
.admin-audit-record-meta,
.admin-audit-record-preview {
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 700;
}

.admin-audit-record-meta {
    flex: 0 0 auto;
    white-space: nowrap;
}

.admin-audit-record-preview {
    width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .admin-audit-record-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .admin-audit-record-meta {
        white-space: normal;
    }
}

/* Admin audit technical metadata */

.admin-audit-technical-metadata {
    margin-top: 0.75rem;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: #f8fafc;
    padding: 0.75rem;
}

.admin-audit-technical-metadata > summary {
    cursor: pointer;
    color: #1f3b73;
    font-size: 0.82rem;
    font-weight: 900;
    list-style: none;
}

.admin-audit-technical-metadata > summary::-webkit-details-marker {
    display: none;
}

.admin-audit-technical-metadata > summary::after {
    content: "Open";
    float: right;
    color: #64748b;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-audit-technical-metadata[open] > summary::after {
    content: "Close";
}

/* Login error state */

.login-error-card {
    border: 1px solid #fecaca;
    background: #fef2f2;
    box-shadow: 0 18px 45px rgba(153, 27, 27, 0.10);
}

.login-error-title {
    color: #991b1b;
}

.login-error-message {
    color: #7f1d1d;
}

/* Admin audit compact expandable records */

.admin-audit-record > summary {
    list-style: none;
}

.admin-audit-record > summary::-webkit-details-marker {
    display: none;
}

.admin-audit-record-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-audit-record-title {
    min-width: 0;
}

.admin-audit-record-title small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-audit-record > summary::after {
    content: "Open";
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-audit-record[open] > summary::after {
    content: "Close";
}

/* Button variant for small action navigation */

button.small-action {
    font: inherit;
    cursor: pointer;
}

/* Admin audit closed-state polish */

.admin-audit-record {
    overflow: hidden;
}

.admin-audit-record > summary {
    cursor: pointer;
    padding: 1rem 1rem 0.95rem;
}

.admin-audit-record > summary::marker {
    content: "";
}

.admin-audit-record > summary::-webkit-details-marker {
    display: none;
}

.admin-audit-record-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem 1rem;
    align-items: start;
}

.admin-audit-record-title {
    min-width: 0;
}

.admin-audit-record-title .badge {
    margin-bottom: 0.25rem;
}

.admin-audit-record-title .feed-title {
    margin: 0;
    line-height: 1.2;
}

.admin-audit-record-title small {
    display: block;
    margin-top: 0.15rem;
    line-height: 1.25;
    color: #64748b;
}

.admin-audit-record-preview {
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-audit-record-time,
.admin-audit-record-main > :last-child {
    white-space: nowrap;
    text-align: right;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
}

.admin-audit-record:not([open]) > summary {
    padding-bottom: 1rem;
}

.admin-audit-record[open] > summary {
    border-bottom: 1px solid #dbe6ff;
}

@media (max-width: 760px) {
    .admin-audit-record-main {
        grid-template-columns: 1fr;
    }

    .admin-audit-record-time,
    .admin-audit-record-main > :last-child {
        text-align: left;
    }

    .admin-audit-record-preview {
        white-space: normal;
    }
}

/* Admin audit nested details closed-card polish */

.admin-audit-record {
    padding: 0;
    overflow: hidden;
}

.admin-audit-record .evidence-access-detail {
    display: block;
}

.admin-audit-record .evidence-access-detail > summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
}

.admin-audit-record .evidence-access-detail > summary::marker {
    content: "";
}

.admin-audit-record .evidence-access-detail > summary::-webkit-details-marker {
    display: none;
}

.admin-audit-record .evidence-access-detail > summary::before {
    content: "Open";
    justify-self: start;
    align-self: center;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.admin-audit-record .evidence-access-detail[open] > summary::before {
    content: "Close";
}

.admin-audit-record-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem 1rem;
    align-items: center;
}

.admin-audit-record-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    min-width: 0;
}

.admin-audit-record-title span:last-child {
    min-width: 0;
}

.admin-audit-record-title strong {
    display: block;
    line-height: 1.15;
}

.admin-audit-record-title small {
    display: block;
    margin-top: 0.15rem;
    line-height: 1.2;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-audit-record-meta {
    white-space: nowrap;
    text-align: right;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 800;
}

.admin-audit-record-preview {
    margin-left: calc(0.75rem + 4.75rem);
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-audit-record .evidence-access-detail[open] > summary {
    border-bottom: 1px solid #dbe6ff;
}

.admin-audit-record .admin-audit-detail-grid,
.admin-audit-record .admin-audit-technical-metadata {
    margin: 1rem;
}

@media (max-width: 760px) {
    .admin-audit-record-main {
        grid-template-columns: 1fr;
    }

    .admin-audit-record-title {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .admin-audit-record-meta {
        text-align: left;
    }

    .admin-audit-record-preview {
        margin-left: 0;
        white-space: normal;
    }
}

/* Admin audit collapsible panels */

.admin-audit-collapsible-panel {
    padding: 0;
    overflow: hidden;
}

.admin-audit-collapsible-panel > summary {
    list-style: none;
    cursor: pointer;
    padding: 1.25rem;
}

.admin-audit-collapsible-panel > summary::marker {
    content: "";
}

.admin-audit-collapsible-panel > summary::-webkit-details-marker {
    display: none;
}

.admin-audit-collapsible-panel > summary .diagnostics-panel-head {
    margin: 0;
}

.admin-audit-collapsible-panel[open] .admin-audit-collapse-label {
    font-size: 0;
}

.admin-audit-collapsible-panel[open] .admin-audit-collapse-label::after {
    content: "Close";
    font-size: 0.85rem;
}

.admin-audit-collapsible-body {
    border-top: 1px solid #dbe6ff;
    padding: 1rem 1.25rem 1.25rem;
}

.admin-audit-collapsible-body .admin-diagnostics-actions {
    margin-bottom: 1rem;
}

/* Admin audit records section collapse spacing */

.admin-audit-records-section .alert-record-list {
    margin-top: 0;
}

.admin-audit-records-section:not([open]) {
    margin-bottom: 1rem;
}

.admin-audit-records-section[open] .admin-audit-collapsible-body {
    background: rgba(248, 250, 252, 0.55);
}

/* Plain text open/close labels for admin audit collapsibles */

.admin-audit-collapse-label {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-height: auto;
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
}

.admin-audit-collapsible-panel[open] .admin-audit-collapse-label {
    font-size: 0;
}

.admin-audit-collapsible-panel[open] .admin-audit-collapse-label::after {
    content: "Close";
    font-size: 0.85rem;
    color: #2563eb;
    font-weight: 800;
}

/* Admin audit summary card typography polish */

.admin-audit-summary-grid .diagnostics-hero-card {
    gap: 0.35rem;
    padding: 1.15rem;
}

.admin-audit-summary-grid .diagnostics-hero-card span {
    font-size: 0.78rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
}

.admin-audit-summary-grid .diagnostics-hero-card strong {
    font-size: 1.35rem;
    line-height: 1.15;
    word-break: normal;
}

.admin-audit-summary-grid .diagnostics-hero-card strong a {
    font-size: inherit;
    line-height: inherit;
}

.admin-audit-summary-grid .diagnostics-hero-card small {
    font-size: 0.78rem;
    line-height: 1.25;
    color: #64748b;
}

/* The latest audit event is a date/time, not a large count. */
.admin-audit-summary-grid .diagnostics-hero-card:last-child strong {
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 900;
}

/* Login language selector */

.login-language-switcher {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    font-weight: 800;
}

.login-language-switcher a {
    color: #2563eb;
    text-decoration: none;
}

.login-language-switcher a:hover {
    text-decoration: underline;
}

.login-language-switcher span {
    color: #94a3b8;
}

/* Login language selector */

.login-language-switcher {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    font-weight: 800;
}

.login-language-switcher a {
    color: #2563eb;
    text-decoration: none;
}

.login-language-switcher a:hover {
    text-decoration: underline;
}

.login-language-switcher span {
    color: #94a3b8;
}

/* Page language switcher */

.page-language-switcher {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    font-weight: 800;
}

.page-language-switcher a {
    color: #2563eb;
    text-decoration: none;
}

.page-language-switcher a:hover {
    text-decoration: underline;
}

.page-language-switcher a.active {
    color: #0f172a;
    text-decoration: underline;
}

.page-language-switcher span {
    color: #94a3b8;
}
