:root {
  --bg: #f5f2ea;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --ink: #171915;
  --muted: #667064;
  --line: rgba(23, 25, 21, 0.12);
  --field: #eef3ec;
  --forest: #173f35;
  --forest-2: #285c4e;
  --gold: #b88745;
  --gold-soft: #ead8b8;
  --danger: #8f3131;
  --shadow: 0 18px 48px rgba(29, 34, 27, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.esomero-app {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.esomero-app a {
  color: inherit;
  text-decoration: none;
}

body.esomero-app a:hover,
body.esomero-app a:focus {
  color: var(--forest-2);
  text-decoration: none;
}

.esomero-root {
  min-height: 100vh;
}

.lux-map-page,
.lux-page,
.login-screen {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.7), rgba(245,242,234,0.95)),
    repeating-linear-gradient(90deg, rgba(23,63,53,0.045) 0, rgba(23,63,53,0.045) 1px, transparent 1px, transparent 72px),
    repeating-linear-gradient(0deg, rgba(184,135,69,0.045) 0, rgba(184,135,69,0.045) 1px, transparent 1px, transparent 72px);
}

.lux-hero-map {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #dfe8dd;
}

.device-map,
.track-map {
  width: 100%;
  min-height: 100vh;
  z-index: 1;
}

.track-map {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.leaflet-container {
  font-family: inherit;
}

.lux-map-overlay {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 500;
  width: min(430px, calc(100vw - 56px));
  color: var(--ink);
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.lux-map-overlay__inner {
  padding: 24px;
}

.lux-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lux-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(184,135,69,0.18);
}

.lux-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
}

.lux-subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.lux-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.lux-stat {
  min-width: 0;
  padding: 14px 12px;
  background: rgba(238,243,236,0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lux-stat__value {
  display: block;
  font-size: 24px;
  line-height: 1;
  font-weight: 850;
  color: var(--forest);
}

.lux-stat__label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  background: #eef3ec;
  text-align: center;
  font-weight: 700;
}

.lux-content {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.lux-page .lux-content {
  padding-top: 36px;
}

.lux-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.lux-heading h1,
.lux-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0;
}

.lux-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.device-card {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(29, 34, 27, 0.08);
}

.device-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.device-card__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 820;
}

.device-card__id {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  word-break: break-word;
}

.lux-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  color: var(--forest);
  background: var(--field);
  border: 1px solid rgba(23,63,53,0.16);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.metric-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(23,25,21,0.08);
}

.metric:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.metric span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.metric span:last-child,
.metric a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.device-card__actions,
.lux-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lux-btn,
.login-form-modern button,
.lux-date-form button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  color: #fff !important;
  background: var(--forest);
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  box-shadow: 0 10px 22px rgba(23,63,53,0.22);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.lux-btn:hover,
.login-form-modern button:hover,
.lux-date-form button:hover {
  color: #fff !important;
  background: var(--forest-2);
  box-shadow: 0 12px 28px rgba(23,63,53,0.26);
  transform: translateY(-1px);
}

.lux-btn--ghost {
  color: var(--forest) !important;
  background: #fff;
  border-color: rgba(23,63,53,0.22);
  box-shadow: none;
}

.lux-btn--ghost:hover {
  color: var(--forest) !important;
  background: var(--field);
  box-shadow: none;
}

.lux-table-wrap {
  overflow: auto;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(29, 34, 27, 0.08);
}

.lux-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.lux-table th,
.lux-table td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(23,25,21,0.08);
  text-align: left;
  vertical-align: middle;
}

.lux-table th {
  color: var(--muted);
  background: #f8f6ef;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.lux-table td {
  font-size: 14px;
  font-weight: 650;
}

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

.lux-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lux-date-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.lux-date-form input,
.login-form-modern input {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(23,25,21,0.16);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  font: inherit;
}

.lux-date-form input:focus,
.login-form-modern input:focus {
  outline: 3px solid rgba(184,135,69,0.22);
  border-color: var(--gold);
}

.login-screen {
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-panel {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  background: var(--panel-strong);
  border: 1px solid rgba(23,25,21,0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23,63,53,0.94), rgba(18,24,21,0.96)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 1px, transparent 1px, transparent 24px);
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  font-weight: 880;
  letter-spacing: 0;
}

.login-brand p {
  max-width: 360px;
  margin: 18px 0 0;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
}

.login-brand__footer {
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-form-modern {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 42px;
}

.login-form-modern h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
}

.login-form-modern label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.login-error {
  padding: 12px 14px;
  color: var(--danger);
  background: rgba(143,49,49,0.08);
  border: 1px solid rgba(143,49,49,0.22);
  border-radius: var(--radius);
  font-weight: 750;
}

.popup-title {
  margin: 0 0 7px;
  font-weight: 850;
}

.popup-meta {
  margin: 0 0 9px;
  color: #566057;
  font-size: 12px;
  line-height: 1.45;
}

.popup-link {
  color: var(--forest) !important;
  font-weight: 850;
}

.empty-state {
  padding: 32px;
  color: var(--muted);
  background: var(--panel-strong);
  border: 1px dashed rgba(23,25,21,0.2);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 750;
}

@media (max-width: 860px) {
  .lux-map-overlay {
    top: 16px;
    left: 16px;
    width: calc(100vw - 32px);
  }

  .lux-map-overlay__inner {
    padding: 18px;
  }

  .lux-stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lux-stat {
    padding: 11px 9px;
  }

  .lux-stat__value {
    font-size: 20px;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 320px;
  }
}

@media (max-width: 560px) {
  .lux-content {
    width: min(100% - 24px, 1180px);
    padding-bottom: 42px;
  }

  .device-map {
    min-height: 100vh;
  }

  .lux-title {
    font-size: 32px;
  }

  .lux-subtitle {
    font-size: 14px;
  }

  .lux-stat-row {
    grid-template-columns: 1fr;
  }

  .device-card {
    min-height: auto;
  }

  .login-screen {
    padding: 14px;
  }

  .login-brand,
  .login-form-modern {
    padding: 24px;
  }
}

/* Dashboard layout refinement */
.lux-dashboard .lux-content {
  width: min(1280px, calc(100vw - 40px));
}

.lux-dashboard-shell {
  padding-top: 28px;
}

.lux-dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.lux-dashboard-header h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.06;
  font-weight: 850;
  letter-spacing: 0;
}

.lux-dashboard-header p:last-child {
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.dashboard-map-card,
.dashboard-data-section {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(29, 34, 27, 0.1);
}

.dashboard-map-card {
  padding: 14px;
}

.dashboard-map-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 8px 14px;
}

.dashboard-map-card__header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: 0;
}

.dashboard-map-card__header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.lux-dashboard .device-map {
  width: 100%;
  height: 520px;
  min-height: 420px;
  border: 1px solid rgba(23,25,21,0.1);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 1;
}

.dashboard-data-section {
  margin-top: 18px;
  padding: 18px;
}

.dashboard-stats {
  margin-top: 0;
  margin-bottom: 20px;
}

.dashboard-table-header {
  margin-bottom: 14px;
}

.dashboard-device-table {
  min-width: 880px;
}

.table-device-link {
  display: grid;
  gap: 4px;
}

.table-device-link strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.table-device-link span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.table-actions .lux-btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.lux-kicker {
  max-width: 100%;
  line-height: 1.2;
}

.lux-kicker::before {
  flex: 0 0 auto;
}

.login-brand h1 {
  max-width: 430px;
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.06;
}

.login-brand .lux-kicker {
  color: var(--gold-soft);
}

.login-brand .lux-kicker::before {
  background: var(--gold-soft);
  box-shadow: 0 0 0 6px rgba(234,216,184,0.16);
}

@media (max-width: 860px) {
  .lux-dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-map-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .lux-dashboard .device-map {
    height: 430px;
    min-height: 360px;
  }

  .dashboard-data-section {
    padding: 14px;
  }
}

@media (max-width: 560px) {
  .lux-dashboard .lux-content {
    width: min(100% - 24px, 1280px);
  }

  .lux-dashboard-shell {
    padding-top: 18px;
  }

  .lux-dashboard-header h1 {
    font-size: 30px;
  }

  .lux-dashboard .device-map {
    height: 340px;
    min-height: 320px;
  }

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

  .table-actions {
    justify-content: flex-start;
  }
}

/* Full-screen login refinement */
.login-screen-full {
  min-height: 100vh;
  display: block;
  padding: 0;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.86), rgba(238,243,236,0.94)),
    repeating-linear-gradient(90deg, rgba(23,63,53,0.035) 0, rgba(23,63,53,0.035) 1px, transparent 1px, transparent 84px),
    repeating-linear-gradient(0deg, rgba(184,135,69,0.035) 0, rgba(184,135,69,0.035) 1px, transparent 1px, transparent 84px);
}

.login-screen-full .login-panel {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(440px, 1.08fr);
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-screen-full .login-brand {
  min-height: 100vh;
  justify-content: center;
  padding: clamp(48px, 7vw, 104px);
  background:
    linear-gradient(135deg, rgba(23,63,53,0.96), rgba(18,28,24,0.98)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.07) 0, rgba(255,255,255,0.07) 1px, transparent 1px, transparent 28px);
}

.login-brand__content {
  max-width: 560px;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.login-eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 0 7px rgba(234,216,184,0.15);
}

.login-screen-full .login-brand h1 {
  max-width: 540px;
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.02;
  font-weight: 880;
  letter-spacing: 0;
}

.login-screen-full .login-brand p:not(.login-eyebrow) {
  max-width: 460px;
  margin: 24px 0 0;
  color: rgba(255,255,255,0.76);
  font-size: 17px;
  line-height: 1.58;
}

.login-screen-full .login-form-modern {
  width: min(480px, calc(100% - 56px));
  align-self: center;
  justify-self: center;
  gap: 20px;
  padding: 42px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(23,25,21,0.12);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(29,34,27,0.14);
  backdrop-filter: blur(18px);
}

.login-form-modern__head {
  display: grid;
  gap: 12px;
  margin-bottom: 4px;
}

.login-screen-full .login-form-modern h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
}

.login-screen-full .login-form-modern label {
  gap: 9px;
  font-size: 12px;
  line-height: 1.2;
}

.login-screen-full .login-form-modern input {
  width: 100%;
  min-height: 48px;
}

.login-screen-full .login-form-modern button {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .login-screen-full .login-panel {
    grid-template-columns: 1fr;
  }

  .login-screen-full .login-brand {
    min-height: 38vh;
    padding: 34px 24px;
  }

  .login-screen-full .login-brand h1 {
    font-size: clamp(34px, 10vw, 52px);
  }

  .login-screen-full .login-form-modern {
    width: min(520px, calc(100% - 28px));
    margin: 28px auto;
    padding: 28px;
  }
}

@media (max-width: 520px) {
  .login-eyebrow {
    margin-bottom: 18px;
    font-size: 11px;
  }

  .login-screen-full .login-brand p:not(.login-eyebrow) {
    font-size: 15px;
  }

  .login-screen-full .login-form-modern {
    padding: 22px;
  }
}

/* DeviceControl dark login */
.dc-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 55fr) minmax(460px, 45fr);
  color: #f7f7f5;
  background: #070809;
  border: 1px solid rgba(255,255,255,0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dc-login * {
  box-sizing: border-box;
}

.dc-login__brand-panel,
.dc-login__form-panel {
  min-height: 100vh;
}

.dc-login__brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(42px, 5vw, 64px);
  overflow: hidden;
  background: #101415;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.dc-login__brand-panel::before,
.dc-login__brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,188,120,0.045);
  pointer-events: none;
}

.dc-login__brand-panel::before {
  width: 430px;
  height: 430px;
  top: 88px;
  left: 36px;
}

.dc-login__brand-panel::after {
  width: 252px;
  height: 252px;
  right: 40px;
  bottom: 158px;
}

.dc-brand,
.dc-hero-copy,
.dc-feature-list,
.dc-copyright {
  position: relative;
  z-index: 1;
}

.dc-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 820;
  line-height: 1;
}

.dc-brand__mark {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: #05100c;
  background: #08bf79;
  border-radius: 12px;
  font-size: 18px;
}

.dc-hero-copy {
  max-width: 660px;
  margin: auto 0;
  padding: 64px 0 46px;
}

.dc-hero-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(44px, 5.1vw, 68px);
  line-height: 1.13;
  font-weight: 850;
  letter-spacing: 0;
}

.dc-hero-copy p {
  max-width: 660px;
  margin: 28px 0 0;
  color: #a9b0b1;
  font-size: 18px;
  line-height: 1.62;
  letter-spacing: 0;
}

.dc-feature-list {
  display: grid;
  gap: 16px;
  max-width: 580px;
  margin-bottom: 64px;
}

.dc-feature-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 18px 16px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
}

.dc-feature-card__icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #0bd886;
  background: rgba(0,188,120,0.12);
  border-radius: 12px;
  font-size: 17px;
}

.dc-feature-card strong,
.dc-feature-card span {
  display: block;
}

.dc-feature-card strong {
  color: #e9eceb;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 780;
}

.dc-feature-card span {
  margin-top: 5px;
  color: #8e9698;
  font-size: 14px;
  line-height: 1.35;
}

.dc-copyright {
  margin: 0;
  color: #9aa2a4;
  font-size: 14px;
  line-height: 1.3;
}

.dc-login__form-panel {
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 72px);
  background: #060708;
}

.dc-login-form {
  width: min(448px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dc-form-head {
  display: grid;
  gap: 10px;
  margin-bottom: 4px;
}

.dc-form-head h2 {
  margin: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 830;
  letter-spacing: 0;
}

.dc-form-head p {
  margin: 0;
  color: #aab1b4;
  font-size: 16px;
  line-height: 1.45;
}

.dc-login-error {
  margin-top: 10px;
  padding: 12px 14px;
  color: #ffd5d5;
  background: rgba(204,72,72,0.12);
  border: 1px solid rgba(255,116,116,0.22);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}

.dc-field {
  display: grid;
  gap: 10px;
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.2;
}

.dc-field > span {
  color: #fff;
}

.dc-field input,
.dc-password-field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: #f6f8f7;
  background: #1a1d1e;
  border: 1px solid #2a2f31;
  border-radius: 9px;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.dc-field input::placeholder,
.dc-password-field input::placeholder {
  color: #7d8588;
}

.dc-field input:focus,
.dc-password-field input:focus {
  background: #1d2122;
  border-color: #08bf79;
  box-shadow: 0 0 0 3px rgba(8,191,121,0.14);
}

.dc-password-field {
  position: relative;
}

.dc-password-field input {
  padding-right: 52px;
}

.dc-icon-button {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca4a7;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.dc-icon-button:hover,
.dc-icon-button:focus {
  color: #fff;
  background: rgba(255,255,255,0.06);
  outline: none;
}

.dc-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 2px;
}

.dc-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #aab1b4;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}

.dc-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #08bf79;
}

.dc-link-button {
  padding: 0;
  color: #08d989;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
}

.dc-link-button:hover,
.dc-link-button:focus {
  color: #40f2aa;
  outline: none;
  text-decoration: none;
}

.dc-submit-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 13px 18px;
  color: #03100b !important;
  background: #0abf78;
  border: 1px solid #0abf78;
  border-radius: 9px;
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.dc-submit-button:hover,
.dc-submit-button:focus {
  color: #03100b !important;
  background: #16d88b;
  border-color: #16d88b;
  transform: translateY(-1px);
  outline: none;
}

.dc-submit-button--link {
  text-decoration: none !important;
}

.dc-register-line,
.dc-help-line {
  margin: 10px 0 0;
  color: #aab1b4;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.dc-register-line .dc-link-button,
.dc-help-line .dc-link-button {
  vertical-align: baseline;
}

.dc-help-line {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 28px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.11);
}

.dc-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.dc-modal.is-open {
  display: flex;
}

.dc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
}

.dc-modal__panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  padding: 28px;
  color: #f7f7f5;
  background: #111516;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.45);
}

.dc-modal__panel h3 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 820;
}

.dc-modal__panel p {
  margin: 12px 0 22px;
  color: #aab1b4;
  font-size: 15px;
  line-height: 1.55;
}

.dc-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #aab1b4;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
}

.dc-modal__close:hover,
.dc-modal__close:focus {
  color: #fff;
  outline: none;
}

.dc-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.dc-secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  color: #f7f7f5;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9px;
  font: inherit;
  font-weight: 720;
  cursor: pointer;
}

.dc-secondary-button:hover,
.dc-secondary-button:focus {
  background: rgba(255,255,255,0.06);
  outline: none;
}

.dc-contact-card {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}

.dc-contact-card span {
  color: #8f989b;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.dc-contact-card a,
.dc-contact-card strong {
  color: #fff;
  font-size: 15px;
  font-weight: 760;
  word-break: break-word;
}

@media (max-width: 980px) {
  .dc-login {
    grid-template-columns: 1fr;
  }

  .dc-login__brand-panel,
  .dc-login__form-panel {
    min-height: auto;
  }

  .dc-login__brand-panel {
    padding: 34px 24px 28px;
  }

  .dc-hero-copy {
    padding: 46px 0 30px;
  }

  .dc-feature-list {
    margin-bottom: 28px;
  }

  .dc-login__form-panel {
    padding: 36px 24px 48px;
  }
}

@media (max-width: 560px) {
  .dc-login__brand-panel {
    padding: 26px 18px;
  }

  .dc-brand {
    font-size: 16px;
  }

  .dc-hero-copy h1 {
    font-size: 38px;
  }

  .dc-hero-copy p {
    font-size: 15px;
  }

  .dc-feature-card {
    align-items: flex-start;
  }

  .dc-login__form-panel {
    padding: 26px 18px 38px;
  }

  .dc-login-form {
    gap: 20px;
  }

  .dc-form-options,
  .dc-help-line,
  .dc-modal__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dc-help-line {
    gap: 8px;
  }
}

/* Immediate login overlap and wording fix */
html,
body,
body.esomero-app {
  background: #060708 !important;
  overflow-x: hidden;
}

body.esomero-app .esomero-root {
  background: #060708;
}

.dc-login {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #060708 !important;
}

.dc-login__brand-panel,
.dc-login__form-panel {
  min-width: 0;
  background-color: #101415;
}

.dc-login__form-panel {
  background: #060708 !important;
}

.dc-hero-copy {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  row-gap: 34px;
  max-width: 720px;
  margin: auto 0 !important;
  padding: 72px 0 52px !important;
  clear: both;
}

.dc-hero-copy h1,
.dc-hero-copy p {
  position: relative;
  z-index: 2;
  float: none !important;
  clear: both !important;
  width: auto !important;
  max-width: 100%;
  transform: none !important;
}

.dc-hero-copy h1 {
  display: grid !important;
  gap: 12px;
  margin: 0 !important;
  color: #fff;
  font-size: clamp(48px, 4.7vw, 72px) !important;
  line-height: 0.98 !important;
  font-weight: 880 !important;
  letter-spacing: 0 !important;
}

.dc-hero-copy h1 span {
  display: block;
  white-space: normal;
}

.dc-hero-copy p {
  display: block !important;
  max-width: 670px !important;
  margin: 0 !important;
  color: #a9b0b1 !important;
  font-size: 18px !important;
  line-height: 1.72 !important;
}

.dc-brand__mark,
.dc-feature-card__icon {
  position: relative;
  display: inline-grid !important;
  place-items: center !important;
  overflow: hidden;
}

.dc-brand__mark > span,
.dc-feature-card__icon > span {
  position: relative;
  display: block;
  margin: 0 auto;
}

.dc-icon-monitor {
  width: 19px;
  height: 15px;
  border: 2px solid #06110c;
  border-radius: 3px;
}

.dc-icon-monitor::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 8px;
  height: 2px;
  background: #06110c;
  border-radius: 2px;
  transform: translateX(-50%);
}

.dc-icon-shield {
  width: 18px;
  height: 20px;
}

.dc-icon-shield::before {
  content: "";
  position: absolute;
  inset: 1px 3px 2px;
  background: #b8c5c8;
  clip-path: polygon(50% 0, 100% 17%, 88% 72%, 50% 100%, 12% 72%, 0 17%);
}

.dc-icon-shield::after {
  content: "";
  position: absolute;
  inset: 5px 7px 8px 7px;
  background: #0f3d31;
  border-radius: 999px;
}

.dc-icon-pulse {
  width: 22px;
  height: 20px;
}

.dc-icon-pulse::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 9px;
  width: 20px;
  height: 2px;
  background: #b8c5c8;
  border-radius: 2px;
}

.dc-icon-pulse::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 12px;
  height: 14px;
  border-left: 2px solid #b8c5c8;
  border-bottom: 2px solid #b8c5c8;
  transform: skew(-18deg);
}

.dc-modal__panel h3,
.dc-modal__panel p,
.dc-contact-card strong {
  user-select: auto;
}

@media (max-width: 1180px) {
  .dc-login {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.86fr);
  }

  .dc-hero-copy h1 {
    font-size: clamp(42px, 5.2vw, 60px) !important;
  }

  .dc-hero-copy p {
    max-width: 560px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 980px) {
  .dc-login {
    grid-template-columns: 1fr;
  }

  .dc-hero-copy {
    row-gap: 24px;
    padding: 44px 0 34px !important;
  }
}

@media (max-width: 560px) {
  .dc-hero-copy h1 {
    gap: 8px;
    font-size: 38px !important;
    line-height: 1.02 !important;
  }

  .dc-hero-copy p {
    font-size: 15px !important;
  }
}

/* Pixel-matched left login content */
.dc-login__brand-panel {
  padding: 64px 64px 58px !important;
}

.dc-hero-copy {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  row-gap: 28px !important;
  width: 100% !important;
  max-width: 626px !important;
  margin: auto 0 0 !important;
  padding: 94px 0 0 !important;
  align-content: start !important;
}

.dc-hero-copy h1 {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
  max-width: 610px !important;
  color: #ffffff !important;
  font-size: 48px !important;
  line-height: 1.22 !important;
  font-weight: 820 !important;
  letter-spacing: 0 !important;
}

.dc-hero-copy h1 span {
  display: block !important;
  white-space: nowrap !important;
}

.dc-hero-copy p {
  max-width: 626px !important;
  margin: 0 !important;
  color: #aeb6b8 !important;
  font-size: 18px !important;
  line-height: 1.58 !important;
  font-weight: 450 !important;
  letter-spacing: 0 !important;
}

.dc-feature-list {
  width: 100% !important;
  max-width: 577px !important;
  display: grid !important;
  gap: 16px !important;
  margin: 58px 0 0 !important;
}

.dc-feature-card {
  min-height: 78px !important;
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 18px 16px !important;
  background: #171b1c !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.dc-feature-card__icon {
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  display: grid !important;
  place-items: center !important;
  background: #0b3a2b !important;
  border-radius: 12px !important;
}

.dc-feature-card strong {
  color: #ededeb !important;
  font-size: 16px !important;
  line-height: 1.24 !important;
  font-weight: 760 !important;
  letter-spacing: 0 !important;
}

.dc-feature-card span:not(.dc-feature-card__icon) {
  margin-top: 5px !important;
  color: #9ca4a6 !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 450 !important;
  letter-spacing: 0 !important;
}

.dc-copyright {
  margin-top: 96px !important;
}

@media (max-width: 1180px) {
  .dc-hero-copy {
    max-width: 600px !important;
    padding-top: 84px !important;
  }

  .dc-hero-copy h1 {
    font-size: 46px !important;
  }

  .dc-hero-copy p {
    max-width: 590px !important;
    font-size: 17px !important;
  }
}

@media (max-width: 980px) {
  .dc-login__brand-panel {
    padding: 34px 24px 30px !important;
  }

  .dc-hero-copy {
    padding-top: 44px !important;
  }

  .dc-feature-list {
    margin-top: 36px !important;
  }
}

@media (max-width: 560px) {
  .dc-hero-copy h1 {
    font-size: 38px !important;
    line-height: 1.12 !important;
  }

  .dc-hero-copy h1 span {
    white-space: normal !important;
  }

  .dc-hero-copy p {
    font-size: 15px !important;
  }
}

/* Mobile login width and password icon fix */
.dc-password-field {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

.dc-password-field input {
  display: block !important;
  width: 100% !important;
  padding-right: 52px !important;
}

.dc-password-field .dc-icon-button {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  bottom: auto !important;
  left: auto !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  transform: translateY(-50%) !important;
  color: #9ca4a7 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  z-index: 4 !important;
}

.dc-password-field .dc-icon-button i {
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  line-height: 1 !important;
  font-size: 15px !important;
}

@media (max-width: 980px) {
  .dc-login {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .dc-login__brand-panel,
  .dc-login__form-panel {
    width: 100% !important;
    max-width: 100% !important;
  }

  .dc-login__brand-panel {
    padding: 36px 28px 34px !important;
  }

  .dc-hero-copy {
    width: 100% !important;
    max-width: 100% !important;
    row-gap: 28px !important;
    padding: 54px 0 0 !important;
    margin: 0 !important;
  }

  .dc-hero-copy h1 {
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    font-size: clamp(52px, 13vw, 68px) !important;
    line-height: 1.02 !important;
    font-weight: 880 !important;
  }

  .dc-hero-copy h1 span {
    white-space: normal !important;
  }

  .dc-hero-copy p {
    max-width: 100% !important;
    font-size: 18px !important;
    line-height: 1.62 !important;
  }

  .dc-feature-list {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 42px !important;
  }

  .dc-login__form-panel {
    padding: 34px 28px 46px !important;
  }

  .dc-login-form {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 560px) {
  .dc-login__brand-panel {
    padding: 28px 20px 30px !important;
  }

  .dc-brand {
    margin-bottom: 0 !important;
  }

  .dc-hero-copy {
    row-gap: 24px !important;
    padding-top: 48px !important;
  }

  .dc-hero-copy h1 {
    font-size: clamp(48px, 16vw, 62px) !important;
    line-height: 1.04 !important;
  }

  .dc-hero-copy p {
    font-size: 17px !important;
    line-height: 1.58 !important;
  }

  .dc-feature-list {
    margin-top: 38px !important;
  }

  .dc-feature-card {
    width: 100% !important;
  }

  .dc-login__form-panel {
    padding: 30px 20px 40px !important;
  }
}

@media (max-width: 390px) {
  .dc-hero-copy h1 {
    font-size: clamp(44px, 15vw, 56px) !important;
  }

  .dc-hero-copy p {
    font-size: 16px !important;
  }
}

/* Full-width dashboard and header overlap fix */
.lux-map-page.lux-dashboard {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(245,242,234,0.98)),
    repeating-linear-gradient(90deg, rgba(23,63,53,0.035) 0, rgba(23,63,53,0.035) 1px, transparent 1px, transparent 84px),
    repeating-linear-gradient(0deg, rgba(184,135,69,0.035) 0, rgba(184,135,69,0.035) 1px, transparent 1px, transparent 84px) !important;
}

.lux-dashboard .lux-content,
.lux-dashboard-shell {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.lux-dashboard-shell {
  min-height: 100vh;
  padding: 34px clamp(18px, 3vw, 54px) 54px !important;
}

.lux-dashboard-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start !important;
  gap: 18px 24px !important;
  width: 100%;
  margin: 0 0 28px !important;
}

.lux-dashboard-title {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px !important;
  min-width: 0;
  max-width: 900px;
}

.lux-dashboard-header .lux-kicker {
  position: static !important;
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--forest) !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 850 !important;
  letter-spacing: 0.12em !important;
  transform: none !important;
  white-space: normal !important;
}

.lux-dashboard-header .lux-kicker::before {
  flex: 0 0 8px !important;
}

.lux-dashboard-header h1 {
  display: block !important;
  clear: both !important;
  max-width: 900px !important;
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: clamp(40px, 4.4vw, 64px) !important;
  line-height: 1.08 !important;
  font-weight: 880 !important;
  letter-spacing: 0 !important;
  transform: none !important;
}

.lux-dashboard-header .lux-dashboard-title > p:last-child {
  display: block !important;
  max-width: 720px !important;
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 16px !important;
  line-height: 1.56 !important;
  transform: none !important;
}

.lux-dashboard-header > .lux-btn {
  align-self: start;
  white-space: nowrap;
}

.dashboard-map-card,
.dashboard-data-section {
  width: 100% !important;
  max-width: none !important;
  border-radius: 10px !important;
}

.dashboard-map-card {
  padding: 16px !important;
}

.dashboard-map-card__header {
  padding: 8px 8px 16px !important;
}

.lux-dashboard .device-map {
  width: 100% !important;
  height: clamp(420px, 55vh, 720px) !important;
  min-height: 420px !important;
}

.dashboard-data-section {
  margin-top: 22px !important;
  padding: 20px !important;
}

.dashboard-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 860px) {
  .lux-dashboard-shell {
    padding: 24px 16px 40px !important;
  }

  .lux-dashboard-header {
    grid-template-columns: 1fr !important;
  }

  .lux-dashboard-title {
    max-width: none;
  }

  .lux-dashboard-header h1 {
    font-size: clamp(34px, 10vw, 48px) !important;
    line-height: 1.1 !important;
  }

  .lux-dashboard-header .lux-dashboard-title > p:last-child {
    font-size: 15px !important;
  }

  .lux-dashboard-header > .lux-btn {
    justify-self: start;
  }

  .lux-dashboard .device-map {
    height: 420px !important;
    min-height: 360px !important;
  }

  .dashboard-stats {
    grid-template-columns: 1fr !important;
  }
}

/* Full-screen Google map dashboard */
html,
body,
body.esomero-app {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  overflow: hidden !important;
  background: #050607 !important;
}

body.esomero-app .esomero-root {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #050607 !important;
}

.map-dashboard {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  overflow: hidden;
  color: #f7f7f5;
  background: #050607;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.map-dashboard *,
.map-dashboard *::before,
.map-dashboard *::after {
  box-sizing: border-box;
}

.map-dashboard__canvas {
  position: absolute !important;
  inset: 0;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}

.map-dashboard .leaflet-container {
  background: #0a0d0d;
  font: inherit;
}

.map-dashboard .leaflet-control-zoom {
  margin-top: 66px !important;
  border: 0 !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.26) !important;
}

.map-dashboard .leaflet-control-zoom a {
  color: #111817 !important;
  background: rgba(255,255,255,0.92) !important;
  border-color: rgba(0,0,0,0.08) !important;
}

.map-dashboard .leaflet-control-attribution {
  color: rgba(255,255,255,0.74);
  background: rgba(5,6,7,0.66) !important;
  border-radius: 6px 0 0 0;
  font-size: 11px;
}

.map-dashboard__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 650;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 14px 8px 18px;
  color: #f7f7f5;
  background: rgba(5,7,8,0.88);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
}

.map-dashboard__brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: #fff;
  line-height: 1.2;
}

.map-dashboard__brand strong {
  font-size: 15px;
  font-weight: 820;
  white-space: nowrap;
}

.map-dashboard__brand span:last-child {
  color: #aab1b4;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.map-dashboard__status {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #0abf78;
  box-shadow: 0 0 0 6px rgba(10,191,120,0.14);
}

.map-dashboard__nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.map-nav-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: #dce2e1 !important;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  box-shadow: none;
  font: inherit;
  font-size: 13px;
  font-weight: 730;
  line-height: 1.1;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
}

.map-nav-button:hover,
.map-nav-button:focus,
.map-nav-button.is-active {
  color: #06100c !important;
  background: #0abf78;
  border-color: #0abf78;
  outline: none;
}

.map-nav-button--exit {
  color: #fff !important;
  background: #14191a;
}

.map-panel {
  position: absolute;
  top: 66px;
  right: 14px;
  z-index: 700;
  display: none;
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100dvh - 82px);
  overflow: auto;
  color: #f7f7f5;
  background: rgba(12,16,17,0.94);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.42);
  backdrop-filter: blur(18px);
}

.map-panel.is-open {
  display: block;
}

.map-panel__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  background: rgba(12,16,17,0.96);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.map-panel__head p,
.map-panel__head h2 {
  margin: 0;
  letter-spacing: 0;
}

.map-panel__head p {
  color: #0abf78;
  font-size: 11px;
  font-weight: 830;
  line-height: 1.2;
  text-transform: uppercase;
}

.map-panel__head h2 {
  margin-top: 4px;
  color: #fff;
  font-size: 24px;
  line-height: 1.12;
  font-weight: 830;
}

.map-panel__close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  color: #aab1b4;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.map-panel__close:hover,
.map-panel__close:focus {
  color: #fff;
  outline: none;
}

.map-panel__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 18px 6px;
}

.map-panel__stats span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 10px;
  color: #aab1b4;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.2;
  text-transform: uppercase;
}

.map-panel__stats strong {
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.map-panel__empty {
  margin: 18px;
  padding: 18px;
  color: #aab1b4;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
}

.map-device-list {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.map-device-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 11px;
}

.map-device-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.map-device-card h3,
.map-device-card p {
  margin: 0;
}

.map-device-card h3 {
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 790;
}

.map-device-card p {
  margin-top: 5px;
  color: #90999c;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.map-device-card__type {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #072016;
  background: #0abf78;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
}

.map-device-card__meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.map-device-card__meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.map-device-card__meta div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.map-device-card__meta dt,
.map-device-card__meta dd {
  margin: 0;
  line-height: 1.35;
}

.map-device-card__meta dt {
  color: #8f989b;
  font-size: 12px;
  font-weight: 720;
}

.map-device-card__meta dd {
  color: #f7f7f5;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.map-device-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-device-card__actions a,
.map-device-card__actions button,
.map-layer-options button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  color: #dce2e1 !important;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 740;
  line-height: 1.1;
  text-decoration: none !important;
  cursor: pointer;
}

.map-device-card__actions a:hover,
.map-device-card__actions a:focus,
.map-device-card__actions button:hover,
.map-device-card__actions button:focus,
.map-layer-options button:hover,
.map-layer-options button:focus,
.map-layer-options button.is-active {
  color: #06100c !important;
  background: #0abf78;
  border-color: #0abf78;
  outline: none;
}

.map-panel--compact {
  width: min(360px, calc(100vw - 28px));
}

.map-layer-options,
.map-menu-summary {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.map-menu-summary span {
  color: #8f989b;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.map-menu-summary strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}

.map-device-marker {
  position: relative;
  width: 236px !important;
  height: 76px !important;
  margin: 0 !important;
  background: transparent;
  border: 0;
}

.map-marker-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 50%;
  background: rgba(10,191,120,0.2);
  border: 2px solid rgba(255,255,255,0.95);
  box-shadow: 0 0 0 6px rgba(10,191,120,0.2), 0 10px 28px rgba(0,0,0,0.44);
}

.map-marker-dot span {
  position: absolute;
  inset: 6px;
  display: block;
  border-radius: 50%;
  background: #0abf78;
}

.map-marker-label {
  position: absolute;
  top: -7px;
  left: 34px;
  display: grid;
  gap: 5px;
  width: max-content;
  min-width: 142px;
  max-width: 200px;
  padding: 9px 10px;
  color: #17201f;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(17,24,23,0.12);
  border-radius: 11px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.26);
  backdrop-filter: blur(10px);
}

.map-marker-label::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -7px;
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.96);
  border-left: 1px solid rgba(17,24,23,0.12);
  border-bottom: 1px solid rgba(17,24,23,0.12);
  transform: rotate(45deg);
}

.map-marker-label strong,
.map-marker-label small {
  position: relative;
  z-index: 1;
}

.map-marker-label strong {
  color: #0f1817;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 850;
}

.map-marker-label small {
  display: grid;
  gap: 1px;
  color: #35403f;
  font-size: 10px;
  line-height: 1.25;
}

.map-marker-label b {
  color: #6a7473;
  font-size: 8px;
  line-height: 1.1;
  font-weight: 820;
  text-transform: uppercase;
}

.map-dashboard .leaflet-tooltip.map-device-tooltip {
  padding: 0;
  color: #111817;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.map-dashboard .leaflet-tooltip.map-device-tooltip::before {
  border-top-color: rgba(255,255,255,0.96);
}

.map-always-bubble {
  display: grid;
  gap: 6px;
  min-width: 154px;
  max-width: 220px;
  padding: 11px 12px;
  color: #17201f;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(17,24,23,0.12);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
}

.map-always-bubble strong {
  color: #0f1817;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 850;
}

.map-always-bubble span {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  color: #35403f;
  background: #f1f4f1;
  border: 1px solid rgba(17,24,23,0.08);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.25;
}

.map-always-bubble b {
  color: #6a7473;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 820;
  text-transform: uppercase;
}

.map-dashboard .popup-title {
  margin: 0 0 10px;
  color: #111817;
  font-size: 14px;
  line-height: 1.2;
}

.map-dashboard .popup-meta {
  color: #4e595a;
}

.map-dashboard .leaflet-popup-content {
  width: min(248px, 72vw) !important;
  margin: 16px 18px 15px;
}

.map-dashboard .leaflet-popup-content-wrapper {
  border-radius: 12px;
}

.popup-info-bubbles {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.popup-info-bubbles span {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  color: #34403f;
  background: #f2f5f1;
  border: 1px solid rgba(17,24,23,0.08);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.28;
  word-break: break-word;
}

.popup-info-bubbles strong {
  color: #6a7473;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 820;
  text-transform: uppercase;
}

.map-dashboard .popup-link {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 7px 9px;
  color: #0f3f31 !important;
  background: rgba(10,191,120,0.1);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 820;
}

@media (max-width: 760px) {
  .map-dashboard__bar {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 10px 8px;
    border-bottom: 0;
    background: rgba(5,7,8,0.86);
  }

  .map-dashboard__brand {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .map-dashboard__brand strong {
    font-size: 14px;
  }

  .map-dashboard__brand span:last-child {
    font-size: 11px;
  }

  .map-dashboard__nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .map-nav-button {
    min-width: 0;
    min-height: 32px;
    padding: 7px 6px;
    border: 0;
    border-radius: 7px;
    font-size: 11px;
  }

  .map-dashboard .leaflet-control-zoom {
    margin-top: 98px !important;
  }

  .map-panel,
  .map-panel--compact {
    top: 92px;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: 0 -18px 42px rgba(0,0,0,0.34);
  }

  .map-panel__head {
    padding: 15px 14px 12px;
  }

  .map-panel__head h2 {
    font-size: 22px;
  }

  .map-panel__stats {
    padding: 12px 14px 4px;
  }

  .map-device-list,
  .map-layer-options,
  .map-menu-summary {
    padding: 12px 14px 18px;
  }

  .map-device-card {
    border-radius: 9px;
  }
}

@media (max-width: 420px) {
  .map-dashboard__brand span:last-child {
    display: none;
  }

  .map-nav-button {
    font-size: 10px;
  }

  .map-device-marker {
    width: 188px !important;
    height: 64px !important;
  }

  .map-marker-label {
    left: 32px;
    min-width: 118px;
    max-width: 148px;
    padding: 8px;
  }

  .map-marker-label strong {
    font-size: 12px;
  }

  .map-marker-label small {
    font-size: 9px;
  }

  .map-panel__stats {
    grid-template-columns: 1fr;
  }

  .map-device-card__top,
  .map-device-card__meta div {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-device-card__meta dd {
    text-align: left;
  }

  .map-always-bubble {
    min-width: 132px;
    max-width: 172px;
    padding: 9px;
  }

  .map-always-bubble strong {
    font-size: 12px;
  }

  .map-always-bubble span {
    padding: 5px 7px;
    font-size: 10px;
  }
}

/* Scope full-screen locking to the map dashboard only */
html,
body,
body.esomero-app {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.esomero-app.map-dashboard-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden !important;
  background: #050607 !important;
}

body.esomero-app.map-dashboard-body .esomero-root {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #050607 !important;
}
