/* SMS Journal clean module.
   Only oxy-sms-* classes. No legacy SMS classes.
   Readable operator typography.
*/

#sms > .panel > h2:first-child {
  display: none !important;
}

#sms .oxy-sms-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 165px 165px 145px;
  gap: 12px;
  align-items: center;
  margin: 6px 0 20px;
}

#sms .oxy-sms-filters b {
  display: block;
  color: #102d3f;
  font-size: 14px;
  font-weight: 900;
}

#sms .oxy-sms-filters span {
  color: #557286;
  font-size: 12.5px;
}

#sms .oxy-sms-list {
  display: grid;
  gap: 13px;
}

#sms .oxy-sms-group {
  border-radius: 22px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(32,93,120,.10);
  box-shadow: 0 14px 34px rgba(31,76,100,.07);
  overflow: hidden;
}

#sms .oxy-sms-group[open] {
  border-color: rgba(56,189,248,.25);
}

#sms .oxy-sms-summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(250px, .85fr) minmax(470px, 1.45fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 15px 18px;
  background: rgba(247,251,253,.94);
  color: #102d3f;
}

#sms .oxy-sms-group-title b {
  display: block;
  color: #102d3f;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
}

#sms .oxy-sms-group-title span {
  display: block;
  color: #557286;
  font-size: 13px;
  margin-top: 4px;
  font-weight: 700;
}

#sms .oxy-sms-group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  align-items: center;
}

#sms .oxy-sms-group-meta > span {
  color: #557286;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}

#sms .oxy-sms-group-meta b {
  color: #102d3f;
  font-weight: 900;
}

#sms .oxy-sms-group-stock {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#sms .oxy-sms-group-stock span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(236,244,248,.86);
  border: 1px solid rgba(32,93,120,.09);
  color: #557286;
  font-size: 12.5px;
  font-weight: 800;
}

#sms .oxy-sms-group-stock b {
  color: #102d3f;
  font-weight: 900;
}

#sms .oxy-sms-rows {
  display: grid;
  gap: 8px;
  padding: 11px;
}

/* One SMS = one readable line */
#sms .oxy-sms-row {
  display: grid;
  grid-template-columns:
    150px
    160px
    130px
    minmax(140px, .75fr)
    minmax(620px, 2.3fr)
    185px;
  gap: 11px;
  align-items: center;
  min-height: 62px;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(32,93,120,.09);
  color: #102d3f;
}

#sms .oxy-sms-row:hover {
  background: rgba(247,251,253,.99);
}

#sms .oxy-sms-date,
#sms .oxy-sms-sender,
#sms .oxy-sms-type,
#sms .oxy-sms-message,
#sms .oxy-sms-values,
#sms .oxy-sms-rule {
  min-width: 0;
}

#sms .oxy-sms-date b,
#sms .oxy-sms-sender b,
#sms .oxy-sms-type b {
  display: block;
  color: #102d3f;
  font-size: 13px;
  line-height: 1.18;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sms .oxy-sms-date span,
#sms .oxy-sms-type span {
  display: block;
  margin-top: 4px;
  color: #557286;
  font-size: 12px;
  line-height: 1.18;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sms .oxy-sms-message span,
#sms .oxy-sms-message b {
  display: block;
  color: #3b6682;
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sms .oxy-sms-message b {
  color: #be123c;
  font-weight: 900;
}

#sms .oxy-sms-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1;
  font-weight: 900;
}

#sms .oxy-sms-status.is-ok {
  background: rgba(220,252,231,.9);
  color: #047857;
  border: 1px solid rgba(16,185,129,.22);
}

#sms .oxy-sms-status.is-error {
  background: rgba(255,228,236,.92);
  color: #be123c;
  border: 1px solid rgba(244,63,94,.24);
}

#sms .oxy-sms-values {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  align-items: center;
  overflow: hidden;
}

#sms .oxy-sms-values span {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 5px;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(236,244,248,.78);
  border: 1px solid rgba(32,93,120,.09);
  line-height: 1;
}

#sms .oxy-sms-values em {
  color: #557286;
  font-size: 11px;
  line-height: 1;
  font-style: normal;
  font-weight: 800;
}

#sms .oxy-sms-values b {
  color: #102d3f;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  max-width: 115px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sms .oxy-sms-rule {
  display: flex;
  justify-content: flex-end;
}

#sms .oxy-sms-mode {
  display: inline-grid;
  gap: 3px;
  width: fit-content;
  max-width: 185px;
  padding: 6px 9px;
  border-radius: 11px;
  line-height: 1.1;
  font-weight: 900;
}

#sms .oxy-sms-mode b {
  color: inherit;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

#sms .oxy-sms-mode small {
  color: inherit;
  opacity: .9;
  font-size: 11px;
  line-height: 1.05;
  white-space: nowrap;
}

#sms .oxy-sms-mode.is-ok {
  color: #047857;
  background: rgba(220,252,231,.88);
  border: 1px solid rgba(16,185,129,.22);
}

#sms .oxy-sms-mode.is-warn {
  color: #8a5a00;
  background: rgba(255,247,220,.94);
  border: 1px solid rgba(245,158,11,.30);
}

#sms .oxy-sms-mode.is-muted {
  color: #557286;
  background: rgba(236,244,248,.86);
  border: 1px solid rgba(32,93,120,.09);
}

/* Hide legacy table if old app renderer briefly appears */
#sms .sms-journal-table,
#sms .sms-journal-head {
  display: none !important;
}

/* Quarantine readability */
#sms #smsQuarantineList {
  display: grid;
  gap: 10px;
}

#sms #smsQuarantineList .row,
#sms #smsQuarantineList > div {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(32,93,120,.09);
  color: #102d3f;
}

#sms #smsQuarantineList .muted,
#sms #smsQuarantineList span {
  color: #557286;
}

@media (max-width: 1500px) {
  #sms .oxy-sms-row {
    grid-template-columns:
      145px
      150px
      120px
      minmax(110px, .55fr)
      minmax(560px, 2fr)
      175px;
    gap: 8px;
  }

  #sms .oxy-sms-values span {
    padding: 5px 7px;
  }

  #sms .oxy-sms-values b {
    max-width: 92px;
  }
}

@media (max-width: 1200px) {
  #sms .oxy-sms-filters,
  #sms .oxy-sms-summary,
  #sms .oxy-sms-row {
    grid-template-columns: 1fr;
  }

  #sms .oxy-sms-group-stock,
  #sms .oxy-sms-rule {
    justify-content: flex-start;
  }

  #sms .oxy-sms-values {
    flex-wrap: wrap;
  }
}






/* SMS journal font readability only */
#sms .oxy-sms-row,
#sms .oxy-sms-summary,
#sms .oxy-sms-group-title,
#sms .oxy-sms-group-meta,
#sms .oxy-sms-group-stock,
#sms .oxy-sms-values,
#sms .oxy-sms-mode {
  font-family: inherit !important;
  color: #102d3f !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

/* Основные данные строки: дата, номер, тип */
#sms .oxy-sms-date b,
#sms .oxy-sms-sender b,
#sms .oxy-sms-type b {
  color: #08283a !important;
  font-size: 14.5px !important;
  line-height: 1.2 !important;
  font-weight: 750 !important;
  letter-spacing: -0.01em !important;
}

/* Вторичные подписи: отчетная дата, Info-xxx */
#sms .oxy-sms-date span,
#sms .oxy-sms-type span,
#sms .oxy-sms-message span {
  color: #36586d !important;
  font-size: 13.2px !important;
  line-height: 1.22 !important;
  font-weight: 600 !important;
}

/* parsed */
#sms .oxy-sms-status {
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

/* Капсулы значений: Cash, Stak, Trub, Water, Sir */
#sms .oxy-sms-values em,
#sms .oxy-sms-group-stock span {
  color: #36586d !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
}

#sms .oxy-sms-values b,
#sms .oxy-sms-group-stock b {
  color: #08283a !important;
  font-size: 13.8px !important;
  line-height: 1 !important;
  font-weight: 750 !important;
}

/* Режим report_date: оставляем капсулу, только читаемее */
#sms .oxy-sms-mode b {
  font-size: 13.2px !important;
  line-height: 1.1 !important;
  font-weight: 750 !important;
  color: inherit !important;
}

#sms .oxy-sms-mode small {
  font-size: 12.2px !important;
  line-height: 1.1 !important;
  font-weight: 600 !important;
  color: inherit !important;
  opacity: .95 !important;
}

/* Верхняя строка группы */
#sms .oxy-sms-group-title b {
  color: #08283a !important;
  font-size: 16px !important;
  font-weight: 750 !important;
}

#sms .oxy-sms-group-title span,
#sms .oxy-sms-group-meta > span {
  color: #36586d !important;
  font-size: 13.6px !important;
  font-weight: 600 !important;
}

#sms .oxy-sms-group-meta b {
  color: #08283a !important;
  font-weight: 750 !important;
}

/* End SMS journal font readability only */



