html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --ink: #3a3937;
  --muted: #898479;
  --line: #e5d8d3;
  --accent: #9f8574;
  --accent-strong: #7f624f;
  --surface: #fffdfb;
  --surface-soft: #f4ecea;
  --surface-alt: #fbf7f4;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(159, 133, 116, 0.1) 0, transparent 24%),
    linear-gradient(180deg, #faf6f3 0%, var(--surface-soft) 100%);
}

.app-footer {
  margin-top: 1rem;
  padding: 0 0 1.1rem;
}

.app-footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid #e6d8d1;
  border-radius: 20px;
  background: rgba(255, 253, 251, 0.74);
  box-shadow: 0 10px 24px rgba(24, 34, 47, 0.04);
  backdrop-filter: blur(8px);
}

.app-footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65rem;
  min-width: 0;
}

.app-footer-mark {
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.app-footer-copy,
.app-footer-note {
  color: var(--muted);
  font-size: 0.8rem;
}

.app-footer-note {
  text-align: right;
}

.app-toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1600;
  display: grid;
  gap: 0.7rem;
  justify-items: end;
  pointer-events: none;
}

.app-toast {
  min-width: 280px;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border: 1px solid #e6d8d1;
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.96);
  box-shadow: 0 16px 36px rgba(58, 57, 55, 0.14);
  transform: translateY(10px);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(10px);
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast.is-success {
  border-color: rgba(106, 147, 118, 0.35);
}

.app-toast.is-warning {
  border-color: rgba(196, 152, 98, 0.4);
}

.app-toast.is-error {
  border-color: rgba(198, 113, 113, 0.42);
}

.app-toast-title {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
}

.app-toast-message {
  margin-top: 0.2rem;
  color: #65584f;
  font-size: 0.88rem;
  line-height: 1.45;
}

.app-toast-link {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.app-toast-link:hover,
.app-toast-link:focus {
  color: var(--accent);
  text-decoration: underline;
}

button,
.btn,
[type="button"],
[type="submit"],
[type="reset"] {
  transition:
    transform 140ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

button:hover,
.btn:hover,
[type="button"]:hover,
[type="submit"]:hover,
[type="reset"]:hover {
  transform: translateY(-1px);
}

button:active,
.btn:active,
[type="button"]:active,
[type="submit"]:active,
[type="reset"]:active {
  transform: translateY(0);
}

button:focus-visible,
.btn:focus-visible,
[type="button"]:focus-visible,
[type="submit"]:focus-visible,
[type="reset"]:focus-visible {
  box-shadow: 0 0 0 0.16rem rgba(159, 133, 116, 0.18);
}

.app-shell {
  max-width: 1680px;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.navbar {
  background: rgba(244, 236, 234, 0.86);
  backdrop-filter: blur(12px);
  border-bottom-color: #e6d8d1 !important;
  position: relative;
  z-index: 1100;
}

.navbar-collapse,
.navbar-nav,
.app-nav-dropdown {
  position: relative;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-logo {
  display: block;
  width: auto;
  height: 34px;
}

.brand-wordmark {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-nav-link {
  position: relative;
  color: var(--ink) !important;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 0.95rem !important;
}

.app-nav-link:hover,
.app-nav-link:focus {
  color: var(--accent) !important;
}

.app-nav-link.active {
  color: var(--accent-strong) !important;
}

.app-nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.35rem;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.app-nav-dropdown .dropdown-toggle::after {
  margin-left: 0.45rem;
  vertical-align: 0.18em;
}

.app-nav-dropdown-trigger {
  display: flex;
  align-items: center;
}

.app-nav-dropdown-trigger > .app-nav-link:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.app-nav-dropdown-toggle-mobile {
  display: none;
  border: 0;
  background: transparent;
  margin-left: auto;
  padding-left: 0.55rem !important;
  padding-right: 0.55rem !important;
}

.app-nav-dropdown-toggle-mobile:focus {
  box-shadow: none;
}

.app-nav-dropdown-menu {
  margin-top: 0.15rem;
  border: 1px solid rgba(197, 173, 156, 0.45);
  border-radius: 1rem;
  padding: 0.45rem;
  background: rgba(255, 252, 249, 0.98);
  box-shadow: 0 18px 34px rgba(24, 34, 47, 0.08);
  min-width: 14.5rem;
  z-index: 1200;
}

.app-nav-dropdown-menu .dropdown-item {
  border-radius: 0.75rem;
  padding: 0.65rem 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

.app-nav-dropdown-menu .dropdown-item:hover,
.app-nav-dropdown-menu .dropdown-item:focus {
  background: #fbf4ee;
  color: var(--accent-strong);
}

.app-nav-dropdown-menu .dropdown-item.active,
.app-nav-dropdown-menu .dropdown-item:active {
  background: #f1e2d6;
  color: var(--accent-strong);
}

@media (min-width: 768px) {
  .app-nav-dropdown:hover > .dropdown-menu,
  .app-nav-dropdown:focus-within > .dropdown-menu {
    display: block;
  }
}

@media (max-width: 767.98px) {
  .app-nav-dropdown-trigger {
    width: 100%;
  }

  .app-nav-dropdown-toggle-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .app-nav-dropdown-menu {
    position: static !important;
    transform: none !important;
    float: none;
    width: calc(100% - 1rem);
    margin: 0 0 0.55rem 0.5rem;
    box-shadow: 0 12px 24px rgba(24, 34, 47, 0.06);
  }

  .app-nav-dropdown-menu:not(.show) {
    display: none;
  }

  .app-nav-dropdown-menu.show {
    display: block;
  }
}

.app-userbar {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.app-user-presence {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.app-mobile-presence {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-right: 0.45rem;
  margin-right: 0.3rem;
  border-right: 1px solid rgba(220, 203, 195, 0.9);
}

.app-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid #dccbc3;
  background: linear-gradient(180deg, #fffdfb 0%, #f4ecea 100%);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.app-user-avatar-link {
  text-decoration: none;
}

.app-user-avatar-link:hover,
.app-user-avatar-link:focus {
  color: var(--accent-strong);
  border-color: #ccb7ab;
  background: linear-gradient(180deg, #fffaf7 0%, #efe3dd 100%);
}

.app-user-avatar-link:focus-visible {
  outline: none;
}

.app-user-avatar-button {
  appearance: none;
  padding: 0;
}

.app-user-avatar-button.dropdown-toggle::after {
  display: none;
}

.app-user-avatar-text {
  position: relative;
  z-index: 1;
}

.app-user-avatar-has-alert {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 0 1px rgba(214, 68, 68, 0.14);
}

.app-user-avatar-alert {
  position: absolute;
  top: 0.2rem;
  right: 0.12rem;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: #d44d4d;
  border: 2px solid #fffaf7;
  box-shadow: 0 0 0 1px rgba(212, 77, 77, 0.22);
}

.app-user-notification-dropdown-shell {
  position: relative;
}

.app-user-notification-dropdown {
  min-width: 18rem;
}

.app-user-notification-heading {
  list-style: none;
  padding: 0.35rem 0.8rem 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-user-notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-user-notification-copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.app-user-notification-copy strong {
  font-size: 0.9rem;
  font-weight: 700;
}

.app-user-notification-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
  white-space: normal;
}

.app-user-notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #f4ecea;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.app-user-avatar-secondary {
  width: 2.05rem;
  height: 2.05rem;
  font-size: 0.75rem;
  color: var(--muted);
  background: linear-gradient(180deg, #f8f2ef 0%, #efe4de 100%);
}

.app-user-avatar-mobile {
  width: 2.05rem;
  height: 2.05rem;
  font-size: 0.75rem;
  color: #4f6b8a;
  border-color: #c9d8e8;
  background: linear-gradient(180deg, #f3f8ff 0%, #e5eef9 100%);
}

.app-logout-form {
  margin: 0;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.dashboard-hero-copy,
.dashboard-date-card {
  background: rgba(255, 253, 251, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(24, 34, 47, 0.06);
}

.dashboard-hero-copy {
  flex: 1 1 auto;
  padding: 0.72rem 1rem;
}

.dashboard-hero-copy h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
  line-height: 0.95;
  flex: 0 0 auto;
}

.dashboard-hero-inline {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  min-height: 100%;
}

.dashboard-mantra {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.2;
}

.dashboard-date-card {
  min-width: 220px;
  padding: 0.72rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
}

.app-userbar-iconbtn {
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  border-color: #dccbc3;
  background: linear-gradient(180deg, #fffdfb 0%, #f4ecea 100%);
  font-size: 0.95rem;
  line-height: 1;
}

.app-userbar-iconbtn:hover,
.app-userbar-iconbtn:focus {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: #f6efeb;
}

.dashboard-financial-hidden [data-financial-sensitive] {
  filter: blur(8px);
  user-select: none;
  transition: filter 180ms ease;
}

.dashboard-financial-hidden [data-financial-sensitive] * {
  user-select: none;
}

.app-privacy-amounts-hidden [data-privacy-amount],
.app-privacy-amounts-hidden .amount-chip,
.app-privacy-amounts-hidden .client-dashboard-money-ok,
.app-privacy-amounts-hidden .client-dashboard-money-open,
.app-privacy-amounts-hidden .kpr-table tbody td:nth-child(5),
.app-privacy-amounts-hidden .kpr-table tbody td:nth-child(6),
.app-privacy-amounts-hidden .kpr-table tbody td:nth-child(7),
.app-privacy-amounts-hidden .kpr-table tfoot th:last-child,
.app-privacy-amounts-hidden .kpr-toolbar .list-meta span:last-child,
.app-privacy-amounts-hidden [data-financial-sensitive] {
  filter: blur(8px);
  user-select: none;
  transition: filter 180ms ease;
}

.app-privacy-contacts-hidden [data-contact-sensitive]:not([data-contact-privacy-ready="true"]) {
  color: transparent;
}

.contact-privacy-blurred {
  filter: blur(6px);
  user-select: none;
  transition: filter 180ms ease;
}

.dashboard-date-card strong {
  font-size: clamp(1.3rem, 2.1vw, 1.9rem);
  line-height: 1;
}

.dashboard-date-emoji {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.9em;
  transform: translateY(-0.02rem);
}

.dashboard-date-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  margin-bottom: 0.25rem;
}

.dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.dashboard-metric-card {
  padding: 0.5rem 0.72rem;
  border-radius: 20px;
  min-height: 74px;
}

.dashboard-metric-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-metric-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  min-width: 0;
  padding-left: 0.2rem;
}

.dashboard-metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.05;
  text-wrap: balance;
}

.dashboard-metric-value {
  display: block;
  font-size: 1.72rem;
  line-height: 1;
  margin: 0;
  text-align: right;
  flex: 0 0 auto;
}

.dashboard-metric-meta {
  display: block;
  color: #98897f;
  font-size: 0.73rem;
  line-height: 1.05;
  margin-top: 0;
}

.metric-accent-green {
  color: #4b8a58;
}

.metric-accent-blue {
  color: #466db3;
}

.metric-accent-red {
  color: #d22f27;
}

.metric-accent-soft {
  color: #c78f8f;
}

.dashboard-finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.finance-card {
  padding: 0.85rem 0.95rem;
  border-radius: 20px;
}

.finance-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.finance-card-header-compact {
  align-items: center;
}

.finance-card-header h2 {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
}

.dashboard-card-link {
  color: var(--ink);
  text-decoration: none;
}

.dashboard-card-link:hover,
.dashboard-card-link:focus {
  color: var(--accent-strong);
  text-decoration: underline;
}

.finance-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 0.8rem;
}

.finance-stat-grid > div > span {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
  margin-bottom: 0.12rem;
}

.finance-stat-grid strong {
  display: block;
  font-size: 1.28rem;
  line-height: 1.05;
}

.finance-stat-meta {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.2;
}

.finance-stat-value {
  display: inline-flex !important;
  align-items: center;
  gap: 0.32rem;
  white-space: nowrap;
  flex-wrap: nowrap;
  font-size: 1.28rem !important;
  line-height: 1.05 !important;
  font-weight: 700;
  color: inherit;
}

.finance-stat-number {
  color: var(--ink) !important;
  font-size: 1.28rem !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
}

.finance-stat-number-positive,
.finance-stat-value-positive {
  color: #4b8a58 !important;
}

.finance-stat-number-negative,
.finance-stat-value-negative {
  color: #d22f27 !important;
}

.comparison-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.9rem;
  margin-left: 0;
  color: #a09186;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  cursor: help;
  transform: translateY(-0.02rem);
}

.comparison-chip-up {
  color: #4b8a58 !important;
}

.comparison-chip-down {
  color: #d22f27 !important;
}

.comparison-chip-flat {
  color: #a09186 !important;
}

.tooltip.movvea-tooltip {
  --bs-tooltip-bg: rgba(58, 57, 55, 0.96);
  --bs-tooltip-color: #fffdfb;
  --bs-tooltip-border-radius: 14px;
  --bs-tooltip-padding-x: 0.7rem;
  --bs-tooltip-padding-y: 0.5rem;
  --bs-tooltip-max-width: 320px;
  z-index: 1200;
}

.tooltip.movvea-tooltip .tooltip-inner {
  box-shadow: 0 12px 28px rgba(24, 34, 47, 0.18);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
  white-space: pre-line;
}

.dashboard-month-picker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-month-picker {
  min-width: 12rem;
  background-color: rgba(255, 253, 251, 0.94);
}

.dashboard-month-finance-card {
  transition: opacity 160ms ease;
}

.dashboard-month-finance-card.is-loading {
  opacity: 0.68;
}

.dashboard-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.7rem;
}

.dashboard-panel {
  grid-column: span 3;
  padding: 0.8rem 0.85rem;
  border-radius: 20px;
}

.dashboard-panel-wide {
  grid-column: span 6;
}

.dashboard-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.dashboard-panel-header h2 {
  margin: 0.15rem 0 0;
  font-size: 1rem;
}

.dashboard-panel-subtitle {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.dashboard-holiday-note {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin-top: 0.4rem;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff0d8, #fde3b7);
  border: 1px solid #efc784;
  color: #9c5b14;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.panel-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #f4ecea;
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.84rem;
}

.panel-count-ok {
  background: #e6f0e2;
  color: #4b8a58;
}

.panel-count-warn {
  background: #f7ead8;
  color: #a06b2f;
}

.panel-count-alert {
  background: #f5dddd;
  color: #c24c4c;
}

.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.dashboard-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.46rem 0.58rem;
  border: 1px solid #efe2dc;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.65);
}

.dashboard-list-row-overdue {
  background: linear-gradient(90deg, rgba(253, 234, 235, 0.9), rgba(255, 248, 248, 0.98));
  border-color: #efcfd3;
}

.dashboard-heat-warm-1 {
  background: linear-gradient(90deg, rgba(231, 239, 226, 0.9), rgba(255, 253, 251, 0.98));
  border-color: #d9e6d1;
}

.dashboard-heat-warm-2 {
  background: linear-gradient(90deg, rgba(241, 240, 221, 0.92), rgba(255, 253, 251, 0.98));
  border-color: #e7dfc2;
}

.dashboard-heat-warm-3 {
  background: linear-gradient(90deg, rgba(247, 234, 215, 0.94), rgba(255, 251, 248, 0.98));
  border-color: #efd8ba;
}

.dashboard-heat-warm-4 {
  background: linear-gradient(90deg, rgba(248, 226, 214, 0.95), rgba(255, 249, 246, 0.98));
  border-color: #efccbc;
}

.dashboard-heat-warm-5 {
  background: linear-gradient(90deg, rgba(247, 224, 226, 0.96), rgba(255, 247, 247, 0.98));
  border-color: #edc8cf;
}

.dashboard-list-inline {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-package-inline {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9.5rem) minmax(0, 1fr);
  align-items: baseline;
  gap: 0.55rem;
}

.dashboard-package-inline .dashboard-client-link {
  min-width: 0;
}

.dashboard-package-meta {
  white-space: nowrap;
}

.dashboard-time-label {
  min-width: 3.4rem;
  color: #8f8278 !important;
  font-variant-numeric: tabular-nums;
}

.dashboard-list-row strong {
  display: inline-block;
  line-height: 1.2;
  font-size: 0.92rem;
  white-space: nowrap;
}

.dashboard-client-link {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-client-link:hover,
.dashboard-client-link:focus {
  color: var(--accent-strong);
  text-decoration: underline;
}

.dashboard-client-link-inline {
  font-size: inherit;
  font-weight: 600;
}

.dashboard-list-row span {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.dashboard-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.dashboard-schedule-inline .dashboard-client-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-schedule-inline {
  gap: 0.42rem;
}

.dashboard-schedule-inline .dashboard-time-label {
  min-width: 2.95rem;
}

.dashboard-schedule-row .dashboard-row-actions {
  gap: 0.25rem;
}

.dashboard-list-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
  text-align: right;
}

.dashboard-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0.16rem 0.48rem;
  border: 1px solid #dccbc3;
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.92);
  color: var(--accent-strong);
  font-size: 0.71rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-inline-action:hover,
.dashboard-inline-action:focus {
  border-color: var(--accent);
  background: #f4ecea;
  color: var(--accent-strong);
  text-decoration: none;
}

.dashboard-inline-form {
  margin: 0;
}

.dashboard-list-right strong {
  flex: 0 0 auto;
  min-width: 2ch;
  line-height: 1;
  text-align: right;
}

.dashboard-status-picker {
  position: relative;
  min-width: 8.35rem;
  background: transparent !important;
}

.dashboard-form-picker {
  width: 100%;
  min-width: 0;
}

.dashboard-status-picker[open] {
  z-index: 20;
}

.dashboard-status-picker.is-loading {
  pointer-events: none;
}

.dashboard-status-select {
  display: flex;
  align-items: center;
  list-style: none;
  min-width: 8.35rem;
  min-height: 2rem;
  padding: 0.18rem 1.95rem 0.18rem 0.72rem;
  border: 1px solid #e3d8d1;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffdfb 0%, #f8f1ed 100%);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
  user-select: none;
  white-space: nowrap;
}

.dashboard-form-picker .dashboard-status-select {
  width: 100%;
  min-width: 0;
  min-height: 2.65rem;
  padding: 0.54rem 2.1rem 0.54rem 0.9rem;
  border-radius: 12px;
  font-size: 0.94rem;
  line-height: 1.2;
}

.dashboard-form-picker .dashboard-status-menu {
  width: 100%;
  min-width: 0;
}

.dashboard-form-picker .dashboard-status-option {
  min-height: 2.3rem;
  padding-top: 0.46rem;
  padding-bottom: 0.46rem;
  font-size: 0.93rem;
}

.dashboard-status-picker.status-billable,
.dashboard-status-picker.status-rescheduled,
.dashboard-status-picker.status-pause,
.dashboard-status-picker.status-excused,
.dashboard-status-picker.status-nonbillable {
  background: transparent !important;
  color: inherit;
}

.dashboard-status-picker.status-billable > .dashboard-status-select {
  background: #e7efe2;
  color: #5f7850;
}

.dashboard-status-picker.status-rescheduled > .dashboard-status-select {
  background: #f7eadb;
  color: #a36a2f;
}

.dashboard-status-picker.status-nonbillable > .dashboard-status-select {
  background: #efe9f4;
  color: #7d678d;
}

.dashboard-status-picker.status-pause > .dashboard-status-select {
  background: #e2eef9;
  color: #436f94;
}

.dashboard-status-picker.status-excused > .dashboard-status-select {
    background: #f6e1e4;
    color: #b14e5f;
  }

.dashboard-status-picker.category-income > .dashboard-status-select {
    background: #f1ece7;
    color: #7f624f;
  }

.dashboard-status-picker.category-rent > .dashboard-status-select {
    background: #f6e0e2;
    color: #9b3f52;
  }

.dashboard-status-picker.category-contrib > .dashboard-status-select {
    background: #efe4f6;
    color: #7a4b95;
  }

.dashboard-status-picker.category-tax > .dashboard-status-select {
    background: #fce7df;
    color: #a95a35;
  }

.dashboard-status-picker.category-hall > .dashboard-status-select {
    background: #e8edf7;
    color: #46618c;
  }

.dashboard-status-picker.category-hall-alt > .dashboard-status-select {
    background: #e4eef2;
    color: #4d7680;
  }

.dashboard-status-picker.category-education > .dashboard-status-select {
    background: #efe8d8;
    color: #8b6a1d;
  }

.dashboard-status-picker.category-equipment > .dashboard-status-select {
    background: #ece8de;
    color: #74634d;
  }

.dashboard-status-picker.category-utility > .dashboard-status-select {
    background: #e6f0ea;
    color: #4e7d5d;
  }

.dashboard-status-picker.category-power > .dashboard-status-select {
    background: #f7ead7;
    color: #9b6b21;
  }

.dashboard-status-picker.category-water > .dashboard-status-select {
    background: #dfeef8;
    color: #3d7398;
  }

.dashboard-status-picker.category-building > .dashboard-status-select {
    background: #ede3dc;
    color: #7e6454;
  }

.dashboard-status-select::-webkit-details-marker {
  display: none;
}

.dashboard-status-select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.72rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #9f8574;
  border-bottom: 2px solid #9f8574;
  transform: translateY(-60%) rotate(45deg);
  transition: transform 140ms ease;
}

.dashboard-status-select [data-dashboard-status-label] {
  display: block;
  line-height: 1;
  transform: translateY(0.02rem);
}

.dashboard-status-picker[open] .dashboard-status-select::after {
  transform: translateY(-30%) rotate(-135deg);
}

.dashboard-status-select:hover,
.dashboard-status-select:focus {
  border-color: rgba(159, 133, 116, 0.7);
  box-shadow: 0 0 0 0.15rem rgba(159, 133, 116, 0.12);
}

.dashboard-status-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 10.5rem;
  padding: 0.35rem;
  border: 1px solid rgba(197, 173, 156, 0.45);
  border-radius: 0.9rem;
  background: rgba(255, 252, 249, 0.98);
  box-shadow: 0 14px 28px rgba(24, 34, 47, 0.12);
}

.dashboard-status-option {
  display: block;
  width: 100%;
  padding: 0.52rem 0.62rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

.dashboard-status-option:hover,
.dashboard-status-option:focus {
  background: #fbf4ee;
  color: var(--accent-strong);
}

.dashboard-status-option.is-selected {
  background: #f1e2d6;
  color: var(--accent-strong);
}

.dashboard-toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1085;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  pointer-events: none;
}

.dashboard-toast {
  min-width: 220px;
  max-width: 320px;
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  border: 1px solid #e7ddd7;
  background: rgba(255, 253, 251, 0.98);
  box-shadow: 0 14px 28px rgba(24, 34, 47, 0.12);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.dashboard-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dashboard-toast-success {
  border-color: #d6e8d8;
  background: #f8fcf8;
}

.dashboard-toast-error {
  border-color: #efd3d7;
  background: #fff8f8;
  color: #a33a4b;
}

.birthday-merged-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.birthday-merged-block h3 {
  font-size: 0.88rem;
  margin: 0 0 0.45rem;
  color: var(--accent-strong);
}

.dashboard-merged-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.dashboard-merged-block h3 {
  font-size: 0.88rem;
  margin: 0 0 0.45rem;
  color: var(--accent-strong);
}

.btn-quick-arrived {
  border: 1px solid #cfe2d1;
  background: #ecf5ee;
  color: #407150;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.16rem 0.55rem;
  line-height: 1.2;
}

.btn-quick-arrived:hover,
.btn-quick-arrived:focus {
  border-color: #9fc0a5;
  background: #dff0e3;
  color: #2d5d3f;
}

.dashboard-age {
  font-weight: 700;
  color: var(--accent-strong) !important;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.dashboard-panel .eyebrow,
.finance-card .eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.dashboard-panel .status-pill {
  padding: 0.14rem 0.5rem;
  font-size: 0.74rem;
}

.dashboard-board .surface-card,
.dashboard-finance-grid .surface-card,
.dashboard-metric-grid .surface-card,
.dashboard-hero-copy,
.dashboard-date-card {
  box-shadow: 0 10px 24px rgba(24, 34, 47, 0.045);
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.96;
  margin-bottom: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
}

.lead {
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-card,
.roadmap article {
  background: rgba(255, 253, 251, 0.95);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(24, 34, 47, 0.06);
}

.hero-card {
  padding: 1.5rem;
  align-self: start;
}

.hero-card h2 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.hero-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.hero-card li + li {
  margin-top: 0.6rem;
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.roadmap article {
  padding: 1.25rem;
}

.roadmap h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.roadmap p {
  margin: 0;
  color: var(--muted);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.page-header h1 {
  margin-bottom: 0.35rem;
}

.section-copy {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.surface-card {
  background: rgba(255, 253, 251, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(24, 34, 47, 0.06);
  padding: 1rem;
}

.table-shell {
  padding: 0.45rem 0.55rem 0.35rem;
  overflow-x: auto;
}

.form-shell {
  max-width: 900px;
}

.form-secondary-meta {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(159, 133, 116, 0.24);
}

.form-secondary-meta .form-label {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0.22rem;
}

.form-secondary-meta .form-control {
  font-size: 0.82rem;
  color: #7a6e66;
  background: rgba(248, 244, 241, 0.6);
}

.form-secondary-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem 1rem;
}

.form-secondary-meta-item {
  display: grid;
  gap: 0.16rem;
}

.form-secondary-meta-label {
  font-size: 0.74rem;
  color: var(--muted);
}

.form-secondary-meta-value {
  font-size: 0.82rem;
  color: #7a6e66;
  line-height: 1.3;
}

.attendance-price-meta {
  margin-top: -0.15rem;
  border-top: 0;
  padding-top: 0;
}

.auth-shell {
  min-height: calc(100vh - 11rem);
  display: grid;
  place-items: center;
  padding: 2rem 0 3rem;
}

.auth-card {
  width: min(100%, 29rem);
  padding: 1.35rem 1.35rem 1.15rem;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.auth-header h1 {
  margin: 0.2rem 0 0;
  font-size: 1.6rem;
}

.auth-form .form-control {
  min-height: 2.8rem;
}

.auth-divider {
  position: relative;
  margin: 1rem 0 0.9rem;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid var(--line);
}

.auth-divider span {
  position: relative;
  display: inline-block;
  padding: 0 0.7rem;
  background: rgba(255, 253, 251, 0.96);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-google-form {
  margin: 0;
}

.auth-google-button {
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border-radius: 14px;
  font-weight: 700;
  color: #3a3937;
}

.auth-google-mark {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(159, 133, 116, 0.12);
  color: #9f8574;
  font-weight: 800;
}

.btn.is-loading {
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-spinner {
  width: 0.95rem;
  height: 0.95rem;
  display: inline-block;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: buttonSpinner 0.7s linear infinite;
  flex: 0 0 auto;
}

@keyframes buttonSpinner {
  to {
    transform: rotate(360deg);
  }
}

.calendar-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.calendar-action-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.calendar-action-group-label {
  padding-left: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.calendar-action-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.28rem;
  border: 1px solid #eee3dd;
  border-radius: 16px;
  background: rgba(255, 253, 251, 0.82);
}

.calendar-toolbar-button {
  min-height: 2.25rem;
  padding: 0.48rem 0.82rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: none;
}

.calendar-action-danger {
  border: 1px solid #e7d4d0;
  border-radius: 14px;
  background: rgba(255, 253, 251, 0.94);
  color: #9a4a45;
  font-weight: 700;
}

.calendar-action-danger:hover,
.calendar-action-danger:focus {
  border-color: #d7b7b0;
  background: #faf2ef;
  color: #863a35;
}

.calendar-shell {
  padding: 0.6rem 0.7rem 0.75rem;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.calendar-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.calendar-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.28rem 0.62rem;
  border: 1px solid #eadcd6;
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.92);
}

.calendar-stat-pill span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.calendar-stat-pill strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1;
}

.calendar-sync-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.calendar-sync-preview-item {
  padding: 0.75rem 0.85rem;
  border: 1px solid #eadcd6;
  border-radius: 16px;
  background: rgba(255, 253, 251, 0.88);
}

.calendar-sync-preview-item span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-sync-preview-item strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.calendar-sync-invite-check {
  margin-bottom: 0.3rem;
}

.todo-calendar-sync-summary {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #eadcd6;
  border-radius: 16px;
  background: rgba(255, 253, 251, 0.88);
}

.todo-calendar-sync-summary-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.75rem;
}

.todo-calendar-sync-summary-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.todo-calendar-sync-summary-value {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.todo-calendar-sync-summary-value-email {
  font-size: 0.95rem;
  word-break: break-word;
}

.calendar-range-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.calendar-range-subtitle {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.1;
}

.calendar-grid-wrap {
  overflow: auto;
}

.calendar-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0.22rem;
  min-width: 980px;
}

.calendar-grid th,
.calendar-grid td {
  vertical-align: top;
}

.calendar-time-head,
.calendar-time-cell {
  width: 4.6rem;
  min-width: 4.6rem;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  text-align: right;
  padding-right: 0.3rem;
  vertical-align: middle !important;
}

.calendar-day-head {
  padding: 0 0 0.18rem;
  text-align: left;
}

.calendar-day-headline {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
}

.calendar-day-head-copy {
  min-width: 0;
  width: 100%;
  text-align: center;
}

.calendar-day-head span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.calendar-day-head strong {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.05;
}

.calendar-holiday-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.3rem;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff0d8, #fde3b7);
  border: 1px solid #efc784;
  color: #9c5b14;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.calendar-day-head.is-holiday {
  background: linear-gradient(180deg, rgba(255, 245, 228, 0.82), rgba(255, 251, 247, 0.98));
  border-radius: 14px;
}

.calendar-day-column-holiday {
  background: linear-gradient(180deg, rgba(255, 247, 233, 0.62), rgba(255, 252, 248, 0.22));
  border-radius: 14px;
}

.calendar-day-column-holiday .calendar-slot {
  background: rgba(255, 250, 243, 0.96);
  border-color: #ecd7bf;
}

.calendar-day-column-holiday .calendar-slot.is-empty {
  background: rgba(255, 248, 238, 0.88);
}

.calendar-day-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  min-height: 1.35rem;
  padding: 0.08rem 0.38rem;
  margin-top: 0;
  position: absolute;
  right: 0;
  top: 50%;
  margin-left: 0;
  flex: 0 0 auto;
  transform: translateY(-50%);
  border-radius: 999px;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  background: #f4ecea;
  color: var(--accent-strong);
}

.calendar-day-head.is-today strong {
  color: var(--accent-strong);
}

.holiday-settings-actions {
  align-items: center;
}

.holiday-year-form {
  min-width: 8rem;
}

.holiday-form-actions {
  gap: 0.8rem;
  margin-top: 0.45rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.settings-section-head {
  margin-bottom: 0.85rem;
}

.settings-section-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

@media (max-width: 991.98px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.calendar-slot {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.32rem 1.05rem 0.3rem 0.42rem;
  border: 1px solid #ecdcd5;
  border-radius: 12px;
  background: rgba(255, 253, 251, 0.92);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.1rem;
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.calendar-slot:hover,
.calendar-slot:focus {
  border-color: #d6bfb2;
  box-shadow: 0 8px 18px rgba(58, 57, 55, 0.08);
  transform: translateY(-1px);
}

.calendar-slot.is-dragging {
  opacity: 0.55;
  box-shadow: 0 10px 24px rgba(58, 57, 55, 0.12);
}

.calendar-slot.is-drop-target {
  border-color: #9f8574;
  background: #f7eeea;
  box-shadow: inset 0 0 0 1px rgba(159, 133, 116, 0.18);
}

.calendar-slot.is-empty {
  justify-content: center;
  align-items: center;
  color: #b5a39a;
  background: rgba(255, 251, 248, 0.85);
}

.calendar-slot.calendar-slot-internal {
  border-color: #d9c9bf;
  background:
    linear-gradient(90deg, rgba(236, 229, 244, 0.9), rgba(255, 253, 251, 0.98));
  box-shadow: inset 3px 0 0 rgba(136, 108, 164, 0.58);
}

.calendar-slot.calendar-slot-internal:hover,
.calendar-slot.calendar-slot-internal:focus {
  border-color: #c7b2d7;
  background:
    linear-gradient(90deg, rgba(231, 221, 242, 0.96), rgba(255, 252, 250, 1));
  box-shadow:
    inset 3px 0 0 rgba(128, 93, 160, 0.72),
    0 8px 18px rgba(58, 57, 55, 0.08);
}

.calendar-slot.calendar-slot-internal .calendar-slot-client {
  color: #6b4d85;
}

.calendar-slot.status-rescheduled-calendar {
  border-color: #eed5b5;
  background: linear-gradient(90deg, rgba(248, 236, 213, 0.96), rgba(255, 251, 246, 0.98));
}

.calendar-slot.status-rescheduled-calendar .calendar-slot-client,
.calendar-slot.status-rescheduled-calendar .calendar-slot-status,
.calendar-slot.status-rescheduled-calendar .calendar-slot-minute {
  color: #a36a2f;
}

.calendar-slot.status-excused-calendar {
  border-color: #e4c7cd;
  background: linear-gradient(90deg, rgba(247, 229, 232, 0.94), rgba(255, 250, 250, 0.98));
}

.calendar-slot.status-excused-calendar .calendar-slot-client,
.calendar-slot.status-excused-calendar .calendar-slot-status,
.calendar-slot.status-excused-calendar .calendar-slot-minute {
  color: #b14e5f;
}

.calendar-slot-client {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.calendar-slot-main {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 100%;
  pointer-events: none;
}

.calendar-slot-minute {
  color: #8f8278;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.calendar-slot-sync {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.05rem;
  padding: 0 0.22rem;
  border-radius: 0 0 0 10px;
  background: rgba(95, 120, 80, 0.16);
  color: #4f6d45;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(95, 120, 80, 0.08);
  pointer-events: none;
}

.calendar-slot-sync svg {
  width: 0.68rem;
  height: 0.68rem;
  display: block;
  fill: currentColor;
}

.calendar-slot-delete {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.05rem;
  padding: 0 0.24rem;
  border-radius: 0 0 0 10px;
  background: #f2d7dc;
  color: #9d3b4d;
  box-shadow: inset 0 0 0 1px rgba(157, 59, 77, 0.16);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 140ms ease, transform 140ms ease, background 140ms ease, color 140ms ease;
  pointer-events: auto;
  z-index: 4;
}

.calendar-slot.is-filled:hover .calendar-slot-delete,
.calendar-slot.is-filled:focus .calendar-slot-delete,
.calendar-slot.is-filled:focus-visible .calendar-slot-delete {
  opacity: 1;
  transform: translateY(0);
}

.calendar-slot-delete svg {
  width: 0.7rem;
  height: 0.7rem;
  display: block;
  fill: currentColor;
}

.calendar-slot-delete:hover,
.calendar-slot-delete:focus {
  background: #ecc3cb;
  color: #8d3041;
  outline: none;
}

.calendar-slot-sync-stale {
  background: rgba(196, 129, 69, 0.2);
  color: #b56f28;
  box-shadow: inset 0 0 0 1px rgba(181, 111, 40, 0.08);
}

.calendar-slot-todo {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.05rem;
  padding: 0 0.22rem;
  border-radius: 10px 0 10px 0;
  background: rgba(124, 102, 173, 0.18);
  color: #6a4fa0;
  box-shadow: inset 0 0 0 1px rgba(124, 102, 173, 0.12);
  pointer-events: auto;
  z-index: 2;
}

.calendar-slot-todo svg {
  width: 0.68rem;
  height: 0.68rem;
  display: block;
  fill: currentColor;
}

.calendar-slot-todo:hover,
.calendar-slot-todo:focus {
  background: rgba(124, 102, 173, 0.24);
  color: #5a3f93;
  outline: none;
}

.calendar-slot-status {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1;
  pointer-events: none;
}

.calendar-slot-empty {
  font-size: 0.95rem;
  line-height: 1;
}

.calendar-load-low {
  background: #e7efe2;
  color: #5f7850;
}

.calendar-load-medium {
  background: #f7ead7;
  color: #9b6b21;
}

.calendar-load-high {
  background: #f7e0e2;
  color: #b3384f;
}

.calendar-modal {
  overflow: visible;
}

.calendar-modal .form-control,
.calendar-modal .form-select {
  min-height: 2.6rem;
  padding-top: 0.52rem;
  padding-bottom: 0.52rem;
}

.calendar-modal .dashboard-status-select {
  min-height: 2.6rem;
  padding-top: 0.38rem;
  padding-bottom: 0.38rem;
}

.calendar-modal-footer {
  justify-content: flex-end;
}

.calendar-client-suggestions {
  margin-top: 0.65rem;
}

.calendar-client-suggestions-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.calendar-client-suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.calendar-client-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid #e9d9d2;
  border-radius: 999px;
  background: #fffaf7;
  color: var(--ink);
  font-size: 0.83rem;
  line-height: 1;
}

.calendar-client-chip strong {
  font-size: 0.84rem;
}

.calendar-client-chip span {
  color: var(--muted);
  font-size: 0.72rem;
}

.calendar-client-chip:hover,
.calendar-client-chip:focus {
  border-color: #d5bfb2;
  background: #f8efeb;
  color: var(--accent-strong);
}

.btn-brand {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.btn-brand:hover,
.btn-brand:focus {
  background: var(--accent-strong);
  color: white;
  border-color: var(--accent-strong);
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.toolbar-primary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}

.search-field {
  position: relative;
  flex: 1 1 420px;
  max-width: 520px;
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8b98a8;
  pointer-events: none;
  font-size: 0.9rem;
}

.compact-input {
  padding-left: 2.1rem;
  min-height: 2.45rem;
  border-radius: 999px;
  border-color: #d7e1ea;
  font-size: 0.94rem;
}

.compact-select {
  min-height: 2.45rem;
  border-radius: 999px;
  border-color: #d7e1ea;
  font-size: 0.94rem;
  padding-left: 0.95rem;
  padding-right: 2.4rem;
}

.compact-input:focus {
  border-color: rgba(159, 133, 116, 0.7);
  box-shadow: 0 0 0 0.2rem rgba(159, 133, 116, 0.12);
}

.compact-select:focus {
  border-color: rgba(159, 133, 116, 0.7);
  box-shadow: 0 0 0 0.2rem rgba(159, 133, 116, 0.12);
}

.list-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  color: #6c7a89;
  font-size: 0.9rem;
  font-weight: 600;
}

.meta-divider {
  color: #c3b3aa;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid #e0d2cb;
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.94);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.filter-check input {
  margin: 0;
}

.filter-select {
  flex: 0 0 220px;
  max-width: 240px;
  background-color: rgba(255, 253, 251, 0.94);
}

.exercise-filter-autocomplete {
  flex: 0 0 220px;
  max-width: 240px;
  min-width: 0;
}

.exercise-filter-autocomplete .lookup-input-group {
  width: 100%;
}

.exercise-filter-autocomplete .lookup-autocomplete {
  width: 100%;
}

.exercise-filter-combobox {
  min-height: 2.45rem;
  height: 2.45rem;
  background-color: rgba(255, 253, 251, 0.94);
}

.filter-select-sm {
  flex-basis: 170px;
  max-width: 180px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-active {
  background: #e7efe2;
  color: #667a54;
}

.status-passive {
  background: #efe7e2;
  color: #8a7569;
}

.status-billable {
  background: #e7efe2;
  color: #5f7850;
}

.status-rescheduled {
  background: #f7eadb;
  color: #a36a2f;
}

.status-nonbillable {
  background: #efe9f4;
  color: #7d678d;
}

.status-pause {
  background: #e2eef9;
  color: #436f94;
}

.status-excused {
  background: #f6e1e4;
  color: #b14e5f;
}

.amount-chip,
.category-chip,
.invoice-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.amount-positive {
  background: #e8efe4;
  color: #5e7450;
}

.amount-negative {
  background: #f7e8ea;
  color: #a33a4b;
}

.category-income {
  background: #f1ece7;
  color: #7f624f;
}

.category-expense {
  background: #f4e3e6;
  color: #9f3a53;
}

.category-rent {
  background: #f6e0e2;
  color: #9b3f52;
}

.category-contrib {
  background: #efe4f6;
  color: #7a4b95;
}

.category-tax {
  background: #fce7df;
  color: #a95a35;
}

.category-hall {
  background: #e8edf7;
  color: #46618c;
}

.category-hall-alt {
  background: #e4eef2;
  color: #4d7680;
}

.category-education {
  background: #efe8d8;
  color: #8b6a1d;
}

.category-equipment {
  background: #ece8de;
  color: #74634d;
}

.category-utility {
  background: #e6f0ea;
  color: #4e7d5d;
}

.category-power {
  background: #f7ead7;
  color: #9b6b21;
}

.category-water {
  background: #dfeef8;
  color: #3d7398;
}

.category-building {
  background: #ede3dc;
  color: #7e6454;
}

.invoice-chip {
  background: #ece6df;
  color: #6d5546;
}

.invoice-paid-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.invoice-paid-date {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
}

.admin-table {
  margin-bottom: 0;
  font-size: 0.93rem;
}

.admin-table thead th {
  border-bottom: 1px solid #eaded9;
  color: #8a7d73;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 0.65rem 0.7rem;
  white-space: nowrap;
}

.admin-table tbody td {
  border-color: #f1e6e1;
  padding: 0.72rem 0.65rem;
  vertical-align: middle;
  line-height: 1.25;
  white-space: nowrap;
}

.exercise-row-inactive td {
  background: linear-gradient(180deg, rgba(241, 239, 237, 0.92), rgba(248, 245, 243, 0.92));
  color: #908881;
}

.exercise-row-inactive .entity-title,
.exercise-row-inactive a {
  color: #746d66;
}

.exercise-row-inactive .entity-subtitle {
  color: #9d948d;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
}

.table-sort span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b0a59c;
  font-size: 0.8rem;
  line-height: 1;
  transform: translateY(-1px);
}

.table-sort:hover,
.table-sort:focus {
  color: var(--accent-strong);
}

.data-row,
tr[data-row-link],
.manager-report-clickable-row {
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.data-row:hover,
.data-row:focus {
  background: linear-gradient(90deg, rgba(244, 236, 234, 0.82), rgba(255, 253, 251, 0.98));
  box-shadow: inset 3px 0 0 var(--accent);
  outline: none;
}

.data-row.invoice-overdue {
  background: linear-gradient(90deg, rgba(253, 234, 235, 0.9), rgba(255, 248, 248, 0.98));
  box-shadow: inset 3px 0 0 #c75a66;
}

.data-row.invoice-overdue td {
  background: rgba(252, 240, 241, 0.9);
}

.data-row.invoice-overdue:hover,
.data-row.invoice-overdue:focus {
  background: linear-gradient(90deg, rgba(251, 223, 225, 0.96), rgba(255, 243, 244, 1));
  box-shadow: inset 3px 0 0 #b44557;
}

.data-row.invoice-overdue:hover td,
.data-row.invoice-overdue:focus td {
  background: rgba(250, 231, 233, 0.94);
}

.data-row.payment-expense-row {
  background: linear-gradient(90deg, rgba(247, 242, 238, 0.94), rgba(255, 252, 249, 0.98));
  box-shadow: inset 3px 0 0 #b89a87;
}

.data-row.payment-expense-row td {
  background: rgba(252, 248, 245, 0.92);
}

.data-row.payment-expense-row:hover,
.data-row.payment-expense-row:focus {
  background: linear-gradient(90deg, rgba(243, 233, 227, 0.98), rgba(255, 250, 246, 1));
  box-shadow: inset 3px 0 0 #9f8574;
}

.data-row.payment-expense-row:hover td,
.data-row.payment-expense-row:focus td {
  background: rgba(249, 242, 237, 0.96);
}

.invoice-overdue-note {
  color: #b14e5f;
  font-weight: 600;
}

.cell-id {
  color: #776b63;
  width: 3.8rem;
}

.entity-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

.exercise-video-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  color: #9a8f86;
  font-size: 0.78rem;
  line-height: 1;
}

.exercise-name-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #8c7464;
  text-decoration: none;
}

.exercise-name-link:hover,
.exercise-name-link:focus {
  color: var(--accent-strong);
  text-decoration: underline;
}

.exercise-video-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.entity-subtitle {
  color: #9a8f86;
  font-size: 0.79rem;
  margin-top: 0.08rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 15rem;
}

.danger-zone {
  max-width: 900px;
  border-color: #ebd1d4;
  background: linear-gradient(180deg, #fffafb 0%, #faf1f2 100%);
}

.danger-zone h2 {
  margin-bottom: 0.4rem;
}

.danger-zone-copy {
  margin-bottom: 1rem;
}

.lookup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.lookup-card {
  padding: 0.85rem 1rem 0.7rem;
}

.lookup-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.lookup-card h2 {
  font-size: 1.1rem;
}

.admin-table-compact thead th {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.admin-table-compact tbody td {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.inline-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.inline-actions form {
  margin: 0;
}

.lookup-input-group {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.lookup-input-group .form-select,
.lookup-input-group .lookup-autocomplete {
  min-width: 0;
}

.lookup-autocomplete {
  position: relative;
  flex: 1 1 auto;
}

.lookup-combobox {
  padding-right: 2.3rem;
}

.lookup-combobox.lookup-combobox-category {
  font-weight: 700;
}

.lookup-combobox.invoice-linked,
.lookup-option.invoice-linked {
  background: #edf7ee;
  color: #39734a;
  font-weight: 700;
}

.lookup-clear-btn {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #a89286;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  z-index: 2;
}

.lookup-clear-btn:hover,
.lookup-clear-btn:focus,
.lookup-clear-btn:active {
  transform: translateY(-50%);
}

.lookup-clear-btn:hover,
.lookup-clear-btn:focus {
  background: #f4eae5;
  color: var(--ink);
}

@media (min-width: 768px) {
  .lookup-clear-btn {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.1rem;
  }
}

.lookup-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid #e4d6cf;
  border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 14px 28px rgba(58, 57, 55, 0.12);
}

.lookup-option {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.94rem;
}

.lookup-option:hover,
.lookup-option:focus,
.lookup-option.active {
  background: #f4ecea;
  color: var(--accent-strong);
}

.lookup-option.invoice-linked:hover,
.lookup-option.invoice-linked:focus,
.lookup-option.invoice-linked.active {
  background: #dcefe0;
  color: #28583a;
}

.lookup-option.category-income,
.lookup-option.category-rent,
.lookup-option.category-contrib,
.lookup-option.category-tax,
.lookup-option.category-hall,
.lookup-option.category-hall-alt,
.lookup-option.category-education,
.lookup-option.category-equipment,
.lookup-option.category-utility,
.lookup-option.category-power,
.lookup-option.category-water,
.lookup-option.category-building {
  font-weight: 700;
}

.lookup-combobox.lookup-combobox-category.category-income,
.lookup-option.category-income {
  background: #f1ece7;
  color: #7f624f;
}

.lookup-combobox.lookup-combobox-category.category-rent,
.lookup-option.category-rent {
  background: #f6e0e2;
  color: #9b3f52;
}

.lookup-combobox.lookup-combobox-category.category-contrib,
.lookup-option.category-contrib {
  background: #efe4f6;
  color: #7a4b95;
}

.lookup-combobox.lookup-combobox-category.category-tax,
.lookup-option.category-tax {
  background: #fce7df;
  color: #a95a35;
}

.lookup-combobox.lookup-combobox-category.category-hall,
.lookup-option.category-hall {
  background: #e8edf7;
  color: #46618c;
}

.lookup-combobox.lookup-combobox-category.category-hall-alt,
.lookup-option.category-hall-alt {
  background: #e4eef2;
  color: #4d7680;
}

.lookup-combobox.lookup-combobox-category.category-education,
.lookup-option.category-education {
  background: #efe8d8;
  color: #8b6a1d;
}

.lookup-combobox.lookup-combobox-category.category-equipment,
.lookup-option.category-equipment {
  background: #ece8de;
  color: #74634d;
}

.lookup-combobox.lookup-combobox-category.category-utility,
.lookup-option.category-utility {
  background: #e6f0ea;
  color: #4e7d5d;
}

.lookup-combobox.lookup-combobox-category.category-power,
.lookup-option.category-power {
  background: #f7ead7;
  color: #9b6b21;
}

.lookup-combobox.lookup-combobox-category.category-water,
.lookup-option.category-water {
  background: #dfeef8;
  color: #3d7398;
}

.lookup-combobox.lookup-combobox-category.category-building,
.lookup-option.category-building {
  background: #ede3dc;
  color: #7e6454;
}

.lookup-option-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.lookup-option-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  color: #9a8f86;
  opacity: 0.9;
}

.lookup-option-meta svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.training-lookup-combobox {
  padding-right: 4.2rem;
}

.training-selected-video-indicator {
  position: absolute;
  top: 50%;
  right: 2.2rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: #9a8f86;
  pointer-events: none;
  z-index: 1;
}

.training-selected-video-indicator svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.lookup-option-empty {
  min-height: 2rem;
}

.lookup-add-btn {
  flex: 0 0 auto;
  width: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
  border-color: #d7c7bf;
  color: var(--accent-strong);
  background: #fff8f4;
}

.lookup-add-btn:hover,
.lookup-add-btn:focus {
  border-color: var(--accent);
  color: white;
  background: var(--accent);
}

.quick-lookup-modal {
  border: 1px solid #e4d6cf;
  border-radius: 24px;
  background: var(--surface);
}

.email-template-editor {
  min-height: 36rem;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.email-template-preview-shell {
  min-height: 36rem;
  border: 1px solid #e4d6cf;
  border-radius: 24px;
  background: linear-gradient(180deg, #fdfaf8 0%, #f7f1ed 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.email-template-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #eaded8;
  background: rgba(255, 255, 255, 0.72);
}

.email-template-preview-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7f624f;
}

.email-template-preview-subtitle {
  margin-top: 0.18rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.email-template-preview-frame {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  border: 0;
  background: white;
}

.invoice-workflow-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.invoice-edit-card {
  position: relative;
}

.invoice-meta-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 1.85fr) minmax(7.5rem, 0.72fr) minmax(8rem, 0.8fr) minmax(7.5rem, 0.72fr);
  gap: 0.9rem;
  align-items: start;
}

.invoice-meta-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.invoice-meta-field .form-label {
  margin-bottom: 0;
  display: flex;
  align-items: flex-end;
  line-height: 1.2;
}

.invoice-number-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.invoice-number-statuses {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.invoice-number-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 0;
}

.invoice-number-head .form-label {
  min-height: 0;
  margin-bottom: 0;
  white-space: nowrap;
}

.invoice-number-main .form-control {
  width: min(13rem, 100%);
  margin-bottom: 0;
}

.invoice-paid-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #cfe5d2;
  background: #eef8f0;
  color: #2f7a45;
  white-space: nowrap;
}

.invoice-paid-badge-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.invoice-paid-badge-date {
  font-size: 0.72rem;
  color: #4f6f57;
}

@media (max-width: 1690px) {
  .invoice-meta-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 767.98px) {
  .invoice-number-head {
    flex-wrap: wrap;
  }

  .invoice-number-main {
    width: 100%;
    flex-wrap: wrap;
  }

  .invoice-number-statuses {
    width: 100%;
    justify-content: flex-start;
  }

  .invoice-number-main .form-control {
    width: 100%;
  }

  .invoice-paid-badge {
    margin-left: 0;
  }
}

.invoice-meta-field .form-control,
.invoice-meta-field .lookup-shell,
.invoice-meta-field .lookup-control {
  width: 100%;
}

.invoice-meta-field-time .form-control,
.invoice-meta-field-date .form-control {
  min-width: 0;
}

.invoice-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(143, 173, 129, 0.32);
  background: #eef5ea;
  color: #58724d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(137, 164, 125, 0.14);
}

.invoice-workflow-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.invoice-workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.invoice-workflow-panel {
  border: 1px solid #e7d9d2;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdfb 0%, #fbf6f2 100%);
  padding: 1rem 1.05rem;
}

.invoice-workflow-panel-locked {
  position: relative;
  overflow: hidden;
}

.invoice-workflow-panel-lock-body {
  filter: blur(1.8px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.invoice-workflow-lock-note {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.invoice-workflow-panel-wide {
  grid-column: 1 / -1;
}

.invoice-workflow-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.invoice-workflow-panel-head-email {
  align-items: end;
}

.invoice-workflow-panel-head h3 {
  margin: 0;
  font-size: 1rem;
}

.invoice-workflow-head-email {
  flex: 1 1 22rem;
  min-width: 16rem;
}

.invoice-workflow-head-email .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
}

.invoice-workflow-copy {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.invoice-workflow-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.26rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.invoice-workflow-pill.is-ready {
  background: #e6f4e8;
  color: #2f7a45;
}

.invoice-workflow-pill.is-pending {
  background: #f4eae5;
  color: #8c6455;
}

.invoice-workflow-warning {
  margin-top: 0.8rem;
  border: 1px solid #f0c3bd;
  border-radius: 16px;
  background: #fff2ef;
  color: #9d473f;
  padding: 0.8rem 0.9rem;
  font-size: 0.9rem;
}

.invoice-workflow-success {
  margin-top: 0.8rem;
  border: 1px solid #cfe5d2;
  border-radius: 16px;
  background: #eef8f0;
  color: #2f7a45;
  padding: 0.8rem 0.9rem;
  font-size: 0.9rem;
}

.invoice-field-success {
  border-color: #cfe5d2;
  background: #eef8f0;
  color: #2f7a45;
  font-weight: 700;
}

.invoice-mail-preview-shell {
  border: 1px solid #e5d7cf;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.invoice-inline-field {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
}

.invoice-inline-field .form-label {
  margin-bottom: 0;
}

.invoice-inline-field-control {
  min-width: 0;
}

.invoice-inline-field-textarea {
  align-items: start;
}

.invoice-inline-field-textarea .form-label {
  padding-top: 0.8rem;
}

.invoice-email-meta {
  display: grid;
  gap: 0.22rem;
}

.invoice-email-meta-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.invoice-email-meta-value {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 700;
}

.invoice-mail-preview-subject {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #efe4dd;
  background: #fcf8f5;
}

.invoice-mail-preview-subject span {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.invoice-mail-preview-subject strong {
  font-size: 1rem;
  color: var(--ink);
}

.invoice-mail-preview-frame {
  width: 100%;
  min-height: 26rem;
  border: 0;
  background: #fff;
}

.invoice-mail-preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18rem;
  padding: 1.5rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.96rem;
  background: #fff;
}

@media (max-width: 991.98px) {
  .invoice-workflow-grid {
    grid-template-columns: 1fr;
  }

  .invoice-workflow-panel-head-email {
    align-items: flex-start;
  }

  .invoice-workflow-head-email {
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .invoice-inline-field {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .invoice-inline-field-textarea .form-label {
    padding-top: 0;
  }
}

.table-secondary-text {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.client-dashboard-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.client-dashboard-attention-stack {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.client-dashboard-attention {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.9rem;
  border-radius: 18px;
  border: 1px solid #efe2dc;
  background: rgba(255, 255, 255, 0.72);
}

.client-dashboard-attention strong {
  font-size: 0.92rem;
}

.client-dashboard-attention span {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.client-dashboard-attention-warn {
  background: linear-gradient(90deg, rgba(247, 234, 215, 0.94), rgba(255, 251, 248, 0.98));
  border-color: #efd8ba;
}

.client-dashboard-attention-danger {
  background: linear-gradient(90deg, rgba(247, 224, 226, 0.96), rgba(255, 247, 247, 0.98));
  border-color: #edc8cf;
}

.status-r1 {
  background: #eef5ea;
  color: #58724d;
}

.status-injured {
  background: #fff0ec;
  color: #ad5d4b;
}

.client-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.client-dashboard-metric-card {
  padding: 0.85rem 0.95rem;
  border-radius: 20px;
}

.client-dashboard-metric-card-success {
  background: linear-gradient(90deg, rgba(231, 239, 226, 0.9), rgba(255, 253, 251, 0.98));
  border-color: #d9e6d1;
}

.client-dashboard-metric-card-warn {
  background: linear-gradient(90deg, rgba(247, 234, 215, 0.94), rgba(255, 251, 248, 0.98));
  border-color: #efd8ba;
}

.client-dashboard-metric-card-danger {
  background: linear-gradient(90deg, rgba(247, 224, 226, 0.96), rgba(255, 247, 247, 0.98));
  border-color: #edc8cf;
}

.client-dashboard-metric-card-neutral {
  background: rgba(255, 253, 251, 0.96);
}

.client-dashboard-metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.client-dashboard-metric-value {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.7rem;
  line-height: 1;
}

.client-dashboard-value-warn {
  color: #b8791d;
}

.client-dashboard-metric-meta {
  display: block;
  margin-top: 0.28rem;
  color: #8f8278;
  font-size: 0.78rem;
  line-height: 1.3;
}

.client-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(310px, 0.95fr);
  gap: 0.85rem;
  align-items: start;
}

.client-dashboard-main,
.client-dashboard-side {
  display: grid;
  gap: 0.85rem;
}

.client-dashboard-card {
  padding: 0.95rem 1rem;
  border-radius: 22px;
  min-height: 100%;
}

.client-dashboard-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.85rem;
  margin-bottom: 0.7rem;
}

.client-dashboard-card-head > div:first-child {
  min-width: 0;
}

.client-dashboard-card-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.client-dashboard-card-head .section-copy {
  white-space: normal;
  overflow-wrap: anywhere;
}

.client-dashboard-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: var(--accent-strong);
}

.client-dashboard-package-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.client-dashboard-progress-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-dashboard-package-box {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid #efe2dc;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.client-dashboard-package-box-neutral {
  background: rgba(255, 255, 255, 0.68);
}

.client-dashboard-package-box-accent {
  background: linear-gradient(90deg, rgba(241, 240, 221, 0.92), rgba(255, 253, 251, 0.98));
  border-color: #e7dfc2;
}

.client-dashboard-package-box-danger {
  background: linear-gradient(90deg, rgba(248, 232, 229, 0.94), rgba(255, 251, 249, 0.98));
  border-color: #eccfca;
}

.client-dashboard-package-box strong {
  font-size: 1.15rem;
  line-height: 1.05;
}

.client-dashboard-package-box span {
  color: var(--muted);
  font-size: 0.78rem;
}

.client-dashboard-package-label {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  font-size: 0.71rem !important;
}

.client-dashboard-training-trend {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: end;
  min-height: 9rem;
  padding: 0.75rem;
  border: 1px solid #efe2dc;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.client-dashboard-training-trend-item {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 0.28rem;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.client-dashboard-training-bar-shell {
  display: flex;
  align-items: end;
  justify-content: center;
  height: 5.6rem;
  min-width: 0;
  border-radius: 999px;
  background: #f1e7e1;
  overflow: hidden;
}

.client-dashboard-training-bar {
  display: block;
  width: 100%;
  min-height: 0.5rem;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #9bbf9d, #6e9671);
}

.client-dashboard-training-trend-item strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.1;
}

.client-dashboard-training-trend-item span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
}

.client-dashboard-feedback-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e6d8d1;
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(90deg, rgba(231, 239, 226, 0.84), rgba(255, 253, 251, 0.98));
}

.client-dashboard-feedback-row:hover,
.client-dashboard-feedback-row:focus {
  color: var(--accent-strong);
  text-decoration: none;
  border-color: #d4c6bd;
}

.client-dashboard-feedback-row div {
  min-width: 0;
}

.client-dashboard-feedback-row strong,
.client-dashboard-feedback-row span {
  display: block;
}

.client-dashboard-feedback-row strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.client-dashboard-feedback-row span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.client-dashboard-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.client-dashboard-attendance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.client-dashboard-attendance-box {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid #efe2dc;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.client-dashboard-attendance-box strong {
  font-size: 1.15rem;
  line-height: 1.05;
}

.client-dashboard-attendance-box span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
}

.client-dashboard-year-table td strong {
  font-size: 0.95rem;
}

.client-dashboard-year-meta {
  color: var(--muted);
  font-size: 0.76rem;
}

.client-dashboard-percent-good {
  color: #47633d !important;
  font-weight: 700;
}

.client-dashboard-percent-warn {
  color: #9f7b33 !important;
  font-weight: 700;
}

.client-dashboard-percent-danger {
  color: #c75a66 !important;
  font-weight: 700;
}

.client-dashboard-coverage-list {
  display: grid;
  gap: 0.8rem;
}

.client-dashboard-coverage-card {
  padding: 0.85rem 0.9rem;
  border: 1px solid #efe2dc;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.client-dashboard-coverage-card-unpaid {
  border-color: #e6c8c2;
  background: linear-gradient(180deg, rgba(255, 246, 243, 0.96), rgba(255, 255, 255, 0.84));
}

.client-dashboard-coverage-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.client-dashboard-coverage-head h3 {
  margin: 0;
}

.client-dashboard-coverage-head p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.client-dashboard-coverage-duration {
  color: var(--muted);
  font-weight: 500;
}

.client-dashboard-coverage-duration-danger {
  color: #c75a66;
  font-weight: 700;
}

.client-dashboard-coverage-summary {
  text-align: right;
  white-space: nowrap;
}

.client-dashboard-coverage-summary strong {
  display: block;
  font-size: 1rem;
}

.client-dashboard-coverage-summary span {
  color: var(--muted);
  font-size: 0.76rem;
}

.client-dashboard-coverage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.client-dashboard-coverage-meta {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.client-dashboard-coverage-meta-danger {
  color: #c75a66;
  font-size: 0.84rem;
  font-weight: 700;
}

.client-dashboard-coverage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.client-dashboard-coverage-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #e7d9d2;
  border-radius: 999px;
  background: #fffdfa;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
}

.client-dashboard-coverage-chip-arrived {
  background: linear-gradient(90deg, rgba(231, 239, 226, 0.9), rgba(255, 253, 251, 0.98));
  border-color: #d9e6d1;
}

.client-dashboard-coverage-chip-postponed {
  background: linear-gradient(90deg, rgba(234, 239, 247, 0.94), rgba(250, 252, 255, 0.98));
  border-color: #d6e1f0;
}

.client-dashboard-coverage-chip-excused {
  background: linear-gradient(90deg, rgba(247, 234, 215, 0.94), rgba(255, 251, 248, 0.98));
  border-color: #efd8ba;
}

.client-dashboard-coverage-chip-other {
  background: linear-gradient(90deg, rgba(247, 234, 215, 0.94), rgba(255, 251, 248, 0.98));
  border-color: #efd8ba;
}

.client-dashboard-coverage-chip:hover,
.client-dashboard-coverage-chip:focus {
  color: var(--accent-strong);
  text-decoration: none;
  background: #f8f2ef;
}

.client-dashboard-coverage-chip span,
.client-dashboard-coverage-chip em {
  color: var(--muted);
  font-style: normal;
}

.client-dashboard-coverage-chip em {
  color: #c75a66;
  font-weight: 700;
}

.client-dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.client-dashboard-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
}

.client-dashboard-subhead h3 {
  margin: 0;
}

.client-dashboard-subhead-link {
  color: #7d6659;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.client-dashboard-subhead-link:hover,
.client-dashboard-subhead-link:focus {
  color: var(--accent-strong);
  text-decoration: none;
}

.reports-filter-shell {
    margin-bottom: 1rem;
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    background: rgba(255, 253, 251, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(24, 34, 47, 0.05);
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.reports-filter-mobile-head {
    display: none;
}

.reports-filter-mobile-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7f624f;
}

.reports-filter-toggle {
    min-width: 5.4rem;
}

.reports-filter-body[hidden] {
    display: none !important;
}

.reports-filter-form {
    margin-bottom: 0;
}

.reports-filter-label {
    margin-bottom: 0.22rem;
    font-size: 0.76rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.reports-filter-select {
    min-height: 2.4rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.reports-metrics {
  margin-bottom: 1rem;
}

.reports-summary-card {
  margin-bottom: 1rem;
  min-height: 100%;
}

.reports-summary-grid {
  align-items: start;
}

.reports-summary-item {
  display: grid;
  gap: 0.14rem;
  text-align: right;
}

.reports-summary-item > span {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
  margin-bottom: 0.12rem;
}

.reports-summary-item .finance-stat-value {
  justify-content: flex-end;
}

.reports-summary-item .finance-stat-meta {
  text-align: right;
}

.reports-grid {
    align-items: start;
}

.reports-layout {
    grid-template-columns: minmax(0, 1fr);
}

.reports-layout .client-dashboard-main {
    min-width: 0;
}

.reports-client-panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0.25rem;
}

.reports-score-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.manager-report-top-summary-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    align-items: start;
}

.manager-report-client-panels-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

.manager-report-trends-card {
    height: 100%;
}

.manager-report-summary-grid {
    margin-top: 1.15rem;
  }

  .manager-report-ai-top-card {
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .manager-report-summary-alerts {
    grid-column: 1 / -1;
    text-align: left;
  }

  .manager-report-summary-alerts .empty-state,
  .manager-report-summary-alerts .finance-stat-meta {
    text-align: left;
  }

  .manager-report-summary-alert-list {
    margin-top: 0.35rem;
  }

  .manager-report-summary-alert-empty {
    margin: 0.35rem 0 0;
  }

.manager-report-detail-grid {
  margin-top: 1.15rem;
}

.manager-report-layout-top {
  align-items: start;
}

.manager-report-side-top {
  align-self: start;
}

.manager-report-comparison-card {
  width: 100%;
}

.manager-report-comparison-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.5rem;
}

.manager-report-comparison-panel {
  min-width: 0;
}

.manager-report-comparison-head {
  margin-bottom: 0.75rem;
}

.manager-report-comparison-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.manager-report-comparison-head p {
  margin: 0.15rem 0 0;
  color: #9a7f67;
}

.manager-report-alert-row {
  width: 100%;
  align-items: flex-start;
  border-left-width: 4px;
  border-left-style: solid;
}

.manager-report-alert-row > div,
.manager-report-alert-row > div > span {
  width: 100%;
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.manager-report-alert-positive {
  background: linear-gradient(90deg, rgba(228, 241, 223, 0.96), rgba(255, 253, 251, 0.98));
  border-color: #cfe2c8;
  border-left-color: #7caf78;
  color: #3f8754;
}

.manager-report-alert-negative {
  background: linear-gradient(90deg, rgba(248, 229, 227, 0.96), rgba(255, 253, 251, 0.98));
  border-color: #ebc9c6;
  border-left-color: #cf6b75;
  color: #b54d59;
}

.manager-report-alert-neutral {
  background: linear-gradient(90deg, rgba(241, 236, 230, 0.96), rgba(255, 253, 251, 0.98));
  border-color: #e4d8cf;
  border-left-color: #cdb8a8;
  color: #6d625b;
}

.manager-report-alert-positive > div,
.manager-report-alert-positive > div > span {
  color: #3f8754;
}

.manager-report-alert-negative > div,
.manager-report-alert-negative > div > span {
  color: #b54d59;
}

.manager-report-alert-neutral > div,
.manager-report-alert-neutral > div > span {
  color: #6d625b;
}

  .manager-report-filter-row {
    row-gap: 0.6rem;
  }

  .manager-report-filter-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .manager-report-filter-switch {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    margin-top: 1.9rem;
    padding-top: 0;
  }

.manager-report-filter-switch .form-check-label {
    white-space: nowrap;
  }

  .manager-report-detail-grid .table a {
    color: #2f2a27;
    text-decoration-color: #cbb7a6;
  }

  .manager-report-detail-grid .table a:hover,
  .manager-report-detail-grid .table a:focus {
    color: #9a7f67;
    text-decoration-color: #9a7f67;
  }

  .manager-report-clickable-row {
    cursor: pointer;
  }

.reports-list-row-positive.reports-rank-1 {
  background: linear-gradient(90deg, rgba(226, 239, 220, 0.96), rgba(255, 253, 251, 0.98)) !important;
  border-color: #cfe1c7 !important;
}

.reports-list-row-positive.reports-rank-2 {
  background: linear-gradient(90deg, rgba(231, 241, 226, 0.94), rgba(255, 253, 251, 0.98)) !important;
  border-color: #d6e5ce !important;
}

.reports-list-row-positive.reports-rank-3 {
  background: linear-gradient(90deg, rgba(236, 244, 232, 0.92), rgba(255, 253, 251, 0.98)) !important;
  border-color: #dce8d5 !important;
}

.reports-list-row-positive.reports-rank-4 {
  background: linear-gradient(90deg, rgba(241, 246, 238, 0.9), rgba(255, 253, 251, 0.98)) !important;
  border-color: #e3ecdd !important;
}

.reports-list-row-positive.reports-rank-5 {
  background: linear-gradient(90deg, rgba(246, 249, 244, 0.88), rgba(255, 253, 251, 0.98)) !important;
  border-color: #e9f0e4 !important;
}

.reports-list-row-positive-soft.reports-rank-1 {
  background: linear-gradient(90deg, rgba(238, 238, 214, 0.96), rgba(255, 253, 251, 0.98)) !important;
  border-color: #e2dbbb !important;
}

.reports-list-row-positive-soft.reports-rank-2 {
  background: linear-gradient(90deg, rgba(242, 241, 221, 0.94), rgba(255, 253, 251, 0.98)) !important;
  border-color: #e7dfc4 !important;
}

.reports-list-row-positive-soft.reports-rank-3 {
  background: linear-gradient(90deg, rgba(246, 244, 228, 0.92), rgba(255, 253, 251, 0.98)) !important;
  border-color: #ece4cc !important;
}

.reports-list-row-positive-soft.reports-rank-4 {
  background: linear-gradient(90deg, rgba(249, 247, 236, 0.9), rgba(255, 253, 251, 0.98)) !important;
  border-color: #f0e9d5 !important;
}

.reports-list-row-positive-soft.reports-rank-5 {
  background: linear-gradient(90deg, rgba(251, 250, 243, 0.88), rgba(255, 253, 251, 0.98)) !important;
  border-color: #f3eddf !important;
}

.reports-list-row-warning.reports-rank-1 {
  background: linear-gradient(90deg, rgba(248, 226, 228, 0.98), rgba(255, 247, 247, 0.98)) !important;
  border-color: #eebfc6 !important;
}

.reports-list-row-warning.reports-rank-2 {
  background: linear-gradient(90deg, rgba(249, 231, 233, 0.96), rgba(255, 247, 247, 0.98)) !important;
  border-color: #efc8cf !important;
}

.reports-list-row-warning.reports-rank-3 {
  background: linear-gradient(90deg, rgba(250, 236, 237, 0.94), rgba(255, 247, 247, 0.98)) !important;
  border-color: #f1d1d6 !important;
}

.reports-list-row-warning.reports-rank-4 {
  background: linear-gradient(90deg, rgba(252, 241, 242, 0.92), rgba(255, 247, 247, 0.98)) !important;
  border-color: #f3dadd !important;
}

.reports-list-row-warning.reports-rank-5 {
  background: linear-gradient(90deg, rgba(253, 246, 246, 0.9), rgba(255, 247, 247, 0.98)) !important;
  border-color: #f6e4e6 !important;
}

.reports-list-row-positive:hover,
.reports-list-row-positive:focus,
.reports-list-row-positive-soft:hover,
.reports-list-row-positive-soft:focus,
.reports-list-row-warning:hover,
.reports-list-row-warning:focus {
  color: var(--accent-strong);
  text-decoration: none;
}

.reports-align-right {
  text-align: right;
}

.reports-metric-card {
  display: grid;
}

.reports-metric-card .client-dashboard-metric-label,
.reports-metric-card .client-dashboard-metric-meta,
.reports-metric-card .client-dashboard-metric-value {
  text-align: right;
}

.reports-comparison-good {
  color: #47633d !important;
}

.reports-comparison-bad {
  color: #c75a66 !important;
}

.reports-comparison-neutral {
  color: var(--muted) !important;
}

.reports-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.reports-chart-card {
  border: 1px solid #efe2dc;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.9rem;
}

.reports-chart-head {
  display: grid;
  gap: 0.12rem;
  margin-bottom: 0.8rem;
}

.reports-chart-head span {
  color: var(--muted);
  font-size: 0.8rem;
}

.reports-chart-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: end;
  min-height: 220px;
}

.reports-chart-group {
  display: grid;
  gap: 0.45rem;
}

.reports-chart-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.14rem;
  min-height: 180px;
}

.reports-bar {
  display: inline-flex;
  width: 0.42rem;
  min-height: 0.42rem;
  border-radius: 999px 999px 0 0;
}

.reports-bar-invoiced {
  background: #b08d7a;
}

.reports-bar-paid {
  background: #7d8f67;
}

.reports-bar-realized {
  background: #c7a46b;
}

.reports-bar-attended {
  background: #7d8f67;
}

.reports-bar-justified {
  background: #d7b480;
}

.reports-bar-rescheduled {
  background: #8da2c6;
}

.reports-bar-pause {
  background: #caa7b3;
}

.reports-bar-total {
  background: #d7c4ba;
}

.reports-chart-label {
    text-align: center;
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
}

.reports-chart-label-year {
    font-size: 0.72rem;
    text-transform: none;
    white-space: nowrap;
}

.reports-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.reports-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.reports-bar-dot {
  display: inline-flex;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
}

.reports-table th:not(:first-child),
.reports-table td:not(:first-child) {
  text-align: right;
}

[data-reports-host].is-loading {
  opacity: 0.65;
  transition: opacity 0.18s ease;
}

.reports-row-active td {
    background: rgba(244, 239, 234, 0.72);
}

.reports-row-delta-wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: 0.2rem;
    font-size: 0.76rem;
    line-height: 1.15;
    white-space: nowrap;
}

.reports-row-delta-prev {
    color: #9a8b80;
}

.reports-row-delta-good {
    color: #5b8d68;
    font-weight: 600;
}

.reports-row-delta-bad {
    color: #c96a74;
    font-weight: 600;
}

.reports-row-delta-neutral {
    color: #9a8b80;
}

.reports-ai-copy {
    white-space: normal;
    line-height: 1.65;
    color: #564e49;
}

.reports-ai-copy p {
    margin: 0 0 0.8rem;
}

.reports-ai-copy p:last-child {
    margin-bottom: 0;
}

.reports-ai-copy strong {
    color: #2f2a27;
    font-weight: 700;
}

.manager-report-price-review-row {
    align-items: center;
}

.manager-report-price-review-main {
    min-width: 0;
}

.manager-report-price-review-metrics {
    display: grid;
    justify-items: end;
    gap: 0.08rem;
    text-align: right;
    flex: 0 0 auto;
}

.manager-report-price-review-metrics strong {
    font-size: 1rem;
    line-height: 1.1;
}

.manager-report-price-review-metrics .client-dashboard-meta-subtle {
    color: #8a7a6e;
    font-size: 0.76rem;
    line-height: 1.2;
    white-space: nowrap;
}

.manager-report-price-review-metrics .client-dashboard-meta-subtle span {
    display: inline;
}

.reports-row-empty {
    color: var(--muted);
}

.reports-client-year-list {
    display: grid;
    gap: 0.38rem;
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px dashed #eadfd8;
}

.reports-client-year-label {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.client-dashboard-list-row-static:hover,
.client-dashboard-list-row-static:focus {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.64);
    border-color: #efe2dc;
}

@media (max-width: 768px) {
    .reports-filter-shell {
        top: 0.5rem;
    }

    .reports-row-delta-wrap {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.1rem;
    }

    .reports-client-panels {
        grid-template-columns: 1fr;
    }

    .reports-score-grid {
        grid-template-columns: 1fr;
    }

    .manager-report-comparison-grid {
        grid-template-columns: 1fr;
    }

    .manager-report-filter-switch {
      margin-top: 0.25rem;
      min-height: auto;
    }
  }

@media (max-width: 992px) {
  .reports-chart-grid {
    grid-template-columns: 1fr;
  }
}

.client-dashboard-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #efe2dc;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  text-decoration: none;
}

.client-dashboard-list-row:hover,
.client-dashboard-list-row:focus {
  color: var(--accent-strong);
  text-decoration: none;
  background: linear-gradient(90deg, rgba(244, 236, 234, 0.82), rgba(255, 253, 251, 0.98));
  border-color: #e6d8d1;
}

.client-dashboard-list-row-danger {
  background: linear-gradient(90deg, rgba(247, 224, 226, 0.96), rgba(255, 247, 247, 0.98));
  border-color: #edc8cf;
}

.client-dashboard-list-row-danger:hover,
.client-dashboard-list-row-danger:focus {
  background: linear-gradient(90deg, rgba(245, 215, 219, 0.98), rgba(255, 244, 245, 0.98));
  border-color: #e7b8c0;
}

.client-dashboard-list-row-status-arrived {
  background: linear-gradient(90deg, rgba(231, 239, 226, 0.9), rgba(255, 253, 251, 0.98));
  border-color: #d9e6d1;
}

.client-dashboard-list-row-status-postponed {
  background: linear-gradient(90deg, rgba(247, 234, 215, 0.94), rgba(255, 251, 248, 0.98));
  border-color: #efd8ba;
}

.client-dashboard-list-row-status-excused {
  background: linear-gradient(90deg, rgba(248, 229, 227, 0.96), rgba(255, 253, 251, 0.98));
  border-color: #ebc9c6;
}

.client-dashboard-list-row-status-pause {
  background: linear-gradient(90deg, rgba(234, 239, 247, 0.94), rgba(250, 252, 255, 0.98));
  border-color: #d6e1f0;
}

.client-dashboard-list-row-status-other {
  background: linear-gradient(90deg, rgba(241, 236, 230, 0.96), rgba(255, 253, 251, 0.98));
  border-color: #e4d8cf;
}

.client-dashboard-list-row div {
  min-width: 0;
}

.client-dashboard-list-row strong,
.client-dashboard-list-row span {
  display: block;
}

.client-dashboard-list-row strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.client-dashboard-list-row span {
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.25;
  white-space: nowrap;
}

.reports-client-panels .client-dashboard-list-row > div:first-child > span > span,
.reports-score-grid .client-dashboard-list-row > div:first-child > span > span {
  display: inline;
}

.client-dashboard-money-ok {
  color: #4b8a58 !important;
  font-weight: 700;
}

.client-dashboard-money-open {
  color: #c75a66 !important;
  font-weight: 700;
}

.client-dashboard-measurement-list {
  display: grid;
  gap: 0.65rem;
}

.client-dashboard-measurement-form {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  padding: 0.8rem;
  border: 1px solid #eadcd4;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.96), rgba(251, 246, 242, 0.94));
}

.client-dashboard-measurement-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.client-dashboard-measurement-form-grid > div {
  min-width: 0;
}

.client-dashboard-measurement-form-note {
  grid-column: 1 / span 3;
}

.client-dashboard-measurement-form-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.client-dashboard-measurement-form .form-label {
  margin-bottom: 0.35rem;
}

.client-dashboard-measurement-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.72rem;
  border: 1px solid #efe2dc;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
}

.client-dashboard-measurement-head {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: start;
}

.client-dashboard-measurement-head strong,
.client-dashboard-measurement-head span {
  display: block;
  min-width: 0;
}

.client-dashboard-measurement-head strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.2;
}

.client-dashboard-measurement-head span {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
  text-align: right;
}

.client-dashboard-measurement-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.client-dashboard-measurement-values > div {
  min-width: 0;
  padding: 0.55rem;
  border-radius: 12px;
  background: #fffaf7;
}

.client-dashboard-measurement-values span,
.client-dashboard-measurement-values strong,
.client-dashboard-measurement-values em {
  display: block;
}

.client-dashboard-measurement-values span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-dashboard-measurement-values strong {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.25;
}

.client-dashboard-measurement-values em {
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.client-dashboard-measurement-positive {
  color: #4b8a58;
}

.client-dashboard-measurement-neutral {
  color: #b76b55;
}

.kpr-toolbar {
  margin-bottom: 0;
}

.kpr-form-shell {
  max-width: 1400px;
}

.kpr-toolbar {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.kpr-toolbar-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  flex: 1 1 auto;
}

.kpr-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.kpr-sheet {
  display: grid;
  gap: 1rem;
}

.kpr-sheet-form-tag {
  text-align: right;
  font-size: 0.88rem;
  color: var(--muted);
}

.kpr-sheet-title {
  text-align: center;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  letter-spacing: 0.1em;
  font-weight: 800;
  color: #5f4d42;
}

.kpr-sheet-meta {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0.55rem 1rem;
  align-items: end;
}

.kpr-sheet-meta-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8f7462;
}

.kpr-sheet-meta-value {
  min-height: 2rem;
  padding: 0.2rem 0 0.3rem;
  border-bottom: 1px solid rgba(143, 116, 98, 0.4);
  color: #2f2a27;
}

.kpr-table-wrap {
  overflow-x: auto;
}

.kpr-table {
  table-layout: fixed;
  min-width: 1120px;
}

.kpr-col-seq {
  width: 7%;
}

.kpr-col-date {
  width: 13%;
}

.kpr-col-doc {
  width: 15%;
}

.kpr-col-desc {
  width: 29%;
}

.kpr-col-cash,
.kpr-col-wire,
.kpr-col-total {
  width: 12%;
}

.kpr-table thead th {
  font-size: 0.72rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpr-table tbody td a {
  color: #2f2a27;
  text-decoration-color: rgba(95, 77, 66, 0.38);
  text-underline-offset: 0.14em;
}

.kpr-table tbody td a:hover,
.kpr-table tbody td a:focus-visible {
  color: #5f4d42;
  text-decoration-color: rgba(95, 77, 66, 0.68);
}

.kpr-table-index-row th {
  font-size: 0.68rem !important;
  font-weight: 500 !important;
  color: var(--muted) !important;
  background: rgba(255, 255, 255, 0.9) !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  .kpr-form-shell {
    max-width: none;
    box-shadow: none;
    border-radius: 0;
    border-color: #bcae9f;
    padding: 0;
  }

  .kpr-toolbar,
  .page-header,
  header,
  footer {
    display: none !important;
  }

  .kpr-table {
    min-width: 0;
  }
}

.kpr-row-unpaid td {
  background: rgba(247, 224, 226, 0.22);
  color: #7d6961;
}

.kpr-row-unpaid td a {
  color: #8b4e57;
}

@media (max-width: 767.98px) {
  .kpr-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .kpr-toolbar-filter,
  .kpr-toolbar-actions {
    width: 100%;
  }

  .kpr-toolbar-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .kpr-toolbar-actions .btn,
  .kpr-toolbar-actions form {
    flex: 1 1 100%;
  }

  .kpr-sheet-meta {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .kpr-sheet-meta-value {
    margin-bottom: 0.45rem;
  }
}

.client-dashboard-info-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.client-dashboard-info-list div {
  display: grid;
  gap: 0.18rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed #eadfd8;
}

.client-dashboard-info-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.client-dashboard-info-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-dashboard-info-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.35;
}

.client-dashboard-notes {
  display: grid;
  gap: 0.8rem;
}

.client-dashboard-notes > div {
  padding: 0.72rem 0.78rem;
  border: 1px solid #efe2dc;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.client-dashboard-note-label {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.client-dashboard-notes p {
  margin: 0;
  color: var(--ink);
  white-space: pre-line;
}

.training-form-shell [data-training-items-table] {
  border-collapse: separate;
  border-spacing: 0 0.55rem;
}

.training-form-shell [data-training-items-table] thead th {
  padding: 0 0.55rem 0.45rem;
  border-bottom: 0;
  color: #6f675f;
  font-size: 0.76rem;
  font-weight: 800;
  vertical-align: bottom;
}

[data-training-item-row] td {
  padding: 0;
  border: 0;
  background: transparent;
}

.training-item-card {
  border: 1px solid #eadfd8;
  border-radius: 16px;
  background: rgba(255, 253, 251, 0.97);
  box-shadow: 0 10px 18px rgba(24, 34, 47, 0.04);
  padding: 0.7rem;
}

.training-item-grid {
  display: grid;
  grid-template-columns: 5.25rem minmax(14rem, 1fr) 5rem 10rem 10rem 8rem 5.5rem;
  gap: 0.7rem;
  align-items: center;
}

.training-item-grid + .training-item-grid {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #eadfd8;
}

.training-item-field,
.training-item-note-field {
  min-width: 0;
}

.training-item-inline-label {
  color: #8d7768;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.training-item-inline-label-empty {
  visibility: hidden;
}

.training-item-grid-note-only .training-item-note-field {
  grid-column: 2 / -1;
}

.training-item-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.45rem;
}

.training-item-drag-handle {
  display: inline-grid;
  gap: 0.18rem;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #e5d7cf;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdfb 0%, #f6efeb 100%);
  color: #9a8576;
  cursor: grab;
  vertical-align: middle;
}

.training-item-drag-handle span {
  display: block;
  width: 0.68rem;
  height: 0.12rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.82;
}

.training-item-drag-handle:hover,
.training-item-drag-handle:focus {
  border-color: #d4beb0;
  color: var(--accent-strong);
}

.training-item-drag-handle:active {
  cursor: grabbing;
}

.training-item-actions .btn {
  width: 2.1rem;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  line-height: 1;
  font-size: 1rem;
}

.training-item-actions .training-item-drag-handle,
.training-item-actions .btn {
  align-self: flex-end;
}

.training-list-title {
  font-weight: 700;
}

.training-dashboard-filter {
  display: flex;
  align-items: end;
  gap: 0.85rem 1rem;
  flex-wrap: wrap;
  width: min(100%, 38rem);
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
}

.training-dashboard-filter-field {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-width: 0;
}

.training-dashboard-filter-field .form-label {
  color: #6f675f;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.training-dashboard-filter-field-year {
  flex: 0 0 11.5rem;
}

.training-dashboard-filter-field-year .form-select {
  width: 100%;
  min-width: 0;
}

.training-dashboard-filter-field-client {
  flex: 1 1 19rem;
}

.training-dashboard-filter-field-client .lookup-input-group,
.training-dashboard-filter-field-client .lookup-autocomplete,
.training-dashboard-filter-field-client .lookup-combobox,
.training-dashboard-filter .lookup-autocomplete,
.training-dashboard-filter .lookup-combobox {
  width: 100%;
}

.training-dashboard-metrics,
.training-detail-metrics {
  margin-bottom: 1rem;
}

.training-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.training-dashboard-section-spaced {
  margin-bottom: 1rem;
}

.training-dashboard-top-exercise-item {
  display: grid;
  gap: 0;
}

.training-dashboard-top-exercise-item + .training-dashboard-top-exercise-item {
  margin-top: 0.55rem;
}

.training-dashboard-top-exercise-item.is-selected .client-dashboard-list-row {
  border-color: #dcc9be;
  background: linear-gradient(90deg, rgba(247, 240, 236, 0.98), rgba(255, 253, 251, 0.98));
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  box-shadow: inset 0 -1px 0 rgba(220, 201, 190, 0.72);
}

.training-dashboard-top-exercise-item.is-selected .client-dashboard-list-row strong {
  color: var(--accent-strong);
}

.training-dashboard-inline-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--accent-strong);
  text-decoration: none;
}

.training-dashboard-inline-toggle:hover,
.training-dashboard-inline-toggle:focus {
  color: var(--accent-strong);
  text-decoration: underline;
}

.training-dashboard-top-exercise-item.is-selected .training-dashboard-inline-toggle {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
}

.training-dashboard-inline-toggle:focus-visible {
  border-radius: 0.35rem;
  box-shadow: 0 0 0 0.12rem rgba(159, 133, 116, 0.18);
}

.training-dashboard-exercise-inline-detail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-0.2rem);
  transition: max-height 260ms ease, opacity 220ms ease, transform 220ms ease, margin-top 220ms ease;
  margin-top: -0.15rem;
  padding: 0;
}

.training-dashboard-exercise-inline-detail.is-expanded {
  max-height: 40rem;
  opacity: 1;
  transform: translateY(0);
  margin-top: 0;
}

.training-dashboard-exercise-inline-detail-head {
  padding: 0.65rem 0.9rem 0.4rem;
}

.training-dashboard-exercise-inline-detail-head span {
  display: block;
  color: #84786f;
  font-size: 0.74rem;
  line-height: 1.25;
}

.training-dashboard-top-exercise-item.is-selected .training-dashboard-exercise-inline-detail {
  border: 1px solid #dcc9be;
  border-top: 0;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  background: linear-gradient(180deg, rgba(252, 248, 245, 0.98), rgba(255, 253, 251, 0.98));
}

.training-dashboard-top-exercise-item.is-selected .table-shell {
  padding: 0 0.9rem 0.8rem;
}

.training-dashboard-top-exercise-item.is-selected .table-shell .table-responsive {
  margin: 0;
}

.training-dashboard-top-exercise-item.is-selected .admin-table {
  margin-bottom: 0;
}

.training-dashboard-top-exercise-item.is-selected .admin-table thead th {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  color: #8b7768;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
}

.training-dashboard-top-exercise-item.is-selected .admin-table tbody td {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.training-dashboard-pie-layout {
  display: grid;
  grid-template-columns: minmax(10rem, 12rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.training-dashboard-pie-card {
  position: relative;
  width: min(100%, 12rem);
  aspect-ratio: 1;
  margin: 0 auto;
}

.training-dashboard-pie-chart {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 251, 0.9);
}

.training-dashboard-pie-hole {
  position: absolute;
  inset: 50%;
  width: 48%;
  height: 48%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fffdfb;
  box-shadow: 0 8px 16px rgba(24, 34, 47, 0.06);
  display: grid;
  place-items: center;
  text-align: center;
}

.training-dashboard-pie-hole strong,
.training-dashboard-pie-hole span {
  display: block;
  line-height: 1.05;
}

.training-dashboard-pie-hole strong {
  font-size: 1.15rem;
}

.training-dashboard-pie-hole span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.training-dashboard-pie-legend {
  display: grid;
  gap: 0.55rem;
}

.training-dashboard-pie-legend-row {
  display: grid;
  grid-template-columns: 0.8rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
}

.training-dashboard-pie-swatch {
  display: block;
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.22rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(58, 57, 55, 0.08);
}

.training-dashboard-pie-legend-row strong,
.training-dashboard-pie-legend-row span {
  display: block;
}

.training-dashboard-pie-legend-row strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.training-dashboard-pie-legend-row span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.training-dashboard-trend {
  min-height: 12rem;
}

.training-dashboard-progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.training-dashboard-progress-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
  border: 1px solid #efe2dc;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
}

.training-dashboard-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.training-dashboard-progress-head strong,
.training-dashboard-progress-head span {
  display: block;
}

.training-dashboard-progress-head strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.training-dashboard-progress-head span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.training-dashboard-progress-metric {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: #f4ecea;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.training-dashboard-progress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.training-dashboard-progress-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.training-dashboard-progress-legend-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  display: inline-block;
}

.training-dashboard-progress-chart-shell {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem 0.65rem 0.6rem;
  border-radius: 14px;
  background: #fffaf7;
}

.training-dashboard-progress-chart {
  width: 100%;
  height: 10.5rem;
  display: block;
}

.training-dashboard-progress-axis {
  stroke: #e4d6cf;
  stroke-width: 0.8;
}

.training-dashboard-progress-path {
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.training-dashboard-progress-path.training-dashboard-progress-line-sets,
.training-dashboard-progress-path.training-dashboard-progress-line-repetitions,
.training-dashboard-progress-path.training-dashboard-progress-line-endurance {
  fill: none;
}

.training-dashboard-progress-node {
  stroke: #fffaf7;
  stroke-width: 1;
  fill: currentColor;
  vector-effect: non-scaling-stroke;
  transition: transform 120ms ease;
  pointer-events: none;
}

.training-dashboard-progress-hitbox {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
  cursor: pointer;
}

.training-dashboard-progress-line-sets {
  color: #9f8574;
  background: #9f8574;
  stroke: #9f8574;
}

.training-dashboard-progress-line-repetitions {
  color: #6f8c78;
  background: #6f8c78;
  stroke: #6f8c78;
}

.training-dashboard-progress-line-weight {
  color: #7f9db8;
  background: #7f9db8;
  stroke: #7f9db8;
}

.training-dashboard-progress-line-endurance {
  color: #a76d7a;
  background: #a76d7a;
  stroke: #a76d7a;
}

.training-dashboard-progress-node-sets {
  color: #9f8574;
}

.training-dashboard-progress-node-repetitions {
  color: #6f8c78;
}

.training-dashboard-progress-node-weight {
  color: #7f9db8;
}

.training-dashboard-progress-node-endurance {
  color: #a76d7a;
}

.training-dashboard-progress-dates {
  display: grid;
  gap: 0.2rem;
  align-items: flex-start;
}

.training-dashboard-progress-dates span {
  color: var(--muted);
  font-size: 0.64rem;
  text-align: center;
  white-space: nowrap;
  min-height: 0.9rem;
  display: block;
}

.training-dashboard-progress-date-muted {
  color: #d6c8c1;
}

.training-dashboard-tooltip-date {
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.training-dashboard-tooltip-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: baseline;
}

.training-dashboard-tooltip-row + .training-dashboard-tooltip-row {
  margin-top: 0.12rem;
}

.training-dashboard-tooltip-row span {
  text-align: left;
}

.training-dashboard-tooltip-row strong {
  text-align: right;
  font-weight: 700;
}

.training-dashboard-progress-metrics {
  display: grid;
  gap: 0.45rem;
}

.training-dashboard-progress-metric-row {
  display: grid;
  grid-template-columns: minmax(5rem, 6rem) minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  background: #fffaf7;
}

.training-dashboard-progress-metric-row span,
.training-dashboard-progress-metric-row strong,
.training-dashboard-progress-metric-row em {
  display: block;
}

.training-dashboard-progress-metric-row span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
}

.training-dashboard-progress-metric-row strong {
  font-size: 0.82rem;
  line-height: 1.2;
}

.training-dashboard-progress-delta {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
}

.training-dashboard-progress-delta-up {
  color: #4b8a58;
}

.training-dashboard-progress-delta-down {
  color: #c75a66;
}

.training-dashboard-progress-delta-neutral {
  color: var(--muted);
}

.training-list-flags,
.training-feedback-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.training-flag {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.26rem 0.68rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid #e0d2cb;
  background: rgba(255, 253, 251, 0.96);
  color: var(--ink);
}

.training-flag-success {
  border-color: #cbe0cf;
  background: #eef7ef;
  color: #4b8a58;
}

.training-flag-warning {
  border-color: #efd8ba;
  background: #fff6ea;
  color: #b06d1d;
}

.training-flag-neutral {
  border-color: #ddd1ca;
  background: #fbf7f4;
  color: #78695f;
}

.training-item-feedback-shell {
  display: grid;
  gap: 0.35rem;
}

.training-item-feedback-shell + .training-item-feedback-shell {
  margin-top: 0.45rem;
}

.training-item-feedback-list {
  display: grid;
  gap: 0.28rem;
}

.training-item-feedback-row {
  display: grid;
  grid-template-columns: minmax(6.25rem, 7.5rem) auto auto auto;
  gap: 0.35rem;
  align-items: baseline;
  font-size: 0.88rem;
  justify-content: start;
}

.training-item-feedback-label {
  color: var(--muted);
  font-weight: 700;
}

.training-item-feedback-value {
  color: #8b8178;
  text-decoration: line-through;
  min-width: 0;
}

.training-item-feedback-arrow {
  color: var(--accent-strong);
  font-weight: 700;
}

.training-item-feedback-value-updated {
  color: var(--ink);
  min-width: 0;
}

.training-item-notes-grid {
  display: grid;
  grid-template-columns: minmax(5.5rem, 6.5rem) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
}

.training-completed-toggle {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  padding: 0.78rem 0.85rem;
  border: 1px solid #d7e5d9;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(231, 239, 226, 0.78), rgba(255, 253, 251, 0.98));
  cursor: pointer;
}

.training-completed-toggle .form-check-input {
  flex: 0 0 auto;
  margin-top: 0.18rem;
}

.training-completed-toggle strong,
.training-completed-toggle small {
  display: block;
}

.training-completed-toggle strong {
  color: var(--ink);
  line-height: 1.2;
}

.training-completed-toggle small {
  color: var(--muted);
  line-height: 1.3;
}

.training-item-feedback-edit-grid {
  display: grid;
  grid-template-columns: minmax(5.5rem, 6.5rem) repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: center;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(228, 216, 207, 0.75);
  opacity: 0.88;
}

.training-item-notes-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: start;
  padding-top: 0.05rem;
}

.training-item-notes-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.training-item-notes-label-subtle {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #9a8d84;
}

.training-item-feedback-edit-grid .form-control {
  background: rgba(255, 253, 251, 0.74);
  border-color: #e8ddd6;
  color: #72665d;
}

.training-item-feedback-edit-grid .form-control::placeholder {
  color: #a1948c;
}

.training-item-previous-meta {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: normal;
}

.training-form-shell {
  max-width: 1400px;
}

.training-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.training-editor-main {
  min-width: 0;
}

.training-history-panel {
  position: sticky;
  top: 1rem;
  border: 1px solid #e7d9d2;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdfb 0%, #fbf6f2 100%);
  padding: 1rem 1.05rem;
  box-shadow: 0 10px 24px rgba(24, 34, 47, 0.045);
}

.training-history-head h3 {
  margin: 0;
  font-size: 1rem;
}

.training-history-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.training-history-head p.training-history-active,
.training-history-head [data-training-history-context].training-history-active {
  color: var(--accent-strong);
  font-weight: 700;
}

.training-history-body {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.training-history-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.training-history-entry {
  border: 1px solid #efe2dc;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 0.85rem;
}

.training-history-entry-top {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.training-history-entry-top strong {
  font-size: 0.9rem;
  color: var(--ink);
}

.training-history-entry-top span {
  color: var(--muted);
  font-size: 0.76rem;
}

.training-history-entry-title {
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
}

.training-history-entry-meta {
  margin-top: 0.35rem;
  color: #6b625b;
  font-size: 0.8rem;
  line-height: 1.35;
}

.training-history-entry-notes {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  border-top: 1px dashed #eadfd8;
  padding-top: 0.4rem;
}

[data-training-item-row] {
  cursor: pointer;
}

[data-training-item-row].training-item-row-dragging {
  opacity: 0.42;
}

.training-item-drag-preview {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 72rem;
  pointer-events: none;
  z-index: 9999;
}

.training-item-drag-preview [data-training-item-row] td {
  opacity: 1 !important;
}

.training-item-drag-preview [data-training-item-row] {
  cursor: grabbing;
}

.training-item-row-selected .training-item-card {
  background: linear-gradient(180deg, rgba(247, 239, 234, 0.98), rgba(255, 252, 249, 1));
  border-color: #e2ccc0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(159, 133, 116, 0.08);
}

[data-training-item-row].training-item-row-drop-before .training-item-card {
  box-shadow:
    inset 0 3px 0 rgba(159, 133, 116, 0.9),
    0 10px 18px rgba(24, 34, 47, 0.04);
}

[data-training-item-row].training-item-row-drop-after .training-item-card {
  box-shadow:
    inset 0 -3px 0 rgba(159, 133, 116, 0.9),
    0 10px 18px rgba(24, 34, 47, 0.04);
}

@media (max-width: 1200px) {
  .training-item-grid {
    grid-template-columns: 5.25rem minmax(12rem, 1fr) 4.5rem 8rem 8rem 7rem 5rem;
    gap: 0.55rem;
  }
}

@media (max-width: 992px) {
  .training-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-item-grid > .training-item-inline-label {
    grid-column: 1 / -1;
  }

  .training-item-grid-note-only .training-item-note-field,
  .training-item-note-field {
    grid-column: auto;
  }

  .training-item-actions {
    justify-content: flex-start;
  }
}

.modal.fade .modal-dialog {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: transform 220ms ease, opacity 220ms ease;
}

.modal.fade {
  transition: opacity 220ms ease;
}

.modal.show .modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal.is-hiding .modal-dialog {
  opacity: 0;
  transform: translateY(10px) scale(0.986);
}

.modal-content {
  animation: modalSurfaceIn 220ms ease;
}

.modal.fade:not(.show) .modal-content,
.modal.is-hiding .modal-content {
  animation: modalSurfaceOut 180ms ease forwards;
}

.modal-backdrop {
  transition: opacity 180ms ease;
}

.modal-backdrop.is-hiding {
  opacity: 0;
}

.app-modal-progress {
  margin-top: 16px;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(159, 133, 116, 0.14);
  overflow: hidden;
}

.app-modal-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9f8574 0%, #d4b39d 100%);
}

@keyframes modalSurfaceIn {
  0% {
    opacity: 0.72;
    box-shadow: 0 0 0 rgba(24, 34, 47, 0);
  }

  100% {
    opacity: 1;
    box-shadow: 0 18px 38px rgba(24, 34, 47, 0.12);
  }
}

@keyframes modalSurfaceOut {
  0% {
    opacity: 1;
    box-shadow: 0 18px 38px rgba(24, 34, 47, 0.12);
  }

  100% {
    opacity: 0.82;
    box-shadow: 0 6px 14px rgba(24, 34, 47, 0.04);
  }
}

.quick-lookup-modal .modal-header,
.quick-lookup-modal .modal-body {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.quick-lookup-modal .modal-header {
  border-bottom-color: #efe4de;
}

.app-confirm-summary {
  display: grid;
  gap: 0.75rem;
}

.app-confirm-summary-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.app-confirm-summary-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #eadcd6;
  border-radius: 16px;
  background: rgba(255, 253, 251, 0.92);
}

.app-confirm-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
}

.app-confirm-summary-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-confirm-summary-value {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.form-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.form-link-chip:hover,
.form-link-chip:focus {
  color: var(--accent);
}

.payment-form-mode-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid #eadcd5;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.98), rgba(249, 242, 238, 0.96));
}

.payment-form-mode-copy {
  display: grid;
  gap: 0.2rem;
}

.payment-form-mode-copy strong {
  font-size: 0.95rem;
}

.payment-form-mode-copy span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.form-check.form-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding-left: 0;
}

.form-check.form-switch .form-check-input {
  width: 2.7rem;
  height: 1.5rem;
  margin: 0;
  margin-left: 0;
  flex: 0 0 auto;
}

.form-check.form-switch .form-check-label {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.1;
}

.form-switch-field-group {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.form-switch-field-group .form-switch-field {
  margin-top: 1.95rem;
}

.payment-online-switch {
  min-height: 2.45rem;
  margin-top: 1.95rem;
  display: inline-flex;
  align-items: center;
}

.segmented-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
}

.segmented-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-toggle-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid #e0d2cb;
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.94);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.segmented-toggle-option:hover,
.segmented-toggle-option:focus {
  border-color: rgba(159, 133, 116, 0.68);
  color: var(--accent-strong);
}

.segmented-toggle-input:checked + .segmented-toggle-option {
  border-color: var(--accent);
  background: #f4ecea;
  color: var(--accent-strong);
  box-shadow: 0 0 0 0.16rem rgba(159, 133, 116, 0.12);
}

.segmented-toggle-input:focus-visible + .segmented-toggle-option {
  border-color: rgba(159, 133, 116, 0.68);
  box-shadow: 0 0 0 0.16rem rgba(159, 133, 116, 0.12);
}

.delete-check {
  padding: 0.9rem 1rem;
  border: 1px solid #edd7d8;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.btn-danger-soft {
  background: #fff;
  color: #b42338;
  border: 1px solid #efc0c7;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.55rem 1rem;
}

.btn-danger-soft:hover,
.btn-danger-soft:focus {
  background: #fff1f3;
  color: #9f1239;
  border-color: #e59aa8;
}

@media (max-width: 900px) {
  .hero,
  .roadmap,
  .dashboard-finance-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .dashboard-hero-inline {
    flex-direction: column;
  }

  .dashboard-date-card {
    min-width: 0;
    text-align: left;
  }

  .dashboard-metric-grid,
  .dashboard-board,
  .finance-stat-grid {
    grid-template-columns: 1fr;
  }

  .reports-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-panel,
  .dashboard-panel-wide {
    grid-column: auto;
  }

  .manager-report-top-summary-grid,
  .manager-report-client-panels-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-merged-stack {
    grid-template-columns: 1fr;
  }

  .page-header {
    align-items: start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions .btn {
    width: 100%;
  }

  .list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-primary {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-primary .search-field,
  .toolbar-primary .filter-select,
  .toolbar-primary .filter-select-sm,
  .toolbar-primary .filter-check,
  .toolbar-primary .exercise-filter-autocomplete {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 0 0 auto;
  }

  .toolbar-primary .compact-select,
  .toolbar-primary .filter-select,
  .toolbar-primary .filter-select-sm,
  .toolbar-primary .exercise-filter-combobox {
    height: 2.45rem;
    min-height: 2.45rem;
    max-height: 2.45rem;
  }

  .lookup-grid {
    grid-template-columns: 1fr;
  }

  .client-dashboard-metrics,
  .client-dashboard-grid,
  .client-dashboard-package-grid,
  .client-dashboard-split,
  .client-dashboard-attendance-metrics,
  .client-dashboard-training-trend,
  .training-dashboard-pie-layout,
  .training-dashboard-progress-grid,
  .client-dashboard-measurement-form-grid,
  .client-dashboard-measurement-values,
  .training-item-feedback-edit-grid,
  .training-dashboard-grid,
  .reports-score-grid {
    grid-template-columns: 1fr;
  }

  .client-dashboard-main,
  .client-dashboard-side,
  .client-dashboard-card,
  .reports-filter-shell,
  .reports-chart-card {
    min-width: 0;
    max-width: 100%;
  }

  .client-dashboard-card-head,
  .client-dashboard-coverage-head,
  .client-dashboard-coverage-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .client-dashboard-coverage-summary,
  .client-dashboard-coverage-actions,
  .reports-align-right {
    text-align: left;
  }

  .client-dashboard-list-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .client-dashboard-feedback-row,
  .client-dashboard-measurement-head,
  .training-dashboard-filter {
    flex-direction: column;
    align-items: flex-start;
  }

  .training-dashboard-filter,
  .training-dashboard-filter-field,
  .training-dashboard-filter-field-year,
  .training-dashboard-filter-field-client,
  .training-dashboard-filter .form-select {
    width: 100%;
  }

  .client-dashboard-measurement-head span {
    text-align: left;
  }

  .client-dashboard-list-row > div:last-child,
  .client-dashboard-list-row > span:last-child {
    width: 100%;
    text-align: left;
  }

  .reports-client-panels .client-dashboard-list-row > div:last-child,
  .reports-score-grid .client-dashboard-list-row > div:last-child,
  .reports-client-panels .client-dashboard-list-row > span:last-child,
  .reports-score-grid .client-dashboard-list-row > span:last-child {
    text-align: right;
  }

  .client-dashboard-list-row span {
    white-space: normal;
  }

  .client-dashboard-coverage-summary {
    white-space: normal;
  }

  .client-dashboard-measurement-form-note {
    grid-column: auto;
  }

  .client-dashboard-measurement-form-actions {
    justify-content: stretch;
  }

  .client-dashboard-measurement-form-actions .btn {
    width: 100%;
  }

  .training-dashboard-progress-metric-row {
    grid-template-columns: 1fr;
  }

  .client-dashboard-coverage-chip {
    width: 100%;
    justify-content: space-between;
  }

  .reports-filter-shell {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .reports-filter-form {
    gap: 0.55rem 0;
  }

  .reports-chart-card {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .reports-chart-body,
  .reports-chart-legend {
    min-width: 31rem;
  }

  .reports-filter-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .reports-filter-label {
    display: none;
  }

  .reports-filter-shell {
    border-radius: 18px;
  }

  .reports-filter-shell.is-collapsed {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .reports-filter-body {
    margin-top: 0.6rem;
  }

  .reports-filter-select {
    min-height: 2.15rem;
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
  }

  .search-field {
    max-width: none;
  }

  .calendar-header-actions,
  .calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-header-actions {
    justify-content: flex-start;
  }

  .calendar-action-group,
  .calendar-action-strip {
    width: 100%;
  }

  .admin-table thead th,
  .admin-table tbody td {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive > .table {
    min-width: 42rem;
  }

  .app-footer-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-footer-note {
    text-align: left;
  }

  .app-mobile-presence {
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
  }
}

@media (max-width: 1220px) {
  .dashboard-schedule-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.45rem;
  }

  .dashboard-schedule-inline {
    min-width: 0;
  }

  .dashboard-schedule-row .dashboard-row-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-schedule-row .dashboard-inline-form {
    width: 100%;
  }

  .dashboard-schedule-row .dashboard-status-select {
    width: 100%;
    min-width: 0;
  }
}

.newsletter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.scheduled-mail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.newsletter-section-card {
  max-width: none;
  padding: 1.25rem;
}

.newsletter-main {
  display: grid;
  gap: 1rem;
}

.newsletter-preview-stack {
  display: grid;
  gap: 1rem;
  align-content: start;
  align-self: start;
}

.newsletter-preview-card {
  position: sticky;
}

.scheduled-mail-preview-card {
  top: 4.35rem;
}

.scheduled-mail-preview-group {
  display: grid;
  gap: 0.55rem;
}

.scheduled-mail-preview-group + .scheduled-mail-preview-group {
  margin-top: 1rem;
}

.scheduled-mail-preview-label {
  color: #7f624f;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scheduled-mail-preview-shell {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid #efe2dc;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 247, 243, 0.94));
}

.scheduled-mail-preview-subject {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.scheduled-mail-preview-body {
  color: #61534a;
  font-size: 0.95rem;
  line-height: 1.65;
}

.scheduled-mail-preview-body em {
  color: var(--muted);
}

.newsletter-step-card-locked {
  position: relative;
  overflow: hidden;
}

.newsletter-step-lock-body {
  transition: filter 180ms ease, opacity 180ms ease;
}

.newsletter-step-card-locked .newsletter-step-lock-body {
  filter: blur(1.8px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.newsletter-step-lock-note {
  display: none;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.newsletter-step-card-locked .newsletter-step-lock-note {
  display: block;
}

.todo-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #e6d8d1;
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.92);
  color: var(--accent-strong);
}

.todo-summary-chip span {
  color: var(--muted);
  font-size: 0.8rem;
}

.todo-summary-chip strong {
  font-size: 1rem;
}

.todo-task-create-form {
  margin: 0;
}

.todo-task-create-grid {
  display: grid;
  gap: 0.7rem;
  align-items: start;
}

.todo-task-create-row {
  display: grid;
  gap: 0.7rem;
  grid-column: 1 / -1;
}

.todo-task-create-row-meta {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.todo-task-create-title {
  min-width: 0;
  grid-column: 1 / -1;
}

.todo-task-create-row-options {
  grid-template-columns: minmax(0, max-content) minmax(180px, 1fr);
  align-items: center;
  column-gap: 0.85rem;
}

.todo-task-create-row-options-single {
  grid-template-columns: 1fr;
}

.todo-task-repeat-field {
  display: flex;
  align-items: center;
}

.todo-task-repeat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
}

.todo-task-repeat-toggle input {
  margin: 0;
}

.todo-task-switch-field {
  min-height: 0;
  padding-top: 0;
  margin-bottom: 0;
}

.todo-task-switch-field .form-check-label {
  line-height: 1.2;
  font-size: 0.88rem;
  white-space: nowrap;
}

.todo-task-create-row-options-single .todo-task-switch-field {
  padding-top: 0;
}

.todo-task-create-row-options .todo-task-switch-field {
  align-self: center;
}

.todo-task-repeat-until-field {
  min-width: 0;
  align-self: center;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
}

.todo-task-repeat-until-field .form-control {
  width: 100%;
}

.todo-task-repeat-until-field label {
  margin: 0;
  white-space: nowrap;
  line-height: 1;
}

.todo-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.todo-section {
  display: grid;
  gap: 1rem;
}

.todo-section-full {
  grid-column: 1 / -1;
}

.todo-section-custom-tasks .todo-item-list {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.todo-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.todo-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.todo-section-danger .todo-section-count {
  background: #f8e2e2;
  color: #a64646;
}

.todo-section-warn .todo-section-count,
.todo-section-success .todo-section-count,
.todo-section-neutral .todo-section-count {
  background: #f4ecea;
  color: var(--accent-strong);
}

.todo-item-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.todo-item-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding: 0.95rem 1rem;
  border: 1px solid #ece0da;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.todo-item-card-danger {
  background: linear-gradient(180deg, rgba(255, 248, 248, 0.98), rgba(255, 252, 251, 0.98));
  border-color: #efcdcd;
}

.todo-item-card-warn {
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(255, 253, 251, 0.98));
  border-color: #eddcc8;
}

.todo-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.todo-item-head h2 {
  margin: 0;
  font-size: 1rem;
}

.todo-item-head p {
  margin: 0.22rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.todo-item-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.45rem;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: #f4ecea;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.todo-item-card-danger .todo-item-count {
  background: #f7dfdf;
  color: #a64646;
}

.todo-item-card-warn .todo-item-count {
  background: #f5eadc;
  color: #9a6a35;
}

.todo-example-list {
  display: grid;
  gap: 0.42rem;
}

.todo-example-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.58rem 0.72rem;
  border: 1px solid #efe4de;
  border-radius: 14px;
  background: rgba(255, 253, 251, 0.92);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.todo-example-row-compact {
  align-items: center;
  gap: 0.75rem;
}

.todo-example-main {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  flex: 1 1 auto;
}

.todo-example-title {
  color: inherit;
  text-decoration: none;
}

.todo-example-title:hover,
.todo-example-title:focus {
  color: var(--accent-strong);
}

.todo-example-title-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.todo-example-title-button:hover strong,
.todo-example-title-button:focus strong {
  color: var(--accent-strong);
  text-decoration: underline;
}

.todo-example-title-button:focus {
  outline: none;
}

.is-inactive-row {
  opacity: 0.68;
}

.status-overdue {
  background: rgba(217, 104, 92, 0.12);
  color: #b5544a;
}

.status-warning {
  background: rgba(220, 170, 84, 0.16);
  color: #9b6a10;
}

.todo-example-main small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.todo-example-detail-lines {
  display: grid;
  gap: 0.08rem;
  margin-top: 0.12rem;
}

.todo-example-detail-lines small {
  display: block;
}

.todo-example-meta-stack {
  display: grid;
  gap: 0.15rem;
  justify-items: end;
  flex: 0 1 auto;
}

.todo-example-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.todo-example-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.todo-reminder-form {
  margin: 0;
}

.todo-reminder-preview-body {
  color: var(--ink);
}

.todo-reminder-preview-body p:last-child {
  margin-bottom: 0;
}

.todo-status-form {
  margin: 0;
}

.todo-example-row strong {
  font-size: 0.9rem;
  font-weight: 700;
}

.todo-example-row span {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.todo-example-row:hover,
.todo-example-row:focus {
  border-color: #dccbc3;
  color: var(--accent-strong);
}

.todo-example-row.dashboard-heat-warm-1 {
  background: linear-gradient(90deg, rgba(231, 239, 226, 0.9), rgba(255, 253, 251, 0.98));
  border-color: #d9e6d1;
}

.todo-example-row.dashboard-heat-warm-2 {
  background: linear-gradient(90deg, rgba(241, 240, 221, 0.92), rgba(255, 253, 251, 0.98));
  border-color: #e7dfc2;
}

.todo-example-row.dashboard-heat-warm-3 {
  background: linear-gradient(90deg, rgba(247, 234, 215, 0.94), rgba(255, 251, 248, 0.98));
  border-color: #efd8ba;
}

.todo-example-row.dashboard-heat-warm-4 {
  background: linear-gradient(90deg, rgba(248, 226, 214, 0.95), rgba(255, 249, 246, 0.98));
  border-color: #efccbc;
}

.todo-example-row.dashboard-heat-warm-5 {
  background: linear-gradient(90deg, rgba(247, 224, 226, 0.96), rgba(255, 247, 247, 0.98));
  border-color: #edc8cf;
}

.todo-item-actions {
  display: flex;
  justify-content: flex-end;
}

.todo-task-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.todo-task-icon-button:hover,
.todo-task-icon-button:focus {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink-strong);
}

.todo-task-icon-button svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

@media (max-width: 991.98px) {
  .todo-task-create-row-options {
    grid-template-columns: minmax(0, max-content) minmax(160px, 1fr);
  }

  .todo-sections {
    grid-template-columns: 1fr;
  }

  .todo-item-list {
    grid-template-columns: 1fr;
  }

  .todo-example-row-compact {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .todo-example-meta-stack {
    justify-items: start;
  }
}

@media (max-width: 767.98px) {
  .todo-task-create-row-meta,
  .todo-task-create-row-options {
    grid-template-columns: 1fr;
  }

  .todo-task-switch-field .form-check-label {
    white-space: normal;
  }

  .todo-sections {
    grid-template-columns: 1fr;
  }
}

.newsletter-form-grid {
  display: grid;
  gap: 1rem;
}

.newsletter-section-head-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.newsletter-selection-count {
  display: grid;
  justify-items: end;
  align-self: center;
  margin-top: 0.2rem;
  text-align: right;
  line-height: 1.2;
}

.newsletter-selection-count strong {
  font-size: 1.15rem;
}

.newsletter-selection-count span {
  color: var(--muted);
  font-size: 0.8rem;
}

.newsletter-form-row {
  display: grid;
  gap: 0.5rem;
}

.newsletter-form-row-inline {
  grid-template-columns: 11rem minmax(0, 1fr);
  align-items: center;
}

.newsletter-campaign-row {
  display: grid;
  gap: 0.75rem;
}

.newsletter-recipient-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.newsletter-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #6f675f;
  font-size: 0.9rem;
}

.newsletter-recipient-toolbar .form-control {
  flex: 1 1 18rem;
}

.newsletter-recipient-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-height: 26rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.newsletter-recipient-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(197, 173, 156, 0.45);
  border-radius: 1rem;
  background: #fffdfa;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.newsletter-recipient-card:hover {
  border-color: rgba(159, 133, 116, 0.65);
  background: #fff9f4;
}

.newsletter-recipient-card.is-selected {
  border-color: rgba(123, 157, 115, 0.65);
  background: linear-gradient(180deg, rgba(240, 249, 236, 0.95), rgba(252, 255, 250, 0.95));
  box-shadow: inset 0 0 0 1px rgba(123, 157, 115, 0.14);
}

.newsletter-recipient-checkbox {
  margin-top: 0;
  flex: 0 0 auto;
}

.newsletter-recipient-main {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  flex: 1 1 auto;
}

.newsletter-recipient-main strong,
.newsletter-recipient-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.newsletter-recipient-main strong {
  font-size: 0.94rem;
}

.newsletter-recipient-main small {
  color: #7b7570;
  font-size: 0.8rem;
}

.newsletter-send-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.newsletter-send-card {
  padding: 1rem;
  border: 1px solid rgba(197, 173, 156, 0.35);
  border-radius: 1rem;
  background: #fffdfa;
}

.newsletter-test-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

@media (max-width: 991.98px) {
  .newsletter-layout,
  .scheduled-mail-layout {
    grid-template-columns: 1fr;
  }

  .payment-form-mode-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .newsletter-preview-card {
    position: static;
  }

  .scheduled-mail-preview-card {
    top: auto;
  }
}

@media (max-width: 767.98px) {
  .invoice-meta-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-section-head-split {
    align-items: start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .newsletter-selection-count {
    margin-bottom: 0.15rem;
    justify-items: start;
    line-height: 1.2;
    text-align: left;
  }

  .newsletter-form-row-inline {
    grid-template-columns: 1fr;
  }

  .newsletter-recipient-list,
  .newsletter-send-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-test-row {
    grid-template-columns: 1fr;
  }
}

/* TinyMCE integration with Bootstrap form controls */
.tox-tinymce {
  border-radius: 0.375rem;
  border-color: var(--bs-border-color, #dee2e6);
  box-shadow: none;
}

.tox-tinymce:focus-within {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.tox .tox-toolbar__group {
  border-color: var(--line);
}

.tox-tinymce textarea {
  visibility: hidden;
}

/* Flatpickr date picker */
.flatpickr-calendar {
  border: 1px solid #e6d8cf;
  border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 16px 34px rgba(58, 57, 55, 0.14);
  font-family: inherit;
}

.flatpickr-months {
  padding: 0.35rem 0.35rem 0 0.35rem;
}

.flatpickr-current-month {
  padding-top: 0.3rem;
  color: var(--ink);
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: var(--ink);
  font-weight: 700;
}

.flatpickr-weekdays {
  background: transparent;
}

span.flatpickr-weekday {
  color: #9a8f86;
  font-size: 0.75rem;
  font-weight: 700;
}

.flatpickr-day {
  border-radius: 10px;
  color: var(--ink);
}

.flatpickr-day:hover,
.flatpickr-day:focus {
  background: #f4ecea;
  border-color: #f4ecea;
}

.flatpickr-day.today {
  border-color: #d6b9a7;
  color: #8a6c59;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  background: #9f8574;
  border-color: #9f8574;
  color: #fff;
}

.flatpickr-day.inRange {
  background: #efe4dc;
  border-color: #efe4dc;
  box-shadow: -5px 0 0 #efe4dc, 5px 0 0 #efe4dc;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: #9f8574;
}
