* { box-sizing: border-box; }
:root {
  --page-zoom: 1;
  --page-height: calc(100vh / var(--page-zoom));
  --page-width: calc(100vw / var(--page-zoom));
  --green-bg: #bfe8c5;
  --line: #111;
  --orange: #ff5a00;
  --online: #0b9b00;
  --offline: #d00000;
}
html, body { height: 100%; }
/* Scale the entire interface, including dialogs, before the first paint.
   Compensate viewport-sized containers so the workspace still fills the window.
   Browser zoom shortcuts remain available; printed reports retain their scale. */
@media screen {
  :root { --page-zoom: .9; }
  html { zoom: var(--page-zoom); height: var(--page-height); }
}
body {
  margin: 0;
  background: var(--green-bg);
  color: #111;
  font-family: "Bookman Old Style", Bookman, Georgia, serif;
  font-weight: 700;
  overflow: hidden;
}
.hidden { display: none !important; }
button, input, select, textarea { font-family: "Bookman Old Style", Bookman, Georgia, serif; }
button { cursor: pointer; }
.app { zoom: .82; width: 122%; }

.login-screen {
  min-height: var(--page-height);
  display: grid;
  place-items: center;
  background: #d8d8d8;
}
.login-card {
  width: 400px;
  background: #e6e6e6;
  border: 3px solid var(--line);
  box-shadow: 8px 8px 0 rgba(0,0,0,.26);
  padding: 28px;
  text-align: center;
}
.login-logo { width: 105px; }
.login-card h1 { margin: 8px 0 20px; font-size: 34px; }
.login-card input, .login-card button {
  width: 100%;
  margin: 8px 0;
  padding: 13px;
  border: 2px solid var(--line);
  font-size: 18px;
  background:#f1f1f1;
  caret-color:#000;
}
.login-card input:focus { caret-color:#000; outline:3px solid #111; }
.remember-row { display:flex; align-items:center; gap:8px; justify-content:flex-start; font-size:16px; font-weight:700; margin:8px 0 12px; }
.remember-row input { width:auto !important; margin:0 !important; }
.login-card button { background: #fff; font-weight: 700; }
.error { color: #b00000; min-height: 24px; font-size: 15px; }

.topbar {
  position: relative;
  height: 132px;
  display: grid;
  grid-template-columns: 380px 1fr 690px;
  gap: 34px;
  align-items: start;
  padding: 18px 70px 6px;
}
.left-menu, .right-menu { display: grid; gap: 10px; align-content: start; }
.left-menu { width: 380px; }
.right-menu { grid-template-columns: 330px 330px; width: 690px; }
.right-menu .ribbon:nth-child(3) { grid-column: 1; }
.right-menu .ribbon:nth-child(4) { grid-column: 2; }
.logo { width: 105px; justify-self: center; margin-top: 10px; }
.ribbon {
  height: 43px;
  border: 0;
  background: #fff;
  font-size: 24px;
  font-weight: 700;
  text-transform: lowercase;
  color: #111;
  letter-spacing: .2px;
  padding: 0 24px;
}
/* Левая кнопка как на присланном фото: вытянутая белая лента с косым низом. */
.ribbon-stat {
  width: 380px;
  clip-path: polygon(0 0, 88% 0, 100% 100%, 12% 100%);
}
/* Правые кнопки: белые параллелограммы как на фото. */
.ribbon-action {
  width: 330px;
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
}
.db-online, .db-offline {
  position: absolute;
  right: 8px;
  top: 12px;
  font-size: 20px;
  font-weight: 700;
  background: transparent;
  border: 0;
  padding: 0;
}
.db-online { color: var(--online); }
.db-offline { color: var(--offline); }

.table-shell {
  margin: 0 70px 34px;
  height: calc(var(--page-height) - 155px);
  border: 3px solid var(--line);
  background: #fff;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  background: #fff;
}
th, td {
  border: 2px solid var(--line);
  padding: 7px 9px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  min-width: 90px;
}
th {
  font-size: 24px;
  font-weight: 700;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}
td {
  font-size: 14px;
  font-family: "Bookman Old Style", Bookman, Georgia, serif;
  font-weight: 400;
}
tr:hover td { background: #fff7d6; }
.serial-last { color: var(--orange); font-weight: 700; }
.n-duplicate { color: #d00000; font-weight: 700; }
.queue-no { display:inline-block; min-width:28px; font-weight:700; }
.warn-title { color:#d00000; }
.warn-line { border:2px solid #d00000; color:#d00000; padding:10px; margin:10px 0; font-weight:700; }
.duplicate-info { background:#fff2e8; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: grid;
  place-items: center;
  z-index: 30;
}
.modal-card {
  background: #fff;
  border: 3px solid var(--line);
  width: min(980px, 94vw);
  max-height: 92vh;
  overflow: auto;
  padding: 16px;
}
.scan-card { width: min(900px, 96vw); }
.action-card { width: min(900px, 94vw); }
.stats-card { width: min(1100px, 96vw); }
.account-card { width: min(880px, 94vw); }
.data-card { width: min(1200px, 96vw); }
.support-card { width: min(720px, 92vw); }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--line);
  margin-bottom: 15px;
}
.modal-head h2 { margin: 6px 0 12px; font-size: 28px; }
.modal-head button {
  border: 2px solid var(--line);
  background: #fff;
  font-size: 26px;
  padding: 0 12px;
}
.scan-only input {
  width: 100%;
  border: 3px solid var(--line);
  font-size: 26px;
  padding: 14px;
  margin-bottom: 16px;
  font-weight: 400;
}
.scan-compact h3 { margin: 4px 0 10px; font-size: 22px; }
.queue-list {
  border: 2px solid var(--line);
  min-height: 360px;
  max-height: 62vh;
  overflow: auto;
  background:#fff;
}
.queue-item {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  cursor: grab;
  font-weight: 400;
  background: #fff;
  min-height: 58px;
  resize: vertical;
  overflow: auto;
  white-space: normal;
  overflow-wrap: anywhere;
}
.queue-item:active { cursor: grabbing; }
.queue-serial { font-size: 18px; font-weight: 700; }
.queue-work { margin: 8px 0 0 38px; padding: 8px 10px; border-left: 4px solid var(--orange); line-height: 1.35; font-weight: 400; }
.queue-item.active { background: var(--green-bg); font-weight: 700; }
.choice-box {
  min-height: 360px;
  padding: 15px;
  background: #fff;
}
.choice-title { font-size: 23px; margin: 0 0 15px; }
.choice-subtitle { font-size: 18px; margin: 6px 0 14px; font-weight: 400; }
.choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.choice-btn {
  min-height: 48px;
  border: 2px solid var(--line);
  background: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 9px;
}
.choice-btn:hover { background: var(--green-bg); }
.choice-back, .choice-save {
  border: 2px solid var(--line);
  background: #fff;
  font-size: 17px;
  padding: 9px 16px;
  margin: 6px 8px 8px 0;
  font-weight: 700;
}
.choice-save { background: #ccffd3; }
.choice-comment {
  width: 100%;
  min-height: 100px;
  border: 2px solid var(--line);
  padding: 10px;
  font-size: 17px;
  font-weight: 400;
  resize: vertical;
}
.add-row { margin-top: 16px; border-top: 2px solid var(--line); padding-top: 12px; }
.add-row input { width: 65%; border: 2px solid var(--line); padding: 9px; font-size: 16px; font-weight: 400; }
.add-row button { border: 2px solid var(--line); background: #fff; padding: 9px 14px; font-weight: 700; }
.empty-choice { font-size: 22px; text-align: center; padding: 130px 10px; color: #333; }

.life-panel {
  position: fixed;
  right: 20px;
  top: 145px;
  bottom: 30px;
  width: min(760px, 92vw);
  background: #fff;
  border: 3px solid var(--line);
  z-index: 15;
  overflow: auto;
}
.life-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 2px solid var(--line);
  font-size: 22px;
}
.life-head button { background:#fff; border:2px solid var(--line); font-size:24px; padding:0 10px; }
.life-event {
  padding: 12px;
  border-bottom: 2px solid var(--line);
  font-weight: 400;
  line-height: 1.45;
}
.life-event b { font-weight: 700; }
.admin-edit-row, .event-edit-row { margin: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-edit-row input, .admin-edit-row textarea, .event-edit-row input, .event-edit-row textarea { border: 2px solid var(--line); padding: 8px; font-weight: 400; }
.admin-edit-row button, .event-edit-row button { grid-column: 1 / -1; border:2px solid var(--line); background:#ccffd3; padding:10px; font-weight:700; }
.event-edit { margin-top: 10px; border-top: 1px solid #999; padding-top: 8px; }
.event-edit summary { cursor:pointer; font-weight:700; }

.stats-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap:12px; }
.stat-card { border:2px solid var(--line); padding:12px; font-weight:400; }
.stat-card h3 { margin:0 0 10px; font-size:20px; }
.account-content, .support-text { font-size:20px; line-height:1.55; font-weight:400; }
.support-text a { color:#003cff; text-decoration: underline; font-weight:700; }
.logout-btn { margin-top:16px; border:2px solid var(--line); background:#fff; font-size:18px; padding:10px 20px; font-weight:700; }
.admin-tools { margin-top:18px; border-top:2px solid var(--line); padding-top:12px; }
.admin-grid { display:grid; grid-template-columns: repeat(5, 1fr); gap:8px; }
.admin-grid input, .admin-grid button { border:2px solid var(--line); padding:8px; font-weight:400; }
.admin-grid button { font-weight:700; background:#fff; }
.stats-box { border:2px solid var(--line); padding:10px; max-height:200px; overflow:auto; font-weight:400; }

.data-content { display:grid; gap:18px; }
.data-role { border:3px solid var(--line); padding:12px; }
.data-role h3 { margin:0 0 12px; font-size:24px; }
.data-columns { display:grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap:12px; }
.data-column { border:2px solid var(--line); padding:10px; min-height:140px; }
.data-column h4 { margin:0 0 8px; font-size:18px; }
.data-pill { display:flex; justify-content:space-between; align-items:center; border:1px solid #777; padding:7px 9px; margin:5px 0; font-weight:400; }
.data-pill button { border:0; background:#fff; color:#d00000; font-size:20px; font-weight:700; }
.data-add { display:flex; gap:6px; margin-top:10px; }
.data-add input { min-width:0; flex:1; border:2px solid var(--line); padding:8px; font-weight:400; }
.data-add button { border:2px solid var(--line); background:#fff; padding:8px 12px; font-weight:700; }

/* v1.5 правки */
.db-online, .db-offline { right: 8px; top: 12px; }
.no-life-open { cursor: default; }
.no-life-open:hover td { background: #fff; }
.pipeline-row { padding: 5px 8px; margin: 4px 0; border: 1px solid #111; font-weight: 400; }
.pipeline-row.green { background: #c9ffd0; }
.pipeline-row.orange { background: #ffd49b; }
.pipeline-row.red { background: #ff9b9b; }
.wide-stat { grid-column: 1 / -1; }

/* v1.6 линия жизни, аккаунты, светлый вход */
.login-card { background: #eeeeee; }
.login-card input { background: #f3f3f3; }
.login-card button { background: #f7f7f7; }
.db-online, .db-offline { right: 6px; top: 12px; }
.table-shell { height: calc(var(--page-height) - 155px); }
th { font-size: 22px; }
td { white-space: normal; vertical-align: top; }
#dronesTable th:nth-child(1), #dronesTable td:nth-child(1) { min-width: 48px; width: 48px; }
#dronesTable th:nth-child(2), #dronesTable td:nth-child(2) { min-width: 210px; }
#dronesTable th:nth-child(3), #dronesTable td:nth-child(3) { min-width: 125px; }
#dronesTable th:nth-child(4), #dronesTable td:nth-child(4) { min-width: 210px; }
#dronesTable th:nth-child(5), #dronesTable td:nth-child(5) { min-width: 900px; text-align: left; }
.timeline-td { padding: 5px; }
.timeline-cell { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 6px; white-space: normal; }
.timeline-seg { min-width: 185px; max-width: 265px; border: 1px solid #111; padding: 6px 8px; line-height: 1.28; font-weight: 400; background: #fff; overflow-wrap: anywhere; }
.timeline-seg b { font-weight: 700; }
.choice-btn.selected { background: #bfe8c5; outline: 3px solid #111; }
.multi-choice { align-items: stretch; }
.admin-users-box { margin-top: 18px; border-top: 2px solid var(--line); padding-top: 12px; }
.admin-user-create, .admin-user-row { display:grid; grid-template-columns: repeat(9, minmax(105px, 1fr)); gap: 7px; border: 1px solid #111; padding: 8px; margin: 8px 0; align-items:center; }
.admin-user-create input, .admin-user-row input, .admin-user-create select, .admin-user-row select { border:2px solid var(--line); padding:7px; font-weight:400; min-width:0; }
.admin-user-create button, .admin-user-row button { border:2px solid var(--line); background:#fff; padding:7px; font-weight:700; }
.admin-user-row label { font-size: 14px; font-weight: 400; }

/* v1.7 правки */
.stale-orange td { background: #ffe2b8 !important; }
.stale-red td { background: #ffd1d1 !important; }
.search-highlight td { background: #ffe066 !important; transition: background .2s; }
.movement-card { display:flex; gap:6px; overflow:auto; max-height:160px; padding:6px; border:1px solid #111; background:#f8f8f8; margin-top:8px; }
.stats-control { display:flex; gap:10px; align-items:center; border:2px solid #111; padding:10px; background:#fff; margin-bottom:12px; }
.stats-control input, .stats-control button { border:2px solid #111; padding:10px; font-size:16px; background:#fff; font-weight:700; }
.chart-card { background:#fff; }
.chart-total { float:right; border:2px solid #aaa; padding:12px 24px; font-size:34px; margin:2px 10px 10px; font-weight:400; }
.chart-total span { color:red; font-size:46px; font-weight:700; }
.bar-row { display:grid; grid-template-columns: 260px 1fr 55px; gap:10px; align-items:center; margin:8px 0; font-weight:400; }
.bar-label { text-align:right; }
.bar-track { height:15px; border-left:1px solid #ddd; background:repeating-linear-gradient(to right,#eee 0,#eee 1px,transparent 1px,transparent 80px); }
.bar-fill { height:15px; background:#17627a; }
.bar-num { text-align:left; }

.toast-box { position: fixed; right: 24px; top: 24px; z-index: 200; display: grid; gap: 10px; max-width: 520px; }
.toast { background:#fff; border:3px solid #111; box-shadow:5px 5px 0 rgba(0,0,0,.25); padding:13px 16px; font-size:18px; font-weight:700; opacity:0; transform:translateX(20px); transition:.25s; }
.toast.show { opacity:1; transform:translateX(0); }
.toast.error { border-color:#b00000; color:#b00000; }
.toast.warn { border-color:#ff8a00; color:#b05a00; }

.timeline-td { vertical-align: top; }
.timeline-cell { display:flex; align-items:stretch; gap:6px; max-width:none; }
.timeline-seg { min-width:190px; max-width:230px; white-space:normal; overflow-wrap:anywhere; word-break:normal; line-height:1.18; padding:7px; border:1px solid #111; text-align:left; font-size:13px; font-weight:400; }
.movement-card { max-height:220px; overflow:auto; border:2px solid #111; margin:10px 0; padding:6px; display:flex; gap:6px; background:#fff; }
.movement-card .timeline-seg { min-width:170px; max-width:210px; font-size:12px; }
.choice-subtitle { white-space:normal; overflow-wrap:anywhere; }
.stats-control { display:flex; gap:12px; align-items:center; margin:10px 0 18px; }
.stats-control input, .stats-control button, .export-row button { border:2px solid #111; background:#fff; padding:10px 16px; font-size:17px; font-weight:700; }
.stats-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap:14px; }
.stat-card { border:2px solid #111; background:#fff; padding:14px; font-weight:400; }
.stat-card h3 { margin:0 0 12px; text-align:center; font-size:22px; font-weight:700; }
.wide-stat { grid-column: 1 / -1; }
.list-stat div { margin:5px 0; font-size:17px; }
.excel-chart { border:2px solid #ccc; color:#555; font-family: Arial, sans-serif; font-weight:400; }
.excel-chart h3 { font-family: Arial, sans-serif; font-size:24px; color:#555; font-weight:400; }
.excel-chart-body { display:grid; grid-template-columns:minmax(360px, 1fr) 340px; gap:36px; align-items:start; }
.excel-row { display:grid; grid-template-columns:260px 1fr 44px; align-items:center; gap:8px; margin:8px 0; font-size:17px; }
.excel-label { text-align:right; white-space:normal; }
.excel-bar-wrap { height:13px; border-left:1px solid #bbb; background:repeating-linear-gradient(90deg, transparent, transparent 95px, #ddd 96px); }
.excel-bar { height:13px; background:#145f7c; }
.excel-num { color:#333; }
.excel-big { border:2px solid #c5c5c5; padding:20px 28px; font-size:48px; color:#111; margin-top:15px; text-align:center; box-shadow: 4px 0 0 #ddd; }
.excel-big span { color:red; font-weight:700; }
.excel-big b { font-weight:400; }
.bar-row { display:grid; grid-template-columns:220px 1fr 46px; gap:8px; margin:6px 0; align-items:center; }
.bar-label { text-align:right; white-space:normal; font-weight:400; }
.bar-track { height:14px; background:#eee; }
.bar-fill { height:14px; background:#145f7c; }
.export-row { grid-column:1 / -1; text-align:center; margin:4px 0 0; }
.search-highlight td { background:#fff0a3 !important; transition: background .25s; }

/* v1.8.1 — fixed corner anchoring and responsive header scaling.
   No browser zoom hack: buttons stay attached to page corners. */
:root {
  --page-pad: clamp(42px, 4vw, 72px);
  --top-h: 118px;
  --left-w: clamp(310px, 19vw, 360px);
  --right-btn-w: clamp(255px, 16vw, 305px);
  --right-gap: clamp(12px, 1.2vw, 22px);
}
.app {
  zoom: 1 !important;
  width: var(--page-width) !important;
  height: var(--page-height) !important;
  overflow: hidden !important;
  transform: none !important;
}
.topbar {
  position: relative !important;
  display: block !important;
  height: var(--top-h) !important;
  padding: 0 !important;
}
.left-menu {
  position: absolute !important;
  left: var(--page-pad) !important;
  top: 16px !important;
  width: var(--left-w) !important;
  display: grid !important;
  gap: 8px !important;
  align-content: start !important;
}
.right-menu {
  position: absolute !important;
  right: calc(var(--page-pad) + 20px) !important;
  top: 16px !important;
  width: auto !important;
  display: grid !important;
  grid-template-columns: var(--right-btn-w) var(--right-btn-w) !important;
  gap: 8px var(--right-gap) !important;
  align-content: start !important;
}
.right-menu .ribbon:nth-child(3),
.right-menu .ribbon:nth-child(4) {
  grid-column: auto !important;
}
/* Отдельная кнопка слева от поиска, без изменения сетки четырёх прежних кнопок. */
.right-menu #messagesBtn {
  position: absolute;
  right: calc(100% + var(--right-gap));
  top: 44px;
}
.ribbon {
  height: 36px !important;
  font-size: 21px !important;
  padding: 0 18px !important;
  line-height: 36px !important;
}
.ribbon-stat {
  width: var(--left-w) !important;
}
.ribbon-action {
  width: var(--right-btn-w) !important;
}
.logo {
  position: absolute !important;
  left: 50% !important;
  top: 20px !important;
  transform: translateX(-50%) !important;
  width: 82px !important;
  margin: 0 !important;
}
.db-online, .db-offline {
  right: 10px !important;
  top: 12px !important;
  font-size: 18px !important;
}
.table-shell {
  margin: 0 var(--page-pad) 22px !important;
  height: calc(var(--page-height) - var(--top-h) - 22px) !important;
}
th {
  font-size: 20px !important;
  padding: 6px 8px !important;
}
td {
  font-size: 13px !important;
  padding: 6px 8px !important;
}
.timeline-seg {
  font-size: 12px !important;
}
@media (max-width: 1280px) {
  :root {
    --page-pad: 28px;
    --left-w: 290px;
    --right-btn-w: 235px;
    --right-gap: 10px;
  }
  .ribbon { font-size: 19px !important; }
  .logo { width: 72px !important; }
}

/* v1.8.2 точечные правки */
.login-card input,
.login-card input:hover,
.login-card input:focus {
  caret-color: #000 !important;
  color: #000 !important;
}
.timeline-seg,
.movement-card .timeline-seg {
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  hyphens: auto;
  box-sizing: border-box;
}
.timeline-seg * {
  max-width: 100%;
}
.export-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.excel-chart-body.no-counter {
  grid-template-columns: minmax(360px, 1fr) !important;
}

/* v1.8.3 admin delete line */
.admin-danger {
  background: #b30000 !important;
  color: #fff !important;
  border: 2px solid #5c0000 !important;
  font-weight: bold !important;
}
.admin-danger:hover {
  filter: brightness(0.95);
}

/* v1.8.5 точечные правки */
.login-card {
  background: #d0d0d0 !important;
}
.login-card input {
  background: #d9d9d9 !important;
}
.login-card input,
.login-card input:hover,
.login-card input:focus {
  caret-color: auto !important;
}
.logo,
.login-logo {
  display: none !important;
}
button:active,
.choice-btn:active,
.ribbon:active,
.choice-save:active,
.choice-back:active,
.export-row button:active,
.logout-btn:active,
.admin-user-row button:active,
.admin-user-create button:active {
  transform: translateY(2px) scale(0.985);
  filter: brightness(0.94);
}
.stats-separator {
  border-top: 2px solid #111;
  margin: 10px 0 6px;
  padding-top: 6px;
  font-weight: 700;
}
.stats-separator:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.pass-change {
  margin-top: 12px;
  border-top: 2px solid #111;
  padding-top: 10px;
}
.pass-change summary {
  cursor: pointer;
  font-weight: 700;
}
.pass-change input,
.pass-change button {
  width: 100%;
  border: 2px solid #111;
  padding: 9px;
  margin-top: 8px;
  font-weight: 400;
}
.pass-change button {
  background: #fff;
  font-weight: 700;
}
.timeline-seg,
.movement-card .timeline-seg {
  max-width: 250px !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

/* v1.8.6 точечные правки */
.login-card { background: #ffffff !important; }
.login-card input { background: #e0e0e0 !important; }
.center-code {
  position: absolute !important;
  left: 43% !important;
  top: 34px !important;
  transform: translateX(-50%) !important;
  min-width: 220px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #111;
  background: transparent;
}
.logo, .login-logo { display: none !important; }

/* v1.8.7 точечные правки */
.dest-code { color: var(--orange) !important; font-weight: 700 !important; }


/* v1.8.8 точечные правки */
.current-status-orange { color: var(--orange) !important; font-weight: 700 !important; }
.center-code-orange { color: var(--orange) !important; font-weight: 700 !important; }
.center-code { left: 39% !important; }
.login-card { background: #ffffff !important; }
.login-card input { background: #e0e0e0 !important; }

/* v1.8.9 status/code and compact graph text */
.current-status-text {
  color: #111 !important;
  font-weight: 400 !important;
  font-size: inherit !important;
}
.status-code-orange {
  color: var(--orange) !important;
  font-weight: 400 !important;
}
.current-status-orange { font-weight: 400 !important; }
.dest-code { font-weight: 400 !important; }
.center-code-orange { color: var(--orange) !important; }

/* База данных: очередь, операторские аккаунты и статистика прихода/ухода */
.operator-code { color:#111; font-size:16px; font-weight:700; line-height:1.15; }
.center-code { top:20px !important; line-height:1.15; }
.account-card { width:min(1280px,96vw) !important; }
.admin-users-box { overflow-x:auto; }
.admin-user-create, .admin-user-row { min-width:1120px; }
.flow-stat .flow-out { padding-left:28px; }
.queue-item[draggable="true"] { user-select:none; }

/* V1.0.0 */
.login-card { position:relative; padding-bottom:46px; }
.login-version { position:absolute; left:0; right:0; bottom:10px; text-align:center; font:400 11px/1 Arial,sans-serif; color:#777; letter-spacing:.5px; }
.life-panel { right:2vw !important; top:8vh !important; bottom:2vh !important; width:75vw !important; max-width:1500px !important; }
.stats-mode-switch { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:12px; }
.stats-mode-switch button { border:2px solid #111; background:#fff; padding:12px 16px; font-size:18px; font-weight:700; }
.stats-mode-switch button.active { background:#bfe8c5; box-shadow:inset 0 -4px 0 #111; }
@media (max-width: 900px) { .life-panel { width:96vw !important; right:2vw !important; } }

/* V1.1.0 — строгий поток и центрированная статистика */
.workflow-toolbar { margin:0 var(--page-pad) 10px; display:grid; grid-template-columns:1fr; gap:8px; }
.drone-type-filter { display:grid; grid-template-columns:120px 1fr; align-items:stretch; gap:8px; }
.drone-type-filter>b { display:flex; align-items:center; justify-content:center; border:2px solid #111; background:#f3f5f7; }
.drone-type-buttons { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; }
.drone-type-buttons button { border:2px solid #111; background:#fff; min-height:42px; padding:8px 12px; font-size:15px; font-weight:700; }
.drone-type-buttons button.active { background:#bfe8c5; box-shadow:inset 0 -4px 0 #111; }
.workflow-filters { margin:0; display:grid; grid-template-columns:repeat(4,minmax(145px,1fr)); gap:8px; }
.workflow-filters button { border:2px solid #111; background:#fff; min-height:42px; padding:8px 12px; font-size:16px; font-weight:700; }
.workflow-filters button.active { background:#bfe8c5; box-shadow:inset 0 -4px 0 #111; }
.workflow-filters span { display:inline-grid; place-items:center; min-width:27px; height:27px; margin-left:7px; border-radius:14px; background:#edf1f4; font:700 13px Arial,sans-serif; }
.table-shell { height:calc(var(--page-height) - var(--top-h) - 132px) !important; }
.workflow-state { display:block; width:max-content; margin-top:6px; padding:3px 8px; border-radius:12px; background:#edf1f4; font:700 11px Arial,sans-serif; text-transform:uppercase; }
.workflow-state.waiting { background:#fff1b8; }
.workflow-state.in_work { background:#d8ebff; }
.workflow-state.sent { background:#eadcff; }
.workflow-state.completed { background:#d9f2df; }

.stats-card { width:min(1500px,97vw) !important; max-height:95vh; padding:18px 22px; }
#statsContent.stats-grid { display:block !important; }
#statsGraphBox { width:100%; }
.stats-mode-switch { width:min(1120px,100%); margin:0 auto 18px; }
.stats-control { width:max-content; max-width:100%; justify-content:center; margin:0 auto 22px !important; border:0 !important; padding:0 !important; }
.stats-control input,.stats-control button { min-height:48px; }
#statsGraphBox .stats-grid { display:block; width:min(1260px,100%); margin:0 auto; }
.stats-title-card { position:relative; width:100%; padding:18px 24px; margin-bottom:16px; border:2px solid #111; background:#f7f9fb; text-align:center; }
.stats-title-card h3 { margin:0; font-size:27px; }
.archive-badge { display:inline-block; margin-top:8px; padding:4px 10px; border-radius:14px; background:#d8ebff; font:700 12px Arial,sans-serif; }
.stats-section { margin:0 auto 18px; padding:16px; border:2px solid #111; background:#fff; }
.stats-section>h3 { margin:0 0 14px; text-align:center; font-size:22px; }
.stats-kpi-grid { display:grid; grid-template-columns:repeat(6,minmax(130px,1fr)); gap:10px; }
.stats-kpi { min-height:104px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:12px; border:1px solid #8d99a5; background:#f5f8fa; text-align:center; }
.stats-kpi span { font-size:14px; font-weight:700; }
.stats-kpi b { font:700 32px Arial,sans-serif; color:#1f4e78; }
.stats-kpi-grid.workflow .stats-kpi:nth-child(1) b { color:#ed7d31; }
.stats-kpi-grid.workflow .stats-kpi:nth-child(2) b { color:#c99600; }
.stats-kpi-grid.workflow .stats-kpi:nth-child(3) b { color:#2f75b5; }
.stats-category-grid { display:grid; grid-template-columns:repeat(3,minmax(260px,1fr)); gap:14px; align-items:start; }
.stats-category-card { border:1px solid #929da7; background:#fff; min-height:150px; padding:0 14px 12px; box-shadow:0 3px 10px rgba(0,0,0,.08); }
.stats-category-card h4 { margin:0 -14px 10px; padding:11px 14px; background:#1f4e78; color:#fff; text-align:center; font-size:17px; }
.stats-value-row { display:grid; grid-template-columns:1fr auto; gap:12px; padding:7px 2px; border-bottom:1px solid #e1e5e9; font-size:15px; }
.stats-value-row:last-child { border-bottom:0; }
.stats-value-row b { font-family:Arial,sans-serif; color:#1f4e78; }
.flow-card { width:min(760px,100%); min-height:0; margin:0 auto; padding:14px 18px; }
.flow-card>div { padding:6px 0; border-bottom:1px solid #e1e5e9; }
.export-row { display:flex; justify-content:center; gap:12px; margin:20px 0 4px; }
@media (max-width:1100px){ .stats-kpi-grid{grid-template-columns:repeat(3,1fr)} .stats-category-grid{grid-template-columns:repeat(2,1fr)} }
@media (max-width:900px){ .workflow-toolbar{grid-template-columns:1fr}.workflow-filters{grid-template-columns:1fr 1fr} }
@media (max-width:760px){ .stats-kpi-grid,.stats-category-grid{grid-template-columns:1fr}.stats-card{padding:12px}.export-row{flex-direction:column} }
.model-rules-box { display:grid; gap:6px; margin:10px 0 18px; }
.model-rule-row { display:grid; grid-template-columns:140px 1fr 36px; align-items:center; gap:10px; padding:8px 10px; border:1px solid #9aa4ad; background:#f7f9fb; }
.model-rule-row button { height:30px; border:1px solid #111; background:#fff; font-size:20px; line-height:1; }
.model-rule-empty { padding:10px; color:#666; }

/* V1.2.1 — кнопки типов и открытая панель управления аккаунтами */
.empty-lookup-hint { margin:8px 0 12px; padding:10px 12px; border:1px solid #c98b00; background:#fff3cd; font:700 14px Arial,sans-serif; }
.admin-users-box { overflow:visible; }
.admin-user-create,.admin-user-row { display:block; min-width:0; margin:14px 0; padding:14px; border:2px solid #111; background:#f8fafb; }
.admin-user-create h4,.admin-user-row h4 { margin:0 0 12px; font-size:18px; }
.admin-user-row h4 small { margin-left:8px; color:#ed7d31; font-size:13px; }
.admin-user-fields { display:grid; grid-template-columns:repeat(5,minmax(150px,1fr)); gap:10px; }
.admin-field { display:grid; gap:5px; font:700 12px Arial,sans-serif; }
.admin-field input,.admin-field select { width:100%; min-width:0; height:38px; border:2px solid #111; padding:6px 8px; background:#fff; font:400 14px Arial,sans-serif; }
.admin-user-flags { display:flex; flex-wrap:wrap; gap:12px 24px; margin:12px 0 4px; }
.permission-editor { display:block; margin:12px 0; padding:10px 12px; border:1px solid #9aa4ad; background:#fff; }
.permission-editor legend { padding:0 6px; font-weight:700; }
.permission-editor>div { display:grid; grid-template-columns:repeat(4,minmax(170px,1fr)); gap:8px 14px; padding-top:4px; }
.permission-editor label { padding:7px; border:1px solid #d5dce2; background:#f6f8fa; }
.admin-primary { min-height:40px; border:2px solid #111; padding:8px 18px; background:#bfe8c5; font-weight:700; }
@media (max-width:1100px){ .admin-user-fields{grid-template-columns:repeat(2,1fr)} .permission-editor>div{grid-template-columns:repeat(2,1fr)} }
@media (max-width:650px){ .drone-type-filter{grid-template-columns:1fr}.drone-type-buttons{grid-template-columns:1fr 1fr}.admin-user-fields,.permission-editor>div{grid-template-columns:1fr}.table-shell{height:calc(var(--page-height) - var(--top-h) - 210px)!important} }

/* V1.1.1 — спокойные статусы, точечное обновление и компактная статистика v1.8.9 */
#dronesTable tr.completed-row td,
#dronesTable tr.completed-row:hover td {
  background: var(--green-bg) !important;
}
#dronesTable tr.life-open { cursor:pointer; }
.current-status-text {
  display:inline;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:#111 !important;
  font:400 14px/1.35 "Bookman Old Style", Bookman, Georgia, serif !important;
  text-transform:none !important;
  box-shadow:none !important;
}
.workflow-state { display:none !important; }
.stats-launch { letter-spacing:.35px; }
.stats-compact-window {
  width:min(1320px,96vw) !important;
  max-height:94vh;
  padding:0 !important;
  background:#eef1f3;
  overflow:auto;
}
.stats-compact-window > .modal-head {
  position:sticky;
  top:0;
  z-index:4;
  min-height:58px;
  margin:0;
  padding:8px 18px;
  background:#fff;
  border-bottom:3px solid #111;
}
.stats-compact-window > .modal-head h2 {
  margin:0;
  font-size:25px;
  text-transform:uppercase;
  letter-spacing:.4px;
}
#statsContent.stats-grid {
  width:min(1220px,100%);
  margin:0 auto;
  padding:16px 18px 22px;
}
.stats-mode-switch {
  width:100%;
  gap:0;
  margin:0 auto 10px;
  border:2px solid #111;
}
.stats-mode-switch button {
  min-height:38px;
  border:0;
  border-right:2px solid #111;
  padding:7px 14px;
  font-size:15px;
  background:#fff;
  box-shadow:none !important;
}
.stats-mode-switch button:last-child { border-right:0; }
.stats-mode-switch button.active { background:#1f4e78; color:#fff; }
.stats-control {
  width:100%;
  display:flex;
  justify-content:center;
  gap:8px;
  margin:0 auto 10px !important;
}
.stats-control input,
.stats-control button {
  min-height:36px !important;
  padding:6px 12px !important;
  font-size:14px !important;
  border:1px solid #6f7b84 !important;
}
#statsGraphBox .stats-grid { width:100%; }
.stats-title-card {
  padding:10px 18px;
  margin-bottom:9px;
  border:1px solid #6f7b84;
  background:#fff;
}
.stats-title-card h3 { font-size:19px; }
.archive-badge { margin-top:5px; padding:2px 8px; font-size:10px; }
.stats-section.compact-section {
  margin-bottom:9px;
  padding:9px 10px 10px;
  border:1px solid #6f7b84;
  box-shadow:none;
}
.stats-section.compact-section > h3 {
  margin:0 0 8px;
  font-size:17px;
  text-align:left;
  color:#1f4e78;
}
.stats-kpi-grid,
.stats-kpi-grid.workflow {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
  gap:6px;
}
.stats-kpi {
  min-height:58px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  padding:8px 10px;
  border:1px solid #c4cbd1;
  background:#f7f9fa;
  text-align:left;
}
.stats-kpi span { align-self:center; font-size:12px; line-height:1.15; }
.stats-kpi b,
.stats-kpi-grid.workflow .stats-kpi b {
  align-self:center;
  font:700 22px/1 Arial,sans-serif;
  color:#1f4e78 !important;
}
.stats-category-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.stats-category-card {
  min-height:0;
  padding:0 9px 5px;
  border:1px solid #aab2b9;
  box-shadow:none;
}
.stats-category-card h4 {
  margin:0 -9px 3px;
  padding:6px 9px;
  background:#1f4e78;
  font-size:13px;
}
.stats-value-row {
  display:grid;
  grid-template-columns:minmax(120px,1fr) minmax(70px,1fr) 34px;
  align-items:center;
  gap:7px;
  min-height:27px;
  padding:3px 0;
  font-size:12px;
}
.stats-value-row > span { overflow-wrap:anywhere; }
.stats-value-row > i {
  height:8px;
  overflow:hidden;
  background:#e1e6ea;
  border-left:1px solid #8c989f;
}
.stats-value-row > i > em { display:block; height:100%; background:#1f4e78; }
.stats-value-row > b { text-align:right; font-size:13px; }
.flow-card {
  width:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  padding:0;
  border:0;
  background:transparent;
}
.flow-card > div {
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-height:43px;
  padding:8px 14px;
  border:1px solid #c4cbd1;
  background:#f7f9fa;
}
.flow-card strong { font:700 22px Arial,sans-serif; color:#1f4e78; }
.export-row { margin:10px 0 0; gap:8px; }
.export-row button { min-height:36px; padding:7px 14px; font-size:14px; }
@media (max-width:760px){
  .stats-category-grid,.flow-card { grid-template-columns:1fr; }
  #statsContent.stats-grid { padding:10px; }
  .stats-value-row { grid-template-columns:minmax(105px,1fr) 70px 30px; }
}

/* v1.2.3 — цветная палитра 3 для полосок статистики. */
.stats-category-card .stats-value-row:nth-of-type(6n+1) > i > em,
.excel-bars .excel-row:nth-child(6n+1) .excel-bar,
.chart-card .bar-row:nth-of-type(6n+1) .bar-fill { background:#5B9BD5; }
.stats-category-card .stats-value-row:nth-of-type(6n+2) > i > em,
.excel-bars .excel-row:nth-child(6n+2) .excel-bar,
.chart-card .bar-row:nth-of-type(6n+2) .bar-fill { background:#ED7D31; }
.stats-category-card .stats-value-row:nth-of-type(6n+3) > i > em,
.excel-bars .excel-row:nth-child(6n+3) .excel-bar,
.chart-card .bar-row:nth-of-type(6n+3) .bar-fill { background:#A5A5A5; }
.stats-category-card .stats-value-row:nth-of-type(6n+4) > i > em,
.excel-bars .excel-row:nth-child(6n+4) .excel-bar,
.chart-card .bar-row:nth-of-type(6n+4) .bar-fill { background:#FFC000; }
.stats-category-card .stats-value-row:nth-of-type(6n+5) > i > em,
.excel-bars .excel-row:nth-child(6n+5) .excel-bar,
.chart-card .bar-row:nth-of-type(6n+5) .bar-fill { background:#4472C4; }
.stats-category-card .stats-value-row:nth-of-type(6n+6) > i > em,
.excel-bars .excel-row:nth-child(6n+6) .excel-bar,
.chart-card .bar-row:nth-of-type(6n+6) .bar-fill { background:#70AD47; }

/* Дубликат: подсвечивается вся ячейка N, а не только цифра. */
.duplicate-n-cell { background: #ffe3e3 !important; }

/* v1.2.8: периоды статистики и вложенные редактируемые пункты */
.stats-period-switch { grid-column:1/-1; display:grid; grid-template-columns:repeat(3,1fr); gap:0; width:min(1120px,100%); margin:0 auto 14px; border:2px solid #111; }
.stats-period-switch button { border:0; border-right:2px solid #111; background:#fff; padding:11px 14px; font-size:17px; font-weight:700; }
.stats-period-switch button:last-child { border-right:0; }
.stats-period-switch button.active { background:#55a9df; color:#fff; }
.data-pill-child { margin-left:22px; border-left:5px solid #55a9df; background:#f3f9ff; }
.data-pill button[title="изменить"] { color:#176da0; margin-left:auto; }

/* V1.2.9: requests and exports */
#lookupRequestsBtn { min-height: 32px; font-size: 15px; padding: 6px 12px; }
#lookupRequestsBtn.has-requests { background: #ffcb72; color: #542c00; border-color: #c77700; box-shadow: 0 0 0 2px #f5b340; }
.proposal-card { background: #fff; border: 1px solid #a6c4d8; border-radius: 12px; padding: 16px; margin: 12px 0; overflow-wrap: anywhere; }
.proposal-card h3 { margin-top: 0; }
.proposal-card button { margin-right: 10px; padding: 8px 15px; cursor: pointer; }
.stats-exports { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; min-width: 0; width: auto; font-size: 15px; }
.data-add input { min-width: 0; width: 100%; }

.app.admin-view { --top-h: 154px; }
#lookupRequestsBtn { font-size: 17px !important; }
/* V1.3: role reports; the same section order is used in downloadable reports. */
#statsModal .stats-card { width:min(1510px,97vw)!important; }
#statsContent .report-tabs {display:flex;gap:8px;flex-wrap:wrap;padding:4px 0 14px;}
#statsContent .report-tabs button {padding:12px 18px;border:1px solid #acc2d1;border-radius:8px;background:#f6fafc;color:#21435c;}
#statsContent button.active {background:#286d9d;color:#fff;border-color:#286d9d;}
#statsContent .report-controls {display:flex;flex-direction:column;gap:12px;margin-bottom:16px;}
#statsContent .report-period,.report-actions {display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
#statsContent .report-primary {background:#286d9d;color:#fff;}
#statsContent .report-defect-filter {display:flex;flex-direction:column;gap:8px;font-weight:600;}
#statsContent .report-defect-filter select {width:100%;min-height:45px;white-space:normal;}
#statsGraphBox {color:#1d2c37;}
.report-title {text-align:center;padding:12px 0 24px;}
.report-title h2 {font-size:25px;margin:0 0 8px;}
.report-title span {color:#516574;}
.report-panel {background:#fff;border:1px solid #b7c8d3;border-radius:10px;padding:18px;margin-bottom:18px;}
.report-panel h2,.report-panel h3 {text-align:center;color:#172c3b;margin:4px 0 16px;}
.report-panel h2 {font-size:23px;}
.report-panel h3 {font-size:20px;}
.report-note {font-size:12px;color:#5c6e7a;line-height:1.6;margin:10px 0 3px;display:block;}
.report-metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid #7e919e;}
.report-metrics>div {padding:13px;border-right:1px solid #7e919e;font-size:17px;font-weight:600;}
.report-metrics>div:last-child {border:0;}
.report-metric-value {display:flex;align-items:center;gap:18px;margin-top:12px;}
.report-count {font-variant-numeric:tabular-nums;font-size:22px;font-weight:750;}
.report-metric-value .report-count {font-size:30px;border:1px solid #9baab4;padding:3px 15px;min-width:65px;}
.report-deltas {display:inline-flex;flex-direction:column;font-variant-numeric:tabular-nums;font-size:14px;line-height:1.35;margin-left:10px;vertical-align:middle;}
.report-plus {color:#cf312c;}
.report-minus {color:#188342;}
.report-cards {padding:10px 2px;font-size:14px;}
.report-scroll {overflow:auto;}
.report-table {width:100%;border-collapse:collapse;table-layout:fixed;color:#172c3b;font-size:14px;background:#fff;}
.report-table th,.report-table td {border:1px solid #7e919e;padding:9px 10px;text-align:left;vertical-align:middle;white-space:normal;overflow-wrap:anywhere;line-height:1.5;}
.report-table th {background:#f3f6f8;font-size:13px;font-weight:700;}
.report-table .report-number {text-align:center;font-size:23px;font-weight:700;}
.report-table.report-states {min-width:690px;}
.report-states td:nth-child(1),.report-states td:nth-child(3) {width:35%;}
.report-states td:nth-child(2),.report-states td:nth-child(4) {width:15%;}
.report-state-value {white-space:nowrap!important;}
.report-state-value .report-count {font-size:19px;}
.report-state-value .report-deltas {font-size:11px;}
.report-section-head,.report-department-title {display:flex;justify-content:space-between;align-items:center;gap:16px;}
.report-section-head h2,.report-section-head h3,.report-department-title h3 {margin:0;}
.report-department {border:1px solid #7e919e;margin-top:18px;}
.report-department-title {padding:10px 14px;border-bottom:1px solid #7e919e;background:#f5f8fa;}
.report-department-title h3 {font-size:19px;}
.report-pair-head,.report-pair {display:grid;grid-template-columns:1fr 1fr;}
.report-pair-head {border-bottom:1px solid #bac6ce;}
.report-pair-head b {font-size:13px;text-align:center;padding:9px;}
.report-pair {border-bottom:1px solid #d1dbe1;}
.report-pair:last-child {border-bottom:0;}
.report-pair>div {padding:14px 10px;min-width:0;}
.report-pair>div:first-child {border-right:1px solid #7e919e;}
.report-bar-row {display:grid;grid-template-columns:minmax(100px,1.4fr) minmax(50px,1fr) 32px;align-items:center;gap:8px;padding:5px 0;font-size:14px;}
.report-bar-row span {overflow-wrap:anywhere;line-height:1.4;}
.report-bar-row i {height:11px;display:block;}
.report-bar-row em {display:block;height:11px;background:var(--bar-color);}
.report-bar-row b {text-align:right;font-size:15px;font-variant-numeric:tabular-nums;}
.report-joint {grid-column:1/-1;color:#697782;font-size:12px;margin:0;padding:0 10px 8px;}
.report-empty {padding:16px;color:#6c7b86;font-size:14px;text-align:center;}
.report-products {min-width:760px;}
.report-products th:nth-child(1) {width:27%;}
.report-products th:nth-child(2) {width:29%;}
.report-products th:nth-child(3) {width:30%;}
.report-products th:nth-child(4) {width:14%;}
.report-serial {font-variant-numeric:tabular-nums;}
.report-dept-caption {margin-top:22px!important;}
.report-component-total b {font-size:35px;display:inline-block;padding:8px 20px;background:#e7f1f8;border-radius:8px;margin-left:15px;}
@media(max-width:800px){
  .report-metrics {grid-template-columns:repeat(2,minmax(0,1fr));}
  .report-metrics>div {border-bottom:1px solid #7e919e;}
  .report-panel {padding:10px;}
  .report-section-head {align-items:flex-start;flex-direction:column;}
  .report-pair-head {display:none;}
  .report-pair {grid-template-columns:1fr;}
  .report-pair>div:first-child {border-right:0;background:#f5f8fa;}
}

.work-required {color:#d76c00!important;}
.report-activity {display:flex;border-bottom:1px solid #7e919e;}
.report-activity>div {flex:1;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-right:1px solid #7e919e;}
.report-activity>div:last-child {border-right:0;}
.report-activity b {font-size:26px;font-variant-numeric:tabular-nums;}
.report-flight-note {padding:0 12px;}
@media(max-width:700px){.report-activity{flex-direction:column;}.report-activity>div{border-right:0;border-bottom:1px solid #d1dbe1;}}

.required-task {margin:14px 0 4px;padding:12px 14px;background:#fff6e9;border-left:3px solid #eb8b00;border-radius:4px;}
/* V1.4: conversations, telemetry and report details */
.table-load{display:flex;justify-content:center;gap:20px;align-items:center;padding:20px;color:#64717c}
.report-success{color:#17813c!important;font-weight:700}.serial-tail{color:#ed9200;font-weight:800}
.attention-badge{animation:attention140 1.5s infinite!important;background:#ed9200!important;color:#182430!important}
@keyframes attention140{50%{box-shadow:0 0 0 4px #ed92004d,0 0 18px #ed9200}}
.backup-alert{background:#ffe3dc;color:#9a2f1d;padding:8px;width:100%;border:0}
.messages-card{width:min(1100px,96vw)!important;max-height:92vh}.messages-layout{display:grid;grid-template-columns:265px minmax(0,1fr);height:70vh;min-height:400px;gap:16px}
.messages-sidebar{overflow:auto;border-right:1px solid #d6dde3;padding-right:12px}.message-thread{display:block;width:100%;text-align:left;white-space:normal;margin:8px 0;padding:12px;background:#edf1f5;color:#17212b;border:1px solid #d5dde5;border-radius:8px}.message-thread.active{background:#ffe4b8;border-color:#ed9200}.message-thread small,.message-thread span{display:block;margin-top:5px;overflow-wrap:anywhere}.message-thread .unread-number{display:inline-block;background:#ed9200;color:#17212b;padding:2px 6px;border-radius:10px}.messages-main{display:flex;flex-direction:column;min-height:0}.messages-main h3{margin:0 0 8px}.messages-history{flex:1;overflow:auto;padding:12px;background:#f2f5f7;border-radius:8px;min-height:100px}.message-bubble{width:fit-content;max-width:88%;margin:8px 0;background:white;border:1px solid #d6dde4;padding:10px 13px;border-radius:12px}.message-bubble.mine{margin-left:auto;background:#fff0d7}.message-bubble small{font-size:11px;color:#63717f}.message-body{white-space:pre-wrap;overflow-wrap:anywhere;margin:7px 0}.message-compose{display:grid;gap:7px;padding-top:10px}.message-compose textarea{resize:vertical;min-height:60px;max-height:140px}.message-compose input,.message-compose textarea,.message-compose select{box-sizing:border-box;width:100%;padding:9px;border:1px solid #c6ced8;border-radius:6px}#messageDepartments{display:flex;flex-wrap:wrap;gap:12px;padding:8px}#messageDepartments input{width:auto}#messageDepartments label{font-size:13px}
.parameters-card{width:min(1050px,95vw)!important}.parameters-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.parameters-grid>div{background:#f0f3f6;padding:14px;border-radius:8px}.parameters-grid b{display:block;font-size:24px;margin-top:8px}.parameters-charts{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:20px 0}.parameter-chart svg{width:100%;display:block}.parameter-chart text{font-size:15px;fill:#607080}.backup-status{padding:15px;background:#eef7ee;border-radius:8px}.backup-error{background:#ffe5df;color:#9b3020}.backup-status button{margin:6px 8px 0 0}
.lookup-edit-card{width:min(600px,95vw)!important}.lookup-edit-card label{display:block;margin:12px 0}.lookup-edit-card input,.lookup-edit-card select{display:block;width:100%;box-sizing:border-box;padding:10px;margin-top:5px}.lookup-edit-card p{font-size:13px;color:#65727f}.reason-mapping{padding:14px;margin:14px 0;background:#fff5e7;border:1px solid #ed9200;border-radius:8px}.reason-mapping fieldset{margin:10px 0;border:1px solid #d6c5ac}.reason-mapping label{display:block;text-align:left;padding:6px}.reason-mapping input{width:auto!important}.reason-mapping legend{font-weight:700}
@media(max-width:760px){.messages-layout{grid-template-columns:130px minmax(0,1fr);gap:8px}.messages-sidebar{padding-right:5px}.message-thread{padding:7px;font-size:12px}.parameters-grid{grid-template-columns:repeat(2,1fr)}.parameters-charts{grid-template-columns:1fr}.topbar .left-menu{flex-wrap:wrap;gap:4px}}
