:root {
  --bg: #f6f9f9;
  --panel: #ffffff;
  --panel-soft: #f8fbfb;
  --line: #d7e6e5;
  --line-strong: #adcac8;
  --text: #102422;
  --muted: #617774;
  --muted-soft: #96aaa8;
  --blue: #0abab5;
  --blue-dark: #077f7c;
  --blue-soft: #e7f8f7;
  --green: #08765f;
  --green-soft: #ecfdf3;
  --red: #c0394c;
  --red-soft: #fff2f4;
  --shadow-soft: 0 8px 24px rgba(16, 36, 34, 0.06);
  --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page-scale: 1;
}

/* Global list tables: sticky headers and resize handles */
.app :is(.table-wrap, .side-table, .excel-wrap, .dashboard-table-wrap, .dashboard-kpi-table-wrap, .plan-summary-table-wrap, .cashflow-table-wrap, .plan-table-wrap, .accounting-table-wrap, .accounting-settings-table-wrap, .category-operations-table-wrap, .client-search-table-wrap, .lead-contact-table-wrap, .lead-outreach-table-wrap, .lead-profile-table-wrap, .lead-sequence-log-wrap, .call-table-wrap, .client-report-table-wrap, .personnel-table-wrap, .account-budget-table, .company-admin-table-wrap, .ai-log-table) {
  position: relative;
  overflow: auto;
}

.app table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 8 !important;
  background: #fbfdfd !important;
}

.app table thead th .column-resizer {
  z-index: 12 !important;
}

.app table.resizable-table {
  table-layout: fixed !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input,
select,
textarea {
  font: inherit;
  font-family: var(--font-main);
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.app {
  display: grid;
  grid-template-columns: 216px 1fr;
  width: calc(100vw / var(--page-scale));
  max-width: calc(100vw / var(--page-scale));
  min-height: calc(100vh / var(--page-scale));
  overflow-x: hidden;
  zoom: var(--page-scale);
  transition: grid-template-columns 0.18s ease;
}

.app > * {
  min-width: 0;
}

.app.is-sidebar-collapsed {
  grid-template-columns: 72px 1fr;
}

.app.is-hidden,
.auth-screen.is-hidden {
  display: none;
}

@media (min-width: 768px) and (max-width: 1180px) {
  .app {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .sidebar {
    width: 72px;
  }

  .sidebar .brand,
  .sidebar .sidebar-logo {
    justify-content: center;
  }

  .sidebar .brand span,
  .sidebar .month-button,
  .sidebar .account-user > div:not(.avatar),
  .sidebar .sidebar-logout {
    display: none;
  }

  .sidebar .sidebar-toggle {
    display: grid;
    top: 116px;
    right: 23px;
    width: 26px;
    height: 26px;
  }

  .nav {
    padding: 28px 8px 14px;
  }

  .nav-item {
    justify-content: center;
    gap: 0;
    padding: 0;
    font-size: 0;
  }

  .nav-item span {
    font-size: 14px;
  }

  .account {
    padding: 12px 8px;
    justify-items: center;
  }

  .account-user {
    justify-content: center;
    padding: 0;
  }

  .content {
    max-width: none;
    padding: 30px 20px 28px;
  }
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  justify-items: center;
  align-items: start;
  padding: clamp(56px, 14vh, 120px) 20px 20px;
  background: #f7fbfb;
}

.auth-card {
  display: grid;
  position: relative;
  width: min(400px, 100%);
  gap: 11px;
  padding: 64px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.auth-logo {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 78px;
  height: 54px;
  margin: 0;
  overflow: hidden;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.auth-heading {
  display: grid;
  gap: 3px;
}

.auth-heading h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 760;
  line-height: 1.1;
}

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

.auth-form {
  display: grid;
  justify-self: center;
  width: min(320px, 100%);
  gap: 11px;
}

.auth-register-fields {
  display: grid;
  gap: 12px;
}

.auth-form[hidden],
.auth-register-fields[hidden],
.auth-repeat-field[hidden],
.auth-recovery-form[hidden] {
  display: none;
}

.auth-inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form label span {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.auth-form input {
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 18px;
}

.budget-control select {
  min-width: 0;
  height: 24px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 14px;
}

.auth-form input:focus {
  border-color: rgba(10, 186, 181, 0.45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.1);
  outline: none;
}

.auth-status {
  min-height: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.auth-status:empty {
  display: none;
}

.auth-screen .auth-forgot,
.auth-screen .auth-footer,
.auth-screen .auth-contact-row,
.auth-screen .cookie-consent {
  display: none !important;
}

.auth-link {
  display: inline-flex;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.auth-forgot {
  margin-top: -4px;
}

.auth-contact {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.auth-contact-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(215, 230, 229, 0.72);
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
}

.cookie-consent {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(10, 186, 181, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.cookie-consent p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 620;
  line-height: 1.4;
}

.cookie-consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cookie-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.cookie-button:hover {
  border-color: rgba(10, 186, 181, 0.5);
}

.cookie-button.is-primary {
  border-color: var(--tiffany-dark);
  background: var(--tiffany-dark);
  color: #fff;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 216px;
  height: calc(100dvh / var(--page-scale));
  min-height: calc(100dvh / var(--page-scale));
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #f1faf9;
  backdrop-filter: blur(18px);
  z-index: 10;
}

.app.is-sidebar-collapsed .sidebar {
  width: 72px;
}

.sidebar-top {
  position: relative;
  display: grid;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 8px 2px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.sidebar-logo:focus-visible {
  border-radius: 12px;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.14);
  outline: none;
}

.sidebar-logo img {
  display: block;
  width: 104px;
  height: 112px;
  object-fit: contain;
  object-position: left top;
  mix-blend-mode: multiply;
}

.sidebar-toggle {
  position: absolute;
  right: 10px;
  top: 18px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.sidebar-toggle:hover {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--text);
}

.app.is-sidebar-collapsed .sidebar-logo {
  justify-content: flex-start;
  padding: 4px 4px 2px 0;
}

.app.is-sidebar-collapsed .sidebar-logo img {
  width: 46px;
  height: 58px;
  object-position: left top;
}

.app.is-sidebar-collapsed .sidebar-toggle {
  top: 132px;
  right: 23px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 16px 16px;
  font-size: 15px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-dark);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(7, 129, 127, 0.2);
}

.month-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 124px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgba(173, 202, 200, 0.8);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  box-shadow: none;
}

.period-control {
  position: relative;
  width: 124px;
  margin: 0;
}

.period-control .month-button {
  width: 100%;
  margin: 0;
}

.period-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 120;
  display: none;
  margin-top: 0;
  width: 124px;
  min-width: 124px;
  padding: 6px;
  border: 1px solid rgba(10, 186, 181, 0.14);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(11, 63, 62, 0.08);
  box-sizing: border-box;
}

.period-menu.is-open {
  display: grid;
  gap: 1px;
}

.period-option {
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 540;
  text-align: center;
  cursor: pointer;
}

.period-menu .period-option,
.period-menu .period-option:hover,
.period-menu .period-option.is-active {
  border-color: transparent !important;
  color: #000 !important;
  box-shadow: none !important;
}

.period-option.is-active,
.period-option:hover {
  background: rgba(10, 186, 181, 0.08) !important;
  color: #000;
  font-weight: 680;
}

.nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 118px 10px 14px;
  border-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.nav-item.is-access-disabled,
.app.is-sidebar-collapsed .nav-item.is-access-disabled {
  opacity: 0.28;
  cursor: default;
  filter: grayscale(1);
}

.nav-item.is-access-disabled:hover,
.app.is-sidebar-collapsed .nav-item.is-access-disabled:hover {
  background: transparent;
  color: var(--text);
}

.nav-item span {
  flex: 0 0 auto;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  font-size: 14px;
  font-weight: 780;
  line-height: 1;
}

.nav-item .nav-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app.is-sidebar-collapsed .nav {
  padding: 124px 8px 14px;
}

.app.is-sidebar-collapsed .nav-item {
  justify-content: center;
  gap: 0;
  padding: 0;
}

.app.is-sidebar-collapsed .nav-item {
  font-size: 0;
}

.app.is-sidebar-collapsed .nav-item span {
  font-size: 14px;
}

.app.is-sidebar-collapsed .nav-item .nav-icon svg {
  width: 24px;
  height: 24px;
}

.sidebar-admin {
  flex: 0 0 auto;
  padding: 10px 10px 14px;
  border-top: 1px solid var(--line);
}

.sidebar-admin:has(.sidebar-settings-button[hidden]) {
  display: none;
}

.sidebar-settings-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: rgba(10, 186, 181, 0.045);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.sidebar-settings-button[hidden] {
  display: none !important;
}

.sidebar-settings-icon {
  flex: 0 0 auto;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.sidebar-settings-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-settings-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-settings-button:hover,
.sidebar-settings-button.is-active {
  color: var(--blue-dark);
}

.app.is-sidebar-collapsed .sidebar-admin {
  padding: 10px 8px 14px;
}

.app.is-sidebar-collapsed .sidebar-settings-button {
  width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  justify-content: center;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.app.is-sidebar-collapsed .sidebar-settings-label {
  display: none !important;
}

.app.is-sidebar-collapsed .sidebar-settings-icon {
  width: 32px;
  height: 32px;
}

.nav-item:hover {
  background: transparent;
  color: var(--blue-dark);
}

.nav-item.is-active {
  background: transparent;
  color: var(--blue-dark);
  box-shadow: none;
}

.account {
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  margin-top: auto;
  min-height: 92px;
  padding: 22px 16px 10px;
  border-top: 1px solid var(--line);
  background: #f1faf9;
  align-content: end;
}

.app.is-sidebar-collapsed .account {
  padding: 12px 8px;
  justify-items: center;
}

.app.is-sidebar-collapsed .account-user {
  justify-content: center;
  padding: 0;
}

.app.is-sidebar-collapsed .account-user > div:not(.avatar),
.app.is-sidebar-collapsed .sidebar-logout {
  display: none;
}

.account-user {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: default;
  border-radius: 14px;
  padding: 8px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

button.account-user {
  cursor: pointer;
}

button.account-user:hover,
button.account-user.is-active {
  background: #fff;
  box-shadow: var(--shadow-soft);
}

button.account-user:hover strong,
button.account-user.is-active strong {
  color: var(--blue-dark);
}

.account-form {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.account-form label {
  display: grid;
  gap: 5px;
}

.account-form label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
}

.account-form input {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.account-form input:focus {
  border-color: rgba(10, 186, 181, 0.5);
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.12);
  outline: none;
}

.account-form .compact-button {
  width: 100%;
  min-height: 32px;
}

.account-status {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 760;
}

.account strong,
.account span {
  display: block;
}

.account strong {
  font-size: 12px;
}

.account span {
  color: var(--muted);
  font-size: 11px;
}

.sidebar-logout {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
}

.sidebar-logout:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: #fff;
}

.content {
  position: relative;
  grid-column: 2;
  min-width: 0;
  max-width: 1480px;
  width: 100%;
  overflow-x: hidden;
  padding: 8px clamp(28px, 5vw, 72px) 44px;
  background: var(--bg);
}

.top-header {
  position: relative;
  z-index: 80;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  margin: 0 0 12px;
  gap: 12px;
}

.top-header-context {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.current-enterprise-name {
  display: inline-flex;
  align-items: center;
  max-width: min(320px, 34vw);
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(10, 186, 181, 0.1);
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-enterprise-select {
  width: min(240px, 24vw);
  min-width: 132px;
  height: 30px;
  min-height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 560;
}

.current-enterprise-name[hidden],
.top-enterprise-select[hidden] {
  display: none !important;
}

.top-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.session-countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.session-countdown[hidden] {
  display: none !important;
}

.session-countdown.is-warning {
  border-color: #d33c3c;
  color: #b42323;
  background: #fff6f6;
}

.top-period-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
}

.top-period-control .month-button {
  width: 124px;
  height: 34px;
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
  background: #fff;
  box-shadow: none;
}

body.is-leads-view .top-period-control {
  display: none;
}

.top-header-actions .export-button {
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12px;
}

.top-account {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.top-account .account-user {
  width: auto;
  min-width: 136px;
  height: 34px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(10, 186, 181, 0.065);
  box-shadow: var(--shadow-soft);
}

.top-account .avatar {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.top-account .user-arrow {
  order: 2;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 820;
}

.top-account .top-user-button {
  justify-content: space-between;
}

.top-account .top-user-button:hover,
.top-account .top-user-button.is-active {
  border-color: var(--blue);
  background: rgba(10, 186, 181, 0.11);
}

.top-account .account-user strong {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-account .account-user span {
  display: none;
}

.top-account .sidebar-logout {
  display: none !important;
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  width: 220px;
  padding: 6px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.user-menu-panel[hidden] {
  display: none !important;
}

.user-menu-panel button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.user-menu-panel button:hover {
  background: rgba(10, 186, 181, 0.08);
}

.global-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 18px 0 24px;
  padding-right: 0;
}

.content.is-settings-view .global-actions {
  display: none;
}

.budget-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 0;
}

.control-label {
  color: var(--muted);
  white-space: nowrap;
}

.budget-control select {
  width: 170px;
  background: rgba(10, 186, 181, 0.1);
  border-color: var(--line-strong);
  box-shadow: none;
  font-weight: 760;
}

.is-budget-locked {
  opacity: 0.45;
  pointer-events: none;
}

.export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.export-button:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.activity-widget {
  position: relative;
  flex: 0 0 auto;
  z-index: 40;
}

.activity-button {
  position: relative;
  display: grid;
  width: 42px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.activity-button:hover {
  border-color: var(--line-strong);
}

.activity-envelope-icon {
  position: relative;
  display: block;
  width: 17px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}

.activity-envelope-icon::before,
.activity-envelope-icon::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 11px;
  height: 1.8px;
  background: currentColor;
  transform-origin: center;
}

.activity-envelope-icon::before {
  left: -1px;
  transform: rotate(34deg);
}

.activity-envelope-icon::after {
  right: -1px;
  transform: rotate(-34deg);
}

.activity-button strong {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #d83a3a;
  color: #fff;
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
}

.activity-button strong:empty,
.activity-button strong.is-empty {
  display: none;
}

.activity-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 48px));
  max-height: min(430px, calc(100vh - 96px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(16, 36, 34, 0.14);
  overflow: hidden;
}

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

.activity-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 640;
}

.activity-read-all-button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.activity-list {
  display: grid;
  gap: 8px;
  max-height: min(364px, calc(100vh - 160px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.activity-item {
  position: relative;
  display: flex;
  align-items: start;
  gap: 8px;
  justify-content: space-between;
  padding: 0 0 8px 10px;
  border-bottom: 1px solid rgba(217, 233, 232, 0.75);
}

.activity-item::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.activity-item.is-unread::before {
  background: var(--blue-dark);
}

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

.activity-item strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item-main {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.activity-item-main:hover strong {
  color: var(--blue-dark);
}

.activity-read-button {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.activity-read-button:hover {
  border-color: var(--line-strong);
}

.view {
  display: none;
  min-width: 0;
  max-width: 100%;
}

.view.is-visible {
  display: block;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(27px, 2.4vw, 36px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

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

p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(116px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.summary div {
  padding: 13px 18px;
  border-left: 1px solid var(--line);
}

.summary div:first-child {
  border-left: 0;
}

.summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
}

.summary strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 760;
}

.type-dropdown {
  position: relative;
  width: 180px;
  margin-bottom: 24px;
}

.type-dropdown-button {
  display: flex;
  align-items: center;
  width: 100%;
  height: 28px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
  box-shadow: none;
}

.type-menu {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  display: none;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(16, 24, 40, 0.14);
}

.type-dropdown.is-open .type-menu {
  display: grid;
  gap: 2px;
}

.type-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.type-option:hover,
.type-option.is-active {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}

.type-check {
  color: var(--blue-dark);
  font-weight: 800;
}

.planning-tabs {
  display: flex;
  width: 100%;
  gap: 3px;
  align-items: center;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.selected-statement-totals {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  min-height: 30px;
  padding: 0 4px;
  white-space: nowrap;
}

.selected-statement-totals[hidden] {
  display: none !important;
}

.selected-statement-totals span {
  font-size: 14px;
  font-weight: 500;
  color: #000;
}

.planning-tab {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
}

.planning-tab.is-active {
  background: var(--text);
  color: #fff;
  box-shadow: 0 8px 18px rgba(16, 36, 34, 0.14);
}

.planning-tab:hover:not(.is-active) {
  background: rgba(231, 248, 247, 0.9);
  color: var(--text);
}

.planning-library-panel {
  width: 100%;
  max-width: 100%;
}

.planning-library-panel .settings-section {
  padding-top: 0;
  border-top: 0;
}

.planning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  column-gap: 18px;
  align-items: start;
}

.planning-grid.is-readonly {
  grid-template-columns: minmax(0, 1fr);
}

.planning-grid.is-readonly .side-panel {
  display: none;
}

.planning-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.planning-main > .notice {
  margin-bottom: 0;
}

.plan-table-wrap {
  height: calc(100vh - 248px);
  min-height: 380px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.plan-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(159, 211, 208, 0.72);
}

.plan-table-wrap .column-resizer::after {
  display: none;
}

.plan-table-wrap.resizable-table th:not(:last-child),
.plan-table-wrap .resizable-table th:not(:last-child) {
  box-shadow: none;
}

.plan-summary-board {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}

.plan-summary-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.plan-summary-table {
  width: 100%;
  min-width: 620px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.plan-summary-table th,
.plan-summary-table td {
  height: 26px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(215, 230, 229, 0.72);
  font-size: 11px;
}

.plan-summary-table th {
  color: var(--muted);
  font-weight: 820;
  text-transform: uppercase;
}

.plan-summary-table td {
  color: var(--text);
  font-weight: 780;
}

.plan-summary-table th:first-child,
.plan-summary-table td:first-child {
  width: 42%;
}

.plan-summary-table .num {
  text-align: right;
  white-space: nowrap;
}

.plan-summary-total-row td {
  border-bottom: 0;
  background: #fbfefe;
  color: var(--blue-dark);
  font-weight: 860;
}

.planning-statement-panel {
  display: none;
}

.planning-cashflow-panel {
  display: none;
}

.cashflow-table-wrap {
  height: calc(100vh - 248px);
  min-height: 380px;
}

.side-panel {
  min-width: 0;
  max-width: 100%;
}

.side-panel h2 {
  margin-bottom: 0;
}

.side-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.side-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.side-table table {
  min-width: 0;
}

.side-table th,
.side-table td {
  padding: 0 12px;
}

.plan-row-actions,
.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.table-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6f807d;
  font-size: 14px;
  font-weight: 730;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.table-action-button:hover {
  background: rgba(10, 186, 181, 0.08);
  color: var(--accent-dark);
  text-decoration: none;
}

.table-action-button.is-danger {
  color: #7e8a88;
}

.table-action-button.is-danger:hover {
  background: var(--red-soft);
  color: var(--danger);
}

.table-action-button.is-muted {
  color: var(--muted);
}

.table-action-button:disabled {
  color: rgba(110, 128, 125, 0.48);
  cursor: default;
  text-decoration: none;
}

.table-trash-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.plan-category-status {
  min-height: 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.empty-table-cell {
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.primary-button,
.ghost-button,
.danger-button,
.neutral-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.primary-button {
  background: var(--blue-dark);
  color: #fff;
  box-shadow: 0 10px 22px rgba(7, 129, 127, 0.16);
}

.primary-button:hover {
  background: #066f6c;
  transform: translateY(-1px);
}

.ghost-button {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.ghost-button:hover {
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.danger-button {
  background: transparent;
  color: var(--red);
}

.primary-button input {
  display: none;
}

.source-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.source-add-file {
  position: relative;
  overflow: hidden;
}

.notice {
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(10, 186, 181, 0.22);
  border-radius: 12px;
  background: #fbfefe;
  color: var(--green);
  font-size: 12px;
  font-weight: 650;
}

#fileInput {
  display: none;
}

.source-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 18px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.source-upload-panel {
  min-width: 0;
}

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

.source-upload-board {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
  box-shadow: var(--shadow-soft);
}

.source-add-file {
  border-color: rgba(10, 186, 181, 0.55);
  background: #f1fffe;
  color: var(--blue-dark);
  box-shadow: inset 0 0 0 1px rgba(10, 186, 181, 0.08);
}

.source-add-file:hover {
  background: #e7fbfa;
}

.source-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.neutral-icon {
  background: #edf4f3;
  color: var(--text);
}

.search-icon {
  background: #eef8f7;
  color: var(--blue-dark);
}

.source-upload-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.manual-entry-form {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.manual-entry-form input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.manual-entry-form input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.1);
  outline: none;
}

.manual-entry-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.table-wrap.small {
  max-height: 560px;
}

.excel-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  height: calc(100vh - 324px);
  min-height: 360px;
  max-height: 720px;
  overflow: auto;
  position: relative;
}

.excel-table {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.excel-table .corner-cell,
.excel-table td.row-number {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  padding-right: 0;
  padding-left: 0;
}

.excel-table .corner-cell {
  text-align: center;
}

.select-column-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 780;
  line-height: 1;
  text-transform: uppercase;
}

.excel-table th:nth-child(2),
.excel-table td:nth-child(2) {
  width: 104px;
}

.excel-table th:nth-child(3),
.excel-table td:nth-child(3) {
  width: 82px;
}

.excel-table th:nth-child(4),
.excel-table td:nth-child(4) {
  min-width: 0;
  overflow: hidden;
}

.excel-table th:nth-child(5),
.excel-table td:nth-child(5) {
  width: 104px;
}

.excel-table th:nth-child(6),
.excel-table td:nth-child(6) {
  width: 64px;
}

.excel-table th,
.excel-table td {
  height: 31px;
  border-right: 0;
  border-bottom: 0;
}

.excel-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 18 !important;
  background: #fbfdfd !important;
}

#statement .notice {
  border: 1px solid var(--line);
  padding-left: 14px;
}

.code-enrich-button {
  min-height: 26px;
  white-space: nowrap;
}

.code-enrich-button.is-active {
  border-color: rgba(10, 186, 181, 0.52);
  background: #f1fffe;
}

.bulk-toolbar {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.bulk-toolbar.has-selection {
  display: flex;
}

.bulk-toolbar span {
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.bulk-toolbar select {
  min-width: 150px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.bulk-toolbar button:disabled {
  cursor: default;
  opacity: 0.45;
}

#statement .excel-table,
#statement .excel-table th,
#statement .excel-table td {
  border: 0;
  border-color: transparent;
}

.excel-table th {
  padding: 4px 7px;
  text-align: center;
  line-height: 1.2;
}

.sort-header {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sort-header.is-active {
  color: var(--blue-dark);
}

.excel-table td {
  padding: 0 7px;
  font-size: 11px;
  font-weight: 660;
}

.statement-name-cell {
  min-width: 0;
}

.statement-name-value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-table td.num {
  white-space: nowrap;
}

.statement-input {
  width: 100%;
  min-width: 0;
  height: 25px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.statement-input:hover,
.statement-input:focus {
  border-color: var(--line);
  background: #fff;
  outline: none;
}

.statement-input.amount-field {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.source-cell {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

#statement .code-select {
  width: 100%;
  min-width: 0;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

#statement .code-select:hover,
#statement .code-select:focus {
  border-color: transparent;
  outline: none;
}

.excel-table th span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-transform: none;
}

.corner-cell,
.row-number {
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  color: var(--muted);
  text-align: center;
}

.row-number {
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.row-select-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.row-checkbox {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--blue-dark);
}

tr.is-selected td {
  background: #f1fffe;
}

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

.excel-table th:last-child,
.excel-table td:last-child {
  border-right: 0;
}

table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap table,
.dashboard-table-wrap table {
  table-layout: fixed;
}

.resizable-table {
  table-layout: fixed;
}

th,
td {
  height: 46px;
  padding: 0 16px;
  border-bottom: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th {
  position: relative;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
  background: #fbfdfd;
}

thead th {
  border-bottom: 1px solid rgba(215, 230, 229, 0.76);
}

.column-resizer {
  position: absolute;
  top: 9px;
  right: 0;
  z-index: 2;
  width: 10px;
  height: calc(100% - 18px);
  cursor: col-resize;
  touch-action: none;
}

.column-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 4px;
  width: 2px;
  height: 100%;
  border-radius: 999px;
  background: transparent;
  transition: background 0.12s ease;
}

.column-resizer:hover::after,
body.is-resizing-columns .column-resizer::after {
  background: rgba(10, 186, 181, 0.85);
}

.is-sortable-column {
  cursor: pointer;
  padding-right: 24px !important;
  user-select: none;
}

.is-sortable-column::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  transform: translateY(-50%);
  opacity: 0.72;
  pointer-events: none;
}

.is-sortable-column[data-sort-direction="asc"]::after {
  content: "↑";
  color: var(--blue-dark);
  opacity: 1;
}

.is-sortable-column[data-sort-direction="desc"]::after {
  content: "↓";
  color: var(--blue-dark);
  opacity: 1;
}

.resizable-table th:not(:last-child) {
  box-shadow: inset -1px 0 rgba(10, 186, 181, 0.12);
}

body.is-resizing-columns {
  cursor: col-resize;
  user-select: none;
}

td {
  font-size: 14px;
  font-weight: 600;
}

tbody tr {
  transition: background 0.14s ease;
}

tbody tr:not(.group-row):hover td {
  background: #fbfdfd;
}

tbody tr:not(.group-row) td {
  border-top: 1px solid rgba(215, 230, 229, 0.62);
}

tbody tr:first-child td {
  border-top: 0;
}

tfoot td {
  border-bottom: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
  text-transform: uppercase;
}

.group-row td {
  height: 36px;
  border-top: 1px solid rgba(159, 211, 208, 0.72);
  background: #fff;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.group-row td.num {
  font-size: 12px;
  font-weight: 820;
  text-transform: none;
}

.group-row.income-group td {
  border-top: 1px solid rgba(159, 211, 208, 0.72);
  color: #08765f;
}

.group-row.expense-group td {
  border-top: 1px solid rgba(159, 211, 208, 0.72);
  color: #b4233a;
}

tbody tr:first-child.group-row td {
  border-top: 0;
}

.plan-table-wrap tbody tr:not(.group-row) td {
  border-top: 0;
}

.plan-table-wrap tbody tr.group-row td {
  border-top: 1px solid rgba(159, 211, 208, 0.72);
}

.plan-table-wrap tbody tr:first-child.group-row td {
  border-top: 0;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.num.is-negative {
  color: var(--red);
}

.positive {
  color: var(--blue-dark);
}

.negative {
  color: var(--red);
}

.muted {
  color: var(--muted);
}

.code-select {
  width: 100%;
  min-width: 160px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  font-size: 14px;
}

.table-input {
  width: 100%;
  min-width: 110px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.table-input:hover,
.table-input:focus {
  border-color: var(--line-strong);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.08);
  outline: none;
}

.plan-input {
  min-width: 90px;
  max-width: 120px;
  padding-right: 24px;
  text-align: right;
}

.plan-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.plan-input-wrap span {
  position: absolute;
  right: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  pointer-events: none;
}

.plan-input-wrap .plan-input:disabled + span {
  color: var(--muted-soft);
}

.plan-readonly-value {
  display: inline-block;
  min-width: 90px;
  text-align: right;
}

.table-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  vertical-align: middle;
}

.muted-table-text {
  color: var(--muted);
}

.category-name-text,
.category-keyword-text {
  width: 100%;
}

.category-keyword-text {
  color: var(--muted);
  font-weight: 650;
}

.code-field {
  min-width: 58px;
}

.icon-button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--red);
  cursor: pointer;
}

.icon-button:hover {
  border-color: #ffd1d8;
  background: var(--red-soft);
}

.report-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.help-button {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.report-help-row {
  display: none;
}

.report-help-row.is-visible {
  display: table-row;
}

.report-help-row td {
  height: auto;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: normal;
}

tr.is-editing td {
  background: #f8fffe;
  box-shadow: inset 0 1px 0 var(--blue-soft), inset 0 -1px 0 var(--blue-soft);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, min(34vw, 380px));
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

#categorySettings {
  grid-template-columns: minmax(0, 1fr);
}

.category-create-panel,
.category-list-panel {
  min-width: 0;
}

.category-create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-create-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue-dark);
  font-size: 18px;
  font-weight: 780;
}

.category-create-panel .category-form {
  margin-top: 12px;
}

.category-create-panel.is-collapsed {
  padding-bottom: 18px;
}

.category-create-panel.is-collapsed .category-form {
  display: none;
}

.category-table table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.category-table {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.category-table th,
.category-table td {
  height: 42px;
  padding: 0 8px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
}

.category-table th:nth-child(1),
.category-table td:nth-child(1) {
  width: 76px;
}

.category-table th:nth-child(2),
.category-table td:nth-child(2) {
  width: 24%;
}

.category-table th:nth-child(3),
.category-table td:nth-child(3) {
  width: 118px;
}

.category-table th:nth-child(4),
.category-table td:nth-child(4) {
  width: auto;
}

.category-table th:nth-child(5),
.category-table td:nth-child(5) {
  width: 70px;
}

.code-pill {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.category-color-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.category-group-name {
  font-weight: 720;
}

.category-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.category-row-add {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
}

.category-table tr.is-draft-category td {
  background: rgba(10, 186, 181, 0.035);
}

.category-group-row td {
  padding: 0 10px;
}

.mini-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
}

.category-table .icon-button {
  width: 24px;
  height: 24px;
}

.category-tabs {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

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

.dashboard-selected {
  margin-bottom: 28px;
}

.dashboard-data-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: -10px 0 16px;
  padding: 7px 12px;
  border: 1px solid rgba(215, 230, 229, 0.9);
  border-radius: 999px;
  background: #fbfdfd;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.dashboard-data-date > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.dashboard-data-date strong {
  color: var(--text);
  font-weight: 760;
}

.dashboard-data-date em {
  color: var(--muted);
  font-style: normal;
}

.dashboard-mini-grid {
  display: grid;
  align-items: start;
  justify-content: space-between;
  grid-template-columns: repeat(3, minmax(0, 360px));
  gap: 10px;
  margin-bottom: 10px;
  min-width: 0;
}

.dashboard-client-plan {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 352px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 36, 34, 0.035);
  min-width: 0;
}

.dashboard-client-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.dashboard-client-plan-head h2 {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 820;
  line-height: 1.32;
  text-transform: uppercase;
}

.dashboard-client-plan-total {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-client-plan-total span {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.dashboard-client-list {
  display: grid;
  align-content: start;
  align-self: start;
  row-gap: 5px;
  max-height: 286px;
  overflow: auto;
  min-width: 0;
}

.dashboard-client-list-item,
.dashboard-client-list-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0;
  color: var(--text);
  font-size: 10.5px;
  line-height: 1.25;
}

.dashboard-client-list-group {
  min-height: 18px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 820;
  line-height: 1.3;
  text-transform: uppercase;
}

#dashboardPeriodSummary {
  gap: 6px;
  padding: 4px 8px;
}

#dashboardPeriodSummary .dashboard-client-list {
  row-gap: 3px;
}

#dashboardPeriodSummary .dashboard-client-list-item {
  gap: 4px;
  height: auto;
  min-height: 24px;
}

#dashboardPeriodSummary .dashboard-client-list-item span {
  white-space: normal;
}

#dashboardCustomBoard .dashboard-client-list-item {
  grid-template-columns: minmax(0, 1fr) auto 26px;
}

.dashboard-custom-select {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 10.5px;
}

.dashboard-custom-add,
.dashboard-custom-remove {
  width: 26px;
  height: 26px;
  min-height: 26px;
}

.dashboard-client-list-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardPeriodSummary .dashboard-client-list-item span,
#dashboardPlanSummaryBoard .dashboard-client-list-item span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

#dashboardPlanSummaryBoard .dashboard-client-list-item span {
  line-height: 1.08;
  white-space: normal;
}

#dashboardPayablesBoard .dashboard-client-list-item span {
  line-height: 1.08;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

#dashboardPayablesBoard .dashboard-client-list-item {
  height: auto;
  min-height: 24px;
  align-items: start;
}

#dashboardPayablesBoard .dashboard-client-list-item strong {
  padding-top: 1px;
}

.dashboard-client-list-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.15;
}

#dashboardPlanSummaryBoard .dashboard-client-list-item:has(small) {
  height: auto;
  min-height: 48px;
  align-items: start;
}

#dashboardPlanSummaryBoard .dashboard-client-list-item small {
  display: block;
  margin-top: 1px;
  margin-left: 0;
  line-height: 1.05;
}

#dashboardPlanSummaryBoard .dashboard-client-list-item strong {
  padding-top: 1px;
}

.dashboard-client-list-item strong {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 820;
  line-height: 1.25;
  white-space: nowrap;
}

.dashboard-client-list-item.is-result {
  font-weight: 820;
}

.dashboard-client-list-item.is-negative strong {
  color: var(--red);
}

.dashboard-client-list-empty {
  grid-template-columns: minmax(0, 1fr);
  height: 38px;
  color: var(--muted);
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin-bottom: 16px;
}

.dashboard-kpi-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 36, 34, 0.035);
}

.dashboard-kpi-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.dashboard-kpi-table th,
.dashboard-kpi-table td {
  width: 148px;
  min-width: 148px;
  height: 42px;
  padding: 0 10px;
  border-right: 1px solid rgba(215, 230, 229, 0.72);
  border-bottom: 1px solid rgba(215, 230, 229, 0.72);
  text-align: left;
  white-space: normal;
}

.dashboard-kpi-table th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  line-height: 1.25;
  text-transform: uppercase;
}

.dashboard-kpi-table td {
  color: var(--text);
  font-size: 14px;
  font-weight: 820;
  white-space: nowrap;
}

.dashboard-kpi-table td.is-income {
  color: var(--blue-dark);
}

.dashboard-kpi-table td.is-expense {
  color: var(--red);
}

.dashboard-kpi-table th:last-child,
.dashboard-kpi-table td:last-child {
  border-right: 0;
}

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

.dashboard-kpi-card {
  display: grid;
  align-content: space-between;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 36, 34, 0.035);
  min-width: 0;
  overflow: hidden;
}

.dashboard-kpi-card span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 820;
  line-height: 1.32;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dashboard-kpi-card strong {
  margin-top: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 820;
  line-height: 1;
  white-space: normal;
}

.dashboard-kpi-card.is-income {
  border-color: rgba(10, 186, 181, 0.28);
  background: rgba(10, 186, 181, 0.045);
}

.dashboard-kpi-card.is-expense {
  border-color: rgba(192, 57, 72, 0.2);
  background: rgba(192, 57, 72, 0.035);
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.metric::after {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: var(--blue);
  content: "";
  opacity: 0.28;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 740;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 14px;
  font-size: 25px;
  font-weight: 820;
}

.metric-table {
  padding: 0;
  overflow: hidden;
}

.metric-table::after {
  display: none;
}

.metric-table table {
  min-width: 0;
}

.metric-table th,
.metric-table td {
  height: 54px;
  padding: 0 14px;
  font-size: 12px;
}

.metric-table th {
  color: var(--muted);
  text-align: left;
  text-transform: uppercase;
}

.metric-graph strong {
  font-size: 20px;
}

.metric-bar {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #dff1f0;
}

.metric-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.dashboard-detail-grid,
.dashboard-tables-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.dashboard-detail-card,
.dashboard-table-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}

.dashboard-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfd;
}

.dashboard-detail-heading h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-detail-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.dashboard-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: auto;
}

.dashboard-table-wrap table {
  min-width: 0;
}

.dashboard-table-wrap th,
.dashboard-table-wrap td {
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(215, 230, 229, 0.72);
  font-size: 11px;
}

.dashboard-table-wrap th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
}

.dashboard-table-wrap tr:last-child td {
  border-bottom: 0;
}

.report-heading {
  margin-top: 20px;
}

.dashboard-report-table table {
  min-width: 620px;
}

#planningDashboard,
#planningDashboard * {
  font-family: var(--font-main) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

#planningDashboard .dashboard-kpi-card,
#planningDashboard .dashboard-kpi-table-wrap,
#planningDashboard .dashboard-detail-card,
#planningDashboard .dashboard-table-panel {
  line-height: 1.35;
}

#planningDashboard .dashboard-kpi-card span,
#planningDashboard .dashboard-kpi-card strong {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}


.settings-content {
  display: grid;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  gap: 16px;
}

.settings-section {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.settings-section[hidden] {
  display: none;
}

.settings-nav {
  display: flex;
  flex-wrap: wrap;
  max-width: 1120px;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.settings-section-heading {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: baseline;
  gap: 18px;
}

.settings-section-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 680;
  line-height: 1.15;
}

.settings-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.settings-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.settings-tab {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.settings-tab.is-active {
  background: var(--text);
  color: #fff;
  box-shadow: 0 8px 18px rgba(16, 36, 34, 0.14);
}

.settings-tab:hover:not(.is-active) {
  background: var(--blue-soft);
  color: var(--text);
}

.panel {
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 36, 34, 0.045);
}

.settings-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
  max-width: 620px;
  margin-bottom: 16px;
}

.settings-form.category-form {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  align-items: end;
  max-width: none;
  margin-bottom: 0;
}

.settings-form.category-form > button[type="submit"] {
  width: fit-content;
  min-width: 154px;
}

.settings-toggle-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  max-width: 620px;
  margin: 0 0 16px;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--line);
}

.settings-toggle-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.settings-toggle-row strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 680;
}

.settings-toggle-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.settings-form label {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.settings-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.settings-form input,
.settings-form select {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 450;
}

.settings-form input[readonly] {
  background: #fff;
  color: var(--muted);
}

.settings-form input:focus,
.settings-form select:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.1);
  outline: none;
}

.settings-form .primary-button {
  width: fit-content;
  justify-self: start;
  min-height: 38px;
  padding: 0 14px;
}

.budget-create-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  max-width: 620px;
}

.budget-create-form label {
  grid-template-columns: 138px minmax(0, 1fr);
}

.settings-form.sheet-form {
  grid-template-columns: minmax(260px, 420px) 180px;
  align-items: end;
  max-width: 640px;
}

.settings-form.sheet-form .primary-button {
  width: auto;
}

.import-button input {
  display: none;
}

.settings-hint {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.account-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  max-width: 1040px;
}

.account-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.account-tab {
  min-height: 28px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
}

.account-tab:hover,
.account-tab.is-active {
  background: rgba(10, 186, 181, 0.08);
}

.account-module-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.account-module-tab {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.account-module-tab:hover,
.account-module-tab.is-active {
  background: rgba(10, 186, 181, 0.08);
}

.account-settings-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.account-settings-panel[hidden] {
  display: none !important;
}

.account-profile-panel,
.account-budget-panel,
.account-admin-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: none;
}

.account-profile-panel[hidden] {
  display: none !important;
}

.account-budget-panel[hidden] {
  display: none !important;
}

.account-admin-panel[hidden] {
  display: none !important;
}

.account-panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.account-panel-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 780;
}

.account-panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.account-avatar-large {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.account-settings-form {
  display: grid;
  gap: 14px;
}

.account-settings-section {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.account-settings-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.account-settings-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.account-settings-title p {
  display: none;
}

.account-settings-fields {
  display: grid;
  gap: 8px;
  max-width: 620px;
}

.account-settings-fields label {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.account-settings-fields label span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-transform: none;
}

.account-settings-fields input {
  width: 100%;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.account-settings-fields input:focus {
  border-color: rgba(10, 186, 181, 0.5);
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.12);
  outline: none;
}

.account-settings-form > .primary-button {
  justify-self: start;
  min-width: 168px;
  min-height: 34px;
}

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

.account-budget-table table {
  min-width: 100%;
  table-layout: fixed;
}

.account-budget-table th:nth-child(1),
.account-budget-table td:nth-child(1) {
  width: 42%;
}

.account-budget-table th:nth-child(2),
.account-budget-table td:nth-child(2) {
  width: 18%;
}

.account-budget-table th:nth-child(3),
.account-budget-table td:nth-child(3) {
  width: 20%;
}

.account-budget-table th:nth-child(4),
.account-budget-table td:nth-child(4) {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

.account-budget-table th,
.account-budget-table td {
  height: 34px;
  padding-top: 4px;
  padding-bottom: 4px;
  vertical-align: middle;
}

.account-budget-table td:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-budget-table tr.is-budget-renaming td {
  background: rgba(10, 186, 181, 0.06);
}

.account-budget-header-row th {
  background: rgba(247, 250, 250, 0.92);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.account-budget-header-row th.num {
  text-align: right;
}

.table-inline-input,
.table-inline-select {
  width: 100%;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
}

.account-budget-table .table-text {
  display: block;
  font-size: 11px;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-budget-table .row-actions {
  gap: 6px;
  justify-content: flex-end;
}

.budget-source-row td {
  background: rgba(247, 250, 250, 0.54);
  padding: 6px 8px 8px;
}

.budget-source-box {
  display: grid;
  gap: 6px;
}

.budget-source-form {
  display: grid;
  grid-template-columns: minmax(116px, 1.15fr) minmax(86px, 0.7fr) minmax(130px, 1fr) minmax(82px, 0.62fr) minmax(70px, 0.48fr) 64px auto;
  gap: 4px;
  align-items: center;
}

.budget-source-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.budget-source-table th,
.budget-source-table td {
  height: 26px;
  padding: 3px 4px;
  border-top: 1px solid var(--line);
}

.budget-source-table th:nth-child(1),
.budget-source-table td:nth-child(1) {
  width: 16%;
}

.budget-source-table th:nth-child(2),
.budget-source-table td:nth-child(2) {
  width: 12%;
}

.budget-source-table th:nth-child(3),
.budget-source-table td:nth-child(3) {
  width: 20%;
}

.budget-source-table th:nth-child(4),
.budget-source-table td:nth-child(4) {
  width: 11%;
}

.budget-source-table th:nth-child(5),
.budget-source-table td:nth-child(5) {
  width: 9%;
}

.budget-source-table th:nth-child(6),
.budget-source-table td:nth-child(6) {
  width: 9%;
}

.budget-source-table th:nth-child(7),
.budget-source-table td:nth-child(7) {
  width: 23%;
}

.budget-source-table th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  text-align: left;
  text-transform: uppercase;
}

.budget-source-table th.num,
.budget-source-table td.num {
  text-align: right;
}

.budget-source-form .source-mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 10px;
  font-weight: 820;
  white-space: nowrap;
  cursor: pointer;
}

.budget-source-form .table-inline-input,
.budget-source-form .table-inline-select,
.budget-source-table .table-inline-input,
.budget-source-table .table-inline-select {
  min-height: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 7px;
  font-size: 10px;
}

.budget-source-form .source-mini-button:disabled {
  cursor: default;
  opacity: .5;
}

.budget-rename-input {
  max-width: 420px;
}

.budget-date-text {
  color: var(--muted);
  font-weight: 620;
}

.account-budget-panel .account-status {
  width: fit-content;
  max-width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.account-budget-status:empty,
.account-profile-status:empty {
  display: none;
}

.table-inline-select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 14px center / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 10px center / 6px 6px no-repeat,
    #fff;
  padding-right: 30px;
}

.table-inline-input:focus,
.table-inline-select:focus {
  border-color: rgba(10, 186, 181, 0.5);
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.12);
  outline: none;
}

.api-preview {
  margin-top: 16px;
}

.api-preview .side-heading {
  align-items: center;
}

.api-preview h2 {
  margin-bottom: 0;
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 10px;
  box-sizing: border-box;
}

.api-preview pre {
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfd;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

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

.group-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.group-item strong {
  font-size: 14px;
  font-weight: 700;
}

.group-item span {
  color: var(--muted);
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(16, 36, 34, 0.28);
  cursor: pointer;
}

.export-dialog {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 36, 34, 0.18);
}

.neutral-button {
  color: var(--muted);
}

.neutral-button:hover {
  border-color: var(--line);
  background: var(--panel-soft);
}

.export-form {
  gap: 8px;
  max-width: none;
  margin-bottom: 0;
}

.export-form .primary-button {
  width: 100%;
  justify-self: stretch;
}

.export-fixed-format,
.export-period {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.export-fixed-format span,
.export-period span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.export-fixed-format strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 820;
}

.export-period select {
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 820;
}

.export-period select:focus {
  outline: none;
}

.export-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.export-status.is-error {
  color: #b43a3a;
}

.print-template {
  display: none;
}

.print-report {
  color: #102422;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.print-cover {
  padding-bottom: 18px;
  border-bottom: 2px solid #0abab5;
}

.print-cover span {
  color: #077f7c;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.print-cover h1 {
  margin-top: 8px;
  font-size: 28px;
}

.print-cover p {
  margin-top: 8px;
  color: #617774;
  font-size: 12px;
}

.print-summary,
.print-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.print-summary-section {
  margin-top: 18px;
}

.print-summary-section h2 {
  margin-bottom: 10px;
  font-size: 16px;
}

.print-summary div,
.print-metric {
  padding: 12px;
  border: 1px solid #d7e6e5;
  border-radius: 12px;
}

.print-summary span,
.print-metric span {
  display: block;
  color: #617774;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.print-summary strong,
.print-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.print-section {
  margin-top: 22px;
  break-inside: avoid;
}

.print-section h2 {
  margin-bottom: 10px;
  font-size: 16px;
}

.print-section table {
  min-width: 0;
  border-collapse: collapse;
}

.print-section th,
.print-section td {
  height: 30px;
  padding: 0 8px;
  border: 1px solid #d7e6e5;
  font-size: 10px;
}

.print-section th {
  background: #f6f9f9;
}

.print-stats-table,
.print-compact-table,
.print-full-log-table {
  width: 100%;
  table-layout: fixed;
}

.print-stats-table th,
.print-stats-table td,
.print-compact-table th,
.print-compact-table td,
.print-full-log-table th,
.print-full-log-table td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

.print-total-row th {
  background: #eef7f7;
  font-weight: 600;
}

.print-daily-summary-table col {
  width: 16.666%;
}

.print-daily-summary-table th,
.print-daily-summary-table td {
  text-align: center;
}

.print-daily-summary-table thead th,
.print-daily-summary-table .print-total-row th {
  font-weight: 600;
}

.print-daily-summary-table th:first-child,
.print-daily-summary-table td:first-child {
  text-align: left;
}

.print-daily-summary-table tr.is-weekend td {
  color: #c74444;
  background: #fff7f7;
}

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

.print-line-chart-card {
  margin-bottom: 12px;
}

.print-line-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.print-line-chart .axis {
  stroke: #9ab8b5;
  stroke-width: 1.2;
}

.print-line-chart .grid {
  stroke: #e3f0ef;
  stroke-width: 1;
}

.print-line-chart .line {
  fill: none;
  stroke: #d94747;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.print-line-chart .point {
  fill: #d94747;
  stroke: #fff;
  stroke-width: 2;
}

.print-line-chart text {
  fill: #617774;
  font-family: inherit;
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

.print-line-chart .x-axis-label {
  font-size: 9px;
  font-weight: 400;
}

.print-chart-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d7e6e5;
  border-radius: 12px;
  break-inside: avoid;
}

.print-chart-card h3,
.print-day-log h3 {
  margin: 0 0 8px;
  font-size: 12px;
}

.print-chart-row {
  display: grid;
  grid-template-columns: minmax(62px, 1fr) minmax(90px, 2fr) 28px;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
  font-size: 9px;
}

.print-chart-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-chart-row div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6f4f3;
}

.print-chart-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0abab5;
}

.print-chart-row strong {
  text-align: right;
}

.print-empty {
  color: #617774;
  font-size: 10px;
}

.print-week-section {
  page-break-inside: avoid;
}

.print-day-log {
  margin-top: 12px;
  break-inside: avoid;
}

.print-group-row td {
  background: #e7f8f7;
  font-weight: 800;
}

@media print {
  @page {
    margin: 7mm;
    size: A4 portrait;
  }

  html,
  body {
    width: 100%;
    margin: 0;
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app,
  .modal {
    display: none !important;
  }

  .print-template {
    display: block;
  }

  .lead-sequences-print-report {
    width: 100%;
  }

  .lead-sequences-print-report .print-cover {
    padding-bottom: 8px;
  }

  .lead-sequences-print-report .print-cover h1 {
    margin: 3px 0;
    font-size: 18px;
  }

  .lead-sequences-print-report .print-cover p,
  .lead-sequences-print-report .print-cover span {
    margin-top: 3px;
    font-size: 9px;
  }

  .lead-sequences-print-report .print-summary-section,
  .lead-sequences-print-report .print-section {
    margin-top: 8px;
  }

  .lead-sequences-print-report .print-summary-section h2,
  .lead-sequences-print-report .print-section h2 {
    margin-bottom: 5px;
    font-size: 12px;
  }

  .lead-sequences-print-report .print-summary {
    gap: 5px;
    margin: 5px 0 7px;
  }

  .lead-sequences-print-report .print-summary div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 5px 7px;
    border-radius: 5px;
    background: #f7fbfb;
    text-align: center;
  }

  .lead-sequences-print-report .print-summary span {
    font-size: 7.5px;
  }

  .lead-sequences-print-report .print-summary strong {
    margin-top: 3px;
    font-size: 12px;
  }

  .lead-sequences-print-report .print-chart-card {
    width: 100%;
    max-width: none;
    padding: 6px 8px;
    border-radius: 5px;
  }

  .lead-sequences-print-report .print-chart-card h3 {
    margin-bottom: 3px;
    font-size: 9px;
  }

  .lead-sequences-print-report .print-line-chart {
    width: 100%;
    max-width: none;
    height: 112px;
  }

  .lead-sequences-print-report .print-line-chart text {
    font-size: 8px;
  }

  .lead-sequences-print-report .print-line-chart .x-axis-label {
    font-size: 7.5px;
    font-weight: 400;
  }

  .lead-sequences-print-report .print-section th,
  .lead-sequences-print-report .print-section td {
    height: 18px;
    padding: 1px 7px;
    font-size: 9px;
    line-height: 1.1;
  }

  .lead-sequences-print-report .print-daily-summary-table {
    width: 100%;
    table-layout: fixed;
    break-inside: avoid;
  }

  .lead-sequences-print-report .print-daily-summary-table thead th,
  .lead-sequences-print-report .print-daily-summary-table .print-total-row th {
    font-size: 9.5px;
    font-weight: 750;
  }

  .lead-sequences-print-report .print-daily-summary-table tr.is-weekend td {
    color: #c74444 !important;
    background: #fff7f7 !important;
  }
}

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

  .sidebar {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    z-index: 2;
    width: 100%;
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app.is-sidebar-collapsed .sidebar {
    width: 100%;
  }

  .brand,
  .sidebar-logo,
  .sidebar-toggle,
  .month-button,
  .account {
    display: none;
  }

  .nav {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
    padding: 10px;
    border-top: 0;
  }

  .nav-item {
    flex: 0 0 auto;
    min-height: 38px;
    font-size: 14px;
  }

  .content {
    grid-column: 1;
    padding: 28px 16px;
  }

  .global-actions {
    flex-wrap: wrap;
  }

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

  .page-head,
  .settings-grid,
  .planning-grid,
  .dashboard-grid {
    display: grid;
  }

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

  .budget-create-form {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    width: 100%;
  }

  .planning-grid {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  .plan-table-wrap,
  .excel-wrap {
    height: calc(100vh - 260px);
    min-height: 320px;
    max-height: none;
  }

  .source-layout {
    grid-template-columns: 1fr;
  }

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

  .dashboard-detail-grid {
    grid-template-columns: 1fr;
  }

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

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

  .settings-section-heading,
  .settings-form label,
  .budget-create-form label {
    grid-template-columns: 1fr;
  }

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

  .settings-form,
  .settings-form.category-form {
    grid-template-columns: 1fr;
  }

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

  .summary div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .summary div:first-child {
    border-top: 0;
  }

  p {
    font-size: 14px;
  }

  .column-resizer {
    right: -8px;
    width: 16px;
  }
}

/* ── Conflict panel ── */
.conflict-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #dc6803;
  border-radius: 14px;
  background: #fff7ed;
}

.conflict-header {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.conflict-header h3 {
  margin: 0;
  color: #9a3412;
  font-size: 15px;
  font-weight: 700;
}

.conflict-hint {
  color: var(--muted);
  font-size: 12px;
}

.conflict-resolve-all {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.conflict-table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
}

.conflict-table thead th {
  padding: 6px 8px;
  font-weight: 700;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.conflict-table thead th.num {
  text-align: right;
}

.conflict-group + .conflict-group {
  border-top: 1px solid var(--line);
}

.conflict-divider td {
  padding: 8px 8px 4px;
  color: #9a3412;
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.conflict-incoming-row td {
  padding: 4px 8px;
  background: #fef3c7;
}

.conflict-existing-row td {
  padding: 4px 8px;
  color: var(--muted);
}

.conflict-label {
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.incoming-label {
  color: #b45309;
}

.conflict-actions-row td {
  padding: 4px 8px 8px;
}

.conflict-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Visual rhythm pass */
:root {
  --radius-lg: 12px;
  --radius-md: 10px;
  --space-page-x: clamp(30px, 4.2vw, 58px);
  --space-section: 16px;
  --space-board: 12px;
  --row-height: 38px;
}

.content {
  max-width: 1360px;
  padding: 46px var(--space-page-x) 36px;
}

.page-head {
  align-items: flex-end;
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(28px, 2.05vw, 34px);
  line-height: 1.05;
  font-weight: 790;
}

h2 {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.25;
}

p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.36;
}

.global-actions {
  gap: 8px;
  margin: 12px 0 18px;
}

.budget-control select {
  width: 170px;
  height: 36px;
  box-shadow: none;
}

.export-button {
  min-height: 36px;
  padding: 0 16px;
  font-size: 12px;
  box-shadow: none;
}

.planning-tabs,
.category-tabs {
  margin-bottom: 14px;
  padding: 3px;
  border-radius: 12px;
  box-shadow: none;
}

.planning-tab {
  min-height: 34px;
  padding: 0 15px;
  border-radius: 9px;
  font-size: 12px;
}

.planning-tab.is-active {
  box-shadow: none;
}

.planning-grid {
  grid-template-columns: minmax(0, 1fr) 268px;
  column-gap: 14px;
}

.planning-main {
  gap: 6px;
}

.panel,
.table-wrap,
.plan-summary-board,
.dashboard-kpi-table-wrap,
.excel-wrap {
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.panel {
  padding: 14px;
}

.notice,
#statement .notice,
.dashboard-data-date {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.25;
}

.dashboard-selected {
  margin-bottom: 16px;
}

.dashboard-data-date {
  margin-top: 0;
}

.dashboard-kpi-grid {
  gap: 8px;
  margin-bottom: 12px;
}

th,
td {
  height: var(--row-height);
  padding: 0 12px;
}

th {
  font-size: 11px;
  font-weight: 780;
}

td {
  font-size: 14px;
  font-weight: 620;
}

.group-row td {
  height: 34px;
}

.plan-summary-table th,
.plan-summary-table td {
  height: 24px;
}

.excel-table th,
.excel-table td {
  height: 31px;
  font-size: 12px;
}

.auth-form input,
.table-inline-input,
.table-inline-select,
.admin-inline-form input,
.admin-inline-form select {
  border-radius: var(--radius-md);
}

.side-panel {
  font-size: 12px;
}

.account-page-grid {
  gap: 12px;
  max-width: 1040px;
}

.account-budget-panel {
  padding: 14px;
}

.code-enrich-button .ai-icon {
  color: #fff;
  background: var(--text);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.code-enrich-button.is-active .ai-icon {
  background: var(--blue-dark);
  box-shadow: 0 0 0 4px rgba(10, 186, 181, 0.14);
}

/* Column balance */
.plan-table-wrap table {
  min-width: 0;
  table-layout: fixed;
}

.plan-table-wrap th.table-action-col,
.plan-table-wrap td.plan-actions-cell,
.plan-table-wrap td:last-child {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding-left: 2px;
  padding-right: 2px;
  text-align: center;
}

.plan-summary-table {
  min-width: 560px;
}

.plan-summary-table th:first-child,
.plan-summary-table td:first-child {
  width: 46%;
}

.excel-table th,
.excel-table td {
  padding-right: 10px;
  padding-left: 10px;
}

.excel-table .corner-cell,
.excel-table td.row-number {
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  padding-right: 0;
  padding-left: 0;
}

/* Budget work layout */
#planning .page-head {
  display: none;
  margin: 0;
  overflow: visible;
}

#planning .page-head h1 {
  font-size: clamp(25px, 1.85vw, 31px);
}

#planning .page-head p {
  margin-top: 4px;
}

#planning .global-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  justify-self: stretch;
  width: 100%;
  margin: 0;
  padding-top: 0;
  padding-right: 0;
  gap: 8px;
  overflow: visible;
}

#planning .budget-control select {
  width: clamp(140px, 14vw, 178px);
}

#planning .period-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  margin-left: auto !important;
}

#planning .period-control .month-button {
  width: 124px;
}

#planning .budget-control {
  display: none !important;
}

#planning .header-budget-control-hidden {
  display: none !important;
}

#planning .budget-control select {
  display: none !important;
}

#planning .month-button,
#planning .budget-control select,
#planning .export-button {
  height: 34px;
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
}

#planning .month-button,
#planning .month-button:hover,
#planning .month-button.is-active {
  background: #fff !important;
  box-shadow: none !important;
}

#planning .export-button {
  padding: 0 14px;
  margin-left: 8px;
}

#planning .planning-tabs {
  margin-bottom: 10px;
}

#planning .planning-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

#planning .side-panel {
  order: -1;
  width: 100%;
}

#statement .source-upload-board {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: none;
}

#planning .planning-main {
  gap: 4px;
}

#planning .planning-main > .notice,
#statement .notice {
  margin-bottom: 6px;
  padding: 7px 10px;
}

#planning .plan-summary-board {
  margin-bottom: 0;
}

#planning .plan-table-wrap {
  height: calc(100vh - 252px);
  min-height: 430px;
}

#statement .source-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

#statement .source-upload-panel {
  order: -1;
  padding: 0;
  border: 0;
  background: transparent;
}

#statement .source-upload-panel > .side-heading {
  display: none;
}

#statement .source-upload-board {
  width: fit-content;
  max-width: min(100%, 920px);
  justify-self: start;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
}

#statement .source-board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

#statement .source-tool-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#statement .source-delete-selected {
  justify-self: end;
}

#statement .source-delete-selected[hidden] {
  display: none !important;
}

#statement .source-selected-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

#statement .source-selected-actions[hidden] {
  display: none !important;
}

#statement .source-selected-code {
  width: min(220px, 24vw);
  min-width: 150px;
  height: 28px;
  padding: 0 26px 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 10px;
  font-weight: 720;
}

#statement .source-filter-select {
  width: min(178px, 20vw);
  min-width: 132px;
  height: 26px;
  padding: 0 24px 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 10px;
  font-weight: 760;
}

#statement .source-tools-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 820;
  cursor: pointer;
  white-space: nowrap;
}

#statement .source-tools-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  width: 100%;
  max-width: min(100%, 920px);
  min-width: 0;
}

#statement .source-tools-body[hidden] {
  display: none !important;
}

#statement .source-tool-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#statement .source-tool-panel[hidden] {
  display: none !important;
}

#statement .source-add-file[hidden] {
  display: none !important;
}

#statement .source-add-file.is-processing {
  border-color: rgba(10, 186, 181, 0.78);
  background: #e8fbfa;
  cursor: wait;
}

#statement .source-delete-selected.is-processing {
  border-color: rgba(192, 57, 76, 0.45);
  background: var(--red-soft);
  color: var(--red);
  cursor: wait;
  opacity: 1;
}

#statement .source-add-file.is-processing .source-file-input {
  cursor: wait;
}

.processing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  transform: translateY(-1px);
}

.processing-dots i {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.28;
  animation: processingDotPulse 1s ease-in-out infinite;
}

.processing-dots i:nth-child(2) {
  animation-delay: 0.16s;
}

.processing-dots i:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes processingDotPulse {
  0%, 80%, 100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

#statement .source-mini-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 10px;
  font-weight: 820;
  white-space: nowrap;
  cursor: pointer;
}

#statement .source-mini-button:hover,
#statement .source-mini-button.is-active {
  border-color: rgba(10, 186, 181, 0.55);
  background: var(--blue-soft);
  color: var(--blue-dark);
}

#statement .source-mini-button:disabled {
  cursor: default;
  opacity: .5;
}

#statement .source-mini-button.is-processing:disabled {
  cursor: wait;
  opacity: 1;
}

#statement .source-manual-bar {
  display: grid;
  width: 100%;
  max-width: 100%;
  grid-template-columns: minmax(120px, 0.85fr) minmax(90px, 0.58fr) minmax(116px, 0.78fr) minmax(180px, 1.75fr) minmax(110px, 0.82fr) auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

#statement .source-manual-bar input,
#statement .source-manual-bar select {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 10px;
  font-weight: 720;
}

#statement .source-manual-bar input:focus,
#statement .source-manual-bar select:focus {
  border-color: rgba(10, 186, 181, 0.65);
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.08);
}

.notice,
.auth-status,
.admin-status,
.plan-category-status,
.account-status,
.settings-hint.account-status,
#statementNotice {
  display: none !important;
}

#planningLibrary.settings-content {
  gap: 8px;
}

#planningLibrary .settings-section {
  gap: 8px;
  padding-top: 4px;
}

#planningLibrary .settings-section-heading {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
}

#planningLibrary .settings-section-heading h2 {
  font-size: 14px;
}

#planningLibrary .category-tabs {
  margin: 0 auto 0 4px;
  padding: 3px;
  border-radius: 11px;
  box-shadow: none;
}

#planningLibrary .category-create-head {
  gap: 8px;
}

#planningLibrary .category-create-head h2 {
  flex: 0 0 auto;
}

#planningLibrary .settings-tab {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 11px;
}

#planningLibrary .settings-grid {
  gap: 8px;
}

#planningLibrary .category-create-panel {
  padding: 10px 12px;
}

#planningLibrary .category-create-panel.is-collapsed {
  padding-bottom: 10px;
}

#planningLibrary .category-create-head h2,
#planningLibrary .category-list-panel h2 {
  margin-bottom: 0;
  font-size: 14px;
}

#planningLibrary .category-create-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 16px;
}

#planningLibrary .category-create-panel .category-form {
  margin-top: 8px;
}

#planningLibrary .settings-form.category-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
}

#planningLibrary .settings-form label {
  grid-template-columns: 1fr;
  gap: 3px;
}

#planningLibrary .settings-form input,
#planningLibrary .settings-form select {
  height: 32px;
  font-size: 11px;
}

#planningLibrary .settings-form.category-form > button[type="submit"] {
  min-width: 108px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 11px;
}

#planningLibrary .category-list-panel {
  padding: 10px 12px;
}

#planningLibrary .category-table th,
#planningLibrary .category-table td {
  height: 34px;
}

#statement .excel-table tr.has-ai-suggestion td {
  background: #f2fffd;
  box-shadow: inset 3px 0 0 var(--blue);
}

#statement .suggested-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin-top: 4px;
  padding: 3px 4px 3px 7px;
  border: 1px solid rgba(10, 186, 181, 0.45);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 820;
}

#statement .excel-table th:nth-child(3),
#statement .excel-table td:nth-child(3) {
  overflow: visible;
  white-space: normal;
}

#statement .excel-table tr.has-ai-suggestion td {
  height: 48px;
}

#statement .suggested-code-pill button {
  min-height: 20px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 9px;
  font-weight: 820;
  cursor: pointer;
}

#statement .excel-wrap {
  max-height: calc(100vh - 254px);
  min-height: 430px;
}

@media (max-width: 1100px) {
  #planning .page-head {
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 10px;
  }

  #planning .global-actions {
    justify-content: flex-end;
    gap: 6px;
  }

  #planning .page-head p {
    display: none;
  }

  #planning .budget-control select {
    width: clamp(136px, 20vw, 170px);
  }

  #planning .period-control {
    min-width: 0;
  }

  #planning .export-button {
    padding: 0 10px;
  }

  #statement .source-upload-board {
    grid-template-columns: 1fr;
  }

  #statement .source-bulk-toolbar {
    grid-template-columns: 1fr;
  }

  #statement .source-upload-board {
    grid-template-columns: 1fr;
  }

  #statement .source-manual-bar {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #statement .source-manual-bar .source-mini-button {
    width: 100%;
  }

  #statement #statementCodeEnrich,
  #statement #deleteSelectedOperations {
    width: 100%;
  }

}

/* Current compact library board */
#planningLibrary .settings-section-heading {
  display: none;
}

#planningLibrary .settings-section {
  gap: 6px;
  padding-top: 0;
  border-top: 0;
}

#planningLibrary .category-create-panel.is-collapsed {
  padding-bottom: 8px;
}

#planningLibrary .category-create-head {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  min-height: 28px;
}

#planningLibrary .category-tabs {
  justify-self: start;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* Keep every table inside the workspace */
.table-wrap,
.excel-wrap,
.side-table,
.dashboard-table-wrap,
.dashboard-kpi-table-wrap,
.plan-summary-table-wrap,
.cashflow-table-wrap,
.plan-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.table-wrap,
.side-table,
.dashboard-table-wrap,
.dashboard-kpi-table-wrap,
.plan-summary-table-wrap,
.cashflow-table-wrap,
.plan-table-wrap {
  overflow-x: auto;
}

.table-wrap table,
.excel-wrap table,
.side-table table,
.dashboard-table-wrap table,
.dashboard-kpi-table-wrap table,
.plan-summary-table,
.plan-table-wrap table,
.cashflow-table-wrap table,
.category-table table,
.account-budget-table table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
}

th,
td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th.num,
td.num,
.excel-table th:last-child,
.excel-table td:last-child {
  text-align: right;
}

.plan-table-wrap table {
  min-width: 0;
}

.plan-table-wrap th:first-child,
.plan-table-wrap td:first-child {
  width: 46%;
}

.plan-table-wrap th:nth-child(2),
.plan-table-wrap td:nth-child(2),
.plan-table-wrap th:nth-child(3),
.plan-table-wrap td:nth-child(3),
.plan-table-wrap th:nth-child(4),
.plan-table-wrap td:nth-child(4) {
  width: 15%;
}

.plan-table-wrap th.table-action-col,
.plan-table-wrap td.plan-actions-cell,
.plan-table-wrap td:last-child {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding-left: 2px;
  padding-right: 2px;
  text-align: center;
}

.plan-add-category-row td {
  height: 36px;
  padding: 4px 8px 5px 18px;
  background: #fff;
}

.plan-inline-category-add {
  display: block;
  width: min(100%, 286px);
}

.plan-inline-category-add select {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(10, 186, 181, 0.14);
  border-radius: 8px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #000 50%) right 14px center / 5px 5px no-repeat,
    linear-gradient(135deg, #000 50%, transparent 50%) right 10px center / 5px 5px no-repeat,
    #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

.plan-inline-category-add select:focus {
  border-color: rgba(10, 186, 181, 0.36);
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.08);
}

#planning .plan-table-wrap {
  overflow-x: hidden !important;
}

#planning .plan-table-wrap table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

#planning .plan-table-wrap th,
#planning .plan-table-wrap td {
  min-width: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

#planning .plan-table-wrap th:first-child,
#planning .plan-table-wrap td:first-child {
  width: 43% !important;
}

#planning .plan-table-wrap th:nth-child(2),
#planning .plan-table-wrap td:nth-child(2),
#planning .plan-table-wrap th:nth-child(3),
#planning .plan-table-wrap td:nth-child(3),
#planning .plan-table-wrap th:nth-child(4),
#planning .plan-table-wrap td:nth-child(4) {
  width: 16% !important;
}

#planning .plan-table-wrap th.table-action-col,
#planning .plan-table-wrap td.plan-actions-cell,
#planning .plan-table-wrap td:last-child {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  padding-right: 2px;
  padding-left: 2px;
  text-align: center;
}

#planning .plan-input-wrap {
  width: min(100%, 118px);
  max-width: 100%;
}

#planning .plan-input-wrap .plan-input {
  width: 100%;
  min-width: 0;
  max-width: none;
}

#planning .plan-actions-cell .table-action-button {
  width: 24px;
  max-width: 100%;
}

.plan-summary-table {
  min-width: 0;
}

.plan-summary-table th:first-child,
.plan-summary-table td:first-child {
  width: auto;
}

.excel-table {
  min-width: 0;
}

.excel-table .corner-cell,
.excel-table td.row-number {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
}

.excel-table th:nth-child(2),
.excel-table td:nth-child(2) {
  width: 100px;
}

.excel-table th:nth-child(3),
.excel-table td:nth-child(3) {
  width: 126px;
}

.excel-table th:nth-child(5),
.excel-table td:nth-child(5) {
  width: 128px;
}

#planning table th,
#planning table td,
#planning table th span,
#planning .table-input,
#planning .statement-input,
#planning .code-select,
#planning .table-inline-input,
#planning .table-inline-select {
  font-size: 12px;
}

.sort-header {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .excel-table .corner-cell,
  .excel-table td.row-number {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
  }

  .excel-table th:nth-child(2),
  .excel-table td:nth-child(2) {
    width: 88px;
  }

  .excel-table th:nth-child(3),
  .excel-table td:nth-child(3),
  .excel-table th:nth-child(5),
  .excel-table td:nth-child(5) {
    width: 104px;
  }
}

/* Current UI baseline */
body,
body * {
  color: #000 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body,
.app,
.content {
  background: #fff !important;
}

.sidebar,
.account {
  background: #fbfefe !important;
}

.nav-item,
.account-user,
.sidebar-logout,
.auth-card .primary-button,
.auth-link,
.cookie-button,
.planning-tab,
.settings-tab,
.month-button,
.export-button,
.type-dropdown-button,
.source-tools-toggle,
.source-mini-button,
.code-enrich-button,
.category-create-toggle,
.table-action-button,
.icon-button,
.help-button,
#statement .suggested-code-pill button,
.app .primary-button,
.app .ghost-button,
.app .danger-button,
.app .neutral-button,
.modal .primary-button,
.modal .ghost-button,
.modal .danger-button,
.modal .neutral-button {
  border-color: rgba(10, 186, 181, 0.1) !important;
  background: rgba(10, 186, 181, 0.045) !important;
  box-shadow: none !important;
  color: #000 !important;
  transform: none !important;
}

.nav-item *,
.account-user *,
.sidebar-logout *,
.auth-card .primary-button *,
.auth-link *,
.cookie-button *,
.planning-tab *,
.settings-tab *,
.month-button *,
.export-button *,
.type-dropdown-button *,
.source-tools-toggle *,
.source-mini-button *,
.code-enrich-button *,
.category-create-toggle *,
.table-action-button *,
.icon-button *,
.help-button *,
#statement .suggested-code-pill button * {
  color: inherit !important;
}

.nav-item:hover,
.account-user:hover,
.sidebar-logout:hover,
.auth-card .primary-button:hover,
.auth-link:hover,
.cookie-button:hover,
.planning-tab:hover,
.settings-tab:hover,
.month-button:hover,
.export-button:hover,
.type-dropdown-button:hover,
.source-tools-toggle:hover,
.source-mini-button:hover,
.code-enrich-button:hover,
.category-create-toggle:hover,
.table-action-button:hover,
.icon-button:hover,
.help-button:hover,
#statement .suggested-code-pill button:hover,
.app .primary-button:hover,
.app .ghost-button:hover,
.app .danger-button:hover,
.app .neutral-button:hover,
.modal .primary-button:hover,
.modal .ghost-button:hover,
.modal .danger-button:hover,
.modal .neutral-button:hover {
  border-color: rgba(10, 186, 181, 0.16) !important;
  background: rgba(10, 186, 181, 0.08) !important;
}

.nav-item.is-active,
.account-user.is-active,
.auth-card .primary-button.is-active,
.auth-link.is-active,
.cookie-button.is-active,
.planning-tab.is-active,
.settings-tab.is-active,
.month-button.is-active,
.export-button.is-active,
.type-dropdown-button.is-active,
.source-tools-toggle.is-active,
.source-mini-button.is-active,
.code-enrich-button.is-active,
.category-create-toggle.is-active,
.table-action-button.is-active,
.icon-button.is-active,
.help-button.is-active,
#statement .suggested-code-pill button.is-active {
  border-color: rgba(10, 186, 181, 0.2) !important;
  background: rgba(10, 186, 181, 0.1) !important;
}

@keyframes ai-code-warning-pulse {
  0%, 100% {
    border-color: rgba(220, 104, 3, 0.36);
    background: rgba(255, 247, 237, 0.76);
    box-shadow: 0 0 0 0 rgba(220, 104, 3, 0);
  }

  50% {
    border-color: rgba(220, 104, 3, 0.64);
    background: rgba(255, 247, 237, 1);
    box-shadow: 0 0 0 3px rgba(220, 104, 3, 0.1);
  }
}

#statement .code-enrich-button.is-active {
  animation: ai-code-warning-pulse 1.35s ease-in-out infinite;
}

button:not(.modal-backdrop):not(.sidebar-logo):not(.sidebar-toggle):not(.sort-header),
label.source-mini-button {
  border-color: rgba(10, 186, 181, 0.1) !important;
  background: rgba(10, 186, 181, 0.045) !important;
  color: #000 !important;
  box-shadow: none !important;
}

button:not(.modal-backdrop):not(.sidebar-logo):not(.sidebar-toggle):not(.sort-header):hover,
label.source-mini-button:hover {
  border-color: rgba(10, 186, 181, 0.16) !important;
  background: rgba(10, 186, 181, 0.08) !important;
  color: #000 !important;
}

button:not(.modal-backdrop):not(.sidebar-logo):not(.sidebar-toggle):not(.sort-header).is-active,
label.source-mini-button.is-active {
  border-color: rgba(10, 186, 181, 0.2) !important;
  background: rgba(10, 186, 181, 0.1) !important;
  color: #000 !important;
}

/* Working area rhythm */
#planning .page-head {
  margin-bottom: 28px !important;
}

#planning .planning-tabs {
  margin-bottom: 18px !important;
}

#planning .planning-dashboard-panel,
#planning .planning-cashflow-panel,
#planning .planning-grid,
#planning .planning-statement-panel,
#planning .planning-library-panel {
  margin-top: 0 !important;
}

#planning .planning-main,
#planning .source-layout,
#planningLibrary.settings-content {
  gap: 14px !important;
}

#planning .plan-summary-board {
  margin-bottom: 8px !important;
}

#planning .plan-summary-board:empty {
  display: none !important;
}

#statement .source-upload-board,
#planningLibrary .category-create-panel {
  margin-bottom: 8px !important;
}

#planningLibrary .settings-form.category-form {
  grid-template-columns: minmax(220px, 320px) minmax(180px, 240px) auto !important;
  align-items: end;
}

#planningLibrary .category-table .table-inline-input {
  height: 28px;
  border-radius: 7px;
  font-size: 14px;
}

#planningLibrary .category-table .row-actions {
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: max-content;
}

#planningLibrary .category-table th.category-action-col,
#planningLibrary .category-table td:last-child {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  padding-left: 4px;
  padding-right: 4px;
  text-align: right;
}

#planningLibrary .category-table .table-action-button {
  width: 24px;
  flex: 0 0 24px;
  max-width: 24px;
}

.module-view {
  display: none;
}

.module-view.is-visible {
  display: block;
}

.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 14px;
}

.module-head h1 {
  margin: 0;
  color: #000;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0;
}

.module-head-compact {
  justify-content: flex-end;
  margin: 0 0 8px;
}

.module-count,
.client-search-summary {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.module-toolbar,
.client-search-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.client-module-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.client-module-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
}

.client-module-tab.is-active {
  background: rgba(10, 186, 181, 0.08);
  color: #000;
}

/* Give top-level tab controls a little more visual separation. */
.planning-tabs {
  gap: 7px;
}

.client-module-tabs,
.account-tabs,
.account-module-tabs,
.category-tabs {
  gap: 8px;
}

.client-module-panel[hidden] {
  display: none !important;
}

.accounting-panel {
  display: grid;
  gap: 12px;
}

.accounting-table-wrap {
  height: calc(100vh - 310px);
  min-height: 360px;
}

.accounting-table-wrap table {
  min-width: 1040px;
}

.enterprise-settings-menu {
  margin: 8px 0 10px;
}

.enterprise-settings-menu label {
  display: grid;
  gap: 4px;
  max-width: 320px;
}

.enterprise-settings-menu span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.enterprise-settings-menu select {
  min-height: 34px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.enterprise-summary {
  display: grid;
  gap: 12px;
  max-width: 980px;
  margin: 8px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.enterprise-summary-main,
.enterprise-summary-meta {
  display: grid;
  gap: 10px;
}

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

.enterprise-summary-meta {
  grid-template-columns: repeat(4, minmax(110px, 1fr));
}

.enterprise-summary-main div,
.enterprise-summary-meta div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.enterprise-summary span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 720;
}

.enterprise-summary strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.enterprise-summary-modules {
  display: grid;
  gap: 7px;
}

.enterprise-summary-modules div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.enterprise-summary-modules em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border-radius: 8px;
  background: rgba(10, 186, 181, 0.06);
  color: var(--text);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 720;
}

.settings-inline-input {
  width: 100%;
  min-width: 180px;
}

.client-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.client-dashboard-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.client-dashboard-card.is-wide {
  grid-column: 1 / -1;
}

.client-dashboard-card span,
.client-dashboard-card em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-dashboard-card strong {
  overflow: hidden;
  color: #000;
  font-size: 18px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-dashboard-card.is-wide strong {
  font-size: 14px;
}

.client-dashboard-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.client-flow-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.client-flow-step span {
  display: inline-flex;
  grid-row: span 2;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(10, 186, 181, 0.08);
  color: #000;
  font-size: 14px;
  font-weight: 760;
}

.client-flow-step strong,
.client-flow-step em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-flow-step strong {
  color: #000;
  font-size: 14px;
  font-weight: 740;
}

.client-flow-step em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 620;
}

.lead-step-note {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
}

.lead-filter-toolbar {
  flex-wrap: wrap;
}

.lead-search-board {
  display: grid;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lead-search-board .client-search-toolbar {
  margin-bottom: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lead-search-board .client-search-table-wrap {
  margin: 0;
  max-height: calc(24px * 41 + 2px);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.lead-search-board .client-search-table-wrap .client-search-table {
  border-collapse: separate;
  border-spacing: 0;
}

.lead-search-board .client-search-table-wrap .client-search-table thead {
  position: sticky;
  top: 0;
  z-index: 9;
}

.lead-search-board .client-search-table-wrap .client-search-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  border-bottom: 1px solid var(--line-strong);
  background: #fbfdfd !important;
  box-shadow: 0 1px 0 var(--line);
}

.lead-clients-board > .lead-contact-table-wrap {
  margin: 0;
  max-height: calc(24px * 41 + 2px);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.lead-clients-board > .lead-contact-table-wrap .lead-contact-table {
  border-collapse: separate;
  border-spacing: 0;
}

.lead-clients-board > .lead-contact-table-wrap .lead-contact-table thead {
  position: sticky;
  top: 0;
  z-index: 9;
}

.lead-clients-board > .lead-contact-table-wrap .lead-contact-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  border-bottom: 1px solid var(--line-strong);
  background: #fbfdfd !important;
  box-shadow: 0 1px 0 var(--line);
}

.lead-result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  position: relative;
  width: 100%;
  min-height: 30px;
  margin: 0 0 6px;
}

.lead-result-actions .lead-ai-search-button + .lead-result-action-button {
  margin-left: auto;
}

.lead-result-action-button {
  height: 30px;
  min-width: 104px;
  padding: 0 12px;
}

.lead-result-action-button[hidden],
[data-lead-company-manual-open][hidden] {
  display: none !important;
}

.lead-archive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: #174846;
  font-size: 12px;
  white-space: nowrap;
}

.lead-archive-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.lead-result-archive-link {
  height: 30px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #174846;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.lead-result-archive-link.is-active {
  color: #000;
  font-weight: 600;
}

.lead-website-link {
  color: #174846;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lead-website-link:hover {
  color: #000;
}

.lead-owner-select {
  width: 220px;
  min-width: 180px;
}

.lead-search-task {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(150px, 210px) minmax(140px, 180px) minmax(300px, 1fr);
  grid-template-areas:
    "country industry employees saved"
    "context context context saved";
  column-gap: 16px;
  row-gap: 10px;
  align-items: start;
  min-width: 0;
}

.lead-search-task .lead-country-field {
  grid-area: country;
  max-width: 240px;
}

.lead-search-task .lead-industry-field {
  grid-area: industry;
  max-width: 210px;
}

.lead-search-task .lead-employees-field {
  grid-area: employees;
  max-width: 180px;
}

.lead-context-field {
  grid-area: context;
  max-width: 100%;
}

.lead-search-task .module-select-field,
.lead-search-task .lead-query-field {
  min-width: 0;
}

.lead-ai-search-button {
  width: auto;
  min-width: 104px;
  height: 30px;
  min-height: 30px;
}

.lead-search-result-context {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.lead-search-result-context[hidden] {
  display: none;
}

.lead-search-result-context label {
  display: grid;
  grid-template-columns: auto minmax(240px, 520px);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lead-search-result-context label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.lead-search-result-context select {
  width: min(520px, 100%);
  min-width: 0;
}

.saved-lead-search-panel {
  display: grid;
  grid-area: saved;
  align-self: start;
  grid-template-rows: 28px minmax(0, 1fr);
  gap: 5px;
  width: 100%;
  max-width: 420px;
  height: 190px;
  max-height: 190px;
  min-height: 0;
  padding: 0 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.saved-lead-search-panel > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 28px;
}

.saved-lead-search-list {
  display: grid;
  align-content: start;
  grid-auto-rows: 19px;
  gap: 3px;
  max-height: 100%;
  min-height: 0;
  overflow: auto;
}

.saved-lead-search-item {
  max-width: 100%;
  height: 19px;
  padding: 0 6px;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #000;
  font: inherit;
  font-size: 12px;
  font-weight: 520;
  text-align: left;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.saved-lead-search-item.is-active {
  color: #000;
  background: transparent;
}

.client-search-field {
  display: grid;
  gap: 5px;
  min-width: 260px;
  max-width: 420px;
}

.lead-query-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.module-select-field {
  display: grid;
  gap: 5px;
  min-width: 140px;
}

.client-search-field span,
.lead-query-field span,
.module-select-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.client-search-field input,
.lead-query-field textarea,
.module-select-field select,
.module-select-field input {
  width: 100%;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #000;
  font-size: 14px;
}

.client-search-field input,
.module-select-field select,
.module-select-field input {
  height: 34px;
}

.lead-query-field textarea {
  min-height: 132px;
  max-height: 132px;
  padding: 8px 10px;
  line-height: 1.35;
  resize: vertical;
}

.lead-query-counter {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.client-search-field input:focus,
.lead-query-field textarea:focus,
.module-select-field select:focus {
  border-color: var(--blue);
  outline: none;
}

.lead-batch-status {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 8px;
  margin-bottom: 12px;
}

.lead-batch-line {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lead-batch-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.lead-batch-line strong {
  overflow: hidden;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-pipeline-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.client-pipeline-step {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.client-pipeline-step span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-pipeline-step strong {
  color: #000;
  font-size: 18px;
  font-weight: 780;
}

.client-search-table,
.personnel-table,
.call-table,
.lead-contact-table,
.outreach-table,
.client-report-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.client-search-table th,
.client-search-table td,
.personnel-table th,
.personnel-table td,
.call-table th,
.call-table td,
.lead-contact-table th,
.lead-contact-table td,
.outreach-table th,
.outreach-table td,
.client-report-table th,
.client-report-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: #000;
  font-size: 14px;
  text-align: left;
  vertical-align: middle;
}

.client-search-table th,
.personnel-table th,
.call-table th,
.lead-contact-table th,
.outreach-table th,
.client-report-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.client-report-table th:nth-child(1),
.client-report-table td:nth-child(1) {
  width: 130px;
}

.client-report-table th:nth-child(2),
.client-report-table td:nth-child(2) {
  width: 170px;
}

.client-report-table th:nth-child(5),
.client-report-table td:nth-child(5) {
  width: 220px;
}

.client-search-table th:nth-child(1),
.client-search-table td:nth-child(1) {
  width: 34px;
  text-align: center;
}

.client-search-table th:nth-child(2),
.client-search-table td:nth-child(2) {
  width: 20%;
}

.client-search-table th:nth-child(3),
.client-search-table td:nth-child(3) {
  width: 10%;
}

.client-search-table th:nth-child(4),
.client-search-table td:nth-child(4) {
  width: 10%;
}

.client-search-table th:nth-child(5),
.client-search-table td:nth-child(5) {
  width: 14%;
}

.client-search-table th:nth-child(6),
.client-search-table td:nth-child(6) {
  width: 11%;
}

.client-search-table th:nth-child(7),
.client-search-table td:nth-child(7) {
  width: 20%;
}

.client-search-table th:nth-child(8),
.client-search-table td:nth-child(8) {
  width: 12%;
}

.lead-clients-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 12px;
  min-width: 0;
}

.lead-client-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.lead-client-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lead-client-filters span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.lead-client-filters select,
.lead-client-filters input {
  width: 100%;
  height: 32px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 14px;
}

.lead-clients-table {
  min-width: 1120px;
}

.lead-clients-table th:nth-child(1),
.lead-clients-table td:nth-child(1) {
  width: 18%;
  text-align: left;
}

.lead-clients-table th:nth-child(2),
.lead-clients-table td:nth-child(2),
.lead-clients-table th:nth-child(3),
.lead-clients-table td:nth-child(3) {
  width: 8%;
}

.lead-clients-table th:nth-child(4),
.lead-clients-table td:nth-child(4) {
  width: 14%;
}

.lead-clients-table th:nth-child(5),
.lead-clients-table td:nth-child(5) {
  width: 9%;
}

.lead-clients-table th:nth-child(6),
.lead-clients-table td:nth-child(6) {
  width: 12%;
}

.lead-clients-table th:nth-child(7),
.lead-clients-table td:nth-child(7),
.lead-clients-table th:nth-child(8),
.lead-clients-table td:nth-child(8),
.lead-clients-table th:nth-child(9),
.lead-clients-table td:nth-child(9),
.lead-clients-table th:nth-child(10),
.lead-clients-table td:nth-child(10) {
  width: 10%;
}

.lead-clients-table tbody tr {
  cursor: pointer;
}

.lead-clients-table tbody tr.is-selected td {
  background: rgba(10, 186, 181, 0.06);
}

.lead-client-detail {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lead-client-detail h2,
.lead-client-detail h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.lead-client-info-grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 12px;
}

.lead-client-info-grid span,
.lead-client-event span {
  color: var(--muted);
  font-size: 12px;
}

.lead-client-info-grid strong,
.lead-client-event strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-client-subsection {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.lead-client-event {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lead-empty-state {
  display: grid;
  gap: 6px;
  min-height: 140px;
  align-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.lead-empty-state strong {
  color: #000;
  font-weight: 500;
}

.lead-work-queue-board {
  min-height: 260px;
}

.lead-work-queue-empty {
  align-content: start;
  justify-items: start;
  min-height: 0;
  padding: 22px 0 0;
  text-align: left;
}

.lead-work-queue-empty span {
  max-width: 620px;
  line-height: 1.45;
}

.lead-settings-entry {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.lead-settings-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.lead-settings-shell {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.lead-settings-accordion {
  gap: 0;
  padding: 0;
}

.lead-settings-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 12px;
  list-style: none;
  cursor: pointer;
}

.lead-settings-accordion > summary::-webkit-details-marker {
  display: none;
}

.lead-settings-accordion > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.lead-settings-accordion[open] > summary::after {
  content: "-";
}

.lead-llm-settings-shell > summary {
  cursor: default;
}

.lead-llm-settings-shell > summary::after,
.lead-llm-settings-shell[open] > summary::after {
  content: "";
}

.lead-settings-accordion > summary span {
  font-size: 14px;
  font-weight: 500;
}

.lead-settings-accordion > summary em {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.lead-settings-accordion > .lead-llm-settings-form {
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(10, 186, 181, 0.018);
}

.lead-settings-head,
.lead-profile-actions,
.lead-profile-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lead-settings-head h2,
.lead-profile-form-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.lead-settings-head span,
.lead-profile-actions span {
  color: var(--muted);
  font-size: 13px;
}

.lead-error-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(201, 54, 74, 0.25);
  border-radius: 8px;
  color: #b42335;
  background: rgba(201, 54, 74, 0.05);
  font-size: 13px;
}

.lead-warning-state {
  padding: 8px 10px;
  border: 1px solid rgba(198, 152, 36, 0.28);
  border-radius: 8px;
  color: #81620f;
  background: rgba(244, 205, 84, 0.12);
  font-size: 13px;
}

.lead-contact-client-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.lead-contact-company-strip {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.lead-contact-company-button {
  display: grid;
  gap: 2px;
  flex: 0 0 220px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lead-contact-company-button.is-active {
  border-color: rgba(10, 186, 181, 0.36);
  background: rgba(10, 186, 181, 0.08);
}

.lead-contact-company-button strong,
.lead-contact-company-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-contact-company-button strong {
  font-weight: 650;
}

.lead-contact-company-button span {
  color: var(--muted);
  font-size: 12px;
}

.lead-contact-client-summary div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.lead-contact-client-summary span {
  color: var(--muted);
  font-size: 12px;
}

.lead-contact-client-summary strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-contact-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 186, 181, 0.025);
}

.lead-checkbox-field {
  align-content: end;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
}

.lead-checkbox-field input {
  width: 16px;
  height: 16px;
}

.lead-client-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-contact-table {
  min-width: 1060px;
}

.lead-contact-table th:nth-child(1),
.lead-contact-table td:nth-child(1) {
  width: 34px;
  text-align: center;
}

.lead-contact-table th:nth-child(2),
.lead-contact-table td:nth-child(2) {
  width: 18%;
}

.lead-contact-table th:nth-child(3),
.lead-contact-table td:nth-child(3) {
  width: 14%;
}

.lead-contact-table th:nth-child(4),
.lead-contact-table td:nth-child(4) {
  width: 19%;
}

.lead-contact-table th:nth-child(5),
.lead-contact-table td:nth-child(5) {
  width: 13%;
}

.lead-contact-table th:nth-child(6),
.lead-contact-table td:nth-child(6) {
  width: 20%;
}

.lead-contact-table th:nth-child(7),
.lead-contact-table td:nth-child(7) {
  width: 96px;
}

.app .lead-contact-email-select,
.app .lead-contact-note-select {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 24px 0 0 !important;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  outline: 0;
  background-color: transparent;
  color: var(--text);
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
}

.lead-contact-email-select {
  min-width: 170px;
}

.lead-contact-note-select {
  min-width: 165px;
}

.lead-contact-email-select:hover,
.lead-contact-note-select:hover {
  background-color: rgba(10, 186, 181, 0.035);
}

.lead-contact-email-select:focus-visible,
.lead-contact-note-select:focus-visible {
  box-shadow: inset 0 -1px 0 var(--accent);
}

.lead-contact-table tbody td {
  height: 24px;
}

.lead-contact-table tbody td:has(.lead-contact-email-select),
.lead-contact-table tbody td:has(.lead-contact-note-select) {
  padding-top: 4px;
  padding-bottom: 4px;
}

.admin-modal-box.lead-contact-edit-modal {
  width: min(560px, calc(100vw - 24px));
  padding: 14px;
}

.lead-contact-edit-modal .lead-profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
}

.lead-contact-edit-modal h3 {
  margin-bottom: 10px;
}

.lead-contact-edit-modal label {
  margin-bottom: 6px;
}

.lead-contact-edit-modal .admin-form-actions {
  margin-top: 8px;
}

.lead-result-actions.lead-contacts-top-actions {
  justify-content: flex-start !important;
  margin-bottom: 6px;
}

.lead-result-actions.lead-contacts-top-actions [data-lead-copy-contact-row] {
  margin-left: 0 !important;
}

.lead-result-actions.lead-contacts-top-actions [data-lead-selected-contacts-outreach] {
  margin-left: auto !important;
}

@media (max-width: 700px) {
  .lead-contact-edit-modal .lead-profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.app.is-sidebar-collapsed .sidebar-toggle {
  top: 108px !important;
}

.lead-all-contacts-table {
  min-width: 1180px;
}

.lead-all-contacts-table th:nth-child(2),
.lead-all-contacts-table td:nth-child(2) {
  width: 18%;
}

.lead-all-contacts-table th:nth-child(3),
.lead-all-contacts-table td:nth-child(3),
.lead-all-contacts-table th:nth-child(4),
.lead-all-contacts-table td:nth-child(4),
.lead-all-contacts-table th:nth-child(5),
.lead-all-contacts-table td:nth-child(5) {
  width: 13%;
}

.lead-all-contacts-table th:nth-child(6),
.lead-all-contacts-table td:nth-child(6) {
  width: 18%;
}

.lead-all-contacts-table th:nth-child(7),
.lead-all-contacts-table td:nth-child(7) {
  width: 18%;
  text-align: left;
}

.lead-all-contacts-table th:nth-child(8),
.lead-all-contacts-table td:nth-child(8) {
  width: 96px;
  text-align: left;
}

.lead-profile-form {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 186, 181, 0.025);
}

.lead-country-prompts {
  display: grid;
  gap: 6px;
}

.lead-country-prompt-card {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.lead-country-prompt-card summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 34px;
  padding: 6px 0;
  list-style: none;
  cursor: pointer;
}

.lead-country-prompt-card summary::-webkit-details-marker {
  display: none;
}

.lead-country-prompt-card summary::before {
  content: "+";
  flex: 0 0 auto;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.lead-country-prompt-card[open] summary::before {
  content: "-";
}

.lead-country-prompt-card summary span {
  font-size: 14px;
  font-weight: 500;
}

.lead-country-prompt-card summary em {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.lead-country-prompt-card .lead-profile-form {
  border: 0;
  border-radius: 0;
  background: rgba(10, 186, 181, 0.018);
}

.lead-country-prompt-form .lead-profile-form-head {
  justify-content: flex-start;
}

.lead-country-prompt-form .lead-profile-form-head span {
  color: var(--muted);
  font-size: 12px;
}

.lead-country-tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-width: 920px;
}

.lead-country-tools-grid > label,
.lead-country-tools-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lead-country-tools-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.lead-country-tools-grid input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.lead-country-tool-row {
  display: grid !important;
  grid-template-columns: minmax(420px, 1fr) auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px !important;
}

.lead-country-tool-row label {
  display: grid;
  grid-template-columns: 86px minmax(300px, 1fr);
  align-items: center;
  gap: 8px;
}

.lead-country-tool-row label span {
  white-space: nowrap;
}

.lead-country-tool-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.lead-profile-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lead-profile-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.lead-profile-grid input,
.lead-profile-grid select,
.lead-profile-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.lead-profile-grid input,
.lead-profile-grid select {
  height: 34px;
  padding: 0 10px;
}

.lead-profile-grid textarea {
  padding: 8px 10px;
  line-height: 1.35;
  resize: vertical;
}

.lead-profile-wide {
  grid-column: span 2;
}

.lead-profile-prompt-field {
  grid-column: 1 / -1;
}

.lead-apify-actor-field {
  display: grid;
  gap: 6px;
}

.lead-apify-actor-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.lead-apify-actor-list {
  display: grid;
  gap: 6px;
}

.lead-apify-actor-row {
  grid-template-columns: minmax(420px, 1fr) auto auto minmax(0, 1fr) 34px !important;
}

.lead-country-prompt-grid {
  grid-template-columns: minmax(0, 1fr);
}

.lead-country-prompt-grid textarea {
  min-height: 128px;
}

.lead-llm-settings-form {
  display: grid;
  gap: 10px;
}

.lead-llm-settings-grid {
  grid-template-columns: minmax(180px, 240px) minmax(260px, 420px);
  align-items: end;
}

.lead-llm-settings-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(320px, 1fr);
  gap: 10px;
  max-width: 760px;
}

.lead-inline-settings-row {
  grid-template-columns: minmax(180px, 220px) minmax(320px, 1fr) auto;
  max-width: none;
}

.lead-inline-settings-actions {
  align-self: end;
  min-height: 42px;
  flex-wrap: nowrap;
}

.lead-inline-settings-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

.lead-llm-settings-row .lead-profile-wide {
  grid-column: auto;
}

.lead-llm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.lead-profile-check {
  align-content: end;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
}

.lead-profile-table {
  min-width: 840px;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.lead-profile-table th,
.lead-profile-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: #000;
  font-size: 14px;
  text-align: left;
}

.lead-profile-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.outreach-template-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 252, 252, 0.78);
}

.outreach-template-preview.is-empty {
  color: var(--muted);
}

.lead-fixed-template-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.lead-fixed-template {
  border-bottom: 1px solid var(--line);
}

.lead-fixed-template-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 48px;
  padding: 10px 4px;
  border: 0;
  border-radius: 0;
  color: #000;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lead-fixed-template-toggle span {
  font-size: 15px;
  font-weight: 560;
}

.lead-fixed-template-toggle strong {
  flex: 0 0 32px;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.lead-fixed-template-content {
  display: grid;
  gap: 12px;
  padding: 4px 4px 18px;
}

.lead-fixed-template-subject,
.lead-fixed-template-attachment {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 14px;
}

.lead-fixed-template-subject span,
.lead-fixed-template-attachment span {
  color: var(--muted);
}

.lead-fixed-template-subject strong,
.lead-fixed-template-attachment strong {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.lead-fixed-template-content .outreach-template-html-body {
  padding: 16px;
  border: 1px solid rgba(209, 232, 232, 0.8);
  border-radius: 8px;
  background: #fff;
}


.outreach-template-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.outreach-template-preview-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 560;
}

.outreach-template-preview-head span,
.outreach-template-preview-head strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.outreach-template-email-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(209, 232, 232, 0.8);
  border-radius: 8px;
  background: #fff;
}

.outreach-template-banner-preview {
  overflow: hidden;
  border-radius: 8px;
  background: #2e466a;
}

.outreach-template-banner-preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}

.outreach-template-banner-preview.is-placeholder {
  display: grid;
  gap: 8px;
  min-height: 128px;
  place-items: center;
  padding: 20px;
  color: #fff;
  text-align: center;
}

.outreach-template-banner-preview.is-placeholder strong {
  color: #fff;
  font-size: 28px;
  font-weight: 620;
  letter-spacing: .12em;
}

.outreach-template-banner-preview.is-placeholder span {
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
}

.outreach-template-meta-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 14px;
}

.outreach-template-email-preview span {
  color: var(--muted);
}

.outreach-template-email-preview strong {
  min-width: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.outreach-template-hooks {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(209, 232, 232, 0.8);
}

.outreach-template-hooks ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.outreach-template-hooks li {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(233, 246, 246, .92);
  color: #000;
  font-size: 12px;
}

.outreach-template-email-preview pre {
  margin: 4px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(209, 232, 232, 0.8);
  color: #000;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.outreach-template-html-body {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(209, 232, 232, 0.8);
  color: #000;
  overflow-wrap: anywhere;
}

.outreach-template-html-body p {
  margin: 0 0 10px;
}

.outreach-template-html-body a {
  color: #2667aa;
}

.mini-action-button {
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
}

.communication-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 280px;
  gap: 12px;
  align-items: stretch;
  min-height: 560px;
}

.communication-outreach-layout {
  --outreach-contact-width: 260px;
  grid-template-columns: var(--outreach-contact-width) 8px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.communication-board-resizer {
  position: relative;
  min-width: 10px;
  cursor: col-resize;
  touch-action: none;
}

.communication-board-resizer::after {
  content: none;
}

.communication-board-resizer:hover::after,
body.is-resizing-outreach .communication-board-resizer::after {
  content: none;
}

.communication-contact-list,
.communication-thread,
.outreach-mailing-board {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.communication-contact-list {
  display: grid;
  align-content: start;
  overflow: auto;
}

.communication-contact-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.communication-contact-table th,
.communication-contact-table td {
  padding: 7px 8px;
  border: 0;
  color: #000;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}

.communication-contact-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.communication-contact-check-col,
.communication-contact-table th:first-child,
.communication-contact-table td:first-child {
  width: 30px;
}

.communication-contact-status-col {
  width: var(--outreach-status-width, 96px);
}

.communication-contact-table th:first-child,
.communication-contact-table td:first-child {
  text-align: center;
}

.communication-contact-table th:nth-child(2),
.communication-contact-table td:nth-child(2) {
  width: auto;
}

.communication-contact-table th:nth-child(3),
.communication-contact-table td:nth-child(3) {
  width: var(--outreach-status-width, 96px);
}

.communication-contact-name-head {
  position: relative;
}

.communication-contact-table tr.is-active {
  background: rgba(10, 186, 181, 0.08);
}

.communication-contact-table input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.communication-contact-table span,
.communication-contact-table button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.communication-contact-table .communication-contact-open {
  display: block;
  width: 100%;
  font-size: 13px;
  font-weight: 500;
}

.communication-contact-status {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f6fbfb;
  color: #000;
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
}

.communication-contact-status:focus {
  border-color: rgba(10, 186, 181, 0.35);
  outline: none;
}

.communication-contact-column-resizer {
  position: absolute;
  top: 5px;
  right: -5px;
  bottom: 5px;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
}

.communication-contact-column-resizer::after {
  content: none;
}

.communication-contact-column-resizer:hover::after,
body.is-resizing-outreach .communication-contact-column-resizer::after {
  content: none;
}

.lead-outreach-simple {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.lead-outreach-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  min-height: 520px;
}

.lead-outreach-contact-board,
.lead-outreach-message-board {
  min-width: 0;
}

.lead-outreach-message-board.is-full {
  width: 100%;
}

.lead-outreach-thread-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.lead-outreach-thread-actions strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.lead-outreach-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lead-outreach-contact-board {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lead-outreach-contact-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(209, 232, 232, 0.75);
}

.lead-outreach-contact-board-head strong {
  font-size: 14px;
  font-weight: 560;
}

.lead-outreach-contact-board-head span {
  color: var(--muted);
  font-size: 12px;
}

.lead-outreach-toolbar,
.lead-outreach-bulk-panel {
  display: flex;
  align-items: end;
  gap: 12px;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}

.lead-outreach-template-field {
  width: 320px;
  min-width: 220px;
}

.lead-outreach-summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 30px;
}

.lead-outreach-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.lead-outreach-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.lead-outreach-list-table {
  min-width: 980px;
}

.lead-outreach-table th,
.lead-outreach-table td {
  height: 32px;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(209, 232, 232, 0.75);
  color: #000;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  vertical-align: middle;
  box-sizing: border-box;
}

.lead-outreach-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  font-weight: 500;
}

.lead-outreach-table th:first-child,
.lead-outreach-table td:first-child {
  width: 36px;
  text-align: center;
}

.lead-outreach-table th:nth-child(3),
.lead-outreach-table td:nth-child(3) {
  width: 92px;
}

.lead-outreach-list-table th:nth-child(3),
.lead-outreach-list-table td:nth-child(3) {
  width: 140px;
}

.lead-outreach-list-table th:nth-child(4),
.lead-outreach-list-table td:nth-child(4) {
  width: 210px;
}

.lead-outreach-list-table th:nth-child(5),
.lead-outreach-list-table td:nth-child(5) {
  width: 170px;
}

.lead-outreach-list-table th:nth-child(6),
.lead-outreach-list-table td:nth-child(6) {
  width: 210px;
}

.lead-outreach-list-table th:nth-child(7),
.lead-outreach-list-table td:nth-child(7) {
  width: 150px;
}

.lead-outreach-list-table th:nth-child(8),
.lead-outreach-list-table td:nth-child(8) {
  width: 120px;
}

.lead-outreach-table input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
}

.lead-outreach-table tr[data-lead-contact] {
  cursor: pointer;
}

.lead-outreach-table tr.is-active td {
  background: rgba(10, 186, 181, 0.08);
}

.lead-outreach-table tr.is-unmatched-mailbox td {
  background: rgba(198, 57, 57, 0.04);
}

.lead-outreach-table .table-text,
.lead-outreach-table .muted-table-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-outreach-name-button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-outreach-name-button span,
.lead-outreach-name-button small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-outreach-name-button small {
  color: var(--muted);
  font-size: 11px;
}

.lead-outreach-name-button:hover {
  color: var(--accent);
}

.lead-outreach-status-pill {
  display: inline-flex;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(233, 246, 246, .96);
  color: #000;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-outreach-status-pill.is-warning {
  background: rgba(198, 57, 57, 0.10);
  color: #9a2f2f;
}

.lead-sequences-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.lead-sequence-contact-board,
.lead-sequence-log-board {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lead-sequence-contact-board {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.lead-sequence-contact-board h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.lead-sequence-contact-list {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: 560px;
  overflow: auto;
}

.lead-sequence-contact {
  display: grid;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: #f7fbfb;
  color: #000;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lead-sequence-contact.is-active {
  background: rgba(10, 186, 181, 0.12);
}

.lead-sequence-contact strong,
.lead-sequence-contact span,
.lead-sequence-contact em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-sequence-contact strong {
  font-size: 14px;
  font-weight: 500;
}

.lead-sequence-contact span,
.lead-sequence-contact em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.lead-sequence-log-board {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.lead-sequence-head {
  align-items: flex-start;
}

.lead-sequence-head > div:first-child {
  min-width: 0;
}

.lead-sequence-head span {
  display: block;
  max-width: 620px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-sequence-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.lead-sequence-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.lead-sequence-filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(260px, 1fr) minmax(180px, 240px);
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.lead-sequence-period-control {
  display: grid;
  grid-template-columns: auto minmax(120px, 160px);
  align-items: center;
  gap: 8px;
  margin: 0;
}

.lead-sequence-period-title {
  flex: 0 0 auto;
  white-space: nowrap;
}

.lead-sequence-period-control {
  flex: 0 0 auto;
}

.lead-sequence-period-control.is-month-filter {
  grid-template-columns: auto minmax(110px, 140px);
}

.lead-sequence-period-control.is-event-filter {
  grid-template-columns: auto minmax(160px, 220px);
}

.lead-sequence-period-control.is-contact-filter {
  grid-template-columns: auto minmax(220px, 1fr);
}

.lead-sequence-period-control input,
.lead-sequence-period-control select {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(152, 191, 191, .55);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  font: inherit;
  color: #0f1616;
}

.lead-sequence-import-row .lead-import-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.lead-import-actions-main,
.lead-import-actions-danger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lead-import-actions-main {
  flex: 1 1 auto;
}

.lead-import-action-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.lead-import-last-sync {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.lead-import-actions-danger {
  flex: 0 0 auto;
  margin-left: auto;
}

.lead-sequence-period-control span {
  white-space: nowrap;
}

.lead-sequence-log-wrap {
  max-width: 100%;
  overflow: auto;
  border: 0;
}

.lead-sequence-log-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

.lead-sequence-log-table th,
.lead-sequence-log-table td {
  height: 32px;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(209, 232, 232, 0.75);
  color: #000;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  vertical-align: middle;
}

.lead-sequence-log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.lead-sequence-log-table .table-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-sequence-log-table th,
.lead-sequence-log-table td {
  white-space: nowrap;
}

.lead-sequence-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 32px;
  color: var(--muted);
  font-size: 13px;
}

.lead-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.lead-import-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f7fbfb;
}

.lead-import-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.lead-import-card label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lead-import-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.lead-import-card input,
.lead-import-card select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.lead-import-card.is-mail-settings {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  align-items: end;
}

.lead-import-card.is-user-settings {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
}

.lead-import-card.is-address-settings {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
  align-items: end;
}

.lead-import-card.is-mail-settings h3,
.lead-import-card.is-user-settings h3,
.lead-import-card.is-address-settings h3,
.lead-import-card.is-mail-settings .lead-import-status,
.lead-import-card.is-user-settings .lead-import-status {
  grid-column: 1 / -1;
}

.lead-import-card.is-address-settings .lead-import-status {
  grid-column: 1 / -1;
}

.lead-import-card.is-mail-settings .lead-import-actions {
  grid-column: 1 / -1;
  align-self: end;
}

.lead-import-card.is-user-settings .lead-import-actions {
  grid-column: 1 / -1;
  align-self: end;
}

.lead-import-card.is-address-settings .lead-import-actions {
  align-self: end;
}

.lead-import-card.is-statement-imports {
  grid-template-columns: minmax(260px, 360px) auto minmax(0, 1fr);
  align-items: end;
}

.lead-import-card.is-statement-imports h3 {
  grid-column: 1 / -1;
  align-self: start;
  padding-bottom: 0;
}

.lead-import-settings-wrap {
  margin-top: 10px;
  max-width: 100%;
}

.lead-import-user-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.user-communication-settings {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  min-width: 0;
}

.user-communication-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.user-communication-settings-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.admin-user-communication-form {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
}

.admin-user-communication-form h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.admin-password-field {
  min-width: 0;
}

.admin-password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-password-control input {
  min-width: 0;
}

.admin-password-control button {
  width: 44px;
  min-height: 40px;
  padding: 0;
}

.admin-password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.admin-user-mail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.admin-user-mail-status {
  color: var(--muted);
  font-size: 12px;
}

.lead-import-user-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.lead-import-user-block summary {
  display: grid;
  grid-template-columns: 24px minmax(180px, 1.2fr) minmax(180px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
  background: #f7fbfb;
}

.lead-import-user-block summary::-webkit-details-marker {
  display: none;
}

.lead-import-user-toggle {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(10, 186, 181, 0.08);
  color: #000;
  font-weight: 500;
}

.lead-import-user-toggle::before {
  content: "+";
}

.lead-import-user-block[open] .lead-import-user-toggle::before {
  content: "-";
}

.lead-import-user-name,
.lead-import-user-mail,
.lead-import-user-state {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-import-user-name {
  font-weight: 500;
}

.lead-import-user-mail,
.lead-import-user-state {
  color: var(--muted);
  font-size: 13px;
}

.lead-import-settings-table {
  min-width: 760px;
}

.lead-import-settings-table th,
.lead-import-settings-table td {
  vertical-align: top;
}

.lead-import-settings-table input {
  width: 100%;
  min-width: 120px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.lead-import-settings-dialog {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #f7fbfb;
}

.lead-import-dialog-row {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr);
  gap: 8px;
  min-width: 0;
}

.lead-import-dialog-row.is-mail-row {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.lead-import-settings-dialog label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lead-import-settings-dialog label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.lead-import-settings-dialog input,
.lead-import-settings-dialog select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.lead-import-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.lead-import-dialog-actions .lead-import-status {
  color: var(--muted);
  font-size: 12px;
}

.lead-import-settings-table [data-lead-settings-pick-user] {
  cursor: pointer;
}

.lead-import-settings-table [data-lead-settings-pick-user]:hover {
  background: rgba(10, 186, 181, 0.06);
}

.lead-import-settings-table .admin-actions {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  white-space: nowrap;
}

.lead-import-settings-table .lead-import-status {
  display: block;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.lead-sequence-import-card {
  grid-template-columns: auto minmax(220px, 340px) auto minmax(0, 1fr);
  align-items: end;
  gap: 8px 10px;
  padding: 8px 10px;
}

.lead-sequence-import-card h3 {
  grid-column: auto;
  align-self: center;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.lead-sequence-import-card label {
  min-width: 0;
}

.lead-sequence-import-card .lead-import-actions {
  align-self: end;
}

.lead-import-statement-status {
  align-self: center;
  min-width: 0;
}

.lead-import-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-import-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.communication-contact {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #000;
}

.communication-contact-open {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  text-align: left;
  cursor: pointer;
}

.communication-contact.is-active {
  background: rgba(10, 186, 181, 0.08);
}

.outreach-recipient-check {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.outreach-recipient-check input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.outreach-recipient-check span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.communication-contact strong {
  font-size: 14px;
  font-weight: 760;
}

.communication-contact span,
.communication-contact em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.communication-thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.communication-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.communication-thread-head h2 {
  margin: 0;
  color: #000;
  font-size: 15px;
  font-weight: 780;
}

.communication-thread-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.communication-thread-head strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(10, 186, 181, 0.2);
  border-radius: 6px;
  background: rgba(10, 186, 181, 0.08);
  color: #000;
  font-size: 12px;
  font-weight: 720;
}

.communication-messages {
  display: grid;
  align-content: start;
  gap: 0;
  overflow: auto;
  padding: 0;
  background: #fff;
}

.outreach-log-row {
  display: grid;
  grid-template-columns: 118px 76px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #000;
  text-align: left;
  cursor: pointer;
}

.outreach-log-row.is-active {
  background: rgba(10, 186, 181, 0.08);
}

.outreach-log-row span,
.outreach-log-row strong,
.outreach-log-row em,
.outreach-log-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outreach-log-row span,
.outreach-log-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.outreach-log-row strong,
.outreach-log-row em {
  font-size: 14px;
  font-style: normal;
  font-weight: 650;
}

.outreach-log-row small {
  grid-column: 3;
}

.outreach-log-preview {
  min-height: 90px;
  margin: 10px 12px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
  color: #000;
  font-size: 14px;
  line-height: 1.35;
}

.outreach-mailing-board {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  overflow: auto;
}

.outreach-mailing-head {
  display: grid;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.outreach-mailing-head h2 {
  margin: 0;
  color: #000;
  font-size: 15px;
  font-weight: 760;
}

.outreach-mailing-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.outreach-mailing-board label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.outreach-mailing-board label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.outreach-mailing-board input,
.outreach-mailing-board select,
.outreach-mailing-board textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #000;
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}

.outreach-mailing-board textarea {
  resize: vertical;
}

.outreach-mailing-board button {
  width: 100%;
  min-height: 42px;
}

.outreach-reply-compose {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.outreach-reply-compose select,
.outreach-reply-compose input,
.outreach-reply-compose textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #000;
  font: inherit;
  box-sizing: border-box;
}

.outreach-reply-compose input {
  grid-column: auto;
}

.outreach-reply-compose textarea {
  grid-column: 1 / -1;
  resize: vertical;
}

.outreach-reply-compose button {
  align-self: end;
  min-height: 42px;
}

.lead-outreach-thread-panel,
.lead-outreach-idle-state {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.lead-outreach-idle-state {
  padding: 16px;
  color: var(--muted);
}

.contact-card-row {
  display: grid;
  gap: 3px;
}

.contact-card-row span,
.contact-activity-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.contact-card-row strong,
.contact-activity-list strong {
  overflow: hidden;
  color: #000;
  font-size: 14px;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-activity-list {
  display: grid;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.contact-activity-list div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.communication-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.call-module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.call-panel {
  min-width: 0;
}

.call-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.call-panel-head h2 {
  margin: 0;
  color: #000;
  font-size: 15px;
  font-weight: 740;
}

.call-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(10, 186, 181, 0.18);
  border-radius: 6px;
  background: rgba(10, 186, 181, 0.06);
  color: #000;
  font-size: 12px;
  font-weight: 680;
}

.zadarma-settings {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.zadarma-settings label {
  display: grid;
  gap: 5px;
}

.zadarma-settings span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.zadarma-settings input,
.zadarma-settings select {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #000;
  font-size: 14px;
}

@media (max-width: 860px) {
  .module-head,
  .module-toolbar,
  .client-search-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .client-search-field {
    min-width: 0;
    max-width: none;
  }

  .lead-query-field {
    min-width: 0;
  }

  .lead-batch-status {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .client-dashboard-grid,
  .client-dashboard-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .communication-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .communication-board-resizer {
    display: none;
  }

  .communication-contact-list {
    max-height: 220px;
  }

  .communication-thread {
    min-height: 520px;
  }

  .outreach-reply-compose {
    grid-template-columns: minmax(0, 1fr);
  }

  .outreach-reply-compose input {
    grid-column: auto;
  }

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

}

.app.is-sidebar-collapsed .sidebar {
  width: 72px !important;
  overflow: hidden;
}

.app.is-sidebar-collapsed .sidebar-logo {
  width: 72px;
  height: 72px;
  justify-content: flex-start !important;
  padding: 4px 0 0 !important;
  overflow: hidden;
}

.app.is-sidebar-collapsed .sidebar-logo img {
  width: 46px !important;
  height: 58px !important;
  object-fit: contain;
  object-position: left top;
}

.app.is-sidebar-collapsed .sidebar-toggle {
  top: 96px !important;
  right: 23px !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 8px !important;
}

.app.is-sidebar-collapsed .nav {
  padding: 152px 8px 14px !important;
}

.app.is-sidebar-collapsed .nav-item {
  display: grid !important;
  width: 56px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  place-items: center !important;
  overflow: hidden !important;
  gap: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: 0 !important;
  white-space: nowrap !important;
}

.app.is-sidebar-collapsed .nav-item span {
  display: grid !important;
  width: 32px !important;
  height: 32px !important;
  place-items: center !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

.app.is-sidebar-collapsed .account {
  padding: 10px 8px 12px !important;
}

.app.is-sidebar-collapsed .account-user {
  width: 56px !important;
  height: 44px !important;
  justify-content: center !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.app.is-sidebar-collapsed .account-user > div:not(.avatar),
.app.is-sidebar-collapsed .sidebar-logout {
  display: none !important;
}

/* Desktop/tablet scale policy */
@media (min-width: 1025px) and (max-width: 1280px) {
  :root {
    --page-scale: 0.94;
  }
}

@media (min-width: 901px) and (max-width: 1024px) {
  :root {
    --page-scale: 0.88;
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  :root {
    --page-scale: 0.82;
  }
}

@media (min-width: 1181px) {
  .app {
    grid-template-columns: 216px minmax(0, 1fr);
  }

  .app.is-sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .content {
    max-width: 1360px;
    padding-left: 36px;
    padding-right: 36px;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .app,
  .app.is-sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .sidebar,
  .app.is-sidebar-collapsed .sidebar {
    width: 72px !important;
    overflow: hidden;
  }

  .sidebar-logo,
  .app.is-sidebar-collapsed .sidebar-logo {
    width: 72px;
    height: 72px;
    justify-content: flex-start !important;
    padding: 4px 0 0 !important;
    overflow: hidden;
  }

  .sidebar-logo img,
  .app.is-sidebar-collapsed .sidebar-logo img {
    width: 46px !important;
    height: 58px !important;
    object-fit: contain;
    object-position: left top;
  }

  .sidebar-toggle,
  .app.is-sidebar-collapsed .sidebar-toggle {
    display: grid !important;
    top: 116px !important;
    right: 23px !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
  }

  .nav,
  .app.is-sidebar-collapsed .nav {
    padding: 152px 8px 14px !important;
  }

  .nav-item,
  .app.is-sidebar-collapsed .nav-item {
    display: grid !important;
    width: 56px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    place-items: center !important;
    overflow: hidden !important;
    gap: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
  }

  .nav-item span,
  .app.is-sidebar-collapsed .nav-item span {
    display: grid !important;
    width: 32px !important;
    height: 32px !important;
    place-items: center !important;
    font-size: 14px !important;
    line-height: 1 !important;
  }

  .account,
  .app.is-sidebar-collapsed .account {
    padding: 10px 8px 12px !important;
  }

  .account-user,
  .app.is-sidebar-collapsed .account-user {
    width: 56px !important;
    height: 44px !important;
    justify-content: center !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .account-user > div:not(.avatar),
  .sidebar-logout,
  .app.is-sidebar-collapsed .account-user > div:not(.avatar),
  .app.is-sidebar-collapsed .sidebar-logout {
    display: none !important;
  }

  .content {
    max-width: none !important;
    padding: 28px 20px 28px !important;
  }
}

/* Unified page canvas */
:root {
  --app-canvas-width: 1180px;
}

.content {
  width: 100%;
  max-width: var(--app-canvas-width) !important;
}

.view,
.page-head,
.planning-tabs,
.planning-dashboard-panel,
.planning-cashflow-panel,
.planning-grid,
.planning-statement-panel,
.planning-library-panel,
.settings-content,
.settings-nav,
#planningLibrary.settings-content {
  width: 100%;
  max-width: 100% !important;
}

/* Library uses an internal scroll area instead of page scroll */
#planningLibrary {
  height: calc(100dvh - 192px);
  min-height: 0;
  overflow: hidden;
}

#planningLibrary .library-settings-section,
#planningLibrary #categorySettings,
#planningLibrary .category-list-panel {
  min-height: 0;
}

#planningLibrary #categorySettings {
  grid-template-rows: auto minmax(0, 1fr);
}

#planningLibrary .category-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

#planningLibrary .category-table {
  max-height: none;
  min-height: 0;
  overflow: auto;
}

.top-account,
.sidebar .top-account {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.top-account .account-user,
.app.is-sidebar-collapsed .top-account .account-user {
  display: flex !important;
  width: auto !important;
  min-width: 136px !important;
  height: 34px !important;
  justify-content: flex-start !important;
  padding: 3px 8px !important;
  overflow: visible !important;
}

.top-account .top-user-button,
.app.is-sidebar-collapsed .top-account .top-user-button {
  justify-content: space-between !important;
  border-color: var(--line-strong) !important;
  background: rgba(10, 186, 181, 0.065) !important;
}

.top-account #accountMeta,
.app.is-sidebar-collapsed .top-account #accountMeta {
  display: none !important;
}

.top-account .account-user > div:not(.avatar),
.app.is-sidebar-collapsed .top-account .account-user > div:not(.avatar),
.top-account .sidebar-logout,
.app.is-sidebar-collapsed .top-account .sidebar-logout {
  display: block !important;
}

.top-account .sidebar-logout,
.app.is-sidebar-collapsed .top-account .sidebar-logout {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
}

.top-account .sidebar-logout[hidden],
.app.is-sidebar-collapsed .top-account .sidebar-logout[hidden] {
  display: none !important;
}

body .num.is-negative,
body .plan-summary-table td.num.is-negative,
body .plan-summary-table .group-row td.num.is-negative {
  color: var(--red) !important;
}

body .num.is-diff-good,
body .plan-summary-table td.num.is-diff-good,
body .print-report td.num.is-diff-good {
  color: var(--blue-dark) !important;
}

body .num.is-diff-bad,
body .plan-summary-table td.num.is-diff-bad,
body .print-report td.num.is-diff-bad {
  color: var(--red) !important;
}

.ai-llm-module-grid {
  display: grid;
  gap: 14px;
}

.ai-llm-module-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.ai-llm-module-form {
  display: grid;
  gap: 12px;
}

.ai-llm-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-llm-module-head h3 {
  margin: 0;
}

.ai-llm-module-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-collapse-button {
  width: 34px;
  min-width: 34px;
}

.ai-llm-module-card.is-collapsed .ai-llm-module-body {
  display: none;
}

.ai-llm-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}

.ai-llm-skills-block {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.ai-llm-skills-block h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.ai-llm-module-form textarea {
  min-height: 220px;
  resize: vertical;
}

.accounting-settings-section {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.accounting-settings-section h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.accounting-settings-table-wrap {
  max-width: 100%;
}

.accounting-settings-table-wrap table th,
.accounting-settings-table-wrap table td {
  height: 34px !important;
  padding-right: 12px !important;
  padding-left: 12px !important;
}

.accounting-settings-table-wrap table th:first-child,
.accounting-settings-table-wrap table td:first-child {
  width: 220px !important;
  min-width: 220px !important;
}

.accounting-settings-table-wrap .settings-inline-input {
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  box-shadow: none;
}

@media (max-width: 1200px) {
  .ai-llm-settings-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

/* Minimal tables: no internal grid lines */
.app table,
.app table thead,
.app table tbody,
.app table tfoot,
.app table tr,
.app table th,
.app table td,
.app .excel-table th,
.app .excel-table td,
.app .category-table th,
.app .category-table td,
.app .plan-table-wrap th,
.app .plan-table-wrap td,
.app .accounting-settings-table-wrap table th,
.app .accounting-settings-table-wrap table td {
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  box-shadow: none !important;
}

.app table tbody tr:not(.group-row):hover td,
.app table tr.is-selected td {
  background: rgba(10, 186, 181, 0.045) !important;
}

#planning .plan-table-wrap tbody tr td,
#planning .plan-table-wrap tbody tr:hover td,
#planning .plan-table-wrap tbody tr.is-selected td,
#planning .plan-table-wrap .category-name-text,
#planning .plan-table-wrap .category-name-button,
#planning .plan-table-wrap .table-text {
  background: #fff !important;
}

#planning .plan-table-wrap .category-name-button:hover {
  background: rgba(10, 186, 181, 0.08) !important;
  color: var(--blue-dark) !important;
}

/* Compact density */
.app :is(.table-wrap, .side-table, .excel-wrap, .dashboard-table-wrap, .dashboard-kpi-table-wrap, .plan-summary-table-wrap, .cashflow-table-wrap, .plan-table-wrap, .accounting-table-wrap, .client-search-table-wrap, .lead-contact-table-wrap, .lead-profile-table-wrap, .call-table-wrap, .client-report-table-wrap, .personnel-table-wrap, .account-budget-table, .ai-log-table) table th,
.app :is(.table-wrap, .side-table, .excel-wrap, .dashboard-table-wrap, .dashboard-kpi-table-wrap, .plan-summary-table-wrap, .cashflow-table-wrap, .plan-table-wrap, .accounting-table-wrap, .client-search-table-wrap, .lead-contact-table-wrap, .lead-profile-table-wrap, .call-table-wrap, .client-report-table-wrap, .personnel-table-wrap, .account-budget-table, .ai-log-table) table td,
.app .accounting-settings-table-wrap table th,
.app .accounting-settings-table-wrap table td,
.app .category-table th,
.app .category-table td {
  height: 28px !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  line-height: 1.15 !important;
}

.app :is(.settings-content, .settings-section, .account-settings-section, .admin-board-section, .account-budget-panel, .accounting-settings-section, .client-panel, .personnel-panel) {
  gap: 8px !important;
}

.app :is(.panel, .settings-section, .account-settings-section, .admin-board-section, .account-budget-panel, .accounting-settings-section, .client-panel, .personnel-panel, .dashboard-card) {
  padding: 10px !important;
}

.app :is(.table-inline-input, .table-inline-select, .settings-inline-input, .admin-module-access-select, .compact-select, input, select):not([type="checkbox"]):not([type="radio"]) {
  min-height: 26px;
}

.app :is(.row-actions, .admin-actions, .table-actions) {
  gap: 4px !important;
}

/* Budget maker density */
#planning :is(.plan-summary-table, .excel-table, .category-table, .account-budget-table) th,
#planning :is(.plan-summary-table, .excel-table, .category-table, .account-budget-table) td,
#planningLibrary .category-table th,
#planningLibrary .category-table td,
#planning table th,
#planning table td {
  height: 24px !important;
  min-height: 24px !important;
  padding-top: 1px !important;
  padding-bottom: 1px !important;
  line-height: 1.08 !important;
}

#planning :is(.table-input, .statement-input, .code-select, .table-inline-input, .table-inline-select, .plan-input),
#planningLibrary :is(.table-inline-input, .table-inline-select, .settings-form input, .settings-form select) {
  height: 24px !important;
  min-height: 24px !important;
  padding-top: 1px !important;
  padding-bottom: 1px !important;
}

#planning :is(.planning-grid, .planning-main, .planning-dashboard-panel, .planning-cashflow-panel, .planning-statement-panel, .planning-library-panel),
#planningLibrary.settings-content {
  gap: 8px !important;
}

#planning :is(.plan-summary-board, .table-wrap, .panel, .side-panel),
#planningLibrary :is(.settings-section, .category-list-panel, .category-create-panel) {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Global table density */
.app table th,
.app table td,
.app :is(.excel-table, .plan-summary-table, .category-table, .dashboard-kpi-table, .metric-table, .client-search-table, .personnel-table, .call-table, .lead-contact-table, .lead-profile-table, .outreach-table, .client-report-table, .account-budget-table, .budget-source-table, .admin-users-table, .admin-enterprise-table, .admin-budget-table, .admin-user-table, .admin-budget-access-table, .ai-log-table, .ai-prompt-table, .category-operations-table-wrap table) th,
.app :is(.excel-table, .plan-summary-table, .category-table, .dashboard-kpi-table, .metric-table, .client-search-table, .personnel-table, .call-table, .lead-contact-table, .lead-profile-table, .outreach-table, .client-report-table, .account-budget-table, .budget-source-table, .admin-users-table, .admin-enterprise-table, .admin-budget-table, .admin-user-table, .admin-budget-access-table, .ai-log-table, .ai-prompt-table, .category-operations-table-wrap table) td {
  height: 24px !important;
  min-height: 24px !important;
  padding-top: 1px !important;
  padding-bottom: 1px !important;
  line-height: 1.08 !important;
}

.app :is(.table-inline-input, .table-inline-select, .settings-inline-input, .admin-module-access-select, .compact-select, .table-input, .statement-input, .code-select, .plan-input, .settings-form input, .settings-form select):not([type="checkbox"]):not([type="radio"]) {
  height: 24px !important;
  min-height: 24px !important;
  padding-top: 1px !important;
  padding-bottom: 1px !important;
}

.app :is(.table-wrap, .excel-wrap, .dashboard-table-wrap, .dashboard-kpi-table-wrap, .plan-summary-table-wrap, .cashflow-table-wrap, .plan-table-wrap, .accounting-table-wrap, .client-search-table-wrap, .lead-contact-table-wrap, .lead-profile-table-wrap, .call-table-wrap, .client-report-table-wrap, .personnel-table-wrap, .account-budget-table, .accounting-settings-table-wrap, .category-operations-table-wrap) {
  line-height: 1.08 !important;
}

/* Stable table typography */
.app table th,
.app table td,
.app table th *,
.app table td *,
.app :is(.excel-table, .plan-summary-table, .category-table, .dashboard-kpi-table, .metric-table, .client-search-table, .personnel-table, .call-table, .lead-contact-table, .lead-profile-table, .outreach-table, .client-report-table, .account-budget-table, .budget-source-table, .admin-users-table, .admin-enterprise-table, .admin-budget-table, .admin-user-table, .admin-budget-access-table, .ai-log-table, .ai-prompt-table) th,
.app :is(.excel-table, .plan-summary-table, .category-table, .dashboard-kpi-table, .metric-table, .client-search-table, .personnel-table, .call-table, .lead-contact-table, .lead-profile-table, .outreach-table, .client-report-table, .account-budget-table, .budget-source-table, .admin-users-table, .admin-enterprise-table, .admin-budget-table, .admin-user-table, .admin-budget-access-table, .ai-log-table, .ai-prompt-table) td,
.app :is(.excel-table, .plan-summary-table, .category-table, .dashboard-kpi-table, .metric-table, .client-search-table, .personnel-table, .call-table, .lead-contact-table, .lead-profile-table, .outreach-table, .client-report-table, .account-budget-table, .budget-source-table, .admin-users-table, .admin-enterprise-table, .admin-budget-table, .admin-user-table, .admin-budget-access-table, .ai-log-table, .ai-prompt-table) th *,
.app :is(.excel-table, .plan-summary-table, .category-table, .dashboard-kpi-table, .metric-table, .client-search-table, .personnel-table, .call-table, .lead-contact-table, .lead-profile-table, .outreach-table, .client-report-table, .account-budget-table, .budget-source-table, .admin-users-table, .admin-enterprise-table, .admin-budget-table, .admin-user-table, .admin-budget-access-table, .ai-log-table, .ai-prompt-table) td * {
  font-family: var(--font-main) !important;
  font-size: 14px !important;
  line-height: 1.08 !important;
}

.app table th,
.app table th * {
  font-weight: 400 !important;
}

.app table td,
.app table td * {
  font-weight: 400 !important;
}

.app table td.num,
.app table td.num *,
.app table th.num,
.app table th.num * {
  font-variant-numeric: tabular-nums;
}

#planning .plan-summary-table tr.group-row td,
#planning .plan-table-wrap tr.group-row td,
#planningLibrary .category-table tr.category-group-row td {
  background: rgba(10, 186, 181, 0.035) !important;
  color: var(--text) !important;
}

#planning .plan-summary-table tr.group-row:hover td,
#planning .plan-table-wrap tr.group-row:hover td,
#planningLibrary .category-table tr.category-group-row:hover td {
  background: rgba(10, 186, 181, 0.055) !important;
}

/* No bold typography */
.app :is(h1, h2, h3, h4, h5, h6, p, span, strong, b, label, button, a, th, td, input, select, textarea, option, small, div) {
  font-weight: 400 !important;
}

.app table :is(th, td, th *, td *),
.app :is(.category-name-button, .category-name-text, .table-text, .num, .group-row td, .group-row td.num) {
  font-family: var(--font-main) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

@media (max-width: 720px) {
  .client-module-tabs {
    width: 100%;
    max-width: 100%;
    padding-bottom: 4px;
  }

  .lead-search-board,
  .lead-settings-shell {
    padding: 10px;
  }

  .lead-search-task,
  .lead-profile-grid,
  .lead-country-tools-grid {
    grid-template-columns: 1fr;
  }

  .lead-search-task {
    grid-template-areas:
      "country"
      "industry"
      "employees"
      "context"
      "saved";
  }

  .lead-search-task .lead-country-field,
  .lead-search-task .lead-industry-field,
  .lead-search-task .lead-employees-field,
  .lead-context-field,
  .saved-lead-search-panel,
  .lead-ai-search-button,
  .lead-profile-wide,
  .lead-country-tools-grid .lead-profile-wide {
    grid-column: 1;
  }

  .saved-lead-search-panel {
    height: 120px;
    max-height: 120px;
  }

  .lead-search-result-context {
    justify-content: stretch;
  }

  .lead-search-result-context label {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .lead-search-result-context select {
    width: 100%;
  }

  .lead-settings-head,
  .lead-profile-actions,
  .lead-profile-form-head {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-sequence-head {
    gap: 8px;
  }

  .lead-sequence-head span {
    max-width: 100%;
    white-space: normal;
  }

  .lead-sequence-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .lead-llm-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .lead-inline-settings-row {
    grid-template-columns: 1fr;
  }

  .lead-inline-settings-actions {
    justify-content: flex-start;
  }

  .lead-country-tool-row,
  .lead-apify-actor-row {
    grid-template-columns: 1fr auto auto !important;
  }

  .lead-country-tool-row label {
    grid-column: 1 / -1;
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .lead-country-tool-row > span {
    grid-column: 1 / -1;
  }

  .lead-apify-actor-row .table-action-button {
    grid-column: auto;
  }

  .lead-outreach-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-outreach-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .lead-outreach-contact-board {
    max-height: 280px;
  }

  .lead-sequences-layout,
  .lead-import-grid {
    grid-template-columns: 1fr;
  }

  .lead-import-card.is-mail-settings,
  .lead-import-card.is-user-settings,
  .lead-import-card.is-address-settings,
  .lead-import-card.is-statement-imports {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .lead-import-dialog-row,
  .lead-import-dialog-row.is-mail-row {
    grid-template-columns: 1fr;
  }

  .lead-import-user-block summary {
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
  }

  .lead-import-user-mail,
  .lead-import-user-state {
    grid-column: 2;
  }

  .lead-import-card.is-statement-imports h3 {
    padding-bottom: 0;
  }

  .lead-sequence-contact-list {
    max-height: 220px;
  }

  .lead-outreach-template-field {
    width: 100%;
    min-width: 0;
  }

  .lead-profile-table-wrap,
  .client-search-table-wrap,
  .lead-contact-table-wrap,
  .lead-outreach-table-wrap,
  .lead-sequence-log-wrap {
    overflow-x: auto;
  }

  .lead-result-actions {
    align-items: stretch;
    justify-content: stretch;
    flex-wrap: wrap;
    gap: 8px;
  }

  .lead-owner-select,
  .lead-result-action-button {
    width: 100%;
    min-width: 0;
  }

  .lead-client-filters,
  .lead-clients-layout,
  .lead-contact-client-summary {
    grid-template-columns: 1fr;
  }

  .lead-client-filters {
    gap: 6px;
  }

  .lead-clients-table {
    min-width: 980px;
  }

  .lead-contact-table {
    min-width: 920px;
  }
}

#planning .plan-table-wrap table thead th,
#planning .plan-table-wrap table thead th *,
#planning table thead th,
#planning table thead th *,
#planningLibrary .category-table thead th,
#planningLibrary .category-table thead th *,
#planning .plan-table-wrap tr.group-row td,
#planning .plan-table-wrap tr.group-row td *,
#planning .plan-table-wrap tr.plan-summary-total-row td,
#planning .plan-table-wrap tr.plan-summary-total-row td *,
#planning tr.group-row.income-group td,
#planning tr.group-row.income-group td *,
#planning tr.group-row.expense-group td,
#planning tr.group-row.expense-group td *,
#planning tr.group-row td,
#planning tr.group-row td *,
#planningLibrary .category-table tr.category-group-row td,
#planningLibrary .category-table tr.category-group-row td *,
#planningLibrary .category-group-name {
  font-weight: 600 !important;
}

html body .app #planning .plan-table-wrap table thead th,
html body .app #planning .plan-table-wrap table thead th *,
html body .app #planning .plan-table-wrap table thead th.num,
html body .app #planning .plan-table-wrap table thead th.num *,
html body .app #planning .plan-summary-table thead th,
html body .app #planning .plan-summary-table thead th *,
html body .app #planning .plan-summary-table thead th.num,
html body .app #planning .plan-summary-table thead th.num * {
  font-weight: 600 !important;
}

html body .app #planning .plan-table-wrap tr.group-row td.num.is-diff-good,
html body .app #planning .plan-table-wrap tr.group-row td.num.is-diff-good *,
html body .app #planning .plan-table-wrap tr.plan-summary-total-row td.num.is-diff-good,
html body .app #planning .plan-table-wrap tr.plan-summary-total-row td.num.is-diff-good *,
html body .app #planning .plan-summary-table tr.group-row td.num.is-diff-good,
html body .app #planning .plan-summary-table tr.group-row td.num.is-diff-good * {
  color: var(--blue-dark) !important;
}

html body .app #planning .plan-table-wrap tr.group-row td.num.is-diff-bad,
html body .app #planning .plan-table-wrap tr.group-row td.num.is-diff-bad *,
html body .app #planning .plan-table-wrap tr.plan-summary-total-row td.num.is-diff-bad,
html body .app #planning .plan-table-wrap tr.plan-summary-total-row td.num.is-diff-bad *,
html body .app #planning .plan-summary-table tr.group-row td.num.is-diff-bad,
html body .app #planning .plan-summary-table tr.group-row td.num.is-diff-bad * {
  color: var(--red) !important;
}

html body .app :is(
  .client-search-table,
  .lead-clients-table,
  .lead-contact-table,
  .lead-all-contacts-table,
  .communication-contact-table,
  .lead-outreach-table,
  .lead-sequence-log-table,
  .lead-profile-table,
  .client-report-table
) thead th,
html body .app :is(
  .client-search-table,
  .lead-clients-table,
  .lead-contact-table,
  .lead-all-contacts-table,
  .communication-contact-table,
  .lead-outreach-table,
  .lead-sequence-log-table,
  .lead-profile-table,
  .client-report-table
) thead th * {
  font-weight: 600 !important;
}

.lead-viewer-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
}

.top-header-context .lead-viewer-bar {
  gap: 0;
  padding: 0;
  border-bottom: 0;
}

.lead-viewer-select-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.lead-viewer-select-field span,
.lead-viewer-context,
.lead-viewer-empty {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}

.lead-viewer-select-field select {
  width: min(340px, 52vw);
  min-height: 38px;
  padding: 6px 34px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
}

.top-header-context .lead-viewer-select-field {
  gap: 0;
}

.top-header-context .lead-viewer-select-field select {
  width: min(320px, 34vw);
  height: 30px;
  min-height: 30px;
  padding: 0 28px 0 10px;
  border-radius: 8px;
  background-color: #fff;
  font-size: 13px;
  font-weight: 560;
}

@media (max-width: 640px) {
  .lead-viewer-bar,
  .lead-viewer-select-field {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-viewer-select-field select {
    width: 100%;
  }

  .top-header-context .lead-viewer-select-field select {
    width: min(100%, 320px);
  }
}
.lead-country-tool-saved {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: #087f5b;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}
