:root {
  --blue: #385460;
  --blue-dark: #223942;
  --blue-soft: #e8eef1;
  --red: #e30613;
  --red-soft: #fff0f1;
  --green: #2f9e6b;
  --green-soft: #eaf7f1;
  --amber: #d98910;
  --ink: #23343d;
  --muted: #60727b;
  --line: #d4dce0;
  --panel: #fff;
  --background: #eef2f4;
  --radius: 20px;
  --shadow: 0 18px 48px rgba(34, 57, 66, .09);
}

* {
  box-sizing: border-box;
}

html [hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: var(--background);
}

body {
  min-height: 100vh;
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0, rgba(56, 84, 96, .11), transparent 28rem),
    var(--background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

a {
  color: inherit;
}

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

button,
.button {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.page {
  min-height: calc(100vh - 145px);
  padding-block: 38px 70px;
}

.page-narrow {
  width: min(760px, calc(100% - 36px));
}

.page-form-wide {
  width: min(980px, calc(100% - 36px));
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(35, 52, 61, .1);
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 8px 32px rgba(34, 57, 66, .04);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 34px;
}

.brand {
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.05em;
}

.brand-uri {
  color: var(--red);
  font-weight: 650;
}

.brand-smart {
  color: var(--blue);
}

.brand-cloud {
  margin-left: 8px;
  padding-left: 9px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 5px;
}

.main-nav a {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.main-nav a::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--blue);
}

.main-nav a.active::after {
  background: var(--red);
}

.user-menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 13px;
}

.user-name {
  color: var(--muted);
}

.link-button {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.page-heading {
  margin: 18px 0 32px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 49px);
  letter-spacing: -.045em;
  line-height: 1.04;
}

.page-heading > p:last-child,
.page-heading > div > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.heading-with-action,
.detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 9px 24px rgba(56, 84, 96, .23);
}

.button-primary:hover {
  background: var(--blue-dark);
}

.button-secondary {
  border-color: var(--line);
  color: var(--blue);
  background: #fff;
}

.button-wide {
  width: 100%;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 24px;
}

.summary-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 23px;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow);
}

.summary-label,
.card-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.summary-card strong {
  margin-block: 8px 4px;
  font-size: 39px;
  letter-spacing: -.045em;
  line-height: 1;
}

.summary-card > span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.text-success {
  color: var(--green);
}

.text-danger {
  color: var(--red);
}

.urinal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.urinal-card {
  overflow: hidden;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.urinal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(34, 57, 66, .14);
}

.urinal-card-head {
  min-height: 126px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.object-id {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
}

.urinal-card h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.025em;
}

.urinal-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: #99a6ac;
  box-shadow: 0 0 0 6px rgba(153, 166, 172, .12);
}

.status-ok {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(47, 158, 107, .12);
}

.status-low {
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(227, 6, 19, .1);
}

.status-offline {
  background: #7e8c92;
  box-shadow: 0 0 0 6px rgba(126, 140, 146, .1);
}

.urinal-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-inline: 14px;
  padding: 13px 15px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 750;
}

.status-panel-ok {
  color: #19734d;
  background: var(--green-soft);
}

.status-panel-low {
  color: var(--red);
  background: var(--red-soft);
}

.status-panel-offline,
.status-panel-unknown {
  color: var(--muted);
  background: #eff3f4;
}

.urinal-status small {
  font-weight: 650;
  opacity: .76;
}

.urinal-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.urinal-metrics > div {
  min-width: 0;
  padding: 17px 20px;
  background: #fff;
}

.urinal-metrics span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.urinal-metrics strong {
  display: block;
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urinal-metrics .metric-small {
  padding-top: 4px;
  font-size: 14px;
}

.empty-state,
.error-card {
  max-width: 680px;
  margin: 50px auto 0;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.empty-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 17px;
  border-radius: 20px;
  color: #fff;
  background: var(--blue);
  font-size: 34px;
}

.empty-state h2,
.error-card h1 {
  margin: 0;
}

.empty-state p,
.error-card p {
  margin: 10px auto 22px;
  color: var(--muted);
  line-height: 1.6;
}

.back-link {
  color: var(--blue);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.form-card {
  padding: clamp(23px, 5vw, 42px);
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.stack-form {
  display: grid;
  gap: 20px;
}

.stack-form label {
  display: grid;
  gap: 8px;
}

.stack-form label > span {
  font-size: 14px;
  font-weight: 750;
}

.stack-form label > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  width: 100%;
  border: 1px solid #cbd6da;
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  color: var(--ink);
  background: #fbfcfc;
  transition: border .15s ease, box-shadow .15s ease;
}

.stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.stack-form select {
  min-height: 48px;
  height: 48px;
  line-height: 1.2;
}

.stack-form select {
  padding-top: 0;
  padding-bottom: 0;
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(56, 84, 96, .11);
}

.stack-form textarea {
  resize: vertical;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.form-divider::before,
.form-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 7px;
}

.flash {
  margin-bottom: 22px;
  padding: 14px 17px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 650;
}

.flash-success {
  border-color: rgba(47, 158, 107, .2);
  color: #19734d;
  background: var(--green-soft);
}

.flash-error {
  border-color: rgba(227, 6, 19, .17);
  color: var(--red);
  background: var(--red-soft);
}

.flash-pairing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-color: rgba(56, 84, 96, .16);
  background: #fff;
  box-shadow: var(--shadow);
}

.flash-pairing p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 500;
}

.pairing-code {
  padding: 13px 17px;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(22px, 4vw, 31px);
  font-weight: 850;
  letter-spacing: .12em;
}

.pairing-guide {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px;
  border: 1px solid rgba(56, 84, 96, .15);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.pairing-step-number {
  width: 45px;
  height: 45px;
  display: grid;
  flex: 0 0 45px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--blue);
  font-size: 20px;
  font-weight: 800;
}

.pairing-guide h2 {
  margin: 1px 0 6px;
}

.pairing-guide p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr 1fr;
  gap: 16px;
  min-width: 0;
}

.lock-card,
.usage-detail-card,
.connection-card {
  min-width: 0;
  min-height: 250px;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.lock-card {
  display: flex;
  align-items: center;
  gap: 23px;
  padding: 28px;
}

.lock-light {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  border-radius: 50%;
  background: #8b989d;
  box-shadow: 0 0 0 12px rgba(139, 152, 157, .1);
}

.lock-card-ok .lock-light {
  background: var(--green);
  box-shadow: 0 0 30px rgba(47, 158, 107, .32), 0 0 0 12px rgba(47, 158, 107, .1);
}

.lock-card-low .lock-light {
  background: var(--red);
  box-shadow: 0 0 30px rgba(227, 6, 19, .25), 0 0 0 12px rgba(227, 6, 19, .08);
}

.lock-card h2 {
  margin: 7px 0 4px;
  font-size: 31px;
}

.lock-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.lock-card small {
  color: var(--muted);
}

.usage-detail-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 27px;
}

.usage-detail-card strong {
  margin: 10px 0 5px;
  font-size: clamp(48px, 7vw, 72px);
  letter-spacing: -.065em;
  line-height: .95;
}

.usage-detail-card > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.connection-card {
  padding: 25px;
}

.connection-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.connection-row strong {
  display: block;
  margin-top: 4px;
  font-size: 21px;
}

.connection-card dl {
  margin: 0;
}

.connection-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-block: 9px;
  border-top: 1px solid #e8edef;
  font-size: 12px;
}

.connection-card dt {
  color: var(--muted);
}

.connection-card dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.measurement-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.measurement-grid article {
  min-width: 0;
  padding: 19px 21px;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: 15px;
  background: rgba(255, 255, 255, .8);
}

.measurement-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.measurement-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card {
  margin-top: 26px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.history-card.loading {
  opacity: .72;
}

.history-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.history-head h2 {
  margin: 0;
  font-size: 27px;
}

.history-range {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f2f5f6;
}

.history-range button {
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.history-range button.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 3px 10px rgba(34, 57, 66, .1);
}

.chart-wrap {
  position: relative;
  min-height: 280px;
  margin-top: 20px;
}

#historyChart {
  width: 100%;
  display: block;
}

.history-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
}

.history-columns {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  align-items: start;
  gap: 28px;
  margin-top: 25px;
}

.history-columns > div {
  min-width: 0;
}

.history-columns h3 {
  margin: 0 0 11px;
  font-size: 15px;
}

.history-table-head {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.history-table-head h3 {
  margin: 0;
}

.history-event-head {
  min-height: 36px;
}

.history-event-limit {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.history-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.history-page-size select {
  min-width: 66px;
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background-color: #fff;
  font: inherit;
  cursor: pointer;
}

.history-pagination {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.history-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-pagination button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--blue);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.history-pagination button:hover:not(:disabled) {
  border-color: rgba(56, 84, 96, .3);
  background: var(--panel-soft);
}

.history-pagination button:disabled {
  color: #aeb9be;
  background: #f5f7f8;
  cursor: not-allowed;
}

.history-page-number {
  min-width: 84px;
  text-align: center;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid #e7edef;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.table-status {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 99px;
  background: #edf1f2;
  font-weight: 700;
}

.table-status-ok {
  color: #19734d;
  background: var(--green-soft);
}

.table-status-low {
  color: var(--red);
  background: var(--red-soft);
}

.event-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-list li {
  display: flex;
  gap: 10px;
}

.event-marker {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.event-list strong {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.event-list time {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.event-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.event-list .event-service {
  padding: 10px;
  border: 1px solid rgba(56, 84, 96, .12);
  border-radius: 11px;
  background: #f7fafb;
}

.event-list .event-service .event-marker {
  background: var(--red);
}

.event-service-content {
  min-width: 0;
  flex: 1;
}

.event-service-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.event-service-heading > div {
  min-width: 0;
}

.event-service-heading time {
  flex: 0 0 auto;
  margin: 1px 0 0;
  white-space: nowrap;
}

.event-service-kicker {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .035em;
  line-height: 1.2;
}

.event-service-operator {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(56, 84, 96, .09);
  border-radius: 9px;
  background: #fff;
}

.event-operator-initials {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .03em;
}

.event-service-operator > span:last-child {
  min-width: 0;
}

.event-service-operator strong,
.event-service-operator small {
  overflow-wrap: anywhere;
}

.event-service-operator small {
  margin-top: 1px;
}

.event-service-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.event-service-facts span {
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--muted);
  background: var(--blue-soft);
  overflow-wrap: anywhere;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.3;
}

.heading-actions,
.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-context {
  display: grid;
  gap: 2px;
  text-align: right;
}

.user-context strong {
  color: var(--ink);
  font-size: 12px;
}

.user-context a {
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}

.user-context a:hover {
  color: var(--blue);
}

.site-sections {
  display: grid;
  gap: 36px;
}

.site-section {
  display: grid;
  gap: 17px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-inline: 3px;
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -.035em;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.count-badge,
.role-badge,
.state-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.count-badge {
  padding: 7px 11px;
  color: var(--blue);
  background: var(--blue-soft);
}

.management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.management-card,
.table-card {
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.management-card {
  display: grid;
  align-content: start;
  gap: 19px;
  padding: 23px;
}

.presentation-site-card {
  border-color: rgba(56, 84, 96, .24);
  background: linear-gradient(145deg, #fff 0%, #f4f8f9 100%);
}

.presentation-badge {
  margin: 8px 0 10px;
}

.presentation-delete-form {
  display: grid;
  gap: 11px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.presentation-delete-form label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.presentation-delete-form input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--red);
}

.presentation-delete-form .button {
  width: 100%;
}

.management-card-head {
  min-height: 78px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.management-card h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.03em;
}

.management-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.mini-stats-two {
  grid-template-columns: repeat(2, 1fr);
}

.mini-stats-four {
  grid-template-columns: repeat(4, 1fr);
}

.mini-stats > div {
  padding: 12px;
  text-align: center;
}

.mini-stats > div + div {
  border-left: 1px solid var(--line);
}

.mini-stats dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.mini-stats dd {
  margin: 4px 0 0;
  font-size: 21px;
  font-weight: 800;
}

.state-badge,
.role-badge {
  padding: 6px 9px;
}

.state-active {
  color: #19734d;
  background: var(--green-soft);
}

.state-inactive {
  color: var(--muted);
  background: #edf1f2;
}

.role-owner {
  color: #7d5200;
  background: #fff3d7;
}

.role-admin {
  color: var(--blue);
  background: var(--blue-soft);
}

.role-viewer {
  color: #505d63;
  background: #edf1f2;
}

.table-card {
  overflow: hidden;
}

.management-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.management-table th,
.management-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #e8edef;
  text-align: left;
  vertical-align: middle;
}

.management-table th {
  color: var(--muted);
  background: #f7f9fa;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

.management-table td strong,
.management-table td small {
  display: block;
}

.management-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.table-action {
  text-align: right !important;
}

.button-small {
  min-height: 44px;
  padding: 9px 12px;
  font-size: 12px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-note,
.checkbox-fieldset > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-title {
  margin: 0;
  font-size: 25px;
}

.checkbox-fieldset {
  min-width: 0;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.checkbox-fieldset legend {
  padding: 0 7px;
  font-size: 14px;
  font-weight: 750;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.checkbox-option,
.toggle-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 11px !important;
  padding: 12px;
  border: 1px solid #dfe6e9;
  border-radius: 12px;
  background: #fbfcfc;
}

.checkbox-option input,
.toggle-option input {
  width: 17px !important;
  height: 17px;
  flex: 0 0 17px;
  margin: 2px 0 0;
  padding: 0 !important;
  accent-color: var(--blue);
}

.checkbox-option > span,
.toggle-option > span {
  display: grid;
  gap: 3px;
}

.checkbox-option strong,
.toggle-option strong {
  font-size: 13px;
}

.checkbox-option small,
.toggle-option small {
  color: var(--muted);
  font-size: 11px;
}

.inline-notice {
  padding: 12px 14px;
  border-radius: 11px;
  color: #7d5200;
  background: #fff3d7;
  font-size: 12px;
}

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

.site-section-heading {
  padding: 25px 27px;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff, #f7f9fa);
  box-shadow: 0 10px 30px rgba(34, 57, 66, .06);
}

.site-heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.floor-list,
.room-list {
  display: grid;
  gap: 18px;
}

.floor-section {
  overflow: hidden;
  border: 1px solid rgba(35, 52, 61, .09);
  border-radius: 23px;
  background: rgba(255, 255, 255, .66);
  box-shadow: 0 14px 38px rgba(34, 57, 66, .055);
}

.floor-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.floor-heading h3 {
  margin: 3px 0 0;
  font-size: 22px;
  letter-spacing: -.03em;
}

.floor-heading .count-badge {
  margin-left: auto;
}

.floor-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--blue);
  font-size: 19px;
  font-weight: 850;
}

.room-list {
  padding: 21px;
}

.room-section {
  display: grid;
  gap: 12px;
}

.room-section + .room-section {
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.room-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  padding-inline: 2px;
}

.room-heading h4 {
  margin: 2px 0 0;
  font-size: 17px;
}

.room-heading > span,
.room-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.urinal-card-visual {
  position: relative;
  min-height: 188px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border-bottom: 1px solid #edf1f2;
  background:
    radial-gradient(circle at 50% 25%, #fff 0, #f4f7f8 62%, #e8eef1 100%);
}

.urinal-card-visual > img {
  width: 100%;
  height: 188px;
  display: block;
  object-fit: contain;
  padding: 14px 28px 5px;
}

.urinal-photo-placeholder {
  min-height: 120px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: var(--blue);
  font-size: 30px;
  letter-spacing: -.06em;
}

.urinal-photo-placeholder span {
  color: var(--red);
  font-weight: 600;
}

.urinal-photo-placeholder strong {
  font-weight: 850;
}

[data-model-photo] {
  transition: opacity .18s ease, filter .18s ease;
}

[data-model-photo][hidden] {
  display: none !important;
}

[data-model-photo].model-photo-retrying {
  opacity: .34;
  filter: saturate(.65);
}

.model-photo-fallback {
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
}

.model-photo-fallback-brand {
  display: flex;
  align-items: baseline;
}

.model-photo-fallback small {
  max-width: 180px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.35;
}

.model-photo .model-photo-fallback {
  min-height: 220px;
}

.model-current-photo .model-photo-fallback {
  width: 120px;
  min-width: 120px;
  height: 95px;
  min-height: 95px;
  border-radius: 11px;
  background: #fff;
  font-size: 17px;
}

.model-current-photo .model-photo-fallback small {
  display: none;
}

.model-choice-photo .model-photo-fallback {
  min-height: 155px;
  font-size: 20px;
}

.device-state-pill {
  position: absolute;
  top: 13px;
  right: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 26px);
  padding: 8px 11px;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 7px 20px rgba(34, 57, 66, .1);
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.device-state-pill .status-dot {
  width: 8px;
  height: 8px;
  flex-basis: 8px;
  box-shadow: none;
}

.device-state-ok {
  color: #19734d;
}

.device-state-low {
  color: var(--red);
}

.urinal-card-copy {
  min-height: 108px;
  padding: 18px 20px 14px;
}

.urinal-card-copy p {
  min-height: 20px;
}

.model-management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.model-management-card {
  overflow: hidden;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.model-photo {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  background: #f1f5f6;
}

.model-photo-admin {
  min-height: 220px;
}

.model-photo img {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: contain;
  padding: 16px;
}

.model-photo .state-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  box-shadow: 0 7px 18px rgba(34, 57, 66, .1);
}

.model-management-copy {
  min-height: 150px;
  padding: 20px 22px 14px;
}

.model-management-copy h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -.03em;
}

.model-management-copy p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.model-management-copy .model-code {
  color: var(--blue);
  font-weight: 750;
}

.model-management-card .mini-stats {
  margin-inline: 20px;
}

.model-management-card .card-actions {
  padding: 17px 20px 20px;
}

.model-current-photo {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f7f9fa;
}

.model-current-photo img {
  width: 120px;
  height: 95px;
  display: block;
  border-radius: 11px;
  object-fit: contain;
  background: #fff;
}

.model-current-photo strong {
  display: block;
  margin-top: 6px;
}

.form-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.form-section-heading:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.form-section-heading > span {
  width: 39px;
  height: 39px;
  display: grid;
  flex: 0 0 39px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.form-section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.form-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.model-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.model-choice {
  position: relative;
  display: block !important;
  cursor: pointer;
}

.model-choice > input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.model-choice-content {
  height: 100%;
  display: block;
  overflow: hidden;
  border: 2px solid #dfe6e9;
  border-radius: 17px;
  background: #fff;
  transition: border .16s ease, transform .16s ease, box-shadow .16s ease;
}

.model-choice:hover .model-choice-content {
  transform: translateY(-2px);
  border-color: #aebcc2;
}

.model-choice > input:focus-visible + .model-choice-content {
  box-shadow: 0 0 0 4px rgba(56, 84, 96, .15);
}

.model-choice > input:checked + .model-choice-content {
  border-color: var(--blue);
  box-shadow: 0 10px 28px rgba(56, 84, 96, .16);
}

.model-choice-photo {
  position: relative;
  min-height: 155px;
  display: grid;
  place-items: center;
  background: #f2f5f6;
}

.model-choice-photo img {
  width: 100%;
  height: 155px;
  display: block;
  object-fit: contain;
  padding: 12px;
}

.model-choice-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: transparent;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 15px rgba(34, 57, 66, .13);
  font-weight: 850;
}

.model-choice > input:checked + .model-choice-content .model-choice-check {
  color: #fff;
  background: var(--blue);
}

.model-choice-copy {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.model-choice-copy strong {
  font-size: 15px;
}

.model-choice-copy small {
  color: var(--muted);
}

.model-choice-copy em {
  color: #7d5200;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.inline-alert {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid #f2cf85;
  border-radius: 17px;
  color: #6f4c09;
  background: #fff8e9;
}

.inline-alert strong {
  display: block;
  font-size: 18px;
}

.inline-alert p {
  margin: 6px 0 14px;
  line-height: 1.55;
}

.urinal-context-card {
  display: grid;
  grid-template-columns: 190px 1fr minmax(260px, .85fr);
  align-items: center;
  gap: 25px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.urinal-context-photo {
  height: 135px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border-radius: 15px;
  background: #f1f5f6;
}

.urinal-context-photo img {
  width: 100%;
  height: 135px;
  object-fit: contain;
  padding: 10px;
}

.urinal-context-copy h2 {
  margin: 6px 0 0;
  font-size: 24px;
}

.urinal-context-copy p {
  margin: 5px 0 0;
  color: var(--muted);
}

.urinal-location {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.urinal-location > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 10px 12px;
}

.urinal-location > div + div {
  border-top: 1px solid var(--line);
}

.urinal-location dt {
  color: var(--muted);
  font-size: 11px;
}

.urinal-location dd {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.footer {
  padding: 22px 0;
  border-top: 1px solid rgba(35, 52, 61, .08);
  color: var(--muted);
  font-size: 12px;
}

.reorder-menu {
  position: fixed;
  z-index: 70;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: grid;
  justify-items: end;
  gap: 12px;
}

.service-wizard-body .reorder-menu {
  bottom: calc(104px + env(safe-area-inset-bottom));
}

.reorder-menu-trigger {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 19px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 16px 38px rgba(34, 57, 66, .28);
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.reorder-menu-trigger:hover,
.reorder-menu-trigger[aria-expanded="true"] {
  background: var(--blue-dark);
  box-shadow: 0 18px 44px rgba(34, 57, 66, .34);
  transform: translateY(-2px);
}

.reorder-menu-trigger:focus-visible {
  outline: 3px solid rgba(227, 6, 19, .3);
  outline-offset: 3px;
}

.reorder-menu-trigger svg,
.reorder-popover svg,
.reorder-admin-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reorder-menu-trigger svg {
  width: 25px;
  height: 25px;
  grid-area: 1 / 1;
  transition: opacity .14s ease, transform .18s ease;
}

.reorder-close-icon,
.reorder-menu.is-open .reorder-cart-icon {
  opacity: 0;
  transform: scale(.7) rotate(-18deg);
}

.reorder-menu.is-open .reorder-close-icon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.reorder-popover {
  width: min(300px, calc(100vw - 32px));
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(35, 52, 61, .11);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(34, 57, 66, .22);
  animation: reorder-popover-in .16s ease both;
}

.reorder-popover[hidden] {
  display: none;
}

.reorder-popover-title {
  display: block;
  padding: 7px 10px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.reorder-popover a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
  transition: color .14s ease, background .14s ease;
}

.reorder-popover a:hover,
.reorder-popover a:focus-visible {
  color: var(--blue);
  background: var(--blue-soft);
  outline: none;
}

.reorder-popover a + a {
  border-top: 1px solid var(--line-soft);
}

.reorder-popover a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

@keyframes reorder-popover-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reorder-admin-card {
  margin-top: 24px;
}

.reorder-admin-head {
  justify-content: flex-start;
}

.reorder-admin-icon {
  width: 54px;
  height: 54px;
  display: grid;
  flex: 0 0 54px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: var(--blue);
}

.reorder-admin-icon svg {
  width: 25px;
  height: 25px;
}

.reorder-links-form {
  padding: 26px 28px;
}

@media (max-width: 560px) {
  .reorder-menu {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .reorder-menu-trigger {
    width: 54px;
    height: 54px;
    border-radius: 17px;
  }

  .reorder-admin-head {
    align-items: flex-start;
  }

  .reorder-links-form {
    padding: 20px 16px;
  }
}

.auth-page {
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, .12), transparent 22rem),
    linear-gradient(135deg, #263f49 0%, #385460 52%, #21353e 100%);
}

.auth-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 440px;
  align-items: center;
  gap: 65px;
  margin-inline: auto;
  padding-block: 40px;
}

.auth-brand-panel {
  color: #fff;
}

.auth-brand {
  font-size: clamp(48px, 8vw, 90px);
  font-weight: 850;
  letter-spacing: -.07em;
}

.auth-brand .brand-uri {
  color: #fff;
  font-weight: 550;
}

.auth-brand .brand-smart {
  color: #fff;
}

.auth-brand-panel p {
  max-width: 500px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: 20px;
  line-height: 1.6;
}

.auth-card {
  padding: 36px;
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .23);
}

.auth-card-head {
  margin-bottom: 25px;
}

.auth-card h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -.04em;
}

.auth-card-head > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.error-code {
  display: block;
  color: var(--red);
  font-size: 64px;
  font-weight: 850;
  letter-spacing: -.06em;
}

@media (max-width: 980px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .model-management-grid,
  .model-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .urinal-context-card {
    grid-template-columns: 170px 1fr;
  }

  .urinal-location {
    grid-column: 1 / -1;
  }

  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .connection-card {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .measurement-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 760px) {
  .topbar-inner {
    min-height: 64px;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding-block: 10px;
  }

  .main-nav {
    width: 100%;
    order: 3;
    overflow-x: auto;
  }

  .main-nav a {
    min-height: 36px;
    padding-inline: 5px 16px;
    white-space: nowrap;
  }

  .main-nav a::after {
    right: 16px;
    left: 5px;
  }

  .user-context strong {
    display: none;
  }

  .heading-with-action,
  .detail-heading,
  .history-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .urinal-grid,
  .detail-grid,
  .management-grid,
  .model-management-grid {
    grid-template-columns: 1fr;
  }

  .heading-actions,
  .card-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .site-heading-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .site-heading-actions .count-badge {
    align-self: flex-start;
  }

  .urinal-context-card {
    grid-template-columns: 140px 1fr;
  }

  .connection-card {
    grid-column: auto;
  }

  .flash-pairing {
    align-items: stretch;
    flex-direction: column;
  }

  .pairing-code {
    text-align: center;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .auth-brand-panel {
    text-align: center;
  }

  .auth-brand-panel p {
    margin-inline: auto;
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .shell,
  .page-narrow {
    width: min(100% - 24px, 1180px);
  }

  .page {
    padding-top: 24px;
  }

  .summary-grid,
  .measurement-grid,
  .form-row,
  .checkbox-grid,
  .model-choice-grid {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 120px;
  }

  .lock-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .room-list {
    padding: 14px;
  }

  .floor-heading {
    padding: 15px;
  }

  .mini-stats-four {
    grid-template-columns: repeat(2, 1fr);
  }

  .mini-stats-four > div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .mini-stats-four > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .urinal-context-card {
    grid-template-columns: 1fr;
  }

  .urinal-context-photo {
    height: 190px;
  }

  .urinal-context-photo img {
    height: 190px;
  }

  .urinal-location {
    grid-column: auto;
  }

  .history-range {
    width: 100%;
  }

  .history-range button {
    flex: 1;
  }

  .auth-card {
    padding: 25px 20px;
  }
}

/* Smart-Bulb-Geräteerkennung */
.devices-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.discovery-section,
.coupled-devices-section {
  margin-top: 26px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-heading-row h2 {
  margin: 2px 0 6px;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
}

.section-heading-row p:last-child {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
}

.section-count {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  background: #edf2f3;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.discovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.discovery-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #d7e0e3;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(40, 151, 99, 0.09), transparent 12rem),
    #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.discovery-card.is-identifying {
  border-color: rgba(35, 154, 98, 0.6);
  box-shadow: 0 0 0 4px rgba(35, 154, 98, 0.09);
}

.discovery-card-head,
.discovery-device-state {
  display: flex;
  align-items: center;
  gap: 11px;
}

.discovery-card-head {
  justify-content: space-between;
}

.discovery-device-state {
  min-width: 0;
}

.discovery-device-state h3 {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.discovery-status-pill {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  background: #edf0f1;
  color: #637078;
  font-size: 0.72rem;
  font-weight: 850;
}

.discovery-status-pill.is-online {
  background: #e6f5ed;
  color: #147347;
}

.discovery-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.discovery-meta div {
  min-width: 0;
  padding: 10px;
  border-radius: 11px;
  background: #f4f7f8;
}

.discovery-meta dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 760;
}

.discovery-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  font-weight: 800;
}

.discovery-actions {
  display: grid;
  gap: 11px;
  padding-top: 16px;
  border-top: 1px solid #e5ebed;
}

.discovery-actions > form:first-child .button {
  width: 100%;
}

.button-identify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.identify-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #28a365;
  box-shadow: 0 0 0 5px rgba(40, 163, 101, 0.1);
}

.button-identify.is-identifying .identify-led {
  animation: identify-pulse 700ms ease-in-out infinite alternate;
}

@keyframes identify-pulse {
  from {
    opacity: 0.25;
    transform: scale(0.72);
    box-shadow: 0 0 0 2px rgba(40, 163, 101, 0.08);
  }
  to {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(40, 163, 101, 0.14);
  }
}

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

.discovery-assign-form label,
.credential-password-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.discovery-assign-form label > span,
.credential-password-fields label > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.discovery-assign-form select,
.credential-password-fields input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbd6da;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.button-linklike {
  justify-self: start;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--blue);
}

.discovery-unassigned,
.discovery-no-target {
  margin: -5px 0 13px;
  color: #8a6412;
  font-size: 0.75rem;
  font-weight: 750;
}

.discovery-empty {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 21px;
  border: 1px dashed #c6d2d6;
  border-radius: 16px;
  background: #f6f8f9;
}

.discovery-empty h3,
.discovery-empty p {
  margin: 0;
}

.discovery-empty p {
  margin-top: 5px;
  color: var(--muted);
}

.discovery-radar {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 2px solid rgba(35, 154, 98, 0.4);
  border-radius: 50%;
}

.discovery-radar::before,
.discovery-radar::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.discovery-radar::before {
  inset: 8px;
  border: 2px solid rgba(35, 154, 98, 0.6);
}

.discovery-radar::after {
  inset: 15px;
  background: #239a62;
  animation: identify-pulse 800ms ease-in-out infinite alternate;
}

.device-management-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.credential-dialog {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100vh - 32px);
  padding: 25px;
  overflow: auto;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(18, 36, 44, 0.3);
}

.credential-dialog::backdrop {
  background: rgba(17, 31, 37, 0.58);
  backdrop-filter: blur(4px);
}

.credential-dialog-close-form {
  position: absolute;
  top: 14px;
  right: 14px;
}

.credential-dialog-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d5dde0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.45rem;
  cursor: pointer;
}

.credential-dialog-head {
  padding-right: 40px;
}

.credential-dialog-head h2 {
  margin: 2px 0 7px;
}

.credential-dialog-head p:last-child {
  margin: 0 0 20px;
  color: var(--muted);
}

.credential-loading {
  padding: 25px 0;
  color: var(--muted);
}

.credential-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 22px;
}

.credential-values {
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
}

.credential-values div {
  padding: 13px;
  border-radius: 12px;
  background: #f3f6f7;
}

.credential-values dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.credential-values dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.credential-values code {
  font-size: 0.9rem;
}

.credential-qr {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 6px;
}

.credential-qr img {
  display: block;
  width: 180px;
  height: 180px;
  border: 1px solid #dfe6e8;
  border-radius: 12px;
}

.credential-qr span {
  color: var(--muted);
  font-size: 0.68rem;
}

.credential-actions {
  margin: 12px 0 18px;
}

.credential-password-form {
  padding-top: 18px;
  border-top: 1px solid #e1e7e9;
}

.credential-password-form h3 {
  margin: 0 0 5px;
}

.credential-password-form > p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.82rem;
}

.credential-password-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.credential-message {
  min-height: 20px;
  margin: 13px 0 0;
  color: #147347;
  font-size: 0.8rem;
  font-weight: 780;
}

.credential-message.is-error,
.dashboard-refresh-status.is-error {
  color: var(--red);
}

@media (max-width: 840px) {
  .devices-heading,
  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .discovery-grid {
    grid-template-columns: 1fr;
  }

  .device-management-buttons {
    justify-content: stretch;
  }
}

@media (max-width: 560px) {
  .discovery-section,
  .coupled-devices-section {
    padding: 18px;
    border-radius: 17px;
  }

  .discovery-meta,
  .credential-password-fields {
    grid-template-columns: 1fr;
  }

  .discovery-assign-form {
    grid-template-columns: 1fr;
  }

  .discovery-assign-form .button,
  .device-management-buttons .button {
    width: 100%;
  }

  .credential-dialog {
    padding: 20px;
  }

  .credential-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   uriSMART Cloud 1.3 — responsive smart-building interface
   -------------------------------------------------------------------------- */

:root {
  --background: #f2f5f6;
  --panel-soft: #f7f9fa;
  --line-soft: #e7edef;
  --radius: 18px;
  --shadow: 0 12px 34px rgba(34, 57, 66, .075);
  --shadow-hover: 0 20px 45px rgba(34, 57, 66, .13);
}

body {
  background:
    radial-gradient(circle at 12% -10%, rgba(56, 84, 96, .08), transparent 28rem),
    var(--background);
}

:focus-visible {
  outline: 3px solid rgba(56, 84, 96, .28);
  outline-offset: 3px;
}

.topbar {
  border-bottom-color: rgba(35, 52, 61, .085);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 5px 22px rgba(34, 57, 66, .045);
}

.topbar-inner {
  min-height: 68px;
  gap: 28px;
}

.brand {
  flex: 0 0 auto;
  font-size: 21px;
}

.brand-cloud {
  margin-left: 7px;
  padding-left: 8px;
  font-size: 10px;
}

.desktop-navigation {
  min-width: 0;
}

.desktop-navigation a {
  padding-inline: 11px;
  font-size: 13px;
}

.desktop-navigation a::after {
  right: 11px;
  left: 11px;
}

.desktop-user-menu {
  gap: 12px;
}

.mobile-menu {
  position: relative;
  display: none;
  margin-left: auto;
}

.mobile-menu > summary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--blue);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
  user-select: none;
}

.mobile-menu > summary::-webkit-details-marker {
  display: none;
}

.menu-icon {
  width: 20px;
  height: 16px;
  position: relative;
  display: block;
}

.menu-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: currentColor;
  transition: top .18s ease, transform .18s ease, opacity .18s ease;
}

.menu-icon span:first-child {
  top: 1px;
}

.menu-icon span:nth-child(2) {
  top: 7px;
}

.menu-icon span:last-child {
  top: 13px;
}

.mobile-menu[open] .menu-icon span:first-child {
  top: 7px;
  transform: rotate(45deg);
}

.mobile-menu[open] .menu-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-menu[open] .menu-icon span:last-child {
  top: 7px;
  transform: rotate(-45deg);
}

.mobile-menu[open] .menu-icon span {
  opacity: 0;
}

.mobile-menu[open] .menu-icon::after {
  content: "×";
  position: absolute;
  inset: -7px 0 0;
  display: grid;
  place-items: center;
  font-size: 27px;
  font-weight: 350;
  line-height: 1;
}

.mobile-menu-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  right: 0;
  width: min(330px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid rgba(35, 52, 61, .11);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(34, 57, 66, .2);
}

.mobile-user-context {
  display: grid;
  gap: 3px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel-soft);
}

.mobile-user-context span,
.mobile-user-context small {
  color: var(--muted);
  font-size: 11px;
}

.mobile-user-context strong {
  font-size: 16px;
}

.mobile-navigation {
  display: grid;
  padding: 8px;
}

.mobile-navigation a {
  padding: 12px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.mobile-navigation a:hover,
.mobile-navigation a.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.mobile-account-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}

.mobile-account-actions a,
.mobile-account-actions button {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
}

.mobile-account-actions form:last-child {
  margin-left: auto;
}

.page {
  min-height: calc(100vh - 118px);
  padding-block: 30px 58px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin: 7px 0 24px;
}

.dashboard-heading h1 {
  font-size: clamp(34px, 4vw, 46px);
}

.dashboard-heading > div > p:last-child {
  max-width: 620px;
  margin-top: 8px;
  font-size: 15px;
}

.dashboard-heading-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-refresh-control {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.dashboard-refresh-button {
  gap: 8px;
  min-width: 142px;
}

.dashboard-refresh-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.dashboard-refresh-button.is-loading svg {
  animation: dashboard-refresh-spin .8s linear infinite;
}

.dashboard-refresh-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-refresh-status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 158, 107, .1);
}

.dashboard-refresh-status[data-state="loading"]::before {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(56, 84, 96, .1);
}

.dashboard-refresh-status[data-state="live"] {
  color: #237b55;
}

.dashboard-refresh-status[data-state="live"]::before {
  animation: live-connection-pulse 2s ease-out infinite;
}

.dashboard-refresh-status[data-state="error"] {
  color: var(--red);
}

.dashboard-refresh-status[data-state="error"]::before {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .09);
}

@keyframes dashboard-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes live-connection-pulse {
  0%, 55%, 100% {
    box-shadow: 0 0 0 3px rgba(47, 158, 107, .1);
  }
  75% {
    box-shadow: 0 0 0 7px rgba(47, 158, 107, 0);
  }
}

.live-value-updated {
  animation: live-value-highlight .7s ease-out;
}

@keyframes live-value-highlight {
  0% {
    color: var(--green);
    transform: scale(1.08);
  }
  100% {
    color: inherit;
    transform: scale(1);
  }
}

.button-add-device {
  flex: 0 0 auto;
}

.button-add-device > span {
  margin-right: 7px;
  font-size: 21px;
  font-weight: 450;
  line-height: 0;
}

.summary-grid-compact {
  gap: 12px;
  margin-bottom: 22px;
}

.summary-grid-compact .summary-card {
  position: relative;
  min-height: 108px;
  justify-content: center;
  overflow: hidden;
  padding: 17px 19px 16px 22px;
  border-color: rgba(35, 52, 61, .075);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(34, 57, 66, .055);
}

.summary-grid-compact .summary-card::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--blue);
}

.summary-grid-compact .summary-card-online::before {
  background: var(--green);
}

.summary-grid-compact .summary-card-lock::before {
  background: var(--red);
}

.summary-grid-compact .summary-card-usage::before {
  background: #78909b;
}

.summary-grid-compact .summary-card strong {
  margin-block: 6px 3px;
  font-size: 31px;
}

.summary-grid-compact .summary-label {
  font-size: 10px;
}

.summary-grid-compact .summary-card > span:last-child {
  font-size: 11px;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.site-rail {
  position: sticky;
  top: 90px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(34, 57, 66, .06);
}

.site-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 13px;
}

.site-rail-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
  letter-spacing: -.03em;
}

.site-switcher {
  display: grid;
  gap: 4px;
  padding: 4px 8px 10px;
}

.site-switcher-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.site-switcher-item:hover {
  color: var(--ink);
  background: var(--panel-soft);
}

.site-switcher-item.active {
  border-color: rgba(56, 84, 96, .1);
  color: var(--blue);
  background: var(--blue-soft);
}

.site-switcher-icon,
.site-title-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
  text-transform: uppercase;
}

.site-switcher-icon {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.site-switcher-item.active .site-switcher-icon {
  background: var(--red);
}

.site-switcher-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.site-switcher-copy strong,
.site-switcher-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-switcher-copy strong {
  font-size: 13px;
}

.site-switcher-copy small {
  color: var(--muted);
  font-size: 10px;
}

.site-alert-text {
  color: var(--red);
}

.site-rail-manage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--blue);
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.device-browser {
  min-width: 0;
}

.dashboard-empty-state {
  max-width: none;
  margin-top: 0;
}

.site-sections {
  gap: 28px;
}

.site-section {
  gap: 14px;
}

.site-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 2px 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.site-title-block {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.site-title-icon {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.site-title-block .object-id {
  margin-bottom: 2px;
}

.site-title-block h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.035em;
}

.site-title-block p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.site-health {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.site-health > span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-soft);
  white-space: nowrap;
}

.site-health-ok {
  color: #19734d;
  background: var(--green-soft) !important;
  box-shadow: none !important;
  font-weight: 750;
}

.site-health-alert {
  color: var(--red);
  background: var(--red-soft) !important;
  box-shadow: none !important;
}

.floor-list {
  gap: 15px;
}

.floor-section {
  overflow: hidden;
  border: 1px solid rgba(35, 52, 61, .085);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(34, 57, 66, .05);
}

.floor-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border: 0;
  background: #fff;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.floor-heading::-webkit-details-marker {
  display: none;
}

.floor-icon {
  width: 39px;
  height: 39px;
  flex-basis: 39px;
  border-radius: 11px;
  font-size: 13px;
}

.floor-heading-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.floor-heading-copy .card-label {
  font-size: 9px;
}

.floor-heading-copy strong {
  overflow: hidden;
  font-size: 17px;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-device-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.floor-chevron {
  width: 9px;
  height: 9px;
  margin-inline: 4px 2px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.floor-section:not([open]) .floor-chevron {
  transform: rotate(-45deg);
}

.floor-section .room-list {
  gap: 20px;
  padding: 17px;
  border-top: 1px solid var(--line-soft);
  background: var(--panel-soft);
}

.room-section {
  gap: 10px;
}

.room-section + .room-section {
  padding-top: 18px;
  border-color: #dfe7ea;
}

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

.room-heading h3 {
  margin: 2px 0 0;
  font-size: 16px;
  letter-spacing: -.02em;
}

.urinal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.urinal-card {
  position: relative;
  min-width: 0;
  min-height: 184px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  overflow: hidden;
  border-color: rgba(35, 52, 61, .085);
  border-radius: 16px;
  box-shadow: 0 7px 22px rgba(34, 57, 66, .07);
}

.urinal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.urinal-card-visual {
  min-height: 184px;
  height: 100%;
  border-right: 1px solid var(--line-soft);
  border-bottom: 0;
  background:
    radial-gradient(circle at 50% 25%, #fff 0, #f5f7f8 64%, #ebf0f2 100%);
}

.urinal-card-visual > img {
  width: 100%;
  height: 184px;
  max-width: 100%;
  max-height: 184px;
  padding: 18px 10px 10px;
  object-fit: contain;
}

.urinal-card-visual .urinal-photo-placeholder {
  min-height: 184px;
  flex-direction: column;
  align-items: center;
  font-size: 19px;
  line-height: .85;
}

.connection-badge {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 18px);
  padding: 6px 8px;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 5px 16px rgba(34, 57, 66, .1);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.connection-badge .status-dot {
  width: 7px;
  height: 7px;
  flex-basis: 7px;
  box-shadow: none;
}

.connection-ok {
  color: #19734d;
}

.connection-offline,
.connection-unknown {
  color: var(--muted);
}

.urinal-card-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 15px 16px 12px;
}

.urinal-lock-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 26px 13px 0;
  font-size: 10px;
}

.urinal-lock-line .status-dot {
  width: 8px;
  height: 8px;
  flex-basis: 8px;
  box-shadow: none;
}

.status-line-ok {
  color: #19734d;
}

.status-line-low {
  color: var(--red);
}

.status-line-offline,
.status-line-unknown {
  color: var(--muted);
}

.urinal-card-main .object-id {
  margin-bottom: 3px;
  font-size: 9px;
}

.urinal-card-main h3 {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  letter-spacing: -.03em;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urinal-card-main > p {
  margin: 5px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urinal-card-stats {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 9px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.urinal-card-stats > div {
  min-width: 0;
}

.urinal-card-stats span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.urinal-card-stats strong {
  display: block;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urinal-card-stats .metric-small {
  padding-top: 3px;
  font-size: 11px;
}

.heartbeat-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.heartbeat-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.heartbeat-icon-online {
  color: var(--green);
  animation: heartbeat-pulse .7s ease-out 1;
  transform-origin: center;
}

.heartbeat-icon-offline {
  color: #99a5aa;
}

.urinal-card-stats .heartbeat-label {
  display: inline-flex;
  margin-bottom: 3px;
}

.urinal-card-stats .heartbeat-label > span {
  display: inline;
  margin: 0;
}

@keyframes heartbeat-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.18);
  }

  58% {
    transform: scale(.96);
  }
}

.urinal-card-chevron {
  position: absolute;
  top: 11px;
  right: 13px;
  color: #9aa7ad;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.detail-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 16px;
}

.detail-toolbar .back-link {
  display: inline-flex;
  margin-top: 10px;
}

.detail-refresh-control {
  flex: 0 0 auto;
}

.device-hero {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 25px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.device-hero-photo {
  position: relative;
  min-height: 218px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 25%, #fff 0, #f4f7f8 62%, #e8eef1 100%);
}

.device-hero-photo img {
  width: 100%;
  height: 218px;
  max-width: 100%;
  max-height: 218px;
  display: block;
  padding: 16px;
  object-fit: contain;
}

.device-hero-photo .urinal-photo-placeholder {
  min-height: 218px;
}

.device-hero-copy {
  min-width: 0;
  align-self: center;
}

.device-hero-copy > .object-id {
  margin-bottom: 4px;
}

.device-hero-copy h1 {
  margin: 0;
  font-size: clamp(29px, 4vw, 42px);
  letter-spacing: -.045em;
  line-height: 1.04;
}

.device-model-name {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 8px 0 17px;
  color: var(--muted);
  font-size: 13px;
}

.device-model-name span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.device-model-name strong {
  color: var(--ink);
}

.device-model-name small {
  color: var(--muted);
}

.location-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 15px;
}

.location-chips > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 11px;
}

.location-chips strong {
  color: var(--ink);
  font-size: 9px;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.device-hero-status {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
}

.device-hero-status .status-dot {
  width: 9px;
  height: 9px;
  flex-basis: 9px;
  box-shadow: none;
}

.device-hero-status > div {
  display: grid;
  gap: 1px;
}

.device-hero-status small {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .75;
}

.device-hero-status strong {
  font-size: 12px;
}

.device-hero-actions {
  display: flex;
  align-items: stretch;
  align-self: center;
  flex-direction: column;
  gap: 9px;
}

.device-hero-actions form {
  display: contents;
}

.device-hero-actions .button {
  min-width: 155px;
  white-space: nowrap;
}

.detail-grid {
  grid-template-columns: 1.15fr .72fr 1fr;
}

.lock-card,
.usage-detail-card,
.connection-card {
  min-height: 220px;
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(34, 57, 66, .06);
}

.lock-card {
  gap: 20px;
  padding: 24px;
}

.lock-light {
  width: 68px;
  height: 68px;
  flex-basis: 68px;
}

.lock-card h2 {
  font-size: 27px;
}

.usage-detail-card strong {
  font-size: clamp(46px, 6vw, 64px);
}

.measurement-grid article {
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(34, 57, 66, .04);
}

.history-card {
  border-radius: 20px;
  box-shadow: 0 9px 28px rgba(34, 57, 66, .065);
}

@media (max-width: 1100px) {
  .desktop-navigation,
  .desktop-user-menu {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .dashboard-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .urinal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-workspace {
    grid-template-columns: 1fr;
  }

  .site-rail {
    position: static;
    overflow: visible;
  }

  .site-rail-head {
    padding-bottom: 8px;
  }

  .site-switcher {
    grid-auto-columns: minmax(200px, 1fr);
    grid-auto-flow: column;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
  }

  .site-switcher-item {
    scroll-snap-align: start;
  }

  .site-rail-manage {
    display: none;
  }

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

  .device-hero {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .device-hero-actions {
    grid-column: 1 / -1;
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
    padding-top: 3px;
  }

  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .topbar-inner {
    min-height: 62px;
    flex-wrap: nowrap;
    padding-block: 7px;
  }

  .mobile-menu-label {
    display: none;
  }

  .mobile-menu > summary {
    width: 42px;
    justify-content: center;
    padding: 9px;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .dashboard-heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-refresh-control {
    min-width: 0;
    justify-items: stretch;
  }

  .dashboard-refresh-button {
    width: 100%;
    min-width: 0;
  }

  .dashboard-refresh-status {
    justify-content: center;
  }

  .button-add-device {
    width: 100%;
  }

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

  .site-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-health {
    width: 100%;
    flex-wrap: wrap;
  }

  .urinal-grid {
    grid-template-columns: 1fr;
  }

  .device-hero {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
  }

  .device-hero-photo,
  .device-hero-photo img,
  .device-hero-photo .urinal-photo-placeholder {
    min-height: 190px;
    height: 190px;
  }

  .location-chips > span {
    width: 100%;
    justify-content: space-between;
  }

  .device-model-name {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .connection-card {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .shell,
  .page-narrow,
  .page-form-wide {
    width: min(100% - 22px, 1180px);
  }

  .page {
    padding-block: 20px 44px;
  }

  .brand {
    white-space: nowrap;
    font-size: 20px;
  }

  .brand-cloud {
    display: inline;
    margin-left: 5px;
    padding-left: 6px;
    font-size: 9px;
    letter-spacing: .055em;
  }

  .dashboard-heading h1 {
    font-size: 34px;
  }

  .dashboard-heading-actions {
    grid-template-columns: 1fr;
  }

  .summary-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .summary-grid-compact .summary-card {
    min-height: 96px;
    padding: 14px 12px 13px 17px;
  }

  .summary-grid-compact .summary-card::before {
    top: 14px;
    bottom: 14px;
    width: 3px;
  }

  .summary-grid-compact .summary-card strong {
    font-size: 28px;
  }

  .summary-grid-compact .summary-card > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-rail-head {
    padding: 15px 14px 7px;
  }

  .site-switcher {
    grid-auto-columns: minmax(184px, 85%);
    padding-inline: 6px;
  }

  .site-switcher-item {
    padding: 9px;
  }

  .site-title-icon {
    width: 42px;
    height: 42px;
  }

  .site-title-block h2 {
    font-size: 21px;
  }

  .floor-heading {
    padding: 12px;
  }

  .floor-device-count {
    font-size: 0;
  }

  .floor-device-count::before {
    content: attr(data-count);
    font-size: 11px;
  }

  .floor-section .room-list {
    padding: 12px;
  }

  .urinal-card {
    min-height: 172px;
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .urinal-card-visual {
    min-height: 172px;
  }

  .urinal-card-visual > img {
    height: 172px;
    max-height: 172px;
    padding-inline: 7px;
  }

  .urinal-card-visual .urinal-photo-placeholder {
    min-height: 172px;
    font-size: 15px;
  }

  .connection-badge {
    right: 6px;
    bottom: 7px;
    padding: 5px 6px;
    font-size: 8px;
  }

  .urinal-card-main {
    padding: 13px 12px 10px;
  }

  .urinal-lock-line {
    margin-right: 18px;
    margin-bottom: 11px;
    font-size: 9px;
  }

  .urinal-card-main h3 {
    font-size: 16px;
  }

  .urinal-card-stats {
    gap: 6px;
  }

  .urinal-card-stats span {
    font-size: 7px;
  }

  .urinal-card-stats strong {
    font-size: 16px;
  }

  .urinal-card-chevron {
    top: 9px;
    right: 9px;
  }

  .device-hero {
    grid-template-columns: 1fr;
    gap: 17px;
    padding: 14px;
  }

  .device-hero-photo,
  .device-hero-photo img,
  .device-hero-photo .urinal-photo-placeholder {
    min-height: 210px;
    height: 210px;
  }

  .device-hero-copy {
    padding-inline: 3px;
  }

  .device-hero-copy h1 {
    font-size: 31px;
  }

  .device-hero-actions {
    grid-column: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .device-hero-actions .button {
    width: 100%;
  }

  .detail-toolbar {
    gap: 12px;
  }

  .detail-refresh-control {
    max-width: 160px;
  }

  .lock-card {
    align-items: center;
    flex-direction: row;
  }

  .chart-wrap {
    min-height: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-refresh-button.is-loading svg,
  .heartbeat-icon-online,
  .dashboard-refresh-status[data-state="live"]::before,
  .live-value-updated {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Service-Assistenten · Cloud v1.13.0
   -------------------------------------------------------------------------- */

.mobile-status-grid {
  display: none;
}

.mobile-service-actions {
  display: none;
}

.mobile-service-action {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  justify-content: center;
}

.mobile-service-action.is-active {
  border-color: rgba(227, 6, 19, .42);
  background: var(--red-soft);
}

.service-action-panel {
  margin-top: 24px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #dfe6ef;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff 0%, #f8fafb 100%);
  box-shadow: 0 18px 45px rgba(21, 36, 58, .08);
}

.service-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.service-action-head h2 {
  margin: 4px 0 8px;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -.025em;
}

.service-action-head > div:first-child > p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.service-action-body > :first-child {
  margin-top: 0;
}

.service-current-operator {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(56, 84, 96, .12);
  border-radius: 14px;
  background: #fff;
}

.service-current-operator > span:last-child {
  min-width: 0;
  display: grid;
}

.service-current-operator small {
  color: var(--muted);
  font-size: 11px;
}

.service-current-operator strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-active-banner {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 12px 16px;
  border-radius: 15px;
  color: #fff;
  background: var(--blue);
  text-decoration: none;
}

.service-active-banner small,
.service-active-banner strong {
  display: block;
}

.service-active-banner small {
  margin-bottom: 2px;
  color: rgba(255, 255, 255, .7);
  font-size: 11px;
  text-transform: uppercase;
}

.service-active-pulse {
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #59d49a;
  box-shadow: 0 0 0 5px rgba(89, 212, 154, .22);
}

.service-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.service-action-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid rgba(56, 84, 96, .13);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(35, 52, 61, .055);
  text-align: left;
}

.service-action-card.is-active {
  border-color: rgba(227, 6, 19, .45);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .07);
}

.service-action-product-logo {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 18px;
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.service-action-product-logo img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 260px;
  max-height: 42px;
  margin: 0;
  object-fit: contain;
  object-position: left center;
  transform: none;
}

.service-action-product-logo.is-fallback span {
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.045em;
}

.service-action-refill .service-action-product-logo.is-fallback span {
  color: var(--red);
}

.service-action-cleaning .service-action-product-logo.is-fallback span {
  color: #2e7185;
}

.service-action-card h3 {
  margin: 4px 0 8px;
  font-size: 20px;
  letter-spacing: -.015em;
}

.service-action-card > p:not(.eyebrow) {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.service-action-meta {
  display: flex;
  gap: 16px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}

.service-action-meta strong {
  color: var(--ink);
  font-size: 15px;
}

.service-action-footer {
  display: grid;
  gap: 7px;
}

.service-action-footer .button {
  width: 100%;
}

.service-action-footer small {
  min-height: 30px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.initials-badge {
  min-width: 30px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 4px 8px;
  border-radius: 9px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .06em;
  line-height: 1;
  vertical-align: middle;
}

.audit-context {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.service-admin-page {
  max-width: 1260px;
}

.service-admin-list {
  display: grid;
  gap: 26px;
  margin-top: 24px;
}

.service-admin-card {
  overflow: hidden;
  border: 1px solid rgba(35, 52, 61, .1);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  scroll-margin-top: 24px;
}

.service-admin-head,
.service-publish-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
}

.service-admin-head {
  border-bottom: 1px solid var(--line);
}

.service-admin-logo-preview {
  width: 132px;
  height: 70px;
  flex: 0 0 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafb;
}

.service-admin-logo-preview img {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
  object-position: left center;
}

.service-admin-logo-preview span {
  color: var(--blue);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.service-logo-fields small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.service-logo-fields {
  align-items: start;
}

.service-logo-fields > label {
  align-content: start;
  grid-auto-rows: max-content;
}

.service-admin-head h2,
.service-step-editor h3,
.service-publish-actions strong {
  margin: 0;
}

.service-admin-head p:last-child,
.service-step-editor-head p,
.service-publish-actions p {
  margin: 5px 0 0;
  color: var(--muted);
}

.service-publish-state {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.service-publish-state small {
  color: var(--muted);
}

.service-meta-form,
.service-step-editor {
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
}

.service-step-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.service-draft-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-draft-step {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft, #f7f9fa);
}

.service-step-preview {
  display: grid;
  grid-template-columns: 42px 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.service-step-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
}

.service-step-thumb {
  width: 88px;
  height: 66px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.service-step-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-step-thumb-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.service-step-summary {
  min-width: 0;
}

.service-step-summary strong {
  display: block;
  margin-bottom: 4px;
}

.service-step-summary p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.service-step-order {
  display: flex;
  gap: 6px;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--blue);
  background: #fff;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.icon-button:disabled {
  opacity: .35;
  cursor: default;
}

.service-step-details,
.service-add-step {
  border-top: 1px solid var(--line);
  background: #fff;
}

.service-step-details > summary,
.service-add-step > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: var(--blue);
  font-weight: 750;
  cursor: pointer;
}

.service-step-details .stack-form,
.service-add-step .stack-form {
  padding: 6px 16px 18px;
}

.service-step-edit-actions,
.service-step-delete-form {
  display: flex;
  justify-content: flex-end;
}

.service-step-delete-form {
  padding: 0 16px 18px;
}

.service-add-step {
  margin-top: 16px;
  border: 1px dashed rgba(56, 84, 96, .3);
  border-radius: 16px;
}

.service-empty-state {
  margin-bottom: 14px;
  padding: 24px;
}

.service-publish-actions {
  background: #f8fafb;
}

.service-publish-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.service-start-body,
.service-wizard-body {
  min-width: 0;
  color: var(--ink);
  background: #f2f5f6;
}

.service-start-body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.service-wizard-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.service-fullscreen-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(56, 84, 96, .12);
  background: rgba(255, 255, 255, .96);
}

.service-brand {
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.045em;
  text-decoration: none;
}

.service-brand span {
  color: var(--red);
}

.service-header-product {
  width: clamp(82px, 11vw, 116px);
  height: 32px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.service-product-logo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.service-product-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: left center;
  transform: none;
}

.service-product-logo.is-fallback > span {
  color: var(--blue);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.service-product-refill.is-fallback > span {
  color: var(--red);
}

.service-product-cleaning.is-fallback > span {
  color: #2e7185;
}

.service-header-context {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-start-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.service-start-card {
  width: min(760px, calc(100% - 32px));
  margin: clamp(24px, 6vh, 72px) auto;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid rgba(56, 84, 96, .12);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(35, 52, 61, .11);
}

.service-start-product-logo {
  width: min(170px, 50%);
  height: 42px;
  margin-bottom: 18px;
}

.service-start-product-logo.is-fallback > span {
  font-size: 27px;
}

.service-start-card h1 {
  margin: 6px 0 14px;
  font-size: clamp(34px, 6vw, 54px);
  letter-spacing: -.045em;
  line-height: 1.03;
}

.service-start-intro {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  white-space: pre-line;
}

.service-start-facts,
.service-result-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0;
}

.service-start-facts div,
.service-result-facts div {
  padding: 16px;
  border-radius: 14px;
  background: #f3f6f7;
}

.service-start-facts dt,
.service-result-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.service-start-facts dd,
.service-result-facts dd {
  margin: 5px 0 0;
  font-weight: 800;
}

.service-safety-summary {
  padding: 20px 22px;
  border: 1px solid rgba(56, 84, 96, .13);
  border-radius: 16px;
  background: #fbfcfc;
}

.service-safety-summary h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.service-safety-summary ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 21px;
  color: var(--muted);
  line-height: 1.5;
}

.service-start-warning {
  display: grid;
  gap: 4px;
  margin-top: 18px;
}

.service-start-form {
  margin-top: 22px;
}

.service-pause-confirmation {
  min-height: 66px;
  background: var(--blue-soft);
}

.service-pause-confirmation small {
  line-height: 1.45;
}

.service-start-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.service-wizard {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.service-wizard-header {
  position: relative;
  z-index: 4;
}

.service-wizard-context {
  min-width: 0;
  display: grid;
  flex: 1;
  justify-items: start;
  line-height: 1.3;
  text-align: left;
}

.service-wizard-context strong,
.service-wizard-context span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-wizard-context span {
  color: var(--muted);
  font-size: 13px;
}

.service-offline-banner,
.service-noscript {
  padding: 11px 18px;
  color: #7a3e00;
  background: #fff1cf;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.service-progress-shell {
  padding: 12px clamp(18px, 4vw, 48px) 14px;
  border-bottom: 1px solid rgba(56, 84, 96, .1);
  background: #fff;
}

.service-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.service-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ecee;
}

.service-progress-track span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff4853);
  transition: width .25s ease;
}

.service-wizard-stage {
  min-height: 0;
  display: grid;
  place-items: stretch;
  padding: clamp(18px, 4vw, 42px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.service-guide-step {
  width: min(1160px, 100%);
  min-height: min(600px, calc(100dvh - 250px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  margin: auto;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(56, 84, 96, .1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(35, 52, 61, .1);
  outline: none;
}

.service-guide-visual {
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 19px;
  background: #f1f5f6;
}

.service-guide-visual img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 520px;
  display: block;
  object-fit: contain;
  object-position: center;
}

.service-guide-visual-empty span {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 36px;
  color: #fff;
  background: var(--blue);
  font-size: 54px;
  font-weight: 900;
}

.service-guide-copy h1,
.service-review-card h1,
.service-system-screen h1 {
  margin: 8px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -.045em;
  line-height: 1.04;
}

.service-guide-copy > p:last-child,
.service-review-card > p,
.service-system-screen > p:last-of-type {
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.7;
  white-space: pre-line;
}

.service-review-screen,
.service-system-screen {
  width: min(760px, 100%);
  margin: auto;
}

.service-review-card,
.service-system-screen {
  padding: clamp(26px, 5vw, 50px);
  border: 1px solid rgba(56, 84, 96, .1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(35, 52, 61, .1);
}

.service-system-screen {
  text-align: center;
}

.service-spinner {
  width: 64px;
  height: 64px;
  display: inline-block;
  margin-bottom: 18px;
  border: 6px solid #dce5e8;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: service-spin .85s linear infinite;
}

@keyframes service-spin {
  to { transform: rotate(360deg); }
}

.service-success-mark,
.service-warning-mark {
  width: 82px;
  height: 82px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 43px;
  font-weight: 900;
}

.service-warning-mark {
  background: #d77900;
}

.service-reset-options {
  display: grid;
  gap: 10px;
  margin: 26px 0 16px;
  padding: 0;
  border: 0;
}

.service-installation-final-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin: 24px 0;
  padding: 16px;
  border: 1px solid rgba(47, 158, 107, .2);
  border-radius: 15px;
  color: #176b49;
  background: var(--green-soft);
}

.service-installation-final-summary > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.service-installation-final-summary strong,
.service-installation-final-summary small {
  display: block;
}

.service-installation-final-summary small {
  margin-top: 4px;
  color: #32755a;
}

.service-reset-options legend {
  margin-bottom: 10px;
  font-weight: 800;
}

.service-reset-option {
  min-height: 76px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  cursor: pointer;
}

.service-reset-option:has(input:checked) {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(56, 84, 96, .1);
}

.service-reset-option-danger:has(input:checked) {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .08);
}

.service-reset-option input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.service-reset-option span,
.service-reset-option small {
  display: block;
}

.service-reset-option small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.service-reset-confirm {
  margin-top: 12px;
  border-color: rgba(227, 6, 19, .25);
  background: var(--red-soft);
}

.service-operator-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.service-operator-summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.service-result-facts {
  text-align: left;
}

.service-wizard-controls {
  min-height: 80px;
  display: grid;
  grid-template-columns: minmax(100px, auto) minmax(0, 1fr) minmax(140px, auto);
  align-items: center;
  gap: 14px;
  padding: 14px clamp(18px, 4vw, 48px) calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(56, 84, 96, .12);
  background: rgba(255, 255, 255, .97);
}

.service-live-status {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-live-status-error {
  color: var(--red);
  font-weight: 700;
}

@media (max-width: 820px) {
  .service-wizard-body {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .service-wizard {
    height: auto;
    grid-template-rows: auto auto auto auto auto;
    overflow: visible;
  }

  .service-wizard-stage {
    min-height: auto;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .service-guide-step,
  .service-review-screen,
  .service-system-screen {
    margin: 0 auto;
  }

  .service-wizard-controls {
    position: sticky;
    z-index: 6;
    bottom: 0;
    box-shadow: 0 -10px 28px rgba(35, 52, 61, .08);
  }

  .service-action-grid {
    grid-template-columns: 1fr;
  }

  .service-action-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(160px, .6fr);
    column-gap: 16px;
  }

  .service-action-card .service-action-product-logo {
    grid-column: 1;
    grid-row: 1 / span 4;
  }

  .service-action-card .eyebrow,
  .service-action-card h3,
  .service-action-card > p,
  .service-action-card .service-action-meta {
    grid-column: 2;
  }

  .service-action-card .service-action-footer {
    grid-column: 3;
    grid-row: 1 / span 4;
    align-self: center;
  }

  .service-admin-head,
  .service-publish-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-publish-state {
    justify-items: start;
    text-align: left;
  }

  .service-step-preview {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .service-step-thumb {
    width: 72px;
    height: 60px;
  }

  .service-step-order {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }

  .service-guide-step {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .service-guide-visual {
    min-height: min(42vh, 360px);
  }

  .service-guide-visual img {
    max-height: min(42vh, 360px);
  }
}

@media (max-width: 560px) {
  .service-action-head {
    flex-direction: column;
  }

  .service-current-operator {
    width: 100%;
  }

  .service-action-panel {
    padding: 18px 14px;
    border-radius: 19px;
  }

  .service-action-card {
    display: flex;
    padding: 18px;
  }

  .service-action-card .service-action-product-logo,
  .service-action-card .eyebrow,
  .service-action-card h3,
  .service-action-card > p,
  .service-action-card .service-action-meta,
  .service-action-card .service-action-footer {
    grid-column: auto;
    grid-row: auto;
  }

  .service-fullscreen-header {
    min-height: 64px;
    gap: 10px;
    padding: 10px 14px;
  }

  .service-brand {
    font-size: 20px;
  }

  .service-header-product {
    width: 76px;
    height: 26px;
  }

  .service-header-product .service-product-logo.is-fallback > span {
    font-size: 16px;
  }

  .service-header-context,
  .service-wizard-context span {
    display: none;
  }

  .service-wizard-context {
    justify-items: start;
  }

  .service-cancel-button {
    padding-inline: 11px;
  }

  .service-start-card {
    width: min(100% - 20px, 760px);
    margin: 10px auto 20px;
    padding: 22px 18px;
    border-radius: 19px;
  }

  .service-start-product-logo {
    width: min(140px, 52%);
    height: 34px;
    margin-bottom: 14px;
  }

  .service-start-product-logo.is-fallback > span {
    font-size: 22px;
  }

  .service-start-card h1 {
    font-size: clamp(26px, 8.3vw, 34px);
    overflow-wrap: anywhere;
  }

  .service-start-facts,
  .service-result-facts {
    grid-template-columns: 1fr;
  }

  .service-start-actions,
  .service-publish-buttons {
    width: 100%;
    flex-direction: column-reverse;
  }

  .service-start-actions .button,
  .service-publish-buttons .button,
  .service-publish-buttons form {
    width: 100%;
  }

  .service-admin-head,
  .service-meta-form,
  .service-step-editor,
  .service-publish-actions {
    padding: 20px 16px;
  }

  .service-step-preview {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
  }

  .service-step-thumb {
    grid-column: 2;
    width: 100%;
    height: 150px;
  }

  .service-step-summary,
  .service-step-order {
    grid-column: 2;
  }

  .service-step-order {
    justify-content: flex-start;
  }

  .service-progress-shell {
    padding: 8px 14px 9px;
  }

  .service-progress-copy {
    font-size: 12px;
  }

  .service-wizard-stage {
    padding: 6px 8px;
  }

  .service-guide-step,
  .service-review-card,
  .service-system-screen {
    padding: 12px;
    border-radius: 18px;
  }

  .service-guide-step {
    min-height: 0;
    align-content: start;
    gap: 10px;
  }

  .service-guide-visual {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 8px;
    border-radius: 14px;
  }

  .service-guide-visual img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
  }

  .service-guide-copy h1,
  .service-review-card h1,
  .service-system-screen h1 {
    margin: 4px 0 8px;
    font-size: clamp(24px, 8vw, 34px);
  }

  .service-guide-copy > p:last-child,
  .service-review-card > p,
  .service-system-screen > p:last-of-type {
    font-size: 14px;
    line-height: 1.4;
  }

  .service-wizard-controls {
    min-height: 62px;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .service-wizard-controls .button {
    width: 100%;
    min-width: 0;
    padding-inline: 12px;
  }

  .service-live-status {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 18px;
    white-space: normal;
  }

  .service-live-status:empty {
    display: none;
  }

  .service-wizard-controls [data-service-previous] {
    grid-column: 1;
    grid-row: 2;
  }

  .service-wizard-controls [data-service-next],
  .service-wizard-controls [data-service-complete] {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 640px) {
  .device-hero-actions {
    grid-column: 1 / -1;
    align-items: stretch;
    flex-direction: column;
  }

  .device-hero-status {
    display: none;
  }

  .mobile-status-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-status-card {
    min-width: 0;
    min-height: 108px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 13px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--panel-soft);
  }

  .mobile-lock-status-ok {
    border-color: rgba(47, 158, 107, .2);
    background: var(--green-soft);
  }

  .mobile-lock-status-low {
    border-color: rgba(227, 6, 19, .18);
    background: var(--red-soft);
  }

  .mobile-lock-status-offline,
  .mobile-lock-status-unknown {
    background: #eff3f4;
  }

  .mobile-lock-status .status-dot {
    margin: 1px 0 12px 2px;
  }

  .mobile-status-label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .055em;
    line-height: 1.15;
    text-transform: uppercase;
  }

  .mobile-lock-status strong {
    max-width: 100%;
    font-size: clamp(13px, 4vw, 16px);
    line-height: 1.18;
    overflow-wrap: anywhere;
  }

  .mobile-usage-status strong {
    max-width: 100%;
    font-size: clamp(32px, 10vw, 42px);
    letter-spacing: -.055em;
    line-height: .95;
  }

  .mobile-metric-status {
    min-height: 88px;
  }

  .mobile-metric-status strong {
    max-width: 100%;
    color: var(--ink);
    font-size: clamp(15px, 4.4vw, 19px);
    letter-spacing: -.025em;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .mobile-service-actions {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
  }

  .mobile-service-action.mobile-service-action-maintenance,
  .mobile-service-action.mobile-service-action-refill,
  .mobile-service-action.mobile-service-action-cleaning {
    border-color: var(--blue);
    color: #fff;
    background: var(--blue);
    box-shadow: 0 7px 18px rgba(56, 84, 96, .2);
  }

  .mobile-service-action.mobile-service-action-maintenance:hover,
  .mobile-service-action.mobile-service-action-refill:hover,
  .mobile-service-action.mobile-service-action-cleaning:hover {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
  }

  .mobile-service-action.is-active {
    outline: 3px solid rgba(56, 84, 96, .2);
    outline-offset: 1px;
  }

  .detail-grid > .lock-card,
  .detail-grid > .usage-detail-card {
    display: none;
  }

  .service-action-panel {
    display: none;
  }

  .measurement-grid {
    display: none;
  }
}

@media (max-width: 560px) and (max-height: 720px) {
  .service-fullscreen-header {
    min-height: 54px;
    padding-block: 7px;
  }

  .service-progress-copy {
    margin-bottom: 5px;
  }

  .service-progress-track {
    height: 5px;
  }

  .service-guide-visual {
    height: auto;
    padding: 6px;
  }

  .service-guide-copy h1 {
    font-size: clamp(22px, 7.5vw, 29px);
  }

  .service-wizard-controls {
    min-height: 56px;
    padding-top: 7px;
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 340px) {
  .mobile-status-card {
    min-height: 102px;
    padding-inline: 11px;
  }

  .service-wizard-context strong {
    max-width: 116px;
    font-size: 12px;
  }

  .service-cancel-button {
    font-size: 12px;
  }

  .service-progress-copy {
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-progress-track span {
    transition: none;
  }

  .service-spinner {
    animation-duration: 1.8s;
  }
}

/* Managed building Wi-Fi -------------------------------------------------- */
.network-management-card {
  scroll-margin-top: 88px;
  margin-top: 24px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #dfe6ef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(21, 36, 58, .08);
}

.network-management-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 28px;
  align-items: start;
}

.network-management-head h2,
.network-management-head p {
  margin-top: 0;
}

.network-management-head h2 {
  margin-bottom: 10px;
}

.network-management-head > div:first-child > p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: #607086;
  line-height: 1.6;
}

.network-current-state {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid #d7e6f7;
  border-radius: 18px;
  background: #f5f9fe;
}

.network-current-state span {
  color: #607086;
}

.network-current-state strong {
  overflow-wrap: anywhere;
  color: #173c65;
  font-size: 1.08rem;
}

.network-command-state {
  display: grid;
  grid-template-columns: minmax(170px, .35fr) minmax(0, 1fr);
  gap: 12px 20px;
  align-items: center;
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid #d9e3ef;
  border-radius: 15px;
  background: #f7f9fc;
}

.network-command-state span {
  color: #5a6c82;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.network-command-completed {
  border-color: #b8e2cf;
  background: #f0faf5;
}

.network-command-failed,
.network-command-expired {
  border-color: #f0c4c4;
  background: #fff4f4;
}

.network-change-form {
  display: grid;
  gap: 24px;
  margin-top: 26px;
}

.wifi-scan-picker {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid #d7e6f7;
  border-radius: 18px;
  background: #f7fbff;
}

.wifi-scan-head {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.wifi-scan-head h3,
.wifi-scan-head p,
.wifi-scan-status {
  margin: 0;
}

.wifi-scan-head h3 {
  color: #173c65;
  font-size: 1rem;
}

.wifi-scan-head p {
  max-width: 720px;
  margin-top: 5px;
  color: #607086;
  font-size: .88rem;
  line-height: 1.5;
}

.wifi-scan-status {
  color: #3f566f;
  font-size: .88rem;
  font-weight: 700;
}

.wifi-scan-status[data-state="loading"] {
  color: #1769aa;
}

.wifi-scan-status[data-state="error"] {
  color: #b4000c;
}

.wifi-network-picker {
  display: grid;
  gap: 7px;
}

.wifi-network-picker > span {
  color: #253b55;
  font-size: .88rem;
  font-weight: 800;
}

.wifi-network-picker select {
  width: 100%;
  min-height: 48px;
  height: 48px;
  padding: 0 40px 0 13px;
  border: 1px solid #b9cce0;
  border-radius: 12px;
  background: #fff;
  color: #172c45;
  font: inherit;
}

.wifi-network-picker select:focus {
  border-color: #2274bd;
  outline: 3px solid rgba(34, 116, 189, .14);
}

.wifi-network-picker small {
  color: #607086;
  font-size: .78rem;
  line-height: 1.45;
}

.network-change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.network-change-grid label {
  display: grid;
  gap: 7px;
}

.network-change-grid label > span {
  color: #253b55;
  font-size: .88rem;
  font-weight: 800;
}

.network-change-grid input {
  width: 100%;
  min-height: 48px;
  height: 48px;
  padding: 11px 13px;
  border: 1px solid #cbd7e5;
  border-radius: 12px;
  background: #fff;
  color: #172c45;
  font: inherit;
}

.network-change-grid input:focus {
  border-color: #2274bd;
  outline: 3px solid rgba(34, 116, 189, .14);
}

.network-change-submit {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.network-change-submit p {
  margin: 0;
  color: #607086;
  font-size: .88rem;
}

@media (max-width: 780px) {
  .network-management-head,
  .network-change-grid {
    grid-template-columns: 1fr;
  }

  .network-command-state {
    grid-template-columns: 1fr;
  }

  .wifi-scan-head {
    align-items: stretch;
    flex-direction: column;
  }

  .wifi-scan-head .button {
    width: 100%;
  }

  .network-change-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .network-change-submit .button {
    width: 100%;
  }
}

.button-danger {
  border-color: rgba(227, 6, 19, .24);
  color: #b4000c;
  background: #fff7f7;
}

.danger-zone-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: 28px;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid rgba(227, 6, 19, .18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 247, 247, .96), rgba(255, 255, 255, .98));
  box-shadow: var(--shadow);
}

.danger-zone-copy h2 {
  margin: 0 0 8px;
  font-size: 21px;
  letter-spacing: -.025em;
}

.danger-zone-copy p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.delete-urinal-form {
  display: grid;
  gap: 11px;
}

.delete-urinal-form label {
  display: grid;
  gap: 6px;
}

.delete-urinal-form label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.delete-urinal-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.delete-urinal-form .button {
  justify-self: end;
}

.security-state {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.security-state-ok {
  color: #147249;
  background: var(--green-soft);
}

.security-state-danger {
  color: #a9000b;
  background: var(--red-soft);
}

.auth-back-link {
  display: block;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.two-factor-setup-shell {
  grid-template-columns: minmax(260px, 1fr) minmax(440px, 540px);
}

@media (max-width: 760px) {
  .danger-zone-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .delete-urinal-form .button {
    width: 100%;
    justify-self: stretch;
  }
}

.two-factor-setup-card {
  padding: 30px;
}

.two-factor-setup-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7f9fa;
}

.qr-code-wrap {
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}

.qr-code-wrap img {
  width: 100%;
  display: block;
}

.two-factor-manual {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.two-factor-manual span,
.two-factor-manual small {
  color: var(--muted);
  font-size: 12px;
}

.two-factor-manual strong {
  overflow-wrap: anywhere;
  color: var(--blue-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
  letter-spacing: .08em;
  line-height: 1.55;
}

.recovery-card,
.security-note-card,
.security-management-card {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.factory-reset-card {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid rgba(227, 6, 19, .16);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 249, 249, .98), #fff);
  box-shadow: var(--shadow);
}

.factory-reset-body,
.factory-reset-form {
  display: grid;
  gap: 16px;
}

.factory-reset-form fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.factory-reset-form legend,
.factory-reset-form > label > span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.factory-reset-option,
.factory-reset-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.factory-reset-option input,
.factory-reset-confirmation input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.factory-reset-option span {
  display: grid;
  gap: 4px;
}

.factory-reset-option small {
  color: var(--muted);
  line-height: 1.45;
}

.factory-reset-form > label:not(.factory-reset-confirmation) {
  display: grid;
}

.factory-reset-form > label:not(.factory-reset-confirmation) input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.factory-reset-form .button {
  justify-self: start;
}

.installation-network-note {
  margin: 18px 0;
}

.recovery-warning {
  margin-bottom: 22px;
  padding: 13px 15px;
  border-radius: 12px;
  color: #7b520d;
  background: #fff7e6;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.recovery-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
  margin: 0 0 26px;
  padding-left: 27px;
}

.recovery-code-grid li {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fafb;
}

.recovery-code-grid code {
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
}

.security-account-card {
  margin-top: 22px;
}

.security-account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.security-account-head h2,
.security-management-card h2 {
  margin: 0;
}

.security-account-head p:last-child,
.security-management-card p:last-child,
.security-note-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.security-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.security-facts > div {
  padding: 13px 15px;
  border-radius: 12px;
  background: #f4f7f8;
}

.security-facts dt {
  color: var(--muted);
  font-size: 11px;
}

.security-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 750;
}

.security-account-actions {
  display: grid;
  gap: 10px;
}

.security-account-actions details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfc;
}

.security-account-actions summary {
  padding: 15px 17px;
  cursor: pointer;
  color: var(--blue);
  font-weight: 750;
}

.compact-security-form {
  padding: 4px 17px 18px;
}

.security-management-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr);
  gap: 32px;
  margin-top: 22px;
}

.security-management-actions {
  display: grid;
  align-content: start;
  gap: 14px;
}

.security-management-actions form:not(.unpair-form) .button {
  width: 100%;
}

.unpair-form {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Collapsible administration panels -------------------------------------- */
.network-management-card.management-disclosure,
.service-action-panel.management-disclosure,
.security-management-card.management-disclosure,
.factory-reset-card.management-disclosure,
.danger-zone-card.management-disclosure {
  display: block;
}

.management-disclosure-summary {
  position: relative;
  padding-right: 52px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.management-disclosure-summary::-webkit-details-marker {
  display: none;
}

.management-disclosure-summary::after {
  content: '';
  width: 34px;
  height: 34px;
  position: absolute;
  top: 0;
  right: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 8 10 12.5 14.5 8' fill='none' stroke='%23385460' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  transition: border-color .18s ease, background-color .18s ease;
}

.management-disclosure:not([open]) > .management-disclosure-summary p:not(.eyebrow) {
  display: none;
}

.management-disclosure[open] > .management-disclosure-summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 12 10 7.5 14.5 12' fill='none' stroke='%23385460' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-color: rgba(56, 84, 96, .28);
  background-color: #f7f9fa;
}

.management-disclosure-summary:focus-visible {
  outline: 3px solid rgba(56, 84, 96, .18);
  outline-offset: 6px;
  border-radius: 12px;
}

.network-management-card > .management-disclosure-body,
.service-action-panel > .management-disclosure-body,
.security-management-card > .management-disclosure-body,
.factory-reset-card > .management-disclosure-body,
.danger-zone-card > .management-disclosure-body {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.danger-zone-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: 28px;
}

.danger-zone-body > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .management-disclosure-summary {
    padding-right: 44px;
  }

  .management-disclosure-summary::after {
    width: 32px;
    height: 32px;
  }

  .danger-zone-body {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .factory-reset-card {
    padding: 20px;
  }

  .factory-reset-form .button {
    width: 100%;
  }
}

.unpair-form label {
  display: grid;
  gap: 7px;
}

.unpair-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.unpair-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.device-management-list,
.audit-list {
  display: grid;
  gap: 12px;
}

.device-management-row,
.audit-row {
  display: grid;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(34, 57, 66, .045);
}

.device-management-row {
  grid-template-columns: minmax(240px, 1.1fr) minmax(380px, 1.7fr) auto;
}

.device-management-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.device-management-identity h2 {
  margin: 4px 0 2px;
  font-size: 19px;
}

.device-management-identity p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-management-row dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.device-management-row dt {
  color: var(--muted);
  font-size: 10px;
}

.device-management-row dd {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 750;
}

.audit-row {
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.audit-outcome {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.audit-success {
  background: var(--green);
}

.audit-failure {
  background: var(--red);
}

.audit-main strong {
  font-size: 15px;
}

.audit-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.audit-meta {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.audit-meta time {
  color: var(--muted);
  font-size: 11px;
}

.security-note-card {
  margin-bottom: 24px;
}

@media (max-width: 960px) {
  .device-management-row {
    grid-template-columns: 1fr auto;
  }

  .device-management-row dl {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .security-management-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .two-factor-setup-grid,
  .recovery-code-grid,
  .security-facts {
    grid-template-columns: 1fr;
  }

  .qr-code-wrap {
    width: min(220px, 100%);
    margin-inline: auto;
  }

  .security-account-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .device-management-row {
    grid-template-columns: 1fr;
  }

  .device-management-row dl {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .device-management-row .button {
    width: 100%;
  }

  .audit-row {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .audit-meta {
    grid-column: 2;
    justify-items: start;
  }
}

@media (max-width: 520px) {
  .two-factor-setup-card {
    padding: 22px 18px;
  }

  .two-factor-setup-grid {
    padding: 13px;
  }

  .recovery-code-grid {
    padding-left: 24px;
  }

  .device-management-row dl {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* --------------------------------------------------------------------------
   uriSMART Cloud — history pagination and responsive polish
   -------------------------------------------------------------------------- */

body.drawer-open {
  overflow: hidden;
}

.topbar {
  z-index: 60;
}

.topbar-inner {
  min-height: 68px;
  gap: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar-icon-button,
.drawer-close-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--blue);
  background: #fff;
  cursor: pointer;
  transition:
    color .16s ease,
    border-color .16s ease,
    background .16s ease,
    box-shadow .16s ease,
    transform .16s ease;
}

.topbar-icon-button:hover,
.topbar-icon-button[aria-expanded="true"],
.drawer-close-button:hover {
  border-color: rgba(56, 84, 96, .22);
  color: var(--blue-dark);
  background: var(--blue-soft);
  box-shadow: 0 8px 20px rgba(34, 57, 66, .08);
}

.topbar-icon-button:active,
.drawer-close-button:active {
  transform: scale(.96);
}

.topbar-icon-button svg,
.drawer-close-button svg,
.account-avatar svg,
.account-popover-actions svg,
.nav-item-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-icon-button svg {
  width: 21px;
  height: 21px;
}

.drawer-open-button .menu-icon {
  width: 20px;
  height: 16px;
}

.drawer-open-button .menu-icon span {
  height: 2px;
  background: currentColor;
}

.account-menu {
  position: relative;
}

.account-popover {
  position: absolute;
  z-index: 75;
  top: calc(100% + 11px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid rgba(35, 52, 61, .11);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(34, 57, 66, .2);
  animation: account-popover-in .16s ease both;
}

.account-popover[hidden] {
  display: none;
}

@keyframes account-popover-in {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.account-popover-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 19px;
}

.account-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 9px 22px rgba(56, 84, 96, .2);
}

.account-avatar svg {
  width: 24px;
  height: 24px;
}

.account-popover-head > div,
.drawer-user-context > div {
  min-width: 0;
}

.account-kicker,
.account-popover-head strong,
.account-popover-head small {
  display: block;
}

.account-kicker {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-popover-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover-head small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-organization {
  display: grid;
  gap: 4px;
  padding: 15px 19px;
  border-block: 1px solid var(--line-soft);
  background: var(--panel-soft);
}

.account-organization span,
.account-organization small {
  color: var(--muted);
  font-size: 10px;
}

.account-organization span {
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-organization strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.account-organization small {
  font-weight: 650;
}

.account-popover-actions {
  display: grid;
  gap: 2px;
  padding: 8px;
}

.account-popover-actions form {
  display: grid;
  margin: 0;
}

.account-popover-actions a,
.account-popover-actions button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
}

.account-popover-actions a:hover,
.account-popover-actions button:hover {
  background: var(--blue-soft);
}

.account-popover-actions svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.account-popover-actions .account-logout {
  color: var(--red);
}

.account-popover-actions .account-logout:hover {
  background: var(--red-soft);
}

.app-drawer-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
}

.app-drawer-layer[hidden] {
  display: none;
}

.app-drawer-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  background: rgba(20, 33, 39, .42);
  cursor: default;
  transition: opacity .22s ease;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.app-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(390px, calc(100% - 28px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgba(35, 52, 61, .1);
  background: #fff;
  box-shadow: -26px 0 70px rgba(20, 33, 39, .2);
  transform: translateX(102%);
  transition: transform .24s cubic-bezier(.22, .75, .2, 1);
}

.app-drawer-layer.is-open .app-drawer-backdrop {
  opacity: 1;
}

.app-drawer-layer.is-open .app-drawer {
  transform: translateX(0);
}

.app-drawer-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px 14px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.app-drawer-head span {
  display: block;
  margin-bottom: 2px;
  color: var(--red);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.app-drawer-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -.035em;
}

.drawer-close-button {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.drawer-close-button svg {
  width: 20px;
  height: 20px;
}

.drawer-navigation {
  display: grid;
  align-content: start;
  gap: 4px;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 13px;
  overscroll-behavior: contain;
}

.drawer-navigation a {
  min-height: 58px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 11px 8px 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  transition:
    color .15s ease,
    border-color .15s ease,
    background .15s ease,
    transform .15s ease;
}

.drawer-navigation a:hover {
  color: var(--blue);
  background: var(--panel-soft);
  transform: translateX(-2px);
}

.drawer-navigation a.active {
  border-color: rgba(56, 84, 96, .1);
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.nav-item-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--blue);
  background: #edf2f4;
}

.drawer-navigation a.active .nav-item-icon {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(56, 84, 96, .2);
}

.nav-item-icon svg {
  width: 20px;
  height: 20px;
}

.nav-item-arrow {
  color: #9aa8ae;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}

.drawer-navigation a.active .nav-item-arrow {
  color: var(--blue);
}

.app-drawer-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line-soft);
  background: var(--panel-soft);
}

.drawer-user-context {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 15px 18px 12px;
}

.account-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.account-avatar-small svg {
  width: 20px;
  height: 20px;
}

.drawer-user-context span,
.drawer-user-context strong,
.drawer-user-context small {
  display: block;
}

.drawer-user-context span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.drawer-user-context strong {
  overflow: hidden;
  margin-block: 2px;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-user-context small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-account-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 18px 15px;
  font-size: 11px;
}

.drawer-account-actions a,
.drawer-account-actions button {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
}

.drawer-account-actions form {
  margin: 0;
}

.drawer-account-actions form:last-child {
  margin-left: auto;
}

.drawer-account-actions .drawer-logout {
  color: var(--red);
}

.firmware-page {
  display: grid;
  gap: 26px;
}

.firmware-page > .page-heading,
.firmware-page > .flash {
  margin-bottom: 0;
}

.firmware-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.firmware-overview-grid .security-note-card {
  margin: 0;
}

.firmware-upload-card {
  margin: 0;
}

.firmware-section {
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid rgba(35, 52, 61, .08);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.firmware-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.firmware-section-heading h2,
.firmware-section-heading p {
  margin: 0;
}

.firmware-section-heading h2 {
  font-size: clamp(22px, 3vw, 28px);
}

.firmware-section-heading > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.firmware-release-form {
  margin-top: 20px;
}

.firmware-release-form input[type="file"] {
  min-height: 48px;
  padding-block: 9px;
}

.firmware-release-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.firmware-release-card {
  gap: 13px;
  box-shadow: none;
}

.firmware-release-card h3,
.firmware-device-card h3 {
  margin: 0;
  font-size: 20px;
}

.firmware-release-card > p {
  margin: 0;
  min-height: 40px;
  color: var(--muted);
  line-height: 1.5;
}

.firmware-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.firmware-pagination-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.firmware-pagination-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.firmware-page-link,
.firmware-pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.firmware-page-link {
  border: 1px solid var(--line-soft);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.firmware-page-link:hover:not(.is-current):not(.is-disabled) {
  border-color: rgba(56, 84, 96, .34);
  background: var(--panel-soft);
  color: var(--blue-dark);
}

.firmware-page-link.is-current {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.firmware-page-link.is-disabled {
  opacity: .42;
  cursor: default;
}

.firmware-page-link-wide {
  min-width: 74px;
}

.firmware-pagination-ellipsis {
  min-width: 24px;
  padding-inline: 2px;
  color: var(--muted);
}

.firmware-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.firmware-device-list {
  display: grid;
  gap: 14px;
}

.firmware-device-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(220px, .8fr);
  gap: 18px 28px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--panel-soft);
}

.firmware-device-main {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.firmware-device-main .status-dot {
  margin-top: 7px;
}

.firmware-device-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.firmware-device-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.firmware-device-facts div {
  min-width: 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: #fff;
}

.firmware-device-facts dt,
.firmware-device-facts dd {
  margin: 0;
}

.firmware-device-facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.firmware-device-facts dd {
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.firmware-deployment-state,
.firmware-assign-form,
.firmware-bootstrap-note,
.firmware-device-card > .inline-notice {
  grid-column: 1 / -1;
}

.firmware-deployment-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border: 1px solid rgba(56, 84, 96, .1);
  border-radius: 13px;
  background: #fff;
}

.firmware-deployment-state span,
.firmware-deployment-state strong,
.firmware-deployment-state small {
  display: block;
}

.firmware-deployment-state span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.firmware-deployment-state strong {
  margin-top: 2px;
  font-size: 13px;
}

.firmware-deployment-state small {
  margin-top: 3px;
  color: var(--muted);
}

.firmware-state-confirmed {
  border-color: rgba(25, 115, 77, .22);
  background: var(--green-soft);
}

.firmware-state-failed {
  border-color: rgba(227, 6, 19, .18);
  background: var(--red-soft);
}

.firmware-assign-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}

.firmware-assign-form label {
  display: grid;
  gap: 7px;
}

.firmware-assign-form label > span {
  font-size: 12px;
  font-weight: 750;
}

.firmware-assign-form select {
  width: 100%;
  height: 44px;
  padding-inline: 13px;
  border: 1px solid #cbd6da;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.firmware-process-card {
  margin: 0;
}

.firmware-process-card ol {
  display: grid;
  gap: 9px;
  margin: 15px 0 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.5;
}

.firmware-device-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.firmware-device-title-row .security-state {
  padding: 4px 8px;
  font-size: 9px;
}

.firmware-rollout-preview {
  margin: 0;
  border: 2px solid rgba(56, 84, 96, .18);
}

.rollout-preview-summary,
.rollout-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rollout-preview-summary > div,
.rollout-progress-grid > div {
  display: grid;
  gap: 3px;
  padding: 13px;
  border-radius: 13px;
  background: var(--panel-soft);
}

.rollout-preview-summary strong,
.rollout-progress-grid strong {
  font-size: 20px;
}

.rollout-preview-summary span,
.rollout-progress-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.rollout-preview-list {
  display: grid;
  gap: 8px;
  max-height: 440px;
  margin-top: 16px;
  overflow: auto;
}

.rollout-preview-list > div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) minmax(170px, auto);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.rollout-preview-list span,
.rollout-preview-list small {
  display: block;
}

.rollout-preview-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.rollout-preview-list > div > span:last-child {
  text-align: right;
}

.rollout-confirm-form {
  max-width: 620px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.firmware-rollout-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.firmware-rollout-card {
  gap: 13px;
  box-shadow: none;
}

.firmware-rollout-card h3,
.firmware-rollout-card p {
  margin: 0;
}

.firmware-rollout-card p {
  color: var(--muted);
  font-size: 12px;
}

.firmware-page .button-small {
  min-height: 44px;
}

@media (max-width: 720px) {
  .topbar-inner {
    min-height: 62px;
    padding-block: 7px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-icon-button {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 13px;
  }

  .app-drawer {
    width: min(370px, calc(100% - 14px));
  }

  .account-popover {
    position: fixed;
    top: 70px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .firmware-overview-grid,
  .firmware-release-grid,
  .firmware-rollout-list,
  .firmware-device-card {
    grid-template-columns: 1fr;
  }

  .firmware-section-heading,
  .firmware-deployment-state {
    align-items: flex-start;
    flex-direction: column;
  }

  .firmware-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .firmware-pagination-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .firmware-assign-form {
    grid-template-columns: 1fr;
  }

  .firmware-assign-form .button,
  .firmware-deployment-state .button {
    width: 100%;
  }

  .rollout-preview-summary,
  .rollout-progress-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rollout-preview-list > div {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .rollout-preview-list > div > span:last-child {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .brand-cloud {
    display: inline;
    margin-left: 4px;
    padding-left: 5px;
    font-size: 8px;
  }

  .history-table-head,
  .history-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-pagination-actions {
    width: 100%;
    justify-content: space-between;
  }

  .drawer-navigation {
    padding: 10px;
  }

  .drawer-navigation a {
    min-height: 54px;
  }

  .app-drawer-head {
    min-height: 68px;
  }

  .drawer-user-context {
    padding-top: 12px;
  }
}

/* --------------------------------------------------------------------------
   Universal QR/NFC urinal selector
   -------------------------------------------------------------------------- */

.scan-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.scan-total {
  min-width: 116px;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 13px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: var(--muted);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 750;
}

.scan-total strong {
  color: var(--blue-dark);
  font-size: 22px;
}

.scan-organization-list,
.scan-site-list {
  display: grid;
  gap: 18px;
}

.scan-organization {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.scan-organization-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel-soft);
}

.scan-organization-head h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -.03em;
}

.scan-organization-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.scan-site-list {
  padding: 18px;
}

.scan-site {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--panel-soft);
}

.scan-site-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}

.scan-site-icon {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--blue);
  font-size: 16px;
  font-weight: 850;
}

.scan-site-head h3,
.scan-site-head p {
  margin: 0;
}

.scan-site-head h3 {
  margin-top: 2px;
  font-size: 19px;
  letter-spacing: -.025em;
}

.scan-site-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.scan-urinal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.scan-urinal-form {
  min-width: 0;
  margin: 0;
}

.scan-urinal-choice {
  width: 100%;
  height: 100%;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
  border: 1px solid #dce5e8;
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 7px 20px rgba(34, 57, 66, .045);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.scan-urinal-choice:hover {
  border-color: rgba(56, 84, 96, .35);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.scan-urinal-choice-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.scan-urinal-choice-top .object-id {
  margin: 4px 0 0;
  font-size: 9px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef2f4;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill > span {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #8c9ba1;
}

.status-pill.status-ok {
  color: #19734d;
  background: var(--green-soft);
  box-shadow: none;
}

.status-pill.status-ok > span {
  background: var(--green);
}

.status-pill.status-low {
  color: var(--red);
  background: var(--red-soft);
  box-shadow: none;
}

.status-pill.status-low > span {
  background: var(--red);
}

.status-pill.status-offline {
  color: var(--muted);
  background: #eef2f4;
  box-shadow: none;
}

.status-pill.status-offline > span {
  background: #7e8c92;
}

.scan-urinal-choice > strong {
  margin-top: 15px;
  overflow: hidden;
  font-size: 18px;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-urinal-choice > small {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-model {
  margin-top: 9px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
}

.scan-open-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.scan-open-label > span {
  font-size: 17px;
}

@media (max-width: 900px) {
  .scan-urinal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .scan-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .scan-total {
    min-width: 0;
  }

  .scan-organization-head {
    align-items: flex-start;
  }

  .scan-site-list,
  .scan-site {
    padding: 12px;
  }

  .scan-urinal-grid {
    grid-template-columns: 1fr;
  }

  .scan-urinal-choice {
    min-height: 176px;
  }
}

/* --------------------------------------------------------------------------
   Geführte Smart-Trap-Einrichtung (Cloud v1.9.6)
   -------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 2px solid #fff;
  border-radius: 10px;
  color: #fff;
  background: var(--blue-dark);
  box-shadow: 0 0 0 3px var(--red);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.installation-wizard-page {
  width: min(1040px, calc(100% - 36px));
}

.devices-heading-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.installation-toolbar {
  margin-bottom: 4px;
}

.installation-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
  align-items: end;
  gap: 30px;
}

.installation-heading > div {
  min-width: 0;
}

.installation-heading > div > p:last-child {
  max-width: 720px;
  line-height: 1.6;
}

.installation-target {
  display: grid;
  gap: 5px;
  padding: 18px 20px;
  border: 1px solid rgba(56, 84, 96, .14);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
}

.installation-target span,
.installation-target small {
  color: var(--muted);
}

.installation-target span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.installation-target strong {
  font-size: 18px;
}

.installation-target small {
  line-height: 1.45;
}

.installation-live-content {
  display: grid;
  gap: 18px;
}

[data-installation-live][aria-busy="true"] {
  cursor: progress;
}

.installation-progress {
  padding: 19px 22px;
  border: 1px solid rgba(56, 84, 96, .13);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(34, 57, 66, .06);
}

.installation-progress > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.installation-progress ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.installation-progress li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 13px;
  color: var(--muted);
  background: #f4f6f7;
}

.installation-progress li.is-current {
  color: var(--blue-dark);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 2px rgba(56, 84, 96, .2);
}

.installation-progress li.is-done:not(.is-current) {
  color: #176b49;
  background: var(--green-soft);
}

.installation-progress-number {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #8b9aa1;
  font-size: 13px;
  font-weight: 850;
}

.installation-progress .is-current .installation-progress-number {
  background: var(--blue);
}

.installation-progress .is-done:not(.is-current) .installation-progress-number {
  background: var(--green);
}

.installation-progress li > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.installation-progress small,
.installation-progress strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.installation-progress small {
  font-size: 10px;
  font-weight: 700;
}

.installation-progress strong {
  font-size: 13px;
}

.installation-step-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 20px;
  padding: 28px;
  border: 1px solid rgba(56, 84, 96, .15);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  scroll-margin-top: 100px;
}

.installation-step-card.is-current {
  border-color: rgba(56, 84, 96, .34);
  box-shadow: 0 18px 48px rgba(34, 57, 66, .12);
}

.installation-step-card.is-pending {
  border-style: dashed;
  background: rgba(255, 255, 255, .68);
  box-shadow: none;
}

.installation-step-card.is-compact {
  padding-block: 22px;
}

.installation-step-marker {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: var(--blue);
  font-size: 20px;
  font-weight: 850;
}

.installation-step-card.is-complete .installation-step-marker {
  background: var(--green);
}

.installation-step-card.is-pending .installation-step-marker {
  color: var(--muted);
  background: #e4eaec;
}

.installation-step-content {
  min-width: 0;
}

.installation-step-content h2 {
  margin: 0;
  font-size: clamp(24px, 3.5vw, 32px);
  letter-spacing: -.035em;
  line-height: 1.15;
}

.installation-step-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.installation-lead,
.installation-step-card.is-compact .installation-step-content > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.installation-target-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 0;
}

.installation-target-summary div {
  min-width: 0;
  padding: 13px 14px;
  border-radius: 12px;
  background: #f3f6f7;
}

.installation-target-summary dt,
.installation-target-summary dd {
  margin: 0;
}

.installation-target-summary dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.installation-target-summary dd {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 750;
}

.installation-instructions {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.installation-instructions li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.installation-instructions li > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
}

.installation-instructions strong {
  display: block;
  margin-top: 1px;
  font-size: 15px;
}

.installation-instructions p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.installation-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.installation-action-row form {
  margin: 0;
}

.installation-wizard-page .button {
  min-height: 48px;
}

.installation-search-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: 20px;
  padding: 20px;
  border-radius: 16px;
  background: #f3f6f7;
}

.installation-search-empty .discovery-radar {
  margin: 0;
}

.installation-search-empty h3,
.installation-search-empty p {
  margin: 0;
}

.installation-search-empty p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.installation-search-empty .button {
  margin-top: 13px;
}

.installation-multiple-alert {
  margin-top: 18px;
}

.installation-multiple-alert p {
  margin: 5px 0 0;
}

.installation-device-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.installation-device-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.installation-device-card.is-identifying {
  border-color: rgba(47, 158, 107, .5);
  box-shadow: 0 0 0 3px rgba(47, 158, 107, .1);
}

.installation-device-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.installation-device-head h3 {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.installation-device-ready {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 999px;
  color: #176b49;
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 800;
}

.installation-device-card > form > .button {
  width: 100%;
  margin-top: 14px;
}

.installation-identify-status,
.installation-pair-pending {
  margin: 14px 0 0;
  padding: 12px 13px;
  border-radius: 12px;
  color: #176b49;
  background: var(--green-soft);
  font-size: 14px;
  line-height: 1.5;
}

.installation-identify-status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 750;
}

.installation-pair-pending strong,
.installation-pair-pending p {
  margin: 0;
}

.installation-pair-pending p {
  margin-top: 4px;
  font-size: 13px;
}

.installation-confirm-form {
  margin-top: 14px;
}

.installation-confirmation {
  min-height: 56px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: #f7f9fa;
}

.installation-confirmation:has(input:checked) {
  border-color: rgba(47, 158, 107, .55);
  background: var(--green-soft);
}

.installation-confirmation input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--green);
}

.installation-confirmation strong,
.installation-confirmation small {
  display: block;
}

.installation-confirmation strong {
  font-size: 14px;
  line-height: 1.4;
}

.installation-confirmation small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.installation-confirm-form .button {
  width: 100%;
  margin-top: 10px;
}

.installation-technical-details {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.installation-technical-details summary,
.installation-help summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.installation-technical-details dl {
  display: grid;
  gap: 7px;
  margin: 0 0 4px;
}

.installation-technical-details dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.installation-technical-details dt,
.installation-technical-details dd {
  margin: 0;
}

.installation-technical-details dt {
  color: var(--muted);
}

.installation-technical-details dd {
  overflow-wrap: anywhere;
  text-align: right;
  font-weight: 750;
}

.installation-check-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.installation-check-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(150px, .8fr) minmax(180px, 1.2fr);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fafb;
}

.installation-check-list li.is-warning {
  border-color: rgba(217, 137, 16, .28);
  background: #fff8eb;
}

.installation-check-list li.is-ok {
  border-color: rgba(47, 158, 107, .2);
  background: var(--green-soft);
}

.installation-check-symbol {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #8c9ba1;
  font-weight: 900;
}

.installation-check-list .is-ok .installation-check-symbol {
  background: var(--green);
}

.installation-check-list .is-warning .installation-check-symbol {
  background: var(--amber);
}

.installation-check-copy {
  display: grid;
  gap: 3px;
}

.installation-check-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.installation-check-value {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 14px;
  font-weight: 800;
}

.installation-success-panel,
.installation-wait-panel {
  margin-top: 18px;
  padding: 15px 17px;
  border-radius: 14px;
}

.installation-success-panel {
  color: #176b49;
  background: var(--green-soft);
}

.installation-wait-panel {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.installation-success-panel p,
.installation-wait-panel p {
  margin: 5px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.installation-help {
  margin-top: 18px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
}

.installation-help-content {
  padding: 0 0 19px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.installation-help-content ol {
  margin-top: 0;
  padding-left: 22px;
}

.installation-help-content p {
  margin-bottom: 0;
}

.installation-wizard-page button:disabled,
.installation-wizard-page .button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

@media (max-width: 900px) {
  .installation-heading {
    grid-template-columns: 1fr;
  }

  .installation-progress ol,
  .installation-target-summary,
  .installation-device-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .installation-wizard-page {
    width: min(100% - 24px, 1040px);
    padding-top: 24px;
  }

  .installation-toolbar,
  .installation-step-heading,
  .installation-device-head {
    align-items: stretch;
    flex-direction: column;
  }

  .devices-heading-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .devices-heading-actions > .button,
  .devices-heading-actions .dashboard-refresh-control,
  .devices-heading-actions .dashboard-refresh-button {
    width: 100%;
  }

  .installation-toolbar .dashboard-refresh-control {
    width: 100%;
    align-items: stretch;
  }

  .installation-toolbar .dashboard-refresh-button,
  .installation-step-heading .button {
    width: 100%;
  }

  .installation-heading {
    gap: 18px;
  }

  .installation-progress {
    padding: 16px;
  }

  .installation-progress ol,
  .installation-target-summary,
  .installation-device-grid {
    grid-template-columns: 1fr;
  }

  .installation-progress li {
    min-height: 54px;
  }

  .installation-step-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 17px;
  }

  .installation-step-marker {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .installation-search-empty {
    grid-template-columns: 1fr;
  }

  .installation-search-empty .discovery-radar {
    margin-inline: auto;
  }

  .installation-action-row,
  .installation-action-row form,
  .installation-action-row .button {
    width: 100%;
  }

  .installation-check-list li {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .installation-check-value {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 360px) {
  .installation-wizard-page {
    width: min(100% - 16px, 1040px);
  }

  .installation-step-card,
  .installation-device-card {
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none;
  }

  .installation-wizard-page .discovery-radar::before,
  .installation-wizard-page .discovery-radar::after,
  .installation-wizard-page .identify-led,
  .installation-wizard-page .is-identifying {
    animation: none !important;
  }
}

/* --------------------------------------------------------------------------
   Cloud v1.14.7 · mobile Breitenabsicherung und kompaktes Serviceprotokoll
   -------------------------------------------------------------------------- */

main,
header,
footer,
nav,
aside,
section,
article,
div,
form,
fieldset,
label,
ul,
ol,
dl,
.shell,
.page,
.form-card,
.stack-form,
.form-row,
.checkbox-grid,
.checkbox-option,
.toggle-option,
.history-card,
.history-columns,
.history-measurements-panel,
.history-events-panel {
  min-width: 0;
}

img,
svg,
video,
canvas,
input,
select,
textarea {
  max-width: 100%;
}

.stack-form > *,
.form-row > *,
.checkbox-grid > *,
.checkbox-option > span,
.toggle-option > span {
  min-width: 0;
}

.stack-form select {
  min-width: 0;
  max-width: 100%;
  text-overflow: ellipsis;
}

.checkbox-fieldset legend,
.page-heading h1,
.page-heading p,
.form-divider span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .history-table-head {
    min-width: 0;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .history-page-size {
    max-width: 100%;
    margin-left: auto;
  }

  .history-pagination {
    width: 100%;
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .history-pagination-actions {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(86px, auto) minmax(0, 1fr);
    gap: 6px;
  }

  .history-pagination button,
  .history-page-number {
    min-width: 0;
  }

  .event-list .event-service {
    min-width: 0;
    padding: 11px;
  }

  .event-service-heading {
    display: grid;
    gap: 3px;
  }

  .event-service-heading time {
    white-space: normal;
  }

  .event-service-operator {
    padding: 7px;
  }

  .event-service-facts span {
    flex: 1 1 118px;
  }
}

@media (max-width: 360px) {
  .form-card,
  .history-card {
    padding-inline: 16px;
  }

  .history-pagination-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-page-number {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

/* --------------------------------------------------------------------------
   Cloud v1.14.11 · DEMO-Testdaten im Testkunden
   -------------------------------------------------------------------------- */

.urinal-card-stats {
  align-items: start;
}

.urinal-card-stats > div {
  display: grid;
  grid-template-rows: 14px auto;
  align-content: start;
  row-gap: 3px;
}

.urinal-card-stats > div > span:first-child {
  min-height: 14px;
  display: flex;
  align-items: center;
  margin: 0;
  line-height: 1;
}

.urinal-card-stats > div > strong {
  align-self: start;
  margin: 0;
  padding-top: 0;
  line-height: 1.1;
}

.urinal-card-stats .heartbeat-label {
  min-height: 14px;
  margin: 0;
}

.urinal-card-stats .heartbeat-label > span {
  line-height: 1;
}
