/* Hendrios visual identity on top of the Tabler theme. The values come from
   tokens.css; this file only maps them onto Tabler and evens out its components
   so the template pages match the React pages. */

:root,
[data-bs-theme=light] {
  --tblr-font-sans-serif: var(--h-font-sans);
  --hendrios-font-display: var(--h-font-display);

  --tblr-primary: var(--h-color-primary);
  --tblr-primary-rgb: var(--h-color-primary-rgb);
  --tblr-primary-darken: var(--h-color-primary-strong);
  --tblr-primary-lt: var(--h-color-primary-soft);
  --tblr-primary-lt-rgb: 239, 235, 246;
  --tblr-primary-text-emphasis: var(--h-color-primary-ink);
  --tblr-primary-bg-subtle: var(--h-color-primary-soft);
  --tblr-primary-border-subtle: var(--h-color-primary-line);
  --tblr-link-color: var(--h-color-primary-ink);
  --tblr-link-color-rgb: 75, 59, 120;
  --tblr-link-hover-color: var(--h-color-primary-deep);
  --tblr-link-hover-color-rgb: 47, 37, 80;

  --tblr-danger: var(--h-color-danger);
  --tblr-danger-rgb: var(--h-color-danger-rgb);
  --tblr-danger-darken: var(--h-color-danger-strong);
  --tblr-danger-lt: var(--h-color-danger-soft);
  --tblr-success: var(--h-color-success);
  --tblr-success-rgb: var(--h-color-success-rgb);
  --tblr-success-darken: #1A5C3B;
  --tblr-success-lt: var(--h-color-success-soft);

  --tblr-body-color: var(--h-color-ink);
  --tblr-secondary: var(--h-color-muted);
  --tblr-muted: var(--h-color-muted);
  --tblr-body-bg: var(--h-color-bg);
  --tblr-bg-surface: var(--h-color-surface);
  --tblr-bg-surface-secondary: var(--h-color-tint);
  --tblr-bg-surface-tertiary: var(--h-color-tint);
  --tblr-border-color: var(--h-color-line);
  --tblr-border-color-translucent: var(--h-color-line);
  --tblr-border-active-color: var(--h-color-primary-line);

  --tblr-border-radius: var(--h-radius);
  --tblr-border-radius-sm: var(--h-radius-sm);
  --tblr-border-radius-lg: var(--h-radius-lg);
  --tblr-border-radius-xl: var(--h-radius-xl);
  --tblr-shadow-card: var(--h-shadow-card);
  --tblr-box-shadow: var(--h-shadow-card);
  --tblr-box-shadow-lg: var(--h-shadow-overlay);
  --tblr-shadow-dropdown: var(--h-shadow-overlay);
}

body {
  background-color: var(--h-color-bg);
}
::selection {
  background: var(--h-color-primary-line);
  color: var(--h-color-ink);
}

/* Small headings and table headers: sentence case, as in the React pages. */
.table thead th,
.markdown > table thead th,
.page-pretitle,
.subheader,
.dropdown-header,
.datagrid-title,
.list-group-header,
.hr-text {
  text-transform: none;
  letter-spacing: 0;
}
.table thead th,
.markdown > table thead th {
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--h-color-ink);
}
.page-pretitle,
.subheader {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--h-color-muted);
}
.page-title {
  font-weight: 700;
}

/* Cards: one hairline border, a faint shadow, a transparent header. */
.card {
  --tblr-card-border-color: var(--h-color-line);
  --tblr-card-cap-bg: transparent;
}
.card-title {
  font-weight: 700;
}

/* Buttons: bold labels, the primary purple, white secondary buttons. */
.btn {
  --tblr-btn-font-weight: 700;
  --tblr-btn-border-radius: var(--h-radius);
}
.btn:not([class*="btn-"]),
.btn-white,
.btn-outline-secondary {
  --tblr-btn-bg: var(--h-color-surface);
  --tblr-btn-border-color: var(--h-color-input);
  --tblr-btn-hover-bg: var(--h-color-hover);
  --tblr-btn-hover-border-color: var(--h-color-input);
}

/* Badges: pills in the status tones. */
.badge {
  --tblr-badge-border-radius: 999px;
  --tblr-badge-font-weight: 700;
  text-transform: none;
}

/* Tabler's coloured "-lt" chips, mapped onto the brand and status tones. */
.bg-blue-lt,
.bg-azure-lt,
.bg-purple-lt {
  background-color: var(--h-color-primary-soft) !important;
  color: var(--h-color-primary-ink) !important;
}
.text-blue-lt,
.text-azure-lt {
  color: var(--h-color-primary-ink) !important;
}
.bg-green-lt {
  background-color: var(--h-color-success-soft) !important;
  color: var(--h-color-success-strong) !important;
}
.bg-orange-lt {
  background-color: var(--h-color-warning-soft) !important;
  color: var(--h-color-warning) !important;
}
.text-orange-lt {
  color: var(--h-color-warning) !important;
}
.bg-red {
  background-color: var(--h-color-danger) !important;
}

/* Forms */
.form-control,
.form-select {
  border-color: var(--h-color-input);
  border-radius: var(--h-radius);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--h-color-primary);
  box-shadow: var(--h-focus-ring);
}
.form-label {
  font-weight: 700;
}

/* Tabs and menus */
.nav-tabs .nav-link.active,
.card-header-tabs .nav-link.active {
  color: var(--h-color-ink);
  font-weight: 700;
  border-bottom-color: var(--h-color-primary);
}
.dropdown-menu {
  --tblr-dropdown-border-radius: var(--h-radius-lg);
  --tblr-dropdown-border-color: var(--h-color-line);
  --tblr-dropdown-link-hover-bg: var(--h-color-hover);
  --tblr-dropdown-link-active-bg: var(--h-color-primary-soft);
  --tblr-dropdown-link-active-color: var(--h-color-primary-deep);
  box-shadow: var(--h-shadow-overlay);
}

/* The top bar, until the sidebar replaces it. */
.navbar {
  --tblr-navbar-active-color: var(--h-color-primary-ink);
  --tblr-navbar-active-border-color: var(--h-color-primary);
}

.form-control:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--h-color-primary);
  outline-offset: 2px;
}

/* Login */
body:has(.login-page) {
  border-top: 0 !important;
  background: #FFFFFF;
}
.login-page {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  min-height: 100vh;
}
.login-page ::selection {
  background: #D9D0EA;
  color: #1F1D24;
}
.login-page a {
  color: #4B3B78;
  text-underline-offset: 0.2em;
}
.login-page a:hover {
  color: #2F2550;
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem clamp(2rem, 6vw, 6rem);
  background: #2F2550;
  color: #FFFFFF;
}
.login-title {
  margin: auto 0 0;
  max-width: 13ch;
  font-family: var(--hendrios-font-display);
  font-size: clamp(2.25rem, 3.6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: #FFFFFF;
}
.login-lead {
  margin: 1.25rem 0 0;
  max-width: 34ch;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: #D9D0EA;
}
.login-brand-foot {
  margin: auto 0 0;
  padding-top: 3rem;
  font-size: 0.8125rem;
  color: #B9ADD6;
}

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
.login-panel {
  width: 100%;
  max-width: 23rem;
}
.login-logo {
  display: block;
  height: 40px;
  width: auto;
}
.login-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
}
.login-heading {
  margin: 2.5rem 0 1.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.login-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
}
.login-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.login-label-row label {
  margin-bottom: 0;
}
.login-label-row a {
  font-size: 0.875rem;
}
.login-page .form-control {
  height: 3rem;
  padding: 0 1rem;
  border: 1px solid #D9D3E3;
  border-radius: 0.75rem;
  box-shadow: none;
  font-size: 1rem;
  color: #1F1D24;
  caret-color: #7A66A5;
}
.login-page .form-control:hover {
  border-color: #B9ADD6;
}
.login-page .form-control:focus {
  border-color: #7A66A5;
  box-shadow: 0 0 0 3px #E6E0F0;
}
.login-page .form-control.is-invalid {
  border-color: #A93226;
  background-image: none;
}
.login-field-error {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: #A93226;
}
.login-password {
  position: relative;
}
.login-password .form-control {
  padding-right: 3rem;
}
.login-reveal {
  position: absolute;
  top: 50%;
  right: 0.375rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #5C5868;
  cursor: pointer;
}
.login-reveal:hover {
  background: #F3F0F9;
  color: #1F1D24;
}
.login-reveal .login-eye-off,
.login-reveal[aria-pressed="true"] .login-eye {
  display: none;
}
.login-reveal[aria-pressed="true"] .login-eye-off {
  display: block;
}

.login-submit {
  height: 3rem;
  margin-top: 0.5rem;
  border: 0;
  border-radius: 999px;
  background: #1F1D24;
  color: #FFFFFF;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease-out;
}
.login-submit:hover {
  background: #3A3642;
}
.login-submit:disabled {
  background: #5C5868;
  cursor: progress;
}

.login-alert {
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
}
.login-form .login-alert {
  margin-bottom: 0;
}
.login-alert-error {
  background: #FFEDEA;
  color: #831C1E;
}
.login-alert-success {
  background: #DCFAE5;
  color: #04250E;
}

.login-page a:focus-visible,
.login-page button:focus-visible {
  outline: 2px solid #7A66A5;
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 2.5rem 1.5rem 2rem;
  }
  .login-title {
    margin-top: 0;
    font-size: 2rem;
  }
  .login-brand-foot {
    display: none;
  }
  .login-main {
    align-items: flex-start;
    padding: 2rem 1.5rem 3rem;
  }
  .login-heading {
    margin-top: 2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .login-submit {
    transition: none;
  }
}

/* Login: subtitle, values line and backgrounds */
.login-heading {
  margin-bottom: 0.375rem;
}
.login-subheading {
  margin: 0 0 1.75rem;
  color: #5C5868;
}
.login-title .typed-cursor {
  margin-left: 0.05em;
  color: #A693D6;
  font-weight: 400;
  animation: login-blink 1s steps(1) infinite;
}
@keyframes login-blink {
  50% { opacity: 0; }
}

/* The panel gets slow light from the brand purple; the form side a tint of it. */
.login-brand {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.login-brand::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(40% 35% at 20% 25%, rgba(122, 102, 165, 0.55), transparent 70%),
    radial-gradient(35% 30% at 85% 80%, rgba(166, 147, 214, 0.35), transparent 70%);
  animation: login-drift 24s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}
@keyframes login-drift {
  to { transform: translate3d(6%, -4%, 0) scale(1.08); }
}
.login-main {
  background: #F4F1F9;
}
.login-page .form-control {
  background-color: #FFFFFF;
}
@media (prefers-reduced-motion: reduce) {
  .login-brand::before,
  .login-title .typed-cursor {
    animation: none;
  }
}

/* Login: the typed value is the headline; the sentence about the platform supports it. */
.login-title {
  max-width: none;
  font-size: clamp(2.5rem, 4.4vw, 4.25rem);
  line-height: 1.02;
}
.login-title {
  text-wrap: wrap;
}
.login-values-line {
  display: block;
  min-height: 1.02em;
}
.login-lead {
  margin-top: 1.75rem;
  max-width: 30ch;
  font-size: 1.25rem;
  line-height: 1.35;
  color: #FFFFFF;
}
.login-lead-more {
  margin: 0.75rem 0 0;
  max-width: 36ch;
  font-size: 1rem;
  line-height: 1.5;
  color: #D9D0EA;
}
.login-logo {
  height: 52px;
}
@media (max-width: 767.98px) {
  .login-brand {
    padding: 1.75rem 1.5rem 1.5rem;
  }
  .login-title {
    font-size: 2.125rem;
  }
  .login-lead {
    margin-top: 0.75rem;
    font-size: 1rem;
  }
  .login-lead-more {
    display: none;
  }
  .login-main {
    padding-top: 1.5rem;
  }
  .login-logo {
    height: 44px;
  }
  .login-heading {
    margin-top: 1.25rem;
  }
}

/* Admin layout. The server renders the saved width from the sidebar_state cookie. */
.admin-layout { --h-sidebar-width: 240px; }
.admin-layout[data-sidebar-state="collapsed"], .admin-layout:has(#sidebar-collapse:checked) { --h-sidebar-width: 64px; }
.admin-layout:has(#sidebar-collapse:not(:checked)) { --h-sidebar-width: 240px; }
#admin-sidebar { display: block; padding: 0; overflow: visible; background: var(--h-color-surface); border-right: 1px solid var(--h-color-line); }
.hendrios-sidebar-logo { height: 36px; width: auto; }
.sidebar-brand-compact { display: none; width: 28px; height: 28px; }
.sidebar { display: flex; flex-direction: column; font-size: 14px; line-height: 1.5; }
.sidebar-header { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 84px; padding: 24px 12px 24px 20px; }
.sidebar-brand { display: inline-flex; min-width: 0; font-weight: 700; color: inherit; }
.sidebar-panel { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.sidebar-search { position: relative; padding: 0 12px 16px; }
.sidebar-search input { height: 40px; font-size: 14px; }
.sidebar-search-toggle { display: none; }
.sidebar-nav { overflow-y: auto; padding: 0 12px; }
.sidebar-link { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; width: 100%; height: 40px; padding: 8px; margin-bottom: 4px; border: 0; border-radius: 8px; background: transparent; color: var(--h-color-ink-soft); font: inherit; text-decoration: none; cursor: pointer; }
.sidebar-link:hover, .sidebar-link.active { background: var(--h-color-primary-soft); color: var(--h-color-primary-deep); text-decoration: none; }
.sidebar-link.active { font-weight: 700; }
.sidebar svg { flex-shrink: 0; width: 16px; height: 16px; }
.sidebar-link > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar summary { list-style: none; }
.sidebar summary::-webkit-details-marker { display: none; }
.sidebar-group > summary > svg:last-child, .sidebar-user > svg:last-child { margin-left: auto; }
.sidebar-group[open] > summary > svg:last-child { transform: rotate(180deg); }
.sidebar-submenu { margin-left: 16px; padding-left: 8px; border-left: 1px solid var(--h-color-line); }
.sidebar-footer { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding: 24px 12px 16px; }
.sidebar-utilities { display: flex; gap: 4px; border-top: 1px solid var(--h-color-line); padding-top: 12px; }
.sidebar-utilities > a { justify-content: center; width: 40px; margin-bottom: 0; }
.sidebar-user { display: flex; align-items: center; gap: 8px; height: 56px; padding: 8px; border-radius: 8px; cursor: pointer; }
.sidebar-avatar { display: flex; justify-content: center; align-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--h-color-primary-soft); color: var(--h-color-primary-deep); font-weight: 700; }
.sidebar-identity { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sidebar-identity > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-identity small { font-size: 12px; color: var(--h-color-muted); }
.sidebar-profile { position: relative; }
.sidebar-account { position: absolute; z-index: 20; bottom: 100%; left: 0; width: 208px; border: 1px solid var(--h-color-line); border-radius: 8px; padding: 4px; background: white; box-shadow: var(--h-shadow-overlay); }
.sidebar-link:focus-visible, .sidebar summary:focus-visible { outline: 2px solid var(--h-color-primary); outline-offset: 2px; }
.sidebar-unread { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--h-color-danger); }
.sidebar-mobile-check, .sidebar-toggle { display: none; }
.sidebar-collapse-check { position: absolute; top: 28px; right: 12px; width: 28px; height: 28px; opacity: 0; }
.sidebar-collapse { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 0; border-radius: 6px; cursor: pointer; }
.sidebar-collapse-check:focus-visible + label { outline: 2px solid var(--h-color-primary); }
@media (min-width: 992px) {
  #admin-sidebar { width: var(--h-sidebar-width); }
  .admin-layout > #admin-sidebar.navbar-vertical.navbar-expand-lg ~ .page-wrapper { margin-left: var(--h-sidebar-width); }
  .sidebar { height: 100dvh; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-header { flex-direction: column; gap: 12px; padding: 16px 8px; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-collapse-check { top: 56px; right: 18px; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-brand-expanded,
  .sidebar:has(#sidebar-collapse:checked) .sidebar-link > span:not(.sidebar-unread),
  .sidebar:has(#sidebar-collapse:checked) .sidebar-group > summary > svg:last-child,
  .sidebar:has(#sidebar-collapse:checked) .sidebar-identity,
  .sidebar:has(#sidebar-collapse:checked) .sidebar-user > svg,
  .sidebar:has(#sidebar-collapse:checked) .sidebar-search input { display: none; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-brand-compact { display: block; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-nav { overflow: visible; }
  .sidebar:has(#sidebar-collapse:checked) :is(.sidebar-nav,.sidebar-footer,.sidebar-search) { padding-left: 8px; padding-right: 8px; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-link { justify-content: center; width: 48px; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-utilities { flex-direction: column; align-items: center; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-user { justify-content: center; padding: 0; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-group { position: relative; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-submenu,
  .sidebar:has(#sidebar-collapse:checked) .sidebar-account { position: absolute; z-index: 20; left: 100%; width: 240px; margin: 0; padding: 4px; border: 1px solid var(--h-color-line); border-radius: 8px; background: white; box-shadow: var(--h-shadow-overlay); }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-submenu { top: 0; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-submenu > a,
  .sidebar:has(#sidebar-collapse:checked) .sidebar-account .sidebar-link { justify-content: flex-start; width: 100%; }
  .sidebar:has(#sidebar-collapse:checked) .sidebar-search-toggle { display: flex; align-items: center; justify-content: center; width: 48px; height: 40px; margin: 0; cursor: pointer; }
}
@media (max-width: 991.98px) {
  .sidebar-collapse-check, .sidebar-collapse { display: none; }
  .sidebar-mobile-check { display: block; position: absolute; right: 20px; top: 28px; width: 28px; height: 28px; opacity: 0; }
  .sidebar-toggle { display: flex; padding: 6px; margin: 0; }
  .sidebar-panel { display: none; }
  .sidebar:has(.sidebar-mobile-check:checked) .sidebar-panel { display: flex; }
  .sidebar-mobile-check:focus-visible + label { outline: 2px solid var(--h-color-primary); }
}

@media (min-width: 992px) {
  .admin-layout > #admin-sidebar,
  .admin-layout > .page-wrapper { transition: width 200ms linear, margin-left 200ms linear; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-layout > #admin-sidebar,
  .admin-layout > .page-wrapper { transition: none !important; }
}

/* Clients in onboarding: summary cards, what to do now, situation badges. */
.clients-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.clients-tile { display: grid; grid-template-rows: 1fr auto 18px; min-height: 112px; margin: 0; padding: 16px; }
.clients-tile-label { color: var(--h-color-ink-soft); }
.clients-tile-value { font-size: 30px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.clients-tile-note { font-size: 12px; color: var(--h-color-muted); }
.clients-tile-danger { background: var(--h-color-danger-soft); border-color: rgba(var(--h-color-danger-rgb), 0.25); }
.clients-tile-danger .clients-tile-label, .clients-tile-danger .clients-tile-note { color: var(--h-color-danger-strong); }
.clients-tile-danger .clients-tile-value { color: var(--h-color-danger); }
.clients-actions { margin-bottom: 16px; }
.clients-actions h3 { margin: 8px 0 10px; font-size: 16px; font-weight: 700; }
.clients-actions-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.clients-action { display: flex; flex-direction: row; align-items: center; gap: 16px; margin: 0; padding: 14px 16px; border-color: rgba(var(--h-color-danger-rgb), 0.3); }
.clients-action > span { flex: 1; white-space: normal; }
.clients-progress { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.clients-progress .progress { flex: 1; }
.clients-progress > span { font-size: 12px; font-variant-numeric: tabular-nums; }
.clients-situation { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.clients-situation-danger { background: var(--h-color-danger-soft); color: var(--h-color-danger-strong); }
.clients-situation-primary { background: var(--h-color-primary-soft); color: var(--h-color-primary-ink); }
.clients-situation-neutral { background: var(--h-color-neutral-soft); color: var(--h-color-ink-soft); }
.clients-situation-success { background: var(--h-color-success-soft); color: var(--h-color-success-strong); }
@media (max-width: 991.98px) {
  .clients-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clients-actions-list { grid-template-columns: 1fr; }
}
.clients-tile-value-text { font-size: 20px; }
.clients-tile-value small { font-size: 15px; color: var(--h-color-muted); }

/* Schedule blocks: what goes to the client and what goes to the team, apart. */
.seq-group { margin-bottom: 8px; padding: 10px 12px 6px; border-radius: var(--h-radius); }
.seq-group:last-child { margin-bottom: 0; }
.seq-group-client { background: var(--h-color-primary-soft); }
.seq-group-team { background: var(--h-color-tint); border: 1px dashed var(--h-color-input); }
.seq-group-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--h-color-primary-ink); }
.seq-group-team .seq-group-label { color: var(--h-color-ink-soft); }
.seq-group .text-muted { color: var(--h-color-ink) !important; }
.timeline-event-card > .card { border-radius: var(--h-radius-lg); box-shadow: var(--h-shadow-card); }
.timeline-event-card > .card > .card-header { border-bottom: 0; padding-bottom: 0; background: transparent; }
.timeline-event-icon { background: var(--h-color-primary-soft); color: var(--h-color-primary-ink); }
.seq-group-automation { background: var(--h-color-surface); border: 1px solid var(--h-color-primary-line); }
.seq-group-automation .seq-group-label { color: var(--h-color-muted); }

/* Client portal: progress, the task to do now. */
.portal-progress-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.portal-now { border-color: var(--h-color-primary-line); }
.portal-now .card-body { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.portal-now-label { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; color: var(--h-color-primary-ink); }
.portal-now h3 { font-size: 18px; }

/* Page titles in the brand display face. */
.page-title { font-family: var(--h-font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.01em; }
/* Edit and delete of a schedule block: quiet until hovered. */
.seq-action { color: var(--h-color-muted); background: transparent; border-color: transparent; }
.seq-action:hover { color: var(--h-color-primary-ink); background: var(--h-color-primary-soft); }
.seq-action-danger:hover { color: var(--h-color-danger); background: var(--h-color-danger-soft); }
.seq-action { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; }
.seq-action svg { width: 18px; height: 18px; margin: 0 !important; }

/* Team tasks: done tasks step back. */
.tasks-row-done td:not(:last-child) { color: var(--h-color-muted); }
.tasks-row-done .font-weight-medium { color: var(--h-color-ink-soft); }

/* Tabs of a client: one line, scrolls sideways when it does not fit. */
@media (min-width: 768px) {
  .new-hire-menu .navbar-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .new-hire-menu .nav-link { white-space: nowrap; }
}

/* Lists where the whole row opens the item. Buttons in .row-link-actions stay clickable. */
.row-link-table tbody tr { position: relative; }
.row-link-table tbody tr:hover td { background: var(--h-color-hover); }
.row-link, .row-link:hover { color: var(--h-color-ink); text-decoration: none; }
.row-link-table tbody tr:hover .row-link { color: var(--h-color-primary-ink); }
.row-link-chevron { color: var(--h-color-muted); }
.row-link-actions > * { position: relative; z-index: 2; }

/* Clients list: on a phone each row is a card. */
@media (max-width: 767.98px) {
  .clients-table thead { display: none; }
  .clients-table, .clients-table tbody, .clients-table tr, .clients-table td { display: block; width: 100%; }
  .clients-table tr { padding: 12px 16px; border-bottom: 1px solid var(--h-color-line); }
  .clients-table td { padding: 4px 0; border: 0; white-space: normal !important; }
  .clients-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--h-color-muted); }
  .clients-table td:last-child { position: absolute; top: 20px; right: 16px; width: auto; padding: 0; }
}
.portal-status { display: block; color: var(--h-color-input); }
.portal-status-done { color: var(--h-color-success); }

/* Long forms: headings per group of fields, the save button always in view. */
.form-section-title { margin: 24px 0 12px; padding-top: 16px; border-top: 1px solid var(--h-color-line); font-size: 15px; font-weight: 700; }
.form-section-title:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.form-sticky-actions { position: sticky; bottom: 0; z-index: 3; margin: 16px -20px -20px; padding: 12px 20px; background: var(--h-color-surface); border-top: 1px solid var(--h-color-line); border-radius: 0 0 var(--h-radius-lg) var(--h-radius-lg); text-align: right; }

/* Settings menu, in the same style as the sidebar links. */
.settings-nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.settings-link { display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: var(--h-radius); color: var(--h-color-ink-soft); text-decoration: none; }
.settings-link:hover, .settings-link.active { background: var(--h-color-primary-soft); color: var(--h-color-primary-deep); text-decoration: none; }
.settings-link.active { font-weight: 700; }
@media (max-width: 767.98px) { .settings-nav { flex-direction: row; overflow-x: auto; } .settings-link { white-space: nowrap; } }
.portal-phrase { border-color: var(--h-color-primary-line); background: var(--h-color-primary-soft); }
.portal-phrase-label { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--h-color-primary-ink); }
.portal-phrase-text { margin: 0; font-family: var(--h-font-display); font-weight: 800; font-size: 20px; line-height: 1.3; color: var(--h-color-primary-deep); }

/* Onboarding score on the client file. */
.score-tile { grid-template-rows: 1fr auto auto auto; gap: 4px; }
.score-tile .clients-tile-value { display: flex; align-items: center; gap: 10px; }
.score-tile .clients-situation { font-size: 12px; line-height: 1.6; }
.clients-situation-warning { background: var(--h-color-warning-soft); color: var(--h-color-warning); }
.score-warning { background: var(--h-color-warning-soft); border-color: rgba(146, 64, 14, 0.2); }
.score-danger { background: var(--h-color-danger-soft); border-color: rgba(var(--h-color-danger-rgb), 0.25); }
.score-meter { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: var(--h-color-line); overflow: hidden; }
.score-meter > span { display: block; height: 100%; background: var(--h-color-success); }
.score-warning .score-meter > span { background: #D99A2B; }
.score-danger .score-meter > span { background: var(--h-color-danger); }

/* Stage headings between the blocks of a sequence. */
.timeline-stage { list-style: none; margin: 8px 0 12px; }
.timeline-stage h3 { margin: 0; padding-bottom: 6px; border-bottom: 1px solid var(--h-color-primary-line); font-family: var(--h-font-display); font-weight: 800; font-size: 18px; color: var(--h-color-primary-deep); }

/* Portal: what the "Now" task unlocks, the trail of tasks still locked, links for done tasks. */
.portal-now-unlocks { margin-top: 6px; font-size: 13px; color: var(--h-color-ink-soft); }
.portal-trail { margin: 0; padding: 0; list-style: none; }
.portal-trail li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--h-color-line); color: var(--h-color-muted); }
.portal-trail li:first-child { border-top: 0; }
.portal-trail svg { flex-shrink: 0; color: var(--h-color-input); }
.portal-link { font-size: 13px; font-weight: 600; color: var(--h-color-primary-ink); }
/* Messages show up as a toast that goes away by itself. */
.portal-toast { position: fixed; z-index: 1080; right: 24px; bottom: 24px; max-width: 360px; padding: 12px 16px; border-radius: var(--h-radius-lg); background: var(--h-color-ink); color: #fff; box-shadow: var(--h-shadow-overlay); animation: portal-toast 5s ease forwards; pointer-events: none; }
@keyframes portal-toast { 0% { opacity: 0; transform: translateY(8px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .portal-toast { animation: portal-toast-still 5s step-end forwards; } @keyframes portal-toast-still { to { visibility: hidden; } } }
.portal-phrase .typed-cursor { margin-left: 2px; color: var(--h-color-primary); font-weight: 400; animation: login-blink 1s steps(1) infinite; }
.portal-trail li.is-next { color: var(--h-color-ink); font-weight: 600; }
.portal-trail li.is-next svg { color: var(--h-color-primary); }
.portal-trail li:not(.is-next) { opacity: 0.75; }
.portal-team-work { margin: 6px 0 8px; padding-left: 18px; }
.portal-team-work li { margin-bottom: 4px; }

/* Client portal: notifications open above the bell, like the user menu. */
.sidebar-notifications { position: relative; }
.sidebar-notifications > summary { justify-content: center; width: 40px; margin-bottom: 0; }
.sidebar-notifications-list { width: 280px; max-height: 360px; overflow-y: auto; }
.sidebar-notification { padding: 8px 10px; border-radius: var(--h-radius-sm); font-size: 13px; color: var(--h-color-ink-soft); }
.sidebar-notification + .sidebar-notification { border-top: 1px solid var(--h-color-line); }
.sidebar-notification.is-new { background: var(--h-color-primary-soft); }

/* Clients in onboarding, as in the chosen prototype (D with the data of A). */
.page-lead { margin: 6px 0 0; color: var(--h-color-ink-soft); font-size: 15px; }
.clients-action.is-danger { border-color: rgba(var(--h-color-danger-rgb), 0.3); }
.clients-action:not(.is-danger) { border-color: var(--h-color-line); }
.clients-action-buttons { display: flex; flex-shrink: 0; gap: 8px; }
.clients-action-buttons form { margin: 0; }
.clients-where { margin: 0; padding: 20px; background: var(--h-color-tint); border: 0; border-radius: var(--h-radius-xl); }
.clients-where-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.clients-where-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.clients-where-list { display: flex; flex-direction: column; gap: 8px; }
.clients-card { display: grid; grid-template-columns: minmax(200px, 1.4fr) 110px minmax(160px, 1.4fr) 160px auto; align-items: center; gap: 16px; min-height: 64px; padding: 10px 16px; background: var(--h-color-surface); border: 1px solid var(--h-color-line); border-radius: var(--h-radius-lg); }
.clients-card:hover { border-color: var(--h-color-primary-line); }
.clients-card-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.clients-card-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.clients-card-name a { color: var(--h-color-ink); text-decoration: none; }
.clients-card-name a:hover { color: var(--h-color-primary-ink); }
.clients-card-name .text-muted { font-size: 12px; }
.clients-card-pending { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; color: var(--h-color-ink-soft); }
.clients-card-pending > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clients-card-action form { margin: 0; }
.clients-card-action { justify-self: end; }
.clients-steps { display: inline-flex; gap: 3px; }
.clients-steps > span { width: 14px; height: 6px; border-radius: 3px; background: var(--h-color-line); }
.clients-steps > .is-done { background: var(--h-color-primary); }
.clients-steps > .is-now { background: #B9ADD6; }
.clients-where .pagination { margin-top: 12px; }
.clients-where .card-footer { background: transparent; border: 0; padding: 0; }
@media (max-width: 991.98px) {
  .clients-card { grid-template-columns: 1fr auto; }
  .clients-card-stage, .clients-card-pending { grid-column: 1 / -1; }
}
.clients-action > .clients-action-buttons { flex: 0 0 auto; }
/* "Where each client is" as the table of the chosen prototype. */
.clients-where { padding: 20px 8px 4px; background: var(--h-color-surface); border: 1px solid var(--h-color-line); border-radius: var(--h-radius-lg); }
.clients-where-head { padding: 0 12px; gap: 12px; flex-wrap: wrap; }
.clients-where-table { margin: 0; }
.clients-where-table thead th { font-size: 12px; font-weight: 400; color: var(--h-color-muted); text-transform: none; letter-spacing: 0; background: transparent; }
.clients-where-table td { height: 60px; }
.clients-where-table .clients-card-name a { font-weight: 700; }
.clients-initials { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--h-color-primary-soft); color: var(--h-color-primary-deep); font-size: 12px; font-weight: 700; }
.clients-where-table .clients-steps { display: flex; margin-bottom: 4px; }
.clients-where-table .clients-steps > span { width: 18px; height: 4px; border-radius: 2px; }
.clients-stage-name { font-size: 13px; }
.clients-where-table .clients-card-pending { display: table-cell; }
.clients-where-table .clients-card-pending > span { display: block; }

/* Integration run: the reprocess action sits under its explanation, full width. */
.tracker-reprocess { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--h-color-line); }
.tracker-reprocess form .btn { float: none; width: 100%; margin-left: 0; }

/* What to do now, as in the mockup: tasks with you, the largest group waiting, failures. */
.clients-now { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 20px; border-radius: var(--h-radius-xl); }
.clients-now.is-mine { background: var(--h-color-primary-soft); border-color: var(--h-color-primary-line); }
.clients-now.is-danger { background: var(--h-color-danger-soft); border-color: rgba(var(--h-color-danger-rgb), 0.3); }
.clients-now-head { display: flex; align-items: center; gap: 12px; }
.clients-now-head h4 { margin: 0; font-size: 17px; font-weight: 700; }
.clients-now-count { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--h-color-tint); color: var(--h-color-ink); font-weight: 700; }
.clients-now-count.is-filled { background: var(--h-color-primary); color: #fff; }
.clients-now.is-danger .clients-now-count { background: var(--h-color-danger); color: #fff; }
.clients-now-tasks { margin: 0; padding: 0; list-style: none; }
.clients-now-tasks li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--h-color-primary-line); }
.clients-now-tasks .clients-initials { background: var(--h-color-surface); border: 1px solid var(--h-color-primary-line); }
.clients-now-faces { display: flex; }
.clients-now-faces .clients-initials { margin-left: -6px; border: 2px solid var(--h-color-surface); background: var(--h-color-tint); color: var(--h-color-ink); }
.clients-now-faces .clients-initials:first-child { margin-left: 0; }
.clients-now-names, .clients-now-text { margin: 0; color: var(--h-color-ink-soft); }
.clients-now-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.clients-now-buttons form { margin: 0; }
.clients-now-buttons .btn { float: none; margin-left: 0; }
.btn-secondary-soft { --tblr-btn-bg: var(--h-color-tint); --tblr-btn-color: var(--h-color-ink-soft); --tblr-btn-border-color: var(--h-color-line); --tblr-btn-hover-bg: var(--h-color-hover); --tblr-btn-hover-color: var(--h-color-primary-deep); --tblr-btn-hover-border-color: var(--h-color-primary-line); }

/* Client file, as in the chosen prototype. */
.page-back { display: inline-block; margin-bottom: 10px; font-size: 13px; color: var(--h-color-primary-ink); text-decoration: none; }
.page-heading { display: flex; align-items: center; gap: 16px; }
.page-initials { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; background: var(--h-color-primary-soft); color: var(--h-color-primary-deep); font-size: 17px; font-weight: 700; }
.client-tabs { display: flex; gap: 24px; margin-top: 4px; border-bottom: 1px solid var(--h-color-line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.client-tabs a { display: flex; align-items: center; height: 40px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--h-color-muted); text-decoration: none; white-space: nowrap; }
.client-tabs a:hover { color: var(--h-color-ink); }
.client-tabs a.active { color: var(--h-color-ink); font-weight: 700; border-bottom-color: var(--h-color-primary); }
.score-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.score-how { font-size: 12px; color: var(--h-color-warning); text-decoration: underline; }
.client-stages-list { margin: 0; padding: 0; list-style: none; }
.client-stage { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; }
.client-stage::before { content: ""; position: absolute; left: 11px; top: 20px; bottom: 0; width: 2px; background: var(--h-color-primary-soft); }
.client-stage:last-child::before { display: none; }
.client-stage-dot { width: 12px; height: 12px; margin: 5px 0 0 6px; border-radius: 50%; background: var(--h-color-surface); box-shadow: 0 0 0 2px var(--h-color-input); position: relative; z-index: 1; }
.client-stage.is-done .client-stage-dot, .client-stage.is-current .client-stage-dot { background: var(--h-color-primary); box-shadow: 0 0 0 3px var(--h-color-primary-soft); }
.client-stage.is-error .client-stage-dot { background: var(--h-color-danger); box-shadow: 0 0 0 3px var(--h-color-danger-soft); }
.client-stage-head { display: flex; justify-content: space-between; gap: 12px; }
.client-stage-head h4 { margin: 0; font-size: 15px; font-weight: 700; }
.client-stage-state { font-size: 12px; color: var(--h-color-muted); white-space: nowrap; }
.client-stage.is-done .client-stage-state { color: var(--h-color-success); }
.client-stage.is-error .client-stage-state { color: var(--h-color-danger); }
.client-stage.is-current .client-stage-state { color: var(--h-color-primary-ink); }
.client-stage-trigger { margin: 2px 0 0; font-size: 12px; color: var(--h-color-muted); }
.client-stage-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.client-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.client-chip-kind { font-size: 11px; opacity: 0.85; }
.client-chip.is-client { background: var(--h-color-primary-soft); color: var(--h-color-primary-deep); }
.client-chip.is-integration { background: #E8F1FB; color: #123E68; }
.client-chip.is-team { background: #F1EEE4; color: #3D3510; }
.client-chip.is-email { background: var(--h-color-neutral-soft); color: var(--h-color-ink-soft); }
.client-chip.is-error { background: var(--h-color-danger-soft); color: var(--h-color-danger-strong); }
.client-run-error { margin: 0 16px 16px; padding: 10px 12px; border-radius: var(--h-radius); background: var(--h-color-danger-soft); color: var(--h-color-danger-strong); font-size: 13px; }
.client-run-error a { color: var(--h-color-danger-strong); font-weight: 700; }
.client-history { display: flex; gap: 12px; align-items: flex-start; }
.client-history-date { width: 44px; flex-shrink: 0; color: var(--h-color-muted); font-variant-numeric: tabular-nums; }
.client-history form .btn { float: none; margin-left: 0; }
/* "What comes next" and "What already happened" share one height; each scrolls inside. */
.client-bottom-list { height: 420px; overflow-y: auto; }
/* Next items that the schedule has not released yet: dimmed, with a lock. */
.client-next-locked { color: var(--h-color-muted); }
.client-next-locked svg { flex-shrink: 0; color: var(--h-color-input); }
.client-next-locked small { line-height: 1.3; }
.client-next-stage { font-size: 12px; }

/* Schedule page, as in the chosen prototype: stages as cards, blocks inside. */
.seq-note { margin-bottom: 16px; padding: 10px 14px; border-radius: var(--h-radius); background: var(--h-color-hover); color: var(--h-color-primary-ink); font-size: 13px; }
.seq-summary { margin: 10px 0 0; font-size: 13px; color: var(--h-color-muted); }
.seq-stage { margin-bottom: 16px; overflow: hidden; }
.seq-stage-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--h-color-tint); border-bottom: 1px solid var(--h-color-line); cursor: pointer; list-style: none; }
.seq-stage-head::-webkit-details-marker { display: none; }
.seq-stage:not([open]) .seq-stage-head { border-bottom: 0; }
.seq-stage:not([open]) .seq-stage-chevron { transform: rotate(180deg); }
.seq-stage-number { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--h-color-primary); color: #fff; font-size: 13px; font-weight: 700; }
.seq-stage-title { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.seq-stage-title strong { font-size: 16px; }
.seq-stage-title small { font-size: 12px; color: var(--h-color-muted); }
.seq-stage-now { font-size: 12px; font-weight: 700; color: var(--h-color-primary-ink); white-space: nowrap; }
.seq-stage-chevron { flex-shrink: 0; color: var(--h-color-ink-soft); }
.seq-stage-blocks { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 12px 16px 0; list-style: none; }
.seq-block-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.seq-block-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--h-color-line); border-radius: var(--h-radius); background: var(--h-color-surface); color: var(--h-color-primary); }
.seq-block-icon svg { width: 16px; height: 16px; }
.seq-block { margin: 0; border-radius: 10px; box-shadow: none; }
.seq-block-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--h-color-line); }
.seq-block-trigger { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--h-color-ink-soft); }
.seq-block-actions { display: flex; gap: 4px; }
.seq-chip { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.seq-chip.is-task { background: var(--h-color-primary-soft); color: var(--h-color-primary-deep); }
.seq-chip.is-team { background: #F1EEE4; color: #3D3510; }
.seq-block-body { padding: 0 14px 10px; }
.seq-items-label { margin: 10px 0 2px; font-size: 12px; color: var(--h-color-muted); }
.seq-items-empty { margin: 10px 0 0; font-size: 13px; color: var(--h-color-muted); }
.seq-item { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.seq-item-kind { width: 84px; flex-shrink: 0; font-size: 12px; font-weight: 700; }
.seq-item-kind.is-task { color: var(--h-color-primary-ink); }
.seq-item-kind.is-integration { color: #1B5E9E; }
.seq-item-kind.is-team { color: #6B5A12; }
.seq-item-kind.is-email { color: var(--h-color-ink-soft); }
.seq-item-name { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--h-color-ink); font: inherit; text-align: left; cursor: pointer; }
.seq-item-name:hover { color: var(--h-color-primary-ink); text-decoration: underline; }
.seq-item-dest { font-size: 12px; color: var(--h-color-muted); white-space: nowrap; }
.seq-item .dropup .btn { float: none; margin-left: 0; }
.seq-stage-add { padding: 12px 16px 16px 60px; }
.seq-add { height: 34px; padding: 0 12px; border: 1px dashed var(--h-color-input); border-radius: var(--h-radius); background: transparent; color: var(--h-color-primary-ink); font: inherit; font-size: 13px; cursor: pointer; }
.seq-add:hover { background: var(--h-color-hover); }
.seq-templates-hint { margin: 2px 0 12px; font-size: 12px; color: var(--h-color-muted); }
.seq-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.seq-kind { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border: 1px solid var(--h-color-line); border-radius: var(--h-radius); background: var(--h-color-surface); color: var(--h-color-ink-soft); font: inherit; font-size: 13px; cursor: pointer; }
.seq-kind:hover { background: var(--h-color-hover); }
.seq-kind.active { background: var(--h-color-primary-soft); border-color: var(--h-color-primary-line); color: var(--h-color-primary-deep); font-weight: 700; }
.seq-template { padding: 10px 0; cursor: grab; }
.seq-template:hover { color: var(--h-color-primary-ink); }
.seq-tag { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 999px; background: var(--h-color-primary-soft); color: var(--h-color-primary-ink); font-size: 11px; }
.seq-create { padding: 8px; border: 1px dashed var(--h-color-input); border-radius: var(--h-radius); color: var(--h-color-primary-ink); text-align: center; cursor: grab; }
.select-template ~ .card-body .divide-y > [data-template-name] { padding-top: 0 !important; padding-bottom: 0 !important; }
.seq-item .seq-action { --tblr-btn-border-color: transparent; --tblr-btn-bg: transparent; border-color: transparent; background: transparent; }

/* Client portal, as in the chosen prototype (A with the phrase of the day). */
.portal { display: flex; flex-direction: column; gap: 24px; max-width: 1080px; }
.portal-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.portal-steps li { display: flex; flex-direction: column; gap: 6px; }
.portal-steps-bar { height: 6px; border-radius: 999px; background: var(--h-color-line); }
.portal-steps .is-done .portal-steps-bar { background: var(--h-color-primary); }
.portal-steps .is-now .portal-steps-bar { background: #B9ADD6; }
.portal-steps-name { font-size: 13px; color: var(--h-color-muted); }
.portal-steps .is-done .portal-steps-name, .portal-steps .is-now .portal-steps-name { color: var(--h-color-ink); }
.portal-steps .is-now .portal-steps-name { font-weight: 700; }
.portal-now { margin: 0; border-color: var(--h-color-primary-line); }
.portal-now .card-body { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 24px; }
.portal-now h2 { margin: 0; font-size: 20px; font-weight: 700; }
.portal-now-text { margin: 6px 0 0; color: var(--h-color-ink-soft); }
.portal-columns { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.portal-list { flex: 2 1 420px; margin: 0; }
.portal-list .card-body { padding: 8px 20px 12px; }
.portal-list-title { margin: 12px 0 4px; font-size: 16px; font-weight: 700; }
.portal-rows { margin: 0 0 8px; padding: 0; list-style: none; }
.portal-rows li { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--h-color-line); }
.portal-rows li > :first-child:not(.portal-check), .portal-rows-name { flex: 1; min-width: 0; }
.portal-rows li > span:last-child { font-size: 12px; color: var(--h-color-muted); text-align: right; }
.portal-rows a { color: var(--h-color-ink); text-decoration: none; }
.portal-rows a:hover { color: var(--h-color-primary-ink); }
.portal-rows .is-locked { color: var(--h-color-muted); }
.portal-rows .is-locked.is-next { color: var(--h-color-ink); }
.portal-check { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--h-color-primary); color: #fff; }
.portal .portal-phrase { flex: 1 1 260px; display: flex; flex-direction: column; gap: 14px; min-height: 220px; padding: 24px 22px 18px; border: 0; border-radius: var(--h-radius-lg); background: var(--h-color-primary-soft); color: var(--h-color-primary); }
.portal .portal-phrase-text { margin: 0; font-size: 21px; line-height: 1.25; }
.portal-phrase-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; font-size: 12px; color: var(--h-color-primary-ink); }
.portal-phrase-foot .btn { float: none; margin-left: 0; }
.portal .portal-phrase-text { padding: 0; border: 0; font-style: normal; }
