:root {
  --navy: #0b2239;
  --navy-title: #14213d;
  --navy-login: #102d4a;
  --teal: #0f766e;
  --teal-dark: #134e4a;
  --teal-soft: #d9f3ef;
  --teal-card: #e1f3f0;
  --teal-text: #245c58;
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --border: #dbe3ee;
  --input-border: #bdcad8;
  --muted: #64748b;
  --body-text: #334155;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --warning-bg: #fff4e5;
  --warning-text: #92400e;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  --shadow: 0 8px 24px rgba(20, 33, 61, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--body-text);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

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

.site-header {
  color: #fff;
  background: var(--navy);
}

.header-inner {
  width: min(1180px, calc(100% - 36px));
  min-height: 92px;
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-frame {
  width: 58px;
  height: 58px;
  padding: 5px;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.brand-eyebrow,
.brand strong,
.user-menu strong,
.user-menu small {
  display: block;
}

.brand-eyebrow,
.header-eyebrow {
  margin: 0 0 2px;
  color: #8eddd0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

.brand strong {
  color: #fff;
  font-size: 23px;
  font-weight: 800;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: right;
}

.user-menu strong {
  color: #fff;
  font-size: 14px;
}

.user-menu small {
  margin-top: 2px;
  color: #d5e4ef;
  font-size: 12px;
}

.user-identity-link {
  padding: 7px 9px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-align: right;
  text-decoration: none;
}

.user-identity-copy {
  min-width: 0;
}

.user-identity-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--navy);
  background: #8eddd0;
  border-radius: 11px;
  display: grid;
  place-items: center;
}

.user-identity-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.user-identity-link:hover,
.user-identity-link:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

.user-mobile-label {
  display: none;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  min-height: calc(100vh - 168px);
  margin: 0 auto;
  padding: 32px 0 56px;
}

.workspace-navigation {
  position: sticky;
  z-index: 10;
  top: 0;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(20, 33, 61, 0.04);
}

.workspace-navigation-inner {
  width: min(1180px, calc(100% - 36px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.workspace-current {
  color: var(--navy-title);
  font-size: 13px;
  white-space: nowrap;
}

.workspace-switcher,
.section-navigation {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.workspace-switch,
.section-navigation a {
  padding: 8px 10px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.section-navigation a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ui-icon,
.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-icon {
  width: 15px;
  height: 15px;
}

.profile-navigation-link {
  margin-left: 4px;
  border-left: 1px solid var(--border);
}

.workspace-switch:hover,
.workspace-switch.is-active,
.section-navigation a:hover,
.section-navigation a.is-active {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.site-footer {
  min-height: 76px;
  padding: 18px max(18px, calc((100vw - 1180px) / 2));
  color: var(--muted);
  background: #edf2f7;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}

.site-footer strong {
  color: var(--navy-title);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--navy-title);
  line-height: 1.18;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 800;
}

h2 {
  margin-bottom: 4px;
  font-size: 22px;
  font-weight: 800;
}

h3 {
  margin-bottom: 5px;
  font-size: 16px;
  font-weight: 800;
}

.lead {
  margin-bottom: 0;
  color: #d5e4ef;
}

.button {
  min-height: 44px;
  padding: 11px 16px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.button-with-icon,
.button:has(.ui-icon) {
  gap: 7px;
}

.button .ui-icon {
  width: 17px;
  height: 17px;
}

.button-primary {
  color: #fff;
  background: var(--teal);
}

.button-primary:hover {
  background: #0c635d;
}

.button-header {
  min-height: 36px;
  padding: 8px 13px;
  color: #fff;
  background: var(--teal);
  border-radius: 8px;
  font-size: 13px;
}

.button-block {
  width: 100%;
}

.login-layout {
  min-height: calc(100vh - 224px);
  padding: 28px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(390px, 500px);
  align-items: stretch;
  gap: 22px;
}

.login-presentation {
  position: relative;
  min-height: 610px;
  padding: clamp(34px, 6vw, 64px);
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(142, 221, 208, 0.2), transparent 24%),
    linear-gradient(145deg, var(--navy) 0%, #123b58 62%, #0f5f62 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.login-presentation::after {
  position: absolute;
  right: -96px;
  bottom: -108px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(255, 255, 255, 0.035),
    0 0 0 70px rgba(255, 255, 255, 0.025);
  content: "";
}

.login-presentation-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.login-system-logo {
  width: 118px;
  height: auto;
  margin: 0 0 24px;
  padding: 9px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(3, 16, 30, 0.22);
}

.login-kicker {
  color: #8eddd0;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 1.2px;
}

.login-presentation h1 {
  max-width: 600px;
  margin: 16px 0 14px;
  color: #fff;
  font-size: clamp(32px, 5vw, 48px);
}

.login-presentation-content > p {
  max-width: 570px;
  color: #d5e4ef;
  font-size: 16px;
  line-height: 24px;
}

.login-feature-grid {
  margin-top: 34px;
  display: grid;
  gap: 10px;
}

.login-feature-grid article {
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
}

.login-feature-grid article > span {
  color: #8eddd0;
  font-size: 12px;
  font-weight: 900;
}

.login-feature-grid strong,
.login-feature-grid small {
  display: block;
}

.login-feature-grid strong {
  color: #fff;
  font-size: 14px;
}

.login-feature-grid small {
  margin-top: 3px;
  color: #cbdce7;
  font-size: 11px;
  line-height: 17px;
}

.login-trust-line {
  margin-top: 28px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.login-trust-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: var(--navy);
  background: #8eddd0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.login-trust-line p,
.login-trust-line strong,
.login-trust-line small {
  margin: 0;
  display: block;
}

.login-trust-line strong {
  color: #fff;
  font-size: 13px;
}

.login-trust-line small {
  margin-top: 3px;
  color: #cbdce7;
  font-size: 11px;
  line-height: 17px;
}

.login-card {
  width: 100%;
  padding: clamp(26px, 5vw, 42px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
}

.portal-badge {
  margin-bottom: 13px;
  padding: 5px 10px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 99px;
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}

.login-card h1 {
  color: var(--navy-login);
  font-size: 30px;
}

.login-subtitle {
  color: #526274;
  font-size: 16px;
  line-height: 23px;
}

.form-stack {
  margin-top: 22px;
  display: grid;
  gap: 8px;
}

.form-stack label {
  margin-top: 5px;
  color: var(--navy-title);
  font-size: 13px;
  font-weight: 800;
}

.form-stack input {
  min-height: 50px;
  padding: 13px;
  color: var(--navy-title);
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  outline: none;
  font-size: 16px;
}

.form-stack input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.form-stack .button {
  margin-top: 8px;
}

.login-hint {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 19px;
  text-align: center;
}

.security-note {
  margin: 14px 0 0;
  color: #7c8a9c;
  font-size: 11px;
  text-align: center;
}

.flash-stack {
  margin-bottom: 16px;
  display: grid;
  gap: 8px;
}

.flash {
  padding: 12px;
  border-radius: 9px;
  font-size: 14px;
}

.flash-error {
  color: var(--error-text);
  background: var(--error-bg);
}

.flash-success {
  color: var(--success-text);
  background: var(--success-bg);
}

.portal-hero {
  padding: clamp(22px, 5vw, 40px);
  color: #fff;
  background: var(--navy);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  box-shadow: var(--shadow);
}

.workspace-hero {
  padding: clamp(24px, 5vw, 42px);
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, #123b58 100%);
  border-radius: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 34px;
  box-shadow: var(--shadow);
}

.workspace-hero h1 {
  margin-bottom: 9px;
  color: #fff;
  font-size: clamp(29px, 5vw, 40px);
}

.workspace-hero .lead {
  max-width: 700px;
}

.role-chip-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.role-chip {
  padding: 5px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
}

.hero-actions {
  margin-top: 21px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.button-hero-primary {
  color: var(--navy);
  background: #8eddd0;
}

.button-hero-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.workspace-protection {
  padding: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
}

.workspace-protection strong,
.workspace-protection small {
  display: block;
}

.workspace-protection strong {
  margin-top: 8px;
  color: #fff;
  font-size: 14px;
}

.workspace-protection small {
  margin-top: 3px;
  color: #cbdce7;
  font-size: 11px;
  line-height: 17px;
}

.protection-mark {
  width: 30px;
  height: 30px;
  color: var(--navy);
  background: #8eddd0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
}

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

.metric-card {
  min-width: 0;
  padding: 17px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

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

.metric-card strong {
  overflow: hidden;
  color: var(--navy-title);
  font-size: 24px;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.metric-card span {
  margin-top: 7px;
  color: var(--body-text);
  font-size: 12px;
  font-weight: 800;
}

.metric-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.shortcut-section {
  margin-top: 24px;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.shortcut-card {
  min-height: 92px;
  padding: 16px;
  color: var(--body-text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.shortcut-card:hover,
.shortcut-card:focus-visible {
  border-color: var(--teal);
  outline: none;
  transform: translateY(-2px);
}

.shortcut-card > span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
}

.shortcut-card strong,
.shortcut-card small {
  display: block;
}

.shortcut-card strong {
  color: var(--navy-title);
  font-size: 14px;
}

.shortcut-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.shortcut-card b {
  color: var(--teal);
  font-size: 24px;
}

.integration-notice {
  margin-top: 16px;
  padding: 14px 16px;
  color: var(--warning-text);
  background: var(--warning-bg);
  border-left: 4px solid #ef6c00;
  border-radius: 10px;
}

.integration-notice strong,
.integration-notice p {
  margin: 0;
}

.integration-notice p {
  margin-top: 3px;
  font-size: 13px;
}

.workspace-content-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 22px;
}

.section-heading-top {
  margin-top: 0;
}

.workspace-actions {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.actions-intro {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.action-list {
  margin-top: 16px;
  display: grid;
}

.action-list article {
  padding: 13px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
}

.action-list article > span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
}

.action-list strong,
.action-list p {
  margin: 0;
}

.action-list strong {
  color: var(--navy-title);
  font-size: 13px;
}

.action-list p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.workspace-guide {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.workspace-guide ol {
  margin: 11px 0 0;
  padding-left: 20px;
  color: var(--body-text);
}

.workspace-guide li {
  padding-left: 3px;
  font-size: 11px;
  line-height: 18px;
}

.attention-card.requires-attention {
  border-left: 4px solid #d99a18;
}

.attention-detail {
  color: var(--warning-text) !important;
  font-weight: 800;
}

.profile-hero {
  padding: clamp(24px, 5vw, 38px);
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, #123b58 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: var(--shadow);
}

.profile-hero h1 {
  margin: 6px 0 3px;
  color: #fff;
}

.profile-hero p {
  margin: 0;
  color: #d5e4ef;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  color: var(--navy);
  background: #8eddd0;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
}

.profile-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  align-items: start;
  gap: 18px;
}

.profile-panel {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.profile-edit-panel {
  margin-top: 20px;
}

.profile-edit-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.profile-edit-intro h2,
.profile-edit-intro p {
  margin-bottom: 0;
}

.profile-edit-intro p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.profile-edit-icon {
  width: 42px;
  height: 42px;
  padding: 10px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 13px;
}

.profile-edit-form {
  max-width: 840px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.profile-edit-form input[readonly] {
  color: var(--muted);
  background: #edf2f7;
  cursor: not-allowed;
}

.profile-edit-form label small {
  color: var(--muted);
  font-size: 11px;
}

.profile-support-note {
  margin-top: 18px;
  padding: 14px;
  color: var(--warning-text);
  background: var(--warning-bg);
  border: 1px solid #efd39a;
  border-radius: 11px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.profile-support-note > .ui-icon {
  margin-top: 1px;
}

.profile-support-note strong,
.profile-support-note p {
  display: block;
  margin: 0;
}

.profile-support-note p {
  margin-top: 3px;
  color: #7c4a13;
  font-size: 12px;
}

.profile-support-note a {
  margin-top: 7px;
  color: var(--teal-dark);
  display: inline-block;
  font-size: 13px;
  font-weight: 850;
}

.profile-workspace-list {
  display: grid;
  gap: 9px;
}

.profile-workspace-list > a {
  padding: 13px;
  color: var(--body-text);
  background: var(--canvas);
  border: 1px solid transparent;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.profile-workspace-list > a:hover,
.profile-workspace-list > a:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.profile-workspace-list span,
.profile-workspace-list b {
  color: var(--teal);
  font-weight: 900;
}

.profile-workspace-list strong,
.profile-workspace-list small {
  display: block;
}

.profile-workspace-list strong {
  color: var(--navy-title);
  font-size: 13px;
}

.profile-workspace-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.security-facts {
  margin: 15px 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.security-facts li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.security-facts strong,
.security-facts span {
  display: block;
}

.security-facts strong {
  color: var(--navy-title);
  font-size: 12px;
}

.security-facts span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.button-full {
  width: 100%;
}

.permissions-panel {
  margin-top: 18px;
}

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

.profile-permission-grid span {
  padding: 11px 12px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 750;
  line-height: 17px;
}

.scope-label {
  color: var(--muted);
  font-size: 11px;
}

.system-health-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow);
}

.system-health-card > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.system-health-card strong,
.system-health-card small {
  display: block;
}

.system-health-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.health-dot {
  width: 12px;
  height: 12px;
  background: #dc2626;
  border-radius: 50%;
  box-shadow: 0 0 0 5px #fee2e2;
}

.health-dot.is-healthy {
  background: #16a34a;
  box-shadow: 0 0 0 5px #dcfce7;
}

.section-page-heading {
  margin-bottom: 22px;
  padding: clamp(22px, 5vw, 34px);
  background: #fff;
  border: 1px solid var(--border);
  border-top: 5px solid var(--teal);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  box-shadow: var(--shadow);
}

.section-page-heading h1 {
  margin-bottom: 7px;
}

.section-page-heading p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
}

.read-only-badge {
  padding: 7px 11px;
  color: var(--navy-title);
  background: #e7edf4;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.module-placeholder {
  padding: clamp(32px, 6vw, 62px);
  background: #fff;
  border: 1px dashed var(--input-border);
  border-radius: 14px;
  text-align: center;
}

.module-placeholder h2 {
  margin-top: 9px;
}

.module-placeholder > p {
  max-width: 660px;
  margin: 0 auto;
  color: var(--muted);
}

.module-code {
  padding: 5px 9px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.7px;
}

.capability-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.capability-tags span {
  padding: 6px 10px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
}

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

.record-summary {
  margin-bottom: 16px;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  box-shadow: var(--shadow);
}

.record-summary > div {
  padding: 10px;
  background: var(--canvas);
  border-radius: 9px;
}

.record-summary span,
.record-summary strong {
  display: block;
}

.record-summary span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.record-summary strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--navy-title);
  font-size: 12px;
}

.context-panel {
  margin-bottom: 22px;
  padding: 15px;
  color: var(--teal-text);
  background: var(--teal-card);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
}

.context-panel strong,
.context-panel p {
  margin: 0;
}

.document-upload-panel {
  margin: 22px 0;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 5px solid var(--teal);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.upload-panel-heading,
.form-actions,
.inline-upload-form,
.version-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.upload-panel-heading p {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.creation-disclosure {
  margin-top: 18px;
}

.creation-disclosure-block {
  margin: 22px 0;
}

.creation-disclosure > summary {
  width: fit-content;
  list-style: none;
}

.creation-disclosure > summary::-webkit-details-marker,
.workflow-action-compose > summary::-webkit-details-marker,
.observation-compose > summary::-webkit-details-marker,
.observation-actions details > summary::-webkit-details-marker {
  display: none;
}

.creation-disclosure[open] > summary {
  background: var(--navy);
}

.process-action-disclosure {
  margin-top: 16px;
}

.process-action-disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.management-empty-note {
  margin: 14px 0 0;
  padding: 11px 13px;
  color: var(--muted);
  background: var(--canvas);
  border: 1px dashed var(--border);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.45;
}

.administration-profile-hero {
  margin-bottom: 18px;
}

.administration-user-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.administration-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.administration-privacy-note .ui-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
}

.administration-privacy-note p {
  margin: 5px 0 0;
}

.administration-detail-grid,
.administration-history-grid {
  align-items: start;
}

.administration-role-list {
  display: grid;
  gap: 12px;
}

.administration-role-list article {
  padding: 14px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.administration-role-list article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.administration-role-list p,
.administration-role-list small {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.table-profile-link {
  width: fit-content;
  margin-top: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.table-profile-link .ui-icon {
  width: 16px;
  height: 16px;
}

.table-profile-link:hover,
.table-profile-link:focus-visible {
  text-decoration: underline;
}

.creation-disclosure-block > .document-upload-panel {
  margin-top: 12px;
  margin-bottom: 0;
}

.creation-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

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

.document-form label,
.document-form label > span {
  display: grid;
  gap: 6px;
}

.document-form label > span {
  color: var(--navy-title);
  font-size: 12px;
  font-weight: 800;
}

.document-form input,
.document-form select,
.document-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--navy-title);
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 9px;
  outline: none;
}

.document-form textarea {
  resize: vertical;
}

.document-form input:focus,
.document-form select:focus,
.document-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.file-field input {
  padding: 8px;
  background: var(--canvas);
}

.file-field input::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 0;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

.form-actions small {
  color: var(--muted);
}

.compact-upload-panel {
  padding: 18px 20px;
}

.inline-upload-form {
  align-items: end;
}

.inline-upload-form .file-field {
  flex: 1;
}

.version-storage-line {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.version-storage-line small,
.version-storage-line strong,
.version-storage-line code {
  display: block;
}

.version-storage-line small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.version-storage-line strong,
.version-storage-line code {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--body-text);
  font-size: 11px;
}

.version-actions {
  margin-top: 13px;
  justify-content: flex-end;
}

.document-viewer {
  margin: 24px 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 5px solid var(--teal);
  border-radius: 14px;
  box-shadow: var(--shadow);
  scroll-margin-top: 76px;
}

.viewer-heading {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.viewer-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.viewer-access {
  flex: 0 0 auto;
}

.viewer-toolbar {
  min-height: 52px;
  padding: 8px 14px;
  color: #fff;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.viewer-control {
  min-height: 34px;
  padding: 7px 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.viewer-control:hover:not(:disabled) {
  background: var(--teal);
}

.viewer-control:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.viewer-page-status,
.viewer-zoom-status {
  min-width: 90px;
  color: #d5e4ef;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.viewer-zoom-status {
  min-width: 46px;
}

.viewer-toolbar-separator {
  width: 1px;
  height: 25px;
  margin: 0 5px;
  background: rgba(255, 255, 255, 0.18);
}

.viewer-stage {
  min-height: 600px;
  max-height: 760px;
  padding: 24px;
  overflow: auto;
  background: #dbe3eb;
  display: grid;
  place-items: start center;
}

.viewer-stage canvas,
.viewer-stage img {
  max-width: none;
  background: #fff;
  box-shadow: 0 8px 30px rgba(11, 34, 57, 0.18);
  user-select: none;
}

.viewer-stage img {
  max-width: 100%;
  height: auto;
}

.viewer-message {
  width: min(100%, 620px);
  margin: 210px auto 0;
  padding: 18px;
  color: var(--navy-title);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.viewer-message.is-error {
  color: var(--error-text);
  background: var(--error-bg);
}

.viewer-security-note {
  margin: 0;
  padding: 11px 16px;
  color: var(--muted);
  background: var(--canvas);
  border-top: 1px solid var(--border);
  font-size: 10px;
  text-align: center;
}

.js-preview-document.is-selected {
  color: #fff;
  background: var(--teal);
}

.context-panel p {
  margin-top: 4px;
  font-size: 13px;
}

.available-actions-panel {
  margin-top: 24px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  text-align: center;
  box-shadow: var(--shadow);
}

.available-actions-panel h2 {
  margin-top: 3px;
}

.available-actions-panel small {
  margin-top: 13px;
  color: var(--muted);
  display: block;
}

.workflow-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.portal-hero h1 {
  color: #fff;
  font-size: clamp(28px, 5vw, 38px);
}

.portal-stat {
  min-width: 154px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
}

.portal-stat strong,
.portal-stat span,
.portal-stat small {
  display: block;
}

.portal-stat strong {
  font-size: 36px;
  line-height: 1;
}

.portal-stat span {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
}

.portal-stat small {
  margin-top: 2px;
  color: #8eddd0;
  font-size: 11px;
}

.info-card {
  margin-bottom: 20px;
  padding: 15px;
  color: var(--teal-text);
  background: var(--teal-card);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
}

.info-card strong {
  color: var(--teal-dark);
  font-size: 16px;
  font-weight: 800;
}

.info-card p {
  margin: 4px 0 0;
  line-height: 20px;
}

.info-card small {
  margin-top: 8px;
  color: #42716d;
  display: block;
  font-size: 12px;
  line-height: 18px;
}

.login-info {
  margin: 20px 0 0;
}

.login-info strong {
  font-size: 14px;
}

.login-info p {
  margin-bottom: 0;
  font-size: 13px;
}

.dashboard-info {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-info p {
  margin-bottom: 0;
}

.info-role,
.count-badge {
  flex: 0 0 auto;
  padding: 5px 10px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
}

.section-heading {
  margin: 28px 0 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.filter-panel {
  margin: 14px 0 18px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.filter-panel-heading,
.filter-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.filter-panel-heading strong {
  color: var(--navy-title);
  display: block;
  font-size: 14px;
}

.filter-panel-heading small,
.filter-panel-footer small {
  color: var(--muted);
  display: block;
  font-size: 11px;
}

.filter-panel-heading small {
  margin-top: 2px;
}

.filter-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
}

.filter-field {
  display: grid;
  gap: 5px;
}

.filter-field > span {
  color: var(--navy-title);
  font-size: 11px;
  font-weight: 800;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--navy-title);
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 9px;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(15, 118, 110, 0.12);
}

.filter-result-count {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.filter-reset {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.filter-reset:hover {
  color: #fff;
  background: var(--teal);
}

.filter-empty-state {
  margin-top: 12px;
  padding: 22px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--input-border);
  border-radius: 12px;
  text-align: center;
}

[data-filter-item][hidden],
[data-filter-empty][hidden] {
  display: none !important;
}

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

.case-card,
.document-card,
.version-card {
  padding: 15px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.case-card,
.document-card {
  display: flex;
  flex-direction: column;
}

.case-card h3,
.document-card h3 {
  margin-top: 4px;
}

.folio {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.card-meta {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sensitive-label {
  margin: 12px 0 0;
  color: var(--body-text);
  font-size: 12px;
  font-weight: 700;
}

.card-footer {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status {
  max-width: 180px;
  padding: 4px 9px;
  color: var(--navy-title);
  background: #e7edf4;
  border-radius: 99px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: capitalize;
}

.status-active,
.status-approved,
.status-authorized,
.status-signed,
.status-valid {
  color: var(--success-text);
  background: var(--success-bg);
}

.status-closed,
.status-archived,
.status-cancelled {
  color: var(--warning-text);
  background: #fef3c7;
}

.status-rejected,
.status-invalid {
  color: var(--error-text);
  background: var(--error-bg);
}

.open-link,
.back-link {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.open-link:hover,
.back-link:hover {
  text-decoration: underline;
}

.back-link {
  margin-bottom: 15px;
  display: inline-block;
}

.detail-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.detail-heading h1 {
  margin: 5px 0 6px;
  font-size: clamp(27px, 4vw, 36px);
}

.detail-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.warning-card {
  margin-bottom: 20px;
  padding: 15px;
  color: #9a5b16;
  background: var(--warning-bg);
  border-radius: 11px;
}

.warning-card strong {
  color: var(--warning-text);
  font-size: 16px;
  font-weight: 800;
}

.warning-card p {
  margin: 4px 0 0;
  line-height: 20px;
}

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

.version-card h3,
.version-card p {
  margin: 0;
}

.version-card p {
  margin-top: 3px;
  color: var(--body-text);
  font-size: 13px;
}

.card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

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

.workflow-grid > div {
  padding: 12px;
  background: var(--canvas);
  border-radius: 10px;
}

.workflow-label,
.workflow-grid strong {
  display: block;
}

.workflow-label {
  color: var(--muted);
  font-size: 12px;
}

.workflow-grid strong {
  margin-top: 4px;
  color: var(--success-text);
  font-size: 13px;
  text-transform: capitalize;
}

.workflow-grid .not-required {
  color: var(--muted);
}

.role-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 22px;
}

.role-main .section-heading {
  margin-top: 8px;
}

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

.role-sidebar {
  margin-top: 8px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.sidebar-eyebrow {
  margin: 0 0 3px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

.responsibility-list {
  margin-top: 18px;
  display: grid;
}

.responsibility-list > div {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 9px;
}

.responsibility-list span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.responsibility-list p,
.responsibility-list strong {
  display: block;
  margin: 0;
}

.responsibility-list p {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.responsibility-list strong {
  margin-bottom: 2px;
  color: var(--navy-title);
  font-size: 13px;
}

.compact-empty {
  padding: 30px 18px;
}

.judicial-list {
  position: relative;
  display: grid;
  gap: 10px;
}

.judicial-list::before {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 23px;
  width: 2px;
  background: var(--teal-soft);
  content: "";
}

.judicial-case {
  position: relative;
  padding: 17px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow);
}

.judicial-marker {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--teal);
  border: 4px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 0 0 2px var(--teal-soft);
}

.judicial-body h3 {
  margin-top: 5px;
}

.judicial-meta {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.judicial-meta div {
  display: grid;
}

.judicial-meta dt {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.judicial-meta dd {
  margin: 2px 0 0;
  color: var(--body-text);
  font-size: 12px;
}

.button-outline {
  min-height: 40px;
  color: var(--teal);
  background: #fff;
  border: 1px solid var(--teal);
  font-size: 12px;
}

.button-outline:hover {
  color: #fff;
  background: var(--teal);
}

.lawyer-heading {
  margin-bottom: 20px;
  padding: clamp(22px, 5vw, 36px);
  background: #fff;
  border: 1px solid var(--border);
  border-top: 5px solid var(--teal);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-shadow: var(--shadow);
}

.lawyer-heading h1 {
  margin-bottom: 7px;
  font-size: clamp(28px, 5vw, 38px);
}

.lawyer-heading p {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
}

.lawyer-summary {
  display: flex;
  gap: 9px;
}

.lawyer-summary > div {
  min-width: 100px;
  padding: 14px;
  background: var(--teal-card);
  border-radius: 10px;
}

.lawyer-summary strong,
.lawyer-summary span {
  display: block;
}

.lawyer-summary strong {
  color: var(--teal-dark);
  font-size: 28px;
  line-height: 1;
}

.lawyer-summary span {
  margin-top: 5px;
  color: var(--teal-text);
  font-size: 11px;
  font-weight: 700;
}

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

.client-card {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.client-card-header {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 11px;
}

.client-card-header h3 {
  margin: 3px 0 0;
}

.client-initial {
  width: 42px;
  height: 42px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
}

.client-card-body {
  margin-top: 14px;
  padding: 11px;
  background: var(--canvas);
  border-radius: 10px;
}

.client-card-body p + p {
  margin-top: 4px;
}

.empty-state,
.error-state {
  padding: 42px 22px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  text-align: center;
}

.empty-state > span,
.error-state > span {
  margin-bottom: 8px;
  color: var(--teal);
  display: block;
  font-size: 42px;
  font-weight: 800;
}

.empty-state p {
  max-width: 560px;
  margin: 0 auto;
}

.error-state {
  max-width: 720px;
  margin: 52px auto;
}

.error-state h1 {
  font-size: clamp(25px, 4vw, 34px);
}

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

.observation-compose,
.observation-actions details,
.workflow-action-compose {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.observation-compose summary,
.observation-actions summary,
.workflow-action-compose summary {
  width: fit-content;
  padding: 8px 11px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.observation-compose[open] > summary,
.observation-actions details[open] > summary,
.workflow-action-compose[open] > summary {
  color: #fff;
  background: var(--teal);
}

.observation-form {
  margin-top: 13px;
  display: grid;
  gap: 12px;
}

.observation-form label,
.observation-form label > span {
  display: grid;
  gap: 5px;
}

.observation-form label > span {
  color: var(--navy-title);
  font-size: 12px;
  font-weight: 800;
}

.observation-form select,
.observation-form textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--navy-title);
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 9px;
  outline: none;
  resize: vertical;
}

.observation-form select:focus,
.observation-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.observation-form .button {
  justify-self: start;
}

.workflow-warning {
  padding: 10px 12px;
  color: #8a4b08 !important;
  background: #fff7db;
  border-left: 3px solid #d99a18;
  border-radius: 8px;
}

.confirmation-field {
  grid-template-columns: auto 1fr !important;
  align-items: start;
}

.confirmation-field input {
  margin-top: 3px;
}

.workflow-history-list,
.decision-list {
  display: grid;
  gap: 11px;
}

.workflow-history-row {
  padding: 15px 17px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: start;
  gap: 15px;
}

.workflow-history-row p {
  margin: 3px 0;
  white-space: pre-wrap;
}

.workflow-history-row small {
  color: var(--muted);
}

.decision-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.decision-card.is-superseded {
  opacity: 0.72;
  border-left-color: var(--muted);
}

.decision-card > p {
  white-space: pre-wrap;
}

.data-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

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

.data-table th,
.data-table td {
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--muted);
  background: var(--canvas);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table td,
.data-table small,
.data-table strong {
  font-size: 12px;
}

.data-table small,
.data-table strong {
  display: block;
}

.data-table small {
  margin-top: 3px;
  color: var(--muted);
}

.permission-list,
.role-label-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-label,
.role-label-list span {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 7px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.compact-row-form {
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.compact-row-form input,
.compact-row-form select {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
}

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

.checkbox-grid label {
  padding: 10px;
  background: var(--canvas);
  border-radius: 8px;
}

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

.timeline-list,
.deadline-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.timeline-list > div,
.deadline-row {
  padding: 12px;
  background: var(--canvas);
  border-radius: 9px;
}

.timeline-list small,
.timeline-list strong,
.deadline-row small,
.deadline-row strong {
  display: block;
}

.timeline-list small,
.deadline-row small {
  margin-top: 3px;
  color: var(--muted);
}

.deadline-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.deadline-row details {
  grid-column: 1 / -1;
}

.state-control-panel form {
  margin-top: 12px;
}

.observation-heading {
  scroll-margin-top: 82px;
}

.observation-list {
  display: grid;
  gap: 12px;
}

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

.observation-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.observation-card h3 {
  margin: 5px 0 1px;
}

.observation-card small {
  color: var(--muted);
}

.observation-body {
  margin: 15px 0 0;
  color: var(--body-text);
  white-space: pre-wrap;
}

.observation-thread {
  margin-top: 16px;
  padding-left: 18px;
  border-left: 2px solid var(--teal-soft);
  display: grid;
  gap: 10px;
}

.observation-response {
  padding: 13px;
  background: var(--canvas);
  border-radius: 10px;
}

.observation-response > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.observation-response p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.response-version {
  margin-top: 8px;
  color: var(--teal-dark);
  display: block;
  font-size: 11px;
  font-weight: 800;
}

.resolution-note {
  margin-top: 15px;
  padding: 13px;
  color: var(--success-text);
  background: var(--success-bg);
  border-radius: 10px;
}

.resolution-note p {
  margin: 5px 0 1px;
  color: var(--success-text);
}

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

.status-open {
  color: var(--warning-text);
  background: #fef3c7;
}

.status-responded {
  color: #1d4ed8;
  background: #dbeafe;
}

.status-resolved {
  color: var(--success-text);
  background: var(--success-bg);
}

.case-facts {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.case-facts span {
  padding: 4px 8px;
  color: var(--teal-text);
  background: var(--teal-soft);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 750;
}

.people-heading {
  margin-top: 28px;
}

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

.people-panel {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.people-panel-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.people-panel-heading h3 {
  margin: 0;
}

.people-panel-heading span {
  min-width: 27px;
  padding: 3px 8px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.people-list {
  display: grid;
}

.person-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.person-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.person-initial {
  width: 38px;
  height: 38px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 850;
}

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

.person-row strong {
  color: var(--navy-title);
  font-size: 13px;
}

.person-row small,
.people-empty {
  color: var(--muted);
  font-size: 11px;
}

.people-empty {
  margin: 14px 0 0;
}

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

  .login-presentation {
    min-height: auto;
  }

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

  .role-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .workspace-navigation-inner {
    padding: 9px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .workspace-switcher,
  .section-navigation {
    width: 100%;
  }

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

  .workspace-content-grid {
    grid-template-columns: 1fr;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

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

  .observation-inbox {
    grid-template-columns: 1fr;
  }

  .people-groups {
    grid-template-columns: 1fr;
  }

  .role-sidebar {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 82px;
    gap: 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand-logo-frame {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .brand-eyebrow {
    display: block;
    font-size: 7px;
    letter-spacing: 0.65px;
  }

  .user-identity-link strong,
  .user-identity-link small {
    display: none;
  }

  .user-mobile-label {
    display: block;
  }

  .page-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 20px;
  }

  .portal-hero,
  .workspace-hero,
  .profile-hero,
  .dashboard-info,
  .detail-heading {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .portal-stat {
    width: 100%;
  }

  .case-grid,
  .document-grid,
  .workflow-grid,
  .workflow-grid-three,
  .workflow-grid-four,
  .metric-grid,
  .record-summary,
  .health-grid,
  .case-grid-two,
  .client-grid,
  .form-grid,
  .version-storage-line {
    grid-template-columns: 1fr;
  }

  .workflow-history-row {
    grid-template-columns: 1fr;
  }

  .process-grid,
  .checkbox-grid,
  .deadline-row {
    grid-template-columns: 1fr;
  }


  .observation-actions {
    grid-template-columns: 1fr;
  }

  .upload-panel-heading,
  .viewer-heading,
  .form-actions,
  .inline-upload-form {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading,
  .site-footer,
  .lawyer-heading,
  .section-page-heading,
  .system-health-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-panel-heading,
  .filter-panel-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

  .lawyer-summary {
    width: 100%;
  }

  .lawyer-summary > div {
    flex: 1;
  }

  .judicial-case {
    grid-template-columns: 36px 1fr;
  }

  .judicial-case .button {
    grid-column: 2;
    justify-self: start;
  }

  .login-layout {
    padding: 4px 0 28px;
    gap: 14px;
  }

  .login-presentation {
    padding: 28px 22px;
  }

  .login-presentation h1 {
    font-size: 31px;
  }

  .login-feature-grid {
    margin-top: 24px;
  }

  .login-card {
    padding: 24px;
  }

  .viewer-toolbar {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .viewer-stage {
    min-height: 470px;
    padding: 14px;
  }

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

  .profile-permission-grid,
  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .profile-avatar {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 18px;
    font-size: 24px;
  }
}
