.demo-page {
  min-width: 320px;
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "Montserrat", sans-serif;
}

.demo-main {
  min-height: calc(100vh - 96px);
  padding: 88px 0 72px;
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.72fr) minmax(240px, 0.75fr);
  align-items: center;
  gap: 42px;
}

.demo-intro h1 {
  margin: 0 0 24px;
  color: #000;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: 0;
}

.demo-intro h1 span {
  color: #dc291e;
}

.demo-lead {
  max-width: 455px;
  margin: 0 0 27px;
  color: #686868;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

.sensor-copy {
  margin-bottom: 20px;
}

.sensor-copy h2 {
  margin: 0 0 7px;
  color: #dc291e;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.sensor-copy p,
.sensor-example {
  margin: 0;
  color: #555;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.sensor-copy p {
  max-width: 275px;
}

.sensor-form {
  display: flex;
  align-items: center;
  width: min(100%, 520px);
  height: 60px;
  padding: 5px;
  border: 1px solid #000;
  border-radius: 12px;
  background: #fff;
}

.sensor-form input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 14px;
  border: 0;
  outline: 0;
  color: #535353;
  font-family: inherit;
  font-size: 14px;
}

.sensor-form input::placeholder {
  color: #a4a9b2;
}

.sensor-form button {
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: #dc291e;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.sensor-form button:hover,
.sensor-form button:focus-visible {
  background: #bd2118;
}

.sensor-example {
  margin-top: 9px;
  color: #8a8a8a;
  font-size: 10px;
}

.sensor-status {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 500;
}

.sensor-status.is-loading {
  color: #666;
}

.sensor-status.is-success {
  color: #16844b;
}

.sensor-status.is-error {
  color: #dc291e;
}

.sensor-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.demo-device {
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-device img {
  display: block;
  width: min(100%, 220px);
  max-height: 345px;
  object-fit: contain;
}

.demo-steps {
  align-self: center;
}

.demo-steps > h2 {
  margin: 0 0 34px;
  color: #000;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.demo-steps article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
}

.demo-steps article + article {
  margin-top: 25px;
}

.demo-steps article > img {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.demo-steps h3 {
  margin: 0 0 5px;
  color: #dc291e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.demo-steps p {
  max-width: 160px;
  margin: 0;
  color: #777;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}

.demo-results {
  border-top: 1px solid #eee;
}

.result-section {
  padding: 84px 0;
}

.result-section + .result-section {
  border-top: 1px solid #ededed;
}

.section-heading-row,
.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.chart-heading-row {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 34px;
}

.chart-heading-row .section-kicker {
  margin-bottom: 0;
}

.chart-heading-row h2 {
  margin-bottom: 4px;
}

.chart-heading-row .last-updated {
  margin-top: 2px;
  text-align: center;
}

.section-kicker {
  margin: 0 0 7px;
  color: #dc291e;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-section h2 {
  margin: 0;
  color: #111;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.last-updated,
.coordinate-copy {
  margin: 0;
  color: #777;
  font-size: 11px;
  text-align: right;
}

.chart-card {
  position: relative;
  height: 460px;
  padding: 34px 40px 30px;
  border: 1px solid #e9e9e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.045);
}

.log-section {
  background: #fcfcfc;
}

.log-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(285px, 0.75fr);
  align-items: start;
  gap: 44px;
}

.panel-heading {
  align-items: center;
}

.log-filter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-filter-label select {
  min-width: 145px;
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid #b9b9b9;
  border-radius: 6px;
  background: #fff;
  color: #444;
  font-family: inherit;
  font-size: 11px;
}

.clear-filters-btn {
  height: 38px;
  padding: 0 16px;
  border: 1px solid #b9b9b9;
  border-radius: 6px;
  background: #fff;
  color: #444;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.clear-filters-btn:hover,
.clear-filters-btn:focus-visible {
  border-color: #dc291e;
  color: #dc291e;
}

.table-wrap {
  max-height: 465px;
  overflow: auto;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;
}

.sensor-table {
  width: 100%;
  border-collapse: collapse;
  color: #555;
  font-size: 12px;
}

.sensor-table th,
.sensor-table td {
  padding: 14px 11px;
  border-bottom: 1px solid #ededed;
  text-align: left;
  white-space: nowrap;
}

.sensor-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #fff;
  color: #444;
  font-size: 11px;
  font-weight: 600;
  white-space: normal;
}

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

.sensor-table tbody tr:hover {
  background: #fff8f7;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #555;
  font-weight: 500;
  text-transform: capitalize;
}

.status-badge i {
  font-size: 12px;
  color: #18ac61;
}

.status-badge.status-open i {
  color: #f47a29;
}

.cell-icon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cell-icon i {
  width: 13px;
  flex: 0 0 13px;
  color: #9aa0a6;
  font-size: 12px;
  text-align: center;
}

.temp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.temp-badge i {
  font-size: 11px;
}

.temp-badge.temp-below {
  background: #e4f1fd;
  color: #1668a8;
}

.temp-badge.temp-normal {
  background: #e6f7ee;
  color: #16844b;
}

.temp-badge.temp-above {
  background: #fdeae8;
  color: #c32b1f;
}

.empty-table {
  padding: 40px 16px !important;
  color: #888;
  text-align: center !important;
}

.sensor-info-panel {
  padding: 27px 25px;
  border: 1px solid #e2e2e2;
  border-radius: 13px;
  background: #fff;
}

.sensor-info-panel h2 {
  margin-bottom: 22px;
}

.sensor-info-panel dl,
.sensor-info-panel dd {
  margin: 0;
}

.sensor-info-panel dl > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f0f0;
}

.sensor-info-panel dl > div:last-child {
  border-bottom: 0;
}

.sensor-info-panel dt,
.sensor-info-panel dd {
  font-size: 11px;
  line-height: 1.4;
}

.sensor-info-panel dt {
  color: #222;
  font-weight: 600;
}

.sensor-info-panel dd {
  max-width: 145px;
  color: #555;
  text-align: right;
}

.location-heading {
  align-items: center;
}

.location-card {
  min-height: 440px;
  overflow: hidden;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: #f8f8f8;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.045);
}

.location-map {
  width: 100%;
  min-height: 440px;
  background: #eef1f3;
}

.demo-page .site-footer {
  margin-top: 0;
}

@media (max-width: 992px) {
  .demo-main {
    min-height: calc(100vh - 76px);
    padding: 55px 0 65px;
  }

  .demo-layout {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.7fr);
    gap: 45px 35px;
  }

  .demo-intro {
    align-self: center;
  }

  .demo-device img {
    width: min(100%, 205px);
  }

  .demo-steps {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

  .demo-steps > h2 {
    grid-column: 1 / -1;
    margin-bottom: 2px;
  }

  .demo-steps article + article {
    margin-top: 0;
  }

  .result-section {
    padding: 68px 0;
  }

  .log-info-grid {
    grid-template-columns: 1fr;
  }

  .sensor-info-panel {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .demo-main {
    padding: 38px 0 52px;
  }

  .demo-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .demo-intro h1 {
    font-size: clamp(32px, 10vw, 40px);
  }

  .demo-lead {
    font-size: 15px;
  }

  .demo-device {
    grid-row: 2;
  }

  .demo-device img {
    width: min(68vw, 225px);
  }

  .demo-steps {
    grid-column: auto;
    grid-template-columns: 1fr;
    width: min(100%, 360px);
    margin: 0 auto;
  }

  .demo-steps > h2 {
    grid-column: auto;
  }

  .result-section {
    padding: 52px 0;
  }

  .section-heading-row,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 22px;
  }

  .last-updated,
  .coordinate-copy {
    text-align: left;
  }

  .chart-card {
    height: 360px;
    padding: 15px 10px 12px;
  }

  .log-filter-controls {
    width: 100%;
  }

  .status-filter-label,
  .status-filter-label select {
    width: 100%;
  }

  .clear-filters-btn {
    flex: 0 0 auto;
  }

  .sensor-table th,
  .sensor-table td {
    padding: 14px 12px;
  }

  .location-card,
  .location-map {
    min-height: 360px;
  }

  .location-map {
    height: 360px;
  }
}
