:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #edf4f1;
  --line: #d8e3df;
  --text: #1d2927;
  --muted: #66736f;
  --accent: #2f6f68;
  --accent-strong: #235b55;
  --amber: #d29b2d;
  --danger: #b84a4a;
  --focus: #6aa7a0;
  --shadow: 0 16px 40px rgba(34, 50, 47, 0.12);
}

.print-context, .print-employee-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.print-context-summary { white-space: pre-line; line-height: 1.7; margin: 16px 0; color: var(--muted); overflow-wrap: anywhere; }
.print-workspace { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 28px; margin-top: 24px; align-items: start; }
.print-catalog h3, #printSettingsForm > h3 { margin-bottom: 16px; }
.print-form-choice { display: flex; align-items: flex-start; gap: 10px; border-bottom: 1px solid var(--line); padding: 12px 0; cursor: pointer; }
.print-form-choice input { width: 18px; min-height: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0; accent-color: var(--accent); }
.print-form-choice strong { display: block; font-size: 14px; color: var(--text); font-weight: 600; }
.print-form-choice small { display: block; line-height: 1.45; margin-top: 5px; font-size: 12px; font-weight: 400; }
#printSettings { display: grid; gap: 20px; }
#printSettings fieldset { border: 0; border-top: 1px solid var(--line); padding: 14px 0 0; min-width: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
#printSettings legend { font-weight: 650; padding-right: 10px; }
#printSettings label:has(textarea), #printSettings .check-row { grid-column: 1 / -1; }
#printSettings .check-row { display: flex; }
#printSettings .check-row input { flex: 0 0 18px; min-height: 18px; height: 18px; width: 18px; }
#printFormsView [hidden] { display: none !important; }
.print-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.print-actions button { white-space: normal; padding: 9px 16px; }
.print-legal { margin-top: 20px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.print-legal summary { cursor: pointer; font-weight: 600; color: var(--text); }
.print-legal p { margin-top: 12px; }
#printLegalSources { display: grid; gap: 8px; margin-top: 12px; }
.print-saved-status { font-size: 12px; color: var(--muted); margin-top: 14px; }
#printFormsNotice { white-space: pre-line; }
#printPreview { margin-top: 28px; scroll-margin-top: 150px; }
#printOutput { display: none; }
.print-document { max-width: 210mm; margin: 0 auto 24px; padding: 16mm; border: 1px solid var(--line); background: white; color: #111; font: 11pt/1.35 "Times New Roman", serif; overflow-wrap: anywhere; }
.print-document h2 { font: bold 15pt/1.3 "Times New Roman", serif; text-align: center; margin-bottom: 6mm; }
.print-document h3 { font: bold 11.5pt/1.3 "Times New Roman", serif; margin: 4mm 0 2mm; break-after: avoid; }
.print-document p { margin: 2.5mm 0; }
.print-document ol { padding-left: 7mm; }
.print-document li { margin: 1.5mm 0; }
.print-document table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font: inherit; }
.print-document th, .print-document td { border: 1px solid #555; padding: 3mm; color: #111; background: #fff; white-space: normal; }
.print-document tr { break-inside: avoid; }
.document-meta { display: flex; justify-content: space-between; gap: 10mm; margin-bottom: 4mm; }
.document-recipient { margin: 0 0 10mm auto; max-width: 100mm; }
.document-signatures { break-inside: avoid; margin-top: 6mm; }
@media (max-width: 900px) {
  .print-context { grid-template-columns: 1fr; }
  .print-workspace { grid-template-columns: 1fr; }
  .print-employee-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  #printSettings fieldset, .print-employee-fields { grid-template-columns: 1fr; }
  .print-document { padding: 16px; }
}
@media print {
  @page { size: A4; margin: 15mm; }
  body { background: white; min-width: 0; }
  body > * { display: none !important; }
  body > #printOutput { display: block !important; }
  #printOutput .print-document { border: 0; margin: 0; padding: 0; max-width: none; break-after: page; }
  #printOutput .print-document:last-child { break-after: auto; }
  #printOutput p { orphans: 3; widows: 3; }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.85), rgba(244,247,246,0.95)),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
}

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

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(106, 167, 160, 0.45);
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.15;
}

h2 {
  font-size: 24px;
  line-height: 1.2;
}

h3 {
  font-size: 17px;
  line-height: 1.25;
}

.is-hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(100%, 440px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  flex: 0 0 auto;
}

.brand p {
  color: var(--muted);
  margin-top: 2px;
}

.brand.compact h1 {
  font-size: 18px;
}

.brand.compact p {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.segment {
  background: transparent;
  color: var(--muted);
}

.segment.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(29, 41, 39, 0.12);
}

.auth-form {
  display: none;
  gap: 14px;
}

.auth-form.is-active {
  display: grid;
}

.phone-field,
.captcha-field {
  display: grid;
  gap: 6px;
}

.phone-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.phone-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 128, 106, 0.12);
}

.phone-prefix {
  padding: 9px 0 9px 12px;
  color: var(--text);
  font-weight: 750;
  white-space: nowrap;
}

.phone-input input {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.phone-input input:focus {
  outline: none;
}

.captcha-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.captcha-question {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  font-weight: 750;
  color: var(--accent-strong);
}

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

.primary,
.secondary,
.ghost {
  padding: 9px 14px;
  font-weight: 750;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  background: var(--accent-strong);
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-strong);
}

.secondary:hover {
  background: #f7fbfa;
}

.ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

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

.notice {
  min-height: 22px;
  color: var(--muted);
  line-height: 1.45;
}

.notice.success {
  color: var(--accent-strong);
}

.notice.error {
  color: var(--danger);
}

.notice.warning {
  color: #805c16;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.tab {
  background: transparent;
  color: var(--muted);
  padding-inline: 12px;
  white-space: normal;
}

.tab.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(29, 41, 39, 0.12);
}

.view {
  display: none;
  padding: 24px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.view.is-active {
  display: grid;
  gap: 18px;
}

.section-head,
.panel-head,
.schedule-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.toolbar,
.action-row {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar label {
  width: 190px;
}

.compact-field {
  width: min(240px, 100%);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff6df;
  color: #725114;
  border: 1px solid #e8cd85;
  font-weight: 750;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 18px;
}

.panel,
.schedule-area {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.assistant-panel {
  display: grid;
  gap: 16px;
}

.assistant-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.assistant-status-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
}

.assistant-status-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.assistant-status-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.assistant-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 320px;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
}

.assistant-message {
  display: grid;
  gap: 6px;
  max-width: min(780px, 100%);
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow-wrap: anywhere;
}

.assistant-message.is-user {
  justify-self: end;
  border-color: #c8dcd6;
  background: #e8f3f0;
}

.assistant-message strong {
  color: var(--accent-strong);
  font-size: 13px;
}

.assistant-message p {
  white-space: pre-wrap;
  line-height: 1.5;
}

.assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.assistant-form textarea {
  min-height: 96px;
  resize: vertical;
}

.details {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.details div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}

.details dt {
  color: var(--muted);
  font-weight: 700;
}

.details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.employee-form,
.retail-point-form,
.company-form,
.task-form,
.request-form,
.development-form,
.development-card-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.employee-card-wide,
.retail-point-wide,
.company-wide,
.task-description-field,
.request-description-field,
.development-description-field {
  grid-column: 1 / -1;
}

.employee-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.premium-history {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.premium-history-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(110px, 0.45fr) minmax(150px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}

.premium-check {
  min-height: 40px;
}

.premium-remove {
  min-width: 88px;
}

.retail-point-grid,
.company-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.employee-document-upload,
.retail-point-document-upload,
.company-document-upload,
.development-attachment-upload {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.company-document-upload {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.employee-documents-list,
.retail-point-documents-list,
.company-documents-list,
.development-attachments-list {
  display: grid;
  gap: 8px;
}

.employee-documents-table,
.retail-point-documents-table,
.company-documents-table,
.development-attachments-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.employee-document-row,
.retail-point-document-row,
.company-document-row,
.development-attachment-row {
  display: grid;
  grid-template-columns: minmax(145px, 0.9fr) minmax(180px, 1fr) minmax(130px, 0.8fr) minmax(80px, 0.4fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.employee-document-row:last-child,
.retail-point-document-row:last-child,
.company-document-row:last-child,
.development-attachment-row:last-child {
  border-bottom: 0;
}

.employee-document-row span,
.employee-document-row strong,
.retail-point-document-row span,
.retail-point-document-row strong,
.company-document-row span,
.company-document-row strong,
.development-attachment-row span,
.development-attachment-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.employee-document-remove,
.retail-point-document-remove,
.company-document-remove,
.development-attachment-remove {
  min-height: 32px;
  padding: 5px 9px;
}

.access-fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.access-fieldset legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  padding: 0 4px;
}

.access-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.access-options.compact {
  min-width: 210px;
}

.point-dropdown {
  position: relative;
  width: min(360px, 100%);
}

.point-dropdown summary {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.point-dropdown-menu {
  position: absolute;
  z-index: 20;
  width: min(360px, 100%);
  max-height: 260px;
  overflow: auto;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(26, 51, 48, .14);
}

.point-dropdown-readonly {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
  color: var(--muted);
}

.mini-check {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.mini-check input {
  width: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
}

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

.repair-form {
  display: grid;
  grid-template-columns: minmax(170px, 0.85fr) minmax(140px, 0.6fr) minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.expense-form {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(135px, 0.55fr) minmax(120px, 0.55fr) minmax(150px, 0.65fr) minmax(150px, 0.65fr) minmax(190px, 0.85fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.expense-comment-field {
  grid-column: 1 / -2;
}

.expense-comment-field textarea {
  min-height: 44px;
  resize: vertical;
}

.claim-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(110px, 0.5fr) minmax(150px, 0.7fr) minmax(130px, 0.6fr) minmax(130px, 0.6fr) minmax(145px, 0.65fr) minmax(150px, 0.7fr) minmax(210px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.repair-description-field,
.task-description-field,
.claim-comment-field,
.claim-attachments-field {
  grid-column: 1 / -1;
}

.repair-attachments-cell,
.task-attachments-cell,
.claim-attachments-cell {
  min-width: 180px;
}

.repair-attachments-list,
.task-attachments-list,
.claim-attachments-list {
  display: grid;
  gap: 4px;
}

.repair-file-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  color: var(--accent-strong);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.repair-file-meta {
  color: var(--muted);
  font-size: 12px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.check-row {
  grid-auto-flow: column;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 40px;
  color: var(--text);
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.check-row.is-disabled {
  color: var(--muted);
}

.check-row.is-disabled span {
  opacity: .78;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f7faf9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.users-table select {
  min-width: 180px;
}

.employees-table {
  min-width: 1160px;
}

.retail-points-table {
  min-width: 1260px;
}

.companies-table {
  min-width: 1120px;
}

.repairs-table {
  min-width: 1120px;
}

.tasks-table {
  min-width: 1160px;
}

.requests-table {
  min-width: 1360px;
}

.development-table {
  min-width: 1180px;
}

.expenses-table {
  min-width: 1160px;
}

.claims-table {
  min-width: 1520px;
}

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

.claims-table td {
  vertical-align: top;
}

.claim-table-input,
.claim-table-select,
.claim-table-textarea {
  width: 100%;
  min-width: 0;
  font-size: 12px;
}

.claim-table-textarea {
  min-height: 42px;
  resize: vertical;
}

.claim-save-button,
.claim-delete-button {
  width: 100%;
  margin-bottom: 6px;
}

.reports-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-width: 520px;
}

.report-link {
  width: 100%;
  justify-content: flex-start;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 700;
  text-align: left;
}

.report-link:hover {
  border-color: var(--accent);
}

.report-toolbar {
  justify-content: flex-start;
  margin-top: 12px;
}

.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-filters.is-hidden {
  display: none;
}

.report-filters label {
  min-width: 190px;
}

.report-table-wrap {
  margin-top: 16px;
}

.reports-table {
  min-width: 1180px;
}

.expense-report-table {
  min-width: 720px;
}

.expense-report-details-table {
  min-width: 920px;
}

.runner-report-table {
  min-width: 780px;
}

.management-report-table {
  min-width: 2860px;
}

.reports-table th,
.reports-table td {
  padding: 8px;
}

.reports-table tfoot td {
  background: #eef8f0;
  border-top: 2px solid var(--accent);
  font-weight: 800;
}

.report-name-cell {
  min-width: 220px;
  font-weight: 700;
}

.report-number-input,
.report-comment-input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
}

.report-number-input {
  max-width: 110px;
  text-align: center;
}

.management-report-input {
  max-width: 96px;
}

.management-note-cell {
  position: relative;
}

.management-note-cell.has-note::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 0;
  height: 0;
  border-top: 10px solid #f2b705;
  border-left: 10px solid transparent;
  pointer-events: none;
}

.management-note-tooltip {
  display: none;
  position: absolute;
  top: calc(100% - 1px);
  left: 8px;
  z-index: 40;
  min-width: 240px;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid #d7dce5;
  border-radius: 6px;
  background: #fffdf3;
  box-shadow: 0 14px 34px rgba(31, 41, 55, 0.18);
  color: #1f2937;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
}

.management-note-cell.has-note:hover .management-note-tooltip,
.management-note-cell.has-note:focus-within .management-note-tooltip {
  display: block;
}

.management-note-text,
.management-note-meta {
  display: block;
}

.management-note-text {
  margin-bottom: 8px;
  font-weight: 650;
}

.management-note-meta {
  color: #6b7280;
  font-size: 11px;
}

.report-comment-input {
  min-width: 220px;
}

.report-payable-cell {
  font-weight: 800;
}

.report-negative-cell {
  background: #ffe1e1;
  color: #8b1d1d;
  font-weight: 850;
}

.runner-points-cell {
  min-width: 340px;
}

.management-address-cell {
  min-width: 260px;
}

.constant-name-cell {
  font-weight: 800;
  min-width: 180px;
}

.constant-history-cell {
  min-width: 220px;
}

.constant-value-input {
  max-width: 140px;
  text-align: center;
}

.compact-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.runner-points-list {
  display: grid;
  gap: 6px;
}

.runner-point-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 520px;
}

.runner-point-item strong {
  white-space: nowrap;
}

.status-cell {
  font-weight: 850;
}

.status-new {
  color: var(--accent-strong);
}

.status-in_work {
  color: #805c16;
}

.status-rejected {
  color: var(--danger);
}

.status-implemented {
  color: #1f6b3d;
}

.development-description-cell {
  min-width: 260px;
  white-space: normal;
}

.report-updated {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.expense-report-filters {
  margin-top: 16px;
}

.expense-header-filter,
.claim-header-filter {
  display: grid;
  gap: 5px;
  min-width: 130px;
}

.expense-header-filter span,
.claim-header-filter span {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.expense-header-filter select,
.claim-header-filter select {
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  text-transform: none;
}

.expense-delete-button,
.request-delete-button,
.claim-delete-button {
  min-height: 34px;
  padding: 6px 10px;
}

.expense-total-row td {
  border-top: 2px solid #cfe0dc;
  background: #f7faf9;
  font-weight: 850;
}

.expense-total-label {
  text-align: right;
}

.expense-total-sum {
  color: var(--accent-strong);
}

.employees-table th,
.employees-table td {
  padding: 8px;
}

.employees-table input,
.employees-table select {
  min-width: 130px;
}

.employees-table input[type="checkbox"] {
  min-width: 18px;
  width: 18px;
  min-height: 18px;
}

.employee-list-toolbar {
  margin: 10px 0 12px;
}

.employee-points-cell {
  min-width: 220px;
  max-width: 340px;
  color: var(--muted);
  white-space: normal;
}

.employees-table tr.is-archived td {
  background: #f8fafc;
  color: var(--muted);
}

.password-reset-cell {
  min-width: 150px;
}

.password-reset-value {
  display: block;
  margin-bottom: 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  color: var(--accent-strong);
  word-break: break-all;
}

.password-reveal-button,
.password-reset-button {
  min-height: 34px;
  padding: 6px 10px;
}

.password-reveal-button {
  margin-right: 6px;
}

.text-link {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 750;
  text-align: left;
  white-space: normal;
}

.text-link:hover {
  text-decoration: underline;
}

.center-cell {
  text-align: center;
}

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

.employee-list-actions {
  align-items: center;
  flex-wrap: wrap;
  min-width: 170px;
}

.danger {
  min-height: 40px;
  border: 1px solid #e6c2c2;
  background: #fff8f8;
  color: var(--danger);
  padding: 9px 12px;
  font-weight: 750;
}

.danger:hover {
  background: #ffecec;
}

.employee-list-delete,
.employee-list-archive {
  min-height: 34px;
  padding: 6px 10px;
}

.audit-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.audit-list li {
  display: grid;
  grid-template-columns: 180px minmax(140px, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.audit-list li:last-child {
  border-bottom: 0;
}

.audit-meta {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.schedule-area {
  display: grid;
  gap: 14px;
}

.schedule-actions strong {
  display: block;
  font-size: 16px;
}

.schedule-actions span {
  color: var(--muted);
  font-size: 13px;
}

#runnerSelect {
  min-width: 180px;
}

.schedule-wrap {
  margin-top: 0;
}

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

.schedule-table th,
.schedule-table td {
  padding: 3px;
}

.schedule-table .employee-col {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 145px;
  min-width: 145px;
  background: #fff;
}

.schedule-table thead .employee-col,
.schedule-table thead .metric-col,
.schedule-table thead .remove-col {
  background: #f7faf9;
}

.schedule-table .metric-col {
  position: sticky;
  left: 145px;
  z-index: 2;
  width: 74px;
  min-width: 74px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.schedule-table .remove-col {
  width: 42px;
  min-width: 42px;
}

.schedule-table .day-col {
  width: 30px;
  min-width: 26px;
  text-align: center;
}

.schedule-table .day-col.rate-filled {
  background: #fff3bf;
  color: var(--text);
  font-weight: 700;
}

.schedule-table .day-col.rate-filled .day-input {
  border-color: #d9a80f;
  background: #fff8d7;
  color: var(--text);
  font-weight: 700;
}

.day-label {
  display: grid;
  gap: 2px;
  justify-items: center;
  line-height: 1.1;
}

.day-label span:first-child {
  color: var(--text);
  font-size: 12px;
}

.day-label span:last-child {
  color: var(--muted);
  font-size: 9px;
  text-transform: none;
}

.schedule-table input,
.schedule-table select {
  min-width: 0;
  min-height: 28px;
  border-radius: 6px;
  padding: 3px 4px;
}

.schedule-table select[name="employeeId"] {
  font-size: 11px;
}

.schedule-table input.day-input {
  text-align: center;
  font-size: 10px;
  padding-inline: 2px;
}

.schedule-table input.day-input::-webkit-outer-spin-button,
.schedule-table input.day-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.schedule-table .employee-start-row td {
  border-top: 2px solid #cfe0dc;
}

.remove-row {
  width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid #e6c2c2;
  background: #fff8f8;
  color: var(--danger);
}

.summary-block {
  display: grid;
  gap: 10px;
}

.summary-block h3 {
  font-size: 16px;
}

.summary-wrap {
  margin-top: 0;
  width: 100%;
  overflow-x: auto;
}

.summary-table {
  width: 100%;
  min-width: 1100px;
  table-layout: fixed;
}

.summary-table th,
.summary-table td {
  padding: 6px 8px;
  height: 44px;
  vertical-align: middle;
}

.summary-table th:first-child,
.summary-table td:first-child {
  width: 21%;
  white-space: nowrap;
}

.summary-table th:nth-child(n + 2),
.summary-table td:nth-child(n + 2) {
  width: 7.1818%;
  text-align: center;
}

.summary-table thead tr,
.summary-table thead th {
  height: 54px;
}

.summary-table thead th {
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.summary-table .numeric-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.summary-table tfoot td {
  border-top: 2px solid #cfe0dc;
  background: #f7faf9;
  font-weight: 800;
}

.summary-total-label {
  color: var(--text);
}

.summary-input {
  width: 100%;
  min-width: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .schedule-table {
    min-width: 980px;
  }

  .summary-table {
    min-width: 1100px;
  }
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    position: static;
  }

  .tabs,
  .topbar .ghost {
    justify-self: stretch;
  }

  .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    min-width: 0;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .tabs .tab {
    flex: 0 0 auto;
  }

  .topbar > .ghost {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-grid,
  .inline-form,
  .employee-form,
  .retail-point-form,
  .retail-point-grid,
  .company-form,
  .company-grid,
  .development-form,
  .development-card-form,
  .assistant-form,
  .task-form,
  .request-form,
  .expense-form,
  .claim-form,
  .repair-form {
    grid-template-columns: 1fr;
  }

  .expense-comment-field {
    grid-column: 1 / -1;
  }

  .premium-history-row {
    grid-template-columns: 1fr;
  }

  .employee-document-upload,
  .employee-document-row,
  .retail-point-document-upload,
  .retail-point-document-row,
  .company-document-upload,
  .company-document-row,
  .development-attachment-upload,
  .development-attachment-row {
    grid-template-columns: 1fr;
  }

  .section-head,
  .panel-head,
  .schedule-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar label,
  .toolbar button,
  .action-row button {
    width: 100%;
  }

  .audit-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

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

@media (max-width: 560px) {
  .auth-screen,
  .view {
    padding: 14px;
  }

  .auth-panel,
  .panel,
  .schedule-area {
    padding: 14px;
  }

  .details div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .brand.compact p {
    white-space: normal;
  }

  .assistant-status-grid {
    grid-template-columns: 1fr;
  }
}
