:root {
  --bg: #eaf8f6;
  --surface: rgba(251, 255, 253, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --text: #061f24;
  --muted: #49696d;
  --line: rgba(0, 96, 96, 0.16);
  --brand-deep: #06292f;
  --brand-teal: #00a99d;
  --brand-teal-bright: #23ead0;
  --brand-glow: #d9ff6a;
  --brand-coral: #ff6f61;
  --brand-blue: #3478f6;
  --shadow: 0 24px 80px rgba(0, 82, 84, 0.16);
  --max-width: 1320px;
}

body.accounts-fixed-page {
  --bg: #fdfbf7;
  --surface: #fffefa;
  --surface-strong: #ffffff;
  --text: #1e2530;
  --muted: #364352;
  --line: rgba(30, 37, 48, 0.34);
  --brand: #0047a8;
  --brand-deep: #1e2530;
  --brand-teal: #0047a8;
  --success: #145a24;
  --danger: #9f2d20;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  scroll-padding-bottom: 132px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Lato", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 6%, rgba(35, 234, 208, 0.28), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(217, 255, 106, 0.18), transparent 28%),
    linear-gradient(180deg, #fbfffd 0%, var(--bg) 54%, #dff3f0 100%);
}

@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

a,
button,
input {
  font: inherit;
}

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

button {
  border: 0;
  cursor: pointer;
}

.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;
}

.is-hidden {
  display: none !important;
}

.topbar,
.workspace-hero,
.toolbar,
.applet-group,
.empty-state {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(16, 16, 16, 0.05);
}

.topbar {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 20;
  width: min(calc(100% - 32px), var(--max-width));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(251, 255, 253, 0.84);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-size: 1rem;
  font-weight: 900;
  color: var(--brand-deep);
}

.brand-mark img {
  width: 34px;
  height: 34px;
}

.topbar-link,
.eyebrow,
.panel-label,
.applet-status {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.brand-mark span {
  letter-spacing: 0;
  text-transform: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.topbar-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-link,
.topbar-button {
  padding: 12px 14px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.topbar-link:hover,
.topbar-link:focus-visible,
.topbar-button:hover,
.topbar-button:focus-visible {
  background: rgba(0, 169, 157, 0.12);
  color: var(--brand-deep);
  outline: 0;
}

.topbar-breadcrumb-separator {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.58;
}

.topbar-breadcrumb-link[aria-current="page"] {
  background: rgba(0, 169, 157, 0.1);
  color: var(--brand-deep);
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  padding: 4px 4px 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.account-chip[hidden] {
  display: none;
}

.notification-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  margin-left: 6px;
  border-radius: 999px;
  background: #d71920;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.topbar-breadcrumb-link {
  position: relative;
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 16px 0 132px;
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: end;
  min-height: 360px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(6, 41, 47, 0.96), rgba(0, 125, 120, 0.82)),
    var(--surface);
  color: #f7fffd;
  overflow: hidden;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand-teal-bright);
  font-size: 0.72rem;
  font-weight: 900;
}

.eyebrow-dark {
  color: var(--brand-teal);
}

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

h1 {
  margin-bottom: 16px;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  letter-spacing: 0;
}

.hero-text {
  max-width: 640px;
  margin-bottom: 0;
  color: rgba(247, 255, 253, 0.76);
  font-size: 1.14rem;
  line-height: 1.65;
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.panel-label,
.applet-status {
  display: block;
  margin-bottom: 12px;
  color: rgba(247, 255, 253, 0.68);
  font-size: 0.68rem;
  font-weight: 900;
}

.hero-panel strong {
  display: block;
  font-size: 4.5rem;
  line-height: 1;
}

.hero-panel span {
  color: rgba(247, 255, 253, 0.72);
  line-height: 1.5;
}

.profile-preview-panel {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.profile-settings-avatar,
.profile-settings-fallback {
  width: 96px;
  height: 96px;
  border-radius: 50%;
}

.profile-settings-avatar {
  border: 1px solid rgba(255, 255, 255, 0.34);
  object-fit: cover;
}

.profile-settings-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-teal));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
  padding: 14px;
  border-radius: 999px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  padding: 0 16px;
}

.toolbar .search-field {
  width: 100%;
  min-width: 0;
}

.search-field svg,
.applet-arrow {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.segmented-control {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.segment {
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.segment[aria-pressed="true"] {
  background: var(--brand-deep);
  color: #f7fffd;
}

.group-stack {
  display: grid;
  gap: 24px;
}

.dashboard-card {
  margin-bottom: 24px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(16, 16, 16, 0.05);
}

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

.dashboard-heading h2 {
  margin-bottom: 0;
}

.dashboard-refresh {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: right;
}

.dashboard-refresh[data-type="error"] {
  color: #9f2d20;
}

.dashboard-toggle {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
}

.dashboard-toggle:hover,
.dashboard-toggle:focus-visible {
  border-color: var(--brand-teal);
  outline: 0;
}

.dashboard-hidden {
  display: none !important;
}

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

.dashboard-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  min-height: 214px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 14px 34px rgba(0, 82, 84, 0.08);
}

.dashboard-panel-large {
  grid-row: span 2;
  min-height: 442px;
}

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

.dashboard-panel-heading span {
  color: var(--brand-deep);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-panel-heading strong {
  color: var(--brand-teal);
  font-size: 1.18rem;
}

.dashboard-panel-subheading {
  padding-top: 2px;
  border-top: 1px solid rgba(0, 96, 96, 0.12);
}

.dashboard-panel-subheading span {
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-gauge {
  --dashboard-value: 0;
  position: relative;
  display: grid;
  place-items: end center;
  width: min(260px, 100%);
  aspect-ratio: 2 / 1;
  margin: 8px auto 0;
  overflow: hidden;
}

.dashboard-gauge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 260px 260px 0 0;
  background:
    conic-gradient(from 270deg at 50% 100%,
      var(--brand-teal) 0deg,
      var(--brand-teal) calc(var(--dashboard-value) * 1.8deg),
      rgba(6, 41, 47, 0.18) calc(var(--dashboard-value) * 1.8deg),
      rgba(6, 41, 47, 0.18) 180deg,
      transparent 180deg);
}

.dashboard-gauge::after {
  content: "";
  position: absolute;
  right: calc(50% - 3px);
  bottom: 0;
  width: 6px;
  height: 44%;
  border-radius: 999px;
  background: var(--brand-deep);
  transform: rotate(calc(-90deg + (var(--dashboard-value) * 1.8deg)));
  transform-origin: 50% 100%;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.78);
}

.dashboard-gauge-face {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 58%;
  padding: 18px 12px 0;
  border-radius: 999px 999px 0 0;
  background: var(--surface-strong);
}

.dashboard-gauge-face strong {
  color: var(--brand-deep);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
}

.dashboard-gauge-face span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.dashboard-metrics-row,
.dashboard-metric-stack {
  display: grid;
  gap: 10px;
}

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

.dashboard-metric {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(0, 96, 96, 0.12);
  border-radius: 8px;
  background: rgba(0, 169, 157, 0.06);
}

.dashboard-metric:hover,
.dashboard-metric:focus-visible {
  border-color: rgba(0, 169, 157, 0.42);
  outline: 0;
  box-shadow: 0 10px 24px rgba(0, 82, 84, 0.1);
}

.dashboard-metric span,
.dashboard-metric small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-metric strong {
  color: var(--brand-deep);
  font-size: 1.8rem;
  line-height: 1;
}

.dashboard-bars {
  display: grid;
  gap: 12px;
}

.dashboard-bar-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.72fr) minmax(90px, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.dashboard-bar-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bar-row > strong {
  color: var(--brand-deep);
  font-size: 0.9rem;
  text-align: right;
}

.dashboard-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(6, 41, 47, 0.12);
}

.dashboard-bar-track span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-blue));
}

.dashboard-task-list {
  display: grid;
  gap: 8px;
}

.dashboard-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 96, 96, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.dashboard-task-row:hover,
.dashboard-task-row:focus-visible {
  border-color: rgba(0, 169, 157, 0.42);
  outline: 0;
}

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

.dashboard-task-row strong {
  color: var(--brand-deep);
  font-size: 0.9rem;
}

.dashboard-task-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.applet-group,
.empty-state {
  padding: clamp(22px, 4vw, 36px);
  border-radius: 28px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading p:last-child,
.empty-state p {
  color: var(--muted);
  line-height: 1.65;
}

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

.applet-card {
  --applet-accent: var(--brand-teal);
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  gap: 16px;
  min-width: 3rem;
  min-height: 178px;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 16px 40px rgba(0, 82, 84, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.applet-card:hover,
.applet-card:focus-visible {
  border-color: rgba(0, 169, 157, 0.46);
  box-shadow: var(--shadow);
  outline: 0;
  transform: translateY(-2px);
}

.applet-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.18)),
    var(--applet-accent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    inset 0 0 0 10px rgba(255, 255, 255, 0.24),
    0 10px 24px rgba(0, 82, 84, 0.14);
  color: var(--brand-deep);
}

.applet-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.accent-lime .applet-icon {
  --applet-accent: var(--brand-glow);
}

.accent-coral .applet-icon {
  --applet-accent: var(--brand-coral);
}

.accent-blue .applet-icon {
  --applet-accent: var(--brand-blue);
  color: #f7fffd;
}

.applet-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.applet-status {
  margin-bottom: 8px;
  color: var(--brand-teal);
}

.applet-card strong {
  margin-bottom: 8px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.applet-card span:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.applet-arrow {
  align-self: start;
  color: var(--brand-teal);
}

.home-page .topbar {
  border-radius: 0;
  bottom: 0;
  left: 0;
  right: 0;
  transform: none;
  width: 100%;
}

.home-page .group-stack {
  gap: 12px;
}

.home-page .applet-group {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}

.home-page .applet-group .section-heading {
  position: relative;
  display: grid;
  gap: 4px;
  max-width: none;
  min-height: 74px;
  margin-bottom: 0;
  padding: 14px 48px 14px 16px;
  cursor: pointer;
}

.home-page .applet-group .section-heading:focus-visible {
  outline: 3px solid rgba(0, 169, 157, 0.32);
  outline-offset: -3px;
}

.home-page .applet-group .section-heading::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 18px;
  color: var(--brand-teal);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}

.home-page .applet-group.is-expanded .section-heading::after {
  content: "-";
}

.home-page .applet-group .section-heading .eyebrow {
  margin-bottom: 0;
  font-size: 0.62rem;
}

.home-page .applet-group .section-heading h2 {
  margin-bottom: 0;
  font-size: 1.12rem;
  line-height: 1.2;
}

.home-page .applet-group .section-heading p:last-child {
  display: none;
  margin: 4px 0 0;
  line-height: 1.45;
}

.home-page .applet-group.is-expanded .section-heading p:last-child {
  display: block;
}

.home-page .applet-grid {
  grid-template-columns: 1fr;
  padding: 0 12px 12px;
}

.home-page .applet-group:not(.is-expanded) .applet-grid {
  display: none;
}

.home-page .applet-card {
  grid-template-columns: 36px minmax(0, 1fr) 22px;
  gap: 12px;
  min-height: 76px;
  padding: 1rem;
  align-items: center;
}

.home-page .applet-card.is-expanded {
  min-height: 152px;
  align-items: start;
  box-shadow: 0 18px 48px rgba(0, 82, 84, 0.12);
}

.home-page .applet-icon {
  width: 36px;
  height: 36px;
}

.home-page .applet-status {
  margin-bottom: 4px;
  font-size: 0.62rem;
}

.home-page .applet-card strong {
  margin-bottom: 0;
  font-size: 1rem;
}

.home-page .applet-card .applet-content > span:last-child {
  display: none;
  margin-top: 8px;
  line-height: 1.45;
}

.home-page .applet-card.is-expanded .applet-content > span:last-child {
  display: block;
}

.home-page .applet-arrow {
  align-self: center;
  transition: transform 160ms ease;
}

.home-page .applet-card.is-expanded .applet-arrow {
  align-self: start;
  transform: rotate(90deg);
}

.accounts-hero {
  min-height: 300px;
}

.account-flow-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.account-flow-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 260px;
  padding: clamp(28px, 4vw, 42px);
  border: 2px solid transparent;
  border-radius: 8px;
  color: #ffffff;
  text-align: left;
  box-shadow: 0 18px 42px rgba(0, 31, 36, 0.18);
}

.account-flow-card-received {
  background: #075f50;
}

.account-flow-card-spent {
  background: #733015;
}

.account-flow-card-bank {
  background: #06292f;
}

.account-flow-card:hover,
.account-flow-card:focus-visible {
  border-color: #ffffff;
  outline: 4px solid var(--brand-deep);
  outline-offset: 4px;
}

.account-flow-kicker {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-flow-card strong {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.1;
}

.account-flow-card > span:not(.account-flow-kicker) {
  font-size: 1.25rem;
  font-weight: 900;
}

.account-flow-card small {
  font-size: 1rem;
  font-weight: 900;
}

.bank-review-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.52fr) minmax(0, 1.48fr);
  gap: clamp(28px, 5vw, 56px);
  margin-top: 24px;
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdfbf7;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(30, 37, 48, 0.08);
}

.bank-review-copy {
  display: grid;
  align-content: start;
  gap: 10px;
}

.bank-review-copy h2,
.bank-review-copy p {
  margin: 0;
}

.bank-review-copy p {
  color: var(--muted);
  font-size: 0.95rem;
}

#bank-review-progress {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 12px 18px;
  border: 2px solid #1e2530;
  border-radius: 999px;
  background: #fffefa;
  color: #1e2530;
  font-size: 20px;
  font-weight: 900;
  box-shadow:
    0 2px 0 rgba(30, 37, 48, 0.14),
    0 10px 20px rgba(30, 37, 48, 0.10);
}

.invoice-wizard-panel {
  display: grid;
  gap: 22px;
  margin-top: 24px;
  padding: clamp(30px, 5vw, 60px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 16px 40px rgba(0, 82, 84, 0.08);
}

body.accounts-fixed-page .invoice-wizard-step {
  padding: 28px;
  border: 2px solid rgba(30, 37, 48, 0.22);
  border-radius: 12px;
  background: #fffefa;
  box-shadow: 0 12px 24px rgba(30, 37, 48, 0.08);
}

body.accounts-fixed-page .invoice-person-picker span,
body.accounts-fixed-page .invoice-wizard-step label span {
  color: #1e2530;
  font-size: 22px;
  font-weight: 900;
}

.invoice-wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.invoice-wizard-progress span {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 14px 18px;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--brand-deep);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
  background: #ffffff;
}

.invoice-wizard-progress span[data-active="true"] {
  border-color: var(--brand-deep);
  background: rgba(0, 79, 76, 0.08);
}

.invoice-wizard-progress span[data-complete="true"] {
  border-color: rgba(0, 79, 76, 0.35);
  background: rgba(0, 79, 76, 0.04);
}

.invoice-wizard-step {
  display: grid;
  gap: 16px;
}

#invoice-wizard-form {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(380px, 1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

#invoice-wizard-form > .invoice-wizard-step,
#invoice-wizard-form > .invoice-wizard-actions,
#invoice-wizard-form > .form-status {
  grid-column: 1;
}

.invoice-live-preview {
  grid-column: 2;
  grid-row: 1 / span 5;
  position: sticky;
  top: 112px;
}

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

.invoice-kind-button[data-active="true"] {
  background: var(--brand-deep);
  color: #ffffff;
}

.invoice-person-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.invoice-person-picker {
  display: grid;
  gap: 10px;
}

.invoice-person-picker input {
  width: 100%;
}

.invoice-add-person-button {
  min-width: 240px;
}

.invoice-tax-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.invoice-tax-button[data-active="true"] {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
  color: #ffffff;
}

.invoice-review {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
}

.invoice-live-preview .invoice-preview-sheet,
.invoice-review .invoice-preview-sheet {
  min-height: 760px;
}

.invoice-preview-sheet {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: clamp(30px, 4vw, 52px);
  border: 1px solid rgba(0, 79, 76, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow:
    0 2px 0 rgba(30, 37, 48, 0.12),
    0 24px 48px rgba(30, 37, 48, 0.16);
}

.invoice-preview-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 16px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.invoice-preview-header h3 {
  margin: 0;
  color: var(--brand-deep);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.2;
}

.invoice-preview-kicker {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.invoice-preview-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.invoice-preview-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.invoice-preview-meta > div,
.invoice-preview-parties > div,
.invoice-preview-total > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.invoice-preview-meta dt,
.invoice-preview-parties span,
.invoice-preview-total span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-preview-meta dd {
  margin: 0;
  color: var(--text);
  text-align: right;
}

.invoice-preview-body {
  display: grid;
  gap: 16px;
}

.invoice-preview-parties {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(0, 79, 76, 0.06);
}

.invoice-preview-parties strong {
  color: var(--brand-deep);
}

.invoice-preview-lines {
  display: grid;
  gap: 12px;
}

.invoice-preview-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.invoice-preview-line strong {
  white-space: nowrap;
}

.invoice-preview-total {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 2px solid var(--brand-deep);
}

.invoice-preview-total > div:last-child strong {
  color: var(--brand-deep);
  font-size: 1.15rem;
}

.invoice-preview-total > div:last-child {
  align-items: center;
}

.invoice-wizard-actions {
  display: grid;
  grid-template-columns: auto auto 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.invoice-wizard-actions .button {
  min-width: 180px;
}

.invoice-wizard-actions #invoice-send-button {
  background: #0a7a2f;
  border-color: #0a7a2f;
}

.invoice-wizard-actions #invoice-send-button:hover,
.invoice-wizard-actions #invoice-send-button:focus-visible {
  background: #096525;
  border-color: #096525;
}

.person-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 18, 20, 0.62);
}

.person-modal {
  width: min(640px, 100%);
  display: grid;
  gap: 22px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.person-modal form {
  display: grid;
  gap: 16px;
}

.person-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.person-modal-actions .button {
  min-width: 180px;
}

.person-modal-backdrop[hidden] {
  display: none;
}

.bank-transaction-card {
  position: relative;
  display: grid;
  gap: 24px;
  min-height: 520px;
  padding: clamp(34px, 5vw, 58px);
  border: 1px solid rgba(30, 37, 48, 0.22);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(30, 37, 48, 0.035) 1px, transparent 1px) 0 72px / 100% 34px,
    #ffffff;
  transform-origin: 50% 0;
  box-shadow:
    0 2px 0 rgba(30, 37, 48, 0.16),
    0 20px 42px rgba(30, 37, 48, 0.16);
  will-change: transform, opacity;
}

.bank-transaction-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 8px rgba(253, 251, 247, 0.58);
}

.bank-transaction-card.bank-slip-exit {
  animation: bankSlipExit 280ms cubic-bezier(0.45, 0, 0.25, 1) forwards;
}

.bank-transaction-card.bank-slip-enter {
  animation: bankSlipEnter 340ms cubic-bezier(0.2, 0.9, 0.25, 1) forwards;
}

@keyframes bankSlipExit {
  to {
    opacity: 0;
    transform: translateY(-120%) rotate(-1.5deg);
  }
}

@keyframes bankSlipEnter {
  from {
    opacity: 0;
    transform: translateY(70%) rotate(1deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bank-transaction-card.bank-slip-exit,
  .bank-transaction-card.bank-slip-enter {
    animation: none;
  }
}

.bank-transaction-question {
  margin: 0;
  color: var(--brand-deep);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
}

.bank-smart-suggestions {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(30, 37, 48, 0.22);
  border-radius: 8px;
  background: #fffefa;
}

.bank-smart-suggestions p {
  margin: 0;
  color: var(--brand-deep);
  font-weight: 900;
}

.bank-smart-suggestions .button {
  width: 100%;
  justify-content: center;
}

.bank-smart-suggestion-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bank-category-suggestion {
  min-height: 4rem;
  background: #004f4c;
}

.bank-transaction-details dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.bank-transaction-details dt {
  color: var(--muted);
  font-weight: 900;
}

.bank-transaction-details dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 900;
}

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

.bank-action-received {
  background: #075f50;
}

.bank-action-spent {
  background: #733015;
}

.bank-action-skip {
  min-height: 4rem;
  border: 2px solid #4b5558;
  background: #eef2f2;
  color: #061f24;
}

.bank-action-skip:hover,
.bank-action-skip:focus-visible {
  background: #dfe7e7;
  outline: 4px solid var(--brand-deep);
  outline-offset: 4px;
}

.empty-bank-transaction {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.accounts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  margin-top: 24px;
  margin-inline: auto;
  align-items: start;
}

.accounts-fixed-page .accounts-layout {
  grid-template-columns: 48fr 52fr;
  grid-template-areas: "records form";
}

.accounts-fixed-page .accounts-list-panel {
  grid-area: records;
}

.accounts-fixed-page .account-form {
  grid-area: form;
  position: sticky;
  top: 116px;
}

.entity-stack {
  display: grid;
  gap: 24px;
}

.entity-panel {
  width: 100%;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(16, 16, 16, 0.05);
}

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

.account-form label,
.login-form label {
  display: grid;
  gap: 8px;
}

.account-form label span,
.login-form label span {
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.account-form input,
.account-form select,
.account-form textarea,
.login-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  outline: 0;
}

.account-form .checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.account-form .checkbox-field input {
  width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--brand);
}

.account-form .checkbox-field span {
  min-width: 0;
}

.attachments-manager {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
}

.attachments-manager legend {
  padding: 0 6px;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.attachments-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.attachments-grid .button {
  margin-top: 0;
}

.file-attachment-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  min-height: 52px;
}

.file-attachment-picker > span {
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.file-attachment-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.file-add-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: auto;
  min-width: 56px;
  min-height: 56px;
  border: 1px solid rgba(0, 169, 157, 0.45);
  border-radius: 50%;
  background: var(--brand-deep);
  color: transparent;
  cursor: pointer;
  overflow: visible;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.file-add-button::before,
.file-add-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 8px;
  border-radius: 999px;
  background: white;
  opacity: 1;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.file-add-button::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.file-add-button:hover,
.file-add-button:focus-visible {
  background: var(--brand-deep);
  box-shadow: 0 10px 24px rgba(7, 105, 100, 0.22);
  outline: 0;
  transform: translateY(-1px);
}

.attachments-list {
  display: grid;
  gap: 8px;
}

.attachment-pill {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.attachment-pill strong,
.attachment-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-pill strong {
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.attachment-pill span {
  color: var(--muted);
  font-weight: 800;
}

.account-form textarea {
  min-height: 52px;
  padding-top: 14px;
  overflow: hidden;
  resize: none;
}

.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus,
.login-form input:focus {
  border-color: rgba(0, 169, 157, 0.58);
  box-shadow: 0 0 0 4px rgba(35, 234, 208, 0.18);
}

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

.form-half {
  grid-column: span 2;
}

.account-form .button {
  width: 100%;
  margin-top: 18px;
}

.account-form .button + .button {
  margin-top: 10px;
}

.account-wizard-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.account-wizard-progress span {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.account-wizard-progress span[data-active="true"] {
  background: var(--brand-deep);
  color: #f7fffd;
}

.account-wizard-progress span[data-complete="true"] {
  border-color: rgba(0, 169, 157, 0.42);
  background: rgba(0, 169, 157, 0.12);
  color: var(--brand-deep);
}

.account-step-guidance {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 169, 157, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.account-step-guidance h3,
.account-step-guidance p {
  margin: 0;
}

.account-step-guidance h3 {
  color: var(--brand-deep);
  font-size: 1.02rem;
  line-height: 1.3;
}

.account-step-guidance p {
  color: var(--muted);
  line-height: 1.45;
}

body.accounts-fixed-page #account-step-description {
  display: none;
}

.account-step-count {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-wizard-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.account-form .account-wizard-actions .button {
  margin-top: 18px;
}

.account-form .account-wizard-actions .button + .button {
  margin-top: 18px;
}

.account-nav-button {
  min-height: 64px;
  font-size: 1.02rem;
}

.account-review {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.account-review[hidden] {
  display: none;
}

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

.account-review dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.account-review dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 800;
}

.account-form-toggle {
  margin-bottom: 18px;
  width: 100%;
}

.account-form-body[hidden] {
  display: none;
}

[data-account-engine-field] {
  display: none !important;
}

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

.accounts-list[hidden] {
  display: none;
}

.accounts-record-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.accounts-fixed-page .accounts-record-controls {
  grid-template-columns: 130px 1fr 180px;
}

.accounts-fixed-page .form-grid {
  grid-template-columns: repeat(4, 1fr);
}

.accounts-fixed-page .attachments-grid {
  grid-template-columns: repeat(4, 1fr);
}

.email-record-controls {
  grid-template-columns: 160px minmax(0, 1fr) 220px;
}

.accounts-record-controls .button {
  width: 100%;
}

.accounts-status-filter,
.accounts-search-filter {
  display: block;
  position: relative;
}

.accounts-status-filter span,
.accounts-search-filter span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.accounts-search-filter input {
  min-height: 52px;
  width: 100%;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.accounts-search-filter input::placeholder {
  color: var(--muted);
}

.accounts-search-filter input:hover,
.accounts-search-filter input:focus-visible {
  background: rgba(0, 169, 157, 0.12);
  outline: 0;
}

.accounts-status-filter select {
  min-height: 52px;
  width: 100%;
  padding: 0 42px 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--brand-deep) 50%) calc(100% - 24px) 22px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--brand-deep) 50%, transparent 50%) calc(100% - 18px) 22px / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.72);
  color: var(--brand-deep);
  font: inherit;
  font-weight: 900;
  text-align: center;
}

.accounts-status-filter select:hover,
.accounts-status-filter select:focus-visible {
  background:
    linear-gradient(45deg, transparent 50%, var(--brand-deep) 50%) calc(100% - 24px) 22px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--brand-deep) 50%, transparent 50%) calc(100% - 18px) 22px / 6px 6px no-repeat,
    rgba(0, 169, 157, 0.12);
  outline: 0;
}

.account-record {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.account-record h3 {
  margin: 0 0 6px;
  font-size: 1.18rem;
}

.account-record-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.account-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 2px solid transparent;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.account-status-badge[data-status="overdue"] {
  border-color: #7f1111;
  background: #b91c1c;
}

.account-status-badge[data-status="due"] {
  border-color: #87520b;
  background: #c66a00;
  color: #101010;
}

.account-status-badge[data-status="paid"] {
  border-color: #065f46;
  background: #047857;
}

.account-status-badge[data-status="draft"] {
  border-color: #334155;
  background: #475569;
}

.account-status-badge[data-status="accrued"] {
  border-color: #1d4ed8;
  background: #2563eb;
}

.account-status-badge[data-status="unknown"] {
  border-color: #4b5563;
  background: #6b7280;
}

.account-entity-link {
  color: inherit;
  text-decoration: none;
}

.account-entity-link:hover,
.account-entity-link:focus-visible {
  color: var(--brand-deep);
  text-decoration: underline;
  outline: 0;
}

.account-record p {
  margin: 0;
  color: var(--muted);
}

.account-record-heading .applet-status {
  margin: 0;
}

.account-record .account-details {
  margin-top: 10px;
  line-height: 1.55;
}

.account-record dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.account-record dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.account-record dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 700;
}

.account-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.account-record-actions .button {
  min-width: 120px;
}

.test-result {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.test-result-pending {
  background: rgba(0, 169, 157, 0.1);
  color: var(--muted);
}

.test-result-success {
  background: rgba(20, 90, 36, 0.1);
  color: #145a24;
}

.test-result-partial {
  background: rgba(180, 130, 0, 0.1);
  color: #7a5a00;
}

.test-result-failed {
  background: rgba(159, 45, 32, 0.1);
  color: #9f2d20;
}

.mail-server-fieldset {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
}

.mail-server-fieldset legend {
  padding: 0 6px;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.email-account-record dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.paye-hero .hero-panel strong {
  color: var(--brand-deep);
  font-size: 2.2rem;
  line-height: 1;
}

.paye-hero .hero-panel {
  display: grid;
  align-content: center;
  gap: 8px;
}

.paye-layout {
  display: grid;
  grid-template-columns: minmax(360px, 480px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.paye-form-panel,
.paye-results-panel {
  align-self: start;
}

.paye-page .paye-form {
  display: grid;
  gap: 18px;
  grid-area: auto;
  position: static;
  top: auto;
}

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

.paye-page .paye-form label {
  min-width: 0;
}

.paye-form .account-record-actions {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  margin-top: 18px;
}

.paye-form .account-record-actions .button {
  margin-top: 0;
}

.paye-form .form-status {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
  line-height: 1.45;
}

.paye-form .form-status[data-type="success"] {
  color: var(--brand-deep);
}

.paye-form .form-status[data-type="error"] {
  color: #b31319;
}

.paye-advanced {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.paye-advanced summary {
  cursor: pointer;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.paye-advanced .form-grid {
  margin-top: 16px;
}

.paye-results[hidden],
.paye-results-panel .empty-state[hidden] {
  display: none;
}

.paye-save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.paye-save-row .form-status {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.paye-save-row .form-status[data-type="success"] {
  color: var(--brand-deep);
}

.paye-save-row .form-status[data-type="error"] {
  color: #b31319;
}

.paye-save-row .button {
  width: 100%;
}

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

.paye-total-card,
.paye-result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.paye-total-card {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
}

.paye-total-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.paye-total-card strong {
  color: var(--brand-deep);
  font-size: 1.3rem;
  line-height: 1.1;
}

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

.paye-result-panel {
  padding: 18px;
}

.paye-result-panel-wide {
  grid-column: span 2;
}

.paye-result-panel-wide .paye-metric-row {
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
}

.paye-result-panel-wide .paye-metric-row strong {
  max-width: none;
  text-align: left;
}

.paye-result-panel h3 {
  margin: 0 0 14px;
  color: var(--brand-deep);
  font-size: 1rem;
}

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

.paye-metric-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(7, 105, 100, 0.1);
}

.paye-metric-row span {
  color: var(--muted);
}

.paye-metric-row strong {
  max-width: 34ch;
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}

.provider-auth-panel {
  margin-top: 24px;
}

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

.changelog-panel {
  display: grid;
  gap: 22px;
}

.changelog-list {
  display: grid;
  gap: 18px;
}

.changelog-date-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.changelog-date-heading {
  margin: 0;
}

.changelog-group {
  display: grid;
  gap: 10px;
}

.changelog-group h3 {
  margin: 0;
  color: var(--brand-deep);
  font-size: 1rem;
}

.changelog-group ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.entity-target-record {
  border-color: rgba(0, 169, 157, 0.58);
  box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.14);
}

.team-members,
.team-member-add {
  display: grid;
  gap: 10px;
}

.team-member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.team-member-row span:first-child {
  display: grid;
  gap: 2px;
}

.team-member-row small {
  color: var(--muted);
}

.team-member-row .button {
  min-height: 3rem;
}

.team-member-add {
  grid-template-columns: minmax(0, 1fr) 150px 150px;
  align-items: end;
}

.team-member-add label {
  display: grid;
  gap: 8px;
}

.team-member-add select {
  min-height: 52px;
}

.user-access-record {
  gap: 16px;
}

.admin-users-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.admin-users-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.admin-users-wizard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-users-records-panel {
  min-height: min(72vh, 860px);
}

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

.admin-user-record-card {
  display: grid;
  grid-template-columns: minmax(140px, 1.25fr) minmax(120px, 1fr) minmax(180px, 1.35fr) minmax(78px, 0.5fr) minmax(86px, 0.55fr);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  cursor: pointer;
}

.admin-user-record-card strong,
.admin-user-record-card span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-record-card strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
}

.admin-user-record-card:hover,
.admin-user-record-card:focus-visible {
  border-color: rgba(0, 169, 157, 0.42);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(0, 82, 84, 0.12);
  outline: 0;
}

.admin-user-modal-panel {
  width: min(75vw, 1040px);
}

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

.admin-user-modal-summary span {
  min-width: 0;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-modal-actions {
  margin-top: 16px;
}

.admin-user-card-list {
  display: grid;
  gap: 10px;
}

.admin-user-select-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-user-select-card[aria-pressed="true"] {
  border-color: var(--brand-deep);
  background: rgba(226, 255, 247, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.14);
}

.admin-user-select-card:hover,
.admin-user-select-card:focus-visible {
  border-color: var(--brand-deep);
  outline: 0;
}

.admin-user-select-card strong,
.admin-user-select-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-select-card strong {
  color: var(--brand-deep);
  font-weight: 900;
}

.admin-user-select-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-user-select-card small {
  padding: 6px 8px;
  border: 1px solid rgba(7, 105, 100, 0.18);
  border-radius: 999px;
  color: var(--brand-deep);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-user-detail {
  display: grid;
  gap: 16px;
}

.admin-user-detail-list {
  margin-top: 14px;
}

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

.applet-access-group {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
}

.applet-access-group legend {
  padding: 0 6px;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.applet-access-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.applet-access-option input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.applet-access-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.applet-access-option small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.account-compact-wrapper {
  display: grid;
  gap: 10px;
  width: 100%;
}

.account-compact-header {
  display: grid;
  grid-template-columns: 26fr 22fr 34fr 18fr;
  gap: 12px;
  align-items: center;
  min-height: 3rem;
  margin: 0 0 10px;
  padding: 0.25rem 0.875rem;
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-compact-header[hidden] {
  display: none;
}

.account-compact-header > button {
  min-width: 3rem;
  min-height: 3rem;
  padding: 0.75rem 0.5rem;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.account-compact-header > button::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 7px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  vertical-align: middle;
}

.account-compact-header > button[data-active="true"][aria-sort="ascending"]::after {
  border-bottom: 6px solid currentColor;
}

.account-compact-header > button[data-active="true"][aria-sort="descending"]::after {
  border-top: 6px solid currentColor;
}

.account-compact-header > button:hover,
.account-compact-header > button:focus-visible {
  color: var(--text);
  outline: 0;
}

.account-compact-row {
  display: grid;
  grid-template-columns: 26fr 22fr 34fr 18fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 3.375rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 800;
  text-align: left;
}

.account-compact-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.account-compact-summary > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-compact-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-compact-row:hover,
.account-compact-row:focus-visible,
.account-compact-row[aria-expanded="true"] {
  border-color: rgba(0, 169, 157, 0.46);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  outline: 0;
}

.account-compact-main {
  color: var(--text);
  font-weight: 900;
}

.compact-empty {
  padding: 22px;
  border-radius: 8px;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
  align-items: start;
}

.task-column {
  display: grid;
  gap: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.task-column-drop-target {
  border-color: rgba(0, 169, 157, 0.42);
  box-shadow: 0 18px 40px rgba(0, 63, 71, 0.12);
  transform: translateY(-2px);
}

.task-list {
  display: grid;
  gap: 12px;
  min-height: 88px;
  padding-bottom: 6px;
}

.task-list-drop-end {
  box-shadow: inset 0 -3px 0 rgba(0, 169, 157, 0.58);
}

.task-card {
  display: grid;
  gap: 10px;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  cursor: grab;
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.task-card[role="button"] {
  cursor: pointer;
}

.task-card[role="button"]:hover,
.task-card[role="button"]:focus-visible {
  border-color: rgba(0, 169, 157, 0.42);
  box-shadow: 0 10px 24px rgba(0, 63, 71, 0.1);
  outline: 0;
}

.task-card-expanded {
  gap: 14px;
  min-height: 0;
  padding: 18px;
}

.task-card:active {
  cursor: grabbing;
}

.task-card-dragging {
  opacity: 0.46;
  transform: scale(0.98);
  box-shadow: none;
}

.task-card-drop-before {
  box-shadow: 0 -4px 0 rgba(0, 169, 157, 0.58), 0 10px 24px rgba(0, 63, 71, 0.08);
}

.task-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.task-card:not(.task-card-expanded) h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.task-card .task-description {
  color: var(--text);
  white-space: pre-wrap;
}

.task-record-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.task-record-status span {
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.task-record-status strong {
  color: var(--text);
  font-size: 0.9rem;
}

.task-record-priority {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 169, 157, 0.24);
  border-radius: 8px;
  background: rgba(0, 169, 157, 0.08);
}

.task-record-priority span {
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.task-record-priority strong {
  color: var(--text);
  font-size: 0.94rem;
}

.task-record-priority small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.task-record-assignee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.task-record-assignee span {
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.task-record-assignee strong {
  color: var(--text);
  font-size: 0.9rem;
  text-align: right;
}

.task-card label {
  display: grid;
  gap: 8px;
}

.task-card label span {
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.task-card select {
  width: 100%;
  min-height: 3rem;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
}

.task-edit-button {
  min-height: 3rem;
  border-radius: 8px;
}

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

.task-card-actions .button {
  min-height: 3rem;
  border-radius: 8px;
}

.tasks-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.tasks-wizard-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.tasks-wizard-grid .notes-wizard-widget {
  min-width: 0;
  min-height: 40px;
  padding-inline: 6px;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.tasks-list-panel {
  min-height: min(72vh, 860px);
}

.tasks-status-panel {
  min-height: 0;
}

.tasks-today-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tasks-today-options .button {
  width: 100%;
}

.tasks-status-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.task-list-card {
  grid-template-columns: minmax(150px, 1.35fr) minmax(92px, 0.62fr) minmax(92px, 0.62fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(135px, 0.82fr);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  cursor: pointer;
}

.task-list-card strong,
.task-list-card span,
.task-list-card time {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-list-card strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
}

.task-list-card:hover,
.task-list-card:focus-visible {
  border-color: rgba(0, 169, 157, 0.42);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(0, 82, 84, 0.12);
  outline: 0;
}

.task-status-group {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(0, 82, 84, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.task-status-group[data-drop-target="true"] {
  border-color: rgba(0, 169, 157, 0.58);
  background: rgba(0, 169, 157, 0.1);
  box-shadow: inset 0 0 0 1px rgba(0, 169, 157, 0.26);
}

.task-status-group[data-drop-end="true"] {
  box-shadow: inset 0 -3px 0 rgba(0, 169, 157, 0.58), inset 0 0 0 1px rgba(0, 169, 157, 0.26);
}

.task-status-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 82, 84, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.task-status-group-heading strong,
.task-status-group-heading span {
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.task-status-empty {
  min-height: 38px;
  padding: 8px 10px;
}

.task-status-card {
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
}

.task-status-card[draggable="true"] {
  cursor: grab;
}

.task-status-card[data-dragging="true"] {
  opacity: 0.54;
  cursor: grabbing;
}

.task-status-card strong,
.task-status-card span {
  font-size: 0.72rem;
}

.task-status-card span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 169, 157, 0.12);
  color: var(--brand-deep);
  font-weight: 900;
}

.notes-wizard-widget[data-active="true"] {
  border-color: rgba(0, 169, 157, 0.48);
  background: rgba(0, 169, 157, 0.12);
  color: var(--brand-deep);
}

.task-form-panel {
  margin-top: 24px;
}

.task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: end;
}

.task-form label {
  display: grid;
  gap: 8px;
}

.task-form-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 6px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.task-form-fieldset legend {
  padding: 0 8px;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.task-form label span {
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.task-form input,
.task-form select,
.task-form textarea {
  width: 100%;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  outline: 0;
}

.task-form input,
.task-form select {
  min-height: 52px;
}

.task-form textarea {
  min-height: 52px;
  padding-block: 14px;
  line-height: 1.4;
  overflow: hidden;
  resize: none;
}

.task-form-actions {
  display: flex;
  gap: 10px;
  grid-column: 1 / -1;
}

.tasks-modal .section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
  margin-bottom: 0;
}

.task-form-actions-top {
  grid-column: auto;
  justify-content: flex-end;
  margin-top: 0;
}

.task-form-actions .button {
  min-width: 150px;
}

.task-form .form-status {
  grid-column: 1 / -1;
}

.task-source-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 12px 0 0;
}

.task-source-details div {
  min-width: 0;
}

.task-source-details dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.task-source-details dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.notes-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.72fr);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.notes-wizard-panel {
  grid-column: 1 / -1;
}

.notes-wizard-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 44px;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  overflow: hidden;
}

.notes-wizard-widget {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-wizard-grid.tasks-wizard-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.notes-wizard-widget[data-mobile-label]::before {
  content: attr(data-mobile-label);
  display: inline-block;
  margin-right: 0.45em;
  font-size: 0.92em;
  font-weight: 900;
  line-height: 1;
}

.notes-wizard-widget:not(:disabled):hover,
.notes-wizard-widget:not(:disabled):focus-visible {
  background: rgba(0, 169, 157, 0.12);
  outline: 0;
}

.notes-wizard-widget:disabled {
  cursor: default;
  opacity: 0.72;
}

.wizard-icon-help {
  margin-top: 8px;
  color: var(--brand-deep);
  font-weight: 800;
}

.search-help-panel {
  width: min(520px, calc(100vw - 28px));
}

.search-help-body {
  display: grid;
  gap: 10px;
  color: var(--brand-deep);
  font-weight: 800;
}

.search-help-body p {
  margin: 0;
}

#entities-wizard-grid {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.notes-list-panel {
  grid-column: 1 / -1;
}

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

.note-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.note-card[role="button"] {
  cursor: pointer;
}

.note-card[role="button"]:hover,
.note-card[role="button"]:focus-visible {
  border-color: rgba(0, 169, 157, 0.42);
  background: rgba(255, 255, 255, 0.94);
  outline: 0;
  box-shadow: 0 12px 32px rgba(0, 82, 84, 0.12);
}

.note-card-heading {
  min-width: 0;
}

.note-card h3 {
  margin: 0;
  overflow: hidden;
  font-size: 0.98rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-body-preview {
  margin: 0;
  color: var(--text);
  line-height: 1.2;
  max-height: 1.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-body-preview,
.note-body-preview * {
  display: inline;
  margin: 0;
}

.notes-modal .notes-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.notes-modal .notes-form .form-wide {
  grid-column: 1 / -1;
}

.notes-modal .notes-form label,
.notes-modal .notes-form input,
.notes-modal .notes-form .task-form-actions,
.notes-modal .notes-form .form-status {
  min-width: 0;
}

.notes-modal .notes-form label span {
  color: var(--muted);
  font-weight: 800;
}

.notes-modal .notes-form input,
.notes-modal .notes-form textarea,
.notes-modal .note-body-editor {
  color: var(--brand-deep);
  font-weight: 800;
}

.notes-modal input[list]::-webkit-calendar-picker-indicator {
  display: none !important;
}

.notes-modal input[list] {
  appearance: textfield;
}

.notes-modal {
  width: min(860px, calc(100% - 32px));
  max-height: min(88vh, 920px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.notes-modal::backdrop {
  background: rgba(4, 18, 20, 0.62);
}

.notes-modal-panel {
  position: relative;
  display: grid;
  gap: 22px;
  max-height: min(88vh, 920px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.contact-register-modal-panel {
  grid-template-rows: auto 1fr auto;
  overflow-y: hidden;
}

.notes-modal .task-form-actions .button {
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.notes-modal .task-form-actions .button:hover,
.notes-modal .task-form-actions .button:focus-visible {
  background: var(--brand-teal);
  color: #ffffff;
  outline: 4px solid rgba(0, 169, 157, 0.32);
  outline-offset: 3px;
  box-shadow: 0 12px 28px rgba(0, 82, 84, 0.24);
  transform: translateY(-1px);
}

.notes-find-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 14px;
  align-items: end;
}

.notes-find-tools label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.notes-find-tools label span {
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.notes-find-tools input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  outline: 0;
}

.notes-find-tools input:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(0, 169, 157, 0.24);
}

.notes-find-results {
  display: grid;
  gap: 10px;
}

.notes-find-result {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-align: left;
}

.notes-find-result strong,
.notes-find-result span,
.notes-find-result small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-find-result span,
.notes-find-result small {
  color: var(--muted);
}

.notes-find-result:hover,
.notes-find-result:focus-visible {
  border-color: rgba(0, 169, 157, 0.42);
  background: rgba(255, 255, 255, 0.94);
  outline: 3px solid rgba(0, 169, 157, 0.2);
  outline-offset: 2px;
}

.notes-sort-tools {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
}

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

.notes-sort-order[aria-pressed="true"] {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
  color: #ffffff;
}

.notes-sort-order {
  width: 100%;
}

.notes-sort-actions .button {
  width: 100%;
}

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

.notes-assign-records {
  display: grid;
  gap: 10px;
  max-height: min(42vh, 420px);
  overflow-y: auto;
  padding-right: 4px;
}

.notes-assign-record {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.notes-assign-record input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-teal);
}

.notes-assign-record span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notes-assign-record strong,
.notes-assign-record small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-assign-record small {
  color: var(--muted);
}

.notes-assign-record:hover,
.notes-assign-record:focus-within {
  border-color: rgba(0, 169, 157, 0.42);
  background: rgba(255, 255, 255, 0.94);
  outline: 3px solid rgba(0, 169, 157, 0.16);
  outline-offset: 2px;
}

.notes-sort-data {
  display: grid;
  gap: 10px;
}

.notes-sort-data:empty {
  display: none;
}

.notes-sort-data strong {
  color: var(--brand-deep);
  font-size: 0.88rem;
}

.notes-sort-data div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notes-sort-data span,
.notes-sort-data button {
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.notes-sort-data button {
  cursor: pointer;
}

.notes-sort-data button:hover,
.notes-sort-data button:focus-visible {
  border-color: rgba(0, 169, 157, 0.42);
  background: rgba(0, 169, 157, 0.12);
  color: var(--brand-deep);
  outline: 3px solid rgba(0, 169, 157, 0.18);
  outline-offset: 2px;
}

.contact-register-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.applet-development-note {
  margin: 0 0 10px;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.contact-register-list-panel {
  min-height: min(72vh, 860px);
}

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

.contact-register-record {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) minmax(84px, 0.55fr) minmax(160px, 1fr) minmax(160px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 14px;
}

.contact-register-record[role="button"] {
  cursor: pointer;
}

.contact-register-record[role="button"]:hover,
.contact-register-record[role="button"]:focus-visible {
  border-color: rgba(0, 169, 157, 0.5);
  box-shadow: 0 16px 34px rgba(0, 96, 96, 0.12);
  outline: 0;
  transform: translateY(-1px);
}

.contact-register-record strong {
  margin: 0;
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-register-record span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-card-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.contact-register-record:hover .entity-card-delete,
.contact-register-record:focus-within .entity-card-delete {
  opacity: 0.5;
}

.entity-card-delete:hover,
.entity-card-delete:focus-visible {
  opacity: 1 !important;
  background: rgba(200, 40, 40, 0.1);
  color: #c82828;
  outline: 0;
}

.contact-register-record {
  position: relative;
}

.contact-register-modal .contact-register-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
}

.contact-modal-wizard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  background: rgba(251, 255, 253, 0.84);
}

.contact-modal-wizard-button {
  padding: 12px 14px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.contact-modal-wizard-button:hover,
.contact-modal-wizard-button:focus-visible {
  background: rgba(0, 169, 157, 0.12);
  color: var(--brand-deep);
  outline: 0;
}

.contact-modal-wizard-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.contact-modal-wizard-button[data-running="true"] {
  position: relative;
  opacity: 1;
}

.contact-modal-wizard-button[data-running="true"]::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  border: 2px solid rgba(0, 96, 96, 0.22);
  border-top-color: var(--brand-teal);
  border-radius: 50%;
  vertical-align: -1px;
  animation: contact-scraper-spin 800ms linear infinite;
}

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

.contact-register-modal .contact-register-form .form-grid {
  max-height: min(54vh, 560px);
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.contact-register-name-field {
  grid-column: span 3;
}

.contact-register-number-field {
  grid-column: span 1;
}

.contact-register-contact-area {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
}

.contact-register-address-area {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.contact-register-details-area {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.contact-register-ownership-area {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.contact-register-contact-area legend,
.contact-register-address-area legend,
.contact-register-details-area legend,
.contact-register-ownership-area legend {
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.address-area-actions {
  display: grid;
  justify-content: end;
}

.entity-address-list {
  display: grid;
  gap: 6px;
}

.entity-address-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.45fr) minmax(110px, 0.28fr) auto 30px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.entity-address-open {
  min-width: 0;
  min-height: 36px;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--brand-deep);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.entity-address-open:hover,
.entity-address-open:focus-visible {
  border-color: rgba(0, 169, 157, 0.5);
  outline: 3px solid rgba(0, 169, 157, 0.14);
  outline-offset: 1px;
}

.entity-address-open span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-address-row input,
.entity-address-row select {
  min-height: 36px;
  min-width: 0;
}

.contact-address-modal {
  width: min(620px, calc(100% - 32px));
}

.contact-address-modal-panel {
  gap: 16px;
}

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

.contact-address-form .form-wide,
.contact-address-form .task-form-actions {
  grid-column: 1 / -1;
}

.contact-address-form label {
  display: grid;
  gap: 8px;
}

.contact-address-form label span {
  color: var(--muted);
  font-weight: 800;
}

.contact-address-form input,
.contact-address-form select {
  min-width: 0;
  min-height: 42px;
  color: var(--brand-deep);
  font: inherit;
  font-weight: 800;
}

.contact-address-primary {
  align-content: end;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.contact-method-actions {
  display: grid;
  justify-content: end;
}

.contact-method-add,
.contact-method-remove {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--brand-deep);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-method-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.contact-method-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(110px, 0.28fr) auto 30px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.contact-method-row input,
.contact-method-row select {
  min-height: 36px;
  min-width: 0;
}

.contact-method-row .contact-method-remove {
  width: 30px;
  min-width: 30px;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1;
}

.account-form .contact-method-preferred {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 28px;
  min-width: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--brand-deep);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.account-form .contact-method-preferred input {
  width: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--brand-teal);
}

.contact-register-modal .account-form label span {
  color: var(--muted);
  font-weight: 800;
}

.contact-register-modal .account-form input,
.contact-register-modal .account-form select,
.contact-register-modal .account-form textarea {
  color: var(--brand-deep);
  font-weight: 800;
}

.contact-register-details-summary {
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-details-modal {
  width: min(560px, calc(100% - 32px));
}

.contact-details-modal-panel {
  gap: 16px;
}

.contact-details-editor-label {
  display: grid;
  gap: 8px;
}

.contact-details-editor-label span {
  color: var(--muted);
  font-weight: 800;
}

.contact-details-editor-label textarea {
  width: 100%;
  min-height: 180px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand-deep);
  font: inherit;
  font-weight: 800;
  resize: vertical;
}

.contact-register-modal .task-form-actions .button {
  width: 100%;
}

.contact-delete-modal {
  width: min(760px, calc(100% - 32px));
}

.contact-delete-modal-panel {
  gap: 16px;
}

.contact-delete-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: 16px;
  min-height: 320px;
}

.contact-delete-picker,
.contact-delete-confirmation {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.contact-delete-search {
  width: 100%;
}

.contact-delete-records {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.contact-delete-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.contact-delete-record:hover,
.contact-delete-record:focus-visible,
.contact-delete-record.is-selected {
  border-color: rgba(184, 40, 40, 0.48);
  outline: 0;
  box-shadow: 0 12px 28px rgba(120, 32, 32, 0.12);
}

.contact-delete-record strong,
.contact-delete-record span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-delete-record strong {
  color: var(--brand-deep);
  font-size: 0.86rem;
  font-weight: 900;
}

.contact-delete-record span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-delete-selected {
  padding: 12px;
  border: 1px solid rgba(184, 40, 40, 0.28);
  border-radius: 8px;
  color: var(--brand-deep);
  background: rgba(184, 40, 40, 0.06);
  font-size: 0.88rem;
  font-weight: 900;
}

.contact-delete-confirm-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-delete-confirm-label input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand-deep);
  font: inherit;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-delete-confirm-label input:focus-visible {
  border-color: rgba(184, 40, 40, 0.5);
  outline: 3px solid rgba(184, 40, 40, 0.16);
  outline-offset: 2px;
}

.contact-scraper-modal {
  width: min(1080px, calc(100% - 32px));
}

.contact-scraper-modal-panel {
  gap: 16px;
}

.contact-scraper-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  min-height: 420px;
}

.contact-scraper-picker,
.contact-scraper-results {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.contact-scraper-search {
  width: 100%;
}

.contact-scraper-records,
.contact-scraper-comparison,
.contact-scraper-sources {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.contact-scraper-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.contact-scraper-record:hover,
.contact-scraper-record:focus-visible,
.contact-scraper-record.is-selected {
  border-color: rgba(0, 169, 157, 0.5);
  outline: 0;
  box-shadow: 0 12px 28px rgba(0, 96, 96, 0.12);
}

.contact-scraper-record.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.contact-scraper-record.is-disabled:hover,
.contact-scraper-record.is-disabled:focus-visible {
  border-color: var(--line);
  box-shadow: none;
}

.contact-scraper-record strong,
.contact-scraper-record span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-scraper-record strong {
  color: var(--brand-deep);
  font-size: 0.86rem;
  font-weight: 900;
}

.contact-scraper-record span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-scraper-selected {
  color: var(--brand-deep);
  font-size: 0.88rem;
  font-weight: 900;
}

.contact-scraper-comparison-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.contact-scraper-comparison-row[data-status="different"] {
  border-color: rgba(0, 169, 157, 0.42);
}

.contact-scraper-apply-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.contact-scraper-apply-choice input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-teal);
}

.contact-scraper-comparison-row small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-scraper-comparison-row p {
  margin: 0;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.contact-scraper-comparison-row > strong {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-scraper-sources h3 {
  margin: 4px 0 0;
  color: var(--brand-deep);
  font-size: 0.86rem;
}

.contact-scraper-source {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
}

.contact-scraper-source strong,
.contact-scraper-source span {
  overflow-wrap: anywhere;
}

.contact-scraper-source strong {
  color: var(--brand-deep);
  font-size: 0.82rem;
}

.contact-scraper-source span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.project-mai-form {
  display: grid;
  gap: 16px;
}

.project-mai-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-mai-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  resize: vertical;
  border: 1px solid rgba(0, 96, 96, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: none;
}

.project-mai-form textarea:focus-visible {
  border-color: rgba(0, 169, 157, 0.5);
  outline: 3px solid rgba(0, 169, 157, 0.18);
  outline-offset: 2px;
}

.project-mai-result {
  display: grid;
  gap: 10px;
}

.project-mai-result:empty {
  display: none;
}

.project-mai-result pre {
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 0;
  border: 1px solid rgba(0, 96, 96, 0.14);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font: 700 0.9rem/1.5 "Lato", Arial, sans-serif;
}

.note-editor-shell {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 8px;
  overflow: clip;
  background: transparent;
}

.note-body-editor {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  outline: 0;
}

.note-body-editor:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(0, 169, 157, 0.24);
}

.note-body-editor p,
.note-body-editor ul,
.note-body-editor ol,
.note-body-editor blockquote,
.note-body-editor pre {
  margin: 0 0 0.75rem;
}

.empty-list-message {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.talk-compose {
  display: grid;
  gap: 14px;
}

.talk-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.talk-wizard-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.talk-page-status {
  margin: 10px 0 0;
}

.talk-compose-modal .notes-form .section-heading,
.talk-compose-modal .notes-form .talk-input-zone,
.talk-compose-modal .notes-form .task-form-actions {
  grid-column: 1 / -1;
}

.talk-search {
  width: 100%;
  min-width: 0;
}

.talk-list {
  gap: 8px;
}

.talk-conversation {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  cursor: pointer;
}

.talk-conversation:hover,
.talk-conversation:focus-visible {
  border-color: rgba(0, 169, 157, 0.45);
  box-shadow: 0 14px 34px rgba(6, 41, 47, 0.1);
  outline: none;
}

.talk-conversation.is-compact {
  gap: 0;
}

.talk-compact-content {
  display: grid;
  grid-template-columns: minmax(150px, 0.78fr) minmax(0, 1.35fr) minmax(118px, 0.56fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.talk-compact-from {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 900;
}

.talk-compact-from span:last-child,
.talk-compact-content strong,
.talk-compact-status,
.talk-compact-date {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.talk-compact-content strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 900;
}

.talk-compact-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.talk-compact-date {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
}

.talk-compact-content .talk-avatar {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  font-size: 0.76rem;
}

.talk-conversation-modal {
  width: min(960px, calc(100% - 32px));
}

.talk-conversation-modal-panel {
  grid-template-rows: auto minmax(220px, 1fr) auto;
  max-height: min(88vh, 920px);
}

.talk-compact-actions {
  display: flex;
  justify-content: flex-end;
}

.talk-thread {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding: 4px;
}

.talk-message {
  display: flex;
}

.talk-message.is-outbound {
  justify-content: flex-end;
}

.talk-message.is-inbound {
  justify-content: flex-start;
}

.talk-bubble {
  display: grid;
  gap: 8px;
  max-width: min(86%, 560px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.talk-message.is-outbound .talk-bubble {
  border-color: rgba(0, 169, 157, 0.32);
  background: rgba(0, 169, 157, 0.1);
}

.talk-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.talk-seen-chip {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.talk-seen-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 24px;
}

.talk-avatar {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  background-color: rgba(0, 169, 157, 0.16);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--brand-deep);
  font-size: 0.72rem;
  font-weight: 900;
}

.talk-avatar-image {
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.talk-message-meta > :last-child {
  margin-left: auto;
}

.talk-bubble p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.talk-media {
  display: block;
  max-width: 100%;
  max-height: 360px;
  border-radius: 8px;
  object-fit: contain;
}

.talk-input-zone {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px dashed rgba(0, 169, 157, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.talk-input-zone.is-drag-over,
.talk-input-zone:focus-within {
  border-color: var(--brand);
  background: rgba(0, 169, 157, 0.08);
}

.talk-media-input {
  display: none;
}

.talk-file-name {
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.talk-reply-form {
  display: grid;
  gap: 12px;
}

.talk-reply-form label {
  display: grid;
  gap: 8px;
}

.talk-reply-form label span {
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.talk-reply-form textarea {
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  resize: vertical;
}

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

.login-shell {
  display: grid;
  width: min(calc(100% - 32px), 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 0;
  place-items: center;
}

.login-panel {
  width: 100%;
  padding: clamp(26px, 6vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.login-brand {
  margin-bottom: 34px;
}

.login-panel h1 {
  margin-bottom: 12px;
  font-size: clamp(3rem, 12vw, 5.2rem);
}

.login-copy {
  color: var(--muted);
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 900;
}

.button-primary {
  background: var(--brand-deep);
  color: #f7fffd;
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-deep);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #0b3a42;
  outline: 0;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(0, 169, 157, 0.12);
  outline: 0;
}

.button:disabled,
.topbar-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.field-hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.field-hint[data-type="success"],
.form-status[data-type="success"] {
  color: var(--success);
}

.field-hint[data-type="pending"] {
  color: #7a6200;
}

.field-hint[data-type="error"],
.form-status[data-type="error"] {
  color: #a33f2f;
}

body.accounts-fixed-page .field-hint[data-type="pending"] {
  color: #5a4300;
}

body.accounts-fixed-page .field-hint[data-type="error"],
body.accounts-fixed-page .form-status[data-type="error"] {
  color: var(--danger);
}

body.accounts-fixed-page .transparent-explanation {
  margin: 2px 0 0;
  padding: 14px 16px;
  border: 2px solid rgba(0, 71, 168, 0.42);
  border-radius: 10px;
  background: #eef4ff;
  color: #1e2530;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
}

body.accounts-fixed-page .transparent-explanation[hidden] {
  display: none;
}

body.accounts-fixed-page .accounts-morning-dashboard {
  display: grid;
  gap: clamp(34px, 5vw, 56px);
  margin-top: 32px;
  padding: clamp(36px, 6vw, 72px);
  border: 2px solid rgba(30, 37, 48, 0.28);
  border-radius: 14px;
  background: #fffefa;
  box-shadow:
    0 2px 0 rgba(30, 37, 48, 0.14),
    0 18px 36px rgba(30, 37, 48, 0.12);
}

body.accounts-fixed-page .dashboard-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
}

body.accounts-fixed-page .dashboard-heading h2,
body.accounts-fixed-page .dashboard-heading p,
body.accounts-fixed-page .dashboard-quick-actions h3,
body.accounts-fixed-page .dashboard-summary-card p {
  margin: 0;
}

body.accounts-fixed-page .dashboard-heading h2 {
  color: #1e2530;
  font-size: 32px;
}

body.accounts-fixed-page .dashboard-heading p {
  margin-top: 8px;
  color: #364352;
}

body.accounts-fixed-page .dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 44px);
}

body.accounts-fixed-page .dashboard-summary-card {
  display: grid;
  gap: 28px;
  min-height: 320px;
  padding: clamp(34px, 5vw, 56px);
  border: 2px solid rgba(30, 37, 48, 0.28);
  border-radius: 12px;
  background: #fdfbf7;
  box-shadow:
    0 2px 0 rgba(30, 37, 48, 0.12),
    0 12px 24px rgba(30, 37, 48, 0.10);
}

body.accounts-fixed-page .dashboard-summary-card p,
body.accounts-fixed-page .dashboard-quick-actions h3 {
  color: #364352;
  font-size: 20px;
  font-weight: 800;
}

body.accounts-fixed-page .dashboard-summary-card strong {
  color: #1e2530;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 7vw, 72px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

body.accounts-fixed-page .dashboard-summary-card .button {
  align-self: end;
  justify-self: start;
  min-width: 280px;
  font-family: "Inter", "Roboto", "Open Sans", Arial, sans-serif;
}

body.accounts-fixed-page .dashboard-quick-actions {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.accounts-fixed-page .dashboard-quick-actions > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.accounts-fixed-page .dashboard-quick-actions h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

body.accounts-fixed-page .dashboard-quick-actions .button,
body.accounts-fixed-page .dashboard-heading .button {
  font-family: "Inter", "Roboto", "Open Sans", Arial, sans-serif;
}

body.accounts-fixed-page .dashboard-quick-actions .button {
  min-height: 46px;
  padding: 10px 14px;
  border-width: 1px;
  background: rgba(255, 254, 250, 0.72);
  color: #1e2530;
  box-shadow: none;
  font-size: 16px;
}

body.accounts-fixed-page .dashboard-quick-actions .button:hover,
body.accounts-fixed-page .dashboard-quick-actions .button:focus-visible {
  background: #ffffff;
  border-color: #0047a8;
  color: #0047a8;
}

body.accounts-dashboard-mode .account-flow-cards,
body.accounts-dashboard-mode .invoice-wizard-panel,
body.accounts-dashboard-mode .bank-review-panel,
body.accounts-dashboard-mode .accounts-layout {
  display: none;
}

body.accounts-entry-mode .accounts-morning-dashboard,
body.accounts-entry-mode .workspace-hero {
  display: none;
}

body.accounts-bank-mode .accounts-morning-dashboard,
body.accounts-bank-mode .account-flow-cards,
body.accounts-bank-mode .invoice-wizard-panel,
body.accounts-bank-mode .accounts-layout,
body.accounts-invoice-mode .accounts-morning-dashboard,
body.accounts-invoice-mode .account-flow-cards,
body.accounts-invoice-mode .bank-review-panel,
body.accounts-invoice-mode .accounts-layout,
body.accounts-records-mode .accounts-morning-dashboard,
body.accounts-records-mode .account-flow-cards,
body.accounts-records-mode .invoice-wizard-panel,
body.accounts-records-mode .bank-review-panel {
  display: none;
}

body.accounts-fixed-page,
body.accounts-fixed-page button,
body.accounts-fixed-page input,
body.accounts-fixed-page select,
body.accounts-fixed-page textarea {
  font-family: "Inter", "Roboto", "Open Sans", Arial, sans-serif;
  font-size: 18px;
  font-optical-sizing: auto;
}

body.accounts-fixed-page {
  background:
    linear-gradient(rgba(30, 37, 48, 0.025) 1px, transparent 1px) 0 0 / 100% 36px,
    #fdfbf7;
  padding-bottom: 132px;
  scroll-behavior: auto;
  touch-action: manipulation;
}

body.accounts-fixed-page .page-shell {
  padding-top: 16px;
  padding-bottom: 220px;
}

html.accounts-fixed-root {
  scroll-behavior: auto;
}

body.accounts-fixed-page p,
body.accounts-fixed-page li,
body.accounts-fixed-page dt,
body.accounts-fixed-page dd,
body.accounts-fixed-page label,
body.accounts-fixed-page small,
body.accounts-fixed-page span {
  line-height: 1.6;
}

body.accounts-fixed-page h1,
body.accounts-fixed-page h2,
body.accounts-fixed-page h3,
body.accounts-fixed-page .hero-panel strong {
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

body.accounts-fixed-page h1 {
  font-size: 32px;
}

body.accounts-fixed-page h2 {
  font-size: 32px;
}

body.accounts-fixed-page h3,
body.accounts-fixed-page .account-record h3 {
  font-size: 24px;
}

body.accounts-fixed-page .account-flow-card strong,
body.accounts-fixed-page .hero-panel strong {
  font-size: 32px;
  line-height: 1.15;
}

body.accounts-fixed-page .eyebrow,
body.accounts-fixed-page .panel-label,
body.accounts-fixed-page .applet-status,
body.accounts-fixed-page .field-hint,
body.accounts-fixed-page .form-status,
body.accounts-fixed-page .account-form label span,
body.accounts-fixed-page .attachments-manager legend,
body.accounts-fixed-page .file-attachment-picker > span,
body.accounts-fixed-page .attachment-pill strong,
body.accounts-fixed-page .account-wizard-progress span,
body.accounts-fixed-page .account-step-count,
body.accounts-fixed-page .account-review dt {
  font-size: 18px;
}

body.accounts-fixed-page .workspace-hero .eyebrow,
body.accounts-fixed-page .workspace-hero .hero-text,
body.accounts-fixed-page .workspace-hero .panel-label,
body.accounts-fixed-page .workspace-hero .applet-status,
body.accounts-fixed-page .workspace-hero .hero-panel span {
  color: #fffefa;
}

body.accounts-fixed-page .eyebrow-dark {
  color: var(--brand-deep);
}

body.accounts-fixed-page .account-entity-link {
  display: inline-flex;
  align-items: center;
  min-width: 3rem;
  min-height: 3rem;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
}

body.accounts-fixed-page .account-entity-link,
body.accounts-fixed-page .account-compact-row,
body.accounts-fixed-page .account-compact-header button,
body.accounts-fixed-page .attachment-pill strong,
body.accounts-fixed-page .attachment-pill span {
  white-space: normal;
}

body.accounts-fixed-page .account-compact-row,
body.accounts-fixed-page .account-compact-header,
body.accounts-fixed-page .account-record,
body.accounts-fixed-page .attachment-pill,
body.accounts-fixed-page .button {
  overflow-wrap: anywhere;
}

body.accounts-fixed-page .account-compact-row span,
body.accounts-fixed-page .account-compact-header button,
body.accounts-fixed-page .attachment-pill strong,
body.accounts-fixed-page .attachment-pill span {
  overflow: visible;
  text-overflow: clip;
}

body.accounts-fixed-page .button,
body.accounts-fixed-page .account-entity-link,
body.accounts-fixed-page .account-compact-header > button,
body.accounts-fixed-page .account-compact-row,
body.accounts-fixed-page .account-form input,
body.accounts-fixed-page .account-form select,
body.accounts-fixed-page .account-form textarea,
body.accounts-fixed-page .accounts-search-filter input,
body.accounts-fixed-page .accounts-status-filter select {
  min-height: 64px;
}

body.accounts-fixed-page .button-primary,
body.accounts-fixed-page .account-nav-button.button-primary {
  min-height: 4rem;
}

body.accounts-fixed-page .account-form textarea {
  min-height: 128px;
  line-height: 1.6;
}

body.accounts-fixed-page .topbar,
body.accounts-fixed-page .workspace-hero,
body.accounts-fixed-page .entity-panel,
body.accounts-fixed-page .invoice-wizard-panel,
body.accounts-fixed-page .bank-review-panel,
body.accounts-fixed-page .account-record,
body.accounts-fixed-page .account-review,
body.accounts-fixed-page .attachments-manager,
body.accounts-fixed-page .attachment-pill,
body.accounts-fixed-page .empty-state {
  border: 2px solid var(--brand-deep);
  background: #fffefa;
  box-shadow: 0 10px 24px rgba(30, 37, 48, 0.10);
  backdrop-filter: none;
}

body.accounts-fixed-page .workspace-hero {
  background: #1e2530;
  box-shadow: 0 12px 28px rgba(30, 37, 48, 0.14);
}

body.accounts-fixed-page .entity-panel,
body.accounts-fixed-page .workspace-hero {
  border-radius: 8px;
}

body.accounts-fixed-page .form-grid,
body.accounts-fixed-page .attachments-grid,
body.accounts-fixed-page .accounts-record-controls,
body.accounts-fixed-page .invoice-wizard-step,
body.accounts-fixed-page .invoice-person-row,
body.accounts-fixed-page .invoice-kind-toggle,
body.accounts-fixed-page .invoice-tax-toggle,
body.accounts-fixed-page .invoice-wizard-actions,
body.accounts-fixed-page .bank-transaction-actions,
body.accounts-fixed-page .bank-smart-suggestion-row,
body.accounts-fixed-page .account-wizard-actions {
  gap: 16px;
}

body.accounts-fixed-page .account-wizard-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 24px;
}

body.accounts-fixed-page .account-wizard-actions .button {
  min-height: 76px;
  margin-top: 0;
  padding: 18px 22px;
  border-width: 3px;
  font-size: 22px;
}

body.accounts-fixed-page #account-back-button {
  background: #5f6b76;
  border-color: #33404c;
  color: #ffffff;
}

body.accounts-fixed-page #account-next-button,
body.accounts-fixed-page #save-account-button {
  background: #146b2e;
  border-color: #0f4e23;
  color: #ffffff;
}

body.accounts-fixed-page #cancel-account-edit {
  display: none;
}

body.accounts-fixed-page .account-form .form-grid {
  grid-template-columns: 1fr;
}

body.accounts-entry-mode .account-flow-cards,
body.accounts-entry-mode .invoice-wizard-panel,
body.accounts-entry-mode .bank-review-panel,
body.accounts-entry-mode .accounts-list-panel {
  display: none;
}

body.accounts-entry-mode .accounts-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
  min-height: 62vh;
  margin-top: 40px;
  padding-bottom: 80px;
}

body.accounts-entry-mode .account-form {
  position: static;
  top: auto;
  max-width: 820px;
  margin-inline: auto;
}

body.accounts-entry-mode .account-form.entity-panel {
  padding: clamp(28px, 4vw, 44px);
  border-radius: 12px;
  box-shadow:
    0 2px 0 rgba(30, 37, 48, 0.16),
    0 18px 36px rgba(30, 37, 48, 0.14);
}

body.accounts-entry-mode .account-form .section-heading {
  margin-bottom: 8px;
}

body.accounts-fixed-page .account-form .form-half,
body.accounts-fixed-page .account-form .form-wide {
  grid-column: 1 / -1;
}

body.accounts-fixed-page .account-step-guidance {
  padding: 22px 24px;
}

body.accounts-fixed-page #account-step-title {
  font-size: 32px;
}

body.accounts-fixed-page #account-step-description {
  display: block;
}

body.accounts-fixed-page .account-form label,
body.accounts-fixed-page .invoice-person-picker,
body.accounts-fixed-page .accounts-search-filter,
body.accounts-fixed-page .accounts-status-filter {
  display: grid;
  gap: 10px;
}

body.accounts-fixed-page .account-step-guidance,
body.accounts-fixed-page .invoice-preview-sheet,
body.accounts-fixed-page .invoice-preview-meta > div,
body.accounts-fixed-page .invoice-preview-parties > div,
body.accounts-fixed-page .invoice-preview-total > div,
body.accounts-fixed-page .bank-transaction-details,
body.accounts-fixed-page .team-member-row,
body.accounts-fixed-page .mail-server-fieldset {
  border: 1px solid var(--brand-deep);
  background: #fffefa;
  box-shadow: 0 8px 18px rgba(30, 37, 48, 0.08);
}

body.accounts-fixed-page .button,
body.accounts-fixed-page .topbar-button,
body.accounts-fixed-page .topbar-link,
body.accounts-fixed-page .account-flow-card,
body.accounts-fixed-page .account-compact-row,
body.accounts-fixed-page .account-compact-header > button,
body.accounts-fixed-page .account-entity-link,
body.accounts-fixed-page .invoice-kind-button,
body.accounts-fixed-page .invoice-tax-button,
body.accounts-fixed-page .file-add-button {
  border: 2px solid var(--brand-deep);
  box-shadow:
    0 5px 0 #141922,
    0 12px 18px rgba(30, 37, 48, 0.14);
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body.accounts-fixed-page .account-safety-net {
  position: fixed;
  right: 24px;
  bottom: 112px;
  z-index: 1300;
}

body.accounts-fixed-page .accounts-floating-actions {
  position: fixed;
  left: 50%;
  bottom: 112px;
  z-index: 1240;
  width: min(calc(100% - 48px), 820px);
  padding: 12px 14px;
  border: 1px solid rgba(30, 37, 48, 0.14);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.82);
  box-shadow:
    0 1px 0 rgba(30, 37, 48, 0.10),
    0 12px 26px rgba(30, 37, 48, 0.12);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

body.accounts-fixed-page .topbar-menu > .account-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

body.accounts-fixed-page .topbar-menu > .account-chip[hidden] {
  display: none;
}

body.accounts-fixed-page .account-chip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(30, 37, 48, 0.18);
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(30, 37, 48, 0.10),
    0 8px 16px rgba(30, 37, 48, 0.12);
}

body.accounts-fixed-page .account-chip-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1e2530;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

body.accounts-fixed-page .account-chip-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  display: grid;
  gap: 12px;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid rgba(30, 37, 48, 0.14);
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.98);
  box-shadow:
    0 2px 0 rgba(30, 37, 48, 0.10),
    0 14px 28px rgba(30, 37, 48, 0.14);
}

body.accounts-fixed-page .account-chip-popover-meta {
  display: grid;
  gap: 4px;
}

body.accounts-fixed-page .account-chip-popover-label {
  color: #364352;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.accounts-fixed-page .topbar-menu > .account-chip #account-name {
  min-width: 0;
  color: #364352;
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.accounts-fixed-page .topbar-menu > .account-chip #logout-button {
  min-width: 86px;
  min-height: 42px;
  padding: 8px 12px;
  border-width: 1px;
  background: transparent;
  color: #1e2530;
  box-shadow: none;
  font-size: 15px;
}

body.accounts-fixed-page .account-assistance-button {
  min-height: 72px;
  min-width: 240px;
  padding: 18px 24px;
  border: 3px solid #1e2530;
  border-radius: 12px;
  background: #1e2530;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  box-shadow:
    0 5px 0 #141922,
    0 16px 28px rgba(30, 37, 48, 0.24);
}

body.accounts-fixed-page .account-assistance-button:hover,
body.accounts-fixed-page .account-assistance-button:focus-visible {
  background: #0047a8;
  color: #ffffff;
  outline: 4px solid rgba(0, 71, 168, 0.28);
  outline-offset: 4px;
}

body.accounts-fixed-page .button-primary,
body.accounts-fixed-page .button-secondary,
body.accounts-fixed-page .topbar-button,
body.accounts-fixed-page .topbar-link,
body.accounts-fixed-page .account-flow-card,
body.accounts-fixed-page .account-compact-row,
body.accounts-fixed-page .invoice-kind-button,
body.accounts-fixed-page .invoice-tax-button {
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

body.accounts-fixed-page .button-primary {
  background: var(--brand);
  color: #ffffff;
}

body.accounts-fixed-page .button-secondary,
body.accounts-fixed-page .topbar-button,
body.accounts-fixed-page .invoice-kind-button,
body.accounts-fixed-page .invoice-tax-button {
  background: #fffefa;
  color: var(--brand-deep);
}

body.accounts-fixed-page .topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  min-height: 3.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: 8px;
  background: #fffefa;
  color: var(--brand-deep);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

body.accounts-fixed-page .account-flow-card {
  background: #1e2530;
  color: #ffffff;
  min-height: 18rem;
}

body.accounts-fixed-page .account-flow-card,
body.accounts-fixed-page .account-compact-row {
  cursor: pointer;
}

body.accounts-fixed-page .account-compact-header > button {
  min-height: 3.75rem;
  padding: 0.95rem 0.75rem;
  border-radius: 8px;
  background: #fffefa;
  color: var(--brand-deep);
}

body.accounts-fixed-page .account-record-actions .button,
body.accounts-fixed-page .bank-transaction-actions .button,
body.accounts-fixed-page .bank-smart-suggestion-row .button,
body.accounts-fixed-page .invoice-wizard-actions .button,
body.accounts-fixed-page .person-modal-actions .button,
body.accounts-fixed-page .accounts-record-controls .button,
body.accounts-fixed-page .attachments-grid .button,
body.accounts-fixed-page .account-form .button {
  min-height: 4.25rem;
  min-width: 10rem;
  padding: 0.95rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.15;
}

body.accounts-fixed-page .account-flow-card:active,
body.accounts-fixed-page .button:active,
body.accounts-fixed-page .topbar-link:active,
body.accounts-fixed-page .account-compact-row:active,
body.accounts-fixed-page .account-compact-header > button:active,
body.accounts-fixed-page .account-entity-link:active,
body.accounts-fixed-page .invoice-kind-button:active,
body.accounts-fixed-page .invoice-tax-button:active,
body.accounts-fixed-page .file-add-button:active {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 #141922,
    0 4px 10px rgba(30, 37, 48, 0.18);
}

body.accounts-fixed-page .button-primary:hover,
body.accounts-fixed-page .button-primary:focus-visible,
body.accounts-fixed-page .button-secondary:hover,
body.accounts-fixed-page .button-secondary:focus-visible,
body.accounts-fixed-page .topbar-link:hover,
body.accounts-fixed-page .topbar-link:focus-visible,
body.accounts-fixed-page .topbar-button:hover,
body.accounts-fixed-page .topbar-button:focus-visible {
  background: #0047a8;
  color: #ffffff;
  border-color: var(--brand-deep);
}

body.accounts-fixed-page .account-flow-card:hover,
body.accounts-fixed-page .account-flow-card:focus-visible {
  background: #0047a8;
  color: #ffffff;
}

body.accounts-fixed-page .account-form input,
body.accounts-fixed-page .account-form select,
body.accounts-fixed-page .account-form textarea,
body.accounts-fixed-page .login-form input,
body.accounts-fixed-page .accounts-search-filter input,
body.accounts-fixed-page .accounts-status-filter select,
body.accounts-fixed-page .account-form .checkbox-field {
  border: 2px solid var(--line);
  border-radius: 10px;
  background-color: #fffefa;
  box-shadow:
    0 3px 0 rgba(11, 31, 51, 0.18),
    0 10px 18px rgba(11, 31, 51, 0.08);
}

body.accounts-fixed-page .account-form input,
body.accounts-fixed-page .account-form select,
body.accounts-fixed-page .accounts-search-filter input,
body.accounts-fixed-page .accounts-status-filter select {
  padding: 0 20px;
}

body.accounts-fixed-page .account-form textarea {
  padding: 18px 20px;
}

body.accounts-fixed-page .account-form input[name="amount"],
body.accounts-fixed-page .account-form input[name="amountOriginal"],
body.accounts-fixed-page .account-form input[name="amountConverted"],
body.accounts-fixed-page #invoice-total-price {
  min-height: 72px;
  font-size: 24px;
  font-weight: 800;
}

body.accounts-fixed-page .account-form .checkbox-field {
  min-height: 64px;
  padding: 14px 18px;
}

body.accounts-fixed-page .account-form .checkbox-field input {
  width: 28px;
  min-height: 28px;
}

body.accounts-fixed-page .account-form input:focus,
body.accounts-fixed-page .account-form select:focus,
body.accounts-fixed-page .account-form textarea:focus,
body.accounts-fixed-page .accounts-search-filter input:focus-visible,
body.accounts-fixed-page .accounts-status-filter select:focus-visible {
  border: 3px solid var(--brand);
  box-shadow:
    0 0 0 4px rgba(0, 71, 168, 0.16),
    0 3px 0 rgba(11, 31, 51, 0.18),
    0 10px 18px rgba(11, 31, 51, 0.08);
}

body.accounts-fixed-page .invoice-wizard-progress span,
body.accounts-fixed-page .account-wizard-progress span {
  border: 2px solid var(--brand-deep);
  background: #fffefa;
}

body.accounts-fixed-page .invoice-wizard-progress span[data-active="true"],
body.accounts-fixed-page .account-wizard-progress span[data-active="true"],
body.accounts-fixed-page .invoice-kind-button[data-active="true"],
body.accounts-fixed-page .invoice-tax-button[data-active="true"] {
  border-color: var(--brand-deep);
  background: var(--brand);
  color: #ffffff;
}

body.accounts-fixed-page .invoice-wizard-progress span[data-complete="true"],
body.accounts-fixed-page .account-wizard-progress span[data-complete="true"] {
  border-color: var(--brand-deep);
  background: #0047a8;
  color: #ffffff;
}

body.accounts-fixed-page .account-status-badge[data-status="overdue"] {
  border-color: #6f1f16;
  background: #9f2d20;
  color: #ffffff;
}

body.accounts-fixed-page .account-status-badge[data-status="due"] {
  border-color: #1e2530;
  background: #1e2530;
  color: #ffffff;
}

body.accounts-fixed-page .account-status-badge[data-status="paid"] {
  border-color: #12422f;
  background: #145a24;
  color: #ffffff;
}

body.accounts-fixed-page .account-status-badge[data-status="draft"],
body.accounts-fixed-page .account-status-badge[data-status="accrued"],
body.accounts-fixed-page .account-status-badge[data-status="unknown"] {
  border-color: #22384d;
  background: #22384d;
  color: #ffffff;
}

body.accounts-fixed-page .button:focus-visible,
body.accounts-fixed-page .account-form input:focus-visible,
body.accounts-fixed-page .account-form select:focus-visible,
body.accounts-fixed-page .account-form textarea:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .workspace-hero {
    grid-template-columns: 1fr;
  }

  .accounts-layout {
    grid-template-columns: 1fr;
  }

  .talk-layout {
    grid-template-columns: 1fr;
  }

  .admin-users-layout {
    grid-template-columns: 1fr;
  }

  .paye-layout {
    grid-template-columns: 1fr;
  }

  .accounts-fixed-page .accounts-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "records"
      "form";
  }

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

  .bank-review-panel,
  .bank-transaction-details dl,
  .bank-transaction-actions,
  .bank-smart-suggestion-row,
  body.accounts-fixed-page .dashboard-summary-grid,
  body.accounts-fixed-page .dashboard-quick-actions > div {
    grid-template-columns: 1fr;
  }

  body.accounts-fixed-page .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
  }

  body.accounts-fixed-page .dashboard-quick-actions > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  body.accounts-fixed-page .account-chip {
    width: auto;
  }

  .invoice-wizard-progress,
  .invoice-kind-toggle,
  .invoice-person-row,
  .invoice-tax-toggle,
  #invoice-wizard-form {
    grid-template-columns: 1fr;
  }

  .invoice-live-preview,
  #invoice-wizard-form > .invoice-wizard-step,
  #invoice-wizard-form > .invoice-wizard-actions,
  #invoice-wizard-form > .form-status {
    grid-column: 1;
  }

  .invoice-live-preview {
    grid-row: auto;
    position: static;
  }

  .invoice-add-person-button,
  .invoice-wizard-actions .button,
  .invoice-tax-toggle,
  .person-modal-actions .button {
    width: 100%;
  }

  .invoice-preview-header {
    grid-template-columns: 1fr;
  }

  .paye-totals-grid,
  .paye-result-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .invoice-review dl > div {
    grid-template-columns: 1fr;
  }

  .accounts-fixed-page .account-form {
    position: static;
  }

  .form-grid,
  .account-record dl,
  .attachments-grid,
  .accounts-record-controls,
  .team-member-add,
  .provider-auth-grid,
  .applet-access-grid,
  .talk-input-zone,
  .talk-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accounts-fixed-page .form-grid,
  .accounts-fixed-page .attachments-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .paye-page .paye-form .form-grid,
  .paye-form .account-record-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .task-form,
  .task-form-fieldset,
  .task-source-details {
    grid-template-columns: 1fr;
  }

  .account-review dl {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
    border-radius: 28px;
    flex-direction: column;
  }

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

  .dashboard-panel-large {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: auto;
  }

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

@media (max-width: 960px) and (min-width: 721px) {
  .accounts-fixed-page .accounts-record-controls {
    grid-template-columns: 130px 1fr 180px;
  }

  .contact-register-modal .contact-register-form .form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.mail-admin-page {
  padding-bottom: 128px;
}

.mail-admin-panel {
  display: grid;
  gap: 22px;
}

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

.mail-admin-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 230px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 18px 46px rgba(6, 41, 47, 0.08);
}

.mail-admin-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.mail-admin-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mail-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: end;
}

.mail-admin-actions .button {
  min-width: 96px;
}

.mail-admin-interval-field {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.mail-admin-interval-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand-deep);
  background: #fff;
  font-weight: 900;
}

.mail-admin-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: min(82vh, 860px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.mail-admin-modal::backdrop {
  background: rgba(6, 31, 36, 0.52);
  backdrop-filter: blur(8px);
}

.mail-admin-modal-panel {
  display: grid;
  gap: 18px;
  max-height: min(82vh, 860px);
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.mail-admin-modal-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.mail-admin-modal-heading h2 {
  margin: 4px 0 0;
}

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

.mail-admin-fields label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.mail-admin-fields input,
.mail-admin-fields select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
}

.mail-password-control {
  position: relative;
  display: block;
}

.mail-password-control input {
  padding-right: 48px;
}

.mail-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
}

.mail-password-toggle:hover,
.mail-password-toggle:focus-visible,
.mail-password-toggle[data-visible="true"] {
  border-color: var(--line);
  color: var(--brand-deep);
  background: rgba(0, 169, 157, 0.08);
  outline: none;
}

.mail-password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mail-admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mail-admin-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
}

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

.mail-admin-table th {
  color: var(--brand-deep);
  background: rgba(0, 169, 157, 0.08);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-usage-page {
  padding-bottom: 128px;
}

.admin-usage-panel {
  display: grid;
  gap: 22px;
}

.admin-usage-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.admin-usage-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-usage-metrics article,
.admin-usage-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 14px 34px rgba(6, 41, 47, 0.08);
}

.admin-usage-metrics span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-usage-metrics strong {
  color: var(--brand-deep);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
}

.admin-usage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.admin-usage-section {
  display: grid;
  gap: 14px;
}

.compact-heading {
  margin-bottom: 0;
}

.admin-usage-card-list {
  display: grid;
  gap: 10px;
}

.admin-usage-card h3 {
  margin: 0;
  color: var(--brand-deep);
  font-size: 1.15rem;
}

.admin-usage-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.admin-usage-card dl div {
  display: grid;
  grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
}

.admin-usage-card dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-usage-card dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-usage-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-usage-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #fff;
}

.admin-usage-table th,
.admin-usage-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-usage-table th {
  color: var(--brand-deep);
  background: rgba(0, 169, 157, 0.08);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.web-publisher-page {
  padding-bottom: 128px;
}

.web-publisher-panel,
.web-publisher-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 14px 34px rgba(6, 41, 47, 0.08);
}

.web-publisher-form,
.web-publisher-zone-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto auto;
  gap: 12px;
  align-items: end;
}

.web-publisher-zone-form {
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
}

.web-publisher-form label,
.web-publisher-zone-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.web-publisher-form input,
.web-publisher-zone-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
}

.web-publisher-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.web-publisher-wide {
  grid-column: 1 / -1;
}

.web-publisher-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.web-publisher-card dl,
.web-publisher-history-row dl,
.web-publisher-modal dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.web-publisher-card dl div,
.web-publisher-modal dl div {
  display: grid;
  grid-template-columns: minmax(110px, 0.32fr) minmax(0, 1fr);
  gap: 10px;
}

.web-publisher-card dt,
.web-publisher-history-row dt,
.web-publisher-modal dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.web-publisher-card dd,
.web-publisher-history-row dd,
.web-publisher-modal dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.web-publisher-summary-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.web-publisher-summary-list div {
  padding: 12px;
  border: 1px solid rgba(0, 96, 96, 0.12);
  border-radius: 8px;
  background: rgba(0, 169, 157, 0.06);
}

.web-publisher-summary-list dd {
  color: var(--brand-deep);
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.web-publisher-file-list,
.web-publisher-history-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.web-publisher-history-list {
  max-height: 65vh;
}

.web-publisher-file-row,
.web-publisher-history-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(0, 96, 96, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  overflow-wrap: anywhere;
}

.web-publisher-file-row strong,
.web-publisher-history-row strong {
  color: var(--brand-deep);
}

.web-publisher-file-row span,
.web-publisher-history-row span,
.web-publisher-history-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.web-publisher-option-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.web-publisher-option-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.web-publisher-option-row input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  accent-color: var(--brand-teal);
}

.web-publisher-modal {
  width: min(920px, calc(100vw - 32px));
}

.global-search-modal {
  width: min(920px, calc(100vw - 32px));
}

.global-search-panel {
  max-height: min(82vh, 860px);
}

.global-search-results {
  display: grid;
  gap: 10px;
}

.global-search-result {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.global-search-result:hover,
.global-search-result:focus-visible {
  border-color: rgba(0, 169, 157, 0.45);
  box-shadow: 0 14px 34px rgba(6, 41, 47, 0.1);
  outline: 0;
}

.global-search-result strong {
  color: var(--brand-deep);
  font-size: 1.05rem;
}

.global-search-result span:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.finances-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.finances-wizard-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.finances-records-panel {
  min-height: min(72vh, 860px);
}

.finance-card {
  grid-template-columns: minmax(130px, 1.1fr) minmax(90px, 0.6fr) minmax(140px, 1fr) minmax(110px, 0.7fr) minmax(110px, 0.75fr) minmax(110px, 0.75fr);
  gap: 12px;
  min-height: 42px;
  padding: 9px 14px;
}

.finance-card strong,
.finance-card span,
.finance-card time {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-card strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
}

main.inbox-page {
  padding-bottom: 128px;
}

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

.entities-page .contact-register-workspace {
  grid-template-columns: 1fr;
}

.entities-page .contact-register-workspace .notes-wizard-panel {
  display: none;
}

.entities-page .account-chip {
  display: none;
}

.entities-page .topbar {
  border-radius: 0;
  bottom: 0;
}

.talk-page .account-chip {
  display: none;
}

.talk-page .notes-wizard-panel {
  display: none;
}

.talk-page .topbar {
  border-radius: 0;
  bottom: 0;
}

body.talk-page .notes-modal {
  width: 100%;
  max-height: 100dvh;
  height: 100dvh;
  border-radius: 0;
  margin: 0;
  top: 0;
}

body.entities-page .notes-modal {
  width: 100%;
  max-height: 100dvh;
  height: 100dvh;
  border-radius: 0;
  margin: 0;
  top: 0;
}

body.entities-page .notes-modal::backdrop,
body.talk-page .notes-modal::backdrop {
  background: rgba(4, 18, 20, 0.62);
}

body.entities-page .notes-modal-panel,
body.talk-page .notes-modal-panel {
  max-height: 100dvh;
  height: 100dvh;
  border-radius: 0;
  border: none;
}

body.inbox-page .inbox-workspace {
  grid-template-columns: 1fr;
}

body.inbox-page .inbox-workspace .notes-wizard-panel {
  display: none;
}

body.inbox-page .account-chip {
  display: none;
}



.inbox-wizard-panel {
  min-height: auto;
}

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

.inbox-list-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  min-height: calc(100dvh - 320px);
}

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

.inbox-account-fields label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.inbox-delete-modal {
  width: min(820px, calc(100% - 32px));
}

.inbox-delete-modal-panel {
  gap: 16px;
}

.inbox-delete-tools {
  display: grid;
  gap: 10px;
}

.inbox-delete-select-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-deep);
  font-size: 0.84rem;
  font-weight: 900;
}

.inbox-delete-select-all input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-teal);
}

.inbox-delete-records {
  max-height: min(48vh, 460px);
}

.inbox-account-fields select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
}

.inbox-message-list {
  display: grid;
  gap: 8px;
}

.inbox-message-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-strong);
  text-align: left;
}

.inbox-message-content {
  display: grid;
  grid-template-columns: minmax(150px, 0.78fr) minmax(0, 1.35fr) minmax(140px, 0.78fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.inbox-message-card:hover,
.inbox-message-card:focus-visible,
.inbox-message-card[aria-pressed="true"] {
  border-color: rgba(0, 169, 157, 0.45);
  box-shadow: 0 14px 34px rgba(6, 41, 47, 0.1);
  outline: none;
}

.inbox-message-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  font-size: 1rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.inbox-message-from,
.inbox-message-account,
.inbox-message-date {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.inbox-message-date {
  text-align: right;
}

.inbox-message-delete {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.inbox-message-delete svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.inbox-message-delete:hover,
.inbox-message-delete:focus-visible {
  border-color: rgba(215, 25, 32, 0.22);
  background: rgba(215, 25, 32, 0.1);
  color: #9f2d20;
  outline: none;
}

.inbox-preview-modal-panel {
  width: 100%;
  min-width: 0;
  max-height: min(86vh, 920px);
  overflow: hidden;
}

.inbox-preview-modal {
  width: 75vw;
  max-width: 75vw;
  overflow: hidden;
}

.inbox-preview-modal.is-fullscreen {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
}

.inbox-preview-modal.is-fullscreen .inbox-preview-modal-panel {
  min-height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
}

.inbox-preview-modal.is-fullscreen .inbox-preview-body {
  max-height: calc(100dvh - 260px);
}

.inbox-preview-modal.is-fullscreen .inbox-message-frame {
  min-height: calc(100dvh - 292px);
}

.inbox-unread-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--brand-coral);
}

.inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inbox-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 112px;
  min-width: 112px;
  min-height: 44px;
  white-space: nowrap;
}

.inbox-actions #inbox-preview-fullscreen {
  flex-basis: 126px;
  min-width: 126px;
}

.inbox-actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inbox-actions-primary .button {
  flex: 0 0 auto;
}

#inbox-actions-more-toggle {
  display: none;
}

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

.inbox-actions-more .button {
  flex: 0 0 112px;
}

.inbox-preview {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.inbox-preview-header {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.inbox-preview-header h3 {
  margin: 0;
  font-size: 1.35rem;
}

.inbox-preview-header dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.inbox-preview-header dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}

.inbox-preview-header dt {
  color: var(--muted);
  font-weight: 800;
}

.inbox-preview-header dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.inbox-preview-body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: 48vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: normal;
}

.inbox-rich-body,
.inbox-rich-body * {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inbox-rich-body {
  padding: 0;
  overflow: hidden;
}

.inbox-message-frame {
  display: block;
  width: 100%;
  min-height: 48vh;
  border: 0;
  background: #fff;
}

.inbox-compose-form {
  width: min(820px, calc(100vw - 32px));
}

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

.inbox-compose-grid label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.inbox-compose-grid .form-wide {
  grid-column: 1 / -1;
}

.inbox-compose-grid input,
.inbox-compose-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
}

.inbox-compose-grid textarea {
  min-height: 260px;
  resize: vertical;
  line-height: 1.45;
}

@media (max-width: 880px) {
  .mail-admin-grid,
  .mail-admin-fields,
  .admin-usage-metrics,
  .admin-usage-grid,
  .inbox-account-fields,
  .inbox-compose-grid,
  .web-publisher-form,
  .web-publisher-zone-form,
  .web-publisher-results,
  .web-publisher-option-row {
    grid-template-columns: 1fr;
  }

  .admin-usage-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .inbox-message-card {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
    min-height: 0;
    padding: 8px 10px;
  }

  .inbox-message-content {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .inbox-message-card strong,
  .inbox-message-from {
    min-height: 18px;
    line-height: 1.2;
  }

  .inbox-message-card strong {
    font-size: 0.92rem;
  }

  .inbox-message-from {
    font-size: 0.82rem;
  }

  .inbox-message-account,
  .inbox-message-date {
    display: none;
  }

  .inbox-message-delete {
    width: 32px;
    height: 32px;
  }

  .mail-admin-modal-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: center;
    gap: 8px;
    width: min(calc(100% - 20px), var(--max-width));
    min-height: 56px;
    padding: 6px 8px;
    border-radius: 999px;
    flex-direction: row;
  }

  .topbar-actions {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    gap: 2px;
    overflow-x: auto;
  }

  .topbar-menu {
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    justify-content: flex-end;
  }

  .account-chip {
    flex: 0 0 auto;
    margin-left: auto;
    width: auto;
    max-width: 42%;
    min-width: 0;
    padding: 3px;
  }

  .brand-mark {
    flex: 0 0 auto;
    min-width: 34px;
  }

  .brand-mark span,
  .topbar-breadcrumb-separator,
  .account-chip #account-name {
    display: none;
  }

  body:not(.home-page) .topbar {
    position: static;
    width: 100%;
    min-width: 0;
    margin-bottom: 8px;
    border-radius: 0;
    padding: 8px 12px;
    left: auto;
    bottom: auto;
    transform: none;
  }

  .topbar-link,
  .topbar-button {
    padding: 10px 8px;
    max-width: 104px;
    overflow: hidden;
    font-size: 0.64rem;
    text-overflow: ellipsis;
  }

  .topbar-button {
    max-width: none;
  }

  body.accounts-fixed-page .account-safety-net {
    right: 16px;
    bottom: 336px;
    left: 16px;
  }

  body.accounts-fixed-page .accounts-floating-actions {
    bottom: 178px;
    width: min(calc(100% - 32px), 820px);
  }

  body.accounts-fixed-page .account-assistance-button {
    width: 100%;
    min-width: 0;
  }

  .page-shell {
    padding-top: 12px;
    padding-bottom: 104px;
  }

  .workspace-hero {
    min-height: 0;
  }

  .search-field {
    min-width: 0;
  }

  .dashboard-card {
    margin-bottom: 12px;
    padding: 16px;
    border-radius: 12px;
  }

  .dashboard-heading {
    align-items: start;
    flex-direction: column;
    margin-bottom: 14px;
  }

  .dashboard-refresh {
    text-align: left;
  }

  .dashboard-grid,
  .dashboard-metrics-row {
    grid-template-columns: 1fr;
  }

  .dashboard-panel {
    min-height: 0;
    padding: 14px;
  }

  .dashboard-task-row,
  .dashboard-bar-row {
    grid-template-columns: 1fr;
  }

  .dashboard-bar-row > strong {
    text-align: left;
  }

  .group-stack {
    gap: 12px;
  }

  .applet-group {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
  }

  .applet-group .section-heading {
    position: relative;
    display: grid;
    gap: 4px;
    max-width: none;
    min-height: 74px;
    margin-bottom: 0;
    padding: 14px 48px 14px 16px;
    cursor: pointer;
  }

  .applet-group .section-heading:focus-visible {
    outline: 3px solid rgba(0, 169, 157, 0.32);
    outline-offset: -3px;
  }

  .applet-group .section-heading::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 18px;
    color: var(--brand-teal);
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-50%);
  }

  .applet-group.is-expanded .section-heading::after {
    content: "-";
  }

  .applet-group .section-heading .eyebrow {
    margin-bottom: 0;
    font-size: 0.62rem;
  }

  .applet-group .section-heading h2 {
    margin-bottom: 0;
    font-size: 1.12rem;
    line-height: 1.2;
  }

  .applet-group .section-heading p:last-child {
    display: none;
    margin: 4px 0 0;
    line-height: 1.45;
  }

  .applet-group.is-expanded .section-heading p:last-child {
    display: block;
  }

  .applet-grid {
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  .applet-group:not(.is-expanded) .applet-grid {
    display: none;
  }

  .applet-card {
    grid-template-columns: 36px minmax(0, 1fr) 22px;
    gap: 12px;
    min-height: 76px;
    padding: 1rem;
    align-items: center;
  }

  .applet-card.is-expanded {
    min-height: 152px;
    align-items: start;
    box-shadow: 0 18px 48px rgba(0, 82, 84, 0.12);
  }

  .applet-icon {
    width: 36px;
    height: 36px;
  }

  .applet-status {
    margin-bottom: 4px;
    font-size: 0.62rem;
  }

  .applet-card strong {
    margin-bottom: 0;
    font-size: 1rem;
  }

  .applet-card .applet-content > span:last-child {
    display: none;
    margin-top: 8px;
    line-height: 1.45;
  }

  .applet-card.is-expanded .applet-content > span:last-child {
    display: block;
  }

  .applet-arrow {
    align-self: center;
    transition: transform 160ms ease;
  }

  .applet-card.is-expanded .applet-arrow {
    align-self: start;
    transform: rotate(90deg);
  }

  .form-grid,
  .account-record dl,
  .accounts-record-controls,
  .attachments-grid,
  .account-compact-header,
  .account-compact-row,
  .team-member-add,
  .team-member-row,
  .provider-auth-grid,
  .applet-access-grid,
  .talk-input-zone,
  .talk-actions {
    grid-template-columns: 1fr;
  }

  .paye-totals-grid,
  .paye-result-panels,
  .paye-metric-row,
  .paye-result-panel-wide .paye-metric-row,
  .paye-save-row,
  .paye-page .paye-form .form-grid,
  .paye-form .account-record-actions {
    grid-template-columns: 1fr;
  }

  .paye-result-panel-wide {
    grid-column: span 1;
  }

  .paye-metric-row strong {
    text-align: left;
  }

  .form-half {
    grid-column: 1 / -1;
  }

  .contact-register-name-field,
  .contact-register-number-field {
    grid-column: 1 / -1;
  }

  .contact-register-contact-area {
    grid-template-columns: 1fr;
  }

  .contact-register-details-area {
    grid-template-columns: 1fr;
  }

  .contact-register-ownership-area {
    grid-template-columns: 1fr;
  }

  .contact-method-row {
    grid-template-columns: 1fr;
  }

  .entity-address-row {
    grid-template-columns: 1fr;
  }

  .contact-address-form {
    grid-template-columns: 1fr;
  }

  .account-form .contact-method-preferred,
  .contact-method-remove,
  .address-area-actions {
    width: 100%;
  }

  .contact-register-list-panel,
  .contact-register-list,
  .contact-register-record,
  .contact-register-modal,
  .contact-register-modal-panel,
  .contact-register-modal .contact-register-form,
  .contact-register-modal .contact-register-form .form-grid,
  .contact-register-contact-area,
  .contact-register-address-area,
  .contact-register-details-area,
  .contact-register-ownership-area,
  .contact-method-list,
  .contact-method-row,
  .entity-address-list,
  .entity-address-row {
    min-width: 0;
    max-width: 100%;
  }

  .contact-register-record {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 0;
    padding: 14px;
  }

  .contact-register-record strong,
  .contact-register-record span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .finance-card strong,
  .finance-card span,
  .finance-card time {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .finance-card {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 0;
    padding: 14px;
  }

  .contact-register-modal {
    width: min(calc(100vw - 20px), 860px);
  }

  .contact-register-modal-panel {
    padding: 18px;
  }

  .contact-modal-wizard {
    gap: 8px;
    padding: 6px 8px;
    background: rgba(251, 255, 253, 0.84);
  }

  .contact-modal-wizard-button {
    padding: 6px 8px;
    font-size: 0.65rem;
  }

  .contact-register-modal .contact-register-form .form-grid {
    padding-right: 0;
  }

  .task-board {
    grid-template-columns: 1fr;
  }

  .notes-workspace,
  .notes-modal .notes-form,
  .notes-find-tools,
  .notes-assign-tools,
  .notes-sort-tools,
  .notes-sort-actions,
  .note-card-heading {
    grid-template-columns: 1fr;
  }

  .notes-wizard-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 40px;
    gap: 6px;
    min-height: 0;
    padding: 8px;
  }

  .admin-users-wizard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #entities-wizard-grid {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }

  .tasks-wizard-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .tasks-wizard-grid .notes-wizard-widget {
    min-width: 0;
    padding-inline: 1px;
    font-size: 0.5rem;
  }

  .notes-wizard-widget {
    min-height: 0;
    height: 100%;
    padding: 8px 2px;
    font-size: 0.58rem;
    letter-spacing: 0;
  }

  .notes-wizard-widget[data-mobile-label] {
    font-size: 0;
  }

  .notes-wizard-widget[data-mobile-label]::before {
    content: attr(data-mobile-label);
    margin-right: 0;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
  }

  .task-form-fieldset,
  .task-source-details {
    grid-template-columns: 1fr;
  }

  .task-list-card {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 0;
    padding: 14px;
  }

  .admin-user-record-card {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 0;
    padding: 14px;
  }

  .admin-user-record-card strong,
  .admin-user-record-card span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-user-modal-panel {
    width: min(calc(100vw - 20px), 1040px);
  }

  .admin-user-modal-summary {
    grid-template-columns: 1fr;
  }

  .tasks-status-list {
    grid-template-columns: 1fr;
  }

  .task-status-card {
    grid-template-columns: minmax(0, 1fr) 28px;
    padding: 8px 10px;
  }

  .task-list-card strong,
  .task-list-card span,
  .task-list-card time {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .contact-scraper-modal {
    width: min(calc(100vw - 20px), 860px);
  }

  .contact-delete-modal {
    width: min(calc(100vw - 20px), 760px);
  }

  .contact-delete-layout,
  .contact-scraper-layout,
  .contact-scraper-comparison-row {
    grid-template-columns: 1fr;
  }

  .contact-delete-layout,
  .contact-scraper-layout {
    min-height: 0;
  }

  .account-wizard-progress,
  .account-wizard-actions {
    grid-template-columns: 1fr;
  }

  /* ── inbox preview: mobile fullscreen ── */
  .inbox-preview-modal.is-fullscreen .section-heading {
    display: none;
  }

  .inbox-preview-header .applet-status {
    display: none;
  }

  body:not(.home-page):not(.entities-page):not(.inbox-page):not(.talk-page) .toolbar {
    position: fixed;
    bottom: calc(max(24px, env(safe-area-inset-bottom)) + 140px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: min(calc(100% - 20px), var(--max-width));
    border-radius: 28px;
  }

  body:not(.home-page):not(.entities-page):not(.inbox-page):not(.talk-page) .notes-wizard-panel {
    position: fixed;
    bottom: calc(max(24px, env(safe-area-inset-bottom)) + 76px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 19;
    width: min(calc(100% - 20px), var(--max-width));
    padding: 8px;
  }

  body:not(.home-page):not(.entities-page):not(.inbox-page):not(.talk-page) .notes-wizard-panel .section-heading {
    display: none;
  }

  body:not(.home-page):not(.entities-page):not(.inbox-page):not(.talk-page) .notes-wizard-panel .form-status {
    display: none;
  }

  .inbox-list-panel,
  .contact-register-list-panel {
    padding-bottom: 160px;
  }

  #inbox-preview-fullscreen {
    display: none;
  }

  .inbox-actions {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding-bottom: 6px;
    margin-bottom: 4px;
  }

  .inbox-actions-primary {
    flex: 1;
  }

  .inbox-actions-primary .button {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
  }

  #inbox-actions-more-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .inbox-actions-more {
    display: none;
    width: 100%;
  }

  .inbox-actions-more.is-open {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }

  .inbox-actions-more .button {
    flex: 1;
    min-width: 80px;
    font-size: 0.82rem;
  }

  .inbox-preview-modal.is-fullscreen .inbox-preview-body {
    max-height: calc(100dvh - 160px);
  }

  .inbox-preview-modal.is-fullscreen .inbox-message-frame {
    min-height: calc(100dvh - 200px);
  }

  .inbox-preview-modal-panel {
    max-height: 100dvh;
  }

  .notes-modal {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    margin: 0;
    top: 0;
  }

  .notes-modal::backdrop {
    background: rgba(4, 18, 20, 0.62);
  }

  .notes-modal-panel {
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    border: none;
  }
}

@media (max-width: 720px) {
  body.entities-page .topbar {
    position: fixed !important;
    bottom: -10px;
    left: 0;
    right: 0;
    transform: none;
    z-index: 20;
    width: 100%;
    border-radius: 0;
    padding: 6px 8px;
  }

  .entities-page .toolbar {
    position: sticky;
    top: 0;
    width: 100%;
    margin: 0 0 10px;
    padding: 8px 14px;
    border-radius: 999px;
    z-index: 20;
  }

  .entities-page .toolbar .search-field {
    padding: 0 10px;
  }

  .entities-page .notes-wizard-panel {
    display: none;
  }

  .entities-page .page-shell {
    padding-bottom: calc(104px + 56px);
  }

  .entities-page .contact-register-list-panel {
    padding-bottom: 0;
  }

  .entities-page .entity-card-delete {
    opacity: 0.5;
  }

  .entities-page .topbar-actions {
    justify-content: space-evenly;
  }

  .entities-page .topbar-button[data-mobile-label] {
    font-size: 0;
    max-width: none;
    flex: 0 0 auto;
  }

  .entities-page .topbar-button[data-mobile-label]::before {
    content: attr(data-mobile-label);
    margin-right: 0;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
  }

  body.talk-page .topbar {
    position: fixed !important;
    bottom: -10px;
    left: 0;
    right: 0;
    transform: none;
    z-index: 20;
    width: 100%;
    border-radius: 0;
    padding: 6px 8px;
  }

  .talk-page .toolbar {
    position: sticky;
    top: 0;
    width: 100%;
    margin: 0 0 10px;
    padding: 8px 14px;
    border-radius: 999px;
    z-index: 20;
  }

  .talk-page .toolbar .search-field {
    padding: 0 10px;
  }

  .talk-page .page-shell {
    padding-bottom: calc(104px + 56px);
  }

  .talk-page .talk-list-panel {
    padding-bottom: 0;
  }

  .talk-page .topbar-actions {
    justify-content: space-evenly;
  }

  .talk-page .topbar-button[data-mobile-label] {
    font-size: 0;
    max-width: none;
    flex: 0 0 auto;
  }

  .talk-page .topbar-button[data-mobile-label]::before {
    content: attr(data-mobile-label);
    margin-right: 0;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
  }

  .talk-list {
    gap: 0;
  }

  .talk-conversation {
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    min-height: 58px;
    padding: 14px 0;
  }

  body.inbox-page .toolbar {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: min(calc(100% - 20px), var(--max-width));
  }

  body.inbox-page .inbox-list-panel {
    padding-bottom: 100px;
  }
}

.microsoft-oauth-section hr {
  margin: 16px 0;
  border: none;
  border-top: 1px solid var(--line);
}

.microsoft-oauth-section .panel-label {
  margin-bottom: 4px;
}

.oauth-status {
  margin-left: 10px;
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--muted);
}

.oauth-status.oauth-connected {
  color: var(--brand-teal);
}

.modal-close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
  z-index: 1;
}

.modal-close-x:hover {
  background: var(--hover);
  color: var(--text);
}
