:root {
  --bg: #f8f9fa;
  --surface: #fff;
  --border: #dadce0;
  --text: #202124;
  --accent: #1a73e8;
  --alert: #ea4335;
  --green: #c6efce;
  --yellow: #ffe566;
  --blue: #b2d8f2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

.top-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.top-bar h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.user-info {
  color: #5f6368;
  font-size: 13px;
}

.logout-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.logout-btn:hover {
  background: var(--bg);
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-card {
  width: min(400px, 92vw);
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.login-card h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
}

.login-subtitle {
  margin: 0 0 24px;
  color: #5f6368;
}

.login-form label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
}

.login-form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-sizing: border-box;
}

.login-submit {
  width: 100%;
  margin-top: 8px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.login-submit:hover {
  filter: brightness(1.05);
}

.login-error {
  color: var(--alert);
  font-size: 13px;
  margin: 0 0 8px;
}

.login-hint {
  margin: 20px 0 0;
  font-size: 12px;
  color: #5f6368;
  line-height: 1.45;
}

.login-hint code {
  font-size: 11px;
  background: #f1f3f4;
  padding: 1px 4px;
  border-radius: 4px;
}

.sheet-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.sheet-tabs button {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.sheet-tabs button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.sheet-tabs .tab-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 8px;
  align-self: center;
}

.sheet-tabs button.tab-closed.active {
  background: #5f6368;
  border-color: #5f6368;
}

.export-time.hidden,
.closed-bank-tabs.hidden {
  display: none;
}

.closed-bank-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.closed-bank-tabs .closed-bank-label {
  color: #5f6368;
  font-size: 13px;
  margin-right: 4px;
}

.closed-bank-tabs button {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.closed-bank-tabs button.active {
  background: #5f6368;
  color: #fff;
  border-color: #5f6368;
}

.closed-month-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 10px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--border);
}

.closed-month-bar.hidden {
  display: none;
}

.closed-month-label {
  font-size: 13px;
  font-weight: 600;
  color: #5f6368;
  white-space: nowrap;
}

.closed-month-input {
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.export-alert {
  background: var(--alert);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-weight: 600;
}

.lock-banner {
  background: #fef7e0;
  border-bottom: 1px solid #f9ab00;
  padding: 8px 16px;
  text-align: center;
}

.hidden { display: none !important; }

.toolbar {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  min-width: 220px;
  flex: 0 1 320px;
}

.search-label {
  font-size: 12px;
  font-weight: 600;
  color: #5f6368;
  white-space: nowrap;
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  padding: 4px 0;
  outline: none;
}

.search-input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #e8eaed;
  color: #5f6368;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.search-clear:hover {
  background: #dadce0;
  color: #202124;
}

tr.search-hidden {
  display: none;
}

.drop-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: #e8f0fe;
}

.drop-zone .drop-hint {
  color: #5f6368;
  font-size: 12px;
  user-select: none;
}

.drop-zone.hidden {
  display: none;
}

.upload-btn {
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  flex-shrink: 0;
}

.upload-btn:hover { filter: brightness(1.05); }

.edit-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

.edit-btn:hover { background: var(--bg); }

.edit-btn.active {
  background: #5f6368;
  color: #fff;
  border-color: #5f6368;
}

.edit-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f1f3f4;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.edit-panel-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.edit-panel-btn:hover { background: var(--bg); }

.edit-panel-btn-danger {
  background: #ea4335;
  color: #fff;
  border-color: #ea4335;
}

.edit-panel-btn-danger:hover { filter: brightness(1.05); }

.edit-panel-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.edit-selected-count {
  color: #5f6368;
  font-size: 12px;
  min-width: 80px;
}

th.col-check, td.col-check {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  text-align: center;
  padding: 2px 4px;
}

td.col-check input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

tr.row-selected td {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

#tickets-table tbody tr[data-ticket-id] {
  cursor: pointer;
}

#tickets-table tbody tr.row-active td {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.35);
}

.chk { display: flex; align-items: center; gap: 6px; cursor: pointer; }

.status-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.status-msg { color: #5f6368; }

.closed-export-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.closed-export-btn:hover {
  background: #e8f0fe;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.modal-box {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.modal-hint {
  margin: 0 0 16px;
  color: #5f6368;
  font-size: 13px;
  line-height: 1.4;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #3c4043;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.modal-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.modal-btn-primary:hover {
  filter: brightness(1.05);
}

.modal-btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.toolbar-happy-gif {
  height: 52px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  margin-left: 8px;
  flex-shrink: 0;
  vertical-align: middle;
}

.export-time { margin-left: auto; color: #5f6368; font-size: 12px; }

.table-wrap {
  margin: 0 12px 24px;
  overflow: auto;
  max-height: calc(100vh - 180px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.table-scale {
  zoom: 0.75;
  width: fit-content;
  min-width: 100%;
}

@supports not (zoom: 1) {
  .table-scale {
    transform: scale(0.75);
    transform-origin: top left;
    width: max(100%, 133.333%);
  }
}

#tickets-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}

th, td {
  border: 1px solid var(--border);
  padding: 2px 8px;
  vertical-align: middle;
}

tbody tr:not(.row-multiline) {
  height: 32px;
}

td .cell-inner {
  box-sizing: border-box;
  line-height: 1.3;
}

tbody tr:not(.row-multiline) td .cell-inner {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 26px;
  max-height: 28px;
}

/* одна строка с длинным комментарием: высота = комментарий, текст внутри .cell-inner */
tbody tr.row-multiline > td {
  padding: 0;
  vertical-align: top;
  overflow: hidden;
  box-sizing: border-box;
}

tbody tr.row-multiline > td.cell-clip {
  max-width: none;
}

tbody tr.row-multiline td .cell-inner {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 2px 8px;
  box-sizing: border-box;
}

tbody tr.row-multiline td.col-comment .cell-inner {
  overflow: hidden;
  padding: 2px 4px;
}

tbody tr.row-multiline td.col-comment textarea.comment-multiline {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 30px;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

tbody td.cell-clip {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th.col-desc,
td.col-desc {
  width: 15rem;
  min-width: 15em;
  max-width: 15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
th.col-crit,
td.col-crit {
  width: 6rem;
  min-width: 6rem;
  max-width: 6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
th.col-city,
td.col-city {
  width: 15rem;
  min-width: 15rem;
  max-width: 15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
th.col-engineer,
td.col-engineer {
  width: 13rem;
  min-width: 13rem;
  max-width: 13rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
th.col-comment,
td.col-comment {
  width: 30%;
  min-width: 12rem;
  vertical-align: middle;
  box-sizing: border-box;
  overflow: hidden;
}

td.col-comment .cell-edit-comment {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 26px;
  margin: 0;
  padding: 0 4px;
  font: inherit;
  font-size: 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  white-space: nowrap;
  overflow-x: auto;
  text-overflow: clip;
  box-sizing: border-box;
}

td.col-comment .cell-edit-comment:focus {
  border-color: var(--accent);
  background: #fff;
  outline: none;
}

td.col-comment textarea.comment-multiline {
  display: block;
  width: 100%;
  min-height: 34px;
  max-height: 9em;
  margin: 0;
  padding: 2px 4px;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  resize: none;
  overflow-y: auto;
  box-sizing: border-box;
}

td.col-comment textarea.comment-multiline:focus {
  border-color: var(--accent);
  background: #fff;
  outline: none;
}

th.col-timezone,
td.col-timezone {
  width: 3.75rem;
  min-width: 3.75rem;
  max-width: 3.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th.col-timezone {
  font-size: 11px;
  line-height: 1.2;
}

/* режим обслуживания (короткий фрагмент в ячейке, полный — в подсказке) */
th.col-servicing,
td.col-servicing {
  width: 5.5rem;
  min-width: 5.5rem;
  max-width: 5.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th.col-fit,
td.col-fit {
  white-space: nowrap;
  width: auto;
  max-width: none;
}

td.col-fit select {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

th.col-closure,
td.col-closure {
  width: 12rem;
  min-width: 12rem;
  max-width: 12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 6px;
  padding-right: 6px;
}

th.col-closure {
  font-size: 11px;
  line-height: 1.2;
}

td.col-closure select {
  width: 100%;
  max-width: 100%;
  font-size: 11px;
  padding: 0 2px;
  box-sizing: border-box;
}

td.col-closure[data-closure="closed"] select,
td.col-closure[data-closure="closed"] .cell-inner {
  font-weight: 500;
}

/* Закрытые: полный текст статуса («Закрыта не звонили» и т.д.) */
body.closed-view th.col-closure,
body.closed-view td.col-closure {
  width: 13.5rem;
  min-width: 13.5rem;
  max-width: 13.5rem;
}

body.closed-view td.col-closure .cell-inner {
  overflow: visible;
  text-overflow: clip;
}

th {
  position: sticky;
  top: 0;
  background: #e8eaed;
  z-index: 1;
  font-weight: 600;
  white-space: nowrap;
}

tr.highlight-green td { background: var(--green); }
tr.highlight-yellow td { background: var(--yellow); }
tr.highlight-blue td { background: var(--blue); }

/* колонка «Действие» — цвет ячейки по значению (поверх подсветки строки) */
td.col-action[data-action] select {
  font-weight: 500;
  border-color: rgba(0, 0, 0, 0.12);
}

td.col-action[data-action] select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

td.col-action[data-action] option {
  font-weight: 500;
  color: #202124;
}

tr.highlight-green td.col-action[data-action="pozvonit"],
tr.highlight-yellow td.col-action[data-action="pozvonit"],
tr.highlight-blue td.col-action[data-action="pozvonit"],
tr.row-multiline td.col-action[data-action="pozvonit"],
td.col-action[data-action="pozvonit"] { background-color: #dadce0; }

tr.highlight-green td.col-action[data-action="pechnikov"],
tr.highlight-yellow td.col-action[data-action="pechnikov"],
tr.highlight-blue td.col-action[data-action="pechnikov"],
tr.row-multiline td.col-action[data-action="pechnikov"],
td.col-action[data-action="pechnikov"] { background-color: #c6efce; }

tr.highlight-green td.col-action[data-action="derevyanko"],
tr.highlight-yellow td.col-action[data-action="derevyanko"],
tr.highlight-blue td.col-action[data-action="derevyanko"],
tr.row-multiline td.col-action[data-action="derevyanko"],
td.col-action[data-action="derevyanko"] { background-color: #b2d8f2; }

tr.highlight-green td.col-action[data-action="bokarev"],
tr.highlight-yellow td.col-action[data-action="bokarev"],
tr.highlight-blue td.col-action[data-action="bokarev"],
tr.row-multiline td.col-action[data-action="bokarev"],
td.col-action[data-action="bokarev"] { background-color: #ffe566; }

tr.highlight-green td.col-action[data-action="zip"],
tr.highlight-yellow td.col-action[data-action="zip"],
tr.highlight-blue td.col-action[data-action="zip"],
tr.row-multiline td.col-action[data-action="zip"],
td.col-action[data-action="zip"] { background-color: #ffdfb8; }

tr.highlight-green td.col-action[data-action="ndz"],
tr.highlight-yellow td.col-action[data-action="ndz"],
tr.highlight-blue td.col-action[data-action="ndz"],
tr.row-multiline td.col-action[data-action="ndz"],
td.col-action[data-action="ndz"] { background-color: #f5c2c7; }

tr.highlight-green td.col-action[data-action="prikhodko"],
tr.highlight-yellow td.col-action[data-action="prikhodko"],
tr.highlight-blue td.col-action[data-action="prikhodko"],
tr.row-multiline td.col-action[data-action="prikhodko"],
td.col-action[data-action="prikhodko"] { background-color: #ddd6fe; }

tr.highlight-green td.col-action[data-action="zakharov"],
tr.highlight-yellow td.col-action[data-action="zakharov"],
tr.highlight-blue td.col-action[data-action="zakharov"],
tr.row-multiline td.col-action[data-action="zakharov"],
td.col-action[data-action="zakharov"] { background-color: #ffd6a5; }

tr.highlight-green td.col-action[data-action="kichko"],
tr.highlight-yellow td.col-action[data-action="kichko"],
tr.highlight-blue td.col-action[data-action="kichko"],
tr.row-multiline td.col-action[data-action="kichko"],
td.col-action[data-action="kichko"] { background-color: #a7f3d0; }

tr.highlight-green td.col-action[data-action="gorichev"],
tr.highlight-yellow td.col-action[data-action="gorichev"],
tr.highlight-blue td.col-action[data-action="gorichev"],
tr.row-multiline td.col-action[data-action="gorichev"],
td.col-action[data-action="gorichev"] { background-color: #fecaca; }

tr.highlight-green td.col-action[data-action="kataurov"],
tr.highlight-yellow td.col-action[data-action="kataurov"],
tr.highlight-blue td.col-action[data-action="kataurov"],
tr.row-multiline td.col-action[data-action="kataurov"],
td.col-action[data-action="kataurov"] { background-color: #c4b5fd; }

tr.highlight-green td.col-action[data-action="tsymbalov"],
tr.highlight-yellow td.col-action[data-action="tsymbalov"],
tr.highlight-blue td.col-action[data-action="tsymbalov"],
tr.row-multiline td.col-action[data-action="tsymbalov"],
td.col-action[data-action="tsymbalov"] { background-color: #a5f3fc; }

tr.highlight-green td.col-action[data-action="rusanov"],
tr.highlight-yellow td.col-action[data-action="rusanov"],
tr.highlight-blue td.col-action[data-action="rusanov"],
tr.row-multiline td.col-action[data-action="rusanov"],
td.col-action[data-action="rusanov"] { background-color: #fbcfe8; }

tr.highlight-green td.col-action[data-action="yarmak"],
tr.highlight-yellow td.col-action[data-action="yarmak"],
tr.highlight-blue td.col-action[data-action="yarmak"],
tr.row-multiline td.col-action[data-action="yarmak"],
td.col-action[data-action="yarmak"] { background-color: #bbf7d0; }

tr.highlight-green td.col-action[data-action="chistov"],
tr.highlight-yellow td.col-action[data-action="chistov"],
tr.highlight-blue td.col-action[data-action="chistov"],
tr.row-multiline td.col-action[data-action="chistov"],
td.col-action[data-action="chistov"] { background-color: #e9d5ff; }

tr.highlight-green td.col-action[data-action="anchishin"],
tr.highlight-yellow td.col-action[data-action="anchishin"],
tr.highlight-blue td.col-action[data-action="anchishin"],
tr.row-multiline td.col-action[data-action="anchishin"],
td.col-action[data-action="anchishin"] { background-color: #fed7aa; }

tr.highlight-green td.col-action[data-action="shoshin"],
tr.highlight-yellow td.col-action[data-action="shoshin"],
tr.highlight-blue td.col-action[data-action="shoshin"],
tr.row-multiline td.col-action[data-action="shoshin"],
td.col-action[data-action="shoshin"] { background-color: #bfdbfe; }

tr.highlight-green td.col-action[data-action="sklyarov"],
tr.highlight-yellow td.col-action[data-action="sklyarov"],
tr.highlight-blue td.col-action[data-action="sklyarov"],
tr.row-multiline td.col-action[data-action="sklyarov"],
td.col-action[data-action="sklyarov"] { background-color: #fde68a; }

tr.highlight-green td.col-action[data-action="guskov"],
tr.highlight-yellow td.col-action[data-action="guskov"],
tr.highlight-blue td.col-action[data-action="guskov"],
tr.row-multiline td.col-action[data-action="guskov"],
td.col-action[data-action="guskov"] { background-color: #d1fae5; }

tr.highlight-green td.col-action[data-action="nfc"],
tr.highlight-yellow td.col-action[data-action="nfc"],
tr.highlight-blue td.col-action[data-action="nfc"],
tr.row-multiline td.col-action[data-action="nfc"],
td.col-action[data-action="nfc"] { background-color: #bae6fd; }

tr.highlight-green td.col-action[data-action="kartreder"],
tr.highlight-yellow td.col-action[data-action="kartreder"],
tr.highlight-blue td.col-action[data-action="kartreder"],
tr.row-multiline td.col-action[data-action="kartreder"],
td.col-action[data-action="kartreder"] { background-color: #d9f99d; }

tr.highlight-green td.col-action[data-action="ozhidanie"],
tr.highlight-yellow td.col-action[data-action="ozhidanie"],
tr.highlight-blue td.col-action[data-action="ozhidanie"],
tr.row-multiline td.col-action[data-action="ozhidanie"],
td.col-action[data-action="ozhidanie"] { background-color: #fde68a; }

tr.highlight-green td.col-action[data-action="other"],
tr.highlight-yellow td.col-action[data-action="other"],
tr.highlight-blue td.col-action[data-action="other"],
tr.row-multiline td.col-action[data-action="other"],
td.col-action[data-action="other"] { background-color: #f1f3f4; }

td select {
  height: 26px;
  font: inherit;
  font-size: 12px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
}

td select:focus {
  border-color: var(--accent);
  background: #fff;
  outline: none;
}

td .cell-edit {
  width: 100%;
  min-width: 0;
  height: 26px;
  font: inherit;
  font-size: 12px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

td .cell-edit:focus {
  border-color: var(--accent);
  background: #fff;
  outline: none;
}

td.num { font-variant-numeric: tabular-nums; }

.cell-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: min(520px, 92vw);
  max-height: 70vh;
  overflow: auto;
  padding: 10px 14px;
  background: #3c4043;
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
}

td.date-col, th.date-col {
  white-space: nowrap;
  font-size: 12px;
  min-width: 140px;
}
