:root {
  --win-bg: #ececec;
  --panel: #f4f4f4;
  --line: #9a9a9a;
  --dark-line: #222;
  --text: #111;
  --selected: #dcdcdc;
  --disabled: #c7c7c7;
  --danger: #b00020;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #d9d9d9;
  color: var(--text);
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #eef3f8, #d9e3ed);
}

.login-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid #c8d3df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(21, 42, 64, .18);
}

.login-card h1 {
  margin: 0 0 6px;
  color: #0d365f;
  font-size: 30px;
}

.login-card p {
  margin: 0 0 22px;
  color: #526275;
}

.login-card label {
  display: block;
  margin: 0 0 14px;
  color: #20364c;
  font-weight: 700;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  margin-top: 6px;
  padding: 10px 11px;
  border: 1px solid #aebaca;
  border-radius: 6px;
  background: #fbfdff;
}

.login-remember {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
}

.login-submit {
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 6px;
  background: #0d5cab;
  color: #fff;
  font-weight: 700;
}

.login-message {
  min-height: 20px;
  margin-top: 12px;
  color: #b00020;
}

.login-message.is-ok {
  color: #146c2e;
}

.app-window {
  width: 100vw;
  min-height: 100vh;
  background: var(--win-bg);
  overflow: hidden;
}

.classic-title {
  height: 24px;
  padding: 4px 6px;
  background: #f8f8f8;
  border-bottom: 1px solid #c8c8c8;
}

.classic-menu {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 2px 10px;
  background: #eeeeee;
  border-bottom: 1px solid #c9c9c9;
}

.classic-menu button {
  border: 0;
  background: transparent;
  padding: 3px 0;
}

.classic-menu .logout-button {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid #b8c2cc;
  border-radius: 4px;
  background: #fff;
}

.menu-group {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.settings-menu {
  position: absolute;
  top: 24px;
  left: -8px;
  z-index: 30;
  min-width: 150px;
  padding: 4px;
  border: 1px solid #aeb7c2;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.settings-menu.hidden {
  display: none;
}

.settings-menu button {
  display: block;
  width: 100%;
  padding: 6px 8px;
  text-align: left;
}

.settings-menu button:hover {
  background: #eef5ff;
}

.classic-layout {
  display: grid;
  grid-template-columns: 178px minmax(620px, 1fr) 390px;
  gap: 0;
  height: calc(100vh - 52px);
}

.client-pane,
.work-pane,
.task-pane {
  min-height: 0;
  border-right: 1px solid var(--line);
}

.client-pane {
  padding: 2px 0 0;
  background: #f3f3f3;
}

.tiny-label {
  display: block;
  padding: 3px 2px;
  font-size: 12px;
}

.combo-line {
  display: grid;
  grid-template-columns: 1fr 19px;
  padding: 0 3px 4px 0;
}

.combo-line input,
.combo-line select {
  height: 22px;
  border: 1px solid var(--line);
  background: white;
}

.client-table-head {
  height: 22px;
  padding: 3px 5px;
  border-top: 2px solid #111;
  border-bottom: 1px solid #111;
  font-weight: 700;
  background: #f7f7f7;
}

.client-list {
  height: calc(100vh - 108px);
  overflow-y: auto;
  border-right: 1px solid var(--dark-line);
}

.client-row {
  display: block;
  width: 100%;
  height: 22px;
  padding: 2px 4px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #b6b6b6;
  background: #f9f9f9;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.client-row:hover,
.client-row.active {
  background: #d8d8d8;
}

.client-row.inactive {
  background: #f1f1f1;
  color: #777;
  opacity: .55;
}

.client-row.inactive.active,
.client-row.inactive:hover {
  background: #e2e2e2;
  opacity: .78;
}

.work-pane {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--win-bg);
}

.client-card {
  display: grid;
  grid-template-columns: 315px minmax(420px, 1fr);
  border-bottom: 1px solid #b8b8b8;
}

.client-name-row {
  padding: 10px 8px 7px 12px;
  border-right: 1px solid #d0d0d0;
}

.client-name-row h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.client-active-status {
  width: fit-content;
  min-width: 148px;
  margin-top: 14px;
}

.client-owner-line {
  margin-top: 7px;
  color: #333;
  font-size: 13px;
}

.client-owner-line b {
  color: #111;
}

.client-filter-row {
  display: none;
  gap: 8px;
  align-items: end;
  padding: 4px 6px;
  border-bottom: 1px solid #d0d0d0;
}

.client-filter-row label {
  display: grid;
  gap: 2px;
  font-size: 12px;
}

.client-filter-row select {
  width: 88px;
  height: 22px;
}

.client-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 3px 20px;
  padding: 7px 8px;
  font-size: 13px;
}

.client-info-grid span {
  display: inline-block;
  min-width: 68px;
  color: #333;
}

.client-info-grid .wide {
  grid-column: 1 / -1;
}

.module-tabs {
  display: flex;
  height: 26px;
  align-items: end;
  padding-left: 6px;
  border-bottom: 1px solid #111;
}

.tab,
.report-tab {
  height: 25px;
  padding: 4px 8px;
  border: 1px solid #888;
  border-bottom: 0;
  background: #efefef;
  font-weight: 700;
}

.tab.active,
.report-tab.active {
  background: #fff;
  border-color: #111;
}

.module-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 4px 8px;
}

.classic-btn,
.mini-button {
  border: 1px solid #999;
  background: linear-gradient(#f8f8f8, #dddddd);
  min-height: 23px;
  padding: 2px 10px;
}

.classic-btn.wide {
  min-width: 130px;
}

.classic-btn.strong {
  font-size: 20px;
  font-weight: 700;
  margin: 8px 4px 0 0;
}

.classic-btn.disabled {
  color: #888;
  background: #d7d7d7;
}

.classic-btn.danger {
  border-color: #c99898;
  background: linear-gradient(#fff6f6, #f1d4d4);
  color: #8f1d1d;
}

.auto-user-field:disabled {
  border-color: #c9d8e6;
  background: #eef7ff;
  color: #173b63;
  font-weight: 700;
  opacity: 1;
}

.mini-button {
  min-width: 19px;
  padding: 0 4px;
}

.stored-file-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.file-name-button {
  border: 0;
  background: transparent;
  color: #003b73;
  padding: 0 4px 0 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.small-input {
  width: 58px;
  height: 24px;
  border: 1px solid #999;
}

.module-body {
  min-height: 0;
  padding: 0 8px 8px;
  overflow: auto;
}

.module-grid-shell {
  display: grid;
  grid-template-rows: minmax(250px, 1fr) auto;
  min-height: 100%;
}

.grid-scroll {
  overflow: auto;
  border-left: 2px solid #111;
  border-right: 1px solid #999;
  border-bottom: 1px solid #999;
  background: white;
}

.grid-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  table-layout: fixed;
}

.grid-table th,
.grid-table td {
  border: 1px solid #8f8f8f;
  padding: 3px 5px;
  height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-table th {
  background: #f5f5f5;
  font-weight: 700;
  text-align: center;
}

.grid-table td.num {
  text-align: right;
}

.grid-table td.center {
  text-align: center;
}

.grid-table .quarter {
  color: var(--danger);
}

.grid-check {
  width: 13px;
  height: 13px;
  accent-color: #444;
}

.editor-panel {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  padding: 10px 0 0;
}

.editor-group {
  display: grid;
  gap: 6px;
  align-content: start;
}

.editor-grid {
  display: grid;
  grid-template-columns: auto 105px;
  gap: 6px 8px;
  align-items: center;
}

.editor-grid input,
.editor-grid select {
  height: 23px;
  border: 1px solid #999;
  background: white;
  text-align: right;
}

.editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-area {
  grid-column: 1 / -1;
}

.note-area label {
  display: block;
  font-weight: 700;
  margin-bottom: 3px;
}

.note-area textarea {
  width: 100%;
  height: 58px;
  border: 1px solid #999;
  resize: none;
}

.save-button {
  align-self: start;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
}

.file-tabs {
  display: flex;
  gap: 0;
  padding: 0 0 7px;
}

.subtab {
  border: 1px solid #888;
  background: #efefef;
  padding: 4px 8px;
  font-weight: 700;
}

.subtab.active {
  background: #fff;
}

.file-layout,
.statistics-layout,
.intrastat-layout {
  display: grid;
  grid-template-columns: minmax(280px, .95fr) minmax(310px, 1.05fr);
  gap: 8px;
}

.file-preview,
.attachment-box {
  border: 1px solid #999;
  background: white;
  min-height: 175px;
  padding: 10px;
}

.attachment-actions {
  display: grid;
  gap: 6px;
  width: 145px;
  margin-top: 86px;
}

.annual-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  padding-top: 8px;
}

.annual-form label,
.file-form label,
.intrastat-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.annual-form input[type="text"],
.file-form input[type="text"],
.intrastat-form input[type="text"] {
  height: 23px;
  border: 1px solid #999;
}

.task-pane {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 124px;
  background: #efefef;
}

.task-list {
  overflow-y: auto;
  border-left: 2px solid #111;
  border-bottom: 1px solid #999;
}

.task-item {
  border-bottom: 1px solid #999;
  background: #f9f9f9;
}

.task-head {
  display: grid;
  grid-template-columns: 1fr 126px 76px;
  border-bottom: 1px solid #aaa;
}

.task-head b {
  padding: 3px 5px;
}

.task-head > span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px 4px;
}

.task-complete-btn {
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #b8372f;
  border-radius: 6px;
  background: #d94b3f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.task-complete-btn:hover {
  background: #c63f34;
}

.task-complete-btn:disabled {
  border-color: #c9c9c9;
  background: #e2e2e2;
  color: #8a8a8a;
  cursor: default;
}

.task-done-badge {
  color: #2d7a44;
  font-size: 11px;
  font-weight: 700;
}

.task-body {
  padding: 4px 5px;
  min-height: 34px;
  line-height: 1.25;
}

.task-read {
  border-top: 1px solid #bdbdbd;
  padding: 3px 5px;
  font-size: 12px;
}

.task-controls {
  padding: 6px 8px;
}

.task-filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 6px;
}

.task-filter-row label {
  display: grid;
  gap: 2px;
}

.task-filter-row select {
  height: 23px;
}

.task-bottom {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 8px;
}

fieldset {
  border: 1px solid #ccc;
  margin: 0;
  padding: 6px;
}

fieldset label {
  display: block;
}

.task-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  align-items: center;
}

.inline-check {
  grid-column: span 2;
}

.floating-window {
  position: fixed;
  left: 38.1%;
  top: 20.8%;
  width: min(936px, 55.8vw);
  height: min(666px, 68.4vh);
  background: var(--win-bg);
  border: 1px solid #888;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  z-index: 20;
  font-size: 14px;
}

.floating-window.admin-window {
  left: 7.5vw;
  top: 7.5vh;
  width: 85vw;
  height: 85vh;
}

.floating-window.companies-window {
  left: 7.5vw;
  top: 7.5vh;
  width: 85vw;
  height: 85vh;
}

.floating-window.salary-report-window {
  left: 7.5vw;
  top: 7.5vh;
  width: 85vw;
  height: 85vh;
  border-color: #9fb7cf;
  border-radius: 9px;
  background: #f4f8fc;
  overflow: hidden;
}

.salary-report-window .float-title {
  height: 44px;
  padding: 7px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #eaf4ff 100%);
  color: #123c63;
  font-size: 20px;
  font-weight: 800;
}

.salary-report-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  height: 58px;
  padding: 8px 12px;
  border-bottom: 1px solid #c7d7e8;
  background: #fff;
}

.salary-report-toolbar label {
  display: grid;
  gap: 3px;
  color: #173b63;
  font-size: 13px;
  font-weight: 700;
}

.salary-report-toolbar select {
  min-width: 150px;
  height: 28px;
  border: 1px solid #afc4d9;
  border-radius: 5px;
  background: #fff;
}

.salary-report-toolbar strong {
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid #b8d8c6;
  border-radius: 6px;
  background: #eaf8f0;
  color: #09663c;
}

.salary-report-table-wrap {
  height: calc(100% - 102px);
  padding: 10px;
  overflow: auto;
}

.salary-report-table {
  width: 100%;
  min-width: 1310px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  font-size: 13px;
}

.salary-report-table th,
.salary-report-table td {
  height: 27px;
  padding: 4px 5px;
  border: 1px solid #c8d7e6;
  text-align: right;
  white-space: nowrap;
}

.salary-report-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eaf2fb;
  color: #143d64;
}

.salary-report-table th:first-child,
.salary-report-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 210px;
  background: #fff;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.salary-report-table thead th:first-child {
  z-index: 3;
  background: #eaf2fb;
}

.salary-report-table th:last-child,
.salary-report-table td:last-child {
  width: 92px;
}

.salary-report-table .salary-report-price {
  width: 96px;
  text-align: right;
  white-space: normal;
}

.salary-report-table th:nth-child(n+3),
.salary-report-table td:nth-child(n+3) {
  width: 76px;
}

.salary-report-table th:last-child,
.salary-report-table td:last-child {
  width: 92px;
}

.salary-report-table th.salary-report-price {
  text-align: center;
  line-height: 1.1;
}

.salary-report-table td.has-salary {
  background: #edf9f2;
  color: #08733f;
  font-weight: 800;
}

.salary-report-table .salary-report-total,
.salary-report-table tfoot th {
  background: #e8f4ff;
  color: #0d4f87;
  font-weight: 800;
}

.salary-report-table tfoot th {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.hidden {
  display: none;
}

.float-title {
  height: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: #f8f8f8;
  border-bottom: 1px solid #aaa;
}

.admin-window .float-title,
.companies-window .float-title {
  height: 46px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  border-bottom: 1px solid #c7d7ea;
  color: #123253;
  font-size: 20px;
  font-weight: 700;
}

.float-title button {
  border: 0;
  background: transparent;
  font-size: 22px;
}

.admin-window .float-title button,
.companies-window .float-title button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #31506f;
}

.admin-window .float-title button:hover,
.companies-window .float-title button:hover {
  background: #dfeaf8;
}

.reports-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  height: calc(100% - 28px);
}

.reports-options {
  padding: 14px 8px;
  border-right: 1px solid #999;
}

.reports-options h2 {
  text-align: center;
  margin: 0 0 8px;
  font-size: 22px;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.report-filter-grid label {
  display: grid;
  gap: 2px;
}

.report-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
}

.report-tab {
  height: 24px;
  padding: 3px 6px;
  font-size: 12px;
}

.classic-fieldset {
  margin-top: 10px;
}

.radio-grid {
  display: grid;
  grid-template-columns: 80px 55px 55px 65px;
  align-items: center;
  gap: 3px;
}

.report-table-wrap {
  padding: 36px 10px 10px;
  overflow: auto;
}

.admin-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  height: calc(100% - 46px);
  background: #f6f8fb;
}

.admin-users {
  border-right: 1px solid #d4dce8;
  padding: 12px;
  min-height: 0;
  background: #eef3f8;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: 1fr 60px;
  gap: 6px;
  margin-bottom: 8px;
}

.admin-toolbar input,
.admin-form-grid input,
.admin-form-grid select,
.company-rights-toolbar input {
  height: 24px;
  border: 1px solid #999;
}

.admin-form-grid input[readonly] {
  background: #f3f5f8;
  color: #4b5563;
}

.admin-form-grid input.editable {
  background: #fff;
  border-color: #367ac4;
  box-shadow: 0 0 0 2px rgba(54, 122, 196, 0.12);
  color: #111827;
}

.admin-user-list {
  height: calc(100% - 34px);
  overflow: auto;
  border: 1px solid #d2dbe8;
  border-radius: 8px;
  background: white;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 28px;
  padding: 3px 7px;
  border: 0;
  border-bottom: 1px solid #e0e6ef;
  background: #f8fbff;
  color: #111;
  text-align: left;
}

.admin-user-row.active,
.admin-user-row:hover {
  background: #cfe3ff;
}

.admin-user-row b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f2440;
}

.admin-user-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4e6176;
  font-size: 12px;
}

.admin-user-row.inactive {
  background: #f1f1f1;
  color: #777;
  opacity: .58;
}

.admin-user-row.inactive b,
.admin-user-row.inactive span {
  color: #777;
}

.admin-user-row.inactive.active,
.admin-user-row.inactive:hover {
  opacity: .78;
  background: #e2e2e2;
}

.admin-user-row.no-companies {
  border-left: 4px solid #d99a22;
  background: #fff8e8;
}

.admin-user-row.no-companies b {
  color: #6b4600;
}

.admin-user-row.no-companies span {
  color: #8a5d00;
}

.admin-user-row.no-companies.active,
.admin-user-row.no-companies:hover {
  background: #ffeec7;
}

.admin-editor {
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 12px;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto auto minmax(430px, 1fr) auto;
}

.admin-section-title {
  margin: 12px 0 8px;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid #cfd9e6;
  background: transparent;
  color: #183b5d;
  font-size: 18px;
  font-weight: 700;
}

.admin-hero {
  padding: 4px 0 12px;
  border-bottom: 1px solid #dbe3ee;
}

.admin-hero h2 {
  margin: 0;
  color: #102a43;
  font-size: 28px;
  line-height: 1.1;
}

.admin-hero p {
  margin: 6px 0 0;
  color: #5c6f82;
  font-size: 14px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(170px, 1fr) minmax(170px, 1fr);
  justify-content: start;
  align-items: end;
  gap: 14px 18px;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #ffffff;
  width: min(760px, 100%);
  max-width: 760px;
  min-height: 112px;
}

.admin-form-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-inline-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-inline-edit .classic-btn {
  min-height: 30px;
  padding-inline: 12px;
  white-space: nowrap;
}

.admin-check-line {
  align-content: end;
  grid-template-columns: auto 1fr;
  gap: 6px;
}

.admin-name-field {
  grid-column: 1;
  grid-row: 1;
}

.admin-password-field {
  grid-column: 2;
  grid-row: 1;
}

.admin-password-repeat-field {
  grid-column: 3;
  grid-row: 1;
}

.admin-role-field {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
}

.admin-salary-field {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
}

.admin-salary-check {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  white-space: nowrap;
}

.admin-salary-check input {
  width: 15px;
  height: 15px;
  margin: 0;
}

#adminActiveStatus {
  grid-column: 3;
  grid-row: 2;
  min-width: 0;
  width: 100%;
  height: 30px;
}

.active-status {
  display: flex !important;
  align-items: center;
  align-self: end;
  gap: 8px;
  height: 34px;
  margin-bottom: 0;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid #d7e0ea;
  background: #f8fafc;
}

.active-status span {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.active-status.is-active {
  border-color: #d4eadb;
  background: #f3fbf6;
}

.active-status.is-active span {
  color: #2f7a45;
}

.active-status.is-inactive {
  border-color: #f1d4d4;
  background: #fff7f7;
}

.active-status.is-inactive span {
  color: #a34545;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(4, 170px);
  justify-content: start;
  gap: 8px 14px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #ffffff;
  max-width: 780px;
}

.permissions-grid label {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #e4eaf2;
  border-radius: 6px;
  background: #f9fbfd;
}

.permissions-grid label:has(input:checked) {
  border-color: #bfd5ee;
  background: #eef6ff;
  color: #173b63;
  font-weight: 700;
}

.company-rights-toolbar {
  display: grid;
  grid-template-columns: 240px 80px 90px 150px;
  justify-content: start;
  gap: 6px;
  align-items: center;
  margin-bottom: 7px;
  padding: 10px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #ffffff;
}

.admin-company-list {
  min-height: 430px;
  height: 100%;
  overflow: auto;
  border: 1px solid #d2dbe8;
  border-radius: 8px;
  background: white;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  align-content: start;
}

.admin-company-filterbar {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #d2dbe8;
  background: #f8fbff;
}

.admin-company-filter {
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid #b8c8dc;
  border-radius: 7px;
  background: #fff;
  color: #173b63;
  font-weight: 700;
  cursor: default;
}

.admin-company-filter.active {
  background: #dff0ff;
  border-color: #6da7d9;
}

.admin-company-filter.warning {
  color: #884600;
  border-color: #dfb15e;
  background: #fff8e8;
}

.admin-company-filter.warning.active {
  background: #ffe5ad;
  border-color: #c48116;
}

.admin-company-filter.selected {
  color: #173b63;
  border-color: #9fc7ec;
  background: #eef6ff;
}

.admin-company-column {
  min-width: 0;
  border-right: 1px solid #d2dbe8;
}

.admin-company-column:nth-child(3),
.admin-company-column:last-child {
  border-right: 0;
}

.admin-company-two-column {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  align-items: start;
}

.admin-company-two-column .admin-company-row:nth-child(odd) {
  border-right: 1px solid #d2dbe8;
}

.admin-company-two-column .admin-company-empty {
  grid-column: 1 / -1;
}

.admin-company-section-title,
.admin-company-column-title {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 6px 8px;
  border-bottom: 1px solid #cbd6e4;
  background: #f3f7fb;
  color: #183a5c;
  font-size: 12px;
  font-weight: 700;
}

.admin-company-section-title {
  grid-column: 1 / -1;
  position: static;
  z-index: auto;
}

.admin-company-section-title.inactive-section {
  margin-top: 8px;
  border-top: 1px solid #cbd6e4;
  background: #f2f2f2;
  color: #606060;
}

.admin-company-column.missing-owner-column .admin-company-column-title {
  background: #fff1d6;
  color: #7a3b00;
}

.admin-company-empty {
  padding: 12px 8px;
  color: #6b7280;
  font-style: italic;
}

.admin-company-row {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 24px;
  padding: 2px 5px;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.admin-company-row .company-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}

.admin-company-row .company-owner {
  color: #173b63;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
}

.admin-company-row.unassigned .company-owner {
  color: #555;
}

.admin-company-row.assigned {
  background: #eef7ff;
  font-weight: 700;
}

.admin-company-row.unassigned {
  color: #555;
}

.admin-company-row.inactive-company {
  background: #f3f3f3;
  color: #777;
  opacity: .58;
}

.admin-company-row.inactive-company.assigned {
  background: #edf0f3;
}

.admin-company-row.inactive-company .company-owner {
  color: #777;
}

.admin-company-row.inactive-company:hover {
  opacity: .8;
}

.admin-company-row.missing-owner {
  background: #fff8e8;
  color: #5f3b00;
}

.admin-company-row.missing-owner.assigned {
  background: #fff0c2;
}

.admin-company-row .company-owner.missing {
  color: #9a4d00;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-bottom: 4px;
}

.admin-hint {
  color: #555;
  font-size: 12px;
}

.admin-save-message {
  min-width: 170px;
  padding: 5px 10px;
  border: 1px solid #cfe8d6;
  border-radius: 7px;
  background: #f2fbf5;
  color: #2f7a45;
  font-weight: 700;
  opacity: 0;
  transition: opacity .18s ease;
}

.admin-save-message.visible {
  opacity: 1;
}

.companies-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  height: calc(100% - 46px);
  min-height: 0;
  background: #f6f8fb;
}

.companies-list-pane {
  min-width: 0;
  min-height: 0;
  padding: 12px;
  border-right: 1px solid #cbd6e4;
  background: #eef3f8;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.companies-list-pane .admin-toolbar {
  grid-template-columns: minmax(0, 1fr) 74px;
}

.company-directory-list {
  min-height: 0;
  overflow: auto;
  border: 1px solid #cfd9e6;
  border-radius: 8px;
  background: #fff;
}

.company-directory-row {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid #e1e6ee;
  background: #fff;
  color: #1d2f42;
  text-align: left;
  cursor: pointer;
}

.company-directory-row b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.company-directory-row span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #5c6b7a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-directory-row:hover,
.company-directory-row.active {
  background: #e5f1ff;
}

.company-directory-row.inactive {
  background: #f3f3f3;
  color: #777;
  opacity: .58;
}

.company-directory-editor {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 16px;
}

.company-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 280px));
  gap: 12px 14px;
  align-items: end;
  padding: 12px;
  border: 1px solid #d4dfec;
  border-radius: 8px;
  background: #fff;
}

.company-form-grid label,
.company-module-grid label {
  color: #1e3144;
  font-size: 13px;
  font-weight: 700;
}

.company-form-grid input,
.company-form-grid select,
.company-responsible-readonly {
  width: 100%;
  height: 28px;
  margin-top: 4px;
  border: 1px solid #aab4c0;
  border-radius: 3px;
  background: #fff;
  font-size: 13px;
}

.company-responsible-readonly {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #173b63;
  background: #f6f9fc;
  font-weight: 700;
}

.company-form-grid .wide {
  grid-column: span 2;
  max-width: none;
}

.service-price-field {
  color: #b00000;
  font-weight: 800;
}

.service-price-input-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.company-form-grid .service-price-input-line input {
  flex: 0 0 120px;
  width: 120px;
  margin-top: 0;
  border-color: #c53a3a;
  color: #b00000;
  font-weight: 800;
}

.service-price-input-line b {
  color: #b00000;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.company-active-status {
  width: fit-content;
  min-width: 155px;
  height: 30px;
  align-self: end;
}

.company-vat-status {
  display: flex;
  gap: 8px;
  align-items: center;
  width: fit-content;
  min-width: 170px;
  height: 30px;
  padding: 5px 10px;
  border: 1px solid #bdd0e5;
  border-radius: 7px;
  background: #f5f9ff;
  align-self: end;
}

.company-vat-status span {
  color: #183b5d;
  font-size: 13px;
  font-weight: 700;
}

.company-vat-status input {
  width: auto;
  height: auto;
  margin: 0;
}

.company-active-status input {
  width: auto;
  height: auto;
  margin: 0;
}

.company-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 210px));
  gap: 10px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d4dfec;
  border-radius: 8px;
  background: #fff;
}

.company-module-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
  background: #f9fbfd;
  font-weight: 600;
}

@media (max-width: 1180px) {
  .classic-layout {
    grid-template-columns: 165px minmax(560px, 1fr) 330px;
  }

  .permissions-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

.salary-report-table td.salary-month-1, .salary-report-table th.salary-month-1 { background: #eef6ff; color: #155c9d; }
.salary-report-table td.salary-month-2, .salary-report-table th.salary-month-2 { background: #f1f8e9; color: #3e7c16; }
.salary-report-table td.salary-month-3, .salary-report-table th.salary-month-3 { background: #fff4e5; color: #965900; }
.salary-report-table td.salary-month-4, .salary-report-table th.salary-month-4 { background: #f2efff; color: #5a3fa3; }
.salary-report-table td.salary-month-5, .salary-report-table th.salary-month-5 { background: #eaf8f0; color: #08733f; }
.salary-report-table td.salary-month-6, .salary-report-table th.salary-month-6 { background: #fff0f4; color: #a03255; }
.salary-report-table td.salary-month-7, .salary-report-table th.salary-month-7 { background: #e9fbfb; color: #08777a; }
.salary-report-table td.salary-month-8, .salary-report-table th.salary-month-8 { background: #fff8d9; color: #826500; }
.salary-report-table td.salary-month-9, .salary-report-table th.salary-month-9 { background: #f0f3ff; color: #344c9a; }
.salary-report-table td.salary-month-10, .salary-report-table th.salary-month-10 { background: #edf8e8; color: #286c24; }
.salary-report-table td.salary-month-11, .salary-report-table th.salary-month-11 { background: #f8eefb; color: #7b3d91; }
.salary-report-table td.salary-month-12, .salary-report-table th.salary-month-12 { background: #eaf6f1; color: #17684e; }

.salary-report-table tfoot th.salary-month-1 { background: #eef6ff !important; color: #155c9d !important; }
.salary-report-table tfoot th.salary-month-2 { background: #f1f8e9 !important; color: #3e7c16 !important; }
.salary-report-table tfoot th.salary-month-3 { background: #fff4e5 !important; color: #965900 !important; }
.salary-report-table tfoot th.salary-month-4 { background: #f2efff !important; color: #5a3fa3 !important; }
.salary-report-table tfoot th.salary-month-5 { background: #eaf8f0 !important; color: #08733f !important; }
.salary-report-table tfoot th.salary-month-6 { background: #fff0f4 !important; color: #a03255 !important; }
.salary-report-table tfoot th.salary-month-7 { background: #e9fbfb !important; color: #08777a !important; }
.salary-report-table tfoot th.salary-month-8 { background: #fff8d9 !important; color: #826500 !important; }
.salary-report-table tfoot th.salary-month-9 { background: #f0f3ff !important; color: #344c9a !important; }
.salary-report-table tfoot th.salary-month-10 { background: #edf8e8 !important; color: #286c24 !important; }
.salary-report-table tfoot th.salary-month-11 { background: #f8eefb !important; color: #7b3d91 !important; }
.salary-report-table tfoot th.salary-month-12 { background: #eaf6f1 !important; color: #17684e !important; }

.salary-report-table td.has-delta-postings {
  background: #eef7ff;
  color: #064d87;
  font-weight: 800;
}

.delta-title-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #003b73;
  font: inherit;
  font-size: 21px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.delta-title-button:hover {
  color: #0064aa;
}

@media (max-width: 1440px) {
  .delta-title-button {
    font-size: 14px;
  }
}

.delta-posting-report-table {
  min-width: 820px;
}

#deltaPostingReportWindow {
  left: 28.75vw;
  width: 42.5vw;
}

.delta-posting-report-table th:first-child,
.delta-posting-report-table td:first-child {
  width: 90px;
  max-width: 90px;
}

.delta-posting-report-table th:nth-child(n+2),
.delta-posting-report-table td:nth-child(n+2) {
  width: 52px;
}

.delta-posting-report-table th:last-child,
.delta-posting-report-table td:last-child {
  width: 64px;
}

/* Main workspace modern polish */
:root {
  --workspace-bg: #eef3f8;
  --workspace-surface: #ffffff;
  --workspace-soft: #f6f9fc;
  --workspace-line: #d5e0ec;
  --workspace-line-strong: #b9c9dc;
  --workspace-blue: #173b63;
  --workspace-blue-soft: #e8f2ff;
  --workspace-text-soft: #5b6d80;
}

body {
  background: var(--workspace-bg);
}

.app-window {
  background: var(--workspace-bg);
}

.classic-title {
  height: 34px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--workspace-line);
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fe 100%);
  color: var(--workspace-blue);
  font-size: 15px;
  font-weight: 700;
}

.classic-menu {
  height: 38px;
  gap: 8px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--workspace-line);
  background: #fff;
}

.classic-menu button {
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 7px;
  color: #253f5a;
  font-weight: 600;
}

.classic-menu button:hover,
.classic-menu button:focus-visible {
  background: var(--workspace-blue-soft);
  outline: none;
}

.settings-menu {
  top: 32px;
  border-color: var(--workspace-line-strong);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(30, 58, 92, .16);
}

.settings-menu button {
  border-radius: 6px;
}

.classic-layout {
  grid-template-columns: 225px minmax(680px, 1fr) 390px;
  gap: 10px;
  height: calc(100vh - 72px);
  padding: 10px;
}

.client-pane,
.work-pane,
.task-pane {
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: var(--workspace-surface);
  box-shadow: 0 10px 26px rgba(34, 68, 104, .08);
}

.client-pane {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 7px;
  padding: 10px;
  overflow: hidden;
  position: relative;
}

.tiny-label {
  padding: 0;
  color: var(--workspace-blue);
  font-size: 12px;
  font-weight: 700;
}

.combo-line {
  grid-template-columns: 1fr;
  padding: 0;
}

.combo-line input,
.combo-line select,
.task-filter-row select,
.small-input,
.editor-grid input,
.editor-grid select,
.note-area textarea,
.annual-form input[type="text"],
.file-form input[type="text"],
.intrastat-form input[type="text"] {
  border: 1px solid var(--workspace-line-strong);
  border-radius: 6px;
  background: #fff;
}

.combo-line input {
  width: 100%;
  height: 30px;
  padding: 4px 8px;
}

.client-table-head {
  height: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: #f0f6fc;
  color: var(--workspace-blue);
  font-size: 12px;
  letter-spacing: 0;
}

.client-list-count {
  color: #60758b;
  font-weight: 600;
  white-space: nowrap;
}

.client-list {
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: #fff;
}

.client-section-title {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 30px;
  height: auto;
  padding: 7px 9px 6px;
  border-top: 1px solid #9eb8d5;
  border-bottom: 2px solid #86a9cf;
  background: #d9eafa;
  color: var(--workspace-blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.client-row {
  height: 29px;
  padding: 6px 9px;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
  color: #1d2d3c;
}

.client-row.missing-price {
  color: #7b1d1d;
}

.client-row.missing-price:not(.active) {
  border-left: 3px solid #cf2e2e;
  background: #fff7f7;
}

.client-price-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  border-radius: 50%;
  background: #c90000;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.client-row:hover {
  background: #f2f7fd;
}

.client-row.active {
  border-left: 4px solid #2f76bb;
  background: #e7f2ff;
  color: #102f4f;
  font-weight: 700;
}

.client-row.inactive {
  background: #f8fafc;
  color: #778594;
  opacity: .6;
}

.client-row.inactive.active,
.client-row.inactive:hover {
  background: #eef3f8;
  opacity: .85;
}

.work-pane {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  position: relative;
}

.client-pane.task-locked,
.work-pane.task-locked {
  cursor: not-allowed;
}

.client-pane.task-locked::after,
.work-pane.task-locked::after {
  content: "Имате неприключени задачи над 72 часа";
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(247, 250, 253, .78);
  color: #a7352f;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.client-card {
  grid-template-columns: minmax(300px, .75fr) minmax(420px, 1.25fr);
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--workspace-line);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.client-name-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 0;
  border-right: 0;
}

.client-name-row h1 {
  grid-column: 1 / -1;
  color: #0f2f52;
  font-size: 26px;
  line-height: 1.15;
}

.client-active-status {
  min-width: 138px;
  height: 30px;
  margin-top: 0;
}

.client-status-readonly {
  cursor: default;
  user-select: none;
}

.client-owner-line {
  margin-top: 0;
  color: var(--workspace-text-soft);
  font-size: 13px;
}

.client-owner-line b {
  color: #133a62;
}

.client-info-grid {
  gap: 7px 18px;
  padding: 0;
  align-content: center;
}

.client-info-grid div {
  min-height: 30px;
  padding: 7px 9px;
  border: 1px solid #e1e9f2;
  border-radius: 7px;
  background: #fff;
}

.client-info-grid span {
  min-width: 70px;
  color: var(--workspace-text-soft);
  font-size: 12px;
  font-weight: 700;
}

.client-info-grid b {
  color: #162d45;
  font-weight: 700;
}

.module-tabs {
  height: 42px;
  align-items: end;
  gap: 4px;
  padding: 8px 12px 0;
  border-bottom: 1px solid var(--workspace-line-strong);
  background: var(--workspace-soft);
}

.tab {
  height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--workspace-line-strong);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #eaf1f8;
  color: #34536f;
  font-weight: 700;
}

.tab:hover {
  background: #f5f9fd;
}

.tab.active {
  border-color: var(--workspace-line-strong);
  background: #fff;
  color: #0d3862;
  box-shadow: 0 -2px 0 #2f76bb inset;
}

.module-toolbar {
  height: 44px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--workspace-line);
  background: #fff;
}

.module-toolbar select {
  height: 30px;
  min-width: 78px;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 6px;
  background: #fff;
  color: #173b63;
  font-weight: 700;
}

.close-year-btn {
  min-width: 145px;
  border-color: #b9d2ee;
  background: #e8f4ff;
  color: #0f4e86;
}

.close-year-btn:disabled {
  border-color: #d5e4d8;
  background: #f2faf4;
  color: #4f8a5f;
  cursor: default;
}

.classic-btn,
.mini-button {
  min-height: 28px;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #edf3f9 100%);
  color: #213b55;
  font-weight: 600;
}

.classic-btn:hover,
.mini-button:hover {
  background: #e8f2ff;
}

.classic-btn.disabled {
  border-color: #d5dce4;
  background: #eef1f5;
  color: #9aa5b1;
}

.classic-btn.danger {
  border-color: #ecc1c1;
  background: #fff4f4;
  color: #993333;
}

.module-body {
  padding: 10px 12px 12px;
  background: #fff;
}

.module-grid-shell {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 0;
}

.grid-scroll {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 8px;
  background: #fff;
}

.grid-scroll .grid-table thead th,
.report-table-wrap .grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f1f6fb;
  box-shadow: 0 1px 0 var(--workspace-line-strong);
}

.grid-table th,
.grid-table td {
  border-color: #d3dce8;
  height: 25px;
  padding: 4px 6px;
}

.grid-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f6fb;
  color: #16395b;
}

.module-body .grid-table {
  font-size: 14px;
}

.module-body .grid-table td.num,
.module-body .grid-table input.dds-number,
.module-body .grid-table input[type="number"] {
  font-weight: 700;
}

.accounting-table,
.dds-table {
  font-size: 15px;
}

.accounting-table th,
.accounting-table td,
.dds-table th,
.dds-table td {
  height: 34px;
  padding: 6px 8px;
  font-size: 15px;
}

.accounting-table {
  min-width: 1300px;
}

.dds-table {
  min-width: 1220px;
}

.dds-table th {
  height: 30px;
  padding: 3px 4px;
  font-size: 13px;
  line-height: 1.12;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.dds-table td {
  height: 28px;
  padding: 3px 5px;
  font-size: 14px;
}

.dds-table th:nth-child(2),
.dds-table th:nth-child(3),
.dds-table th:nth-child(11),
.dds-table th:nth-child(12) {
  width: 72px;
}

.dds-table th:nth-child(4),
.dds-table th:nth-child(5),
.dds-table th:nth-child(6),
.dds-table th:nth-child(7) {
  width: 96px;
}

.dds-table th:nth-child(8),
.dds-table th:nth-child(9),
.dds-table th:nth-child(10),
.dds-table th:nth-child(13) {
  width: 112px;
}

.file-table {
  min-width: 760px;
  font-size: 15px;
}

.file-table th,
.file-table td {
  height: 34px;
  padding: 7px 10px;
  font-size: 15px;
}

.annual-table {
  min-width: 1420px;
  font-size: 15px;
}

.annual-table th,
.annual-table td {
  height: 36px;
  padding: 7px 10px;
  font-size: 15px;
}

.payroll-table {
  min-width: 980px;
  font-size: 15px;
}

.payroll-table th,
.payroll-table td {
  height: 26px;
  padding: 3px 7px;
  font-size: 15px;
}

.payroll-subtabs {
  padding: 0 0 10px;
}

.payroll-contracts-table {
  min-width: 1230px;
}

.payroll-contracts-table th {
  white-space: normal;
  line-height: 1.15;
}

.payroll-contracts-table th:nth-child(8),
.payroll-contracts-table th:nth-child(9),
.payroll-contracts-table th:nth-child(10),
.payroll-contracts-table td:nth-child(8),
.payroll-contracts-table td:nth-child(9),
.payroll-contracts-table td:nth-child(10) {
  white-space: nowrap;
}

.payroll-contracts-table td {
  padding: 2px 5px;
}

.payroll-cell {
  width: 100%;
  height: 22px;
  box-sizing: border-box;
  border: 1px solid #afc4dc;
  border-radius: 5px;
  background: #fff;
  color: #172a3d;
  font: inherit;
  font-weight: 700;
}

.payroll-cell:disabled {
  border-color: transparent;
  background: transparent;
  color: #24384c;
  opacity: 1;
}

.payroll-alert-field,
.payroll-alert-field:disabled {
  color: #c21f1f;
}

.payroll-contracts-table tbody tr:not(.payroll-selected) .payroll-cell:disabled {
  pointer-events: none;
}

.payroll-contract-number {
  text-align: center;
  padding: 0 4px;
}

.payroll-selected td {
  background: #eaf4ff;
  box-shadow: inset 0 1px 0 #d5e8fb, inset 0 -1px 0 #d5e8fb;
}

.payroll-row-button {
  width: 100%;
  min-height: 22px;
  border: 0;
  background: transparent;
  color: #173b63;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.payroll-selected .payroll-row-button {
  color: #0b5594;
  font-weight: 800;
}

.payroll-num,
.payroll-date,
.payroll-small {
  text-align: center;
}

.payroll-import-strip {
  padding-top: 4px;
}

.payroll-save-strip {
  min-height: 34px;
}

.payroll-archive-table {
  min-width: 720px;
}

.dds-table tbody tr.dds-selected td {
  background: #eaf4ff;
  box-shadow: inset 0 1px 0 #d5e8fb, inset 0 -1px 0 #d5e8fb;
}

.dds-month-button {
  width: 100%;
  min-height: 30px;
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: #173b63;
  text-align: left;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.dds-month-button span {
  display: block;
  color: #bd1f2d;
  font-size: 12px;
  font-weight: 500;
}

.dds-selected .dds-month-button {
  color: #0b5594;
  font-weight: 800;
}

.dds-cell {
  width: 100%;
  height: 24px;
  box-sizing: border-box;
  border: 1px solid #afc4dc;
  border-radius: 5px;
  background: #fff;
  color: #172a3d;
  font: inherit;
}

.dds-number {
  text-align: right;
}

.dds-number.delta-pending-cell {
  color: #9a6500;
  font-weight: 900;
  text-align: center;
}

.dds-number.delta-empty-cell {
  color: #9b1c1c;
  font-weight: 900;
  text-align: center;
}

.dds-check {
  width: 17px;
  height: 17px;
  accent-color: #145a96;
  opacity: 1;
}

.dated-check {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  min-width: 118px;
}

.dated-check-date {
  color: #1e3c5a;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 700;
  white-space: nowrap;
}

.dated-check:not(.has-date) .dated-check-date {
  visibility: hidden;
}

.dated-check.is-checked .dated-check-date,
.dated-check.has-date .dated-check-date {
  visibility: visible;
  color: #123a5f;
}

.dds-cell:disabled {
  border-color: transparent;
  background: transparent;
  color: #24384c;
  opacity: 1;
}

.dds-check:disabled {
  opacity: .85;
}

.dds-chief-locked:disabled {
  opacity: .72;
}

.dated-check.is-checked .dds-check:disabled,
.dated-check.has-date .dds-check:disabled {
  opacity: 1;
}

.dds-import-strip,
.dds-save-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.dds-import-strip {
  min-height: 38px;
  padding: 8px 2px 0;
}

.dds-save-strip {
  min-height: 42px;
  padding: 2px 2px 0;
}

.hidden-file-input {
  display: none;
}

.dds-import-button {
  min-width: 180px;
  height: 32px;
  border-color: #b9d2ee;
  background: #f3f8ff;
  color: #16395b;
  font-weight: 700;
}

.dds-save-button {
  min-width: 96px;
  font-size: 16px;
}

.dds-save-message {
  min-height: 22px;
  color: #637487;
  font-size: 14px;
  font-weight: 700;
}

.dds-import-message {
  min-height: 20px;
  color: #637487;
  font-size: 13px;
  font-weight: 700;
}

.dds-save-message.ok {
  color: #16733a;
}

.dds-import-message.ok {
  color: #16733a;
}

.dds-save-message.error,
.dds-import-message.error {
  color: #b42318;
}

.file-employee-input,
.file-turnover-input {
  width: 100%;
  min-width: 96px;
  height: 24px;
  box-sizing: border-box;
  border: 1px solid #afc4dc;
  border-radius: 5px;
  background: #fff;
  color: #17324d;
  font: inherit;
  font-weight: 700;
  text-align: right;
  padding: 0 6px;
}

.file-employee-input {
  min-width: 64px;
  font-size: 16px;
  text-align: right;
  padding-right: 10px;
}

.file-total-row td {
  background: #eaf4ff !important;
  font-weight: 800;
  color: #0b3760;
}

.turnover-limit-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #d93025;
  border-radius: 6px;
  background: #fff2f2;
  color: #9f1c15;
  font-weight: 700;
}

.turnover-limit-warning label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: #17324d;
}

.grid-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.payroll-contracts-table tbody tr.payroll-selected td {
  background: #eaf4ff;
  box-shadow: inset 0 1px 0 #d5e8fb, inset 0 -1px 0 #d5e8fb;
}

.payroll-contracts-table tbody tr.payroll-selected .payroll-row-button {
  color: #0b5594;
  font-weight: 800;
}

.dds-table tbody tr.dds-selected td {
  background: #eaf4ff;
}

.dds-table tbody tr.dds-refund-ready td:nth-child(n+3):nth-child(-n+7) {
  background: #e9f8ee;
  box-shadow: inset 0 1px 0 #ccebd7, inset 0 -1px 0 #ccebd7;
}

.dds-table tbody tr.dds-period-warning td:nth-child(n+3):nth-child(-n+7) {
  background: #fdeaea;
  box-shadow: inset 0 1px 0 #f4c5c5, inset 0 -1px 0 #f4c5c5;
}

.dds-table tbody tr.dds-selected.dds-refund-ready td:nth-child(n+3):nth-child(-n+7) {
  background: #d8f2df;
}

.dds-table tbody tr.dds-selected.dds-period-warning td:nth-child(n+3):nth-child(-n+7) {
  background: #fbd7d7;
}

.grid-check {
  accent-color: #2f76bb;
}

.editor-panel {
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #f8fbfe;
}

.editor-group {
  gap: 8px;
}

.note-area label {
  color: var(--workspace-blue);
}

.note-area textarea {
  height: 62px;
  padding: 7px 8px;
}

.save-button {
  border-color: #b9d2ee;
  background: #e8f4ff;
  color: #0f4e86;
  font-size: 18px;
}

.file-tabs {
  gap: 4px;
}

.subtab {
  border-color: var(--workspace-line-strong);
  border-radius: 6px;
  background: #eef4fa;
  color: #284a68;
}

.subtab.active {
  background: #fff;
  color: #0d3862;
}

.file-preview,
.attachment-box {
  border-color: var(--workspace-line);
  border-radius: 8px;
  background: #fff;
}

.task-pane {
  grid-template-rows: 400px minmax(0, 1fr) auto;
  overflow: hidden;
}

.task-pane.has-review-queue {
  grid-template-rows: 400px minmax(150px, 0.72fr) minmax(180px, 1.28fr) auto;
}

.dashboard-pane {
  display: grid;
  grid-template-columns: calc(50% - 4px) calc(50% - 4px);
  gap: 8px;
  width: 100%;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
  border-bottom: 1px solid var(--workspace-line);
  background: #edf3f9;
}

.accounting-review-queue {
  min-height: 0;
  padding: 8px;
  overflow: hidden;
  border-bottom: 1px solid #e7a7a7;
  background: #fff5f5;
}

.accounting-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid #d94747;
  border-radius: 9px 9px 0 0;
  background: #ffe3e3;
  color: #a40000;
}

.accounting-review-head strong {
  font-size: 14px;
  font-weight: 900;
}

.accounting-review-head span {
  min-width: 23px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #b40000;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.accounting-review-list {
  height: calc(100% - 32px);
  overflow: auto;
  border: 1px solid #e19a9a;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  background: #fff;
  scrollbar-width: thin;
}

.accounting-review-item {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #f0c5c5;
  background: #fff;
  color: #b00000;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.accounting-review-item:hover,
.accounting-review-item:focus-visible {
  outline: 0;
  background: #fff0f0;
  box-shadow: inset 4px 0 #c40000;
}

.accounting-review-item strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-review-item span {
  overflow: hidden;
  color: #c22525;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-review-empty {
  padding: 18px 10px;
  color: #9c3333;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.salary-dashboard,
.delta-dashboard {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: 384px;
  background: #fff;
  padding: 8px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-width: thin;
  border: 1px solid var(--workspace-line);
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(21, 55, 88, .08);
}

.salary-dashboard::-webkit-scrollbar,
.delta-dashboard::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.salary-dashboard {
  border-left: 1px solid #c9ded2;
}

.salary-dashboard.hidden,
.delta-dashboard.hidden {
  display: none;
}

.salary-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: #0b5b3b;
}

.salary-dashboard-head div {
  display: grid;
  gap: 2px;
}

.salary-dashboard-head b {
  font-size: 14px;
  white-space: nowrap;
}

.salary-dashboard-head span {
  color: #64786e;
  font-size: 10px;
  white-space: nowrap;
}

.salary-dashboard-head > span:last-child:empty {
  display: none;
}

.salary-dashboard-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}

.salary-dashboard-table .salary-dashboard-name-col {
  width: 59px;
}

.salary-dashboard-table .salary-dashboard-money-col {
  width: auto;
}

.salary-dashboard-table th,
.salary-dashboard-table td {
  height: 23px;
  padding: 3px 3px;
  border: 1px solid #cfe0d8;
}

.salary-dashboard-table th {
  background: #e8f6ee;
  color: #14543a;
  text-align: left;
}

.salary-dashboard-table th:first-child,
.salary-dashboard-table td:first-child {
  width: 59px;
  white-space: nowrap;
}

.salary-dashboard-table th:nth-child(2),
.salary-dashboard-table td:nth-child(2) {
  text-align: right;
}

.salary-dashboard-table th:nth-child(3),
.salary-dashboard-table td:nth-child(3) {
  text-align: right;
}

.salary-name {
  white-space: nowrap;
}

.salary-user-button {
  width: auto;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #14543a;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.salary-user-button:hover {
  color: #08733f;
  font-weight: 800;
}

.salary-count {
  color: #4a6558;
}

.salary-amount {
  color: #08733f;
  font-weight: 800;
  white-space: nowrap;
  min-width: 48px;
}

.salary-amount-locked {
  color: #31506f;
  background: #f3f6f9;
}

.delta-dashboard-head {
  display: block;
  margin-bottom: 6px;
  color: #0b355f;
  font-size: 13px;
}

.delta-dashboard-head b {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.delta-dashboard-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.delta-dashboard-table th,
.delta-dashboard-table td {
  border: 1px solid var(--workspace-line);
  padding: 3px 5px;
  height: 23px;
}

.delta-dashboard-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eaf2fb;
  color: #0b355f;
  text-align: left;
}

.delta-dashboard-table th:nth-child(2),
.delta-dashboard-table th:nth-child(3),
.delta-dashboard-table td:nth-child(2),
.delta-dashboard-table td:nth-child(3) {
  width: 45px;
  text-align: right;
}

.delta-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delta-number {
  font-weight: 700;
  color: #0b355f;
}

.delta-empty {
  color: #9b1c1c;
  font-weight: 700;
  text-align: center;
}

.task-list {
  border: 0;
  background: #fff;
}

.task-item {
  border-bottom: 1px solid var(--workspace-line);
  background: #fff;
}

.task-item:hover {
  background: #f7fbff;
}

.task-item.selected {
  outline: 2px solid #7fb4e8;
  outline-offset: -2px;
  background: #edf6ff;
}

.task-item.done {
  opacity: 0.72;
}

.task-head {
  grid-template-columns: 1fr 118px 76px;
  border-bottom: 1px solid #e2e9f1;
  background: #f5f9fd;
  color: #173b63;
}

.task-head b {
  padding: 6px 7px;
}

.task-body {
  padding: 7px 8px;
  line-height: 1.3;
}

.task-read {
  border-top: 1px solid #edf2f7;
  padding: 5px 8px;
  color: var(--workspace-text-soft);
}

.task-controls {
  padding: 10px;
  border-top: 1px solid var(--workspace-line);
  background: #f8fbfe;
}

.task-filter-row {
  gap: 5px;
}

.task-filter-row label {
  color: var(--workspace-blue);
  font-size: 12px;
  font-weight: 700;
}

fieldset {
  border-color: var(--workspace-line);
  border-radius: 7px;
  background: #fff;
}

@media (max-width: 1180px) {
  .classic-layout {
    grid-template-columns: 205px minmax(600px, 1fr) 340px;
  }

  .client-card {
    grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr);
  }
}

@media (max-width: 1600px) {
  .classic-layout {
    grid-template-columns: 205px minmax(0, 1fr) 330px;
    gap: 8px;
    padding: 8px;
  }

  .client-pane {
    gap: 6px;
    padding: 8px;
  }

  .client-row {
    height: 27px;
    padding: 5px 8px;
  }

  .client-card {
    grid-template-columns: minmax(250px, .7fr) minmax(360px, 1.3fr);
    gap: 10px;
    padding: 12px 14px 10px;
  }

  .client-name-row h1 {
    font-size: 23px;
  }

  .client-info-grid {
    gap: 6px 12px;
  }

  .client-info-grid div {
    min-height: 28px;
    padding: 6px 8px;
  }

  .module-tabs {
    height: 38px;
    padding: 6px 10px 0;
  }

  .tab {
    height: 32px;
    padding: 6px 10px;
  }

  .module-toolbar {
    height: 40px;
    padding: 5px 10px;
  }

  .module-body {
    padding: 8px 10px 10px;
  }

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

  .dds-table {
    min-width: 1080px;
  }

  .annual-table {
    min-width: 1220px;
  }

  .payroll-contracts-table {
    min-width: 1120px;
  }

  .accounting-table th,
  .accounting-table td,
  .dds-table th,
  .dds-table td,
  .annual-table th,
  .annual-table td,
  .payroll-table th,
  .payroll-table td {
    height: 30px;
    padding: 4px 6px;
    font-size: 14px;
  }

  .task-head {
    grid-template-columns: 1fr 100px 68px;
  }
}

@media (max-width: 1400px) {
  body {
    font-size: 12px;
  }

  .classic-title {
    height: 30px;
    padding: 6px 10px;
    font-size: 14px;
  }

  .classic-menu {
    height: 34px;
    padding: 4px 8px;
  }

  .classic-menu button {
    min-height: 26px;
    padding: 4px 8px;
  }

  .classic-layout {
    grid-template-columns: 185px minmax(0, 1fr) 270px;
    height: calc(100vh - 64px);
    gap: 6px;
    padding: 6px;
  }

  .client-pane {
    padding: 6px;
  }

  .combo-line input {
    height: 27px;
  }

  .client-table-head {
    gap: 8px;
    padding: 7px 8px;
  }

  .client-row {
    height: 25px;
    padding: 4px 7px;
  }

  .client-card {
    grid-template-columns: minmax(210px, .62fr) minmax(300px, 1.38fr);
    gap: 8px;
    padding: 10px 12px 8px;
  }

  .client-name-row h1 {
    font-size: 21px;
  }

  .client-active-status {
    min-width: 122px;
    height: 28px;
  }

  .client-info-grid {
    gap: 5px 8px;
  }

  .client-info-grid div {
    min-height: 26px;
    padding: 5px 7px;
  }

  .client-info-grid span {
    min-width: 56px;
  }

  .module-tabs {
    height: 36px;
    padding: 5px 8px 0;
  }

  .tab {
    height: 31px;
    padding: 6px 8px;
  }

  .module-toolbar {
    height: 38px;
    padding: 4px 8px;
  }

  .module-body {
    padding: 7px 8px 8px;
  }

  .accounting-table {
    min-width: 860px;
  }

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

  .annual-table {
    min-width: 1080px;
  }

  .payroll-table {
    min-width: 860px;
  }

  .payroll-contracts-table {
    min-width: 1030px;
  }

  .grid-table th,
  .grid-table td {
    height: 23px;
    padding: 3px 5px;
  }

  .accounting-table th,
  .accounting-table td,
  .dds-table th,
  .dds-table td,
  .annual-table th,
  .annual-table td,
  .payroll-table th,
  .payroll-table td {
    height: 27px;
    padding: 3px 5px;
    font-size: 13px;
  }

  .dds-cell,
  .payroll-cell {
    height: 21px;
  }

  .task-head {
    grid-template-columns: 1fr 78px 58px;
  }

  .task-head b,
  .task-body,
  .task-read {
    padding-left: 6px;
    padding-right: 6px;
  }
}

@media (max-height: 820px) {
  .classic-layout {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .client-card {
    padding-top: 9px;
    padding-bottom: 7px;
  }

  .client-name-row h1 {
    font-size: 21px;
  }

  .module-tabs {
    height: 35px;
    padding-top: 4px;
  }

  .tab {
    height: 31px;
  }

  .module-toolbar {
    height: 36px;
    padding-top: 3px;
    padding-bottom: 3px;
  }

  .module-body {
    padding-top: 6px;
    padding-bottom: 7px;
  }

  .accounting-table th,
  .accounting-table td,
  .dds-table th,
  .dds-table td,
  .annual-table th,
  .annual-table td,
  .payroll-table th,
  .payroll-table td {
    height: 26px;
    padding-top: 3px;
    padding-bottom: 3px;
  }

  .dds-import-strip,
  .dds-save-strip {
    min-height: 32px;
    padding-top: 3px;
  }
}

/* Reports window polish */
.reports-layout {
  grid-template-columns: 290px minmax(0, 1fr);
  height: calc(100% - 46px);
  background: #f4f7fb;
}

.reports-window .float-title {
  height: 46px;
  padding: 8px 16px;
  border-bottom: 1px solid #c7d7ea;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  color: #123253;
  font-size: 18px;
  font-weight: 700;
}

.reports-window .float-title button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #31506f;
}

.reports-window .float-title button:hover {
  background: #dfeaf8;
}

.reports-options {
  padding: 16px 12px;
  border-right: 1px solid var(--workspace-line);
  background: #fff;
}

.reports-options h2 {
  margin: 0 0 14px;
  color: var(--workspace-blue);
  font-size: 24px;
}

.report-filter-grid {
  gap: 10px;
}

.report-filter-grid label {
  gap: 4px;
  color: var(--workspace-blue);
  font-size: 12px;
  font-weight: 700;
}

.report-filter-grid select {
  height: 30px;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 6px;
  background: #fff;
}

.report-tabs {
  gap: 4px;
  margin-top: 14px;
}

.report-tab {
  height: 31px;
  padding: 6px 9px;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 7px;
  background: #eef4fa;
  color: #284a68;
  font-size: 12px;
  font-weight: 700;
}

.report-tab.active {
  border-color: #9fc2e8;
  background: #e8f4ff;
  color: #0f4e86;
}

.classic-fieldset {
  margin-top: 14px;
  border-color: var(--workspace-line);
  border-radius: 8px;
  background: #f8fbfe;
}

.classic-fieldset legend {
  color: var(--workspace-blue);
  font-weight: 700;
}

.radio-grid {
  grid-template-columns: 86px 50px 50px 62px;
  gap: 4px;
}

.report-table-wrap {
  padding: 16px;
  background: #f4f7fb;
  min-height: 0;
  overflow: auto;
}

.report-table-wrap .grid-table {
  border: 1px solid var(--workspace-line-strong);
  border-radius: 8px;
  overflow: hidden;
}

/* Strong compact mode for older/smaller office monitors. */
@media (max-width: 1440px), (max-height: 820px) {
  html,
  body {
    font-size: 11px;
  }

  .app-window {
    min-width: 0;
  }

  .classic-title {
    height: 26px;
    padding: 4px 9px;
    font-size: 12px;
  }

  .classic-menu {
    height: 28px;
    padding: 3px 7px;
    gap: 12px;
  }

  .classic-menu button,
  .classic-btn,
  .mini-button {
    min-height: 22px;
    padding: 2px 7px;
    font-size: 11px;
  }

  .classic-layout {
    grid-template-columns: 165px minmax(0, 1fr) 230px;
    height: calc(100vh - 54px);
    gap: 5px;
    padding: 5px;
  }

  .client-pane,
  .task-pane,
  .work-pane {
    min-width: 0;
  }

  .client-pane {
    gap: 4px;
    padding: 5px;
  }

  .combo-line input {
    height: 23px;
    padding: 2px 6px;
    font-size: 11px;
  }

  .client-table-head {
    min-height: 26px;
    padding: 4px 6px;
    gap: 6px;
    font-size: 11px;
  }

  .client-section-title {
    min-height: 26px;
    padding: 6px 7px 5px;
    font-size: 12px;
  }

  .client-row {
    height: 22px;
    padding: 3px 6px;
    font-size: 11px;
  }

  .client-card {
    grid-template-columns: minmax(185px, .48fr) minmax(300px, 1.52fr);
    gap: 7px;
    padding: 7px 9px;
  }

  .client-name-row h1 {
    font-size: 18px;
    line-height: 1.08;
  }

  .client-active-status {
    min-width: 112px;
    height: 23px;
    padding: 3px 8px;
    font-size: 11px;
  }

  .client-info-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 3px 7px;
    font-size: 11px;
  }

  .client-info-grid div {
    min-height: 23px;
    padding: 4px 6px;
  }

  .client-info-grid span {
    min-width: 48px;
  }

  .module-tabs {
    height: 30px;
    padding: 4px 6px 0;
  }

  .tab {
    height: 26px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .module-toolbar {
    height: 32px;
    padding: 3px 6px;
    gap: 5px;
  }

  .module-toolbar select {
    height: 23px;
    min-width: 64px;
    font-size: 11px;
  }

  .module-body {
    padding: 5px 6px 6px;
  }

  .module-grid-shell {
    gap: 5px;
  }

  .grid-scroll {
    overflow: auto;
  }

  .grid-table,
  .module-body .grid-table,
  .accounting-table,
  .dds-table,
  .annual-table,
  .file-table,
  .payroll-table,
  .payroll-contracts-table {
    width: 100%;
    min-width: 0;
    font-size: 11px;
  }

  .grid-table th,
  .grid-table td,
  .accounting-table th,
  .accounting-table td,
  .dds-table th,
  .dds-table td,
  .annual-table th,
  .annual-table td,
  .file-table th,
  .file-table td,
  .payroll-table th,
  .payroll-table td {
    height: 23px;
    padding: 2px 4px;
    font-size: 11px;
    line-height: 1.12;
  }

  .accounting-table th,
  .dds-table th,
  .annual-table th,
  .payroll-contracts-table th {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .grid-table input[type="text"],
  .grid-table input[type="number"],
  .grid-table select,
  .dds-cell,
  .payroll-cell {
    height: 20px;
    padding: 1px 4px;
    font-size: 11px;
  }

  .grid-check,
  .grid-table input[type="checkbox"] {
    width: 12px;
    height: 12px;
  }

  .accounting-table th:first-child,
  .accounting-table td:first-child,
  .dds-table th:first-child,
  .dds-table td:first-child {
    width: 58px !important;
  }

  .dds-table th:nth-child(2),
  .dds-table td:nth-child(2),
  .dds-table th:nth-child(3),
  .dds-table td:nth-child(3),
  .dds-table th:nth-child(11),
  .dds-table td:nth-child(11),
  .dds-table th:nth-child(12),
  .dds-table td:nth-child(12) {
    width: 52px !important;
  }

  .dds-table th:nth-child(8),
  .dds-table td:nth-child(8),
  .dds-table th:nth-child(9),
  .dds-table td:nth-child(9),
  .dds-table th:nth-child(10),
  .dds-table td:nth-child(10),
  .dds-table th:nth-child(13),
  .dds-table td:nth-child(13) {
    width: 82px !important;
  }

  .payroll-contracts-table th:nth-child(1),
  .payroll-contracts-table td:nth-child(1) {
    width: 42px !important;
  }

  .payroll-contracts-table th:nth-child(2),
  .payroll-contracts-table td:nth-child(2) {
    width: 230px !important;
  }

  .payroll-contracts-table th:nth-child(8),
  .payroll-contracts-table td:nth-child(8),
  .payroll-contracts-table th:nth-child(9),
  .payroll-contracts-table td:nth-child(9),
  .payroll-contracts-table th:nth-child(10),
  .payroll-contracts-table td:nth-child(10) {
    width: 95px !important;
    white-space: nowrap;
  }

  .payroll-contracts-table th:nth-child(11),
  .payroll-contracts-table td:nth-child(11) {
    width: 54px !important;
  }

  .dds-import-strip,
  .dds-save-strip {
    min-height: 30px;
    padding: 3px 4px;
    gap: 6px;
  }

  .task-head {
    grid-template-columns: 1fr 58px;
    font-size: 10px;
  }

  .task-head span {
    grid-column: 1 / -1;
  }

  .task-head b,
  .task-body,
  .task-read {
    padding: 4px 5px;
  }

  .task-body {
    font-size: 10px;
    line-height: 1.22;
  }

  .task-controls {
    padding: 5px;
  }

  .task-filter-row {
    gap: 3px;
  }

  .task-filter-row label {
    font-size: 10px;
  }

  .task-controls select,
  .task-controls button,
  .task-controls textarea {
    font-size: 10px;
  }
}

@media (max-width: 1180px) {
  .classic-layout {
    grid-template-columns: 148px minmax(0, 1fr) 185px;
    gap: 4px;
    padding: 4px;
  }

  .client-card {
    grid-template-columns: minmax(155px, .42fr) minmax(250px, 1.58fr);
  }

  .client-name-row h1 {
    font-size: 16px;
  }

  .client-info-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    font-size: 10px;
  }

  .grid-table,
  .module-body .grid-table,
  .accounting-table,
  .dds-table,
  .annual-table,
  .file-table,
  .payroll-table,
  .payroll-contracts-table {
    font-size: 10px;
  }

  .grid-table th,
  .grid-table td,
  .accounting-table th,
  .accounting-table td,
  .dds-table th,
  .dds-table td,
  .annual-table th,
  .annual-table td,
  .file-table th,
  .file-table td,
  .payroll-table th,
  .payroll-table td {
    height: 21px;
    padding: 1px 3px;
    font-size: 10px;
  }

  .grid-table input[type="text"],
  .grid-table input[type="number"],
  .grid-table select,
  .dds-cell,
  .payroll-cell {
    height: 18px;
    padding: 1px 3px;
    font-size: 10px;
  }

  .task-pane {
    font-size: 10px;
  }
}

/* Compact access-management window. */
.floating-window.admin-window {
  left: 7.5vw;
  top: 7.5vh;
  width: 85vw;
  height: 85vh;
}

.admin-window .float-title {
  height: 34px;
  padding: 5px 12px;
  font-size: 17px;
}

.admin-layout {
  height: calc(100% - 34px);
  grid-template-columns: 260px minmax(0, 1fr);
}

.admin-users {
  padding: 8px;
}

.admin-editor {
  overflow: hidden;
  padding: 8px 10px 8px;
  grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr) auto;
}

.admin-hero {
  padding: 0 0 6px;
}

.admin-hero h2 {
  font-size: 22px;
}

.admin-hero p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.25;
}

.admin-section-title {
  margin: 8px 0 5px;
  padding-bottom: 4px;
  font-size: 15px;
  line-height: 1.25;
}

.admin-form-grid {
  grid-template-columns: minmax(260px, 1.45fr) minmax(170px, 1fr) minmax(170px, 1fr);
  gap: 10px 14px;
  box-sizing: border-box;
  width: min(720px, 100%);
  max-width: 720px;
  min-height: 104px;
  margin-bottom: 7px;
  padding: 12px 14px;
}

.admin-form-grid label {
  font-size: 12px;
}

.admin-form-grid input,
.admin-form-grid select {
  height: 30px;
}

.admin-inline-edit {
  gap: 7px;
}

.active-status {
  align-self: end;
  height: 30px;
  min-width: 0;
  padding: 4px 8px;
}

.active-status span {
  font-size: 12px;
}

.permissions-grid {
  grid-template-columns: repeat(4, 155px);
  gap: 5px 8px;
  max-width: 680px;
  margin-bottom: 6px;
  padding: 7px 9px;
}

.permissions-grid label {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 12px;
}

.company-rights-toolbar {
  grid-template-columns: 240px 76px 86px auto;
  gap: 5px;
  margin-bottom: 5px;
  padding: 6px 8px;
}

.admin-company-list {
  min-height: 0;
  height: 100%;
  align-self: stretch;
}

.admin-company-filterbar {
  padding: 5px 7px;
}

.admin-company-filter {
  min-height: 24px;
  padding: 3px 10px;
  font-size: 12px;
}

.admin-company-two-column {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  align-items: start;
}

.admin-company-column-list {
  min-width: 0;
}

.admin-company-column-list:first-child {
  border-right: 1px solid #d2dbe8;
}

.admin-company-two-column .admin-company-row:nth-child(odd) {
  border-right: 0;
}

.admin-company-row {
  min-height: 21px;
  padding: 1px 5px;
}

.admin-company-row .company-owner {
  font-size: 11px;
}

/* Larger text inside opened popup windows. */
.floating-window,
.floating-window input,
.floating-window select,
.floating-window button,
.floating-window table {
  font-size: 14px;
}

.salary-report-window .float-title,
.admin-window .float-title,
.companies-window .float-title,
.reports-window .float-title {
  font-size: 20px;
}

.salary-report-table {
  font-size: 13px;
}

.salary-dashboard-table .salary-dashboard-name-col,
.salary-dashboard-table th:first-child,
.salary-dashboard-table td:first-child {
  width: 59px;
}

.admin-actions {
  margin-top: 6px;
  padding-bottom: 0;
}

/* Fixed right-side dashboard column proportions and larger readable text. */
.salary-dashboard-table {
  table-layout: fixed;
  font-size: 12px;
}

.salary-dashboard-table .salary-dashboard-name-col,
.salary-dashboard-table th:first-child,
.salary-dashboard-table td:first-child {
  width: 59px;
}

.salary-name,
.salary-user-button {
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.salary-dashboard-table th,
.salary-amount {
  font-size: 12px;
  line-height: 1.15;
}

.salary-dashboard-head b,
.delta-dashboard-head b {
  font-size: 15px;
}

.salary-dashboard-head span {
  font-size: 11px;
}

.delta-dashboard-table {
  table-layout: fixed;
  font-size: 13px;
}

.delta-dashboard-table th:first-child,
.delta-dashboard-table td:first-child {
  width: auto;
}

.delta-dashboard-table th:nth-child(2),
.delta-dashboard-table th:nth-child(3),
.delta-dashboard-table td:nth-child(2),
.delta-dashboard-table td:nth-child(3) {
  width: 45px;
}

.delta-name {
  font-size: 13px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delta-number {
  font-size: 13px;
  line-height: 1.15;
}

.delta-wait-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background: rgba(232, 240, 248, .72);
  backdrop-filter: blur(2px);
}

.delta-wait-overlay.hidden {
  display: none;
}

.delta-wait-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(420px, calc(100vw - 40px));
  padding: 24px 28px;
  border: 1px solid #8fb4d9;
  border-radius: 14px;
  background: #fff;
  color: #123c63;
  box-shadow: 0 14px 35px rgba(17, 56, 95, .22);
  text-align: center;
}

.delta-wait-card strong {
  font-size: 20px;
  font-weight: 900;
}

.delta-wait-card span {
  color: #48647d;
  font-size: 13px;
  font-weight: 700;
}

.delta-wait-spinner {
  width: 42px;
  height: 42px;
  border: 5px solid #d8e8f8;
  border-top-color: #1d6faa;
  border-radius: 50%;
  animation: delta-wait-spin .8s linear infinite;
}

@keyframes delta-wait-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive right sidebar for older/narrow office monitors.
   The two dashboard cards must not share one narrow row, because their
   columns become unreadable. Stack them vertically instead. */
@media (max-width: 1440px) {
  .classic-layout {
    grid-template-columns: 165px minmax(0, 1fr) 250px;
  }

  .dashboard-pane {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 6px;
    padding: 6px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .salary-dashboard,
  .delta-dashboard {
    height: auto;
    max-height: 190px;
    padding: 6px;
  }

  .salary-dashboard-table,
  .delta-dashboard-table {
    font-size: 11px;
  }

  .salary-dashboard-table th,
  .salary-dashboard-table td,
  .delta-dashboard-table th,
  .delta-dashboard-table td {
    height: 21px;
    padding: 2px 3px;
  }

  .salary-dashboard-table .salary-dashboard-name-col,
  .salary-dashboard-table th:first-child,
  .salary-dashboard-table td:first-child {
    width: 64px;
  }

  .delta-dashboard-table th:nth-child(2),
  .delta-dashboard-table th:nth-child(3),
  .delta-dashboard-table td:nth-child(2),
  .delta-dashboard-table td:nth-child(3) {
    width: 42px;
  }

  .salary-dashboard-head b,
  .delta-dashboard-head b {
    font-size: 14px;
  }

  .salary-name,
  .salary-user-button,
  .salary-amount,
  .delta-name,
  .delta-number {
    font-size: 11px;
  }
}

@media (max-width: 1180px) {
  .classic-layout {
    grid-template-columns: 145px minmax(0, 1fr) 230px;
  }

  .salary-dashboard,
  .delta-dashboard {
    max-height: 175px;
  }

  .salary-dashboard-table .salary-dashboard-name-col,
  .salary-dashboard-table th:first-child,
  .salary-dashboard-table td:first-child {
    width: 58px;
  }

  .delta-dashboard-table th:nth-child(2),
  .delta-dashboard-table th:nth-child(3),
  .delta-dashboard-table td:nth-child(2),
  .delta-dashboard-table td:nth-child(3) {
    width: 39px;
  }
}
