/* ZaHRo Design System – base header and navigation layer */
:root {
  --zh-green: #198754;
  --zh-green-dark: #086b3f;
  --zh-green-deep: #075332;
  --zh-green-soft: #e6f4eb;
  --zh-text: #111827;
  --zh-muted: #334155;
  --zh-border: #d8e2dc;
  --zh-border-light: #e5e7eb;
  --zh-bg: #ffffff;/* ZaHRo Design System – base header and navigation layer */
:root {
  --zh-green: #198754;
  --zh-green-dark: #086b3f;
  --zh-green-deep: #075332;
  --zh-green-soft: #e6f4eb;
  --zh-text: #111827;
  --zh-muted: #334155;
  --zh-border: #d8e2dc;
  --zh-border-light: #e5e7eb;
  --zh-bg: #ffffff;
  --zh-radius: 2px;
  --zh-header-height: 105px;
  --zh-font: Arial, sans-serif;
}

html, body {
  font-family: var(--zh-font);
}

.site-header,
.site-header * {
  box-sizing: border-box;
}

.site-header {
  --header-height: var(--zh-header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  height: var(--header-height);
  padding: 0 30px;
  background: linear-gradient(135deg, #49d98c 0%, #1f9d63 38%, #198754 100%);
  color: #ffffff;
  font-family: var(--zh-font);
  font-size: 16px;
  line-height: 1.2;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.site-header .logo,
.site-header .logo-link,
.site-header .logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.site-header .logo {
  flex: 0 0 auto;
  position: relative;
  z-index: 20;
}

.site-header .logo-link,
.site-header .logo a {
  line-height: 1;
  text-decoration: none;
}

.site-header .site-logo,
.site-logo {
  display: block;
  height: calc(var(--header-height) * 0.9);
  max-height: calc(var(--header-height) * 0.9);
  width: auto;
  max-width: none;
  object-fit: contain;
  transform: translateY(4px);
  pointer-events: none;
  user-select: none;
}

.site-header .header-right,
.site-header .lang-auth {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 100%;
  position: relative;
  z-index: 30;
}

.site-header .lang-switch,
.lang-switch {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.site-header .lang-switch a,
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.site-header .lang-switch img,
.lang-switch img {
  display: block;
  height: 20px;
  width: auto;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color .15s ease, opacity .15s ease;
}

.site-header .lang-switch img.active,
.lang-switch img.active {
  border-color: #ffffff;
}

.site-header .lang-switch img:not(.active),
.lang-switch img:not(.active) {
  opacity: .92;
}

.site-header .logout-form,
.site-header .firm-list form {
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}

.btn-main,
.site-header .btn-logout,
.header-btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 32px;
  padding: 7px 13px;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: var(--zh-radius);
  color: var(--zh-green);
  font-family: var(--zh-font);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  text-transform: none;
  cursor: pointer;
  appearance: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.btn-main:hover,
.site-header .btn-logout:hover,
.header-btn-main:hover {
  background: var(--zh-green-soft);
  border-color: var(--zh-green-soft);
  color: #145c39;
}

.btn-main.small {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 13px;
}

.site-header .firm-list {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--zh-font);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.site-header .firm-list a {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
  padding: 2px 6px;
  margin-right: 18px;
  border-radius: var(--zh-radius);
  transition: background-color .15s ease, color .15s ease;
}

.site-header .firm-list a:hover {
  background-color: var(--zh-green-soft);
  color: #145c39;
}

.main-nav {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-link {
  color: white;
  font-weight: 700;
  font-size: 15px;
  position: relative;
  text-decoration: none;
  transition: opacity .15s ease;
}

.header-link:hover {
  opacity: .85;
}

.header-add-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .35);
  padding: 16px;
  font-family: var(--zh-font);
  font-size: 15px;
  line-height: 1.4;
  color: var(--zh-text);
}

.header-add-modal-content {
  position: relative;
  width: min(420px, 92vw);
  background: #ffffff;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  padding: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
}

.header-add-modal-content h3 {
  margin: 0 0 14px 0;
  font-size: 18px;
  line-height: 1.25;
  color: var(--zh-text);
}

.header-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--zh-text);
}

.header-form-group {
  margin-bottom: 10px;
}

.header-form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--zh-text);
}

.header-form-group input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: var(--zh-radius);
  font-family: var(--zh-font);
  font-size: 14px;
  line-height: 1.3;
}

.client-submenu {
  background: linear-gradient(180deg, #0b7f49 0%, #07663b 100%);
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 0;
  box-shadow: none;
  padding: 0 30px;
  position: relative;
  z-index: 20;
}

.client-submenu-inner {
  margin: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  white-space: nowrap;
}

.client-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  padding: 0 18px;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition: background-color .15s ease, color .15s ease;
}

.client-nav-link:hover {
  background: rgba(255,255,255,.06);
  color: #ffffff;
}

.client-nav-link.active {
  background: #ffffff;
  color: var(--zh-green-deep);
  font-weight: 800;
  border-radius: var(--zh-radius) var(--zh-radius) 0 0;
}

.client-nav-link.active::after {
  content: none;
}

.nav-svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  filter: none;
  transition: none;
}

.client-nav-link:hover .nav-svg,
.client-nav-link.active .nav-svg {
  transform: none;
  filter: none;
}

.employees-subnav,
.finance-subnav {
  background: #ffffff;
  border-bottom: 1px solid var(--zh-border);
  padding: 0 30px;
  position: relative;
  z-index: 15;
}

.employees-subnav-inner,
.finance-subnav-inner {
  margin: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  white-space: nowrap;
}

.employees-nav-link,
.finance-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 18px;
  color: #087f43;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border: 0;
  border-right: 1px solid #edf1ef;
  transition: background-color .15s ease, color .15s ease;
}

.employees-nav-link:first-child,
.finance-nav-link:first-child {
  padding-left: 18;
}

.employees-nav-link:last-child,
.finance-nav-link:last-child {
  border-right: none;
}

.employees-nav-link:hover,
.finance-nav-link:hover {
  background: #f8faf9;
  color: var(--zh-green-deep);
  transform: none;
}

.employees-nav-link.active,
.finance-nav-link.active {
  color: #087f43;
  font-weight: 800;
}

.employees-nav-link.active::after,
.finance-nav-link.active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  background: var(--zh-green);
  border-radius: 2px 2px 0 0;
}

.emp-nav-svg,
.fin-nav-svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  filter: none;
  transition: none;
}

.employees-nav-link:hover .emp-nav-svg,
.finance-nav-link:hover .fin-nav-svg {
  transform: none;
}

.c-green { fill: #0ca34f; }
.c-green-light { fill: #2fd879; }
.c-orange { fill: #f08a3c; }
.c-yellow { fill: #ffd04d; }
.c-brown { fill: #9a5726; }
.c-cream { fill: #fff2d0; }
.c-white { fill: #ffffff; }

@media (max-width: 900px) {
  .site-header {
    --header-height: 92px;
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-height);
    padding: 10px 16px;
  }

  .site-header .site-logo,
  .site-logo {
    height: calc(var(--header-height) * 0.95);
    max-height: calc(var(--header-height) * 0.95);
    transform: none;
  }

  .site-header .header-right,
  .site-header .lang-auth {
    width: auto;
    margin-top: 0;
    align-items: flex-end;
  }

  .main-nav {
    order: 3;
    width: 100%;
    margin-top: 10px;
    height: auto;
  }

  .header-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
  }
}

@media (max-width: 760px) {
  .client-submenu,
  .employees-subnav,
  .finance-subnav {
    padding-left: 10px;
    padding-right: 10px;
  }

  .client-submenu-inner,
  .employees-subnav-inner,
  .finance-subnav-inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }

  .client-nav-link,
  .employees-nav-link,
  .finance-nav-link {
    flex: 0 0 auto;
    padding: 0 15px;
    font-size: 14px;
  }

  .client-nav-link {
    min-height: 40px;
  }

  .employees-nav-link,
  .finance-nav-link {
    min-height: 36px;
  }

  .employees-nav-link:first-child,
  .finance-nav-link:first-child {
    padding-left: 15px;
  }

  .site-header .firm-list {
    justify-content: flex-start;
    white-space: normal;
  }

  .site-header .firm-list a {
    margin-right: 12px;
  }
}




/* Global modal system */
.zh-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .35);
  box-sizing: border-box;
}

.zh-modal-backdrop.show {
  display: flex;
}

.zh-modal-backdrop-dark {
  background: rgba(0, 0, 0, .48);
}

.zh-modal {
  width: min(520px, 92vw);
  max-height: 92vh;
  overflow: auto;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
  color: var(--zh-text);
  font-family: var(--zh-font);
  font-size: 13px;
  line-height: 1.35;
  box-sizing: border-box;
}

.zh-modal-sm {
  width: min(420px, 92vw);
}

.zh-modal-lg {
  width: min(720px, 95vw);
}

.zh-modal-xl {
  width: min(840px, 95vw);
}

.zh-modal h3,
.zh-modal-title {
  margin: 0 0 12px;
  color: var(--zh-green-deep);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
}

.zh-modal p {
  margin: 0 0 12px;
  color: #374151;
}

.zh-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.zh-modal-action-left {
  margin-right: auto;
}

.zh-modal-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: #ffffff;
  font-family: var(--zh-font);
  font-size: 12px;
}

.zh-modal-table td,
.zh-modal-table th {
  padding: 7px 8px;
  border-bottom: 1px solid var(--zh-border-light);
  vertical-align: middle;
}

.zh-modal-table-actions {
  text-align: right;
  white-space: nowrap;
}

/* Kontrahenci / contractors module */

:root {
  --zh-green-pale: #f0fbf5;
  --zh-row-even: #fbfbfb;
  --zh-row-odd: #f5f7f8;
  --zh-danger: #dc2626;
  --zh-warning: #ff9800;
  --zh-warning-dark: #f57c00;
}

.zh-kontr-body {
  margin: 0;
  background: #f7f8f7;
  color: var(--zh-text);
  font-family: var(--zh-font);
  font-size: 14px;
  line-height: 1.35;
}

.zh-kontr-body * {
  box-sizing: border-box;
}

.zh-kontr-page {
  width: calc(100% - 100px);
  max-width: 1400px;
  min-height: 70vh;
  margin: 16px auto 24px;
  padding: 0;
  background: transparent;
}

.zh-kontr-form-page {
  max-width: 980px;
}

.zh-kontr-head,
.zh-kontr-body .page-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.zh-kontr-title {
  margin: 0;
  color: var(--zh-green-deep);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.zh-kontr-page-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.zh-kontr-body header.page-header {
  position: relative;
  z-index: 5;
  background: #ffffff;
  border-bottom: 1px solid var(--zh-border);
  box-shadow: none;
}

.zh-kontr-body header.page-header .wrap {
  width: calc(100% - 100px);
  max-width: 1400px;
  min-height: 40px;
  margin: 0 auto;
  padding: 0;
}

.zh-kontr-body .tabs {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.zh-kontr-body .tab,
.zh-kontr-body .add,
.zh-kontr-body .bin,
.zh-kontr-body .need,
.zh-kontr-body a.back,
.zh-kontr-body .page-back a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  background: #ffffff;
  color: var(--zh-text);
  font-family: var(--zh-font);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  box-shadow: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.zh-kontr-body .tab {
  color: var(--zh-green-deep);
}

.zh-kontr-body .tab.active,
.zh-kontr-body .add {
  position: relative;
  background: var(--zh-green);
  border-color: var(--zh-green);
  color: #ffffff;
}

.zh-kontr-body .tab.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -6px;
  height: 3px;
  background: #27c76f;
  border-radius: var(--zh-radius);
}


.zh-kontr-body .tab:hover,
.zh-kontr-body .bin:hover,
.zh-kontr-body .need:hover,
.zh-kontr-body a.back:hover,
.zh-kontr-body .page-back a:hover {
  background: var(--zh-green);
  border-color: var(--zh-green);
  color: #ffffff;
}

.zh-kontr-body .tab.recruiter {
  border-color: #fb923c;
  background: #fff7ed;
  color: #ea580c;
}

.zh-kontr-body .tab.recruiter:hover,
.zh-kontr-body .tab.recruiter.active {
  background: var(--zh-warning);
  border-color: var(--zh-warning-dark);
  color: #ffffff;
}

.zh-kontr-body .actions-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.zh-kontr-body .bin {
  border-color: #fb923c;
  background: #fff7ed;
  color: #ea580c;
}

.zh-kontr-body .need {
  border-color: #bae6fd;
  background: #e0f2fe;
  color: #075985;
}

.zh-kontr-body .add:hover {
  background: var(--zh-green-deep);
  border-color: var(--zh-green-deep);
  color: #ffffff;
}

.zh-kontr-list,
.zh-kontr-body .list {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--zh-border-light);
  border-radius: var(--zh-radius);
  background: #ffffff;
  overflow: hidden;
}

.zh-kontr-body .item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid #e9eeee;
  border-radius: 0;
  background: #ffffff;
}

.zh-kontr-body .item:nth-child(odd) {
  background: var(--zh-row-odd);
}

.zh-kontr-body .item:nth-child(even) {
  background: var(--zh-row-even);
}

.zh-kontr-body .item:hover {
  background: #eef8f2;
}

.zh-kontr-body .info {
  min-width: 0;
}

.zh-kontr-body .info a,
.zh-kontr-body .info .name,
.zh-kontr-body .cell-company a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--zh-green-deep);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zh-kontr-body .info a:hover,
.zh-kontr-body .cell-company a:hover {
  color: var(--zh-green);
  text-decoration: underline;
}

.zh-kontr-body .muted {
  margin-top: 2px;
  overflow: hidden;
  color: var(--zh-muted);
  font-size: 11.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zh-kontr-body .row-actions,
.zh-kontr-body form.inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.zh-kontr-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  background: #ffffff;
  color: var(--zh-text);
  font-family: var(--zh-font);
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  box-shadow: none;
}

.zh-kontr-body .btn:hover {
  background: var(--zh-green);
  border-color: var(--zh-green);
  color: #ffffff;
}

.zh-kontr-body .btn.ghost,
.zh-kontr-body .btn.restore {
  background: #ffffff;
  border-color: var(--zh-border);
  color: var(--zh-text);
}

.zh-kontr-body .btn.danger {
  background: #b91c1c;
  border-color: #991b1b;
  color: #ffffff;
}

.zh-kontr-body .btn.danger:hover {
  background: #991b1b;
  border-color: #7f1d1d;
  color: #ffffff;
}

.zh-kontr-body .empty {
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: var(--zh-muted);
  text-align: center;
  font-size: 13px;
}

/* Kontr table */
.zh-kontr-body .table-wrap {
  overflow: auto;
  border: 1px solid var(--zh-border-light);
  border-radius: var(--zh-radius);
  background: #ffffff;
  box-shadow: none;
}

.zh-kontr-body table.rtable {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: #ffffff;
  font-family: var(--zh-font);
  font-size: 12px;
}

.zh-kontr-body table.rtable th,
.zh-kontr-body table.rtable td {
  padding: 4px 7px;
  line-height: 1.15;
  border-bottom: 1px solid #e9eeee;
  vertical-align: middle;
}

.zh-kontr-body table.rtable thead th {
  text-align: left;
  font-weight: 700;
  font-size: 12.5px;
  color: #0a4;
  background: var(--zh-green-pale);
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 2px solid #caeedd;
  box-shadow: 0 2px 0 #e4f3ea;
}

.zh-kontr-body table.rtable tbody tr:nth-child(odd) {
  background: var(--zh-row-odd);
}

.zh-kontr-body table.rtable tbody tr:nth-child(even) {
  background: var(--zh-row-even);
}

.zh-kontr-body table.rtable tbody tr:hover {
  background: #eef8f2;
}

.zh-kontr-body .qty-input,
.zh-kontr-body .input,
.zh-kontr-body .price-input,
.zh-kontr-body .note-input {
  min-height: 32px;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid #cfd8d3;
  border-radius: var(--zh-radius);
  background: #ffffff;
  color: var(--zh-text);
  font-family: var(--zh-font);
  font-size: 13px;
  line-height: 1.3;
  outline: none;
  box-shadow: none;
}

.zh-kontr-body .input,
.zh-kontr-body .note-input {
  width: 100%;
  max-width: 100%;
}

.zh-kontr-body .qty-input {
  width: 58px;
  max-width: 58px;
  text-align: center;
}

.zh-kontr-body .price-input {
  width: 180px;
  max-width: 100%;
}

.zh-kontr-body .input:focus,
.zh-kontr-body .qty-input:focus,
.zh-kontr-body .price-input:focus,
.zh-kontr-body .note-input:focus {
  border-color: var(--zh-green);
  box-shadow: 0 0 0 2px rgba(25, 135, 84, .12);
}

.zh-kontr-body .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.zh-kontr-body .save-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  color: #166534;
  font-size: 11.5px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .2s ease, transform .2s ease;
}

.zh-kontr-body .save-state.show {
  opacity: 1;
  transform: translateY(0);
}

/* Kontr forms */
.zh-kontr-body .page-back {
  margin: 0 0 12px;
}

.zh-kontr-body .card {
  padding: 0;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  background: #ffffff;
  box-shadow: none;
  overflow: visible;
}

.zh-kontr-body .coolspan {
  position: relative;
  margin: 14px;
  padding: 14px;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  background: #ffffff;
}

.zh-kontr-body .coolspan > .badge {
  position: static;
  display: inline-flex;
  margin: 0 0 10px;
  border-color: #b7dfc5;
  background: var(--zh-green-pale);
  color: var(--zh-green-deep);
  border-radius: var(--zh-radius);
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.zh-kontr-body .group {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.zh-kontr-body .field {
  margin: 0 0 10px;
}

.zh-kontr-body .field-row,
.zh-kontr-body .price-row,
.zh-kontr-body .radio-group,
.zh-kontr-body .unit,
.zh-kontr-body .checkset {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.zh-kontr-body .field-row {
  align-items: flex-start;
}

.zh-kontr-body .flex1 {
  flex: 1 1 auto;
  min-width: 220px;
}

.zh-kontr-body .radio-group {
  margin: 0 0 10px;
}

.zh-kontr-body .radio-group label,
.zh-kontr-body .unit label,
.zh-kontr-body .checkset label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--zh-text);
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 600;
}

.zh-kontr-body input[type="radio"],
.zh-kontr-body input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--zh-green);
  cursor: pointer;
}

.zh-kontr-body hr {
  height: 1px;
  margin: 12px 0;
  border: 0;
  background: var(--zh-border-light);
}

.zh-kontr-body .note-input {
  min-height: 38px;
  resize: none;
  overflow: hidden;
}

.zh-kontr-body .actions-wrap,
.zh-kontr-body .add-job-wrap,
.zh-kontr-body .del-job {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 14px;
}

.zh-kontr-body .actions-wrap {
  justify-content: flex-start;
}

.zh-kontr-body .alert {
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid #f2b8b8;
  border-radius: var(--zh-radius);
  background: #fff1f1;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.35;
}

/* Modal */
.zh-kontr-body .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .35);
}

.zh-kontr-body .modal-backdrop.show {
  display: flex !important;
}

.zh-kontr-body .modal {
  width: min(520px, 92vw);
  padding: 14px;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
}

.zh-kontr-body .modal h3 {
  margin: 0 0 8px;
  color: var(--zh-text);
  font-size: 16px;
  line-height: 1.25;
}

.zh-kontr-body .modal p {
  margin: 0 0 14px;
  color: #374151;
  font-size: 13px;
  line-height: 1.35;
}

.zh-kontr-body .modal .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

@media (max-width: 900px) {
  .zh-kontr-page,
  .zh-kontr-body header.page-header .wrap {
    width: calc(100% - 24px);
  }

  .zh-kontr-body header.page-header .wrap {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
  }

  .zh-kontr-body .actions-head {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .zh-kontr-body .item {
    align-items: flex-start;
    flex-direction: column;
  }

  .zh-kontr-body .row-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .zh-kontr-body .tab,
  .zh-kontr-body .add,
  .zh-kontr-body .bin,
  .zh-kontr-body .need {
    flex: 1 1 auto;
  }

  .zh-kontr-body .actions-head .add,
  .zh-kontr-body .actions-head .bin,
  .zh-kontr-body .actions-head .need {
    width: 100%;
  }

  .zh-kontr-body .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .zh-kontr-body table.rtable,
  .zh-kontr-body table.rtable tbody,
  .zh-kontr-body table.rtable tr,
  .zh-kontr-body table.rtable td {
    display: block;
    width: 100%;
  }

  .zh-kontr-body table.rtable thead {
    display: none;
  }

  .zh-kontr-body table.rtable tbody tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--zh-border-light);
    border-radius: var(--zh-radius);
    background: #ffffff;
  }

  .zh-kontr-body table.rtable tbody td {
    display: grid;
    grid-template-columns: 42% 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border: 0;
  }

  .zh-kontr-body table.rtable tbody td::before {
    content: attr(data-label);
    color: #374151;
    font-size: 12px;
    font-weight: 700;
  }

  .zh-kontr-body .actions-wrap,
  .zh-kontr-body .add-job-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .zh-kontr-body .actions-wrap .btn,
  .zh-kontr-body .add-job-wrap .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .zh-kontr-page {
    width: calc(100% - 20px);
    margin: 12px auto;
  }

  .zh-kontr-title {
    font-size: 20px;
  }

  .zh-kontr-body .coolspan {
    margin: 10px;
    padding: 12px;
  }

  .zh-kontr-body .flex1,
  .zh-kontr-body .price-input {
    width: 100%;
    min-width: 0;
  }
}


  --zh-radius: 2px;
  --zh-header-height: 105px;
  --zh-font: Arial, sans-serif;
}

html, body {
  font-family: var(--zh-font);
}

.site-header,
.site-header * {
  box-sizing: border-box;
}

.site-header {
  --header-height: var(--zh-header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  height: var(--header-height);
  padding: 0 30px;
  background: linear-gradient(135deg, #49d98c 0%, #1f9d63 38%, #198754 100%);
  color: #ffffff;
  font-family: var(--zh-font);
  font-size: 16px;
  line-height: 1.2;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.site-header .logo,
.site-header .logo-link,
.site-header .logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.site-header .logo {
  flex: 0 0 auto;
  position: relative;
  z-index: 20;
}

.site-header .logo-link,
.site-header .logo a {
  line-height: 1;
  text-decoration: none;
}

.site-header .site-logo,
.site-logo {
  display: block;
  height: calc(var(--header-height) * 0.9);
  max-height: calc(var(--header-height) * 0.9);
  width: auto;
  max-width: none;
  object-fit: contain;
  transform: translateY(4px);
  pointer-events: none;
  user-select: none;
}

.site-header .header-right,
.site-header .lang-auth {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 100%;
  position: relative;
  z-index: 30;
}

.site-header .lang-switch,
.lang-switch {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.site-header .lang-switch a,
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.site-header .lang-switch img,
.lang-switch img {
  display: block;
  height: 20px;
  width: auto;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color .15s ease, opacity .15s ease;
}

.site-header .lang-switch img.active,
.lang-switch img.active {
  border-color: #ffffff;
}

.site-header .lang-switch img:not(.active),
.lang-switch img:not(.active) {
  opacity: .92;
}

.site-header .logout-form,
.site-header .firm-list form {
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}

.btn-main,
.site-header .btn-logout,
.header-btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 32px;
  padding: 7px 13px;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: var(--zh-radius);
  color: var(--zh-green);
  font-family: var(--zh-font);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  text-transform: none;
  cursor: pointer;
  appearance: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.btn-main:hover,
.site-header .btn-logout:hover,
.header-btn-main:hover {
  background: var(--zh-green-soft);
  border-color: var(--zh-green-soft);
  color: #145c39;
}

.btn-main.small {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 13px;
}

.site-header .firm-list {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--zh-font);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.site-header .firm-list a {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
  padding: 2px 6px;
  margin-right: 18px;
  border-radius: var(--zh-radius);
  transition: background-color .15s ease, color .15s ease;
}

.site-header .firm-list a:hover {
  background-color: var(--zh-green-soft);
  color: #145c39;
}

.main-nav {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-link {
  color: white;
  font-weight: 700;
  font-size: 15px;
  position: relative;
  text-decoration: none;
  transition: opacity .15s ease;
}

.header-link:hover {
  opacity: .85;
}

.header-add-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .35);
  padding: 16px;
  font-family: var(--zh-font);
  font-size: 15px;
  line-height: 1.4;
  color: var(--zh-text);
}

.header-add-modal-content {
  position: relative;
  width: min(420px, 92vw);
  background: #ffffff;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  padding: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
}

.header-add-modal-content h3 {
  margin: 0 0 14px 0;
  font-size: 18px;
  line-height: 1.25;
  color: var(--zh-text);
}

.header-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--zh-text);
}

.header-form-group {
  margin-bottom: 10px;
}

.header-form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--zh-text);
}

.header-form-group input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: var(--zh-radius);
  font-family: var(--zh-font);
  font-size: 14px;
  line-height: 1.3;
}

.client-submenu {
  background: linear-gradient(180deg, #0b7f49 0%, #07663b 100%);
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 0;
  box-shadow: none;
  padding: 0 30px;
  position: relative;
  z-index: 20;
}

.client-submenu-inner {
  margin: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  white-space: nowrap;
}

.client-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  padding: 0 18px;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition: background-color .15s ease, color .15s ease;
}

.client-nav-link:hover {
  background: rgba(255,255,255,.06);
  color: #ffffff;
}

.client-nav-link.active {
  background: #ffffff;
  color: var(--zh-green-deep);
  font-weight: 800;
  border-radius: var(--zh-radius) var(--zh-radius) 0 0;
}

.client-nav-link.active::after {
  content: none;
}

.nav-svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  filter: none;
  transition: none;
}

.client-nav-link:hover .nav-svg,
.client-nav-link.active .nav-svg {
  transform: none;
  filter: none;
}

.employees-subnav,
.finance-subnav {
  background: #ffffff;
  border-bottom: 1px solid var(--zh-border);
  padding: 0 30px;
  position: relative;
  z-index: 15;
}

.employees-subnav-inner,
.finance-subnav-inner {
  margin: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  white-space: nowrap;
}

.employees-nav-link,
.finance-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 18px;
  color: #087f43;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border: 0;
  border-right: 1px solid #edf1ef;
  transition: background-color .15s ease, color .15s ease;
}

.employees-nav-link:first-child,
.finance-nav-link:first-child {
  padding-left: 18;
}

.employees-nav-link:last-child,
.finance-nav-link:last-child {
  border-right: none;
}

.employees-nav-link:hover,
.finance-nav-link:hover {
  background: #f8faf9;
  color: var(--zh-green-deep);
  transform: none;
}

.employees-nav-link.active,
.finance-nav-link.active {
  color: #087f43;
  font-weight: 800;
}

.employees-nav-link.active::after,
.finance-nav-link.active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  background: var(--zh-green);
  border-radius: 2px 2px 0 0;
}

.emp-nav-svg,
.fin-nav-svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  filter: none;
  transition: none;
}

.employees-nav-link:hover .emp-nav-svg,
.finance-nav-link:hover .fin-nav-svg {
  transform: none;
}

.c-green { fill: #0ca34f; }
.c-green-light { fill: #2fd879; }
.c-orange { fill: #f08a3c; }
.c-yellow { fill: #ffd04d; }
.c-brown { fill: #9a5726; }
.c-cream { fill: #fff2d0; }
.c-white { fill: #ffffff; }

@media (max-width: 900px) {
  .site-header {
    --header-height: 92px;
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-height);
    padding: 10px 16px;
  }

  .site-header .site-logo,
  .site-logo {
    height: calc(var(--header-height) * 0.95);
    max-height: calc(var(--header-height) * 0.95);
    transform: none;
  }

  .site-header .header-right,
  .site-header .lang-auth {
    width: auto;
    margin-top: 0;
    align-items: flex-end;
  }

  .main-nav {
    order: 3;
    width: 100%;
    margin-top: 10px;
    height: auto;
  }

  .header-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
  }
}

@media (max-width: 760px) {
  .client-submenu,
  .employees-subnav,
  .finance-subnav {
    padding-left: 10px;
    padding-right: 10px;
  }

  .client-submenu-inner,
  .employees-subnav-inner,
  .finance-subnav-inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }

  .client-nav-link,
  .employees-nav-link,
  .finance-nav-link {
    flex: 0 0 auto;
    padding: 0 15px;
    font-size: 14px;
  }

  .client-nav-link {
    min-height: 40px;
  }

  .employees-nav-link,
  .finance-nav-link {
    min-height: 36px;
  }

  .employees-nav-link:first-child,
  .finance-nav-link:first-child {
    padding-left: 15px;
  }

  .site-header .firm-list {
    justify-content: flex-start;
    white-space: normal;
  }

  .site-header .firm-list a {
    margin-right: 12px;
  }
}


/* Kontrahenci / contractors module */

:root {
  --zh-green-pale: #f0fbf5;
  --zh-row-even: #fbfbfb;
  --zh-row-odd: #f5f7f8;
  --zh-danger: #dc2626;
  --zh-warning: #ff9800;
  --zh-warning-dark: #f57c00;
}

.zh-kontr-body {
  margin: 0;
  background: #f7f8f7;
  color: var(--zh-text);
  font-family: var(--zh-font);
  font-size: 14px;
  line-height: 1.35;
}

.zh-kontr-body * {
  box-sizing: border-box;
}

.zh-kontr-page {
  width: calc(100% - 100px);
  max-width: 1400px;
  min-height: 70vh;
  margin: 16px auto 24px;
  padding: 0;
  background: transparent;
}

.zh-kontr-form-page {
  max-width: 980px;
}

.zh-kontr-head,
.zh-kontr-body .page-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.zh-kontr-title {
  margin: 0;
  color: var(--zh-green-deep);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.zh-kontr-page-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.zh-kontr-body header.page-header {
  position: relative;
  z-index: 5;
  background: #ffffff;
  border-bottom: 1px solid var(--zh-border);
  box-shadow: none;
}

.zh-kontr-body header.page-header .wrap {
  width: calc(100% - 100px);
  max-width: 1400px;
  min-height: 40px;
  margin: 0 auto;
  padding: 0;
}

.zh-kontr-body .tabs {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.zh-kontr-body .tab,
.zh-kontr-body .add,
.zh-kontr-body .bin,
.zh-kontr-body .need,
.zh-kontr-body a.back,
.zh-kontr-body .page-back a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  background: #ffffff;
  color: var(--zh-text);
  font-family: var(--zh-font);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  box-shadow: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.zh-kontr-body .tab {
  color: var(--zh-green-deep);
}

.zh-kontr-body .tab.active,
.zh-kontr-body .add {
  position: relative;
  background: var(--zh-green);
  border-color: var(--zh-green);
  color: #ffffff;
}

.zh-kontr-body .tab.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -6px;
  height: 3px;
  background: #27c76f;
  border-radius: var(--zh-radius);
}


.zh-kontr-body .tab:hover,
.zh-kontr-body .bin:hover,
.zh-kontr-body .need:hover,
.zh-kontr-body a.back:hover,
.zh-kontr-body .page-back a:hover {
  background: var(--zh-green);
  border-color: var(--zh-green);
  color: #ffffff;
}

.zh-kontr-body .tab.recruiter {
  border-color: #fb923c;
  background: #fff7ed;
  color: #ea580c;
}

.zh-kontr-body .tab.recruiter:hover,
.zh-kontr-body .tab.recruiter.active {
  background: var(--zh-warning);
  border-color: var(--zh-warning-dark);
  color: #ffffff;
}

.zh-kontr-body .actions-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.zh-kontr-body .bin {
  border-color: #fb923c;
  background: #fff7ed;
  color: #ea580c;
}

.zh-kontr-body .need {
  border-color: #bae6fd;
  background: #e0f2fe;
  color: #075985;
}

.zh-kontr-body .add:hover {
  background: var(--zh-green-deep);
  border-color: var(--zh-green-deep);
  color: #ffffff;
}

.zh-kontr-list,
.zh-kontr-body .list {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--zh-border-light);
  border-radius: var(--zh-radius);
  background: #ffffff;
  overflow: hidden;
}

.zh-kontr-body .item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid #e9eeee;
  border-radius: 0;
  background: #ffffff;
}

.zh-kontr-body .item:nth-child(odd) {
  background: var(--zh-row-odd);
}

.zh-kontr-body .item:nth-child(even) {
  background: var(--zh-row-even);
}

.zh-kontr-body .item:hover {
  background: #eef8f2;
}

.zh-kontr-body .info {
  min-width: 0;
}

.zh-kontr-body .info a,
.zh-kontr-body .info .name,
.zh-kontr-body .cell-company a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--zh-green-deep);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zh-kontr-body .info a:hover,
.zh-kontr-body .cell-company a:hover {
  color: var(--zh-green);
  text-decoration: underline;
}

.zh-kontr-body .muted {
  margin-top: 2px;
  overflow: hidden;
  color: var(--zh-muted);
  font-size: 11.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zh-kontr-body .row-actions,
.zh-kontr-body form.inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.zh-kontr-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  background: #ffffff;
  color: var(--zh-text);
  font-family: var(--zh-font);
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  box-shadow: none;
}

.zh-kontr-body .btn:hover {
  background: var(--zh-green);
  border-color: var(--zh-green);
  color: #ffffff;
}

.zh-kontr-body .btn.ghost,
.zh-kontr-body .btn.restore {
  background: #ffffff;
  border-color: var(--zh-border);
  color: var(--zh-text);
}

.zh-kontr-body .btn.danger {
  background: #b91c1c;
  border-color: #991b1b;
  color: #ffffff;
}

.zh-kontr-body .btn.danger:hover {
  background: #991b1b;
  border-color: #7f1d1d;
  color: #ffffff;
}

.zh-kontr-body .empty {
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: var(--zh-muted);
  text-align: center;
  font-size: 13px;
}

/* Kontr table */
.zh-kontr-body .table-wrap {
  overflow: auto;
  border: 1px solid var(--zh-border-light);
  border-radius: var(--zh-radius);
  background: #ffffff;
  box-shadow: none;
}

.zh-kontr-body table.rtable {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: #ffffff;
  font-family: var(--zh-font);
  font-size: 12px;
}

.zh-kontr-body table.rtable th,
.zh-kontr-body table.rtable td {
  padding: 4px 7px;
  line-height: 1.15;
  border-bottom: 1px solid #e9eeee;
  vertical-align: middle;
}

.zh-kontr-body table.rtable thead th {
  text-align: left;
  font-weight: 700;
  font-size: 12.5px;
  color: #0a4;
  background: var(--zh-green-pale);
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 2px solid #caeedd;
  box-shadow: 0 2px 0 #e4f3ea;
}

.zh-kontr-body table.rtable tbody tr:nth-child(odd) {
  background: var(--zh-row-odd);
}

.zh-kontr-body table.rtable tbody tr:nth-child(even) {
  background: var(--zh-row-even);
}

.zh-kontr-body table.rtable tbody tr:hover {
  background: #eef8f2;
}

.zh-kontr-body .qty-input,
.zh-kontr-body .input,
.zh-kontr-body .price-input,
.zh-kontr-body .note-input {
  min-height: 32px;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid #cfd8d3;
  border-radius: var(--zh-radius);
  background: #ffffff;
  color: var(--zh-text);
  font-family: var(--zh-font);
  font-size: 13px;
  line-height: 1.3;
  outline: none;
  box-shadow: none;
}

.zh-kontr-body .input,
.zh-kontr-body .note-input {
  width: 100%;
  max-width: 100%;
}

.zh-kontr-body .qty-input {
  width: 58px;
  max-width: 58px;
  text-align: center;
}

.zh-kontr-body .price-input {
  width: 180px;
  max-width: 100%;
}

.zh-kontr-body .input:focus,
.zh-kontr-body .qty-input:focus,
.zh-kontr-body .price-input:focus,
.zh-kontr-body .note-input:focus {
  border-color: var(--zh-green);
  box-shadow: 0 0 0 2px rgba(25, 135, 84, .12);
}

.zh-kontr-body .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.zh-kontr-body .save-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  color: #166534;
  font-size: 11.5px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .2s ease, transform .2s ease;
}

.zh-kontr-body .save-state.show {
  opacity: 1;
  transform: translateY(0);
}

/* Kontr forms */
.zh-kontr-body .page-back {
  margin: 0 0 12px;
}

.zh-kontr-body .card {
  padding: 0;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  background: #ffffff;
  box-shadow: none;
  overflow: visible;
}

.zh-kontr-body .coolspan {
  position: relative;
  margin: 14px;
  padding: 14px;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  background: #ffffff;
}

.zh-kontr-body .coolspan > .badge {
  position: static;
  display: inline-flex;
  margin: 0 0 10px;
  border-color: #b7dfc5;
  background: var(--zh-green-pale);
  color: var(--zh-green-deep);
  border-radius: var(--zh-radius);
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.zh-kontr-body .group {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.zh-kontr-body .field {
  margin: 0 0 10px;
}

.zh-kontr-body .field-row,
.zh-kontr-body .price-row,
.zh-kontr-body .radio-group,
.zh-kontr-body .unit,
.zh-kontr-body .checkset {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.zh-kontr-body .field-row {
  align-items: flex-start;
}

.zh-kontr-body .flex1 {
  flex: 1 1 auto;
  min-width: 220px;
}

.zh-kontr-body .radio-group {
  margin: 0 0 10px;
}

.zh-kontr-body .radio-group label,
.zh-kontr-body .unit label,
.zh-kontr-body .checkset label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--zh-text);
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 600;
}

.zh-kontr-body input[type="radio"],
.zh-kontr-body input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--zh-green);
  cursor: pointer;
}

.zh-kontr-body hr {
  height: 1px;
  margin: 12px 0;
  border: 0;
  background: var(--zh-border-light);
}

.zh-kontr-body .note-input {
  min-height: 38px;
  resize: none;
  overflow: hidden;
}

.zh-kontr-body .actions-wrap,
.zh-kontr-body .add-job-wrap,
.zh-kontr-body .del-job {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 14px;
}

.zh-kontr-body .actions-wrap {
  justify-content: flex-start;
}

.zh-kontr-body .alert {
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid #f2b8b8;
  border-radius: var(--zh-radius);
  background: #fff1f1;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.35;
}

/* Modal */
.zh-kontr-body .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .35);
}

.zh-kontr-body .modal-backdrop.show {
  display: flex !important;
}

.zh-kontr-body .modal {
  width: min(520px, 92vw);
  padding: 14px;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
}

.zh-kontr-body .modal h3 {
  margin: 0 0 8px;
  color: var(--zh-text);
  font-size: 16px;
  line-height: 1.25;
}

.zh-kontr-body .modal p {
  margin: 0 0 14px;
  color: #374151;
  font-size: 13px;
  line-height: 1.35;
}

.zh-kontr-body .modal .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

@media (max-width: 900px) {
  .zh-kontr-page,
  .zh-kontr-body header.page-header .wrap {
    width: calc(100% - 24px);
  }

  .zh-kontr-body header.page-header .wrap {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
  }

  .zh-kontr-body .actions-head {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .zh-kontr-body .item {
    align-items: flex-start;
    flex-direction: column;
  }

  .zh-kontr-body .row-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .zh-kontr-body .tab,
  .zh-kontr-body .add,
  .zh-kontr-body .bin,
  .zh-kontr-body .need {
    flex: 1 1 auto;
  }

  .zh-kontr-body .actions-head .add,
  .zh-kontr-body .actions-head .bin,
  .zh-kontr-body .actions-head .need {
    width: 100%;
  }

  .zh-kontr-body .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .zh-kontr-body table.rtable,
  .zh-kontr-body table.rtable tbody,
  .zh-kontr-body table.rtable tr,
  .zh-kontr-body table.rtable td {
    display: block;
    width: 100%;
  }

  .zh-kontr-body table.rtable thead {
    display: none;
  }

  .zh-kontr-body table.rtable tbody tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--zh-border-light);
    border-radius: var(--zh-radius);
    background: #ffffff;
  }

  .zh-kontr-body table.rtable tbody td {
    display: grid;
    grid-template-columns: 42% 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border: 0;
  }

  .zh-kontr-body table.rtable tbody td::before {
    content: attr(data-label);
    color: #374151;
    font-size: 12px;
    font-weight: 700;
  }

  .zh-kontr-body .actions-wrap,
  .zh-kontr-body .add-job-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .zh-kontr-body .actions-wrap .btn,
  .zh-kontr-body .add-job-wrap .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .zh-kontr-page {
    width: calc(100% - 20px);
    margin: 12px auto;
  }

  .zh-kontr-title {
    font-size: 20px;
  }

  .zh-kontr-body .coolspan {
    margin: 10px;
    padding: 12px;
  }

  .zh-kontr-body .flex1,
  .zh-kontr-body .price-input {
    width: 100%;
    min-width: 0;
  }
}



/* Public landing / auth pages */
.zh-public-body{
  margin:0;
  background:#f7f8f7;
  color:var(--zh-text);
  font-family:var(--zh-font);
  font-size:14px;
  line-height:1.35;
}
.zh-public-body *{ box-sizing:border-box; }

.zh-public-body .site-header{
  border-bottom:0;
}

.zh-public-body .site-header .header-right,
.zh-public-body .site-header .lang-auth{
  min-width:240px;
}

.zh-public-body .site-header .firm-list,
.zh-public-body .site-header .auth-links,
.zh-public-body .site-header .auth-buttons{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  margin:0;
  padding:0;
}

.zh-public-body .site-header .firm-list a,
.zh-public-body .site-header .auth-links a,
.zh-public-body .site-header .auth-buttons a,
.zh-public-body .site-header a.login-link,
.zh-public-body .site-header a.register-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  min-height:32px;
  min-width:92px;
  margin:0;
  padding:0 13px;
  border:1px solid #ffffff;
  border-radius:var(--zh-radius);
  background:#ffffff;
  color:var(--zh-green-deep) !important;
  font-family:var(--zh-font);
  font-size:14px;
  line-height:1.2;
  font-weight:700;
  text-decoration:none;
  white-space:nowrap;
  box-shadow:none;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease;
}

.zh-public-body .site-header .firm-list a:hover,
.zh-public-body .site-header .auth-links a:hover,
.zh-public-body .site-header .auth-buttons a:hover,
.zh-public-body .site-header a.login-link:hover,
.zh-public-body .site-header a.register-link:hover{
  background:var(--zh-green-soft);
  border-color:var(--zh-green-soft);
  color:#145c39 !important;
}

.zh-public-main{
  width:calc(100% - 100px);
  max-width:1200px;
  margin:0 auto;
  padding:36px 0 42px;
}

.zh-public-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:18px;
  min-height:220px;
  align-items:center;
  padding:34px 42px;
  border:1px solid var(--zh-border-light);
  border-radius:var(--zh-radius);
  background:#ffffff;
  box-shadow:none;
}

.zh-public-title{
  margin:0;
  color:var(--zh-green-deep);
  font-size:32px;
  line-height:1.2;
  font-weight:800;
}

.zh-public-text{
  max-width:680px;
  margin:0;
  color:#374151;
  font-size:17px;
  line-height:1.45;
}

.zh-public-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:4px;
}

.zh-public-card{
  width:min(460px,100%);
  margin:0 auto;
  padding:22px 24px 24px;
  border:1px solid var(--zh-border);
  border-radius:var(--zh-radius);
  background:#ffffff;
  box-shadow:none;
}

.zh-public-card h1{
  margin:0 0 18px;
  color:var(--zh-green-deep);
  font-size:24px;
  line-height:1.25;
  font-weight:800;
}

.zh-public-form .form-group{
  position:relative;
  margin:0 0 12px;
}

.zh-public-form input[type="email"],
.zh-public-form input[type="password"],
.zh-public-form input[type="text"]{
  width:100%;
  min-height:36px;
  padding:8px 38px 8px 10px;
  border:1px solid #cfd8d3;
  border-radius:var(--zh-radius);
  background:#ffffff;
  color:var(--zh-text);
  font-family:var(--zh-font);
  font-size:14px;
  line-height:1.3;
  outline:none;
  box-shadow:none;
}

.zh-public-form input:focus{
  border-color:var(--zh-green);
  box-shadow:0 0 0 2px rgba(25,135,84,.12);
}

.zh-public-form .toggle-icon{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border:0;
  background:transparent;
  cursor:pointer;
  font-size:14px;
  line-height:1;
}

.zh-public-form .checkbox-inline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:4px 0 16px;
  color:var(--zh-text);
  font-size:13px;
  font-weight:600;
}

.zh-public-form .checkbox-inline input{
  width:16px;
  height:16px;
  accent-color:var(--zh-green);
}

.zh-public-form .btn-center{
  display:flex;
  justify-content:flex-end;
  margin:0;
}

.zh-public-form .btn-green,
.zh-public-form button[type="submit"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 16px;
  border:1px solid var(--zh-green);
  border-radius:var(--zh-radius);
  background:var(--zh-green);
  color:#ffffff;
  font-family:var(--zh-font);
  font-size:14px;
  line-height:1.2;
  font-weight:700;
  cursor:pointer;
  box-shadow:none;
}

.zh-public-form .btn-green:hover,
.zh-public-form button[type="submit"]:hover{
  background:var(--zh-green-deep);
  border-color:var(--zh-green-deep);
}

.zh-public-card .center{
  margin-top:16px;
  text-align:center;
  color:#374151;
  font-size:13px;
}

.zh-public-card .center a{
  color:var(--zh-green-deep);
  font-weight:700;
  text-decoration:none;
}
.zh-public-card .center a:hover{ text-decoration:underline; }

.zh-public-error,
.error-box{
  margin:0 0 14px;
  padding:9px 12px;
  border:1px solid #f2b8b8;
  border-radius:var(--zh-radius);
  background:#fff1f1;
  color:#991b1b;
  font-size:13px;
  line-height:1.35;
}

.zh-public-body footer,
.zh-public-body .footer{
  border-top:1px solid var(--zh-border-light);
  background:#ffffff;
}

@media (max-width:900px){
  .zh-public-main{width:calc(100% - 32px);padding:24px 0 32px;}
  .zh-public-hero{padding:26px 24px;}
  .zh-public-title{font-size:28px;}
  .zh-public-body .site-header .header-right,
  .zh-public-body .site-header .lang-auth{min-width:0;}
}

@media (max-width:560px){
  .zh-public-main{width:calc(100% - 20px);padding:16px 0 24px;}
  .zh-public-hero{padding:20px 16px;}
  .zh-public-title{font-size:24px;}
  .zh-public-text{font-size:15px;}
  .zh-public-card{padding:18px 16px 20px;}
  .zh-public-form .btn-center,
  .zh-public-form .btn-green,
  .zh-public-form button[type="submit"]{width:100%;}
}
