:root {
  --color-bg: #f4f7fb;
  --color-surface: #ffffff;
  --color-text: #102a43;
  --color-muted: #62748a;
  --color-border: #e4eaf1;

  --color-primary: #0bb6c7;
  --color-primary-dark: #082957;
  --color-primary-soft: #e6f8fb;

  --sidebar-width: 260px;
  --sidebar-width-collapsed: 82px;
  --topbar-height: 72px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}


/* ENVIRONMENT BANNER */

.environment-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  background: #facc15;
  color: #3f2f04;
  border-bottom: 1px solid #d4a90d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.environment-banner span {
  display: block;
  max-width: min(100%, 920px);
}

@media (max-width: 520px) {
  .environment-banner {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 11px;
  }

  .environment-banner span {
    max-width: 220px;
  }
}

/* AUTH */

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(11, 182, 199, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f4f7fb 100%);
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-surface);
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 24px 60px rgba(8, 41, 87, 0.16);
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  width: 190px;
  max-width: 100%;
  height: auto;
  margin-bottom: 14px;
}

.login-brand p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-form h1 {
  margin: 0 0 22px;
  font-size: 24px;
  color: var(--color-primary-dark);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 700;
}

.form-group input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}

.form-group input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 182, 199, 0.16);
}

.primary-button {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--color-primary-dark);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  background: #061f43;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff1f2;
  color: #991b1b;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.danger-button:hover,
.danger-button:focus {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #7f1d1d;
  text-decoration: none;
}

.login-helper-link {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 14px;
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.login-helper-link:hover,
.login-helper-link:focus {
  text-decoration: underline;
}
.auth-link-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  background: var(--color-primary-dark);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.auth-link-button:hover,
.auth-link-button:focus,
.auth-link-button:visited {
  background: #061f43;
  color: #ffffff;
  text-decoration: none;
}

.form-alert {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.turnstile-widget-group {
  display: flex;
  justify-content: center;
  min-height: 68px;
  margin: 4px 0 18px;
}

.turnstile-widget-group .form-alert {
  width: 100%;
  margin-bottom: 0;
}

/* APP SHELL */

.app-body {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  min-height: 100vh;
  background: #ffffff;
  border-right: 1px solid var(--color-border);
  overflow: hidden;
  position: sticky;
  top: 0;
  transition: width 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  max-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.sidebar-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.sidebar-logo {
  width: auto;
  max-width: 150px;
  max-height: 54px;
  height: auto;
  object-fit: contain;
  transition: max-width 0.2s ease, max-height 0.2s ease;
}

.sidebar-close {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--color-primary-dark);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-close:hover {
  background: var(--color-primary-soft);
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.sidebar-link,
.sidebar-account-link,
.sidebar-logout {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.sidebar-link:hover,
.sidebar-account-link:hover,
.sidebar-logout:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.sidebar-link.active,
.sidebar-account-link.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.sidebar-link.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sidebar-link.disabled:hover {
  background: transparent;
  color: var(--color-muted);
}

.sidebar-icon {
  width: 22px;
  text-align: center;
  font-size: 17px;
  flex-shrink: 0;
}

.sidebar-text {
  white-space: nowrap;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid var(--color-border);
  flex: 0 0 auto;
}

.sidebar-user {
  padding: 0 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-user-name {
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.sidebar-tenant-switch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.sidebar-tenant-label,
.sidebar-tenant-name {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-tenant-select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 8px;
}

.sidebar-tenant-select:focus {
  outline: 2px solid var(--color-primary-soft);
  border-color: var(--color-primary);
}
.sidebar-user-role {
  color: var(--color-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.app-main {
  flex: 1;
  min-width: 0;
}

.topbar {
  height: var(--topbar-height);
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
}

.sidebar-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--color-primary-dark);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: var(--color-primary-soft);
}

.topbar-title {
  flex: 1;
  min-width: 0;
}

.topbar-title h1 {
  margin: 0;
  font-size: 20px;
  color: var(--color-primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  color: var(--color-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-content {
  padding: 30px;
}

.page-section {
  max-width: 1180px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h2 {
  margin: 0 0 8px;
  color: var(--color-primary-dark);
  font-size: 26px;
}

.page-header p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.5;
}

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

.info-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(8, 41, 87, 0.06);
}

.info-card h3 {
  margin: 0 0 8px;
  color: var(--color-primary-dark);
}

.info-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

/* SIDEBAR COLLAPSED - DESKTOP */

.app-shell.sidebar-collapsed .sidebar {
  width: var(--sidebar-width-collapsed);
}

.app-shell.sidebar-collapsed .sidebar-logo {
  max-width: 42px;
  max-height: 42px;
}

.app-shell.sidebar-collapsed .sidebar-text {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-link,
.app-shell.sidebar-collapsed .sidebar-account-link,
.app-shell.sidebar-collapsed .sidebar-logout {
  justify-content: center;
  padding: 0;
}

.app-shell.sidebar-collapsed .sidebar-user {
  display: none;
}

/* RESPONSIVO */

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100dvh;
    width: var(--sidebar-width);
    transform: translateX(0);
    box-shadow: 0 20px 60px rgba(8, 41, 87, 0.22);
  }

  .sidebar-header {
    justify-content: space-between;
  }

  .sidebar-logo {
    max-width: 150px;
    max-height: 54px;
  }

  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .app-shell.sidebar-collapsed .sidebar {
    width: var(--sidebar-width);
    transform: translateX(-100%);
    box-shadow: none;
  }

  .app-shell.sidebar-collapsed .sidebar-logo {
    max-width: 150px;
    max-height: 54px;
  }

  .app-shell.sidebar-collapsed .sidebar-text {
    display: inline;
  }

  .app-shell.sidebar-collapsed .sidebar-link,
  .app-shell.sidebar-collapsed .sidebar-account-link,
  .app-shell.sidebar-collapsed .sidebar-logout {
    justify-content: flex-start;
    padding: 0 14px;
  }

  .app-shell.sidebar-collapsed .sidebar-user {
    display: flex;
  }

  .app-main {
    min-height: 100vh;
  }

  .topbar {
    padding: 0 18px;
  }

  .topbar-actions {
    display: none;
  }

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

  .app-content {
    padding: 22px;
  }

  .login-card {
    padding: 28px 24px;
  }
}

/* NOT FOUND */

.not-found-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.not-found-card {
  width: 100%;
  max-width: 460px;
  background: var(--color-surface);
  border-radius: 24px;
  padding: 38px 32px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(8, 41, 87, 0.16);
}

.not-found-logo {
  width: 150px;
  max-width: 100%;
  height: auto;
  margin-bottom: 22px;
}

.not-found-card h1 {
  margin: 0;
  font-size: 64px;
  line-height: 1;
  color: var(--color-primary-dark);
}

.not-found-card h2 {
  margin: 12px 0 10px;
  font-size: 24px;
  color: var(--color-primary-dark);
}

.not-found-card p {
  margin: 0 0 24px;
  color: var(--color-muted);
  line-height: 1.5;
}

.primary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--color-primary-dark);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}

.primary-link-button:visited,
.primary-link-button:hover,
.primary-link-button:focus {
  color: #ffffff;
  text-decoration: none;
}

.primary-link-button:hover {
  background: #061f43;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.disabled-action {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.disabled-action,
.disabled-action:visited,
.disabled-action:hover,
.disabled-action:focus {
  color: #ffffff;
  text-decoration: none;
}

.table-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(8, 41, 87, 0.06);
}

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

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.data-table th {
  background: #f8fafc;
  color: var(--color-primary-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td span {
  display: block;
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 13px;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.origin-badge {
  display: block;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 7px;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  background: #f0f9ff;
  color: #075985;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.detail-list .origin-badge {
  display: inline-flex;
  margin-top: 0;
}
.status-draft {
  background: #fff7ed;
  color: #9a3412;
}

.status-published {
  background: #dcfce7;
  color: #166534;
}

.status-inactive {
  background: #f1f5f9;
  color: #475569;
}

.empty-state {
  background: #ffffff;
  border: 1px dashed var(--color-border);
  border-radius: 18px;
  padding: 28px;
}

.empty-state h3 {
  margin: 0 0 8px;
  color: var(--color-primary-dark);
}

.empty-state p {
  margin: 0;
  color: var(--color-muted);
}

@media (max-width: 860px) {
  .page-header-row {
    display: block;
  }

  .page-header-row .primary-link-button {
    margin-top: 16px;
  }

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

  .data-table {
    min-width: 720px;
  }
}

.secondary-link-button {
  background: #ffffff;
  color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
}

.secondary-link-button:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.table-actions {
  white-space: nowrap;
  text-align: right;
}

.table-actions a {
  color: var(--color-primary-dark);
  font-weight: 800;
  text-decoration: none;
}

.table-actions a:hover {
  text-decoration: underline;
}

.table-action-form {
  display: inline-flex;
  justify-content: flex-end;
  margin: 0;
}

.table-button {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}
/* EVENT LIST FILTERS */

.event-list-filters {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(8, 41, 87, 0.06);
}

.event-list-filter-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(130px, 1fr));
  gap: 14px;
  align-items: end;
}

.event-list-filter-grid label {
  display: block;
  min-width: 0;
}

.event-list-filter-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--color-primary-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-list-filter-grid input,
.event-list-filter-grid select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  padding: 0 10px;
}

.event-list-filter-grid input:disabled {
  background: #f8fafc;
  color: var(--color-muted);
}

.event-list-filter-actions,
.event-list-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.event-list-summary {
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: 14px;
}

.event-list-summary strong {
  color: var(--color-primary-dark);
}

.events-table {
  min-width: 980px;
}

@media (max-width: 980px) {
  .event-list-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .event-list-filters {
    padding: 14px;
  }

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

.term-requests-table-card {
  overflow-x: auto;
}

.term-requests-table {
  min-width: 1040px;
}

.term-requests-table .term-requests-actions-column {
  position: sticky;
  right: 0;
  min-width: 172px;
  background: #ffffff;
  box-shadow: -10px 0 18px rgba(8, 41, 87, 0.08);
  z-index: 1;
}

.term-requests-table th.term-requests-actions-column {
  background: #f8fafc;
  z-index: 2;
}

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

.detail-grid-full {
  align-items: start;
}

.detail-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(8, 41, 87, 0.06);
}

.product-public-access {
  grid-column: 1 / -1;
}

.product-public-access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: center;
}

.product-public-link-panel {
  min-width: 0;
}

.product-public-link-panel > label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-text);
  font-weight: 700;
}

.product-public-url-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.product-public-url-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.product-public-url-row .secondary-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.product-public-warning {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid #d97706;
  border-radius: 6px;
  background: #fffbeb;
  color: #78350f;
}

.product-qr-preview {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.product-qr-image {
  display: block;
  width: min(240px, 100%);
  height: auto;
  aspect-ratio: 1;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #ffffff;
}

.detail-card h3 {
  margin: 0 0 18px;
  color: var(--color-primary-dark);
}

.detail-card h4 {
  margin: 0 0 10px;
  color: var(--color-primary-dark);
  font-size: 14px;
}

.detail-list {
  margin: 0;
}

.detail-list div {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.detail-list div:first-child {
  padding-top: 0;
}

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

.detail-list dt {
  margin-bottom: 4px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-list dd {
  margin: 0;
  color: var(--color-text);
  font-size: 14px;
  word-break: break-word;
}

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

.field-chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.field-chip-list li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 6px 8px 0;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.muted-text {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.term-pdf-card {
  grid-column: 1 / -1;
}

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

.term-pdf-item {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #f8fafc;
}

.term-pdf-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.term-pdf-header strong {
  display: block;
  margin-bottom: 4px;
  color: var(--color-primary-dark);
  font-size: 15px;
}

.term-pdf-header span:not(.status-badge) {
  display: block;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.4;
}

.term-pdf-header .status-badge {
  white-space: nowrap;
}

.term-pdf-meta div {
  padding: 8px 0;
}

.term-pdf-download-link {
  width: fit-content;
}

@media (max-width: 860px) {
  .detail-grid,
  .field-list-grid {
    grid-template-columns: 1fr;
  }

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

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

  .table-actions {
    text-align: left;
  }
}

.form-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(8, 41, 87, 0.06);
}

.app-form {
  margin: 0;
}

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

.form-group-full {
  grid-column: 1 / -1;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field span {
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--color-text);
  font-size: 15px;
  outline: none;
  background: #ffffff;
}

.form-field input[type="file"] {
  height: auto;
  min-height: 46px;
  padding: 10px 14px;
}

.form-field textarea {
  min-height: 96px;
  padding-top: 12px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 182, 199, 0.16);
}
.form-group select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  background: #ffffff;
}

.form-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 182, 199, 0.16);
}

.form-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button-inline {
  width: auto;
  min-width: 150px;
  padding: 0 20px;
}

.danger-button-inline {
  width: auto;
  min-width: 120px;
  padding: 0 18px;
}

.status-open {
  background: #dcfce7;
  color: #166534;
}

.status-closed {
  background: #f1f5f9;
  color: #475569;
}

.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 860px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .primary-button,
  .form-actions .secondary-button {
    width: 100%;
  }

  .primary-button-inline {
    width: 100%;
  }
}

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

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

.summary-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(8, 41, 87, 0.06);
}

.summary-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-card strong {
  display: block;
  color: var(--color-primary-dark);
  font-size: 28px;
  line-height: 1;
}

.section-title-row {
  margin: 22px 0 14px;
}

.section-title-row h3 {
  margin: 0 0 6px;
  color: var(--color-primary-dark);
}

.section-title-row p {
  margin: 0;
  color: var(--color-muted);
}

.status-sent {
  background: #e0f2fe;
  color: #075985;
}

.status-opened {
  background: #ecfeff;
  color: #155e75;
}

.status-filling {
  background: #fef9c3;
  color: #854d0e;
}

.status-signed {
  background: #dcfce7;
  color: #166534;
}

.status-expired {
  background: #f1f5f9;
  color: #475569;
}

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

@media (max-width: 860px) {
  .page-actions {
    margin-top: 16px;
    flex-direction: column-reverse;
    align-items: stretch;
  }

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

/* PUBLIC */

.public-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(11, 182, 199, 0.16), transparent 32%),
    linear-gradient(135deg, #f8fafc 0%, #eef7fa 100%);
  color: var(--color-text);
}

.public-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.public-card {
  width: 100%;
  max-width: 620px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 18px 44px rgba(8, 41, 87, 0.12);
  text-align: center;
}

.public-logo {
  margin-bottom: 20px;
  text-align: center;
}

.public-logo img {
  max-width: 150px;
  height: auto;
}

.public-card h1 {
  margin: 0 0 10px;
  color: var(--color-primary-dark);
  font-size: 28px;
}

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

.public-status-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.public-status-ok {
  background: #dcfce7;
  color: #166534;
}

.public-status-error {
  background: #fee2e2;
  color: #991b1b;
}

.public-info-box {
  margin: 22px 0;
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 18px;
  background: #f8fafc;
}

.public-main-action {
  display: inline-flex;
  margin-top: 4px;
}

.public-start-form {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.public-start-form .public-field {
  text-align: left;
}

.public-start-form .public-muted {
  margin: 8px 0 0;
}

.public-start-form .public-main-action {
  justify-self: center;
  border: 0;
  cursor: pointer;
}

.public-muted {
  margin-top: 18px !important;
  font-size: 13px;
}

@media (max-width: 640px) {
  .public-card {
    padding: 24px;
    border-radius: 18px;
  }

  .public-card h1 {
    font-size: 24px;
  }
}

.public-form-page {
  width: 100%;
  max-width: 920px;
}

.public-form-header {
  text-align: center;
  margin-bottom: 22px;
}

.public-form-header img {
  max-width: 150px;
  height: auto;
  margin-bottom: 18px;
}

.public-form-header h1 {
  margin: 0 0 8px;
  color: var(--color-primary-dark);
  font-size: 30px;
}

.public-form-header p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.6;
}

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

.public-form-summary div {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(8, 41, 87, 0.06);
}

.public-form-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.public-form-summary strong {
  display: block;
  color: var(--color-primary-dark);
  font-size: 14px;
}

.public-form-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 18px 44px rgba(8, 41, 87, 0.12);
}

.public-form-section {
  margin-bottom: 28px;
}

.public-form-section:last-of-type {
  margin-bottom: 0;
}

.public-form-section h2 {
  margin: 0 0 6px;
  color: var(--color-primary-dark);
  font-size: 22px;
}

.public-form-section p {
  margin: 0 0 18px;
  color: var(--color-muted);
}

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

.public-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 800;
}

.public-field label span {
  color: #dc2626;
}

.public-field input,
.public-field select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--color-text);
  font-size: 15px;
  outline: none;
  background: #ffffff;
}

.public-field input:focus,
.public-field select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 182, 199, 0.16);
}

.dependent-card {
  margin-top: 16px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 18px;
  background: #f8fafc;
}

.dependent-card h3 {
  margin: 0 0 14px;
  color: var(--color-primary-dark);
  font-size: 17px;
}

.public-form-actions {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.public-form-actions a {
  color: var(--color-primary-dark);
  font-weight: 800;
  text-decoration: none;
}

.public-form-actions a:hover {
  text-decoration: underline;
}

.public-form-actions .primary-link-button {
  margin-left: auto;
  color: #ffffff;
}

.public-form-actions .primary-link-button:hover,
.public-form-actions .primary-link-button:visited,
.public-form-actions .primary-link-button:focus {
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 760px) {
  .public-shell {
    align-items: flex-start;
    padding: 18px;
  }

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

  .public-form-card {
    padding: 20px;
    border-radius: 18px;
  }

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

  .public-form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .public-form-actions .primary-button,
  .public-form-actions .primary-link-button {
    width: 100%;
    margin-left: 0;
    text-align: center;
    justify-content: center;
  }

  .public-form-actions a:not(.primary-link-button) {
    text-align: center;
  }
}

.public-card-wide {
  max-width: 760px;
  text-align: left;
}

.public-card-wide .public-logo,
.public-card-wide > h1,
.public-card-wide > p,
.public-card-wide > .public-muted {
  text-align: center;
}

.public-card-wide .public-status-icon {
  margin-left: auto;
  margin-right: auto;
}

.review-block {
  margin-top: 20px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
}

.review-block h2 {
  margin: 0 0 14px;
  color: var(--color-primary-dark);
  font-size: 20px;
}

.dependent-review-card {
  margin-top: 14px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
}

.dependent-review-card h3 {
  margin: 0 0 12px;
  color: var(--color-primary-dark);
  font-size: 16px;
}

.term-text-box {
  margin-top: 20px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 20px;
  background: #ffffff;
}

.term-text-box h2 {
  margin: 0 0 14px;
  color: var(--color-primary-dark);
  font-size: 20px;
}

.term-text-box p {
  margin: 0 0 14px;
  color: var(--color-text);
  line-height: 1.7;
}

.term-text-box p:last-child {
  margin-bottom: 0;
}

.acceptance-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}

.acceptance-check input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.signature-block {
  margin-top: 22px;
}

.signature-block label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 800;
}

.signature-pad-wrap {
  width: 100%;
  border: 1px dashed var(--color-border);
  border-radius: 16px;
  background: #f8fafc;
  padding: 10px;
}

.signature-pad-wrap canvas {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 12px;
  background: #ffffff;
  touch-action: none;
}

.secondary-action-button {
  margin-top: 10px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--color-primary-dark);
  font-weight: 800;
  cursor: pointer;
}

.secondary-action-button:hover {
  background: var(--color-primary-soft);
}

.table-action-separator {
  display: inline;
  margin: 0 8px;
  color: var(--color-muted);
}

/* Ajuste dos botoes secundarios */

.secondary-link-button,
.secondary-link-button:visited,
.secondary-link-button:focus,
.secondary-link-button:active {
  background: #ffffff;
  color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
  text-decoration: none;
}

.secondary-link-button:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  text-decoration: none;
}

.signed-preview-page {
  max-width: 980px;
}

.signed-document {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 12px 34px rgba(8, 41, 87, 0.08);
}

.signed-document-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.signed-document-header h1 {
  margin: 0 0 8px;
  color: var(--color-primary-dark);
  font-size: 28px;
}

.signed-document-header p {
  margin: 0;
  color: var(--color-muted);
}

.signed-document-status {
  flex-shrink: 0;
}

.signed-document-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

.signed-document-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.signed-document-section h2 {
  margin: 0 0 16px;
  color: var(--color-primary-dark);
  font-size: 21px;
}

.signed-dependent-card {
  margin-top: 14px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
}

.signed-dependent-card h3 {
  margin: 0 0 12px;
  color: var(--color-primary-dark);
  font-size: 16px;
}

.signed-term-content {
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 22px;
  background: #f8fafc;
  color: var(--color-text);
  line-height: 1.7;
}

.signed-term-content h1,
.signed-term-content h2,
.signed-term-content h3 {
  color: var(--color-primary-dark);
}

.signed-term-content p {
  margin: 0 0 14px;
}

.signed-term-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .signed-document {
    padding: 20px;
    border-radius: 18px;
  }

  .signed-document-header {
    display: block;
  }

  .signed-document-status {
    margin-top: 14px;
  }
}

.signature-preview-box {
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 18px;
  background: #f8fafc;
}

.signature-preview-box h3 {
  margin: 0 0 12px;
  color: var(--color-primary-dark);
  font-size: 16px;
}

.signature-preview-image-wrap {
  border: 1px dashed var(--color-border);
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
}

.signature-preview-image {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
}

.status-queued {
  background: #fef3c7;
  color: #92400e;
}

.public-consent-box {
  margin: 18px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}

.public-consent-box a {
  color: var(--color-primary-dark);
  font-weight: 800;
  text-decoration: none;
}

.public-consent-box a:hover {
  text-decoration: underline;
}

/* PUBLIC LANGUAGE SWITCHER */

.public-card,
.public-card-wide,
.public-form-page {
  position: relative;
}

.public-language-switcher {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(8, 41, 87, 0.08);
  backdrop-filter: blur(8px);
}

.public-language-switcher label {
  margin: 0;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.public-language-switcher select {
  height: 30px;
  min-width: 112px;
  border: 0;
  border-radius: 999px;
  padding: 0 28px 0 10px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-size: 13px;
  font-weight: 800;
  outline: none;
  cursor: pointer;
}

.public-language-switcher select:focus {
  box-shadow: 0 0 0 3px rgba(11, 182, 199, 0.16);
}

.public-card .public-logo,
.public-card-wide .public-logo {
  margin-top: 18px;
}

.public-form-header {
  position: relative;
  padding-top: 12px;
}

.public-form-header .public-language-switcher {
  top: 0;
  right: 0;
}

@media (max-width: 760px) {
  .public-language-switcher {
    position: static;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 18px;
  }

  .public-card .public-logo,
  .public-card-wide .public-logo {
    margin-top: 0;
  }

  .public-form-header {
    padding-top: 0;
  }

  .public-form-header .public-language-switcher {
    margin-bottom: 16px;
  }
}

@media (max-width: 420px) {
  .public-language-switcher {
    width: 100%;
    justify-content: space-between;
    border-radius: 16px;
  }

  .public-language-switcher select {
    min-width: 0;
    flex: 1;
  }
}



/* Ajuste visual do logo nas telas publicas de formulario */
.public-form-header > img {
  display: inline-block;
  max-width: 150px;
  height: auto;
  margin: 0 auto 18px;
  padding: 10px 16px;
  border: 1px solid rgba(228, 234, 241, 0.95);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(8, 41, 87, 0.08);
}

@media (max-width: 760px) {
  .public-form-header > img {
    max-width: 142px;
    margin-bottom: 16px;
    padding: 9px 14px;
    border-radius: 16px;
  }
}

/* PUBLIC TENANT BRANDING */

.public-tenant-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  text-align: center;
}

.public-tenant-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 240px;
  max-height: 96px;
  object-fit: contain;
  padding: 10px 16px;
  border: 1px solid rgba(228, 234, 241, 0.95);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(8, 41, 87, 0.08);
}

.public-card .public-tenant-logo,
.public-card-wide .public-tenant-logo {
  margin-top: 18px;
  margin-bottom: 8px;
}

.public-form-header .public-tenant-logo {
  margin-bottom: 10px;
}

.public-form-header .public-tenant-logo img {
  max-width: 260px;
  max-height: 104px;
  margin: 0;
}

.public-powered-by {
  margin: 0 0 22px !important;
  text-align: center;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.4;
}

.public-form-header .public-powered-by {
  margin-bottom: 18px !important;
}

@media (max-width: 760px) {
  .public-tenant-logo img {
    max-width: 220px;
    max-height: 88px;
    padding: 9px 14px;
    border-radius: 16px;
  }

  .public-form-header .public-tenant-logo img {
    max-width: 230px;
    max-height: 92px;
  }

  .public-card .public-tenant-logo,
  .public-card-wide .public-tenant-logo {
    margin-top: 0;
  }
}

@media (max-width: 420px) {
  .public-tenant-logo img {
    max-width: 100%;
  }
}

/* Evita sobreposicao entre logo do tenant e seletor de idioma */
.public-card:has(.public-language-switcher) .public-tenant-logo,
.public-card-wide:has(.public-language-switcher) .public-tenant-logo {
  margin-top: 62px;
}

.public-form-header:has(.public-language-switcher) {
  padding-top: 68px;
}

.public-form-header:has(.public-language-switcher) .public-tenant-logo {
  margin-top: 0;
}

/* Ajuste para logos horizontais de tenants, como Brotas Rafting */
.public-tenant-logo img {
  max-width: min(320px, 86%);
  max-height: 92px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* No mobile o seletor entra no fluxo normal, entao nao precisa reservar espaco */
@media (max-width: 760px) {
  .public-card:has(.public-language-switcher) .public-tenant-logo,
  .public-card-wide:has(.public-language-switcher) .public-tenant-logo {
    margin-top: 0;
  }

  .public-form-header:has(.public-language-switcher) {
    padding-top: 0;
  }

  .public-tenant-logo img {
    max-width: min(280px, 92%);
    max-height: 86px;
  }
}


/* TERM TEMPLATE CONTENT PREVIEW */

.term-content-preview-card {
  margin-top: 18px;
}

.term-content-preview-title {
  margin-top: 0;
}

.term-content-preview-title h3 {
  margin: 0 0 6px;
  color: var(--color-primary-dark);
}

.term-preview-list {
  display: grid;
  gap: 18px;
}
.term-preview-tabs {
  display: grid;
  gap: 14px;
}

.term-preview-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #f8fafc;
}

.term-preview-tab {
  min-height: 44px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--color-muted);
  font-family: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.term-preview-tab:hover,
.term-preview-tab:focus {
  background: #ffffff;
  color: var(--color-primary-dark);
  outline: none;
}

.term-preview-tab:focus-visible {
  box-shadow: 0 0 0 3px rgba(11, 182, 199, 0.16);
}

.term-preview-tab.active {
  border-color: var(--color-border);
  background: #ffffff;
  color: var(--color-primary-dark);
  box-shadow: 0 6px 16px rgba(8, 41, 87, 0.07);
}

.term-preview-tab span,
.term-preview-tab small {
  display: block;
}

.term-preview-tab small {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 800;
}

.term-preview-tab-panels {
  min-width: 0;
}

.term-preview-panel {
  border: 1px solid var(--color-border);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
}

.term-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
  background: #f8fafc;
}

.term-preview-header h4 {
  margin: 0 0 4px;
  color: var(--color-primary-dark);
  font-size: 16px;
}

.term-preview-header p {
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
  word-break: break-all;
}

.term-preview-content {
  padding: 22px;
  color: var(--color-text);
  line-height: 1.7;
}

.term-preview-content h1,
.term-preview-content h2,
.term-preview-content h3,
.term-preview-content h4 {
  color: var(--color-primary-dark);
}

.term-preview-content h1 {
  margin-top: 0;
  font-size: 26px;
}

.term-preview-content h2 {
  font-size: 22px;
}

.term-preview-content h3 {
  font-size: 18px;
}

.term-preview-content p {
  margin: 0 0 14px;
}

.term-preview-content p:last-child {
  margin-bottom: 0;
}

.term-preview-content ul,
.term-preview-content ol {
  padding-left: 22px;
}

.term-preview-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.term-preview-content th,
.term-preview-content td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.term-preview-content th {
  background: #f8fafc;
  color: var(--color-primary-dark);
}

.term-preview-empty {
  margin: 18px;
}

@media (max-width: 760px) {
  .term-preview-header {
    display: block;
  }

  .term-preview-header .status-badge {
    margin-top: 12px;
  }

  .term-preview-content {
    padding: 18px;
  }
}


/* SIGNED TERM AUDIT TRAIL */

.signed-audit-intro {
  margin: 0 0 18px;
  color: var(--color-muted);
  line-height: 1.6;
}

.audit-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.audit-timeline-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
}

.audit-timeline-marker {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2f7;
  color: var(--color-muted);
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
}

.audit-status-done .audit-timeline-marker {
  background: #dcfce7;
  color: #166534;
}

.audit-status-pending .audit-timeline-marker {
  background: #fef3c7;
  color: #92400e;
}

.audit-status-not_applicable .audit-timeline-marker {
  background: #f1f5f9;
  color: #475569;
}

.audit-timeline-content {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 14px 16px;
  background: #f8fafc;
}

.audit-timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.audit-timeline-header h3 {
  margin: 0;
  color: var(--color-primary-dark);
  font-size: 16px;
}

.audit-timeline-content p {
  margin: 0 0 8px;
  color: var(--color-muted);
  line-height: 1.5;
  font-size: 14px;
}

.audit-timeline-content time {
  display: block;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
}

.audit-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.audit-status-badge-done {
  background: #dcfce7;
  color: #166534;
}

.audit-status-badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.audit-status-badge-not_applicable {
  background: #f1f5f9;
  color: #475569;
}

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

.technical-evidence-item {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
  min-width: 0;
}

.technical-evidence-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.technical-evidence-item strong {
  display: block;
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
  word-break: break-word;
}

.technical-evidence-hash strong,
.technical-evidence-path strong,
.technical-evidence-url strong,
.technical-evidence-userAgent strong {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

@media (max-width: 760px) {
  .audit-timeline-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .audit-timeline-marker {
    width: 30px;
    height: 30px;
  }

  .audit-timeline-header {
    display: block;
  }

  .audit-status-badge {
    margin-top: 8px;
  }

  .technical-evidence-grid {
    grid-template-columns: 1fr;
  }
}


/* SIGNATURE LOCATION EVIDENCE */

.signature-location-block {
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: #f8fafc;
}


.signature-location-block-required {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.signature-location-block-required h3 {
  color: #1d4ed8;
}

.signature-location-not-required {
  background: #f8fafc;
  color: var(--color-muted) !important;
}

.signature-location-block h3 {
  margin: 0 0 8px;
  color: var(--color-primary-dark);
  font-size: 16px;
}

.signature-location-block p {
  margin: 0 0 12px;
  color: var(--color-muted);
  line-height: 1.55;
}

.signature-location-message {
  margin: 12px 0 0 !important;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 700;
}

.signature-location-granted {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534 !important;
}

.signature-location-denied,
.signature-location-unavailable,
.signature-location-timeout,
.signature-location-error {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412 !important;
}

.signature-location-not-requested {
  background: #ffffff;
  color: var(--color-muted) !important;
}

.signature-location-button {
  margin-top: 12px;
}

.technical-evidence-geo {
  background: #f8fafc;
}

@media (max-width: 760px) {
  .signature-location-block {
    padding: 16px;
  }

  .signature-location-button {
    width: 100%;
  }
}


/* SIGNED TERM PREVIEW - SIMPLIFIED AUDIT */

.signature-preview-box-compact {
  margin-bottom: 0;
}

.signed-evidence-list {
  margin: 16px 0 0;
}

.signed-evidence-list div {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.signed-evidence-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.signed-evidence-list dt {
  margin-bottom: 4px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.signed-evidence-list dd {
  margin: 0;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
}

.signed-evidence-list-compact {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.signed-audit-subsection {
  margin-top: 22px;
}

.signed-audit-subsection:first-of-type {
  margin-top: 0;
}

.signed-audit-subsection h3 {
  margin: 0 0 12px;
  color: var(--color-primary-dark);
  font-size: 17px;
}

.audit-timeline-compact {
  gap: 10px;
}

.audit-timeline-compact .audit-timeline-content {
  padding: 12px 14px;
}

.audit-timeline-compact .audit-timeline-header {
  margin-bottom: 4px;
}

.audit-timeline-compact .audit-timeline-header h4 {
  margin: 0;
  color: var(--color-primary-dark);
  font-size: 15px;
}

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

.signed-primary-evidence-item {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
  min-width: 0;
}

.signed-primary-evidence-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.signed-primary-evidence-item strong {
  display: block;
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
  word-break: break-word;
}

.signed-primary-evidence-item small {
  display: block;
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.technical-value {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px !important;
}

.technical-evidence-details {
  margin-top: 22px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.technical-evidence-details summary {
  padding: 14px 16px;
  background: #f8fafc;
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.technical-evidence-details[open] summary {
  border-bottom: 1px solid var(--color-border);
}

.technical-evidence-help {
  margin: 16px 16px 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.5;
}

.technical-evidence-details .technical-evidence-grid {
  padding: 16px;
}

@media (max-width: 760px) {
  .signed-primary-evidence-grid {
    grid-template-columns: 1fr;
  }
}

.section-title-row-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.section-refresh-button {
  margin-top: 0;
  min-height: 38px;
}

.section-refresh-button.is-loading {
  opacity: 0.75;
  cursor: progress;
}

.inline-status-message {
  min-height: 18px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.inline-status-message-error {
  color: #991b1b;
}

@media (max-width: 760px) {
  .section-title-row-actions {
    display: block;
  }

  .section-actions {
    justify-content: flex-start;
    margin-top: 12px;
    flex-wrap: wrap;
  }
}

.summary-filter-card {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.summary-filter-card:hover,
.summary-filter-card:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.summary-filter-card.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.summary-filter-card:disabled {
  cursor: progress;
  opacity: 0.75;
}

.muted-inline {
  display: block;
  margin-top: 4px;
  color: var(--color-muted);
}

.settings-grid {
  margin-top: 18px;
}

.settings-module-list {
  display: grid;
  gap: 14px;
}

.settings-module-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.settings-module-item:first-child {
  padding-top: 0;
}

.settings-module-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-module-item strong {
  display: block;
  color: var(--color-primary-dark);
  margin-bottom: 4px;
}

.settings-module-item p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.45;
}

.settings-feature-card {
  grid-column: 1 / -1;
}

.settings-feature-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.settings-feature-header h3 {
  margin-bottom: 6px;
}

.settings-feature-header p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.45;
}

.settings-feature-form {
  border-top: 1px solid var(--color-border);
  padding-top: 18px;
}

.settings-feature-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.settings-feature-toggle > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-feature-toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 26px;
  border-radius: 13px;
  background: #cbd5e1;
  transition: background-color 160ms ease;
}

.settings-feature-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(8, 41, 87, 0.24);
  transition: transform 160ms ease;
}

.settings-feature-toggle input:checked + .settings-feature-toggle-track {
  background: var(--color-primary);
}

.settings-feature-toggle input:checked + .settings-feature-toggle-track .settings-feature-toggle-thumb {
  transform: translateX(22px);
}

.settings-feature-toggle input:focus-visible + .settings-feature-toggle-track {
  outline: 3px solid rgba(11, 182, 199, 0.22);
  outline-offset: 2px;
}

.settings-feature-toggle input:disabled + .settings-feature-toggle-track {
  cursor: not-allowed;
  opacity: 0.55;
}

.settings-feature-toggle strong,
.settings-feature-toggle small {
  display: block;
}

.settings-feature-toggle strong {
  color: var(--color-primary-dark);
  margin-bottom: 3px;
}

.settings-feature-toggle small {
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.4;
}
@media (max-width: 680px) {
  .settings-feature-header {
    display: block;
  }

  .settings-feature-header .status-badge {
    margin-top: 10px;
  }

  .settings-feature-toggle {
    align-items: flex-start;
  }

  .settings-module-item {
    display: block;
  }

  .settings-module-item .status-badge {
    margin-top: 10px;
  }
}

.form-helper-text {
  margin: 0 0 8px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.4;
}

.primary-button:disabled,
.primary-button.disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.form-alert-info {
  background: #e0f2fe;
  color: #075985;
}


.event-team-feedback {
  display: grid;
  gap: 4px;
  margin: 0 0 18px;
  border: 1px solid #fecaca;
  box-shadow: 0 8px 20px rgba(153, 27, 27, 0.08);
}

.event-team-feedback strong {
  display: block;
  font-size: 15px;
}

.event-team-feedback span {
  display: block;
  line-height: 1.45;
}

.form-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.form-section-header {
  margin-bottom: 14px;
}

.form-section-header h3 {
  margin: 0 0 4px;
  color: var(--color-text);
  font-size: 16px;
}

.form-section-header p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.form-fieldset {
  margin: 4px 0 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #f8fafc;
}

.form-fieldset legend {
  padding: 0 8px;
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 800;
}

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

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.checkbox-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}
.activity-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  min-height: 112px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
}

.activity-checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--color-text);
  cursor: pointer;
}

.activity-checkbox-field:hover,
.activity-checkbox-field:focus-within {
  border-color: var(--color-primary);
  background: #eef8f6;
}

.activity-checkbox-field input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  flex: 0 0 auto;
}

.activity-checkbox-field span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.activity-checkbox-field strong {
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.activity-checkbox-field small {
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.2;
}

.activity-checkbox-field-disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
.insurance-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--color-border);
}

.insurance-tab {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 3px solid transparent;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.insurance-tab:hover,
.insurance-tab:focus {
  color: var(--color-primary-dark);
  text-decoration: none;
}

.insurance-tab.active {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.insurance-filter-card {
  margin-bottom: 18px;
}

.insurance-filter-grid {
  grid-template-columns: 180px 180px 180px minmax(220px, 1fr);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--color-primary-dark);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.secondary-button:hover,
.secondary-button:focus {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  text-decoration: none;
}

.secondary-button-inline {
  width: auto;
  min-width: 140px;
  padding: 0 18px;
}

.generated-insurance-table {
  min-width: 1320px;
}

.insurance-certificate-list {
  display: grid;
  gap: 10px;
  min-width: 280px;
}

.insurance-certificate-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #f8fafc;
}

.insurance-certificate-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.insurance-certificate-header strong {
  color: var(--color-primary-dark);
  font-size: 13px;
  line-height: 1.35;
}

.insurance-certificate-header .status-badge {
  min-height: 22px;
  padding: 0 8px;
  font-size: 10px;
  white-space: nowrap;
}

.data-table td .insurance-certificate-error {
  color: #991b1b;
  font-weight: 700;
}

.insurance-certificate-link {
  width: fit-content;
  height: 34px;
  min-width: 96px;
  margin-top: 4px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
}


.insurance-export-filter-grid {
  grid-template-columns: 220px;
}

.insurance-export-action-card {
  margin-bottom: 18px;
}

.insurance-export-action-row {
  margin: 0;
}

.insurance-export-action-row p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.5;
}

.insurance-export-table {
  min-width: 980px;
}
@media (max-width: 1120px) {
  .insurance-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Zulife processing loader */

.zulife-processing-scope {
  position: relative;
}

.zulife-processing-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.86);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.zulife-processing-scope.is-processing .zulife-processing-overlay,
.zulife-processing-active .zulife-processing-overlay-global {
  opacity: 1;
  pointer-events: auto;
}

.zulife-processing-overlay-global {
  position: fixed;
  z-index: 9999;
  border-radius: 0;
}

.zulife-processing-scope.is-processing {
  cursor: wait;
}

.zulife-processing-scope.is-processing .signature-pad-wrap,
.zulife-processing-scope.is-processing .acceptance-check,
.zulife-processing-scope.is-processing .signature-location-block {
  opacity: 0.55;
}

.zulife-processing-scope.is-processing a {
  pointer-events: none;
}

.zulife-processing-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(100%, 280px);
  padding: 24px;
  border: 1px solid rgba(11, 182, 199, 0.24);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(8, 41, 87, 0.16);
  text-align: center;
}

.zulife-loader {
  --loader-size: 120px;
  position: relative;
  width: var(--loader-size);
  height: var(--loader-size);
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.zulife-loader::before,
.zulife-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 5px solid transparent;
  animation: zulife-spin 1.1s linear infinite;
}

.zulife-loader::before {
  border-top-color: var(--color-primary);
  border-right-color: var(--color-primary);
  filter: drop-shadow(0 0 8px rgba(11, 182, 199, 0.22));
}

.zulife-loader::after {
  inset: 12px;
  border-bottom-color: var(--color-primary-dark);
  border-left-color: var(--color-primary-dark);
  animation-duration: 1.6s;
  animation-direction: reverse;
  opacity: 0.9;
}

.zulife-loader-logo {
  position: relative;
  z-index: 1;
  width: 70%;
  max-width: 70%;
  height: auto;
  animation: zulife-breathe 1.6s ease-in-out infinite;
  filter: drop-shadow(0 7px 14px rgba(8, 41, 87, 0.16));
}

.zulife-processing-message {
  margin: 0;
  color: var(--color-primary-dark);
  font-size: 15px;
  font-weight: 800;
}

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

@keyframes zulife-breathe {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.92;
  }

  50% {
    transform: scale(1.03);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zulife-loader::before,
  .zulife-loader::after,
  .zulife-loader-logo {
    animation-duration: 1ms;
    animation-iteration-count: 1;
  }
}

.form-alert-success {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.account-password-card {
  max-width: 760px;
}

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

.password-visibility-field {
  position: relative;
}

.password-visibility-field input {
  padding-right: 52px;
}

.password-visibility-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  outline: none;
}

.password-visibility-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(11, 182, 199, 0.16);
}

.password-visibility-icon {
  font-size: 17px;
  line-height: 1;
}
.insurance-coverage-summary {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #f8fafc;
}

.insurance-coverage-summary-header {
  margin-bottom: 14px;
}

.insurance-coverage-summary-header h2 {
  margin: 0 0 6px;
  color: var(--color-primary-dark);
  font-size: 18px;
}

.insurance-coverage-summary-header p,
.insurance-coverage-note {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.5;
}

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

.insurance-coverage-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
}

.insurance-coverage-grid dt {
  margin: 0 0 5px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.insurance-coverage-grid dd {
  margin: 0;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .insurance-coverage-grid {
    grid-template-columns: 1fr;
  }
}

/* EVENT DETAIL TABS */

.event-detail-tabs {
  margin-top: 18px;
}

.event-detail-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--color-border);
}

.event-detail-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--color-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  appearance: none;
  cursor: pointer;
}

.event-detail-tab:hover,
.event-detail-tab:focus {
  color: var(--color-primary-dark);
  text-decoration: none;
}

.event-detail-tab:focus-visible {
  outline: 2px solid rgba(11, 182, 199, 0.28);
  outline-offset: 3px;
}

.event-detail-tab.active {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.event-detail-tab-panel[hidden] {
  display: none;
}

.event-detail-tab-panel.active {
  display: block;
}

@media (max-width: 760px) {
  .event-detail-tab-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .event-detail-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* OPERATIONAL PARTICIPANT ALERTS */

.event-participants-section {
  margin-bottom: 22px;
}

.event-participants-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.event-participants-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.event-participants-summary strong {
  margin-right: 5px;
  color: var(--color-primary-dark);
}

.event-participants-table {
  min-width: 720px;
}

.event-participants-table th:nth-child(1),
.event-participants-table td:nth-child(1) {
  width: 24%;
}

.event-participants-table th:nth-child(6),
.event-participants-table td:nth-child(6) {
  width: 34%;
}


.event-participant-groups {
  display: grid;
  gap: 16px;
}

.event-participant-group {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.event-participant-group-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  background: #f8fafc;
}

.event-participant-group-header h4 {
  margin: 0;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 900;
}

.event-participant-group-header p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 5px 0 0;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.event-participant-group-header > span {
  flex: 0 0 auto;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.event-participant-group-header > span strong {
  color: var(--color-primary-dark);
}

.event-participant-group .table-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.operational-alert-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.operational-alert {
  display: block;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 12px;
  line-height: 1.4;
}

.operational-alert-critical {
  border-color: #fecaca;
  background: #fff1f2;
  color: #881337;
}

.operational-alert-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 9px;
}

.operational-alert-heading small {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.operational-alert-label {
  color: inherit;
  font-size: 13px;
  font-weight: 900;
}

.operational-alert-awareness {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.operational-alert-aware-badge {
  padding: 3px 7px;
  border: 1px solid #86efac;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 11px;
  font-weight: 900;
}

.operational-alert-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
}

.operational-alert-actions form {
  margin: 0;
}

.operational-alert-comment {
  min-width: min(100%, 280px);
}

.operational-alert-comment > summary,
.operational-alert-history > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--color-primary-dark);
  font-weight: 900;
}

.operational-alert-comment form {
  display: grid;
  gap: 8px;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #ffffff;
}

.operational-alert-comment label {
  display: grid;
  gap: 5px;
}

.operational-alert-comment textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
}

.operational-alert-history {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(15, 43, 82, 0.14);
}

.operational-alert-history ol {
  display: grid;
  gap: 8px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.operational-alert-history li {
  padding: 8px;
  border-left: 3px solid var(--color-border);
  background: rgba(255, 255, 255, 0.72);
}

.operational-alert-history li > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 10px;
}

.operational-alert-history time {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.operational-alert-history p {
  margin: 4px 0 0;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.operational-alert-config-card {
  grid-column: 1 / -1;
}

.operational-alert-config-table {
  min-width: 720px;
}

@media (max-width: 760px) {
  .event-participants-summary {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .event-participant-group-header {
    display: block;
  }

  .event-participant-group-header > span {
    display: inline-flex;
    margin-top: 10px;
  }

  .event-participants-table {
    min-width: 640px;
  }
}

@media (max-width: 760px) {
  .operational-alert-actions {
    display: grid;
  }

  .operational-alert-actions .secondary-button,
  .operational-alert-actions .primary-button,
  .operational-alert-comment {
    width: 100%;
  }

  .operational-alert-history li > div {
    display: grid;
  }
}

/* PUBLIC PRODUCT ENTRY */
.public-product-card {
  max-width: 720px;
}

.public-product-unit {
  margin: 4px 0 8px !important;
  color: var(--color-primary-dark) !important;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.public-product-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 22px auto 10px;
  max-width: 560px;
  width: 100%;
}

.public-product-summary div {
  min-width: 0;
  padding: 18px 22px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

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

.public-product-summary strong {
  margin-bottom: 6px;
  color: var(--color-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.public-product-summary span {
  color: var(--color-text);
  font-weight: 800;
  line-height: 1.35;
}

.public-status-warning {
  color: #8a4b00;
  background: #fff7ed;
}

@media (max-width: 720px) {
  .public-product-summary {
    grid-template-columns: 1fr;
  }
}

.public-product-start-form {
  margin-top: 24px;
  align-items: stretch;
}

.public-product-start-form .public-main-action {
  width: fit-content;
  min-width: 180px;
}

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

.public-product-message {
  display: grid;
  gap: 4px;
  margin: 18px 0 0;
  text-align: left;
}

.public-product-message span {
  display: block;
}

@media (max-width: 640px) {
  .public-field-row {
    grid-template-columns: 1fr;
  }

  .public-product-start-form .public-main-action {
    width: 100%;
  }
}

.physical-print-document {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--color-border);
  background: #ffffff;
}

.physical-print-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--color-primary);
}

.physical-print-header div,
.physical-print-header span {
  display: block;
}

.physical-print-brand {
  display: flex !important;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.physical-print-brand img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  flex: 0 0 auto;
}

.physical-print-event {
  text-align: right;
}

.physical-term-content,
.physical-answers,
.physical-signature-space {
  margin-top: 24px;
}

.physical-answers .detail-list {
  margin-bottom: 20px;
}

.physical-signature-space {
  break-inside: avoid;
  page-break-inside: avoid;
  padding-top: 20px;
}

.physical-signature-space > div {
  width: min(420px, 100%);
  height: 80px;
  margin: 10px 0 8px;
  border-bottom: 1px solid #334155;
}

.physical-signature-space small {
  color: var(--color-text-muted);
}

.physical-review-actions {
  display: flex;
  justify-content: flex-end;
  margin: 18px 0;
}

.physical-evidence-card {
  margin-top: 18px;
}

@media (max-width: 720px) {
  .physical-print-document {
    padding: 18px;
  }

  .physical-print-header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .physical-print-header div:last-child {
    text-align: left;
  }

  .physical-review-actions,
  .physical-review-actions form,
  .physical-review-actions button {
    width: 100%;
  }
}

@media print {
  html,
  body {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: #ffffff;
    overflow: visible;
  }

  .no-print,
  .sidebar,
  .topbar,
  .environment-banner {
    display: none !important;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-main,
  .app-content,
  .page-section,
  .physical-term-review-page {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .physical-print-document {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
}
.danger-action-button {
  border: 1px solid #b42318;
  border-radius: 6px;
  background: #b42318;
  color: #fff;
  min-height: 42px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.danger-action-button:hover {
  background: #8f1b13;
}

.warning-message {
  margin-bottom: 16px;
  border-left: 4px solid #b54708;
  background: #fffaeb;
  color: #7a2e0e;
  padding: 12px 14px;
}
.cancellation-card {
  margin-bottom: 20px;
}

.operator-term-summary {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.35;
}

.operator-term-summary strong {
  color: var(--color-text);
}


@media print {
  .physical-print-document .insurance-coverage-summary,
  .blank-term-document .insurance-coverage-summary {
    margin: 12px 0 !important;
    padding: 10px !important;
    border-radius: 8px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .physical-print-document .insurance-coverage-summary-header,
  .blank-term-document .insurance-coverage-summary-header {
    margin-bottom: 8px !important;
  }

  .physical-print-document .insurance-coverage-summary-header h2,
  .blank-term-document .insurance-coverage-summary-header h2 {
    margin-bottom: 3px !important;
    font-size: 14px !important;
  }

  .physical-print-document .insurance-coverage-summary-header p,
  .physical-print-document .insurance-coverage-note,
  .blank-term-document .insurance-coverage-summary-header p,
  .blank-term-document .insurance-coverage-note {
    font-size: 10.5px !important;
    line-height: 1.35 !important;
  }

  .physical-print-document .insurance-coverage-grid,
  .blank-term-document .insurance-coverage-grid {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }

  .physical-print-document .insurance-coverage-grid div,
  .blank-term-document .insurance-coverage-grid div {
    padding: 7px 8px !important;
    border-radius: 6px !important;
  }

  .physical-print-document .insurance-coverage-grid dt,
  .blank-term-document .insurance-coverage-grid dt {
    margin-bottom: 2px !important;
    font-size: 8.5px !important;
  }

  .physical-print-document .insurance-coverage-grid dd,
  .blank-term-document .insurance-coverage-grid dd {
    font-size: 10.5px !important;
    line-height: 1.25 !important;
  }
}
