@import url('https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --line: #d9e1ea;
  --header: #e8eef5;
  --title-bg: #687783;
  --title-bg-dark: #566571;
  --title-text: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --ok: #dff3e6;
  --bad: #f8dddd;
  --pending: #eef0f3;
  --accent: #315a7c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PT Sans", "Montserrat", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  font-size: 14px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 72px;
  background: linear-gradient(180deg, #173644 0%, #173b4d 46%, #214d60 100%);
  border-right: 1px solid #0d2a36;
  padding: 0 0 18px;
  overflow-y: auto;
}
.sidebar-profile {
  display: block;
  width: 72px;
  height: 82px;
  margin: 0 0 10px;
  background: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.sidebar-profile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% 18%;
}
.sidebar a:not(.brand-logo):not(.sidebar-profile) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #aebbc3;
  text-decoration: none;
  padding: 6px 4px;
  border-radius: 0;
  margin-bottom: 2px;
  min-height: 61px;
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  line-height: 1.12;
  transition: color 140ms ease, background 140ms ease;
}
.sidebar a:not(.brand-logo):not(.sidebar-profile) span {
  display: block;
  max-width: 64px;
  overflow-wrap: anywhere;
}
.nav-icon {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
  transition: color 140ms ease, filter 140ms ease, stroke-width 140ms ease;
}
.sidebar a:not(.brand-logo):not(.sidebar-profile):hover {
  background: rgba(255, 255, 255, 0.08);
  color: #eef6fa;
}
.sidebar a:not(.brand-logo):not(.sidebar-profile).active {
  background: transparent;
  color: #ffffff;
  font-weight: 700;
}
.sidebar a:not(.brand-logo):not(.sidebar-profile).active .nav-icon {
  color: #ffffff;
  stroke-width: 1.55;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.45));
}
.secondary-sidebar {
  position: fixed;
  inset: 0 auto 0 72px;
  width: 265px;
  background: #ffffff;
  border-right: 1px solid #e1e6eb;
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.04);
  z-index: 2;
}
.secondary-title {
  height: 65px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid #e1e6eb;
  color: #202a37;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2.4px;
  line-height: 1;
  text-transform: uppercase;
}
.secondary-sidebar a {
  display: flex;
  min-height: 52px;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid #e1e6eb;
  color: #303946;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}
.secondary-sidebar a.active {
  color: #0b65c9;
  font-weight: 700;
}
.app { margin-left: 72px; padding: 22px; }
body:has(.secondary-sidebar) .app {
  margin-left: 337px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 16px;
}
.topbar h1 {
  font-size: 21px;
  margin: 0 0 4px;
}
.dashboard-title {
  min-width: 0;
}
.dashboard-logo {
  display: block;
  width: 172px;
  height: auto;
  margin: 0 0 12px;
  mix-blend-mode: lighten;
}
.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
}
select, input, button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: white;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}
button {
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 600;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.cards article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.cards span {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}
.cards strong { font-size: 24px; }
.cards .ok { background: var(--ok); }
.cards .bad { background: var(--bad); }
.operations-panel {
  margin-bottom: 18px;
}
.operations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.operations-header h2 {
  margin-bottom: 3px;
}
.operations-header p {
  margin: 0;
  color: var(--muted);
}
.progress-card {
  min-width: 280px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--muted);
}
.progress-label strong {
  color: var(--text);
  white-space: nowrap;
}
.progress-track {
  height: 10px;
  background: #e7edf3;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--title-bg);
  border-radius: 999px;
}
.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.ops-table-shell {
  padding: 0;
  border-radius: 0;
}
.ops-table {
  min-width: 860px;
}
.ops-table th {
  white-space: nowrap;
}
.ops-table td {
  vertical-align: middle;
}
.ops-table tr.ops-overdue td,
.ops-table tr.ops-completed td {
  background: #ffffff !important;
}

.ops-table tbody tr:hover td,
.ops-table tbody tr.ops-overdue:hover td,
.ops-table tbody tr.ops-completed:hover td {
  background: #f0f6ff !important;
}
.ops-pay-form {
  display: flex;
  align-items: center;
  gap: 5px;
}
.ops-amount {
  width: 86px;
  padding: 4px 6px;
  text-align: right;
}
.ops-currency {
  width: 72px;
  padding: 4px 6px;
}
.ops-action {
  min-width: 84px;
  padding: 6px 10px;
  border-color: #91a4b7;
  background: #ffffff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.ops-action:hover,
.table-action:hover {
  border-color: var(--accent);
  background: #eef4f8;
}
.action-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 104px;
  height: 30px;
  padding: 0 9px 0 32px;
  border: 1px solid #b7c1ca;
  border-radius: 999px;
  background: #e2e7ec;
  color: #566571;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.action-toggle::before {
  content: "";
  position: absolute;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  transition: transform 160ms ease;
}
.action-toggle.is-on {
  justify-content: flex-end;
  padding: 0 32px 0 9px;
  border-color: #4f86e8;
  background: #4f86e8;
  color: #ffffff;
}
.action-toggle.is-on::before {
  transform: translateX(72px);
}
.action-toggle:hover {
  border-color: #315a7c;
}
.ops-action-done,
.state-button.state-done {
  border-color: #9fceae !important;
  background: var(--ok) !important;
  color: #153521 !important;
}
.action-toggle.ops-action-done {
  border-color: #4f86e8 !important;
  background: #4f86e8 !important;
  color: #ffffff !important;
}
.table-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  overflow: auto;
}
.actions {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}
.actions a {
  border: 1px solid var(--line);
  color: var(--accent);
  background: white;
  border-radius: 6px;
  padding: 8px 10px;
  text-decoration: none;
  font-size: 14px;
}
h2 { font-size: 16px; margin: 0 0 12px; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  background: #ffffff;
  color: #89919a;
  padding: 8px 9px;
  font-weight: 700;
  border-bottom: 1px solid #e5e9ee;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
td {
  padding: 7px 9px;
  border-bottom: 1px solid #e8ecef;
  background: #ffffff;
}
tr:nth-child(even) td { background: #ffffff; }
table:not(.attendance-table) tbody tr:hover td:not(.status-cell) {
  background: #f0f6ff;
}
.empty {
  color: var(--muted);
  text-align: center;
  padding: 28px;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  background: var(--pending);
}
.badge.ok { background: var(--ok); }
.badge.bad { background: var(--bad); }
.badge.pending { background: var(--pending); }
.attendance-shell { padding: 0; }
.attendance-table {
  min-width: 980px;
  table-layout: auto;
}
.attendance-table th,
.attendance-table td {
  text-align: center;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid #e1e6eb;
  background: #ffffff;
}

.attendance-table th {
  height: 43px;
  border-right: 1px solid #e4e8ec;
  color: #8d969f;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.85px;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.attendance-table th:last-child {
  border-right: 0;
}

.attendance-table td {
  height: 48px;
  color: #303946;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  vertical-align: middle;
}
.attendance-table th:first-child,
.attendance-table td:first-child {
  text-align: left;
  width: 280px;
  min-width: 280px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #ffffff;
  border-right: 1px solid #e4e8ec;
}
.attendance-table th:first-child {
  color: #8d969f;
  z-index: 2;
}
.attendance-table tbody tr:hover td,
.attendance-table tbody tr:hover td:first-child,
.attendance-table tbody tr:hover .status-cell {
  background: #f0f6ff !important;
}
.employee-cell {
  font-weight: 600;
  white-space: nowrap;
}
.attendance-employee-name {
  display: inline-block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.attendance-work-summary {
  display: inline-block;
  margin-left: 10px;
  color: #8d969f;
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
}
.status-cell {
  font-size: 12px;
  color: #334155;
}
.annual-attendance-table {
  min-width: 2520px;
}
.annual-attendance-table th:not(:first-child),
.annual-attendance-table td:not(:first-child) {
  min-width: 72px;
  max-width: 78px;
  padding: 4px;
}
.attendance-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.attendance-form {
  position: relative;
  min-height: 26px;
}
.attendance-abbrev {
  display: block;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
}
.partial-hours {
  display: none;
  width: 100%;
  margin-top: 2px;
  padding: 2px;
  font-size: 10px;
  text-align: center;
  border: 0;
  background: transparent;
  font-weight: 700;
  position: relative;
  z-index: 2;
}
.status-cell.not-set { background: white; }
.status-cell.present { background: #e4f6ea; }
.status-cell.absent,
.status-cell.unpaid-leave { background: #f8dddd; }
.status-cell.online,
.status-cell.partial-present { background: #fff2bd; }
.status-cell.weekend,
.status-cell.public-holiday {
  background: #eef2f7;
  color: #64748b;
}
.status-cell.day-off {
  background: #eef2f7;
  color: #64748b;
}
.status-cell.paid-leave { background: #c9ecd5; }
.status-cell.sick-leave-cm { background: #dff3e6; }
.status-cell.save-error { outline: 2px solid #d65b5b; }
.nested-collapse {
  margin: 8px 0 10px 12px;
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-panel {
  width: min(380px, calc(100vw - 32px));
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.login-panel h1 { margin: 0 0 4px; }
.login-panel p { color: var(--muted); margin-top: 0; }
.login-panel label { display: block; margin: 12px 0; color: var(--muted); }
.login-panel input { display: block; width: 100%; margin-top: 6px; }
.login-panel .remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.login-panel .remember-me input {
  width: auto;
  margin: 0;
}
.login-panel button { width: 100%; margin-top: 10px; }
.login-link {
  display: block;
  margin-top: 14px;
  color: #0057b8;
  text-align: center;
  text-decoration: none;
}
.reset-link-box {
  background: #eef5ff;
  border-color: #c7d8ef;
  color: #1d2939;
  word-break: break-word;
}
.login-wide-action {
  display: block;
  margin-top: 16px;
  text-align: center;
}
.alert {
  background: var(--bad);
  border: 1px solid #efb6b6;
  padding: 10px;
  border-radius: 6px;
}
.form-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}
.service-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}
.service-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}
.service-form input,
.service-form select {
  width: 100%;
  min-width: 0;
}
.service-form .wide {
  grid-column: span 2;
}
.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--text);
}
.checkline input {
  width: auto;
}
.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  color: var(--text);
}
.toggle-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-switch,
.status-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 24px;
  border-radius: 999px;
  background: #d2d8de;
  border: 1px solid #b7c1ca;
  transition: background 160ms ease, border-color 160ms ease;
  vertical-align: middle;
}
.toggle-switch::after,
.status-toggle span {
  content: "";
  position: absolute;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  transition: transform 160ms ease;
}
.toggle-field input:checked + .toggle-switch,
.status-toggle.on {
  background: #4f86e8;
  border-color: #4f86e8;
}
.toggle-field input:checked + .toggle-switch::after,
.status-toggle.on span {
  transform: translateX(24px);
}
.status-toggle.off {
  background: #d2d8de;
  border-color: #b7c1ca;
}
.service-table-shell table {
  min-width: 1780px;
}
.payment-plan-shell table {
  min-width: 1520px;
}
.task-config-shell table {
  min-width: 1540px;
}
.task-list-shell table {
  min-width: 1700px;
}
.group-row td {
  background: #ffffff !important;
  color: #303946;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.inline-form input {
  min-width: 220px;
}
.compact-form {
  padding: 12px 14px;
}
.muted-line {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.button-secondary,
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--accent);
  background: white;
  border-radius: 6px;
  padding: 8px 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.table-action {
  padding: 5px 8px;
}
.state-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 700;
}
.danger-action {
  color: #9f3333;
}
.collapse-section {
  margin-bottom: 12px;
}
.collapse-section summary {
  cursor: pointer;
  background: #ffffff;
  color: #303946;
  border: 1px solid #e4e8ec;
  border-radius: 0;
  padding: 12px 14px;
  font-weight: 400;
  text-transform: none;
}
.collapse-section summary span {
  color: #9aa3ab;
  font-weight: 500;
  margin-left: 8px;
}
.collapse-section .table-shell {
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.check-form button:not(.table-action):not(.action-toggle) {
  width: 28px;
  height: 28px;
  padding: 0;
  background: white;
  color: var(--text);
  border-color: #91a4b7;
  font-size: 18px;
  line-height: 1;
}
.checked-button {
  background: var(--ok) !important;
  color: #153521 !important;
  border-color: #a8d9b8 !important;
}
.cell-input,
.cell-select {
  width: 92px;
  padding: 5px 6px;
  font-size: 12px;
}
.cell-select {
  width: 76px;
}
.row-actions,
.leave-mini,
.inline-mini {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.leave-mini input,
.inline-mini input {
  width: 128px;
  font-size: 12px;
}

@media (max-width: 1200px) {
  .operations-grid {
    grid-template-columns: 1fr;
  }
  .operations-header {
    align-items: stretch;
    flex-direction: column;
  }
  .progress-card {
    min-width: 0;
  }
}

.crm-page {
  padding: 0;
}
.crm-toolbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  background: #ffffff;
  border-bottom: 1px solid #e1e6eb;
}
.crm-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.crm-search input[type="search"] {
  flex: 1;
  border: 0;
  font-size: 14px;
  color: #6b7280;
}
.crm-filter-panel {
  overflow: hidden;
  max-height: 0;
  border-bottom: 1px solid #e1e6eb;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-10px);
  opacity: 0;
  transition: max-height 240ms ease, opacity 180ms ease, transform 240ms ease;
}
.crm-filter-panel.is-open {
  max-height: 560px;
  transform: translateY(0);
  opacity: 1;
}
.crm-filter-form {
  display: grid;
  grid-template-columns: 230px minmax(0, 430px) minmax(240px, 1fr);
  gap: 28px;
  padding: 18px 26px 22px;
}
.crm-filter-presets {
  display: grid;
  align-content: start;
}
.crm-filter-presets button,
.crm-filter-presets button:hover,
.crm-filter-presets button:focus {
  min-height: 44px !important;
  justify-content: flex-start !important;
  border: 0 !important;
  border-bottom: 1px solid #edf0f3 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #303946 !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  text-align: left !important;
  text-transform: none !important;
}
.crm-filter-presets button.is-active {
  color: #0b83d8 !important;
  font-weight: 700 !important;
}
.crm-filter-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  align-content: start;
}
.crm-filter-fields label {
  display: grid;
  gap: 5px;
  color: #7b858e;
  font-size: 12px;
}
.crm-filter-fields input,
.crm-filter-fields select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cfd6dd;
  border-radius: 3px;
  background: #ffffff;
  color: #303946;
  font: inherit;
}
.crm-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.crm-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}
.crm-filter-tags a {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #cfd6dd;
  border-radius: 3px;
  background: #f7f9fb;
  color: #506070;
  text-decoration: none;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 5px;
  background: #4f86e8;
  color: #ffffff;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}
.crm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  min-height: calc(100vh - 74px);
}
.crm-table-shell {
  overflow: auto;
  padding: 16px;
}
.crm-table {
  min-width: 1380px;
  background: #ffffff;
  border-collapse: collapse;
}
.crm-table th {
  background: #ffffff;
  color: #89919a;
  border: 0;
  border-bottom: 1px solid #e5e9ee;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  height: 44px;
}
.crm-table td {
  height: 41px;
  border: 0;
  border-bottom: 1px solid #e8ecef;
  background: #ffffff;
  font-size: 14px;
}
.crm-table tr:nth-child(even) td {
  background: #ffffff;
}
.crm-table tbody tr:hover td {
  background: #f0f6ff;
}
.crm-table tr.selected td {
  background: #eef4ff;
}
.crm-link {
  color: #0057b8;
  text-decoration: none;
  font-weight: 500;
}
.users-table .crm-link,
.amo-table .crm-link {
  display: block;
  min-height: 100%;
  padding: 12px 10px;
  margin: -12px -10px;
}
.mini-checkbox {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid #dde3e8;
  border-radius: 4px;
  background: #ffffff;
}
.employee-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 60;
  width: 782px;
  max-width: calc(100vw - 72px);
  background: #f3f5f7;
  border-left: 1px solid #e1e6eb;
  padding: 34px 36px;
  overflow: auto;
  animation: user-drawer-in 460ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: right center;
  will-change: transform;
}
.drawer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 180ms ease, transform 180ms ease;
}
.employee-drawer .drawer-actions {
  margin: 0 0 36px;
  padding: 0;
}
.drawer-actions a {
  color: #8b9299;
  text-decoration: none;
  font-weight: 700;
}
.employee-drawer .drawer-actions a {
  font-size: 16px;
}
.drawer-actions button {
  background: #ffffff;
  color: #68717a;
  border-color: #e1e6eb;
  min-width: 90px;
}
.employee-drawer .drawer-actions button {
  min-width: 150px;
  min-height: 54px;
  font-size: 18px;
}
.employee-drawer.is-dirty .drawer-actions button,
.form-shell.is-dirty .drawer-actions button,
.employee-card.is-dirty .drawer-actions button {
  background: #4f86e8;
  border-color: #4077d6;
  color: #ffffff;
}
.employee-card {
  background: #ffffff;
  border: 1px solid #dfe5eb;
  border-radius: 2px;
  padding: 26px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}
.photo-form {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.employee-photo {
  width: 170px;
  height: 170px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #e9eef3;
  color: #607181;
  font-size: 38px;
  font-weight: 700;
  cursor: pointer;
}
.employee-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.employee-photo input {
  display: none;
}
.drawer-form {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 14px 18px;
}
.drawer-form label {
  display: contents;
  color: #303946;
  font-size: 15px;
}
.drawer-form input,
.drawer-form select {
  min-width: 0;
  width: 100%;
  height: 42px;
  border-color: #cfd6dd;
  font-size: 16px;
  border-radius: 6px;
}

.drawer-form textarea {
  min-width: 0;
  width: 100%;
  min-height: 96px;
  padding: 10px;
  border: 1px solid #cfd6dd;
  color: #303946;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  resize: vertical;
}

.toolbar-action-form {
  display: flex;
  align-items: center;
}
.soft-button {
  min-height: 38px;
  border-radius: 5px;
  border-color: #dfe5eb;
  background: #ffffff;
  color: #69747d;
  padding: 0 14px;
  font-size: 12px;
  text-transform: uppercase;
}
.amo-list-page {
  background: #f4f6f8;
}
.amo-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 74px);
}
.amo-list-layout.has-drawer {
  grid-template-columns: minmax(0, 1fr);
}
.amo-list-content {
  padding: 16px;
  overflow: auto;
}
.amo-section {
  margin-bottom: 18px;
  background: #ffffff;
  border: 1px solid #e4e8ec;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}
.amo-section-title {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #e7ebef;
  border-radius: 0;
  background: #ffffff;
  color: #303946;
  font-size: 16px;
  font-weight: 400;
  text-align: left;
  text-transform: none;
}
.amo-section-title::before {
  content: "−";
  color: #6a7783;
  font-weight: 700;
}
.amo-section-title.is-collapsed::before {
  content: "+";
}
.amo-section-title small {
  color: #9aa3ab;
  font-size: 12px;
  font-weight: 400;
}
.amo-section-title:hover {
  background: #f7fbff;
}
.amo-table-shell {
  position: relative;
  overflow: auto;
}
.amo-table {
  min-width: 1560px;
  background: #ffffff;
  border-collapse: collapse;
}
.amo-table th {
  height: 42px;
  padding: 0 10px;
  background: #ffffff;
  color: #909aa3;
  border: 0;
  border-bottom: 1px solid #e5e9ee;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.amo-table th .table-sort-link {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
  text-transform: inherit;
}

.amo-table th .table-sort-link:hover {
  color: #303946;
}
.amo-table td {
  height: 39px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid #e8ecef;
  background: #ffffff;
  color: #303946;
  font-size: 14px;
  vertical-align: middle;
  white-space: nowrap;
}
.amo-table tr:nth-child(even) td {
  background: #ffffff;
}
.amo-table tbody tr:hover td {
  background: #f0f6ff;
}
.amo-table tr.selected td {
  background: #eef4ff;
}
.service-drawer .employee-card,
.task-drawer .employee-card,
.kpi-drawer .employee-card {
  padding: 34px 40px;
}
.drawer-entity-head {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  margin-bottom: 34px;
}
.drawer-entity-head h2 {
  margin: 0 0 4px;
  color: #303946;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.15;
}
.drawer-entity-head p {
  margin: 0;
  color: #8a949c;
  font-size: 21px;
  line-height: 1.25;
}
.service-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eaf2ff, #dbe8f8);
  color: #4f86e8;
  font-size: 34px;
  font-weight: 700;
}

.users-settings-layout {
  display: block;
}
.users-table-shell {
  padding: 16px;
}
.users-table {
  min-width: 1380px;
}
.users-table th {
  height: 44px;
  padding: 0 10px;
  font-size: 11px;
  letter-spacing: 1.8px;
}
.users-table td {
  height: 42px;
  padding: 0 10px;
  font-size: 14px;
}
.rights-admin {
  color: #41990b;
  font-weight: 400;
}
.rights-role {
  color: #303946;
  font-weight: 400;
}
.rights-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 12px;
}
.rights-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #749e42;
}
.rights-dots i.denied {
  background: #f37575;
}
.employee-entity-head {
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  margin-bottom: 28px;
}
.compact-photo-form {
  margin: 0;
  justify-items: start;
}
.employee-photo-small {
  width: 120px;
  height: 120px;
  font-size: 28px;
}
.employee-entity-head h2 {
  font-size: 24px;
  line-height: 1.15;
}
.employee-entity-head p {
  font-size: 15px;
}
.user-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid #e5e9ee;
  padding-top: 12px;
}
.user-metrics article {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #e7ebef;
  border-radius: 0;
  padding: 9px 6px;
}
.user-metrics span {
  display: block;
  color: #8a949c;
  font-size: 12px;
  margin-bottom: 5px;
}
.user-metrics .metric-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  margin: 0;
  border: 1px solid #d8dfe6;
  border-radius: 50%;
  color: #4f86e8;
  font-size: 14px;
  font-weight: 700;
}
.user-metrics strong {
  color: #303946;
  font-size: 15px;
  font-weight: 700;
}
.hr-value-ok {
  color: #2f8f1f;
}
.hr-value-muted {
  color: #8d969f;
}

.users-settings-layout .employee-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: 782px;
  max-width: calc(100vw - 72px);
  padding: 34px 36px;
  border-left: 1px solid #dfe5eb;
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12);
  animation: user-drawer-in 460ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.users-settings-layout .employee-card {
  min-height: calc(100vh - 68px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.users-settings-layout .drawer-actions {
  margin: 0 0 36px;
  padding: 0;
}

.users-settings-layout .drawer-actions button {
  min-width: 150px;
  min-height: 54px;
  font-size: 18px;
}

.users-settings-layout .drawer-actions a {
  font-size: 16px;
}

.users-settings-layout .employee-entity-head {
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 36px;
  margin-bottom: 46px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: block;
  background: rgba(17, 24, 30, 0.42);
  animation: drawer-backdrop-in 460ms ease;
}

.drawer-backdrop.is-closing {
  animation: drawer-backdrop-out 520ms ease forwards;
}

.employee-drawer.is-closing,
.users-settings-layout .employee-drawer.is-closing {
  animation: user-drawer-out 560ms cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}

@keyframes user-drawer-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes drawer-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drawer-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes user-drawer-out {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

.employee-profile-block {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-bottom: 28px;
  padding: 34px 40px;
  background: #ffffff;
  border: 1px solid #e1e6eb;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.employee-single-block {
  grid-template-columns: 170px minmax(0, 1fr);
}

.employee-profile-block h2 {
  margin: 0 0 6px;
  color: #303946;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.15;
}

.employee-profile-block p {
  margin: 0 0 12px;
  color: #8a949c;
  font-size: 21px;
}

.employee-profile-block span,
.employee-profile-block small {
  display: block;
  color: #68747e;
  font-size: 15px;
  line-height: 1.45;
}

.employee-profile-block small {
  margin-top: 4px;
  color: #98a1a9;
}

.profile-activity {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 22px;
  color: #303946;
  font-size: 16px;
}

.employee-hidden-form {
  display: none;
}

.employee-profile-fields {
  padding-top: 4px;
}

.employee-profile-block .toggle-field {
  display: inline-flex;
  min-height: 42px;
}

.employee-profile-block .toggle-switch {
  display: inline-flex;
}

.employee-profile-block .photo-upload-button span {
  display: inline;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.employee-form-block {
  margin-bottom: 28px;
  padding: 28px 40px;
  background: #ffffff;
  border: 1px solid #e1e6eb;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.drawer-section-title {
  margin-bottom: 18px;
}

.drawer-section-title h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 400;
  color: #1f2937;
}

.drawer-section-title p {
  margin: 0;
  color: #8b949e;
  font-size: 14px;
  line-height: 1.4;
}

.permissions-block {
  padding-left: 0;
  padding-right: 0;
}

.permissions-block .drawer-section-title {
  padding: 0 40px;
}

.permission-role-strip,
.permission-action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0 40px;
}

.permission-role-strip {
  margin-bottom: 12px;
}

.permission-action-strip {
  margin-bottom: 22px;
  align-items: center;
  gap: 14px;
}

.permission-role-chip {
  position: relative;
  min-height: 34px;
  padding: 6px 18px;
  border: 1px solid #c7cbd0;
  border-left-width: 0;
  background: #f8f8f8;
  color: #6f7277;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
}

.permission-role-chip:first-child {
  border-left-width: 1px;
}

.permission-role-chip.active {
  background: #ffffff;
  color: #2c3340;
}

.permission-action-strip .permission-role-chip.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 14px;
  height: 14px;
  border-right: 1px solid #c7cbd0;
  border-bottom: 1px solid #c7cbd0;
  background: #ffffff;
  transform: translateX(-50%) rotate(45deg);
}

.permission-save-role {
  min-height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #2c3340 !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  text-decoration: underline !important;
}

.permissions-table-shell {
  overflow-x: auto;
}

.permissions-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.permissions-table th {
  height: 54px;
  padding: 0 16px;
  border-top: 1px solid #e1e6eb;
  border-bottom: 1px solid #e1e6eb;
  border-right: 1px solid #e1e6eb;
  color: #8b949e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.permissions-table td {
  height: 86px;
  padding: 0 16px;
  border-bottom: 1px solid #e1e6eb;
  border-right: 1px solid #edf1f4;
  color: #1f2937;
  font-size: 18px;
  vertical-align: middle;
}

.permissions-table tr:hover td {
  background: #edf4ff;
}

.permission-ladder {
  position: relative;
  display: inline-grid;
  grid-template-rows: repeat(4, 18px);
  width: 46px;
  min-height: 80px;
  align-items: center;
  justify-items: center;
  padding: 5px 0;
}

.permission-ladder::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 50%;
  width: 2px;
  background: #c9cdd1;
  transform: translateX(-50%);
}

.permission-level {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 18px;
  cursor: pointer;
}

.permission-level input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.permission-level span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 15px;
  border: 2px solid #c9cdd1;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transform: translate(-50%, -50%);
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.permission-level:hover span {
  border-color: #8ea4bd;
  transform: translate(-50%, -50%) scale(1.08);
}

.permission-level input:checked + span {
  border-color: #c9cdd1;
  box-shadow: inset 0 0 0 2px #ffffff, 0 1px 2px rgba(15, 23, 42, 0.16);
}

.permission-level-red input:checked + span {
  background: #f26f6f;
}

.permission-level-green input:checked + span {
  background: #6d9b42;
}

.permission-level-blue input:checked + span {
  background: #2d86c8;
}

.permission-level-gold input:checked + span {
  background: #d8a227;
}

.permission-legend {
  min-width: 155px;
  color: #9aa1a9 !important;
  font-size: 14px !important;
  line-height: 1.2;
}

.users-settings-layout .user-metrics {
  margin-top: 0;
  padding: 22px 34px;
  background: #ffffff;
  border: 1px solid #e1e6eb;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.users-settings-layout .employee-photo-small {
  width: 170px;
  height: 170px;
}

.employee-profile-block .compact-photo-form {
  justify-items: center;
}

.users-settings-layout .employee-entity-head h2 {
  font-size: 34px;
}

.users-settings-layout .employee-entity-head p {
  font-size: 22px;
}

.photo-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d8dfe6;
  border-radius: 3px;
  background: #ffffff;
  color: #0057b8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.photo-upload-button input {
  display: none;
}

.photo-upload-button:hover {
  border-color: #b8c7d6;
  background: #f4f8ff;
}

.section-intro {
  padding: 16px 18px 14px;
  background: #ffffff;
}

.section-intro h1 {
  margin: 0 0 6px;
  color: #1f2937;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
}

.section-intro p {
  margin: 0;
  color: #607181;
  font-size: 14px;
  line-height: 1.35;
}

.hr-doc-generator-block {
  margin: 0 0 16px;
}

.hr-doc-generator {
  grid-template-columns: 170px minmax(0, 1fr);
}

.document-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px 14px;
  width: 100%;
}

.document-check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #303946;
  font-size: 14px;
  line-height: 1.2;
}

.document-check-grid .document-unavailable {
  color: #8d969f;
}

.document-check-grid .document-unavailable span {
  text-decoration: none;
}

.document-check-grid input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.document-check-grid small {
  color: #8d969f;
  font-size: 12px;
}

.document-check-all {
  color: #0057b8 !important;
  font-weight: 700;
}

.generated-document-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 14px;
  padding: 0 16px;
  border: 1px solid #d8dfe6;
  border-radius: 3px;
  background: #ffffff;
  color: #0057b8;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.generated-document-link:hover {
  border-color: #b8c7d6;
  background: #f4f8ff;
}

.hr-document-drawer {
  width: min(1060px, calc(100vw - 72px));
}

.hr-document-drawer .employee-card {
  margin-bottom: 22px;
}

.employee-file-page {
  display: grid;
  gap: 18px;
  padding: 22px 30px 56px;
}

.employee-file-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.employee-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 36px;
  color: #8c98a3;
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
}

.employee-back-link:hover {
  color: #0057b8;
}

.employee-file-header h1 {
  margin: 0;
  color: #263241;
  font-size: 24px;
  font-weight: 400;
}

.employee-file-header p {
  margin: 4px 0 0;
  color: #8b959e;
  font-size: 14px;
}

.employee-file-top-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.employee-profile-summary {
  min-height: 100%;
}

.employee-profile-summary .employee-profile-block {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 16px;
  margin: 0;
  padding: 28px 18px;
  text-align: center;
}

.employee-profile-summary .employee-photo-small {
  width: 126px;
  height: 126px;
}

.employee-profile-summary .employee-entity-head {
  min-width: 0;
  margin: 0;
}

.employee-profile-summary .employee-entity-head h2 {
  max-width: 100%;
  margin-bottom: 8px;
  font-size: 25px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.employee-profile-summary .employee-entity-head p {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.25;
}

.employee-profile-summary .employee-entity-head small {
  display: block;
  margin-top: 8px;
  color: #8b959e;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.employee-storage-summary {
  display: grid;
  gap: 5px;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid #e5ebf0;
  text-align: left;
}

.employee-storage-summary span {
  color: #8d969f;
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.employee-storage-summary code {
  color: #303946;
  font-family: inherit;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.employee-identity-panel {
  min-width: 0;
}

.identity-panel-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(420px, 1fr);
  gap: 24px;
  align-items: start;
}

.identity-confirm-form {
  grid-template-columns: 150px minmax(0, 1fr);
}

.identity-save-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-left: 150px;
}

.identity-save-actions .primary-button,
.identity-save-actions .soft-button {
  min-width: 150px;
}

.identity-files-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.identity-file-fields {
  display: grid;
  gap: 10px;
}

.identity-file-fields input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d6e0e8;
  background: #ffffff;
}

.identity-file-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.identity-file-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.identity-file-link {
  display: block;
  color: #0057b8;
  font-size: 13px;
  text-decoration: none;
}

.identity-read-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.ocr-message {
  margin: 12px 0 0;
  color: #7f8b95;
  font-size: 14px;
  line-height: 1.45;
}

.ocr-details {
  margin-top: 12px;
  border-top: 1px solid #e6ebef;
  padding-top: 10px;
  color: #2f3744;
}

.ocr-details summary {
  cursor: pointer;
  color: #0057b8;
  font-size: 14px;
}

.ocr-details pre {
  max-height: 220px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  background: #f7f9fb;
  border: 1px solid #e1e8ef;
  white-space: pre-wrap;
}

.document-check-group {
  grid-column: 1 / -1;
  padding-top: 8px;
  color: #8d969f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.document-list-head {
  position: relative;
  min-height: 58px;
}

@keyframes bulkIn {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes bulkOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(36px); }
}

.document-group-table {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.document-group-table h4 {
  margin: 0;
  color: #303946;
  font-size: 18px;
  font-weight: 400;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 10px 0 12px;
}

.bulk-actions[hidden] {
  display: none;
}

.amo-table .table-action-row th {
  display: block;
  height: 43px;
  padding: 0;
  background: #eef4fb;
  border-right: 0;
  border-bottom: 1px solid #dfe7ee;
  text-align: left;
  animation: bulkIn 220ms ease both;
}

.crm-table .table-action-row th {
  height: 43px;
  padding: 0;
  background: #eef4fb;
  border-right: 0;
  border-bottom: 1px solid #dfe7ee;
  text-align: left;
  animation: bulkIn 220ms ease both;
}

.amo-table .table-action-row .bulk-check-cell {
  display: none;
}

.crm-table .table-action-row .bulk-check-cell {
  width: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-left: 4px solid #1d9de8;
  text-align: center;
}

.amo-table .table-action-row.is-leaving th {
  animation: bulkOut 220ms ease both;
}

.crm-table .table-action-row.is-leaving th {
  animation: bulkOut 220ms ease both;
}

.table-bulk-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 43px;
  padding: 0 18px;
  color: #8a9299;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.amo-table .table-action-row,
.crm-table .table-action-row {
  position: absolute;
  top: 0;
  left: 54px;
  right: 0;
  z-index: 4;
  display: block;
  height: 43px;
  overflow: hidden;
  border-left: 4px solid #1d9de8;
}

.amo-table .table-action-row[hidden],
.crm-table .table-action-row[hidden] {
  display: none;
}

.table-bulk-actions form {
  margin: 0;
}

.table-action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 43px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8a9299;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: color 140ms ease, transform 140ms ease;
}

.table-action-button:hover {
  color: #303946;
  background: transparent;
  transform: translateY(-1px);
}

.table-action-button:disabled {
  color: #c1c8cf;
  cursor: default;
  transform: none;
}

.table-action-button.action-open .table-action-icon,
.table-action-button[data-bulk-open] .table-action-icon {
  color: #6f8799;
}

.table-action-button.action-export .table-action-icon,
.table-action-button[data-bulk-export] .table-action-icon,
form[action*="/download"] .table-action-button .table-action-icon {
  color: #1d9de8;
}

.table-action-button[data-bulk-copy] .table-action-icon {
  color: #7aaf3f;
}

.table-action-button.action-archive .table-action-icon,
form[action*="/archive"] .table-action-button .table-action-icon,
form[action*="/regenerate"] .table-action-button .table-action-icon {
  color: #7aaf3f;
}

.table-action-button.action-delete .table-action-icon,
.table-action-button.danger .table-action-icon,
form[action*="/delete"] .table-action-button .table-action-icon {
  color: #ff5a52;
}

.table-action-button.action-clear .table-action-icon,
.table-action-button[data-bulk-clear] .table-action-icon {
  color: #303946;
}

.table-action-button.action-export:hover,
.table-action-button[data-bulk-export]:hover,
form[action*="/download"] .table-action-button:hover {
  color: #117fc1;
}

.table-action-button.action-archive:hover,
form[action*="/archive"] .table-action-button:hover,
form[action*="/regenerate"] .table-action-button:hover {
  color: #4f8424;
}

.table-action-button.danger:hover,
form[action*="/delete"] .table-action-button:hover {
  color: #d34a4a;
}

.table-action-button:disabled .table-action-icon {
  color: #c1c8cf;
}

.table-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  color: currentColor;
  font-size: 16px;
  line-height: 1;
}

.amo-table input[type="checkbox"][data-bulk-select],
.amo-table input[type="checkbox"][data-bulk-select-all],
.amo-table input[type="checkbox"][data-generic-bulk-visible-checkbox],
.crm-table input[type="checkbox"][data-bulk-select],
.crm-table input[type="checkbox"][data-bulk-select-all],
.crm-table input[type="checkbox"][data-generic-bulk-visible-checkbox] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #4b86e8;
  cursor: pointer;
}

.amo-table tr.bulk-selected td,
.crm-table tr.bulk-selected td {
  background: #eef4ff;
}

.bulk-result-message {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 4px solid #1d9de8;
  background: #eef7ff;
  color: #303946;
  font-size: 14px;
}

.bulk-result-success {
  border-left-color: #7aaf3f;
  background: #f0f8ea;
}

.bulk-result-warning {
  border-left-color: #f0a429;
  background: #fff7e8;
}

.entity-asset-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.entity-assets-panel {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e4e8ec;
}

.entity-assets-panel h3 {
  margin: 0 0 4px;
  color: #303946;
  font-size: 17px;
}

.entity-assets-panel p {
  margin: 0;
  color: #7c8794;
  font-size: 14px;
}

.entity-assets-panel-muted {
  color: #7c8794;
}

.entity-asset-form {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
}

.entity-asset-label {
  color: #303946;
  font-size: 15px;
}

.entity-asset-field img {
  width: 96px;
  height: 56px;
  object-fit: contain;
  border: 1px solid #dfe5eb;
  border-radius: 4px;
  background: #f8fafc;
  padding: 6px;
}

.entity-asset-field input[type="file"] {
  min-width: 0;
}

.commercial-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.metric-card {
  border: 1px solid #dfe5eb;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.metric-card span {
  display: block;
  color: #7c8794;
  font-size: 13px;
  margin-bottom: 8px;
}

.metric-card strong {
  color: #202833;
  font-size: 22px;
}

.commercial-position-form {
  margin-top: 16px;
  border-top: 1px solid #dfe5eb;
  padding-top: 16px;
}

.commercial-account-overlay {
  position: fixed;
  inset: 0 0 0 337px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding-bottom: 172px;
  background: #ffffff;
  color: #2f3843;
  box-shadow: -10px 0 22px rgba(15, 23, 42, 0.14);
  animation: user-drawer-in 460ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.commercial-account-overlay.is-closing {
  animation: user-drawer-out 560ms cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}

.commercial-account-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid #e7ebef;
  background: #f7f8fa;
}

.commercial-account-close {
  position: fixed;
  top: 0;
  left: 265px;
  z-index: 86;
  display: grid;
  place-items: center;
  width: 72px;
  height: 82px;
  border-right: 1px solid #d5dbe1;
  background: #e2e6ea;
  color: #303946;
  text-decoration: none;
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
}

.commercial-account-close:hover {
  background: #d9dee4;
}

.commercial-account-head h2 {
  margin: 0;
  padding: 0 28px 4px;
  color: #8a9097;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
}

.commercial-account-head h2 [contenteditable="true"] {
  display: inline-block;
  min-width: 108px;
  padding: 2px 4px;
  border-radius: 4px;
  color: #303946;
  outline: 0;
}

.commercial-account-head h2 [contenteditable="true"]:focus {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #78b6f7;
}

.commercial-account-statusline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0 28px;
  color: #7e8994;
  font-size: 13px;
}

.commercial-account-statusline strong {
  color: #3f4a56;
  font-weight: 400;
}

.commercial-account-form {
  min-width: 0;
}

.commercial-account-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px 18px;
  padding: 18px 28px 20px;
  border-bottom: 1px solid #edf0f3;
  background: #ffffff;
}

.commercial-account-meta label,
.commercial-account-comments label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #7b858e;
  font-size: 13px;
  line-height: 1.2;
}

.commercial-account-meta input,
.commercial-account-meta select,
.commercial-account-comments input,
.commercial-account-add-row input,
.commercial-account-add-row select {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid #d7dde3;
  border-radius: 3px;
  background: #ffffff;
  color: #303946;
  font: inherit;
  padding: 0 10px;
  box-sizing: border-box;
}

.commercial-account-meta input:focus,
.commercial-account-meta select:focus,
.commercial-account-comments input:focus,
.commercial-account-add-row input:focus,
.commercial-account-add-row select:focus {
  outline: 0;
  border-color: #78b6f7;
  box-shadow: 0 0 0 2px rgba(78, 151, 238, 0.16);
}

.commercial-account-party {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr);
  gap: 28px;
  padding: 14px 28px;
  border-bottom: 1px solid #edf0f3;
}

.commercial-account-party div {
  display: grid;
  gap: 6px;
  align-content: start;
}

.party-search-wrap {
  position: relative;
}

.party-inline-select,
.party-inline-search {
  width: max-content;
  max-width: 100%;
  border: 0;
  border-bottom: 1px dashed #9aa7b3;
  border-radius: 0;
  background: transparent;
  color: #303946;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 0 18px 2px 0;
  outline: 0;
}

.party-inline-search {
  display: block;
  min-width: 220px;
}

.party-inline-settings {
  display: flex !important;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.party-inline-settings .party-inline-select {
  font-size: 13px;
  font-weight: 400;
  color: #737f8a;
}

.party-inline-select:focus,
.party-inline-search:focus {
  border-bottom-color: #4b86e8;
}

.party-autocomplete {
  left: 0;
  top: calc(100% + 3px);
  width: min(460px, 70vw);
}

.commercial-account-party span {
  color: #8a949d;
  font-size: 13px;
}

.commercial-account-party strong {
  color: #303946;
  font-size: 15px;
  font-weight: 500;
}

.commercial-account-party small {
  color: #737f8a;
  font-size: 13px;
  line-height: 1.35;
}

.commercial-account-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border-bottom: 1px solid #edf0f3;
  flex: 0 0 auto;
}

.commercial-account-table {
  width: 100%;
  min-width: 1760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.commercial-account-table th {
  position: relative;
  height: 40px;
  padding: 0 10px;
  border-bottom: 1px solid #dfe5ea;
  background: #ffffff;
  color: #8d969f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
}

.column-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  bottom: 0;
  z-index: 3;
  width: 8px;
  cursor: col-resize;
  touch-action: none;
}

.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 3px;
  bottom: 8px;
  width: 1px;
  background: transparent;
}

.column-resize-handle:hover::after,
.column-resize-handle.is-resizing::after {
  background: #4f86e8;
}

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

.commercial-account-table td {
  height: 50px;
  padding: 8px 10px;
  border-bottom: 1px solid #edf0f3;
  color: #303946;
  font-size: 14px;
  vertical-align: middle;
}

.commercial-account-table tbody tr:hover td {
  background: #f3f8ff;
}

.commercial-account-table input,
.commercial-account-table select {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid #d7dde3;
  border-radius: 3px;
  background: #ffffff;
  color: #303946;
  font: inherit;
  padding: 0 8px;
  box-sizing: border-box;
}

.commercial-account-table tbody tr:hover input,
.commercial-account-table tbody tr:hover select,
.commercial-account-table input:focus,
.commercial-account-table select:focus {
  background: #f3f8ff;
}

.commercial-account-table input,
.commercial-account-table select,
.commercial-draft-row input,
.commercial-draft-row select {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.commercial-account-table input:focus,
.commercial-account-table select:focus,
.commercial-draft-row input:focus,
.commercial-draft-row select:focus {
  outline: 0;
  border-color: transparent;
  box-shadow: inset 0 -1px 0 #7fb3f7;
}

.commercial-account-table input[type="number"]::-webkit-outer-spin-button,
.commercial-account-table input[type="number"]::-webkit-inner-spin-button,
.commercial-draft-row input[type="number"]::-webkit-outer-spin-button,
.commercial-draft-row input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.commercial-account-table input[type="number"],
.commercial-draft-row input[type="number"] {
  appearance: textfield;
}

.commercial-account-table th:nth-child(1),
.commercial-account-table td:nth-child(1) { width: 28px; padding-left: 6px; padding-right: 0; text-align: left; vertical-align: middle; }
.commercial-account-table th:nth-child(2),
.commercial-account-table td:nth-child(2) { width: 105px; }
.commercial-account-table th:nth-child(3),
.commercial-account-table td:nth-child(3) { width: 88px; }
.commercial-account-table th:nth-child(4),
.commercial-account-table td:nth-child(4) { width: 360px; }
.commercial-account-table th:nth-child(5),
.commercial-account-table td:nth-child(5) { width: 135px; }
.commercial-account-table th:nth-child(6),
.commercial-account-table td:nth-child(6) { width: 150px; }
.commercial-account-table th:nth-child(7),
.commercial-account-table td:nth-child(7) { width: 105px; }
.commercial-account-table th:nth-child(8),
.commercial-account-table td:nth-child(8) { width: 130px; }
.commercial-account-table th:nth-child(9),
.commercial-account-table td:nth-child(9) { width: 140px; }
.commercial-account-table th:nth-child(10),
.commercial-account-table td:nth-child(10) { width: 105px; }
.commercial-account-table th:nth-child(11),
.commercial-account-table td:nth-child(11) { width: 105px; }
.commercial-account-table th:nth-child(12),
.commercial-account-table td:nth-child(12) { width: 115px; }
.commercial-account-table th:nth-child(13),
.commercial-account-table td:nth-child(13) { width: 110px; }
.commercial-account-table th:nth-child(14),
.commercial-account-table td:nth-child(14) { width: 92px; }

.commercial-account-table td:nth-child(2),
.commercial-account-table td:nth-child(4) {
  overflow-wrap: anywhere;
}

.commercial-account-table .position-title,
.commercial-account-table td small {
  display: block;
}

.commercial-account-table .position-title {
  font-weight: 500;
}

.commercial-account-table td small {
  margin-top: 3px;
  color: #7b858e;
  font-size: 12px;
  line-height: 1.3;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.commercial-empty-row td {
  height: 72px;
  color: #8a949d;
  text-align: center;
}

.commercial-draft-row input,
.commercial-draft-row select {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #d7dde3;
  border-radius: 3px;
  background: #ffffff;
  color: #303946;
  font: inherit;
  padding: 0 8px;
  box-sizing: border-box;
}

.commercial-draft-row td:not(.commercial-search-cell) > * {
  visibility: hidden;
  pointer-events: none;
}

.commercial-draft-row td.num {
  color: transparent;
}

.commercial-draft-row .commercial-search-cell input {
  box-shadow: inset 0 -1px 0 #cfd6dd;
}

.commercial-draft-row .commercial-search-cell input:focus {
  box-shadow: inset 0 -1px 0 #7fb3f7;
}

.commercial-account-table input,
.commercial-account-table select,
.commercial-draft-row input,
.commercial-draft-row select {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.compound-cell {
  display: grid;
  grid-template-columns: minmax(24px, max-content) minmax(52px, max-content);
  gap: 0;
  justify-content: start;
  align-items: center;
}

.clean-compound {
  width: 100%;
}

.clean-compound input,
.clean-compound select {
  border: 0;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}

.clean-compound select {
  width: auto;
  min-width: 52px;
  padding-left: 6px;
}

.clean-compound input {
  width: 32px;
  min-width: 24px;
  text-align: right;
}

.commercial-search-cell {
  position: relative;
}

.commercial-autocomplete {
  position: absolute;
  top: calc(100% - 2px);
  left: 10px;
  z-index: 260;
  width: min(560px, 80vw);
  max-height: 420px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #cfd6dd;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.commercial-autocomplete.is-floating {
  position: fixed;
  z-index: 10000;
}

.commercial-autocomplete-item {
  display: grid;
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  border-radius: 0;
  background: #ffffff;
  color: #303946;
  font: inherit;
  text-align: left;
}

.commercial-autocomplete-item:hover {
  background: #f7f9fb;
}

.commercial-autocomplete-item:focus,
.commercial-autocomplete-item:active {
  outline: 0;
  background: #f7f9fb;
  color: #303946;
}

.commercial-autocomplete-item strong {
  font-weight: 400;
}

.commercial-autocomplete-item span {
  color: #7b858e;
  font-size: 12px;
}

.commercial-autocomplete-item:focus span,
.commercial-autocomplete-item:active span {
  color: #7b858e;
}

.commercial-icon-delete {
  width: 24px;
  height: 100%;
  justify-content: flex-start;
  color: #ff5b5b !important;
  font-size: 13px;
  opacity: .88;
}

.commercial-trash-icon {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 11px;
  margin-left: 1px;
  border: 1px solid #ff5b5b;
  border-top: 0;
  border-radius: 0 0 1px 1px;
}

.commercial-trash-icon::before {
  content: "";
  position: absolute;
  left: -2px;
  top: -3px;
  width: 12px;
  height: 1px;
  background: #ff5b5b;
}

.commercial-trash-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: -6px;
  width: 4px;
  height: 3px;
  border: 1px solid #ff5b5b;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.commercial-icon-params {
  color: #3f7cd8 !important;
}

.commercial-status-pill,
.commercial-status-select {
  height: 30px;
  min-width: 112px;
  border: 1px solid #d7dde3;
  border-radius: 3px;
  background: #ffffff;
  padding: 0 10px;
  color: #303946;
  font: inherit;
}

.commercial-account-table .commercial-status-badge-select {
  display: inline-flex;
  width: auto;
  min-width: 0;
  height: 26px;
  border: 0;
  border-radius: 4px;
  padding: 4px 26px 4px 11px;
  font-size: 15px;
  line-height: 1.1;
  appearance: auto;
}

.is-not-applicable {
  color: #a0a8b1;
}

.commercial-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 30, 0.42);
}

.commercial-preview-shell {
  width: min(980px, calc(100vw - 42px));
  height: min(92vh, 980px);
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
}

.commercial-preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid #e4e8ec;
}

.commercial-preview-actions button,
.commercial-preview-actions a {
  border: 0;
  background: transparent;
  color: #3567b2;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.commercial-preview-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.commercial-param-shell {
  width: min(760px, calc(100vw - 42px));
  max-height: 90vh;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  border-radius: 8px;
  overflow: auto;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
}

.commercial-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.commercial-param-grid label {
  display: grid;
  gap: 7px;
  color: #596572;
  font-size: 13px;
}

.commercial-param-grid input,
.commercial-param-grid select,
.commercial-param-grid textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d7dde3;
  border-radius: 4px;
  padding: 8px;
  font: inherit;
}

.commercial-param-wide {
  grid-column: 1 / -1;
}

.commercial-config-card {
  display: grid;
  gap: 12px;
}

.commercial-inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 90px auto;
  gap: 10px;
  align-items: end;
}

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

.drawer-subtable {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.drawer-subtable h3 {
  margin: 0;
  color: #2f3744;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.commercial-config-card label {
  display: grid;
  gap: 6px;
  color: #596572;
  font-size: 13px;
}

.commercial-config-card input,
.commercial-config-card select,
.commercial-config-card textarea {
  width: 100%;
  border: 1px solid #d7dde3;
  border-radius: 4px;
  padding: 8px;
  font: inherit;
}

.commercial-option-list,
.commercial-option-checkboxes { display: none; }

.commercial-multiselect {
  position: relative;
  width: 100%;
}

button.commercial-multiselect-button,
button.commercial-multiselect-button:hover,
button.commercial-multiselect-button:focus,
button.commercial-multiselect-button:active {
  display: flex !important;
  width: 100% !important;
  min-height: 40px !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px 36px 8px 10px !important;
  border: 1px solid #d7dde3 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  color: #303946 !important;
  box-shadow: none !important;
  transform: none !important;
  font: inherit !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
}

.commercial-multiselect-button::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid #607181;
  border-bottom: 1px solid #607181;
  transform: translateY(-65%) rotate(45deg);
}

.commercial-multiselect:not(.has-value) .commercial-multiselect-button {
  color: #8a949d !important;
}

.commercial-multiselect-menu {
  position: absolute;
  z-index: 10030;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  max-height: 220px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d7dde3;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(18, 30, 42, 0.16);
}

.commercial-multiselect-option {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px !important;
  min-height: 36px;
  padding: 7px 10px;
  color: #303946 !important;
  font-size: 14px !important;
  cursor: pointer;
}

.commercial-multiselect-option::before {
  content: "";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #cfd6dd;
  border-radius: 3px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
}

.commercial-multiselect-option:has(input:checked)::before {
  content: "✓";
  border-color: #4f86e8;
  background: #4f86e8;
}

.commercial-multiselect-option:hover {
  background: #f0f6ff;
}

.commercial-multiselect-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.commercial-account-add-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) 100px minmax(190px, 1.3fr) minmax(180px, 1fr) 130px 130px 130px 130px 90px 80px 105px 105px 150px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  padding: 12px 28px;
  border-bottom: 1px solid #edf0f3;
  background: #fafbfc;
}

.commercial-account-add-row .primary-button {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.commercial-account-totals {
  display: grid;
  gap: 8px;
  width: min(430px, calc(100% - 56px));
  justify-self: end;
  margin: 72px 28px 10px auto;
  color: #596572;
}

.commercial-account-totals div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 18px;
}

.commercial-account-totals strong {
  color: #303946;
  font-variant-numeric: tabular-nums;
}

.commercial-account-totals .total-final {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #dfe5eb;
  color: #303946;
  font-size: 17px;
  font-weight: 800;
}

.commercial-account-comments {
  position: fixed;
  right: 0;
  bottom: 68px;
  left: 337px;
  z-index: 84;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 18px;
  padding: 12px 28px;
  border-top: 1px solid #e4e8ec;
  background: #ffffff;
  box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.04);
}

.commercial-account-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 337px;
  z-index: 85;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 68px;
  padding: 12px 28px;
  border-top: 1px solid #e4e8ec;
  background: #ffffff;
  box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.06);
}

.commercial-account-footer .soft-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.commercial-account-footer .primary-button:disabled,
.commercial-account-footer .primary-button[aria-disabled="true"] {
  background: #ffffff !important;
  border-color: #dfe5eb !important;
  color: #8d969f !important;
  cursor: default !important;
  opacity: 1 !important;
}

@keyframes commercial-account-in {
  from { transform: translateX(-34px); }
  to { transform: translateX(0); }
}

@keyframes commercial-account-out {
  from { transform: translateX(0); }
  to { transform: translateX(-42px); }
}

@media (max-width: 760px) {
  .entity-asset-form {
    grid-template-columns: 1fr;
  }

  .commercial-account-overlay {
    inset: 0 0 0 72px;
  }

  .commercial-account-close {
    left: 16px;
    width: 56px;
    height: 72px;
    font-size: 40px;
  }

  .commercial-account-footer {
    left: 72px;
  }

  .commercial-account-comments {
    left: 72px;
  }

  .commercial-account-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .commercial-account-head h2 {
    padding: 0 16px 4px;
    font-size: 19px;
  }

  .commercial-account-statusline,
  .commercial-account-meta,
  .commercial-account-party,
  .commercial-account-comments,
  .commercial-account-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .commercial-account-party,
  .commercial-account-comments {
    grid-template-columns: 1fr;
  }

  .commercial-account-add-row {
    padding-left: 16px;
    padding-right: 16px;
  }

  .commercial-account-totals {
    width: calc(100% - 32px);
    margin-right: 16px;
  }
}

.document-table {
  min-width: 980px;
}

.onboarding-page {
  max-width: 1480px;
}

.onboarding-main-card {
  display: grid;
  gap: 24px;
}

.onboarding-main-card .employee-profile-block {
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  margin: 0;
}

.onboarding-avatar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #e5effd;
  color: #4b86e8;
  font-size: 32px;
  font-weight: 700;
}

.onboarding-form-grid {
  grid-template-columns: 170px minmax(220px, 1fr) 170px minmax(220px, 1fr);
  gap: 16px 22px;
}

.onboarding-save-actions,
.onboarding-complete-card form {
  display: flex;
  align-items: center;
  gap: 14px;
}

.onboarding-identity-grid {
  grid-template-columns: minmax(280px, 440px) minmax(520px, 1fr);
}

.onboarding-complete-card {
  display: grid;
  gap: 14px;
}

.file-manager-page {
  max-width: none;
}

.file-manager-toolbar {
  display: grid;
  gap: 18px;
}

.file-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: #8d969f;
  font-size: 16px;
}

.file-breadcrumbs a {
  color: #0057b8;
  text-decoration: none;
}

.file-breadcrumbs a:hover {
  text-decoration: underline;
}

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

.file-inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.file-inline-form input[type="text"],
.file-inline-form input:not([type]) {
  min-height: 42px;
  min-width: 220px;
  padding: 9px 12px;
  border: 1px solid #d6e0e8;
  background: #ffffff;
  color: #243141;
  font: inherit;
}

.file-upload-form input[type="file"] {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #d6e0e8;
  background: #ffffff;
}

.file-manager-table {
  min-width: 920px;
}

.file-name-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.file-row-icon {
  color: #8d969f;
  font-size: 15px;
}

.inline-upload {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-upload input {
  max-width: 170px;
  font-size: 12px;
}

.inline-upload button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.document-preview-modal {
  position: fixed;
  top: 24px;
  bottom: 24px;
  left: 50%;
  width: min(780px, calc(100vw - 96px));
  transform: translateX(-50%);
  z-index: 90;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  border: 1px solid #dfe5eb;
  background: #eef1f4;
  box-shadow: 0 10px 38px rgba(15, 23, 42, 0.26);
}

.document-preview-modal[hidden] {
  display: none;
}

.document-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px 0 14px;
  border-bottom: 1px solid #dfe5eb;
  background: #fff;
}

.document-preview-title {
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.document-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.document-preview-actions .table-action-button {
  min-height: 30px;
  padding: 0 10px;
  text-decoration: none;
}

.document-preview-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #69747d;
  font-size: 26px;
  line-height: 1;
}

.document-preview-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #eef1f4;
}

.document-upload-grid {
  display: grid;
  gap: 10px;
}

.upload-line {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f4;
}

.upload-line span {
  color: #303946;
  font-size: 15px;
}

.upload-line input {
  min-width: 0;
}

.uploaded-files {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.uploaded-files a {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  border-bottom: 1px solid #edf1f4;
  color: #0057b8;
  text-decoration: none;
}

.uploaded-files a:hover {
  background: #f0f6ff;
}

.uploaded-files span,
.uploaded-files small {
  color: #8d969f;
  font-size: 12px;
}

.uploaded-files strong {
  overflow: hidden;
  color: #303946;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .employee-file-top-grid,
  .identity-panel-grid {
    grid-template-columns: 1fr;
  }

  .employee-profile-summary {
    min-height: auto;
  }

  .users-settings-layout .employee-drawer {
    width: calc(100vw - 72px);
    padding: 22px;
  }

  .users-settings-layout .employee-card {
    padding: 24px;
  }
}

@media (max-width: 760px) {
  .employee-file-page {
    padding: 16px 14px 40px;
  }

  .identity-confirm-form {
    grid-template-columns: 1fr;
  }

  .identity-save-actions {
    padding-left: 0;
    flex-wrap: wrap;
  }
}

/* Global amoCRM-like surfaces and controls */
.form-shell,
.table-shell,
.cards article,
.progress-card,
.employee-card,
.amo-section,
.login-panel,
.ops-table-shell,
.crm-table-shell,
.users-table-shell,
.alert {
  background: #ffffff;
  border: 1px solid #e6eaee;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.form-shell,
.table-shell,
.users-table-shell {
  padding: 16px 18px;
}

.cards article,
.progress-card,
.employee-card {
  border-radius: 2px;
}

.user-metrics article {
  border-radius: 2px;
  box-shadow: none;
}

.collapse-section summary,
.section-band,
.month-group,
.year-group {
  border-radius: 2px 2px 0 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.collapse-section .table-shell {
  border-top: 0;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

select,
input,
textarea,
button,
.primary-button,
.button-secondary,
.soft-button,
.table-action,
.state-button,
.ops-action,
.action-toggle,
.cell-input,
.employee-card input,
.employee-card select,
.employee-card textarea,
.drawer-form input,
.drawer-form select,
.drawer-form textarea {
  border-radius: 3px;
}

select,
input,
textarea,
.cell-input,
.employee-card input,
.employee-card select,
.employee-card textarea,
.drawer-form input,
.drawer-form select,
.drawer-form textarea {
  border-color: #d8dfe6;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

select:focus,
input:focus,
textarea:focus,
.cell-input:focus,
.employee-card input:focus,
.employee-card select:focus,
.employee-card textarea:focus,
.drawer-form input:focus,
.drawer-form select:focus,
.drawer-form textarea:focus {
  border-color: #0b66d8;
  box-shadow: 0 0 0 1px #0b66d8;
  outline: 0;
}

.toggle-field {
  gap: 10px;
  min-height: 28px;
}

.toggle-switch,
.status-toggle {
  position: relative;
  width: 44px;
  height: 22px;
  flex: 0 0 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.toggle-switch::before,
.status-toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8px;
  right: 8px;
  height: 2px;
  transform: translateY(-50%);
  background: #60717b;
}

.toggle-switch::after,
.status-toggle span {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  border: 2px solid #60717b;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: none;
  transform: translateY(-50%);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.toggle-field input:checked + .toggle-switch,
.status-toggle.on,
.status-toggle.off {
  border-color: transparent;
  background: transparent;
}

.toggle-field input:checked + .toggle-switch::before,
.status-toggle.on::before {
  background: #4f86e8;
}

.toggle-field input:checked + .toggle-switch::after,
.status-toggle.on span {
  border-color: #4f86e8;
  background: #4f86e8;
  transform: translate(22px, -50%);
}

.status-toggle.off::before {
  background: #60717b;
}

.primary-button,
.button-secondary,
.soft-button,
.table-action,
.state-button,
.ops-action {
  box-shadow: none;
}

.mini-payment-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 20px;
  min-width: 42px;
  padding: 0;
  border: 1px solid #b8c2cc;
  border-radius: 999px;
  background: #d4dbe2;
  vertical-align: middle;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.08);
}

.mini-payment-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.28);
  transform: translateY(-50%);
  transition: transform 160ms ease;
}

.mini-payment-toggle.is-on {
  border-color: #4f86e8;
  background: #4f86e8;
}

.mini-payment-toggle.is-on::after {
  transform: translate(20px, -50%);
}

.status-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 11px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;
}

.status-paid {
  background: #b8ff4d;
  color: #243041;
}

.status-overdue {
  background: #f9d2d5;
  color: #303946;
}

.status-upcoming {
  background: #d8e8ff;
  color: #303946;
}

select.status-label.commercial-status-select {
  width: auto;
  min-width: 0;
  height: 26px;
  border: 0;
  padding: 4px 28px 4px 11px;
  font-size: 15px;
  line-height: 1.1;
}

select.status-label.commercial-status-select.status-paid {
  background-color: #b8ff4d;
  color: #243041;
}

select.status-label.commercial-status-select.status-overdue {
  background-color: #f9d2d5;
  color: #303946;
}

select.status-label.commercial-status-select.status-upcoming {
  background-color: #d8e8ff;
  color: #1d5fbf;
}

/* Global amoCRM table typography */
table:not(.attendance-table) th,
.crm-table th,
.amo-table th,
.users-table th {
  height: 43px;
  padding: 0 12px;
  background: #ffffff;
  color: #8d969f;
  border: 0;
  border-right: 1px solid #e4e8ec;
  border-bottom: 1px solid #e1e6eb;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.85px;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

table:not(.attendance-table) th:first-child,
.crm-table th:first-child,
.amo-table th:first-child,
.users-table th:first-child {
  border-left: 1px solid #edf0f3;
}

table:not(.attendance-table) th:last-child,
.crm-table th:last-child,
.amo-table th:last-child,
.users-table th:last-child {
  border-right: 0;
}

table:not(.attendance-table) td,
.crm-table td,
.amo-table td,
.users-table td {
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid #e7ebef;
  background: #ffffff;
  color: #303946;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  vertical-align: middle;
}

table:not(.attendance-table) tbody tr:hover td,
.crm-table tbody tr:hover td,
.amo-table tbody tr:hover td,
.users-table tbody tr:hover td {
  background: #f0f6ff;
}

.drawer-actions button:disabled,
.form-shell button:disabled,
.employee-card button:disabled,
.employee-drawer button:disabled {
  background: #ffffff;
  border-color: #dfe5eb;
  color: #8d969f;
  cursor: default;
  opacity: 1;
}

.employee-drawer.is-dirty .drawer-actions button:not(:disabled),
.form-shell.is-dirty .drawer-actions button:not(:disabled),
.employee-card.is-dirty .drawer-actions button:not(:disabled) {
  background: #4f86e8;
  border-color: #4077d6;
  color: #ffffff;
}

button:not(.mini-payment-toggle):not(.toggle-switch):not(.status-toggle):not(.action-toggle):not(.amo-section-title):not(.table-action-button),
.primary-button,
.button-secondary,
.soft-button,
.table-action,
.state-button,
.ops-action,
.actions a {
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid #4077d6;
  border-radius: 3px;
  background: #4f86e8;
  color: #ffffff;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
}

button:not(.mini-payment-toggle):not(.toggle-switch):not(.status-toggle):not(.action-toggle):not(.amo-section-title):not(.table-action-button):hover,
.primary-button:hover,
.button-secondary:hover,
.soft-button:hover,
.table-action:hover,
.state-button:hover,
.ops-action:hover,
.actions a:hover {
  background: #427be3;
  border-color: #346fd4;
  color: #ffffff;
}

button:not(.mini-payment-toggle):not(.toggle-switch):not(.status-toggle):not(.action-toggle):not(.amo-section-title):not(.table-action-button):disabled,
.primary-button[aria-disabled="true"],
.button-secondary[aria-disabled="true"],
.soft-button[aria-disabled="true"],
.table-action[aria-disabled="true"],
.state-button[aria-disabled="true"],
.ops-action[aria-disabled="true"] {
  background: #ffffff;
  border-color: #dfe5eb;
  color: #8d969f;
  cursor: default;
  opacity: 1;
}

/* Unified switch control used in tables, drawers, dashboards and lists */
.toggle-switch,
.status-toggle,
.mini-payment-toggle,
.action-toggle,
.action-toggle.ops-action-done {
  position: relative;
  display: inline-block;
  width: 46px;
  min-width: 46px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid #9fb0c3;
  border-radius: 999px;
  background: #ffffff;
  color: transparent;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.06);
  vertical-align: middle;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.toggle-switch::before,
.status-toggle::before {
  content: none;
}

.toggle-switch::after,
.status-toggle span,
.mini-payment-toggle::after,
.action-toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  transform: translateY(-50%);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.toggle-field input:checked + .toggle-switch,
.status-toggle.on,
.mini-payment-toggle.is-on,
.mini-payment-toggle.ops-action-done,
.action-toggle.is-on,
.action-toggle.ops-action-done {
  border-color: #4f86e8 !important;
  background: #4f86e8 !important;
  color: transparent !important;
}

.toggle-field input:checked + .toggle-switch::after,
.status-toggle.on span,
.mini-payment-toggle.is-on::after,
.mini-payment-toggle.ops-action-done::after,
.action-toggle.is-on::before,
.action-toggle.ops-action-done::before {
  border-color: transparent;
  background: #ffffff;
  transform: translate(22px, -50%);
}

.status-toggle.off,
.action-toggle:not(.is-on):not(.ops-action-done),
.mini-payment-toggle:not(.is-on) {
  border-color: #9fb0c3;
  background: #ffffff;
}

.action-toggle span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.toggle-switch:hover,
.status-toggle:hover,
.mini-payment-toggle:hover,
.action-toggle:hover {
  border-color: #7f94aa;
  background: #ffffff;
}

.mini-payment-toggle:focus-visible,
.action-toggle:focus-visible,
.toggle-field input:focus-visible + .toggle-switch {
  outline: 2px solid rgba(79, 134, 232, 0.28);
  outline-offset: 2px;
}

/* Lightweight amoCRM section headings: title + description, not button bars */
.amo-section {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.amo-section-title,
button.amo-section-title,
button.amo-section-title:hover,
button.amo-section-title:focus {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  justify-content: start;
  column-gap: 10px;
  row-gap: 3px;
  padding: 14px 18px 10px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: #303946 !important;
  box-shadow: none;
  text-align: left;
  text-transform: none;
  cursor: pointer;
}

.amo-section-title::before {
  content: "−";
  grid-row: 1 / span 2;
  align-self: start;
  padding-top: 1px;
  color: #8d969f;
  font-size: 16px;
  font-weight: 400;
}

.amo-section-title.is-collapsed::before {
  content: "+";
}

.amo-section-title span {
  color: #303946;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
}

.amo-section-title small {
  grid-column: 2;
  color: #8a949c;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

.amo-section-title:hover {
  background: transparent !important;
}

.kpi-page .amo-section-title span {
  font-size: 16px;
  font-weight: 400;
}

.kpi-page .amo-section-title small {
  font-size: 13px;
}

.kpi-page .amo-table th {
  height: 42px;
  font-size: 11px;
  letter-spacing: 1.7px;
}

.kpi-page .amo-table td {
  height: 40px;
  font-size: 14px;
  line-height: 1.2;
}

.kpi-page .amo-table .crm-link {
  color: #0057b8;
}

.kpi-page .amo-table .crm-link strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.kpi-page .muted-line {
  color: #607181;
  font-size: 12px;
  line-height: 1.2;
}

button.commercial-autocomplete-item,
button.commercial-autocomplete-item:hover,
button.commercial-autocomplete-item:focus,
button.commercial-autocomplete-item:active {
  display: grid !important;
  width: 100% !important;
  min-height: 42px !important;
  justify-content: stretch !important;
  padding: 7px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf0f3 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: #303946 !important;
  box-shadow: none !important;
  transform: none !important;
  font: inherit !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
}

button.commercial-autocomplete-item:hover,
button.commercial-autocomplete-item:focus,
button.commercial-autocomplete-item:active {
  background: #f7f9fb !important;
}

button.commercial-autocomplete-item strong {
  color: #303946 !important;
  font-weight: 400 !important;
}

button.commercial-autocomplete-item span {
  color: #7b858e !important;
  font-size: 12px !important;
}

.commercial-status-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.inline-badge-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

button.status-label[data-status-menu-button],
button.status-label[data-status-menu-button]:hover,
button.status-label[data-status-menu-button]:focus,
button.status-label[data-status-menu-button]:active,
button.status-label[data-badge-button],
button.status-label[data-badge-button]:hover,
button.status-label[data-badge-button]:focus,
button.status-label[data-badge-button]:active {
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 26px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 4px 11px !important;
  border: 0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  transform: none !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

button.status-label[data-status-menu-button].status-paid,
button.status-label[data-badge-button].status-paid {
  background: #b8ff4d !important;
  color: #243041 !important;
}

button.status-label[data-status-menu-button].status-overdue,
button.status-label[data-badge-button].status-overdue {
  background: #f9d2d5 !important;
  color: #303946 !important;
}

button.status-label[data-status-menu-button].status-upcoming,
button.status-label[data-badge-button].status-upcoming {
  background: #d8e8ff !important;
  color: #1d5fbf !important;
}

.commercial-status-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 10020;
  min-width: 184px;
  padding: 5px 0;
  border: 1px solid #dfe5eb;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(18, 30, 42, 0.16);
}

.commercial-status-options.is-floating {
  position: fixed;
  z-index: 10020;
}

.commercial-status-options button[data-status-option],
.commercial-status-options button[data-status-option]:hover,
.commercial-status-options button[data-status-option]:focus,
.commercial-status-options button[data-status-option]:active,
.commercial-status-options button[data-badge-option],
.commercial-status-options button[data-badge-option]:hover,
.commercial-status-options button[data-badge-option]:focus,
.commercial-status-options button[data-badge-option]:active {
  display: block !important;
  width: 100% !important;
  min-height: 32px !important;
  justify-content: flex-start !important;
  padding: 7px 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: #303946 !important;
  box-shadow: none !important;
  transform: none !important;
  font: inherit !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
}

.commercial-status-options button[data-status-option]:hover,
.commercial-status-options button[data-status-option]:focus,
.commercial-status-options button[data-status-option].is-selected,
.commercial-status-options button[data-badge-option]:hover,
.commercial-status-options button[data-badge-option]:focus,
.commercial-status-options button[data-badge-option].is-selected {
  background: #f0f6ff !important;
  color: #303946 !important;
}
