:root {
  /* Notary Melon brand tokens */
  --nm-bg: #FCFAF9;
  --nm-surface: #FFFFFF;
  --nm-surface-soft: #FFF8F7;
  --nm-text: #2F3437;
  --nm-text-secondary: #505965;
  --nm-pink: #F7B1AF;
  --nm-pink-strong: #EF8E8A;
  --nm-pink-soft: #FDE7E6;
  --nm-pink-contrast: #1F2328;
  --nm-green-dark: #2E7D4E;
  --nm-green: #7BC67B;
  --nm-mint: #DFF2DF;
  --nm-charcoal: #2F3437;
  --nm-border: #E8DEDB;
  --nm-shadow: rgba(47, 52, 55, 0.08);

  --bg: var(--nm-bg);
  --panel: var(--nm-surface);
  --panel-soft: var(--nm-surface-soft);
  --primary: var(--nm-pink);
  --primary-dark: var(--nm-pink-strong);
  --primary-light: var(--nm-pink-soft);
  --primary-soft: var(--nm-pink-soft);
  --primary-contrast: var(--nm-pink-contrast);
  --text: var(--nm-text);
  --muted: var(--nm-text-secondary);
  --border: var(--nm-border);
  --success: var(--nm-green-dark);
  --warning: #f59e0b;
  --danger: #DC2626;
  --shadow: 0 18px 48px var(--nm-shadow);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFAF9 100%);
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 2px;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232, 222, 219, 0.9);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 18px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--primary-dark);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
}

.brand-mark-svg {
  display: block;
}

.brand-logo .brand-mark-svg {
  width: 50px;
  height: 50px;
}

.brand-wordmark {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-name-notary {
  color: var(--nm-charcoal);
}

.brand-name-melon {
  color: var(--nm-green-dark);
}

.brand-logo-icon-only .brand-wordmark {
  display: none;
}

.hero-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-brand-lockup .brand-wordmark {
  font-size: 2.1rem;
}

@media (max-width: 560px) {
  .brand-wordmark {
    font-size: 1.15rem;
  }

  .brand-logo {
    gap: 8px;
  }

  .hero-brand-lockup .brand-mark-svg {
    width: 64px;
    height: 64px;
  }

  .hero-brand-lockup .brand-wordmark {
    font-size: 1.5rem;
  }
}

.nav-links,
.nav-actions,
.cta-row,
.info-band,
.session-badges {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links {
  gap: 25px;
  color: var(--muted);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 0.18s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--primary-contrast);
  box-shadow: 0 12px 24px rgba(239, 142, 138, 0.35);
}

.btn.secondary {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text);
}

.btn.secondary:hover {
  background: var(--bg);
  border-color: var(--muted);
}

.btn.large {
  min-height: 56px;
  padding-inline: 26px;
}

.homepage-shell {
  padding: 72px 0 40px;
}

.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-shell {
  padding: 72px 0 34px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2.8rem, 4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 2vw, 2.4rem);
  letter-spacing: -0.04em;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.home-card {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.notice-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  margin-bottom: 18px;
}

.notice-box strong {
  font-size: 1.02rem;
}

.notice-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.readiness-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.identity-choice-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.identity-choice-grid .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.identity-choice-mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .identity-choice-desktop-only {
    display: none;
  }

  .identity-choice-mobile-only {
    display: inline-flex;
  }
}

.session-ready-panel {
  padding: 22px 20px 18px;
}

/* The shared pre-session device check needs a wider panel than generic forms. */
.form-panel.session-ready-panel {
  width: min(900px, 100%);
  max-width: 900px;
  padding: 32px 34px;
}

.device-check-header {
  margin-bottom: 16px;
}

.device-check-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 2vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.device-check-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 50rem;
}

.device-check-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.device-check-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.device-preview-card {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  background: linear-gradient(180deg, #0f172a, #111827);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.device-preview-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.device-preview-card > .local-preview-video {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.identity-switch-camera-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.identity-switch-camera-btn.hidden {
  display: none;
}

.identity-mobile-step {
  display: none;
}

.identity-back-link {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
}

.identity-mobile-topbar {
  display: none;
}

@media (max-width: 900px) {
  [data-identity-capture-page="true"] #identity-desktop-side {
    display: none;
  }

  [data-identity-capture-page="true"] .identity-mobile-step {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
  }

  [data-identity-capture-page="true"] .identity-mobile-step .identity-capture-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  /* Cut every bit of vertical space above the camera preview so "Take
     Picture" lands on screen without scrolling on first arrival.
     `!important` is needed here because the shared `body:has(...)
     .mobile-brand-header { display: flex }` rule (which SHOWS this brand
     header on every other mobile-minimal page) is otherwise more/equally
     specific and wins the cascade. */
  [data-identity-capture-page="true"] .mobile-brand-header {
    display: none !important;
  }

  [data-identity-capture-page="true"] .device-check-header {
    display: none;
  }

  [data-identity-capture-page="true"] .identity-mobile-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 2px 10px;
  }

  [data-identity-capture-page="true"] .identity-mobile-topbar-title {
    font-weight: 700;
  }

  [data-identity-capture-page="true"] .session-ready-panel.form-panel {
    padding: 10px 14px 16px;
  }
}

.device-check-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  width: 100%;
}

.device-check-side > * {
  min-width: 0;
  max-width: 100%;
}

.device-readiness-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.device-readiness-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.device-readiness-row:last-child {
  border-bottom: 0;
}

.device-readiness-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.device-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: right;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  min-width: 9px;
}

.status-dot.neutral {
  background: #c5cfdd;
}

.status-dot.ready {
  background: #2E7D4E;
}

.status-dot.warning {
  background: #d98c0a;
}

.status-dot.error {
  background: #c32828;
}

.device-select-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.device-select-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.device-select-field select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  box-sizing: border-box;
}

.microphone-meter-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0 0;
}

.microphone-meter-header {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.microphone-meter-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #F1ECEA 0%, #F7F3F1 100%);
  border: 1px solid rgba(131, 144, 196, 0.2);
  overflow: hidden;
}

.microphone-meter-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7BC67B 0%, #2E7D4E 100%);
  transition: width 0.08s linear;
}

.device-error {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(195, 40, 40, 0.08);
  border: 1px solid rgba(195, 40, 40, 0.18);
  color: #7a1d1d;
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.device-error.hidden {
  display: none;
}

.identity-capture-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.identity-capture-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  background: var(--bg);
  padding: 8px;
  overflow: hidden;
}

.identity-capture-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
}

.identity-capture-actions {
  display: flex;
  gap: 8px;
}

.session-ready-form {
  margin: 0;
}

.session-ready-form .btn {
  width: 100%;
  min-height: 42px;
}

.session-ready-form .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.required-star {
  color: #d92d20;
  font-weight: 700;
}

.required-field-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

.new-session-form .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

@media (max-width: 820px) {
  .device-check-layout {
    grid-template-columns: 1fr;
  }

  .form-panel.session-ready-panel {
    padding: 24px 20px;
  }
}

.form-footer-links {
  margin-top: 12px;
  text-align: center;
}

.form-footer-links a {
  color: var(--primary-dark);
  font-weight: 600;
}

.feature-list li::before {
  content: '✓';
  color: var(--success);
  margin-right: 8px;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.floating-illustration {
  width: min(100%, 500px);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(255, 244, 242, 0.9));
}

.seal-ring {
  display: grid;
  place-items: center;
  width: min(120px, 46vw);
  height: min(120px, 46vw);
  margin: 22px auto 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #EAF6EC 60%, #E1F2E3 100%);
  border: 2px solid rgba(46, 125, 78, 0.18);
  box-shadow: inset 0 0 0 10px rgba(46, 125, 78, 0.04);
}

.seal-core {
  display: grid;
  place-items: center;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  border: 2px solid rgba(46, 125, 78, 0.32);
  color: var(--success);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(232, 222, 219, 0.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.dashboard-panel,
.session-panel,
.admin-notary-card {
  padding: 22px 20px;
}

.glow {
  width: min(100%, 500px);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(255, 244, 242, 0.9));
}

.panel-header {
  display: flex;
  gap: 8px;
  padding: 4px 0 18px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2f; }
.dot.green { background: #28c840; }

.document-card {
  background: linear-gradient(180deg, #ffffff, #f4f7ff);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 18px;
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.tag,
.status-badge,
.code-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tag {
  background: var(--primary-soft);
  padding: 7px 10px;
  color: var(--text);
}

.status-badge {
  padding: 6px 10px;
}

.status-badge.online,
.status-badge.live {
  background: rgba(46, 125, 78, 0.12);
  color: var(--success);
}

.document-card h3 {
  margin: 0 0 18px;
  font-size: 1.7rem;
}

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

.mini-grid label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-bottom: 6px;
}

.info-band {
  justify-content: space-between;
  margin-top: 42px;
  padding: 24px 30px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat strong {
  font-size: 2rem;
  letter-spacing: -0.06em;
}

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

.form-page,
.dashboard-page,
.session-page {
  padding: 56px 0 72px;
}

.form-panel {
  max-width: 640px;
  margin: 0 auto;
  padding: 34px 30px;
}

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.stacked-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.96rem;
  line-height: 1.4;
  font-weight: 700;
  padding-top: 2px;
}

.join-identify-list {
  gap: 12px;
}

.join-identify-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
}

.join-identify-name {
  font-size: 1rem;
  font-weight: 700;
}

.join-identify-role {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.new-session-form {
  gap: 22px;
}

.new-session-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.96rem;
  line-height: 1.4;
  font-weight: 700;
}

.new-session-form input,
.new-session-form select,
.new-session-form textarea,
.new-session-form .saved-contact-picker-label select,
.new-session-form .participant-contact-picker select,
.new-session-form .form-field input,
.new-session-form .form-field select {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
}

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

.page-header.compact {
  margin-bottom: 18px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  width: min(1380px, calc(100% - 32px));
  margin: 28px auto 0;
  align-items: start;
  padding-bottom: 64px;
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding-bottom: 24px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px 16px;
  min-height: 620px;
  position: sticky;
  top: 92px;
}

.sidebar-brand {
  padding: 8px 10px 4px;
}

.sidebar-brand .eyebrow {
  margin-bottom: 8px;
}

.sidebar-brand h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.05em;
}

.sidebar-links,
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.18s ease;
}

.sidebar-item:hover {
  background: rgba(247, 177, 175, 0.12);
  border-color: rgba(239, 142, 138, 0.2);
  color: var(--text);
}

.sidebar-item.active {
  background: var(--primary-soft);
  color: var(--text);
  border-color: rgba(239, 142, 138, 0.2);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.logout-link {
  color: #b42318;
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 6px 0;
}

.dashboard-header h1 {
  margin: 0;
  font-size: clamp(2rem, 2.3vw, 3rem);
  letter-spacing: -0.06em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-selector {
  min-width: 220px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(47, 52, 55, 0.06);
}

.home-hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 6px 0;
}

.hero-primary {
  min-width: 200px;
}

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

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 22px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250, 248, 246, 0.9));
}

.summary-card .eyebrow {
  margin-bottom: 0;
}

.summary-card h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  letter-spacing: -0.05em;
  line-height: 1.15;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.summary-card .status-badge {
  width: fit-content;
}

.summary-card a {
  margin-top: auto;
  font-weight: 700;
  color: var(--primary-dark);
}

.dashboard-grid,
.session-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.workspace-shell {
  position: relative;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 290px;
  gap: 16px;
  align-items: start;
  min-height: 680px;
}

.tools-reopen-btn {
  display: none;
  position: absolute;
  left: 6px;
  top: 10px;
  z-index: 6;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
}

#session-room.tools-hidden .tools-reopen-btn {
  display: inline-flex;
}

#session-room.tools-hidden .workspace-shell {
  grid-template-columns: 0 minmax(0, 1fr) 290px;
}

#session-room.tools-hidden .session-tools-drawer,
#session-room.tools-hidden .session-tools-drawer.closed {
  display: none;
  width: 0;
  min-width: 0;
  max-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

#session-room.tools-hidden .session-document-panel {
  grid-column: 2;
}

.session-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.session-topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
}

.session-topbar-title h1 {
  margin: 0;
  font-size: clamp(1.1rem, 1.4vw, 1.7rem);
  letter-spacing: -0.04em;
}

.eyebrow.compact {
  margin: 0 0 4px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.session-topbar-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.presence-row-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.presence-row-inline strong {
  color: var(--text);
}

.session-topbar-actions {
  display: flex;
  gap: 8px;
}

.session-details-panel {
  padding: 12px 14px;
  margin-bottom: 12px;
}

.session-tools-drawer {
  position: relative;
  display: block;
  width: 270px;
  min-width: 270px;
  padding: 16px;
  transition: width 0.22s ease, opacity 0.22s ease, transform 0.22s ease;
  overflow-x: hidden;
  min-width: 0;
}

.session-tools-drawer * {
  min-width: 0;
}

.session-tools-drawer.closed {
  display: none;
  width: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  transform: translateX(-16px);
  pointer-events: none;
}

.session-tools-drawer.open {
  display: block;
  width: 270px;
  min-width: 270px;
}

#session-room.tools-hidden .session-tools-drawer.open {
  display: none;
}

.tools-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.tools-drawer-header h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.tools-drawer-header .btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.tools-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.tools-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.tools-section-title {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.tools-info-stack,
.tool-button-stack,
.participant-readiness-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tools-info-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 0.82rem;
  line-height: 1.4;
}

.tools-info-row span {
  color: var(--muted);
}

.tools-info-row strong {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wrap-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.document-upload-control {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.upload-button {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.82rem;
  text-align: center;
  line-height: 38px;
  cursor: pointer;
}

.upload-file-name {
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notary-asset-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notary-asset-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.notary-asset-label {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
}

.notary-asset-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.notary-asset-preview img {
  max-width: 100%;
  max-height: 36px;
  object-fit: contain;
}

.empty-asset-label {
  color: var(--muted);
  font-size: 0.72rem;
}

.asset-button {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  font-size: 0.76rem;
}

.field-tools-grid,
.document-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.document-toolbar {
  margin: 0;
  align-items: stretch;
}

.document-toolbar .btn,
.field-tools-grid .btn {
  width: 100%;
  min-height: 38px;
  padding: 0 8px;
  font-size: 0.8rem;
  white-space: normal;
  text-align: center;
}

.document-toolbar .btn[data-tool="delete"],
.field-tools-grid .btn.delete-tool {
  grid-column: 1 / -1;
}

.assign-to-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
}

.assign-to-field select,
.device-select-field select,
.media-controls select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  box-sizing: border-box;
}

.full-width-form {
  width: 100%;
}

.full-width {
  width: 100%;
}

.participant-readiness-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 10px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 248, 246, 0.8));
}

.participant-readiness-head {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.participant-readiness-head strong {
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.readiness-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.readiness-status.live {
  background: rgba(46, 125, 78, 0.12);
  color: var(--success);
}

.readiness-status.warning {
  background: rgba(244, 174, 29, 0.1);
  color: #9c6a00;
}

.readiness-status.neutral {
  background: rgba(102, 112, 133, 0.12);
  color: #475467;
}

.readiness-status.info {
  background: rgba(247, 177, 175, 0.18);
  color: var(--text);
}

.readiness-status.danger {
  background: rgba(179, 38, 30, 0.1);
  color: #b3261e;
}

.readiness-status.complete {
  background: rgba(139, 92, 246, 0.12);
  color: #6d28d9;
}

.readiness-substatus {
  font-size: 0.7rem;
  color: var(--muted);
}

.participant-readiness-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--muted);
}

.participant-readiness-meta span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.participant-readiness-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.participant-button-row form,
.participant-readiness-actions form {
  margin: 0;
}

.identity-photo-thumbs {
  display: flex;
  gap: 8px;
}

.identity-photo-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1 1 0;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.identity-photo-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.identity-photo-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  padding: 24px;
}

.identity-photo-modal-overlay.hidden {
  display: none;
}

.identity-photo-modal {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  max-width: min(600px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.identity-photo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.identity-photo-modal img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 8px;
  object-fit: contain;
  display: block;
}

.participant-button-row .btn,
.participant-readiness-actions .btn {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  font-size: 0.74rem;
}

.tools-section-final {
  padding-bottom: 0;
}

.inline-form {
  margin: 0;
}

#session-room.tools-hidden .workspace-shell {
  grid-template-columns: 0 minmax(0, 1fr) 290px;
}

#session-room[data-role="signer"] .session-tools-drawer {
  display: none;
}

.session-document-panel {
  position: relative;
  padding: 0 0 10px;
  min-width: 0;
  overflow: hidden;
  max-width: 100%;
}

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 8px;
}

.document-upload-panel {
  padding: 14px 12px 12px;
}

.floating-video-panel {
  position: sticky;
  top: 20px;
  right: 0;
  width: 290px;
  padding: 10px;
  z-index: 20;
}

.floating-video-panel.minimized {
  width: 170px;
}

.floating-video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.compact-video-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compact-video-tile {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f172a;
  overflow: hidden;
  min-height: 160px;
}

.compact-video-tile.small {
  min-height: 90px;
}

.video-label {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 700;
}

.remote-main-video,
.local-preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.media-controls .btn,
.media-controls select {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.media-status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.guided-signer-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 0 12px;
  border: 1px solid rgba(239, 142, 138, 0.3);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(247, 177, 175, 0.1), rgba(247, 177, 175, 0.04));
}

.guided-signer-panel.signer-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  margin: 0 0 12px;
  width: min(100%, 740px);
}

.guided-signer-header,
.guided-signer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.guided-signer-controls {
  font-size: 0.76rem;
  color: var(--muted);
}

.guided-signer-help {
  display: flex;
  justify-content: flex-end;
}

#session-room[data-role="signer"] .workspace-shell {
  grid-template-columns: minmax(0, 1fr) 280px;
}

#session-room[data-role="signer"] .session-tools-drawer {
  display: none;
}

#session-room[data-role="signer"] .session-document-panel {
  max-width: 1200px;
  margin: 0 auto;
}

#session-room[data-role="signer"] .room-header {
  justify-content: center;
}

#session-room[data-role="signer"] .pdf-shell {
  grid-template-columns: 1fr;
}

#session-room[data-role="signer"] .pdf-thumbnails {
  display: none;
}

#session-room[data-role="signer"] .pdf-main {
  min-width: 0;
}

#session-room[data-role="signer"] .pdf-pager {
  justify-content: center;
}

.guide-target {
  box-shadow: 0 0 0 2px rgba(58, 175, 97, 0.8), 0 0 22px rgba(58, 175, 97, 0.25) !important;
  border-color: rgba(58, 175, 97, 0.9) !important;
  animation: guideTargetPulse 2.2s ease-in-out infinite;
}

@keyframes guideTargetPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(58, 175, 97, 0.8), 0 0 22px rgba(58, 175, 97, 0.25) !important; }
  50% { box-shadow: 0 0 0 3px rgba(58, 175, 97, 0.95), 0 0 30px rgba(58, 175, 97, 0.4) !important; }
}

.guided-signer-review-row {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.workspace-left,
.workspace-right,
.workspace-center {
  padding: 18px;
  min-width: 0;
}

.workspace-left,
.workspace-right {
  overflow-wrap: anywhere;
}

.workspace-left h2,
.workspace-right h2,
.workspace-center h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.left-sidebar-status {
  margin-top: 14px;
}

.left-sidebar-status h3 {
  margin: 0 0 8px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 24px 0 18px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-page {
  padding-top: 24px;
  padding-bottom: 36px;
}

.dashboard-grid .panel,
.session-grid .panel {
  padding: 26px 22px;
}

.dashboard-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

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

.dashboard-quick-panel {
  padding: 22px;
  margin-bottom: 20px;
}

.quick-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

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

.action-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 120px;
  padding: 18px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  transition: 0.2s ease;
}

.action-card:hover {
  border-color: rgba(239, 142, 138, 0.35);
  box-shadow: 0 10px 20px rgba(247, 177, 175, 0.25);
}

.action-card span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.action-card strong {
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}

.primary-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--primary-contrast);
  border-color: transparent;
}

.primary-card span {
  color: rgba(31, 35, 40, 0.65);
}

.dashboard-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plan-panel {
  padding: 24px 22px;
}

/* --- Notary dashboard: Availability section --- */
.availability-saved-banner {
  margin: -6px 0 10px;
  color: var(--success, #2E7D4E);
  font-weight: 700;
}

.availability-day-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.availability-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.availability-day-row:last-child {
  border-bottom: 0;
}

.availability-day-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  min-width: 120px;
}

.availability-day-times {
  display: flex;
  align-items: center;
  gap: 8px;
}

.availability-day-times input[type="time"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.availability-blocked-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.availability-blocked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.availability-blocked-row > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.availability-blocked-form {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

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

.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 18px;
}

.plan-card h3 {
  margin: 6px 0 0;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.plan-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.featured-plan {
  background: linear-gradient(180deg, var(--primary-soft) 0%, #ffffff 100%);
  border-color: rgba(239, 142, 138, 0.3);
  box-shadow: 0 18px 36px rgba(247, 177, 175, 0.25);
}

.membership-box {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.membership-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-selector {
  min-width: 220px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.admin-notary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.admin-notary-card {
  padding: 18px;
}

.admin-notary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-notary-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0 0 16px;
}

.admin-notary-meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.admin-notary-meta div:nth-child(1),
.admin-notary-meta div:nth-child(2) {
  grid-column: 1 / -1;
}

.admin-notary-meta dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-notary-meta dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.compact-grid {
  margin-bottom: 12px;
}

.inline-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  align-items: stretch;
}

.inline-form-grid label {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 0;
  font-size: 0.96rem;
  line-height: 1.4;
  font-weight: 700;
}

.inline-form-grid label input,
.inline-form-grid label select {
  width: 100%;
  min-height: 48px;
  height: 48px;
  margin: 0;
  align-self: stretch;
}

.inline-form-grid .schedule-for-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.inline-form-grid .schedule-for-row .schedule-for-btn {
  flex: 1;
  min-width: 0;
}

.inline-form-grid .schedule-for-row .btn {
  min-height: 48px;
  white-space: nowrap;
}
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.asset-upload-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asset-upload-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asset-upload-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
}

.asset-upload-box input {
  width: 100%;
  margin-top: 2px;
}

input[type="file"] {
  display: block;
  margin-top: 8px;
  padding-top: 2px;
}

.asset-preview-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
}

.asset-preview-zone img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.asset-preview-zone.hidden,
.asset-cancel.hidden {
  display: none;
}

.asset-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn.subtle {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}

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

.mark-preview-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 120px;
}

.mark-preview-card strong {
  font-size: 0.95rem;
}

.mark-preview-card img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  background: rgba(255,255,255,0.7);
}

.mark-preview-card .muted {
  display: inline-flex;
  align-items: center;
  min-height: 90px;
  color: var(--muted);
}

.contact-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.toolbar-row input[type="search"] {
  flex: 1;
  min-width: 160px;
}

.contact-import-form {
  display: inline-flex;
  margin: 0;
}

.contact-section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: 0.18s ease;
}

.icon-btn:hover {
  background: rgba(247, 177, 175, 0.14);
  border-color: var(--primary-dark);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.contact-import-banner {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(46, 125, 78, 0.08);
}

.contact-import-banner.contact-import-error {
  background: rgba(223, 30, 30, 0.08);
  color: #b42318;
}

.contact-section-head {
  align-items: center;
}

.contact-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-badge {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(247, 177, 175, 0.16);
}

.contact-illustration,
.contact-empty-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.contact-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 16px 18px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(250, 248, 246, 0.9);
}

.contact-empty-art {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.34);
}

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

.contact-modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.contact-modal-header h3 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.contact-role {
  text-transform: capitalize;
}

.contact-form.hidden {
  display: none;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.contact-item-main,
.contact-item-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.contact-delete-form {
  display: inline-flex;
  margin: 0;
}

.icon-btn.small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.icon-btn.danger:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626;
  color: #dc2626;
}

.saved-contact-picker-row {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.saved-contact-picker-label {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  font-size: 0.96rem;
  line-height: 1.4;
  font-weight: 700;
}

.saved-contact-picker-label select {
  width: 100%;
}

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

.participant-entry {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 16px;
}

.participant-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.participant-entry-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.participant-contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.participant-contact-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.96rem;
  line-height: 1.4;
  font-weight: 700;
}

.participant-contact-picker select,
.participant-contact-picker input,
.participant-entry input,
.participant-entry select {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 500;
}

.participant-fields-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 18px;
  align-items: start;
}

.participant-sms-optin-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0;
  padding: 0;
}

.participant-sms-optin-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.participant-sms-warning {
  margin: 0;
  font-size: 0.8rem;
  color: var(--danger, #b3261e);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.form-field label {
  display: block;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.form-field input,
.form-field select {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 14px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.new-session-form .saved-contact-picker-row .btn {
  height: 48px;
  min-height: 48px;
}

.participant-remove {
  display: inline-flex;
}

.participant-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.inner-panel {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
}

.inner-panel > .eyebrow {
  margin-bottom: 12px;
}

.compact-radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  margin-top: 10px;
}

.identity-option {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  min-height: 0;
  height: 100%;
  cursor: pointer;
}

.identity-option input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.identity-option-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  height: 100%;
  min-height: 88px;
  box-sizing: border-box;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  transition: 0.18s ease;
}

.identity-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(247, 177, 175, 0.16);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.identity-option-art {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 46px;
  flex-shrink: 0;
}

.identity-option-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.identity-person-art {
  width: 70px;
}

.identity-id-art {
  width: 72px;
}

.identity-option-text {
  display: inline-block;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.identity-option input[type="radio"]:checked + .identity-option-card {
  background: rgba(247, 177, 175, 0.14);
  border-color: rgba(239, 142, 138, 0.4);
  box-shadow: inset 0 0 0 1px rgba(239, 142, 138, 0.18);
}

.identity-option input[type="radio"]:checked + .identity-option-card .identity-option-icon {
  background: var(--primary);
  color: var(--primary-contrast);
}

.identity-verification-mode-options {
  grid-column: 2;
  display: flex;
  gap: 6px;
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.22s ease, margin-top 0.22s ease;
}

.identity-verification-mode-options.is-open {
  max-height: 46px;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.identity-mode-pill {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.16s ease;
}

.identity-mode-pill:hover {
  border-color: rgba(239, 142, 138, 0.45);
}

.identity-mode-pill.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast);
}

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

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}

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

.session-item span {
  color: var(--muted);
  margin-top: 4px;
}

.session-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.code-pill {
  background: var(--primary-soft);
  color: var(--text);
  padding: 7px 10px;
}

.status-text {
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 700;
}

.mini-invite-status {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: capitalize;
}

.small-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-notary-delete-form {
  margin: 0;
  display: inline-flex;
}

.link-danger {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--danger);
  cursor: pointer;
}

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

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

.room-panel {
  padding: 20px;
}

.document-placeholder {
  min-height: 440px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #FFFFFF, #FAF8F6);
  border: 2px dashed #F0C6CA;
  border-radius: 18px;
}

.upload-drop-zone {
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.upload-drop-zone:hover,
.upload-drop-zone.is-dragging {
  border-color: var(--primary-dark);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 2px rgba(239, 142, 138, 0.16);
}

.placeholder-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.placeholder-copy strong {
  color: var(--text);
  font-size: 1.1rem;
}

.info-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.session-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.session-info li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.session-info li span {
  color: var(--muted);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.compact-video-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compact-video-tile {
  position: relative;
  border: 1px solid var(--border);
  background: #F1ECEA;
  border-radius: 12px;
  overflow: hidden;
  padding: 8px;
}

.compact-video-tile .video-label {
  left: 10px;
  top: 10px;
  font-size: 0.75rem;
  padding: 5px 9px;
}

.compact-video-tile.small {
  max-width: 160px;
}

.compact-video-tile .local-preview-video {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  background: #2F3437;
}

.video-tile {
  position: relative;
  background: #F1ECEA;
  border: 1px solid var(--border);
  border-radius: 18px;
  min-height: 260px;
  overflow: hidden;
  padding: 18px;
}

.video-label {
  position: absolute;
  left: 18px;
  top: 18px;
  background: rgba(255,255,255,0.85);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  z-index: 2;
}

.video-stage {
  position: relative;
  width: 100%;
  min-height: 240px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(241, 236, 234, 0.9), rgba(255,255,255,0.7));
}

.video-stage video {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: #2F3437;
  display: block;
}

.self-preview {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 130px !important;
  height: 95px !important;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.2);
}

.video-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
  background: linear-gradient(135deg, rgba(241, 236, 234, 0.9), rgba(255,255,255,0.7));
}

.media-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.btn.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.8rem;
}

.btn.danger {
  background: #e64545;
  color: #fff;
}

select {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}

.media-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.document-upload-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.document-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.document-toolbar .btn.active {
  background: var(--primary-soft);
  border-color: #F0C6CA;
  color: var(--text);
}

.field-assignee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.notary-mark-tools {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.notary-mark-tools-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notary-mark-buttons {
  display: flex;
  gap: 8px;
}

.notary-mark-btn {
  flex: 1;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px;
  width: auto;
}

.notary-mark-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 26px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.notary-mark-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.notary-mark-fallback {
  font-size: 1rem;
  color: var(--muted);
}

.notary-mark-btn.no-asset {
  opacity: 0.65;
}

.notary-mark-label {
  font-size: 0.78rem;
  white-space: nowrap;
}

.document-actions {
  display: flex;
  justify-content: flex-start;
}

.notary-assets,
.signer-mark-actions {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.notary-assets h3,
.signer-mark-actions h3 {
  margin: 0;
  font-size: 0.92rem;
}

.asset-upload {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px 8px;
  border: 1px dashed #F0C6CA;
  border-radius: 7px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
}

.asset-upload:hover {
  border-color: var(--primary-dark);
  background: var(--primary-soft);
}

.asset-upload img {
  width: 100%;
  height: 32px;
  object-fit: contain;
}

.asset-upload img:not([src]) {
  display: none;
}

.asset-upload strong {
  color: var(--primary-dark);
  font-size: 0.7rem;
  white-space: nowrap;
}

.signer-mark-actions .btn {
  width: 100%;
}

.upload-button {
  cursor: pointer;
}

.document-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}

.document-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pdf-viewer {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.pdf-workspace {
  /* This is the PDF VIEWPORT: the single scrollable element. It must NOT be
     a centering flex container itself -- a flex child wider than a
     `justify-content: center` parent overflows equally to the left and
     right, and scrollLeft can never go negative, so the left-hand overflow
     becomes permanently unreachable at high zoom. Centering-when-small /
     scrolling-when-large is instead handled by the `.pdf-scroll-content`
     child (see below), which always keeps the page's true left edge at
     scrollLeft = 0. */
  min-width: 0;
  max-height: 74vh;
  overflow: auto;
  position: relative;
}

.pdf-scroll-content {
  /* PDF SCROLL CONTENT / STAGE: grows to fit the zoomed page. `width:
     max-content` lets it expand past 100% once the page is wider than the
     viewport (so the page's left edge is a real, reachable, positive
     scroll-coordinate rather than being centered via negative overflow);
     `min-width/min-height: 100%` keeps it filling the viewport (so the
     `justify-content: center` / `align-items: flex-start` below still
     visually centers the page when it's smaller than the viewport). */
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  width: max-content;
  min-width: 100%;
  min-height: 100%;
}

.pdf-workspace.pan-mode {
  cursor: grab;
}

.pdf-workspace.pan-mode.panning {
  cursor: grabbing;
}

.pdf-workspace.hidden,
.hidden {
  display: none !important;
}

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

.document-upload-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-upload-label {
  font-weight: 700;
}

.document-upload-btn {
  width: 100%;
  gap: 10px;
}

.upload-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  flex-shrink: 0;
}

.document-upload-filename {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.pdf-page-container {
  position: relative;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
  display: none;
  flex: 0 0 auto;
}

.pdf-page-container.active-page {
  display: block;
}

.pdf-page-canvas {
  display: block;
}

.pdf-page-overlay {
  position: absolute;
  inset: 0;
}

.pdf-shell {
  display: grid;
  grid-template-columns: minmax(84px, 120px) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.pdf-thumbnails {
  max-height: 640px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.pdf-thumb {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.pdf-thumb.active-thumb {
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 2px rgba(239, 142, 138, 0.22);
}

.pdf-thumb-canvas {
  max-width: 100%;
  display: block;
}

.pdf-thumb-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.pdf-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.pdf-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 8px;
  gap: 10px;
}

.pdf-pager-divider {
  width: 1px;
  align-self: stretch;
  min-height: 24px;
  background: var(--border);
}

.pdf-zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pdf-zoom-btn {
  min-width: 38px;
  padding: 0 10px;
}

.pdf-zoom-btn.active,
#fit-page-btn.active,
#fit-width-btn.active {
  background: var(--primary-soft);
  border-color: #F0C6CA;
  color: var(--text);
}

.pdf-zoom-level {
  min-width: 46px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.doc-field {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 2px dashed var(--primary-dark);
  background: rgba(247, 177, 175, 0.16);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}

.doc-field:hover {
  box-shadow: 0 0 0 2px rgba(239, 142, 138, 0.25);
}

.doc-field.selected {
  box-shadow: 0 0 0 2px rgba(239, 142, 138, 0.4);
}

.doc-field.read-only {
  border-color: #6d7fa8;
  background: rgba(109, 127, 168, 0.12);
  color: #344054;
}

.doc-field.completed {
  border-style: solid;
  border-color: rgba(46, 125, 78, 0.45);
  background: rgba(46, 125, 78, 0.02);
}

.doc-field.has-signer-color {
  border-color: var(--field-color, #EF8E8A);
  background: var(--field-color-soft, rgba(247, 177, 175, 0.16));
}

.doc-field.has-signer-color.read-only {
  border-color: var(--field-color, #6d7fa8);
  background: var(--field-color-soft, rgba(109, 127, 168, 0.12));
}

.doc-field.has-signer-color.completed {
  border-color: var(--field-color, #2E7D4E);
}

.signer-color-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.field-signature-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.field-resize-handle {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--primary);
  border: 1px solid #fff;
  cursor: nwse-resize;
}

.field-context-menu {
  position: fixed;
  z-index: 60;
  min-width: 130px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
}

.field-context-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  padding: 0 10px;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.field-context-menu button:hover {
  background: var(--primary-soft);
  color: var(--text);
}

.field-context-menu [data-field-action="delete"]:hover {
  background: #fff0f0;
  color: #b3261e;
}

.presence-box {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.presence-box h3 {
  margin: 0 0 12px;
}

.presence-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
}

.passive-role {
  opacity: 0.7;
}

.video-single-grid {
  margin-top: 28px;
}

.video-single {
  position: relative;
  padding: 18px;
}

.remote-main-video {
  width: 100%;
  min-height: 320px;
  border-radius: 14px;
  background: #2F3437;
  object-fit: cover;
}

.signature-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(16, 24, 40, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
}

.signing-complete-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(16, 24, 40, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
}

.signing-complete-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.2);
}

.signing-complete-card h3 {
  margin: 0 0 10px;
  color: var(--success);
  font-size: 1.6rem;
}

.signing-complete-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.signature-card {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 18px;
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.2);
}

.signature-card h3 {
  margin: 0 0 10px;
}

.ready-toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(320px, calc(100vw - 32px));
}

.ready-toast {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
  font-size: 0.82rem;
  color: var(--text);
  animation: ready-toast-in 0.18s ease-out;
}

.ready-toast strong {
  display: block;
  margin-bottom: 2px;
}

@keyframes ready-toast-in {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


.signature-methods {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.signature-method-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
}

.signature-typed-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.signature-typed-controls.hidden {
  display: none;
}

#signature-text-input {
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  color: var(--text);
}

@font-face {
  font-family: 'Brother Signature';
  src: url('/fonts/Brother%20Signature.otf') format('opentype');
}

@font-face {
  font-family: 'Brittany Signature';
  src: url('/fonts/BrittanySignature.ttf') format('truetype');
}

@font-face {
  font-family: 'Alamain';
  src: url('/fonts/alamain1.ttf') format('truetype');
}

@font-face {
  font-family: 'Gold Notes';
  src: url('/fonts/Gold%20Notes.otf') format('opentype');
}

@font-face {
  font-family: 'Glendora';
  src: url('/fonts/Glendora.otf') format('opentype');
}

@font-face {
  font-family: 'High Spirited';
  src: url('/fonts/High%20Spirited.ttf') format('truetype');
}

@font-face {
  font-family: 'Bebas Notes';
  src: url('/fonts/Bebas%20Notes.otf') format('opentype');
}

@font-face {
  font-family: 'Autography';
  src: url('/fonts/Autography.otf') format('opentype');
}

.signature-font-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
}

.signature-font-option {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.25);
  background: #111827;
  cursor: pointer;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.signature-font-option.is-active {
  width: 22px;
  height: 22px;
  border-color: rgba(17, 24, 39, 0.95);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
  transform: scale(1.1);
}

.signature-font-next {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
}

#signature-canvas {
  width: 100%;
  height: 180px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  image-rendering: auto;
  touch-action: none;
}

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

.no-border {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 880px) {
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 0;
  }

  .nav-links,
  .nav-actions,
  .cta-row,
  .info-band,
  .page-header,
  .dashboard-grid,
  .session-grid,
  .workspace-grid,
  .video-grid,
  .hero {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .info-band,
  .cta-row,
  .page-header,
  .nav-links,
  .nav-actions {
    display: flex;
  }

  .nav-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero {
    display: flex;
    flex-direction: column;
  }

  .session-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .pdf-shell {
    grid-template-columns: 1fr;
  }

  .pdf-thumbnails {
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    flex-direction: row;
  }

  .pdf-thumb {
    min-width: 100px;
  }

  .remote-main-video {
    min-height: 220px;
  }

  .self-preview {
    width: 110px !important;
    height: 78px !important;
  }
}

/* "Use Another Device" mobile ID capture handoff */

.mobile-id-handoff-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.mobile-id-handoff-state {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.text-input {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  min-height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.fine-print {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.mobile-id-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mobile-id-divider::before,
.mobile-id-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.mobile-id-alt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Consumer booking flow (Stage 1: scheduling only) --- */
.booking-page .form-panel {
  max-width: 720px;
}

.booking-error-banner {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(195, 40, 40, 0.08);
  border: 1px solid rgba(195, 40, 40, 0.18);
  color: #7a1d1d;
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 4px 0 18px;
}

.booking-section-heading {
  margin: 26px 0 12px;
  font-size: 1.1rem;
}

.booking-service-choice-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.booking-service-choice-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-start;
  font-size: 1.05rem;
}

.booking-service-choice-price {
  font-weight: 800;
  font-size: 1.3rem;
  min-width: 3.2rem;
}

.booking-date-grid,
.booking-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 0;
}

.booking-date-btn,
.booking-time-btn {
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.booking-date-btn:hover,
.booking-time-btn:hover {
  border-color: var(--accent, #2E7D4E);
}

.booking-date-btn.selected {
  background: var(--accent, #2E7D4E);
  border-color: var(--accent, #2E7D4E);
  color: #fff;
}

.booking-empty-state {
  padding: 20px 0;
}

.booking-price-callout {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 10px 0 20px;
}

.booking-summary-card {
  text-align: center;
}

.booking-summary-time {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 8px 0 4px;
}

@media (max-width: 640px) {
  .booking-date-grid,
  .booking-time-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .booking-date-btn,
  .booking-time-btn {
    min-height: 56px;
    font-size: 1.05rem;
  }
}

/* --- Consumer booking flow (Stage 2: customer info / PDF upload / review / payment placeholder) --- */
.booking-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 22px;
}

.booking-progress-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.booking-progress-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
}

.booking-progress-step.is-active {
  color: var(--ink);
}

.booking-progress-step.is-active .booking-progress-dot {
  border-color: var(--accent, #2E7D4E);
  color: var(--accent, #2E7D4E);
}

.booking-progress-step.is-complete .booking-progress-dot {
  background: var(--accent, #2E7D4E);
  border-color: var(--accent, #2E7D4E);
  color: #fff;
}

.booking-form-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
}

.booking-form-fields .booking-field-label {
  font-weight: 700;
  margin-top: 14px;
}

.booking-form-fields .booking-field-hint {
  margin: 2px 0 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.booking-form-fields input[type="text"],
.booking-form-fields input[type="email"],
.booking-form-fields input[type="tel"] {
  min-height: 52px;
  padding: 12px 14px;
  font-size: 1.05rem;
  border-radius: 12px;
  border: 2px solid var(--border);
}

.booking-form-fields input[type="file"] {
  padding: 12px 0;
  font-size: 0.98rem;
}

.booking-form-fields button {
  margin-top: 18px;
}

.booking-document-current {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(46, 125, 78, 0.06);
  margin: 14px 0;
  flex-wrap: wrap;
}

.booking-document-check {
  color: var(--accent, #2E7D4E);
  display: inline-flex;
}

.booking-document-filename {
  font-weight: 700;
}

.booking-document-size {
  color: var(--muted);
  font-size: 0.88rem;
}

.booking-review-card {
  max-width: 560px;
}

.booking-review-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.booking-review-section:last-of-type {
  border-bottom: none;
}

.booking-review-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}

.booking-review-value {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 2px;
}

.booking-review-edit {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent, #2E7D4E);
  text-decoration: underline;
}

/* Stage 4B.9B: customer-facing promo apply/remove + discount breakdown. */
.booking-promo-section {
  padding: 14px 0;
}

.booking-promo-form {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.booking-promo-form input[type="text"] {
  flex: 1;
  min-width: 160px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.98rem;
  border-radius: 10px;
  border: 2px solid var(--border);
  text-transform: uppercase;
}

.booking-price-original {
  font-size: 1.05rem;
  color: var(--muted);
  text-decoration: line-through;
  margin: 8px 0 0;
}

.booking-price-discount {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent, #2E7D4E);
  margin: 2px 0 4px;
}

.promo-strike {
  text-decoration: line-through;
  margin-right: 6px;
}

@media (max-width: 640px) {
  .booking-form-fields input[type="text"],
  .booking-form-fields input[type="email"],
  .booking-form-fields input[type="tel"] {
    min-height: 56px;
    font-size: 1.1rem;
  }

  .booking-progress {
    gap: 4px 10px;
  }

  .booking-progress-label {
    display: none;
  }

  .booking-progress-step.is-active .booking-progress-label {
    display: inline;
  }
}

/* --- Consumer booking flow (Stage 3: Stripe payment / status pages) --- */
.booking-payment-card {
  max-width: 560px;
}

.booking-payment-authorize-note {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(46, 125, 78, 0.08);
  border: 1px solid rgba(46, 125, 78, 0.18);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 4px 0 18px;
}

#booking-payment-form {
  margin-top: 10px;
}

#booking-payment-element {
  margin: 10px 0 18px;
}

#booking-payment-submit {
  width: 100%;
}

#booking-payment-error.hidden {
  display: none;
}

@media (max-width: 640px) {
  .booking-payment-card {
    max-width: none;
  }
}

/* --- Notary dashboard: Notary Now Requests (Stage 3) --- */
.notary-now-request-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notary-now-request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.notary-now-request-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
}

.notary-now-request-price {
  font-size: 1.15rem;
  font-weight: 800;
}

.notary-now-request-actions {
  display: flex;
  gap: 8px;
}

/* --- Notary dashboard: Appointments (Stage 4A) --- */
.appointment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.appointment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.appointment-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
}

.appointment-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* --- Notary dashboard: Communications history (Stage 4B) --- */
.appointment-communications {
  flex-basis: 100%;
  width: 100%;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.appointment-communications summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted, #6b7280);
}

.communication-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.communication-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.communication-time {
  min-width: 68px;
  color: var(--muted, #6b7280);
}

.communication-label {
  flex: 1;
  min-width: 160px;
}

.communication-empty {
  font-size: 0.85rem;
  margin: 8px 0 0;
}

.communication-retry-form {
  display: inline-block;
}

.btn.tiny {
  padding: 4px 10px;
  font-size: 0.78rem;
}


.mobile-id-email-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.mobile-id-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.mobile-id-qr-wrap img {
  width: 220px;
  height: 220px;
}

.mobile-id-waiting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* Stage 4D: masked-phone display + front/back progress indicator. */
.mobile-id-phone-value {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2px 0 8px;
}

.mobile-id-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}

.mobile-id-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.mobile-id-progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.mobile-id-progress-row.is-complete {
  color: var(--ink);
  font-weight: 700;
}

.mobile-id-progress-row.is-complete .mobile-id-progress-dot {
  background: var(--accent, #2E7D4E);
  border-color: var(--accent, #2E7D4E);
}

.mobile-capture-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.mobile-capture-progress li.is-active {
  color: var(--ink);
}

.mobile-capture-progress li.is-complete {
  color: var(--accent, #2E7D4E);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(247, 177, 175, 0.35);
  border-top-color: var(--primary-dark);
  border-radius: 50%;
  animation: mobile-id-spin 0.8s linear infinite;
}

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

/* ------------------------------------------------------------------ */
/* Notary Network Application admin review (Stage 2, 2026-08-31)        */
/* Reuses the existing .container/.panel/.btn/.status-badge/.code-pill/ */
/* .small-actions/.stacked-form system already used by /admin/notaries  */
/* rather than a new isolated stylesheet.                               */
/* ------------------------------------------------------------------ */

.status-badge.tone-neutral {
  background: rgba(100, 116, 139, 0.14);
  color: var(--muted);
}

.status-badge.tone-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #92620a;
}

.status-badge.tone-info {
  background: rgba(30, 58, 138, 0.12);
  color: #1E3A8A;
}

.status-badge.tone-success {
  background: rgba(46, 125, 78, 0.12);
  color: var(--success);
}

.status-badge.tone-danger {
  background: rgba(220, 38, 38, 0.12);
  color: var(--danger);
}

.admin-app-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.admin-app-filter-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  background: #fff;
}

.admin-app-filter-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast, var(--text));
}

.admin-app-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-app-card-head h3 {
  margin: 0 0 2px;
}

.admin-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-review-section {
  margin-bottom: 16px;
}

.admin-review-section h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.admin-review-preview-large {
  max-width: 420px;
  margin-bottom: 10px;
}

.admin-review-preview-large img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.admin-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-inline-panel {
  margin-top: 12px;
}

.admin-inline-panel h3 {
  margin: 0 0 12px;
}

.admin-correction-item-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-correction-item-row textarea {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.88rem;
}

.admin-correction-item-row textarea:disabled {
  background: var(--bg);
  color: var(--muted);
}

.admin-correction-item-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-note-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.admin-note-item p {
  margin: 0 0 4px;
}

.admin-note-item p:last-child {
  margin-bottom: 0;
}

.admin-history-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
}

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

/* ------------------------------------------------------------------ */
/* Mobile signer/witness session-room redesign (document-first, 2026-09-19). */
/* Base (always-on) rules; the actual mobile takeover lives in the       */
/* @media (max-width: 900px) block further down, scoped to               */
/* #session-room:not([data-role="notary"]) so the notary's/desktop layout */
/* is completely unaffected.                                              */
/* ------------------------------------------------------------------ */
.floating-video-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdf-pager-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pdf-more-toggle {
  display: none;
}

/* Compact mobile connection indicator (replaces the full session-topbar-
   title/status block on mobile signer view) -- hidden on desktop/notary. */
.mobile-session-status {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}

.mobile-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  flex: none;
}

.mobile-status-dot.is-connected {
  background: var(--success);
}

/* Session Details / Leave live once in the DOM. On desktop these render as
   plain inline buttons (display:contents makes the wrapper divs invisible
   to layout); the mobile media query turns .mobile-menu-panel into a real
   dropdown and reveals the ⋯ toggle. */
.mobile-session-menu,
.mobile-menu-panel {
  display: contents;
}

.mobile-menu-toggle {
  display: none;
}

.signing-complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.mobile-call-toolbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  justify-content: center;
  gap: 28px;
  padding: 10px max(16px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(6px);
}

.mobile-call-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  min-height: 52px;
  padding: 6px 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
}

.mobile-call-btn.is-off {
  background: rgba(220, 38, 38, 0.85);
}

.mobile-call-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.mobile-call-label {
  font-size: 0.66rem;
  font-weight: 700;
}

.mobile-brand-header {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 0 4px;
  color: var(--text);
}

.mobile-brand-header img,
.mobile-brand-header .brand-mark-svg {
  height: 26px;
  width: auto;
}

.mobile-brand-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.floating-video-panel.hidden-for-modal {
  display: none;
}

.video-edge-tab {
  display: none;
}

.signature-step-indicator {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 900px) {
  /* The signer's active mobile transaction (device check, waiting room,
     live session) should feel like a dedicated app screen, not a website
     page -- hide the public site header entirely and show a small
     non-interactive brand mark instead. Scoped to signer/witness/observer
     only -- the notary's own /session-ready device check is untouched. */
  body:has(
    #session-room:not([data-role="notary"]),
    [data-preflight-page="true"][data-device-check-role="signer"],
    [data-preflight-page="true"][data-device-check-role="witness"],
    [data-preflight-page="true"][data-device-check-role="observer"],
    [data-mobile-id-handoff-page="true"],
    [data-identity-capture-page="true"],
    [data-mobile-capture-page="true"],
    #waiting-room-panel
  ) > .topbar {
    display: none;
  }

  body:has(
    [data-preflight-page="true"][data-device-check-role="signer"],
    [data-preflight-page="true"][data-device-check-role="witness"],
    [data-preflight-page="true"][data-device-check-role="observer"],
    [data-mobile-id-handoff-page="true"],
    [data-identity-capture-page="true"],
    [data-mobile-capture-page="true"],
    #waiting-room-panel
  ) .mobile-brand-header {
    display: flex;
  }

  #session-room:not([data-role="notary"]) .workspace-shell {
    display: block;
    min-height: 0;
  }

  #session-room:not([data-role="notary"]) .session-tools-drawer {
    display: none !important;
  }

  #session-room:not([data-role="notary"]) .session-document-panel {
    max-width: 100%;
    width: 100%;
    margin: 0;
    overflow: visible;
  }

  #session-room:not([data-role="notary"]) .room-header {
    justify-content: flex-start;
  }

  #session-room:not([data-role="notary"]) .session-topbar {
    flex-wrap: wrap;
    padding: 8px 12px;
    margin-bottom: 8px;
  }

  /* Replace the large title/status card with the compact indicator. */
  #session-room:not([data-role="notary"]) .session-topbar-title,
  #session-room:not([data-role="notary"]) .session-topbar-status {
    display: none;
  }

  #session-room:not([data-role="notary"]) .mobile-session-status {
    display: flex;
  }

  /* No large Download button in the active mobile signing view (still
     available via the completion screen). */
  #session-room:not([data-role="notary"]) .session-download-btn {
    display: none;
  }

  #session-room:not([data-role="notary"]) .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 40px;
    min-height: 40px;
    padding: 0;
    font-size: 1.1rem;
  }

  #session-room:not([data-role="notary"]) .mobile-session-menu {
    display: block;
    position: relative;
  }

  #session-room:not([data-role="notary"]) .mobile-menu-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 70;
    flex-direction: column;
    gap: 4px;
    min-width: 190px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  }

  #session-room:not([data-role="notary"]) .mobile-menu-panel.open {
    display: flex;
  }

  #session-room:not([data-role="notary"]) .mobile-menu-item {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 0 12px;
  }

  /* Leave clearance above the fixed bottom call toolbar. */
  #session-room:not([data-role="notary"]) .document-upload-panel {
    padding-bottom: 84px;
  }

  /* --- Compact PDF pager: '\u2039 Page 1 of 2 \u203a' + a collapsed zoom/pan menu --- */
  #session-room:not([data-role="notary"]) .pdf-pager {
    flex-wrap: wrap;
    justify-content: center;
  }

  #session-room:not([data-role="notary"]) .pdf-pager-btn-label {
    display: none;
  }

  #session-room:not([data-role="notary"]) .pdf-pager-nav-btn {
    min-width: 0;
    padding: 0 12px;
  }

  #session-room:not([data-role="notary"]) .pdf-pager-arrow {
    font-size: 1.15rem;
    line-height: 1;
  }

  #session-room:not([data-role="notary"]) #page-indicator {
    font-size: 0.82rem;
  }

  #session-room:not([data-role="notary"]) .pdf-pager-divider {
    display: none;
  }

  #session-room:not([data-role="notary"]) .pdf-more-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 34px;
    padding: 0;
  }

  #session-room:not([data-role="notary"]) .pdf-zoom-controls {
    display: none;
    flex-basis: 100%;
    justify-content: center;
    margin-top: 6px;
  }

  #session-room:not([data-role="notary"]) .pdf-zoom-controls.mobile-expanded {
    display: flex;
  }

  /* --- Floating picture-in-picture video panel --- */
  #session-room:not([data-role="notary"]) .floating-video-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    width: 128px;
    padding: 0;
    z-index: 60;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
    touch-action: none;
    transition: width 0.18s ease, height 0.18s ease;
  }

  /* Guided Signing keeps the video visible but slightly smaller so it's less
     likely to need to overlap the zoomed-in active field. */
  #session-room:not([data-role="notary"]) .floating-video-panel.guided-compact {
    width: 104px;
  }

  /* Signer-collapsible video (WhatsApp-style): dragging the panel far enough
     past the left/right edge docks it there as a small arrow tab; either the
     signer (by dragging) or the notary (remote control) can trigger this. */
  #session-room:not([data-role="notary"]) .video-edge-tab {
    display: none;
  }

  #session-room:not([data-role="notary"]) .floating-video-panel.signer-collapsed {
    width: 30px;
    height: 64px;
    min-width: 0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.3);
    background: transparent;
  }

  #session-room:not([data-role="notary"]) .floating-video-panel.signer-collapsed.collapsed-edge-left {
    left: 0 !important;
    right: auto !important;
  }

  #session-room:not([data-role="notary"]) .floating-video-panel.signer-collapsed.collapsed-edge-right {
    right: 0 !important;
    left: auto !important;
  }

  #session-room:not([data-role="notary"]) .floating-video-panel.signer-collapsed .video-edge-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: none;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
  }

  #session-room:not([data-role="notary"]) .floating-video-panel.signer-collapsed.collapsed-edge-left .video-edge-tab {
    border-radius: 0 12px 12px 0;
  }

  #session-room:not([data-role="notary"]) .floating-video-panel.signer-collapsed.collapsed-edge-right .video-edge-tab {
    border-radius: 12px 0 0 12px;
  }

  #session-room:not([data-role="notary"]) .floating-video-panel.signer-collapsed .floating-video-body,
  #session-room:not([data-role="notary"]) .floating-video-panel.signer-collapsed .media-controls,
  #session-room:not([data-role="notary"]) .floating-video-panel.signer-collapsed .panel-media-status {
    display: none;
  }

  #session-room:not([data-role="notary"]) .floating-video-panel.dragging {
    transition: none;
  }

  #session-room:not([data-role="notary"]) .floating-video-header {
    display: none;
  }

  #session-room:not([data-role="notary"]) .floating-video-body {
    position: relative;
  }

  #session-room:not([data-role="notary"]) #remote-video-stack {
    gap: 0;
  }

  #session-room:not([data-role="notary"]) #remote-video-stack .compact-video-tile {
    min-height: 0;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
  }

  #session-room:not([data-role="notary"]) #remote-video-stack .video-label {
    display: none;
  }

  #session-room:not([data-role="notary"]) .local-preview-stack {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 34%;
    z-index: 2;
  }

  #session-room:not([data-role="notary"]) .local-preview-stack .compact-video-tile {
    min-height: 0;
    aspect-ratio: 3 / 4;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 10px;
  }

  /* The base .local-preview-video rule further down hardcodes a 110px
     height for the (larger) desktop preview box -- that selector is more
     specific than the shared `.remote-main-video, .local-preview-video`
     100%-height rule, so without this override the video stays 110px tall
     inside this much smaller mobile PIP box and gets cropped by
     `overflow: hidden`, making it look zoomed in on a tiny sliver of the
     signer's face. */
  #session-room:not([data-role="notary"]) .local-preview-stack .local-preview-video {
    height: 100%;
  }

  #session-room:not([data-role="notary"]) .local-preview-stack .video-label {
    display: none;
  }

  #session-room:not([data-role="notary"]) .floating-video-panel .media-controls,
  #session-room:not([data-role="notary"]) .floating-video-panel .panel-media-status {
    display: none;
  }

  /* --- Bottom mobile call toolbar --- */
  #session-room:not([data-role="notary"]) .mobile-call-toolbar {
    display: flex;
  }

  #session-room:not([data-role="notary"]) .guided-signer-panel.signer-inline {
    flex-wrap: wrap;
  }
}

/* ------------------------------------------------------------------ */
/* Stage 4B.8: Admin Communications Center                              */
/* Reuses the existing .container/.panel/.btn/.status-badge/.muted      */
/* system rather than a new isolated stylesheet.                        */
/* ------------------------------------------------------------------ */

.comm-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.comm-summary-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.comm-summary-card strong {
  font-size: 1.9rem;
  color: var(--text);
}

.comm-summary-card span {
  color: var(--text-secondary, var(--muted));
  font-size: 0.85rem;
}

.comm-summary-card span em {
  font-style: normal;
  color: var(--muted);
}

.comm-filters-panel {
  margin-bottom: 18px;
}

.comm-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
}

.comm-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 140px;
}

.comm-filters select,
.comm-filters input[type="text"] {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.comm-filters input[type="text"] {
  min-width: 220px;
}

.comm-table-panel {
  overflow: visible;
}

.comm-table-scroll {
  overflow-x: auto;
}

.comm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 720px;
}

.comm-table th,
.comm-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.comm-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.comm-table td:nth-child(4) {
  white-space: normal;
}

.comm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.comm-pagination-links {
  display: flex;
  gap: 14px;
}

.comm-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.comm-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 20px;
  margin: 0;
}

.comm-detail-summary div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comm-detail-summary dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.comm-detail-summary dd {
  margin: 0;
  font-weight: 600;
}

.comm-attempts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comm-attempt-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.comm-attempt-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 20px;
  margin: 0;
}

.comm-attempt-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comm-attempt-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.comm-attempt-meta dd {
  margin: 0;
  word-break: break-word;
}

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

  .comm-filters label {
    min-width: 0;
    flex: 1 1 45%;
  }
}

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

  .comm-filters label {
    flex: 1 1 100%;
  }
}

/* Stage 4B.9A: Admin Promo Codes -- reuses .form-field/.stacked-form/
   .participant-sms-optin-label, just two small additions. */
.promo-form-hint {
  font-size: 0.85rem;
  margin: 0;
}

.promo-radio-row-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}


