:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --bg-2: #0e1420;
  --surface: rgba(255, 255, 255, 0.065);
  --surface-strong: rgba(255, 255, 255, 0.105);
  --surface-quiet: rgba(255, 255, 255, 0.038);
  --border: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(130, 190, 255, 0.48);
  --text: #f5f7fa;
  --muted: #aab4c0;
  --soft: #dbe7f5;
  --accent: #6bb7ff;
  --accent-2: #7c6dff;
  --good: #79deb1;
  --warn: #ff7d9a;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
  --shadow-hover: 0 34px 92px rgba(13, 93, 177, 0.22), 0 18px 44px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  --radius-sm: 14px;
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  max-width: 100%;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 13% 8%, rgba(107, 183, 255, 0.2), transparent 32rem),
    radial-gradient(circle at 86% 4%, rgba(124, 109, 255, 0.2), transparent 30rem),
    linear-gradient(145deg, var(--bg) 0, #0b1019 50%, #111722 100%);
}

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

body::after {
  position: fixed;
  inset: auto -12rem -20rem auto;
  z-index: -1;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle, rgba(107, 183, 255, 0.16), transparent 64%);
  filter: blur(18px);
}

img,
svg,
canvas,
video,
iframe {
  max-width: 100%;
}

p,
li,
dd,
td,
th,
strong,
span,
a,
button {
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

button,
.button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(107, 183, 255, 0.72);
  border-radius: 999px;
  padding: 0.62rem 1.05rem;
  background: linear-gradient(135deg, rgba(107, 183, 255, 0.95), rgba(124, 109, 255, 0.95));
  color: #07101c;
  font-weight: 760;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 18px 36px rgba(41, 117, 255, 0.2);
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease, background-color 190ms ease, color 190ms ease;
}

button.secondary,
.button.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}

button:hover,
.button:hover {
  border-color: rgba(180, 219, 255, 0.9);
  box-shadow: 0 24px 52px rgba(52, 128, 255, 0.28);
  transform: translateY(-2px);
}

button.secondary:hover,
.button.secondary:hover {
  background: rgba(107, 183, 255, 0.1);
  color: var(--text);
}

button.danger {
  border-color: rgba(255, 125, 154, 0.55);
  background: rgba(255, 125, 154, 0.18);
  color: #ffd6df;
}

button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
  box-shadow: none;
}

.compact-danger,
.compact-action {
  min-height: 1.85rem;
  padding: 0.28rem 0.58rem;
  font-size: 0.74rem;
  box-shadow: none;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.record-actions button {
  min-height: 2.1rem;
  padding: 0.42rem 0.72rem;
  font-size: 0.86rem;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(15rem, 23rem) 1fr;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem max(1rem, calc((100vw - var(--max)) / 2));
  background: rgba(10, 12, 16, 0.74);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr);
  gap: 0.72rem;
  align-items: center;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-seal {
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), 0 0 26px rgba(107, 183, 255, 0.12);
}

.brand span {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.brand strong {
  font-size: 1.05rem;
  letter-spacing: 0;
  line-height: 1.18;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-nav a::after {
  position: absolute;
  right: 0.8rem;
  bottom: 0.28rem;
  left: 0.8rem;
  height: 1px;
  content: "";
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: opacity 180ms ease;
}

.site-nav a.active,
.site-nav a:hover {
  border-color: rgba(107, 183, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.site-nav a.active::after,
.site-nav a:hover::after {
  opacity: 1;
}

.menu-button {
  display: none;
}

.menu-button span {
  display: block;
  width: 1.02rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-button b {
  font-size: 0.9rem;
  font-weight: 780;
}

.notice-ticker {
  position: relative;
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(107, 183, 255, 0.18);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(107, 183, 255, 0.11), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  contain: paint;
}

.notice-ticker-track {
  display: flex;
  width: max-content;
  min-width: max-content;
  animation: noticeTicker 95s linear infinite;
  will-change: transform;
}

.notice-ticker-set {
  display: inline-flex;
  flex: 0 0 auto;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  padding: 0.38rem clamp(2.5rem, 6vw, 6rem) 0.38rem 0;
}

.notice-ticker-set span {
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.25;
  white-space: nowrap;
}

@keyframes noticeTicker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.page-shell {
  width: min(var(--max), calc(100vw - 2rem));
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 3.2rem) 0 4.4rem;
}

.page-shell:focus {
  outline: none;
}

.page-head {
  display: grid;
  gap: 0.7rem;
  max-width: 850px;
  margin-bottom: 1.35rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.45rem, 8vw, 6.4rem);
  font-weight: 850;
  text-wrap: balance;
}

.page-head h1 {
  max-width: 100%;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
}

h2 {
  font-size: 1.28rem;
  font-weight: 760;
}

h3 {
  font-size: 1rem;
  font-weight: 740;
}

p {
  margin: 0;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.estate-line {
  color: var(--soft);
  font-size: clamp(1rem, 1.7vw, 1.24rem);
  font-weight: 720;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: clamp(0.8rem, 2.2vw, 1.35rem);
  align-items: start;
  min-height: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 34px;
  padding: clamp(1rem, 3vw, 2.35rem);
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  perspective: 1200px;
}

.home-hero::before,
.home-hero::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.home-hero::before {
  inset: 6% auto auto 50%;
  width: min(55vw, 34rem);
  height: min(55vw, 34rem);
  border: 1px solid rgba(107, 183, 255, 0.16);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(107, 183, 255, 0.16), rgba(124, 109, 255, 0.08));
  filter: blur(0.2px);
  transform: translateX(-50%) rotateX(58deg) rotateZ(-18deg) translateZ(-40px);
  animation: heroPlane 14s ease-in-out infinite alternate;
}

.home-hero::after {
  inset: 13% auto auto 50%;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107, 183, 255, 0.18), transparent 68%);
  filter: blur(16px);
  animation: heroGlow 12s ease-in-out infinite alternate;
  transform: translateX(-50%);
}

.hero-portrait-bg {
  position: absolute;
  right: max(-4.2rem, -6vw);
  bottom: -4.2rem;
  z-index: 0;
  width: min(26vw, 19.5rem);
  height: min(82%, 34rem);
  background: url("executor-portrait-cutout.png") right bottom / contain no-repeat;
  opacity: 0.15;
  filter: grayscale(12%) saturate(80%) contrast(1.08);
  mix-blend-mode: screen;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 84%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 84%, transparent 100%);
}

.home-copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 0.74rem;
  max-width: 880px;
  text-align: center;
}

.home-copy h1 {
  max-width: 24ch;
  font-size: clamp(1.62rem, 2.85vw, 2.42rem);
}

.home-copy .lead,
.home-copy .estate-line {
  max-width: 760px;
}

.portal-title {
  color: var(--soft);
  font-size: clamp(1.02rem, 1.7vw, 1.26rem);
  font-weight: 760;
}

.office-identity {
  display: grid;
  gap: 0.28rem;
  max-width: 720px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.office-identity strong {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 780;
}

.home-logo-card {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: clamp(10.7rem, 18.6vw, 14.2rem);
  align-content: center;
  justify-items: center;
  gap: 0.72rem;
  margin: 0;
  padding: 0.35rem 1.4rem;
}

.home-logo-card::before {
  position: absolute;
  inset: 0 auto auto 50%;
  z-index: -1;
  width: clamp(10.2rem, 18vw, 13.9rem);
  aspect-ratio: 1;
  border: 1px solid rgba(107, 183, 255, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 44%, rgba(107, 183, 255, 0.16), transparent 58%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 22px 70px rgba(28, 92, 180, 0.24);
  content: "";
  transform: translate(-50%, -0.2rem);
  backdrop-filter: blur(12px);
}

.home-logo-card img {
  width: clamp(8.4rem, 15vw, 11.8rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.34), 0 0 46px rgba(107, 183, 255, 0.12);
}

.home-logo-card figcaption {
  display: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.quick-search {
  display: grid;
  max-width: 740px;
  width: min(100%, 740px);
  gap: 0.5rem;
  margin-top: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.quick-search label,
.field label {
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 740;
}

.form-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.82rem 0.95rem;
  background: rgba(8, 13, 22, 0.72);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

select {
  border-radius: 14px;
}

select[multiple] {
  min-height: 12rem;
  border-radius: 18px;
  padding: 0.55rem;
}

select[multiple] option {
  padding: 0.28rem 0.35rem;
}

select[multiple] optgroup {
  color: var(--soft);
  font-weight: 760;
}

textarea {
  min-height: 6.4rem;
  border-radius: 18px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(170, 180, 192, 0.76);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(107, 183, 255, 0.74);
  background: rgba(8, 13, 22, 0.88);
  box-shadow: 0 0 0 4px rgba(107, 183, 255, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.home-cards {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 1.18fr 0.88fr 0.94fr;
  grid-auto-rows: minmax(11rem, auto);
  gap: 1rem;
}

.home-card,
.surface,
.record-card,
.admin-panel,
.landing-panel,
.citation-search-panel,
.citation-detail {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-card {
  position: relative;
  display: grid;
  gap: 0.75rem;
  min-height: 12rem;
  padding: 1.25rem;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.home-card:first-child {
  grid-row: span 2;
  min-height: 24rem;
  background: linear-gradient(150deg, rgba(107, 183, 255, 0.15), rgba(255, 255, 255, 0.06));
}

.home-card:nth-child(2) {
  grid-column: span 2;
}

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

.landing-panel {
  display: grid;
  align-content: start;
  gap: 0.86rem;
  padding: clamp(1rem, 2.4vw, 1.45rem);
}

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

.landing-panel h2 {
  font-size: clamp(1.18rem, 2vw, 1.55rem);
}

.landing-panel p,
.landing-panel li,
.landing-panel dd {
  color: var(--muted);
  line-height: 1.65;
}

.landing-panel ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.15rem;
}

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

.instrument-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.instrument-list div {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 0.7rem;
}

.instrument-list dt,
.citation-examples span {
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 760;
}

.instrument-list dd {
  margin: 0;
}

.citation-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.citation-examples span {
  border: 1px solid rgba(107, 183, 255, 0.22);
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  background: rgba(107, 183, 255, 0.08);
}

.governing-principle {
  background: linear-gradient(145deg, rgba(107, 183, 255, 0.12), rgba(255, 255, 255, 0.055));
}

.notice-retention-note {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.notice-details {
  margin-top: 0.15rem;
  border: 1px solid rgba(107, 183, 255, 0.18);
  border-radius: 16px;
  background: rgba(11, 26, 46, 0.42);
  padding: 0.7rem 0.85rem;
}

.notice-details summary {
  cursor: pointer;
  color: var(--soft);
  font-weight: 760;
  list-style-position: inside;
}

.notice-details[open] summary {
  color: var(--accent);
}

.notice-copy {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
}

.notice-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.notice-copy strong {
  color: var(--text);
}

.notice-document {
  padding: 0;
  overflow: hidden;
}

.notice-document summary {
  padding: 0.7rem 0.85rem;
}

.notice-pdf-frame {
  display: block;
  width: 100%;
  height: clamp(560px, 84vh, 940px);
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #f7f8fb;
}

.notice-view-note {
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .notice-pdf-frame {
    height: 78vh;
    min-height: 420px;
  }
}

.login-wrap {
  display: grid;
  place-items: start center;
}

.login-panel {
  width: min(100%, 520px);
}

.login-message {
  margin: 0;
  border: 1px solid rgba(255, 116, 116, 0.35);
  border-radius: 14px;
  background: rgba(255, 116, 116, 0.08);
  color: #ffd1d1;
  padding: 0.7rem 0.8rem;
}

.admin-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.admin-session-bar span {
  color: var(--soft);
  font-weight: 760;
}

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

.admin-tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  scrollbar-width: thin;
}

.admin-tabs button {
  flex: 0 0 auto;
  min-height: 2.45rem;
  border-radius: 999px;
  padding-inline: 0.82rem;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-tabs button.active {
  border-color: rgba(107, 183, 255, 0.52);
  background: rgba(107, 183, 255, 0.16);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(13, 93, 177, 0.18);
}

.admin-os-panel {
  min-width: 0;
}

.admin-dashboard,
.admin-two-column {
  display: grid;
  gap: 1rem;
}

.admin-two-column {
  grid-template-columns: minmax(20rem, 0.9fr) minmax(0, 1.15fr);
  align-items: start;
}

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

.metric-card {
  display: grid;
  gap: 0.3rem;
  border: 1px solid rgba(107, 183, 255, 0.16);
  border-radius: 18px;
  padding: 1rem;
  background:
    linear-gradient(145deg, rgba(107, 183, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
}

.metric-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1;
}

.admin-record-list {
  display: grid;
  gap: 0.75rem;
}

.admin-filters {
  margin-bottom: 0.85rem;
}

.admin-filters input {
  width: 100%;
}

.admin-details {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.55rem 0.7rem;
  background: rgba(255, 255, 255, 0.035);
}

.admin-details summary,
.admin-preview summary {
  cursor: pointer;
  color: var(--soft);
  font-weight: 760;
}

.linked-set {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.65rem;
}

.linked-set h4 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
}

.linked-set p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
}

.timeline-list {
  display: grid;
  gap: 0.72rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-list li {
  display: grid;
  gap: 0.22rem;
  border-left: 3px solid rgba(107, 183, 255, 0.48);
  padding: 0.2rem 0 0.2rem 0.78rem;
}

.timeline-list time,
.timeline-list span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.timeline-list strong {
  color: var(--soft);
  line-height: 1.3;
}

.timeline-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.48;
}

.record-book-group {
  display: grid;
  gap: 0.72rem;
  margin-bottom: 1rem;
}

.record-book-group h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-preview {
  border: 1px solid rgba(107, 183, 255, 0.16);
  border-radius: 16px;
  padding: 0.75rem;
  background: rgba(107, 183, 255, 0.07);
}

.admin-preview div {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.admin-preview h3,
.admin-preview p {
  margin: 0;
}

.admin-preview pre {
  max-width: 100%;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.5;
}

.constructive-notice-module {
  display: grid;
  gap: clamp(1.35rem, 2.4vw, 2rem);
  max-width: 1040px;
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

.constructive-notice-module > h2 {
  max-width: 880px;
  font-size: clamp(1.25rem, 2.1vw, 1.72rem);
  line-height: 1.28;
}

.constructive-notice-module .notice-lede {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.78;
}

.notice-section {
  display: grid;
  gap: 0.82rem;
  border-top: 1px solid rgba(107, 183, 255, 0.18);
  padding-top: clamp(1.1rem, 2vw, 1.55rem);
}

.notice-section h3 {
  max-width: 920px;
  color: var(--text);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.38;
}

.notice-section h4 {
  margin-top: 0.35rem;
  color: var(--soft);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notice-section p {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

.notice-section .compact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.72rem;
  max-width: 920px;
  margin: 0.1rem 0 0;
  padding-left: 1.22rem;
}

.notice-section .compact-list li {
  color: var(--muted);
  line-height: 1.68;
  padding-left: 0.15rem;
}

.notice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.notice-table th,
.notice-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.95rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

.notice-table th {
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice-table td {
  color: var(--muted);
  line-height: 1.62;
}

.notice-table td:first-child {
  width: 32%;
  color: var(--text);
  font-weight: 720;
}

.fee-schedule-panel {
  margin-top: 1rem;
}

.fee-schedule-panel > p {
  max-width: 860px;
}

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

.fee-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.fee-table th,
.fee-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.82rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.fee-table th {
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fee-table td:last-child {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 760;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .constructive-notice-module {
    gap: 1.1rem;
    padding: 1rem;
  }

  .notice-table,
  .notice-table thead,
  .notice-table tbody,
  .notice-table tr,
  .notice-table th,
  .notice-table td {
    display: block;
    width: 100%;
  }

  .notice-table thead {
    display: none;
  }

  .notice-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 0;
  }

  .notice-table td {
    border-bottom: 0;
    padding: 0.22rem 0;
  }

  .notice-table td:first-child {
    width: 100%;
    margin-bottom: 0.2rem;
  }
}

.home-card::after {
  position: absolute;
  inset: auto 1rem 1rem auto;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(107, 183, 255, 0.22), transparent 68%);
  opacity: 0;
  transition: opacity 190ms ease;
}

.home-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px) rotateX(0.6deg);
}

.home-card:hover::after {
  opacity: 1;
}

.home-card p,
.muted {
  color: var(--muted);
}

.surface,
.admin-panel,
.citation-search-panel,
.citation-detail {
  padding: clamp(1rem, 2vw, 1.45rem);
}

.grid {
  display: grid;
  gap: 1rem;
}

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

.reference-page {
  display: grid;
  gap: clamp(1rem, 2vw, 1.45rem);
  max-width: 1080px;
  margin-inline: auto;
}

.reference-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(20rem, 0.82fr);
  gap: clamp(1rem, 2vw, 1.35rem);
  align-items: start;
}

.registrar-grid {
  grid-template-columns: minmax(20rem, 0.82fr) minmax(0, 1fr);
}

.instruction-card {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  padding: clamp(1.15rem, 2.4vw, 1.8rem);
}

.instruction-card.wide {
  gap: 0.72rem;
}

.instruction-card h2 {
  font-size: clamp(1.1rem, 1.6vw, 1.34rem);
  line-height: 1.3;
}

.instruction-card p {
  max-width: 850px;
  color: var(--muted);
  line-height: 1.72;
}

.terms-page {
  max-width: 1020px;
}

.terms-introduction,
.terms-section,
.terms-contact {
  display: grid;
  gap: 0.8rem;
  padding: clamp(1rem, 2.2vw, 1.55rem);
  border-radius: 8px;
}

.terms-introduction h2,
.terms-section h2,
.terms-contact h2 {
  line-height: 1.24;
}

.terms-section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.terms-section p,
.terms-introduction p,
.terms-contact p,
.terms-subsection li {
  color: var(--soft);
  font-size: 0.96rem;
  line-height: 1.75;
}

.terms-subsection {
  display: grid;
  gap: 0.58rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.terms-subsection h3 {
  color: var(--text);
  font-size: 1rem;
}

.terms-subsection ul {
  display: grid;
  gap: 0.48rem;
  margin: 0;
  padding-left: 1.25rem;
}

body.visitor-ack-open {
  overflow: hidden;
}

.visitor-ack-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.4rem);
  background:
    linear-gradient(135deg, rgba(6, 9, 15, 0.92), rgba(11, 18, 29, 0.9)),
    rgba(6, 9, 15, 0.9);
  backdrop-filter: blur(18px);
}

.visitor-ack-dialog {
  position: relative;
  display: grid;
  width: min(680px, 100%);
  max-height: calc(100vh - clamp(2rem, 8vw, 4.8rem));
  gap: 0.9rem;
  overflow: auto;
  border: 1px solid rgba(130, 190, 255, 0.28);
  border-radius: 8px;
  padding: clamp(1.25rem, 3.8vw, 2rem);
  background:
    linear-gradient(145deg, rgba(23, 31, 44, 0.98), rgba(10, 15, 24, 0.98)),
    var(--bg-2);
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.58);
}

.visitor-ack-seal {
  display: grid;
  width: 5rem;
  height: 5rem;
  place-items: center;
  border: 1px solid rgba(130, 190, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.visitor-ack-seal img {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
}

.visitor-ack-dialog h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3.2vw, 2.05rem);
  line-height: 1.15;
}

.visitor-ack-dialog p {
  margin: 0;
  color: var(--soft);
  line-height: 1.72;
}

.visitor-ack-terms {
  display: grid;
  max-height: min(34vh, 17rem);
  gap: 0.7rem;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 0.95rem;
  background: rgba(255, 255, 255, 0.045);
}

.visitor-ack-terms:focus-visible {
  outline: 3px solid rgba(107, 183, 255, 0.42);
  outline-offset: 3px;
}

.visitor-ack-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.68rem;
  align-items: start;
  color: var(--text);
  font-weight: 720;
}

.visitor-ack-check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.18rem;
  accent-color: var(--accent);
}

.visitor-ack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.verification-table {
  width: 100%;
  border-collapse: collapse;
}

.verification-table th,
.verification-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.95rem 0;
  text-align: left;
  vertical-align: top;
}

.verification-table tr:first-child th,
.verification-table tr:first-child td {
  padding-top: 0.2rem;
}

.verification-table tr:last-child th,
.verification-table tr:last-child td {
  border-bottom: 0;
  padding-bottom: 0.2rem;
}

.verification-table th {
  width: 8.75rem;
  padding-right: 1.2rem;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.verification-table td {
  color: var(--muted);
  line-height: 1.62;
}

.instruction-list {
  display: grid;
  gap: 0.72rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.instruction-list li {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  padding: 0.84rem 0.92rem 0.84rem 2.08rem;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  line-height: 1.62;
}

.instruction-list li::before {
  position: absolute;
  left: 0.92rem;
  top: 1.42rem;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(107, 183, 255, 0.11);
}

.postal-address {
  display: grid;
  gap: 0.36rem;
  border: 1px solid rgba(107, 183, 255, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(107, 183, 255, 0.09);
  color: var(--muted);
  font-style: normal;
  line-height: 1.58;
}

.postal-address strong {
  color: var(--text);
}

.postal-address span:nth-child(3) {
  color: var(--soft);
  font-weight: 740;
}

.record-note {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 0.85rem;
  font-size: 0.95rem;
}

.record-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease, background-color 190ms ease;
}

.record-card.compact {
  gap: 0.5rem;
  box-shadow: none;
}

.record-card.interactive:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.record-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.tag {
  display: inline-flex;
  max-width: 100%;
  min-height: 1.9rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.14rem 0.64rem;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 680;
}

button.tag {
  min-height: 2.45rem;
  color: var(--accent);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

button.tag:hover {
  border-color: rgba(107, 183, 255, 0.66);
  background: rgba(107, 183, 255, 0.11);
  transform: translateY(-1px);
}

.tag.blue {
  border-color: rgba(107, 183, 255, 0.34);
  background: rgba(107, 183, 255, 0.12);
  color: #bde0ff;
}

.tag.green {
  border-color: rgba(121, 222, 177, 0.34);
  background: rgba(121, 222, 177, 0.11);
  color: #b9f4d8;
}

.mono {
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.citation-workbench {
  display: grid;
  grid-template-columns: minmax(16rem, 25rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.citation-search-panel {
  position: sticky;
  top: 5.4rem;
  display: grid;
  max-height: calc(100vh - 7rem);
  gap: 1rem;
  overflow: auto;
}

.citation-list {
  display: grid;
  gap: 0.5rem;
}

.citation-result {
  display: grid;
  justify-content: stretch;
  gap: 0.18rem;
  width: 100%;
  min-height: 3.25rem;
  border-color: rgba(107, 183, 255, 0.34);
  background: rgba(107, 183, 255, 0.1);
  color: var(--text);
  text-align: left;
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease, background-color 190ms ease;
}

.citation-result strong,
.citation-result span,
.citation-provision h2,
.provision-text,
.record-card h2,
.notice-copy p {
  overflow-wrap: anywhere;
}

.citation-result span {
  color: var(--muted);
  font-size: 0.84rem;
}

.citation-result.active {
  border-color: rgba(107, 183, 255, 0.72);
  background: rgba(107, 183, 255, 0.14);
}

.citation-result:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.breadcrumbs span::after {
  content: "/";
  margin-left: 0.35rem;
  color: rgba(170, 180, 192, 0.48);
}

.citation-provision {
  display: grid;
  gap: 1rem;
}

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

.meta-grid div {
  display: grid;
  gap: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
}

.meta-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-grid strong {
  overflow-wrap: anywhere;
  color: var(--soft);
}

.provision-text {
  border: 1px solid rgba(107, 183, 255, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(6, 12, 22, 0.56);
  color: var(--soft);
  font-size: 1.02rem;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.82rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.callout {
  border: 1px solid rgba(107, 183, 255, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(107, 183, 255, 0.09);
  color: var(--soft);
}

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

.check-list p {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  padding: 0.82rem;
  background: rgba(255, 255, 255, 0.045);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
  gap: 1rem;
  align-items: start;
}

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

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

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

.crm-fee-field {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  padding: 0.85rem;
}

.crm-citation-select {
  min-height: 11.5rem;
  font-size: 0.86rem;
  line-height: 1.35;
}

.crm-citation-select option {
  padding: 0.42rem 0.5rem;
}

.crm-citation-checklist {
  display: grid;
  gap: 0.38rem;
  max-height: 17rem;
  overflow: auto;
  padding: 0.25rem;
  border-radius: 8px;
}

.crm-citation-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.58rem;
  align-items: start;
  border: 1px solid rgba(107, 183, 255, 0.16);
  border-radius: 7px;
  padding: 0.55rem 0.62rem;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.crm-citation-option:has(input:checked) {
  border-color: rgba(107, 183, 255, 0.62);
  background: rgba(107, 183, 255, 0.14);
}

.crm-citation-option input {
  width: auto;
  margin-top: 0.2rem;
}

.crm-citation-option span {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.crm-citation-option strong,
.crm-citation-option em,
.crm-citation-option b {
  display: block;
  overflow-wrap: anywhere;
  font-style: normal;
}

.crm-citation-option strong {
  color: var(--text);
  font-size: 0.82rem;
}

.crm-citation-option em {
  color: var(--soft);
  font-size: 0.78rem;
}

.crm-citation-option b {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 760;
}

.notice-template-guidance {
  display: grid;
  gap: 0.32rem;
  border: 1px solid rgba(107, 183, 255, 0.18);
  border-left: 3px solid rgba(107, 183, 255, 0.78);
  border-radius: 8px;
  padding: 0.72rem 0.82rem;
  background: rgba(107, 183, 255, 0.075);
}

.notice-template-guidance strong {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.25;
}

.notice-template-guidance p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.42;
}

.notice-template-warning {
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 205, 86, 0.12);
  color: #ffe19a !important;
}

.notice-body-text {
  color: #111827;
  line-height: 1.58;
  white-space: normal;
}

.notice-structured-body {
  display: grid;
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.28rem;
}

.field-label {
  color: var(--soft);
  font-weight: 700;
}

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

.check-control {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  padding: 0.78rem;
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
}

.check-control input {
  width: auto;
}

.check-field {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  padding: 0.78rem;
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
}

.check-field input {
  width: auto;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.section-heading-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading-row h2,
.section-heading-row p {
  margin: 0;
}

.section-heading-row p {
  margin-top: 0.35rem;
}

.remote-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.remote-table-wrap .empty-state {
  border: 0;
  background: transparent;
}

.admin-data-table {
  min-width: 920px;
  width: 100%;
  border-collapse: collapse;
}

.admin-data-table th,
.admin-data-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.72rem;
  vertical-align: top;
}

.admin-data-table td {
  color: var(--soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-data-table input,
.admin-data-table select {
  min-width: 9.5rem;
}

.profile-table {
  min-width: 1080px;
}

.profile-table td:last-child {
  display: grid;
  gap: 0.5rem;
  min-width: 14rem;
}

.metadata-details {
  min-width: 12rem;
}

.metadata-details pre {
  max-width: 24rem;
  margin: 0.55rem 0 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
}

.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.page-shell:has(.remote-admin-workspace) {
  width: min(1640px, calc(100vw - 0.65rem));
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.page-shell:has(.remote-admin-workspace) .page-head {
  display: none;
}

body:has(.remote-admin-workspace) .site-footer {
  display: none;
}

body:has(.remote-admin-workspace) .notice-ticker {
  display: none;
}

body:has(.remote-admin-workspace) .site-header {
  grid-template-columns: minmax(13rem, 1fr) auto;
  gap: 0.75rem;
  padding: 0.45rem max(0.6rem, calc((100vw - 1560px) / 2));
}

body:has(.remote-admin-workspace) .site-nav,
body:has(.remote-admin-workspace) .menu-button {
  display: none;
}

body:has(.remote-admin-workspace) .brand {
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.55rem;
}

body:has(.remote-admin-workspace) .brand-seal {
  width: 2rem;
  height: 2rem;
}

body:has(.remote-admin-workspace) .brand small {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

body:has(.remote-admin-workspace) .brand strong {
  font-size: 0.88rem;
}

.remote-admin-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.5rem;
  height: calc(100dvh - 3.95rem);
  min-height: 520px;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  line-height: 1.38;
}

.remote-crm-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.remote-crm-rail,
.remote-crm-content,
.public-case-result {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.remote-crm-rail {
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
}

.remote-crm-rail-head {
  display: grid;
  gap: 0.12rem;
  padding: 0.24rem 0.35rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.remote-crm-rail-head strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.1;
}

.remote-crm-rail-nav {
  display: grid;
  gap: 4px;
  align-content: start;
  overflow-y: auto;
  padding-right: 2px;
}

.remote-crm-rail-nav button {
  width: 100%;
  min-height: 2.05rem;
  justify-content: flex-start;
  text-align: left;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  border: 1px solid transparent;
  padding: 0.38rem 0.55rem;
  font-size: 0.82rem;
}

.remote-crm-rail-nav button.active,
.remote-crm-rail-nav button:hover {
  color: var(--text);
  border-color: rgba(95, 167, 255, 0.35);
  background: rgba(95, 167, 255, 0.12);
}

.remote-crm-rail-nav button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-crm-utility {
  display: grid;
  gap: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.04);
}

.remote-crm-utility summary {
  cursor: pointer;
  color: var(--soft);
  font-weight: 780;
}

.remote-crm-utility p {
  line-height: 1.45;
}

.compact-state {
  border-radius: 8px;
  padding: 0.7rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.remote-crm-content {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
}

.remote-crm-toolbar,
.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 0;
}

.remote-crm-content > .remote-crm-toolbar {
  grid-row: 1;
}

.remote-crm-content > .crm-status-message {
  grid-row: 2;
}

.remote-crm-content > .crm-workspace {
  grid-row: 3;
}

.remote-crm-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: end;
}

.crm-view-select {
  display: grid;
  gap: 0.18rem;
  min-width: min(17rem, 42vw);
}

.crm-view-select span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.crm-view-select select {
  min-height: 2.15rem;
  border-radius: 8px;
  padding: 0.38rem 2rem 0.38rem 0.62rem;
  font-size: 0.84rem;
}

.crm-status-message {
  margin: 0;
  border: 1px solid rgba(107, 183, 255, 0.24);
  border-radius: 8px;
  padding: 0.48rem 0.62rem;
  background: rgba(107, 183, 255, 0.09);
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.crm-status-message[hidden] {
  display: none;
}

.crm-status-message[data-state="pending"] {
  border-color: rgba(255, 207, 102, 0.34);
  background: rgba(255, 207, 102, 0.08);
}

.crm-status-message[data-state="error"] {
  border-color: rgba(255, 116, 116, 0.42);
  background: rgba(255, 116, 116, 0.09);
  color: #ffd1d1;
}

.remote-crm-toolbar h2,
.remote-role-panel h2,
.remote-audit-panel h2 {
  margin: 3px 0 0;
}

.remote-crm-toolbar h2 {
  font-size: 1.02rem;
}

.remote-crm-toolbar .eyebrow {
  font-size: 0.62rem;
}

.crm-session-bar {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-height: 2.85rem;
  padding: 0.32rem 0.15rem 0.42rem;
}

.crm-session-title {
  display: grid;
  gap: 0.05rem;
  min-width: 12rem;
}

.crm-session-title strong {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.12;
}

.crm-session-title span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crm-session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.crm-session-bar .muted {
  font-size: 0.8rem;
}

.crm-session-bar button {
  min-height: 2.1rem;
  padding: 0.38rem 0.7rem;
  font-size: 0.82rem;
}

.remote-admin-workspace .admin-panel {
  align-content: start;
  gap: 0.55rem;
}

.remote-admin-workspace .surface,
.remote-admin-workspace .admin-panel,
.remote-admin-workspace .record-card,
.remote-admin-workspace .metric-card,
.remote-admin-workspace .public-case-item,
.remote-admin-workspace .linked-record-list p,
.remote-admin-workspace .notice-meta-grid div {
  font-family: inherit;
}

.remote-admin-workspace h2,
.remote-admin-workspace h3,
.remote-admin-workspace h4,
.remote-admin-workspace p,
.remote-admin-workspace label,
.remote-admin-workspace span,
.remote-admin-workspace strong,
.remote-admin-workspace td,
.remote-admin-workspace th,
.remote-admin-workspace button,
.remote-admin-workspace input,
.remote-admin-workspace select,
.remote-admin-workspace textarea {
  letter-spacing: 0;
}

.remote-admin-workspace .admin-panel h2,
.remote-admin-workspace .admin-panel h3,
.remote-admin-workspace .admin-panel h4,
.remote-admin-workspace .record-card h2,
.remote-admin-workspace .record-card h3,
.remote-admin-workspace .record-topline h2,
.remote-admin-workspace .section-heading-row h2,
.remote-admin-workspace .section-heading-row h3 {
  margin: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 760;
  line-height: 1.18;
}

.remote-admin-workspace .record-topline,
.remote-admin-workspace .section-heading-row {
  align-items: center;
}

.remote-admin-workspace .record-topline > div,
.remote-admin-workspace .section-heading-row > div {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.remote-admin-workspace .record-topline p,
.remote-admin-workspace .section-heading-row p,
.remote-admin-workspace .admin-panel > p,
.remote-admin-workspace .record-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.38;
}

.remote-admin-workspace .admin-filter-grid {
  gap: 0.45rem;
}

.remote-admin-workspace .field {
  gap: 0.18rem;
}

.remote-admin-workspace .field label,
.remote-admin-workspace .check-field,
.remote-admin-workspace .form-note,
.remote-admin-workspace .muted {
  font-size: 0.78rem;
}

.remote-admin-workspace input,
.remote-admin-workspace select,
.remote-admin-workspace textarea {
  border-radius: 8px;
  padding: 0.46rem 0.58rem;
  font-size: 0.82rem;
}

.remote-admin-workspace textarea {
  min-height: 3.8rem;
}

.remote-admin-workspace button,
.remote-admin-workspace .button {
  min-height: 2.15rem;
  padding: 0.4rem 0.72rem;
  font-size: 0.84rem;
}

.remote-admin-workspace .actions button,
.remote-admin-workspace .crm-quick-add summary {
  border-radius: 8px;
  font-weight: 820;
}

.crm-workspace {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.crm-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: 8px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.crm-dashboard-main,
.crm-dashboard-side {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.crm-dashboard-main {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.crm-dashboard-side {
  grid-template-rows: minmax(0, 1fr) auto;
}

.crm-dashboard-panel {
  min-height: 0;
  overflow: auto;
  align-content: start;
}

.crm-workspace .metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.crm-dashboard-grid .metric-grid {
  margin-bottom: 0;
}

.crm-quick-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.dashboard-action {
  display: grid;
  min-height: 4rem;
  align-content: center;
  justify-items: start;
  gap: 0.22rem;
  border: 1px solid rgba(107, 183, 255, 0.22);
  border-radius: 8px;
  padding: 0.62rem;
  background: rgba(107, 183, 255, 0.07);
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.dashboard-action:hover,
.dashboard-action.active {
  border-color: rgba(107, 183, 255, 0.5);
  background: rgba(107, 183, 255, 0.14);
  transform: translateY(-1px);
}

.dashboard-action strong {
  font-size: 0.86rem;
  line-height: 1.15;
}

.dashboard-action span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.dashboard-deadline-list {
  display: grid;
  gap: 0.38rem;
}

.dashboard-deadline-list article {
  display: grid;
  grid-template-columns: 5.9rem minmax(0, 1fr) auto;
  gap: 0.22rem 0.45rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.035);
}

.dashboard-deadline-list time {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-deadline-list strong,
.dashboard-deadline-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-deadline-list strong {
  font-size: 0.82rem;
}

.dashboard-deadline-list span {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 0.74rem;
}

.dashboard-deadline-list em {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.14rem 0.38rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
  text-transform: capitalize;
}

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

.crm-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(24rem, 0.92fr);
  gap: 8px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.crm-split.wide {
  grid-template-columns: minmax(0, 1.12fr) minmax(25rem, 0.88fr);
}

.crm-list-panel,
.crm-single-panel {
  min-height: 0;
  overflow: auto;
}

.crm-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-width: 0;
  overflow: hidden;
  align-content: stretch;
}

.crm-detail-panel {
  display: block;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  align-self: stretch;
  scrollbar-gutter: auto;
}

.crm-single-panel {
  align-content: start;
}

.crm-form-record-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(340px, 1fr);
  gap: 8px;
  align-items: stretch;
  min-height: 0;
  height: calc(100% - 3.25rem);
}

.crm-form-pane,
.crm-record-pane {
  min-height: 0;
  overflow: auto;
}

.crm-form-pane {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.025);
}

.crm-form-pane .admin-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.crm-form-pane textarea[name="body"] {
  min-height: 8.5rem;
}

.crm-record-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.45rem;
  border: 1px solid rgba(107, 183, 255, 0.14);
  border-radius: 8px;
  padding: 0.55rem;
  background: rgba(107, 183, 255, 0.045);
}

.crm-record-pane h4 {
  margin: 0;
  color: var(--soft);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 820;
  line-height: 1.2;
}

.crm-record-pane .linked-record-list {
  min-height: 0;
  overflow: auto;
}

.matter-detail-panel {
  position: static;
}

.crm-quick-add {
  border: 1px solid rgba(107, 183, 255, 0.16);
  border-radius: 8px;
  padding: 0.55rem;
  background: rgba(107, 183, 255, 0.065);
}

.crm-quick-add summary {
  display: flex;
  width: fit-content;
  min-height: 2.15rem;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(107, 183, 255, 0.65);
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  background: linear-gradient(135deg, rgba(107, 183, 255, 0.92), rgba(124, 109, 255, 0.92));
  box-shadow: 0 14px 28px rgba(41, 117, 255, 0.18);
  cursor: pointer;
  color: #07101c;
  font-weight: 800;
  list-style: none;
}

.crm-quick-add summary::-webkit-details-marker {
  display: none;
}

.crm-quick-add summary::after {
  content: "+";
  display: inline-grid;
  width: 1.1rem;
  height: 1.1rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(7, 16, 28, 0.16);
  font-size: 0.82rem;
}

.crm-quick-add[open] summary::after {
  content: "−";
}

.crm-quick-add summary small {
  color: rgba(7, 16, 28, 0.7);
  font-size: 0.74rem;
  font-weight: 720;
}

.crm-quick-add form {
  margin-top: 0.6rem;
}

.compact-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.crm-quick-actions button {
  min-height: 1.9rem;
  padding: 0.34rem 0.52rem;
  font-size: 0.78rem;
}

.crm-detail-panel .notice-meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr));
}

.matter-detail-panel {
  display: grid;
  grid-template-rows: auto auto auto auto auto auto minmax(8rem, 1fr);
  gap: 0.45rem;
  padding: 0.72rem;
}

.matter-detail-panel .record-topline,
.matter-detail-panel .notice-meta-grid,
.matter-detail-panel > p,
.matter-detail-panel .tag-row,
.matter-detail-panel .crm-quick-actions,
.matter-detail-panel .matter-tabs {
  min-height: 0;
}

.matter-detail-panel .notice-meta-grid {
  gap: 0.34rem;
}

.matter-detail-panel .notice-meta-grid div {
  padding: 0.42rem;
}

.matter-detail-panel .tag-row {
  gap: 0.32rem;
}

.matter-detail-panel > p {
  margin: 0.15rem 0;
}

.remote-crm-content .remote-table-wrap {
  overflow: auto;
}

.crm-list-panel > .remote-table-wrap {
  align-self: stretch;
  height: 100%;
  min-height: 0;
  max-height: none;
}

.crm-list-panel .admin-data-table {
  min-width: 100%;
  table-layout: fixed;
}

.crm-list-panel .admin-data-table th,
.crm-list-panel .admin-data-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-admin-workspace .remote-table-wrap {
  overflow: auto;
  scrollbar-gutter: stable;
}

.remote-admin-workspace .admin-data-table {
  min-width: min(760px, 100%);
}

.admin-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(21, 27, 38, 0.98);
}

.remote-admin-workspace .admin-data-table th,
.remote-admin-workspace .admin-data-table td {
  padding: 0.4rem 0.48rem;
}

.remote-admin-workspace .admin-data-table th:last-child,
.remote-admin-workspace .admin-data-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 1%;
  min-width: 5.75rem;
  background: rgba(21, 27, 38, 0.98);
  box-shadow: -10px 0 14px rgba(6, 12, 22, 0.22);
  white-space: nowrap;
}

.remote-admin-workspace .admin-data-table th:last-child {
  z-index: 3;
}

.remote-admin-workspace .admin-data-table td {
  font-size: 0.82rem;
  line-height: 1.32;
}

.remote-admin-workspace .admin-data-table .compact-action,
.remote-admin-workspace .admin-data-table .compact-danger {
  min-height: 1.85rem;
  padding: 0.28rem 0.48rem;
  font-size: 0.72rem;
}

.remote-admin-workspace th {
  font-size: 0.66rem;
}

.remote-admin-workspace .notice-meta-grid {
  gap: 0.45rem;
}

.remote-admin-workspace .notice-meta-grid div,
.remote-admin-workspace .linked-record-list p,
.remote-admin-workspace .public-case-item {
  display: grid;
  align-content: start;
  gap: 0.16rem;
  border-radius: 6px;
  padding: 0.55rem;
}

.remote-admin-workspace .linked-record-list .linked-record-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
}

.remote-admin-workspace .linked-record-list .linked-record-row > span:first-child {
  display: grid;
  grid-template-columns: minmax(5.8rem, auto) minmax(0, 1fr) auto;
  gap: 0.28rem 0.45rem;
  align-items: center;
}

.remote-admin-workspace .linked-record-list .linked-record-row small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-amount {
  color: var(--soft);
  font-weight: 800;
  white-space: nowrap;
}

.remote-admin-workspace .metric-card {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.18rem;
  min-height: 4.35rem;
  border-radius: 8px;
  padding: 0.65rem;
}

.remote-admin-workspace .metric-card strong {
  font-size: 1.25rem;
  font-weight: 760;
  line-height: 1;
}

.remote-admin-workspace .metric-card span {
  font-size: 0.66rem;
  font-weight: 740;
  line-height: 1.15;
  text-transform: uppercase;
}

.matter-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  flex-wrap: wrap;
  margin: 10px 0 7px;
}

.matter-tabs button {
  border-radius: 999px;
  min-height: 1.85rem;
  padding: 0.3rem 0.52rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  box-shadow: none;
  font-size: 0.76rem;
  text-transform: capitalize;
}

.matter-tabs button.active {
  color: var(--text);
  border-color: rgba(95, 167, 255, 0.45);
  background: rgba(95, 167, 255, 0.14);
}

.matter-tab-panel,
.linked-record-list,
.public-case-list {
  display: grid;
  gap: 8px;
}

.matter-tab-panel {
  min-height: 8rem;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.025);
}

.matter-tab-panel .linked-record-list,
.matter-tab-panel .timeline-list {
  align-content: start;
}

.linked-record-list p,
.public-case-item {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.linked-record-list p {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.linked-record-list p > span:first-child {
  min-width: 0;
}

.record-inline-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

.crm-document-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(3, 7, 18, 0.74);
  backdrop-filter: blur(14px);
}

.crm-document-dialog {
  width: min(880px, 100%);
  max-height: min(92vh, 980px);
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.44);
}

.crm-document-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid #d7dde8;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.crm-document-toolbar h3 {
  margin: 0.05rem 0 0;
  color: #111827;
  font-size: 1.08rem;
  line-height: 1.2;
}

.crm-document-toolbar .eyebrow {
  color: #475569;
}

.crm-document-toolbar .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.crm-print-document {
  padding: 1.35rem;
  color: #111827;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}

.crm-document-header {
  display: grid;
  gap: 0.45rem;
  border-bottom: 2px solid #1d4ed8;
  padding-bottom: 1rem;
}

.crm-document-heading {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.crm-document-seal {
  flex: 0 0 auto;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 999px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 0 0 1px #cbd5e1;
}

.crm-document-header h2 {
  margin: 0;
  color: #111827;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.crm-document-header p {
  margin: 0;
}

.crm-document-header dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.65rem 0 0;
}

.crm-document-header dl div {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.52rem;
  background: #fff;
}

.crm-document-header dt,
.crm-document-section .notice-meta-grid span {
  color: #475569;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-document-header dd {
  margin: 0.12rem 0 0;
  color: #111827;
  font-weight: 760;
}

.crm-document-section {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.crm-document-section h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.crm-document-section p {
  margin: 0;
  color: #1f2937;
  white-space: pre-wrap;
}

.notice-document {
  gap: 0.85rem;
}

.notice-title-block {
  display: grid;
  gap: 0.32rem;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #1d4ed8;
  border-radius: 8px;
  padding: 0.82rem;
  background: #f8fbff;
}

.notice-title {
  margin: 0;
  color: #0f2f57;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.06rem;
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.notice-delivery {
  color: #475569 !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.notice-party-grid > div {
  display: grid;
  gap: 0.18rem;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  padding: 0.72rem;
  background: #fff;
}

.notice-party-grid span {
  color: #475569;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice-section {
  display: grid;
  gap: 0.4rem;
  border-top: 1px solid #d7dde8;
  padding-top: 0.72rem;
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.notice-section-title {
  margin: 0;
  color: #0f2f57;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  break-after: avoid;
  page-break-after: avoid;
}

.notice-section-body {
  display: grid;
  gap: 0.48rem;
}

.notice-section-body p {
  color: #1f2937;
  font-size: 0.94rem;
  line-height: 1.62;
  white-space: pre-wrap;
}

.notice-signature-block .notice-section-body {
  gap: 0.34rem;
}

.notice-signature-block p,
.notice-enclosures p {
  font-family: Georgia, "Times New Roman", serif;
}

.invoice-payee-notice {
  gap: 0.58rem;
  border: 1.5px solid #9a5a10;
  border-left: 5px solid #9a5a10;
  border-radius: 8px;
  padding: 0.85rem;
  background: #fff8eb;
  color: #172033;
  break-inside: avoid;
  page-break-inside: avoid;
}

.invoice-payee-notice__title {
  color: #713f12;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invoice-payee-notice p,
.invoice-payee-notice li {
  color: #1f2937;
  font-size: 0.86rem;
  line-height: 1.52;
}

.invoice-payee-notice__section {
  display: grid;
  gap: 0.34rem;
}

.invoice-payee-notice__section h5 {
  margin: 0;
  color: #713f12;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invoice-payee-notice ul {
  margin: 0.1rem 0 0;
  padding-left: 1.1rem;
}

.invoice-payee-notice li + li {
  margin-top: 0.18rem;
}

.crm-document-recipient {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem;
  background: #fff;
}

.crm-document-section .notice-meta-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.crm-document-section .notice-meta-grid div {
  border-color: #d7dde8;
  background: #fff;
}

.crm-document-section .notice-meta-grid strong {
  color: #111827;
}

.crm-document-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.88rem;
}

.crm-document-table th,
.crm-document-table td {
  border: 1px solid #cbd5e1;
  padding: 0.55rem;
  color: #111827;
  text-align: left;
  vertical-align: top;
}

.crm-document-table th {
  background: #eaf2ff;
  color: #0f172a;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.public-case-line-items {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.55rem;
  font-size: 0.82rem;
}

.public-case-line-items th,
.public-case-line-items td {
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  padding: 0.36rem 0.25rem;
  text-align: left;
  vertical-align: top;
}

.public-case-line-items th {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.public-case-result-shell {
  margin-top: 16px;
}

.public-case-result {
  padding: 18px;
}

.public-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.public-case-grid h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.public-case-item {
  display: grid;
  gap: 4px;
}

.public-case-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

.case-lookup-form {
  max-width: 760px;
}

.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  box-shadow: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

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

.docket-section {
  display: grid;
  gap: 0.55rem;
}

.empty-state {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.private-search-state,
.citation-empty-panel {
  display: grid;
  gap: 0.45rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem max(1rem, calc((100vw - var(--max)) / 2));
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(10, 12, 16, 0.78);
  backdrop-filter: blur(18px);
}

.site-footer span {
  max-width: min(100%, 42rem);
  line-height: 1.55;
}

.site-footer a {
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

@keyframes heroPlane {
  from {
    transform: rotateX(58deg) rotateZ(-18deg) translate3d(0, 0, -40px);
  }
  to {
    transform: rotateX(54deg) rotateZ(-13deg) translate3d(-1rem, 1rem, -10px);
  }
}

@keyframes heroGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.9;
  }
  to {
    transform: translate3d(2rem, -1rem, 0) scale(1.08);
    opacity: 0.7;
  }
}

@container (max-width: 820px) {
  .home-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-card:first-child,
  .home-card:nth-child(2) {
    grid-column: auto;
    grid-row: auto;
    min-height: 12rem;
  }
}

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

  .home-card:first-child,
  .home-card:nth-child(2) {
    grid-column: auto;
    grid-row: auto;
    min-height: 12rem;
  }

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

  .admin-two-column {
    grid-template-columns: 1fr;
  }

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

  .remote-crm-shell,
  .crm-dashboard-grid,
  .crm-form-record-layout,
  .crm-split,
  .crm-split.wide {
    grid-template-columns: 1fr;
  }

  .remote-admin-workspace {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .remote-crm-shell,
  .remote-crm-content,
  .crm-workspace {
    overflow: visible;
  }

  .remote-crm-rail {
    display: none;
  }

  .remote-crm-utility {
    display: none;
  }

  .crm-view-select {
    display: grid;
    min-width: min(100%, 18rem);
  }

  .remote-crm-rail-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .remote-crm-rail-nav button {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .crm-split,
  .crm-split.wide {
    height: auto;
  }

  .crm-dashboard-grid,
  .crm-form-record-layout {
    height: auto;
  }

  .crm-dashboard-main,
  .crm-dashboard-side,
  .crm-form-pane,
  .crm-record-pane {
    min-height: 0;
    overflow: visible;
  }

  .crm-quick-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-form-pane .admin-filter-grid {
    grid-template-columns: 1fr;
  }

  .crm-list-panel,
  .crm-detail-panel,
  .crm-single-panel {
    max-height: none;
    overflow: visible;
  }

  .remote-crm-content .remote-table-wrap {
    max-height: none;
  }

  .linked-record-list p {
    align-items: stretch;
    flex-direction: column;
  }

  .remote-admin-workspace .linked-record-list .linked-record-row,
  .remote-admin-workspace .linked-record-list .linked-record-row > span:first-child {
    grid-template-columns: 1fr;
  }

  .record-inline-actions {
    align-items: stretch;
  }

  .record-inline-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .record-inline-actions button {
    flex: 1 1 9rem;
  }

  .crm-document-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-document-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .crm-document-toolbar .actions button {
    width: 100%;
  }

  .crm-document-header dl,
  .crm-document-section .notice-meta-grid {
    grid-template-columns: 1fr;
  }

  .public-case-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
  }

  .menu-button {
    display: inline-grid;
    grid-template-columns: 1.08rem auto;
    grid-template-rows: repeat(3, 2px);
    align-content: center;
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0.24rem;
    min-height: 2.75rem;
    padding-inline: 0.88rem;
  }

  .menu-button span {
    grid-column: 1;
  }

  .menu-button b {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
  }

  .site-nav {
    display: flex;
    grid-column: 1 / -1;
    flex-direction: column;
    width: 100%;
    max-height: 0;
    gap: 0.35rem;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 0 0.55rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.25rem);
    transition: max-height 220ms ease, opacity 180ms ease, transform 180ms ease, padding 180ms ease, border-color 180ms ease, background-color 180ms ease;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .site-header.nav-open .site-nav {
    max-height: 80vh;
    border-color: rgba(107, 183, 255, 0.18);
    padding-block: 0.55rem;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    background: rgba(9, 14, 22, 0.86);
    box-shadow: var(--shadow);
  }

  .site-nav a {
    width: 100%;
    min-height: 2.9rem;
    justify-content: flex-start;
    padding: 0.7rem 0.85rem;
    border-radius: 16px;
  }

  .site-nav a::after {
    display: none;
  }

  .notice-ticker {
    min-height: 2.25rem;
    border-radius: 18px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 2.65rem, #000 calc(100% - 2.65rem), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 2.65rem, #000 calc(100% - 2.65rem), transparent 100%);
  }

  .notice-ticker::before,
  .notice-ticker::after {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 2.65rem;
    pointer-events: none;
    content: "";
  }

  .notice-ticker::before {
    left: 0;
    background: linear-gradient(90deg, rgba(10, 15, 23, 0.98), rgba(10, 15, 23, 0));
  }

  .notice-ticker::after {
    right: 0;
    background: linear-gradient(270deg, rgba(10, 15, 23, 0.98), rgba(10, 15, 23, 0));
  }

  .notice-ticker-track {
    animation-duration: 118s;
  }

  .notice-ticker-set {
    gap: 2.25rem;
    padding: 0.42rem 2.25rem 0.42rem 0;
  }

  .notice-ticker-set span {
    font-size: 0.68rem;
  }

  .home-hero,
  .grid.two,
  .reference-grid,
  .registrar-grid,
  .citation-workbench,
  .admin-grid,
  .form-grid,
  .admin-filter-grid,
  .search-row {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
  }

  .search-row {
    gap: 0.55rem;
  }

  .admin-session-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-tabs {
    border-radius: 16px;
  }

  .section-heading-row {
    display: grid;
  }

  .search-row button,
  .actions button,
  .actions .button {
    width: 100%;
  }

  .citation-search-panel {
    position: static;
    max-height: none;
  }

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

}

@media (max-width: 560px) {
  .site-header {
    gap: 0.62rem;
    padding: 0.62rem 0.72rem 0.7rem;
  }

  .brand {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.55rem;
  }

  .brand-seal {
    width: 2.25rem;
    height: 2.25rem;
  }

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

  .brand strong {
    font-size: 0.95rem;
  }

  .menu-button {
    grid-template-columns: 1.08rem;
    min-width: 2.85rem;
    min-height: 2.85rem;
    padding-inline: 0.85rem;
  }

  .menu-button b {
    display: none;
  }

  .notice-ticker {
    min-height: 2.05rem;
    border-radius: 15px;
  }

  .notice-ticker-set {
    gap: 1.8rem;
    padding-block: 0.36rem;
    padding-right: 1.8rem;
  }

  .notice-ticker-set span {
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .page-shell {
    width: min(100vw - 1rem, var(--max));
  }

  .home-hero {
    border-radius: 26px;
    gap: 0.82rem;
    margin-bottom: 0.55rem;
    padding: 0.88rem 0.82rem 0.95rem;
  }

  .hero-portrait-bg {
    right: -38%;
    bottom: -3rem;
    width: 92vw;
    height: 76%;
    opacity: 0.08;
  }

  .home-copy {
    gap: 0.72rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.9rem, 9.2vw, 2.55rem);
  }

  .home-copy h1 {
    max-width: 100%;
    font-size: clamp(1.22rem, 5.35vw, 1.58rem);
    line-height: 1.16;
  }

  .lead,
  .estate-line {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .portal-title {
    font-size: 0.92rem;
  }

  .office-identity {
    gap: 0.22rem;
    font-size: 0.83rem;
    line-height: 1.38;
  }

  .quick-search {
    gap: 0.34rem;
    padding: 0.68rem;
  }

  .quick-search .search-row {
    gap: 0.48rem;
  }

  .quick-search input,
  .quick-search button {
    min-height: 2.85rem;
    padding: 0.72rem 0.9rem;
  }

  .record-card,
  .landing-panel,
  .citation-search-panel,
  .citation-detail,
  .admin-panel,
  .surface {
    border-radius: 18px;
    padding: 0.95rem;
  }

  .record-topline {
    gap: 0.62rem;
  }

  .tag-row {
    gap: 0.38rem;
  }

  .meta-grid div {
    border-radius: 15px;
    padding: 0.72rem;
  }

  .home-cards,
  .meta-grid,
  .admin-metric-grid,
  .landing-reference,
  .compact-list {
    grid-template-columns: 1fr;
  }

  .landing-panel,
  .landing-panel.wide {
    grid-column: auto;
  }

  .instrument-list div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .instruction-card {
    gap: 0.74rem;
    padding: 1rem;
  }

  .verification-table,
  .verification-table tbody,
  .verification-table tr,
  .verification-table th,
  .verification-table td {
    display: block;
    width: 100%;
  }

  .verification-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.78rem 0;
  }

  .verification-table tr:first-child {
    padding-top: 0.1rem;
  }

  .verification-table tr:last-child {
    border-bottom: 0;
    padding-bottom: 0.1rem;
  }

  .verification-table th,
  .verification-table td,
  .verification-table tr:first-child th,
  .verification-table tr:first-child td,
  .verification-table tr:last-child th,
  .verification-table tr:last-child td {
    border-bottom: 0;
    padding: 0.16rem 0;
  }

  .verification-table th {
    width: 100%;
    white-space: normal;
  }

  .home-logo-card img {
    width: clamp(5.9rem, 24vw, 7.4rem);
  }

  .home-logo-card {
    gap: 0.34rem;
    min-height: clamp(8.6rem, 35vw, 10.1rem);
    margin-bottom: 0.5rem;
    padding: 0.22rem 0.5rem;
  }

  .home-logo-card::before {
    width: clamp(7.7rem, 32vw, 9.3rem);
  }

  .home-logo-card figcaption {
    font-size: 0.66rem;
  }
}

@media (max-width: 390px) {
  .brand {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.55rem;
  }

  .brand-seal {
    width: 2.25rem;
    height: 2.25rem;
  }

  .brand small {
    font-size: 0.58rem;
  }

  .brand strong {
    font-size: 0.92rem;
  }

  .menu-button b {
    display: none;
  }

  .menu-button {
    min-width: 2.75rem;
    padding-inline: 0.78rem;
  }
}

@media (hover: none) {
  button:hover,
  .button:hover,
  .home-card:hover,
  .citation-result:hover,
  button.tag:hover {
    box-shadow: none;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  button:hover,
  .button:hover,
  .home-card:hover,
  .citation-result:hover {
    transform: none;
  }

  .notice-ticker {
    border-radius: 18px;
  }

  .notice-ticker-track {
    width: auto;
    animation: none !important;
  }

  .notice-ticker-set {
    flex-wrap: wrap;
    gap: 0.85rem 1.35rem;
    padding: 0.55rem 0.75rem;
  }

  .notice-ticker-set[aria-hidden="true"] {
    display: none;
  }

  .notice-ticker-set span {
    white-space: normal;
  }
}

@media print {
  .site-header,
  .site-footer,
  .actions,
  .citation-search-panel {
    display: none;
  }

  body {
    background: #fff;
    color: #111827;
  }

  body:has(.crm-document-modal) .page-shell {
    display: none;
  }

  .page-shell {
    width: auto;
    padding: 0;
  }

  .crm-document-modal {
    position: static;
    display: block;
    padding: 0;
    background: #fff;
    backdrop-filter: none;
  }

  .crm-document-dialog {
    width: auto;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .crm-document-toolbar {
    display: none;
  }

  .crm-print-document {
    padding: 0;
  }

  .invoice-payee-notice {
    background: #fffdf7 !important;
    color: #111827 !important;
    border-color: #8a4b0b !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .notice-title-block,
  .notice-party-grid > div,
  .notice-section {
    background: #fff !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .notice-section-title {
    break-after: avoid;
    page-break-after: avoid;
  }
}

.not-found-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(63, 139, 255, 0.14), transparent 34rem),
    linear-gradient(135deg, #0a0c10 0%, #111827 48%, #0d1320 100%);
}

.not-found-page {
  width: min(920px, calc(100% - 2rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) 0;
  display: grid;
  align-content: center;
  gap: 1.5rem;
}

.not-found-brand {
  justify-self: center;
}

.not-found-panel {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 12, 16, 0.72);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  padding: clamp(1.5rem, 5vw, 3rem);
  text-align: center;
}

.not-found-panel h1 {
  margin: 0.4rem 0 0.85rem;
  font-size: clamp(2.1rem, 7vw, 4.5rem);
}

.not-found-panel p {
  max-width: 48rem;
  margin: 0 auto 1.35rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.not-found-panel .actions {
  justify-content: center;
}

/* Advanced private case-management workspaces */
.advanced-workspace {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
}

.advanced-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pipeline-workspace,
.billing-workspace,
.reports-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
}

.pipeline-board {
  display: grid;
  grid-auto-columns: minmax(15rem, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-bottom: 4px;
}

.pipeline-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.pipeline-column > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 0.55rem;
}

.pipeline-column > header b {
  display: grid;
  min-width: 1.5rem;
  min-height: 1.5rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(107, 183, 255, 0.12);
  font-size: 0.72rem;
}

.pipeline-color {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--stage-color);
}

.pipeline-cards {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 8rem;
  overflow: auto;
  padding: 6px;
}

.pipeline-card {
  display: grid;
  gap: 0.32rem;
  border: 1px solid rgba(107, 183, 255, 0.16);
  border-radius: 7px;
  padding: 0.58rem;
  background: rgba(13, 19, 32, 0.82);
}

.pipeline-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-card small,
.advanced-table-wrap small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-card select {
  min-height: 1.9rem;
  padding-block: 0.25rem;
}

.pipeline-empty {
  margin: 0;
  padding: 0.7rem;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.advanced-table-wrap {
  min-height: 12rem;
  flex: 1;
}

.advanced-workspace.crm-single-panel {
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.advanced-workspace.crm-single-panel > .remote-table-wrap,
.advanced-workspace.crm-single-panel > .communication-timeline {
  min-height: 0;
  overflow: auto;
}

.admin-data-table tr.is-overdue td {
  background: rgba(255, 116, 116, 0.07);
}

.communication-timeline {
  display: grid;
  align-content: start;
  gap: 6px;
}

.communication-timeline article {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.62rem;
  background: rgba(255, 255, 255, 0.03);
}

.communication-timeline time {
  color: var(--muted);
  font-size: 0.72rem;
}

.communication-timeline article > div {
  display: grid;
  gap: 0.22rem;
}

.communication-timeline span {
  color: var(--muted);
  font-size: 0.72rem;
}

.communication-timeline p {
  white-space: pre-wrap;
}

.advanced-three-column {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}

.billing-workspace > .advanced-three-column {
  overflow: auto;
}

.billing-workspace {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.reports-workspace {
  grid-template-rows: auto minmax(0, 1fr);
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

.report-bars {
  display: grid;
  gap: 0.6rem;
}

.report-bars > div {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(6rem, 2fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.report-bars span {
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-bars i {
  height: 0.48rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--bar), rgba(255, 255, 255, 0.08) var(--bar));
}

.report-bars strong {
  font-size: 0.74rem;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .advanced-summary-bar,
  .advanced-three-column,
  .reports-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-board {
    grid-auto-columns: minmax(13rem, 78vw);
  }
}

@media (max-width: 640px) {
  .advanced-summary-bar,
  .advanced-three-column,
  .reports-grid {
    grid-template-columns: 1fr;
  }

  .communication-timeline article {
    grid-template-columns: 1fr;
  }

  .report-bars > div {
    grid-template-columns: minmax(6rem, 1fr) minmax(4rem, 1.5fr) auto;
  }
}

/* Authenticated operator guide */
.remote-admin-workspace .crm-guide-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
  padding: 0;
}

.remote-admin-workspace .crm-guide-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--crm-border);
  background: var(--crm-surface-raised);
}

.remote-admin-workspace .crm-guide-header > div,
.remote-admin-workspace .crm-guide-section-heading,
.remote-admin-workspace .crm-guide-support {
  display: grid;
  gap: 6px;
}

.remote-admin-workspace .crm-guide-header h3,
.remote-admin-workspace .crm-guide-header p,
.remote-admin-workspace .crm-guide-sidebar h4,
.remote-admin-workspace .crm-guide-sidebar p,
.remote-admin-workspace .crm-guide-content h4,
.remote-admin-workspace .crm-guide-content p {
  margin: 0;
}

.remote-admin-workspace .crm-guide-header h3 {
  font-size: 18px;
  line-height: 1.3;
}

.remote-admin-workspace .crm-guide-header p {
  max-width: 58rem;
  color: var(--crm-muted);
  line-height: 1.55;
}

.remote-admin-workspace .crm-guide-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 0.3fr) minmax(0, 0.7fr);
  min-height: 0;
  overflow: hidden;
}

.remote-admin-workspace .crm-guide-sidebar,
.remote-admin-workspace .crm-guide-content {
  min-height: 0;
  overflow-y: auto;
}

.remote-admin-workspace .crm-guide-sidebar {
  display: grid;
  align-content: start;
  border-right: 1px solid var(--crm-border);
  background: #0d1522;
}

.remote-admin-workspace .crm-guide-sidebar section {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--crm-border);
}

.remote-admin-workspace .crm-guide-sidebar h4,
.remote-admin-workspace .crm-guide-section-heading h4,
.remote-admin-workspace .crm-guide-support h4 {
  color: var(--crm-text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.remote-admin-workspace .crm-guide-sidebar p,
.remote-admin-workspace .crm-guide-sidebar li,
.remote-admin-workspace .crm-guide-support li {
  color: var(--crm-muted);
  font-size: 12px;
  line-height: 1.6;
}

.remote-admin-workspace .crm-guide-sidebar ol,
.remote-admin-workspace .crm-guide-support ol,
.remote-admin-workspace .crm-guide-feature-body ol {
  margin: 0;
  padding-left: 1.25rem;
}

.remote-admin-workspace .crm-guide-sidebar li + li,
.remote-admin-workspace .crm-guide-support li + li,
.remote-admin-workspace .crm-guide-feature-body li + li {
  margin-top: 5px;
}

.remote-admin-workspace .crm-guide-content {
  padding: 0 20px 24px;
  background: var(--crm-surface);
}

.remote-admin-workspace .crm-guide-section-heading {
  padding: 18px 0 12px;
}

.remote-admin-workspace .crm-guide-section-heading p {
  color: var(--crm-muted);
  font-size: 12px;
}

.remote-admin-workspace .crm-guide-feature {
  border-top: 1px solid var(--crm-border);
}

.remote-admin-workspace .crm-guide-feature:last-of-type {
  border-bottom: 1px solid var(--crm-border);
}

.remote-admin-workspace .crm-guide-feature summary {
  display: grid;
  grid-template-columns: minmax(10rem, 0.34fr) minmax(0, 0.66fr);
  gap: 16px;
  align-items: center;
  min-height: 54px;
  position: relative;
  padding: 10px 34px 10px 0;
  cursor: pointer;
  list-style: none;
}

.remote-admin-workspace .crm-guide-feature summary::-webkit-details-marker {
  display: none;
}

.remote-admin-workspace .crm-guide-feature summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--crm-border-strong);
  border-radius: 4px;
  color: var(--crm-accent);
  font-size: 16px;
  line-height: 1;
}

.remote-admin-workspace .crm-guide-feature[open] summary::after {
  content: "-";
}

.remote-admin-workspace .crm-guide-feature summary strong {
  color: var(--crm-text);
  font-size: 13px;
  line-height: 1.4;
}

.remote-admin-workspace .crm-guide-feature summary span {
  color: var(--crm-muted);
  font-size: 12px;
  line-height: 1.45;
}

.remote-admin-workspace .crm-guide-feature-body {
  display: grid;
  gap: 12px;
  padding: 2px 34px 16px min(12rem, 34%);
}

.remote-admin-workspace .crm-guide-feature-body li {
  color: #c7d1df;
  font-size: 12px;
  line-height: 1.6;
}

.remote-admin-workspace .crm-guide-note {
  border-left: 3px solid var(--crm-accent);
  padding: 8px 10px;
  background: rgba(98, 173, 255, 0.07);
  color: var(--crm-muted);
  font-size: 12px;
  line-height: 1.55;
}

.remote-admin-workspace .crm-guide-support {
  margin-top: 20px;
  border-top: 1px solid var(--crm-border);
  padding-top: 18px;
}

@media (max-width: 960px) {
  .remote-admin-workspace .crm-guide-workspace {
    height: auto;
    overflow: visible;
  }

  .remote-admin-workspace .crm-guide-layout {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .remote-admin-workspace .crm-guide-sidebar,
  .remote-admin-workspace .crm-guide-content {
    overflow: visible;
  }

  .remote-admin-workspace .crm-guide-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--crm-border);
  }
}

@media (max-width: 640px) {
  .remote-admin-workspace .crm-guide-header,
  .remote-admin-workspace .crm-guide-feature summary {
    grid-template-columns: 1fr;
  }

  .remote-admin-workspace .crm-guide-header {
    padding: 15px;
  }

  .remote-admin-workspace .crm-guide-content {
    padding-inline: 15px;
  }

  .remote-admin-workspace .crm-guide-feature summary {
    gap: 3px;
  }

  .remote-admin-workspace .crm-guide-feature-body {
    padding-left: 0;
  }
}

/* Enterprise CRM interface */
body:has(.remote-admin-workspace) {
  --crm-canvas: #0b111b;
  --crm-surface: #111a28;
  --crm-surface-raised: #172232;
  --crm-surface-soft: #1b2738;
  --crm-border: #2a394d;
  --crm-border-strong: #3b4e66;
  --crm-text: #f2f5f9;
  --crm-muted: #9aa8ba;
  --crm-accent: #62adff;
  --crm-accent-strong: #388de8;
  --crm-danger: #e5737b;
  --crm-success: #43bd91;
  background: var(--crm-canvas);
}

body:has(.remote-admin-workspace) .page-shell {
  width: min(100%, 1920px);
}

.remote-admin-workspace {
  gap: 8px;
  color: var(--crm-text);
  font-size: 13px;
  line-height: 1.45;
}

.remote-admin-workspace *,
.remote-admin-workspace *::before,
.remote-admin-workspace *::after {
  min-width: 0;
}

.remote-admin-workspace .remote-crm-content,
.remote-admin-workspace .crm-list-panel,
.remote-admin-workspace .crm-detail-panel,
.remote-admin-workspace .crm-single-panel,
.remote-admin-workspace .crm-dashboard-panel,
.remote-admin-workspace .crm-form-pane,
.remote-admin-workspace .crm-record-pane {
  border-color: var(--crm-border);
  background: var(--crm-surface);
  box-shadow: none;
}

.remote-admin-workspace .crm-session-bar {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 56px;
  padding: 6px 2px 10px;
}

.remote-admin-workspace .crm-session-title {
  gap: 2px;
}

.remote-admin-workspace .crm-session-title strong {
  font-size: 15px;
  line-height: 1.3;
}

.remote-admin-workspace .crm-session-title span,
.remote-admin-workspace .eyebrow,
.remote-admin-workspace .crm-view-select span,
.remote-admin-workspace th {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-transform: uppercase;
}

.remote-admin-workspace .crm-session-meta {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 10px;
  align-items: center;
}

.remote-admin-workspace .crm-session-meta .tag {
  grid-row: 1 / span 2;
  align-self: center;
}

.remote-admin-workspace .crm-session-meta .muted {
  max-width: 24rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-admin-workspace .remote-crm-shell {
  gap: 0;
}

.remote-admin-workspace .remote-crm-content {
  gap: 10px;
  padding: 12px;
  border-radius: 6px;
}

.remote-admin-workspace .remote-crm-toolbar {
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) auto;
  gap: 16px;
  align-items: end;
  min-height: 48px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--crm-border);
}

.remote-admin-workspace .remote-crm-toolbar h2 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.remote-admin-workspace .remote-crm-toolbar-actions {
  display: grid;
  grid-template-columns: minmax(15rem, 22rem) auto;
  gap: 8px;
  align-items: end;
}

.remote-admin-workspace .crm-view-select {
  gap: 4px;
  min-width: 0;
}

.remote-admin-workspace input,
.remote-admin-workspace select,
.remote-admin-workspace textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--crm-border-strong);
  border-radius: 6px;
  padding: 8px 10px;
  background: #0d1522;
  color: var(--crm-text);
  font: inherit;
  line-height: 1.35;
}

.remote-admin-workspace textarea {
  min-height: 92px;
  resize: vertical;
}

.remote-admin-workspace input:focus,
.remote-admin-workspace select:focus,
.remote-admin-workspace textarea:focus {
  border-color: var(--crm-accent);
  outline: 2px solid rgba(98, 173, 255, 0.18);
  outline-offset: 0;
}

.remote-admin-workspace button,
.remote-admin-workspace .button {
  min-height: 36px;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.remote-admin-workspace button:not(.secondary):not(.danger):not(.compact-danger),
.remote-admin-workspace .button:not(.secondary):not(.danger) {
  border-color: var(--crm-accent-strong);
  background: var(--crm-accent-strong);
  color: #fff;
  box-shadow: none;
}

.remote-admin-workspace button.secondary,
.remote-admin-workspace .button.secondary,
.remote-admin-workspace .matter-tabs button {
  border-color: var(--crm-border-strong);
  background: var(--crm-surface-raised);
  color: var(--crm-text);
  box-shadow: none;
}

.remote-admin-workspace .matter-tabs button:not(.secondary):not(.danger):not(.compact-danger),
.remote-admin-workspace button.dashboard-action:not(.secondary):not(.danger):not(.compact-danger) {
  border-color: var(--crm-border-strong);
  background: var(--crm-surface-raised);
  color: var(--crm-text);
  box-shadow: none;
}

.remote-admin-workspace button.dashboard-action:not(.secondary):not(.danger):not(.compact-danger) {
  color: var(--crm-text);
}

.remote-admin-workspace button.danger,
.remote-admin-workspace button.compact-danger {
  border-color: rgba(229, 115, 123, 0.48);
  background: rgba(229, 115, 123, 0.1);
  color: #ffc2c7;
  box-shadow: none;
}

.remote-admin-workspace button:hover,
.remote-admin-workspace .button:hover {
  filter: brightness(1.08);
  transform: none;
}

.remote-admin-workspace .crm-split,
.remote-admin-workspace .crm-split.wide {
  grid-template-columns: minmax(0, 1.32fr) minmax(22rem, 0.68fr);
  gap: 10px;
}

.remote-admin-workspace .crm-list-panel,
.remote-admin-workspace .crm-detail-panel,
.remote-admin-workspace .crm-single-panel {
  border: 1px solid var(--crm-border);
  border-radius: 6px;
}

.remote-admin-workspace .crm-list-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.remote-admin-workspace .crm-quick-add {
  border: 0;
  border-bottom: 1px solid var(--crm-border);
  border-radius: 0;
  padding: 10px;
  background: transparent;
}

.remote-admin-workspace .crm-quick-add summary {
  display: inline-flex;
  width: auto;
  min-height: 36px;
  gap: 10px;
  justify-content: flex-start;
  border: 1px solid var(--crm-accent-strong);
  border-radius: 6px;
  padding: 7px 12px;
  background: var(--crm-accent-strong);
  color: #fff;
  box-shadow: none;
  line-height: 1.25;
}

.remote-admin-workspace .crm-quick-add summary small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

.remote-admin-workspace .crm-quick-add summary::after {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.16);
}

.remote-admin-workspace .crm-quick-add[open] summary::after {
  content: "-";
}

.remote-admin-workspace .remote-table-wrap {
  border: 0;
  border-radius: 0;
  background: #0f1724;
}

.remote-admin-workspace .crm-list-panel .admin-data-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.remote-admin-workspace .admin-data-table th,
.remote-admin-workspace .admin-data-table td {
  min-width: 7.5rem;
  padding: 10px 12px;
  border-bottom-color: var(--crm-border);
  vertical-align: middle;
  text-align: left;
}

.remote-admin-workspace .admin-data-table th:first-child,
.remote-admin-workspace .admin-data-table td:first-child {
  min-width: 9.5rem;
}

.remote-admin-workspace .admin-data-table th:nth-child(2),
.remote-admin-workspace .admin-data-table td:nth-child(2) {
  min-width: 12rem;
}

.remote-admin-workspace .admin-data-table td {
  height: 54px;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
}

.remote-admin-workspace .admin-data-table td a,
.remote-admin-workspace .admin-data-table td > span,
.remote-admin-workspace .admin-data-table td > strong {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.remote-admin-workspace .admin-data-table th {
  top: 0;
  z-index: 2;
  height: 38px;
  background: #121c2a;
  color: #b9c6d6;
  white-space: nowrap;
}

.remote-admin-workspace .admin-data-table th:last-child,
.remote-admin-workspace .admin-data-table td:last-child {
  min-width: 7.5rem;
  background: #121c2a;
  box-shadow: -12px 0 18px rgba(5, 9, 15, 0.42);
}

.remote-admin-workspace .admin-data-table tbody tr:hover td {
  background: #182435;
}

.remote-admin-workspace .admin-data-table tbody tr:hover td:last-child {
  background: #1b293c;
}

.remote-admin-workspace .matter-detail-panel {
  grid-template-rows: repeat(6, max-content) minmax(10rem, 1fr);
  gap: 10px;
  align-content: start;
  padding: 14px;
}

.remote-admin-workspace .record-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.remote-admin-workspace .record-topline h2,
.remote-admin-workspace .record-topline h3,
.remote-admin-workspace .record-topline h4 {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.35;
}

.remote-admin-workspace .record-topline .tag {
  justify-self: end;
}

.remote-admin-workspace .notice-meta-grid,
.remote-admin-workspace .crm-detail-panel .notice-meta-grid,
.remote-admin-workspace .compact-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: max-content;
}

.remote-admin-workspace .notice-meta-grid div {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 3px;
  min-height: 64px;
  border: 1px solid var(--crm-border);
  border-radius: 5px;
  padding: 8px 10px;
  background: var(--crm-surface-raised);
}

.remote-admin-workspace .notice-meta-grid div > span {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.remote-admin-workspace .notice-meta-grid div > strong {
  align-self: start;
  overflow-wrap: anywhere;
  color: var(--crm-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
}

.remote-admin-workspace .crm-detail-panel > p {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
}

.remote-admin-workspace .tag-row,
.remote-admin-workspace .crm-quick-actions,
.remote-admin-workspace .record-inline-actions {
  gap: 6px;
}

.remote-admin-workspace .tag {
  max-width: 100%;
  border-radius: 4px;
  padding: 4px 8px;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}

.remote-admin-workspace .crm-quick-actions button,
.remote-admin-workspace .record-inline-actions button,
.remote-admin-workspace .admin-data-table .compact-action,
.remote-admin-workspace .admin-data-table .compact-danger {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.remote-admin-workspace .matter-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0;
  padding: 0 0 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.remote-admin-workspace .matter-tabs button {
  flex: 0 0 auto;
  min-height: 32px;
  border-radius: 5px;
  padding: 6px 9px;
  font-size: 12px;
}

.remote-admin-workspace .matter-tabs button.active {
  border-color: var(--crm-accent);
  background: rgba(98, 173, 255, 0.15);
  color: #fff;
}

.remote-admin-workspace .matter-tabs button.active:not(.secondary):not(.danger):not(.compact-danger) {
  border-color: var(--crm-accent);
  background: rgba(98, 173, 255, 0.15);
  color: #fff;
}

.remote-admin-workspace .matter-tab-panel {
  min-height: 10rem;
  border-color: var(--crm-border);
  border-radius: 5px;
  padding: 8px;
  background: #0d1522;
}

.remote-admin-workspace .linked-record-list {
  gap: 6px;
}

.remote-admin-workspace .linked-record-list .linked-record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-color: var(--crm-border);
  background: var(--crm-surface-raised);
}

.remote-admin-workspace .linked-record-list .linked-record-row > span:first-child {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  align-items: start;
}

.remote-admin-workspace .linked-record-list .linked-record-row strong,
.remote-admin-workspace .linked-record-list .linked-record-row small {
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: normal;
}

.remote-admin-workspace .linked-record-list .linked-record-row small {
  display: -webkit-box;
  color: var(--crm-muted);
  font-size: 12px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.remote-admin-workspace .metric-grid,
.remote-admin-workspace .advanced-summary-bar {
  gap: 8px;
}

.remote-admin-workspace .metric-card {
  min-height: 82px;
  border: 1px solid var(--crm-border);
  border-radius: 6px;
  padding: 12px;
  background: var(--crm-surface-raised);
}

.remote-admin-workspace .metric-card strong {
  color: var(--crm-text);
  font-size: 20px;
  line-height: 1.15;
}

.remote-admin-workspace .metric-card span {
  color: var(--crm-muted);
  font-size: 11px;
  line-height: 1.35;
}

.remote-admin-workspace .field {
  display: grid;
  gap: 5px;
}

.remote-admin-workspace .field label,
.remote-admin-workspace .check-field,
.remote-admin-workspace .form-note {
  color: var(--crm-muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.remote-admin-workspace .check-field input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.remote-admin-workspace .pipeline-card,
.remote-admin-workspace .communication-timeline article,
.remote-admin-workspace .crm-form-pane,
.remote-admin-workspace .crm-record-pane,
.remote-admin-workspace .reports-grid > *,
.remote-admin-workspace .advanced-three-column > * {
  border-color: var(--crm-border);
  border-radius: 6px;
  background: var(--crm-surface-raised);
}

.remote-admin-workspace .communication-timeline article {
  grid-template-columns: minmax(7.5rem, 9rem) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.remote-admin-workspace .communication-timeline p,
.remote-admin-workspace .communication-timeline span,
.remote-admin-workspace .communication-timeline strong {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

@media (max-width: 1240px) {
  .remote-admin-workspace .crm-split,
  .remote-admin-workspace .crm-split.wide {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.72fr);
  }

  .remote-admin-workspace .crm-detail-panel .notice-meta-grid,
  .remote-admin-workspace .notice-meta-grid,
  .remote-admin-workspace .compact-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .remote-admin-workspace {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .remote-admin-workspace .remote-crm-content,
  .remote-admin-workspace .crm-workspace {
    overflow: visible;
  }

  .remote-admin-workspace .crm-split,
  .remote-admin-workspace .crm-split.wide,
  .remote-admin-workspace .crm-form-record-layout,
  .remote-admin-workspace .crm-dashboard-grid {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .remote-admin-workspace .crm-list-panel,
  .remote-admin-workspace .crm-detail-panel,
  .remote-admin-workspace .crm-single-panel {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .remote-admin-workspace .crm-list-panel > .remote-table-wrap {
    min-height: 24rem;
    max-height: 38rem;
  }

  .remote-admin-workspace .matter-detail-panel {
    min-height: 36rem;
  }
}

@media (max-width: 760px) {
  .remote-admin-workspace .crm-session-bar,
  .remote-admin-workspace .remote-crm-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .remote-admin-workspace .crm-session-meta {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .remote-admin-workspace .remote-crm-toolbar-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .remote-admin-workspace .remote-crm-content {
    padding: 8px;
  }

  .remote-admin-workspace .crm-detail-panel .notice-meta-grid,
  .remote-admin-workspace .notice-meta-grid,
  .remote-admin-workspace .compact-meta-grid,
  .remote-admin-workspace .advanced-summary-bar,
  .remote-admin-workspace .metric-grid,
  .remote-admin-workspace .reports-grid,
  .remote-admin-workspace .advanced-three-column,
  .remote-admin-workspace .crm-quick-action-grid {
    grid-template-columns: 1fr;
  }

  .remote-admin-workspace .linked-record-list .linked-record-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .remote-admin-workspace .record-inline-actions {
    justify-content: flex-start;
  }

  .remote-admin-workspace .record-inline-actions button {
    flex: 1 1 9rem;
  }

  .remote-admin-workspace .communication-timeline article {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .remote-admin-workspace .crm-session-meta,
  .remote-admin-workspace .remote-crm-toolbar-actions {
    grid-template-columns: 1fr;
  }

  .remote-admin-workspace .crm-session-meta .tag {
    grid-row: auto;
  }

  .remote-admin-workspace .crm-session-meta .muted {
    max-width: none;
    white-space: normal;
  }

  .remote-admin-workspace .record-topline {
    grid-template-columns: 1fr;
  }

  .remote-admin-workspace .record-topline .tag {
    justify-self: start;
  }

  .remote-admin-workspace .crm-quick-add summary {
    width: 100%;
    justify-content: space-between;
  }

  .remote-admin-workspace .crm-quick-add summary small {
    display: none;
  }
}
