:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fa;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.panel,
.rules {
  background: #ffffff;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(26, 39, 61, 0.08);
}

.panel {
  padding: 32px;
}

.rules {
  padding: 24px;
}

.brand {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
  text-align: center;
}

.brand img {
  width: min(210px, 70vw);
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
}

.brand .eyebrow {
  margin: 0;
}

.eyebrow,
.label {
  color: #5f6f86;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 12px;
  font-size: 40px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 16px;
  font-size: 20px;
}

.intro {
  max-width: 650px;
  color: #435168;
  font-size: 17px;
  line-height: 1.55;
}

.notice {
  margin: 20px 0;
  padding: 12px 14px;
  border: 1px solid #e6b8a6;
  border-radius: 8px;
  background: #fff4ee;
  color: #8a3214;
}

.notice p {
  margin: 0;
}

.success-notice {
  border-color: #a8d9c2;
  background: #f0fbf5;
  color: #17695d;
}

.uploader {
  margin-top: 28px;
  display: grid;
  gap: 18px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 28px;
  border: 2px dashed #8aa0bb;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
}

.drop-zone input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.drop-title {
  display: block;
  font-size: 22px;
  font-weight: 700;
}

.drop-subtitle {
  display: block;
  margin-top: 8px;
  color: #5f6f86;
}

.selected {
  min-height: 88px;
  padding: 16px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #ffffff;
}

.selected strong {
  display: block;
  margin-top: 3px;
}

#file-list,
.rules ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

#file-list li,
.rules li {
  margin: 8px 0;
  overflow-wrap: anywhere;
}

#file-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  align-items: center;
}

select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c7d1df;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  font-size: 14px;
  padding: 0 10px;
}

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

button {
  justify-self: start;
  min-width: 150px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #17695d;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

button:hover {
  background: #11564d;
}

button:disabled {
  cursor: wait;
  opacity: 0.75;
}

a {
  color: #17695d;
  font-weight: 700;
}

.uppercase-input {
  text-transform: uppercase;
}

.auth-shell,
.admin-shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(360px, 1fr);
  gap: 28px;
  align-items: center;
  justify-content: center;
}

.auth-panel {
  width: min(460px, 100%);
  padding: 32px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(26, 39, 61, 0.08);
}

.sales-post-panel {
  width: min(520px, 100%);
  min-height: 520px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 26px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(26, 39, 61, 0.08);
}

.sales-post-panel img,
.admin-sales-preview img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
}

.sales-placeholder {
  width: 100%;
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed #8aa0bb;
  border-radius: 8px;
  background: #f8fafc;
  color: #435168;
  text-align: center;
}

.sales-placeholder span {
  color: #5f6f86;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.sales-placeholder strong {
  color: #172033;
  font-size: 22px;
}

.monthly-quote {
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid #d9e0ea;
  text-align: center;
}

.monthly-quote blockquote {
  margin: 10px auto 8px;
  max-width: 430px;
  color: #172033;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.5;
}

.monthly-quote cite {
  color: #5f6f86;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.social-links {
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid #d9e0ea;
  text-align: center;
}

.social-links > div {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.social-links a {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(26, 39, 61, 0.18);
}

.social-links img {
  width: 42px;
  height: 42px;
  display: block;
}

.customer-form-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.customer-form-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.customer-form-header img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.customer-form-header .eyebrow {
  margin-bottom: 6px;
}

.customer-form-header h1 {
  margin: 0;
  font-size: 32px;
}

.customer-form-embed {
  overflow: hidden;
  min-height: 1500px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(26, 39, 61, 0.08);
}

.customer-form-embed iframe {
  display: block;
  width: 100%;
  height: 1500px;
  border: 0;
  background: #ffffff;
}

.customer-form-footer {
  padding-top: 24px;
}

.thank-you-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.thank-you-panel {
  overflow: hidden;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(26, 39, 61, 0.08);
}

.thank-you-poster {
  display: block;
  width: 100%;
  height: auto;
}

.thank-you-panel .social-links {
  padding: 24px 24px 28px;
}

.registration-thank-you-panel {
  padding-bottom: 34px;
}

.registration-confirmation {
  padding: 30px 24px 0;
  text-align: center;
}

.registration-confirmation h1 {
  margin: 0 0 8px;
  color: #172033;
  font-size: 32px;
}

.registration-confirmation p {
  margin: 0;
  color: #5f6f86;
  font-size: 16px;
}

.registration-thank-you-panel .registration-sales-post {
  margin: 30px 24px 0;
}

.registration-login-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0 18px;
  border-radius: 7px;
  background: #17695d;
  color: #ffffff;
  text-decoration: none;
}

.auth-panel h1,
.admin-shell h1 {
  font-size: 32px;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #435168;
  font-size: 14px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c7d1df;
  border-radius: 8px;
  color: #172033;
  font-size: 16px;
  padding: 0 12px;
}

.auth-link {
  margin: 18px 0 0;
  color: #435168;
}

.login-invitation {
  margin-top: 26px;
}

.login-invitation > p {
  margin: 14px 0 0;
  color: #5f6f86;
  font-size: 14px;
  line-height: 1.5;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6b7787;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #d9e0ea;
}

.invitation-entry-form {
  margin-top: 14px;
}

.invitation-entry-form .secondary-button {
  width: 100%;
  border: 1px solid #17695d;
  background: #ffffff;
  color: #17695d;
}

.invitation-entry-form .secondary-button:hover {
  background: #eff8f6;
}

.top-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.top-bar nav {
  display: flex;
  order: -1;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-bar nav a,
.agreement-nav a {
  display: inline-flex;
  min-width: 118px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  color: #1f3347;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(17, 36, 64, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.top-bar nav a:hover,
.agreement-nav a:hover {
  border-color: #17695d;
  background: #eff8f6;
  color: #17695d;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.nav-dropdown summary {
  display: inline-flex;
  min-width: 118px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  color: #1f3347;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 8px 18px rgba(17, 36, 64, 0.06);
}

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

.nav-dropdown summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-dropdown[open] summary,
.nav-dropdown summary:hover {
  border-color: #17695d;
  background: #eff8f6;
  color: #17695d;
}

.nav-dropdown > div {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 50%;
  display: grid;
  min-width: 160px;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(17, 36, 64, 0.16);
  transform: translateX(-50%);
}

.nav-dropdown > div a {
  min-width: 0;
  box-shadow: none;
}

.registration-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 36px auto;
}

.registration-panel {
  padding: 36px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(17, 36, 64, 0.09);
}

.registration-panel > .brand {
  justify-content: center;
  text-align: center;
}

.registration-panel > h1,
.registration-panel > .page-intro {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.registration-panel > h1 {
  display: block;
  max-width: none;
  text-align: center !important;
}

.registration-sales-post {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 38px;
  padding-top: 30px;
  border-top: 1px solid #d9e0ea;
  text-align: center;
}

.registration-sales-post img,
.registration-sales-post .sales-placeholder {
  display: block;
  width: min(100%, 720px);
  max-height: 900px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
  box-shadow: 0 18px 44px rgba(17, 36, 64, 0.1);
}

.next-consultant-message {
  color: #0f436d;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.page-intro {
  color: #607084;
}

.hr-form {
  display: grid;
  gap: 20px;
  margin-top: 26px;
}

.hr-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 22px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #f8fafc;
}

.hr-form legend {
  padding: 0 8px;
  color: #17324d;
  font-size: 16px;
  font-weight: 800;
}

.hr-form legend span,
.hr-form label span {
  color: #6b7787;
  font-size: 12px;
  font-weight: 500;
}

.hr-form label {
  display: grid;
  gap: 7px;
  color: #293a4d;
  font-size: 14px;
  font-weight: 700;
}

.hr-form input,
.hr-form select,
.hr-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 7px;
  background: #ffffff;
  color: #17283a;
  font: inherit;
}

.hr-form textarea {
  resize: vertical;
}

.hr-form .wide-field {
  grid-column: 1 / -1;
}

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

.conditional-fields[hidden] {
  display: none;
}

.hr-form .spouse-toggle {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #cfd8e3;
  border-radius: 7px;
  background: #ffffff;
  cursor: pointer;
}

.hr-form .spouse-toggle input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: #17695d;
}

.hr-form .spouse-toggle span {
  color: #293a4d;
  font-size: 14px;
  font-weight: 800;
}

.hr-form > button,
.hr-form-actions button {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 7px;
  background: #17695d;
  color: #ffffff;
  font-weight: 800;
}

.hr-form > button {
  justify-self: end;
}

.hr-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hr-form-actions .secondary-button {
  border: 1px solid #17695d;
  background: #ffffff;
  color: #17695d;
}

.page-heading-row,
.hr-sync-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.employee-count,
.sync-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf3f7;
  color: #385064;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.sync-synced {
  background: #e8f5f1;
  color: #17695d;
}

.sync-error,
.sync-incomplete {
  background: #fff0ec;
  color: #a63d2d;
}

.hr-sync-summary {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #f8fafc;
}

.hr-sync-summary div {
  display: grid;
  gap: 3px;
}

.table-button {
  color: #17695d;
  font-weight: 800;
  text-decoration: none;
}

.employee-search {
  display: grid;
  gap: 8px;
  margin: 24px 0 6px;
  padding: 18px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #f8fafc;
}

.employee-search label {
  color: #293a4d;
  font-size: 14px;
  font-weight: 800;
}

.employee-search .customer-search-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.employee-search a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid #cfd8e3;
  border-radius: 7px;
  background: #ffffff;
  color: #385064;
  font-weight: 800;
  text-decoration: none;
}

.table-wrap {
  margin-top: 22px;
  overflow-x: auto;
}

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

.admin-upload-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: center;
  margin: 22px 0 28px;
  padding: 18px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-settings-dropdown {
  margin: 22px 0 28px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.admin-settings-selector {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  background: #f8fafc;
  color: #1f3347;
}

.admin-settings-selector > span {
  display: grid;
  gap: 4px;
}

.admin-settings-selector strong {
  font-size: 18px;
}

.admin-settings-selector small {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.admin-settings-selector label {
  width: min(330px, 100%);
}

.admin-settings-selector select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c7d1df;
  border-radius: 8px;
  background: #ffffff;
  color: #1f3347;
  font: inherit;
  font-weight: 700;
  padding: 0 40px 0 12px;
}

.admin-settings-content {
  border-top: 1px solid #d9e0ea;
  padding: 0 20px 4px;
}

.admin-settings-content[hidden],
.admin-settings-content [data-admin-setting][hidden] {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.admin-settings-content .admin-invitation-card {
  margin-top: 20px;
}

.admin-settings-content .admin-upload-card {
  margin-bottom: 20px;
}

.admin-token-setting {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  margin: 22px 0 6px;
  padding: 0 0 22px;
  border-bottom: 1px solid #d9e0ea;
}

.admin-invitation-card {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-section-heading h2 {
  margin-bottom: 4px;
}

.admin-section-heading button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: #17695d;
  color: #ffffff;
  font-weight: 800;
  white-space: nowrap;
}

.invitation-code {
  display: inline-block;
  padding: 6px 9px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background: #ffffff;
  color: #17324d;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.admin-backup-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: center;
  margin: 22px 0 28px;
  padding: 18px;
  border: 1px solid #a8d9c2;
  border-radius: 8px;
  background: #f0fbf5;
}

.admin-backup-card h2,
.admin-backup-card p {
  margin-bottom: 6px;
}

.admin-backup-actions {
  display: grid;
  gap: 12px;
}

.bulk-user-fields {
  min-width: 260px;
  display: grid;
  grid-template-columns: 72px minmax(180px, 1fr);
  gap: 8px;
}

.bulk-user-fields input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c7d1df;
  border-radius: 8px;
  padding: 0 10px;
}

.bulk-user-email,
.bulk-user-password {
  width: 210px;
  min-height: 38px;
  border: 1px solid #c7d1df;
  border-radius: 8px;
  padding: 0 10px;
}

.bulk-save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #a8d9c2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(26, 39, 61, 0.14);
}

.bulk-save-bar p {
  margin: 0;
  color: #435168;
}

.bulk-save-bar button {
  flex: 0 0 auto;
}

.customer-clickup-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid #a8d9c2;
  border-radius: 8px;
  background: #f0fbf5;
}

.customer-clickup-link p,
.customer-clickup-link strong {
  margin: 0;
}

.customer-clickup-link a {
  min-height: 42px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  background: #0071e3;
  color: #ffffff;
  text-decoration: none;
}

.customer-clickup-link.unavailable {
  border-color: #d9e0ea;
  background: #f8fafc;
  color: #5f6f86;
}

.clickup-task-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  background: #0071e3;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.clickup-task-button:hover {
  background: #0077ed;
}

.task-not-linked {
  color: #5f6f86;
  font-size: 14px;
}

.admin-token-setting h2,
.admin-token-setting p {
  margin-bottom: 6px;
}

.setting-status {
  color: #5f6f86;
  font-size: 14px;
}

.upload-setting-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.upload-setting-form input {
  min-height: 40px;
}

.upload-setting-form button {
  min-width: 130px;
}

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

.notification-settings-form input[type="text"],
.notification-settings-form input[type="email"],
.notification-settings-form input[type="password"] {
  width: 100%;
  min-height: 42px;
}

.notification-settings-form button {
  min-height: 42px;
}

.notification-toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #293a4d;
  font-size: 14px;
  font-weight: 800;
}

.notification-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.notification-bell {
  position: relative;
  flex: 0 0 auto;
}

.notification-bell > summary {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  color: #1f3347;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 8px 18px rgba(17, 36, 64, 0.06);
}

.notification-bell > summary::-webkit-details-marker {
  display: none;
}

.notification-bell > summary:hover,
.notification-bell[open] > summary {
  border-color: #17695d;
  background: #eff8f6;
  color: #17695d;
}

.notification-bell svg {
  width: 20px;
  height: 20px;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 10px;
  background: #c53a3a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.notification-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(17, 36, 64, 0.2);
}

.notification-popover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e4e9f0;
}

.notification-popover-heading span {
  color: #64748b;
  font-size: 12px;
}

.notification-preview-list {
  display: grid;
  max-height: 360px;
  overflow-y: auto;
}

.notification-preview {
  display: grid;
  min-width: 0 !important;
  min-height: 0 !important;
  gap: 4px;
  padding: 12px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf0f4 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #293a4d !important;
  text-align: left !important;
  transform: none !important;
}

.notification-preview-unread {
  border-left: 3px solid #17695d !important;
  background: #f3fbf7 !important;
}

.notification-preview strong,
.notification-preview span,
.notification-preview time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-preview span,
.notification-preview time {
  color: #64748b;
  font-size: 12px;
}

.notification-popover form {
  padding: 10px;
}

.notification-popover button {
  width: 100%;
  min-height: 38px;
}

.notification-popover button:disabled {
  cursor: default;
  opacity: 0.5;
}

.notification-popover-empty {
  margin: 0;
  padding: 26px 16px;
  color: #64748b;
  text-align: center;
}

.admin-sales-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  border-radius: 8px;
  background: #ffffff;
}

.admin-sales-preview .sales-placeholder {
  min-height: 150px;
}

.metric-grid article {
  padding: 18px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #f8fafc;
}

.metric-grid span {
  display: block;
  color: #5f6f86;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-grid strong {
  display: block;
  margin-top: 8px;
  color: #172033;
  font-size: 30px;
}

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

th,
td {
  padding: 12px;
  border-bottom: 1px solid #d9e0ea;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #5f6f86;
  font-size: 13px;
  text-transform: uppercase;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions form {
  margin: 0;
}

.role-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.customer-search {
  display: grid;
  gap: 8px;
  max-width: 560px;
  margin: 20px 0;
  color: #424245;
  font-size: 14px;
  font-weight: 700;
}

.customer-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  background: #ffffff;
  color: #1d1d1f;
  font: inherit;
}

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

.customer-search-row button {
  min-width: 110px;
}

.table-edit-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  background: #ffffff;
  color: #17695d;
  text-decoration: none;
  white-space: nowrap;
}

.table-edit-link:hover {
  border-color: #17695d;
  background: #f1f8f6;
}

.customer-name-link {
  color: #17695d;
  font-weight: 700;
  text-decoration: none;
}

.customer-name-link:hover {
  text-decoration: underline;
}

.customer-owner {
  margin: 0 0 20px;
  color: #5f6f86;
}

.role-form select {
  min-height: 36px;
}

.role-form button {
  min-width: 70px;
  min-height: 36px;
  font-size: 14px;
}

.compact-form {
  display: grid;
  grid-template-columns: 76px minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 420px;
}

.compact-form input {
  min-height: 36px;
  border: 1px solid #c7d1df;
  border-radius: 8px;
  color: #172033;
  font-size: 14px;
  padding: 0 10px;
}

.compact-form button {
  min-width: 70px;
  min-height: 36px;
  font-size: 14px;
}

.table-actions button {
  min-width: 96px;
  min-height: 36px;
  font-size: 14px;
}

.secondary-button {
  background: #6f7786;
}

.secondary-button:hover {
  background: #565f6d;
}

.processing-message {
  margin: 0;
  color: #435168;
  font-size: 14px;
}

.processing-message.success {
  color: #17695d;
  font-weight: 700;
}

.processing-message.error {
  color: #9b2f17;
  font-weight: 700;
}

.progress-panel {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #f8fafc;
}

.progress-panel[hidden] {
  display: none;
}

.progress-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #435168;
  font-size: 14px;
}

.progress-heading strong {
  flex: 0 0 44px;
  color: #172033;
  text-align: right;
}

.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #d9e0ea;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #17695d;
  transition: width 300ms ease;
}

.agreement-shell {
  min-height: 100vh;
  background: #fbfbfd;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
}

.agreement-nav {
  width: min(980px, calc(100% - 32px));
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 0 8px;
}

.agreement-hero {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  padding: 48px 24px 96px;
  text-align: center;
}

.agreement-hero img {
  width: clamp(220px, 34vw, 420px);
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 34px rgba(0, 52, 84, 0.16));
}

.agreement-hero p {
  margin: 0;
  color: #1d1d1f;
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
}

.error-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #fbfbfd;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
}

.error-panel {
  width: min(560px, 100%);
  padding: 40px;
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.error-panel img {
  width: 180px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
}

.error-panel h1 {
  margin: 18px auto 12px;
  font-size: 34px;
}

.error-panel p:not(.eyebrow) {
  margin: 0 auto 24px;
  color: #515154;
  font-size: 16px;
  line-height: 1.55;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.error-actions a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: #0066cc;
  text-decoration: none;
}

.error-actions .button-link {
  padding: 0 16px;
  border-radius: 8px;
  background: #0071e3;
  color: #ffffff;
}

.error-panel span {
  display: block;
  margin-top: 26px;
  color: #86868b;
  font-size: 13px;
}

.agreement-form-panel {
  width: min(860px, calc(100% - 32px));
  margin: 28px auto 64px;
  padding: 36px;
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
}

.agreement-form-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  text-align: center;
}

.agreement-form-heading img {
  width: min(230px, 72vw);
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
}

.agreement-form-heading h1 {
  margin: 0;
  color: #1d1d1f;
  font-size: 34px;
}

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

.case-lookup-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  background: #fbfbfd;
}

.case-lookup-panel label {
  display: grid;
  gap: 8px;
  color: #424245;
  font-size: 14px;
  font-weight: 700;
}

.lookup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.lookup-row input {
  min-height: 44px;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  font: inherit;
  padding: 10px 12px;
}

.lookup-row button {
  min-width: 110px;
  min-height: 44px;
  background: #1d1d1f;
}

.standard-agreement-fields {
  display: contents;
}

.consent-fields {
  grid-column: 1 / -1;
  gap: 18px;
}

.agreement-form label,
.agreement-form fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #424245;
  font-size: 14px;
  font-weight: 600;
}

.agreement-form fieldset {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  background: #fbfbfd;
}

.agreement-form legend {
  padding: 0 6px;
  color: #1d1d1f;
  font-weight: 700;
}

.agreement-form .wide-field {
  grid-column: 1 / -1;
}

.agreement-form input,
.agreement-form textarea,
.agreement-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  background: #ffffff;
  color: #1d1d1f;
  font: inherit;
  font-weight: 500;
  padding: 10px 12px;
}

.agreement-form input.input-error {
  border-color: #c93422;
  box-shadow: 0 0 0 3px rgba(201, 52, 34, 0.12);
}

.field-error-message {
  color: #a92d1c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.agreement-form textarea {
  min-height: 108px;
  resize: vertical;
}

.agreement-form .inline-fields {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr);
  gap: 14px;
  align-items: center;
}

.agreement-form .inline-fields label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.agreement-form input[type="radio"] {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.agreement-form button {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 190px;
  background: #0071e3;
}

.agreement-form button:hover {
  background: #0077ed;
}

@media (max-width: 820px) {
  .customer-form-shell {
    width: 100%;
    padding-top: 24px;
  }

  .customer-form-header {
    flex-direction: column;
    padding: 0 20px;
    text-align: center;
  }

  .customer-form-header img {
    width: 96px;
    height: 96px;
  }

  .customer-form-header h1 {
    font-size: 27px;
  }

  .customer-form-embed {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .customer-form-footer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .shell {
    grid-template-columns: 1fr;
    padding: 24px 0;
  }

  .panel {
    padding: 24px;
  }

  h1 {
    font-size: 32px;
  }

  #file-list li {
    grid-template-columns: 1fr;
  }

  .top-bar {
    align-items: center;
    flex-direction: column;
  }

  .top-bar nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .compact-form {
    grid-template-columns: 1fr;
    min-width: 220px;
  }

  .auth-shell,
  .admin-upload-card,
  .admin-token-setting,
  .admin-backup-card,
  .customer-search-row,
  .upload-setting-form,
  .notification-settings-form {
    grid-template-columns: 1fr;
  }

  .admin-settings-content {
    padding: 0 14px 4px;
  }

  .notification-toggle {
    grid-column: auto;
  }

  .notification-bell {
    width: 100%;
  }

  .notification-bell > summary {
    width: 100%;
  }

  .sales-post-panel {
    min-height: 360px;
  }

  .thank-you-shell {
    width: 100%;
    padding: 0;
  }

  .thank-you-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

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

  .agreement-nav {
    justify-content: center;
    gap: 10px;
  }

  .top-bar nav a,
  .agreement-nav a {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  .nav-dropdown {
    width: 100%;
    flex: none;
  }

  .nav-dropdown summary {
    width: 100%;
    min-width: 0;
  }

  .nav-dropdown > div {
    position: absolute;
    width: 180px;
    margin-top: 0;
    transform: translateX(-50%);
  }

  .registration-shell {
    width: 100%;
    margin: 0;
  }

  .registration-panel {
    padding: 24px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hr-form fieldset {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .conditional-fields {
    grid-template-columns: 1fr;
  }

  .hr-form .wide-field {
    grid-column: auto;
  }

  .page-heading-row,
  .hr-sync-summary,
  .hr-form-actions,
  .admin-section-heading,
  .admin-settings-selector {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-settings-selector label {
    width: 100%;
  }

  .employee-search .customer-search-row {
    grid-template-columns: 1fr;
  }

  .hr-form > button,
  .hr-form-actions button {
    width: 100%;
  }

  .agreement-form-panel {
    padding: 24px;
  }

  .bulk-save-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-save-bar button {
    width: 100%;
  }

  .customer-clickup-link {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-clickup-link a {
    width: 100%;
  }

  .agreement-form,
  .agreement-form .inline-fields,
  .lookup-row {
    grid-template-columns: 1fr;
  }

  .agreement-form-heading {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .top-bar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
