﻿:root {
  --blue: #0b87d1;
  --blue-deep: #0a6eb1;
  --navy: #0d1730;
  --navy-2: #111c35;
  --text: #10213f;
  --muted: #46607f;
  --border: #dbe4ef;
  --card: #ffffff;
  --soft: #f4f7fb;
  --shadow: 0 16px 36px rgba(25, 49, 87, 0.12);
  --shadow-strong: 0 14px 28px rgba(15, 38, 74, 0.2);
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

main {
  padding-top: 72px;
}

section,
footer {
  scroll-margin-top: 84px;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: var(--blue);
  box-shadow: 0 6px 24px rgba(12, 58, 101, 0.2);
}

.topbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2px 24px;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.96rem;
}

.brand__logo {
  width: 116px;
  height: auto;
  object-fit: contain;
}

.site-title {
  color: #fff;
  font-weight: 700;
  font-size: clamp(1rem, 1vw + 0.8rem, 1.24rem);
}

.nav {
  justify-self: center;
  display: inline-flex;
  gap: 34px;
  margin-left: 16px;
}

.nav a {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-size: 0.98rem;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 12px;
  background: #fff;
  color: #0c4aee;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 22px 0 0;
  background: linear-gradient(180deg, #eef5fb 0%, #f3f7fb 100%);
}

.hero__badge {
  position: absolute;
  top: 54px;
  left: max(24px, calc((100vw - var(--container)) / 2 + 24px));
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6cff, #204fe8);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(28, 68, 199, 0.25);
}

.hero__media {
  position: relative;
  max-width: 1320px;
  margin: 18px auto 0;
  width: calc(100% - 48px);
}

.hero__poster {
  width: 100%;
  height: auto;
  display: block;
}

.hero__callout,
.hero__checks {
  position: absolute;
  z-index: 3;
}

.hero__callout {
  left: 34px;
  bottom: 110px;
  width: min(480px, 42vw);
  padding: 18px 18px 16px;
  border-radius: 12px;
  background: rgba(175, 231, 214, 0.9);
  color: #fff;
  box-shadow: 0 16px 30px rgba(16, 122, 116, 0.28);
}

.hero__callout p {
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  line-height: 1.7;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(20, 95, 89, 0.18);
}

.hero__checks {
  left: 34px;
  bottom: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
  color: #0a6b61;
  font-size: 0.96rem;
  font-weight: 500;
}

.hero__checks li {
  position: relative;
  padding-left: 30px;
}

.hero__checks li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: -1px;
  width: 18px;
  height: 18px;
  border: 2px solid #1aa28b;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #1aa28b;
  font-size: 0.78rem;
  font-weight: 900;
}

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 88px 24px 96px;
}

.section--soft {
  background: linear-gradient(180deg, #f6f8fc, #fff);
  max-width: none;
}

.section--soft .section__head,
.section--soft .mini-grid,
.section--soft .stats {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.section__head {
  text-align: center;
  margin-bottom: 34px;
}

.section__head h3 {
  margin: 0;
  font-size: clamp(1.9rem, 3.3vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section__head p {
  margin: 14px auto 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 1.02rem;
}

.mini-grid,
.steps,
.stats,
.feature-grid,
.footer__grid {
  display: grid;
  gap: 20px;
}

.mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.mini-card,
.feature-card,
.step,
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.mini-card {
  text-align: center;
  padding: 28px 24px 24px;
}

.mini-card h4,
.step h4,
.feature-card h4 {
  margin: 0 0 10px;
  color: #2452ff;
  font-size: 1.18rem;
}

.mini-card p,
.feature-card p,
.stat span {
  margin: 0;
  color: var(--muted);
}

.steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  margin-top: 18px;
}

.step {
  text-align: center;
  padding: 22px 10px 6px;
  border: none;
  box-shadow: none;
  background: transparent;
}

.step__icon {
  width: 112px;
  height: 112px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--shadow-strong);
}

.step__icon svg,
.feature-card__icon svg {
  width: 44px;
  height: 44px;
}

.step__icon--blue {
  background: #2157f3;
}

.step__icon--teal {
  background: #0ea49a;
}

.step__icon--green {
  background: #0aa06f;
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 56px;
}

.stat {
  text-align: center;
  padding: 24px 16px 20px;
  border-width: 2px;
}

.stat strong {
  display: block;
  margin-bottom: 8px;
  color: #2760ff;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
}

.stat--teal {
  border-color: #10a59e;
}

.stat--teal strong {
  color: #0d9b93;
}

.stat--green {
  border-color: #18ab6c;
}

.stat--green strong {
  color: #0d9f63;
}

.section--features {
  padding-top: 78px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.feature-card {
  padding: 24px 26px 22px;
  border-radius: 10px;
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  background: #dce9ff;
  color: #2452ff;
}

.feature-card p {
  line-height: 1.5;
}

.feature-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: #5c7088;
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
}

.feature-card li::before {
  content: "+ ";
}

.footer {
  background: linear-gradient(180deg, #0f172a, #111d34);
  color: rgba(255, 255, 255, 0.92);
  padding: 70px 24px 56px;
}

.footer__grid {
  max-width: var(--container);
  margin: 0 auto;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer__col {
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer__col h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1.08rem;
}

.footer__col p,
.footer__col span {
  margin: 0;
  color: rgba(227, 236, 250, 0.72);
  line-height: 1.6;
}

.footer__col strong {
  color: #fff;
}

.footer__col a {
  color: #60a5ff;
}

.footer__bottom {
  max-width: var(--container);
  margin: 54px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(227, 236, 250, 0.72);
}

.login-page {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: linear-gradient(180deg, #0d83c8 0%, #1088d0 100%);
}

body.login-view {
  background: linear-gradient(180deg, #0d83c8 0%, #1088d0 100%);
}

body.login-view .login-page {
  display: block;
  position: static;
  min-height: 100vh;
}

.login-page__shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-page__topbar {
  min-height: 58px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  background: rgba(10, 109, 168, 0.95);
  color: #fff;
}

.login-page__back {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}

.login-page__stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 20px 56px;
}

.login-card {
  width: min(450px, 92vw);
  background: #fff;
  border-radius: 18px;
  padding: 38px 42px 40px;
  box-shadow: 0 16px 34px rgba(12, 47, 84, 0.18);
  text-align: center;
}

.login-card__logo {
  width: 150px;
  margin: 0 auto 10px;
  object-fit: contain;
}

.login-card h1 {
  margin: 12px 0 6px;
  font-size: clamp(2rem, 3.6vw, 2.5rem);
  line-height: 1.05;
}

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

.login-form {
  display: grid;
  gap: 16px;
  text-align: left;
}

.field {
  display: grid;
  gap: 10px;
}

.field__label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #22385d;
}

.field__input {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  min-height: 48px;
  border: 1px solid #d6dce7;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.field__input svg {
  width: 20px;
  height: 20px;
  color: #96a3b5;
}

.field__input input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #21314b;
  font: inherit;
  font-size: 0.98rem;
}

.field__input input::placeholder {
  color: #9aa5b8;
}

.field__eye {
  margin-left: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.field__eye:hover {
  color: #0a90df;
}

.field.field--checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.field--checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #0f82cb;
}

.field__checkbox-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #4d5e72;
}

.field-validation-error {
  display: block;
  color: #d0342c;
  font-size: 0.85rem;
  font-weight: 500;
}

.login-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f3b6b2;
  border-radius: 8px;
  background: #fdecea;
  color: #b3261e;
  font-size: 0.9rem;
}

.login-error ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.login-error li {
  margin: 0;
}

.login-error li + li {
  margin-top: 4px;
}

.login-card__button {
  display: block;
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 9px;
  background: linear-gradient(180deg, #0a90df, #0f82cb);
  color: #fff;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(15, 112, 191, 0.25);
}

#login:target {
  display: block;
}

.dashboard-page {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: #f5f7fb;
  overflow: auto;
}

body.dashboard-view {
  background: #f5f7fb;
}

body.dashboard-view .dashboard-page {
  display: block;
  position: static;
  min-height: 100vh;
  overflow: visible;
}

body.dashboard-view main {
  padding-top: 0;
}

body.login-view main {
  padding-top: 0;
}

body.device-management-view {
  background: #f5f7fb;
}

body.device-management-view .dashboard-page {
  display: block;
  position: static;
  min-height: 100vh;
  overflow: visible;
}

body.device-management-view main {
  padding-top: 0;
}

body.user-management-view {
  background: #f5f7fb;
}

body.user-management-view .dashboard-page {
  display: block;
  position: static;
  min-height: 100vh;
  overflow: visible;
}

body.user-management-view main {
  padding-top: 0;
}

body.user-menu-view {
  background: #f5f7fb;
}

body.user-menu-view .dashboard-page {
  display: block;
  position: static;
  min-height: 100vh;
  overflow: visible;
}

body.user-menu-view main {
  padding-top: 0;
}

body.profile-settings-view {
  background: #f5f7fb;
}

body.profile-settings-view .dashboard-page {
  display: block;
  position: static;
  min-height: 100vh;
  overflow: visible;
}

body.profile-settings-view main {
  padding-top: 0;
}

body.device-list-view {
  background: #0b1f34;
}

body.device-list-view .dashboard-page {
  display: block;
  position: static;
  min-height: 100vh;
  overflow: visible;
}

body.device-list-view main {
  padding-top: 0;
}

#dashboard:target {
  display: block;
}

.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, #1790d8, #1187d0);
  box-shadow: 0 4px 18px rgba(12, 58, 101, 0.16);
}

.dashboard-topbar.device-detail-topbar {
  background: linear-gradient(90deg, #2cb3ff 0%, #1aa4ff 12%, #14b7ff 32%, #1b94ff 58%, #1b7fe8 100%);
  box-shadow: 0 16px 32px rgba(4, 63, 116, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 14px 24px;
}

.dashboard-topbar.device-detail-topbar .dashboard-topbar__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.dashboard-topbar.device-detail-topbar .dashboard-brand {
  z-index: 1;
}

.dashboard-topbar.device-detail-topbar .detail-topbar-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 14px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18);
  min-width: 0;
}

.detail-topbar-title__group {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.detail-topbar-title__group span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
}

.detail-topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.95rem;
}

.detail-topbar-title__group strong {
  display: block;
  color: #ffffff;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 900;
}

.detail-topbar-title__divider {
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
}

.dashboard-topbar.device-detail-topbar .dashboard-user {
  justify-self: end;
}

.detail-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.detail-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.detail-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.detail-logo-img {
  width: 140px;
  height: auto;
}

.detail-topbar-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-topbar-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
}

.detail-topbar-id {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.detail-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.detail-btn-outline {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.detail-btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.detail-btn-primary {
  background: rgba(100, 200, 255, 0.25);
  border: 1px solid rgba(100, 200, 255, 0.4);
  color: #fff;
}

.detail-btn-primary:hover {
  background: rgba(100, 200, 255, 0.35);
  border-color: rgba(100, 200, 255, 0.5);
}

.detail-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dashboard-topbar__inner {
  max-width: 100%;
  min-height: 76px;
  padding: 10px 22px 10px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.topbar-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.25rem;
  text-decoration: none;
}

.dashboard-brand img {
  width: 150px;
}

.dashboard-title {
  justify-self: center;
  min-width: min(600px, 58vw);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px 28px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dashboard-title span:nth-child(2) {
  padding: 0 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.dashboard-user {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  position: relative;
}

.dashboard-notifications {
  position: relative;
}

.dashboard-notifications > summary {
  list-style: none;
}

.dashboard-notifications > summary::-webkit-details-marker {
  display: none;
}

.dashboard-bell {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #ffd84a;
  cursor: pointer;
  padding: 0;
}

.dashboard-bell__icon {
  font-size: 1.15rem;
  line-height: 1;
}

.dashboard-bell__dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3f4a;
  box-shadow: 0 0 0 2px #1187d0;
}

.dashboard-notifications__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: -6px;
  width: 230px;
  padding: 12px 14px 14px;
  border-radius: 12px;
  background: #fff;
  color: #1f2b3d;
  box-shadow: 0 14px 30px rgba(10, 24, 42, 0.16);
  border: 1px solid #e7edf5;
  display: grid;
  gap: 8px;
  z-index: 20;
}

.dashboard-notifications__panel strong {
  font-size: 0.95rem;
}

.dashboard-notifications__panel p {
  margin: 0;
  color: #6e7b8d;
  font-size: 0.9rem;
}

.dashboard-notifications__panel a {
  color: #0f84cf;
  font-weight: 700;
  font-size: 0.9rem;
}

.dashboard-notifications:not([open]) .dashboard-notifications__panel {
  display: none;
}

.dashboard-profile-menu {
  position: relative;
}

.dashboard-profile-menu > summary {
  list-style: none;
}

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

.dashboard-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.dashboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #1b82ce;
  font-weight: 800;
  text-transform: lowercase;
}

.dashboard-avatar--small {
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
}

.dashboard-profile__text {
  display: grid;
  line-height: 1.1;
}

.dashboard-profile__text strong {
  font-size: 0.95rem;
}

.dashboard-profile__text span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.9;
}

.dashboard-caret {
  font-size: 0.85rem;
}

.dashboard-profile-menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 230px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(10, 24, 42, 0.16);
  border: 1px solid #e7edf5;
  overflow: hidden;
  z-index: 25;
}

.dashboard-profile-menu__panel strong {
  display: block;
  padding: 14px 16px 4px;
  color: #1f2b3d;
  font-size: 0.95rem;
}

.dashboard-profile-menu__panel p {
  margin: 0;
  padding: 0 16px 12px;
  color: #6e7b8d;
  font-size: 0.9rem;
}

.dashboard-profile-menu__divider {
  height: 1px;
  background: #e8edf4;
}

.dashboard-profile-menu__panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #4d5e72;
  font-weight: 700;
}

.dashboard-profile-menu__panel .logout-link {
  color: #ff2c2c;
}

.logout-form {
  margin: 0;
}

button.logout-link {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.dashboard-profile-menu:not([open]) .dashboard-profile-menu__panel {
  display: none;
}

.dashboard-shell {
  display: block;
  min-height: calc(100vh - 76px);
}

.sidebar {
  position: fixed;
  left: 0;
  top: 76px;
  width: 250px;
  height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  padding: 16px 14px 14px;
  background: #fff;
  border-right: 1px solid #dce5ef;
  box-shadow: 0 0 20px rgba(17, 35, 59, 0.04);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar__section {
  display: grid;
  gap: 10px;
}

.sidebar__section h3 {
  margin: 18px 10px 8px;
  color: #a7b1c1;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  color: #4d5e72;
  font-weight: 600;
}

.sidebar__icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  color: #93a0b5;
}

.sidebar__icon svg {
  width: 20px;
  height: 20px;
}

.sidebar__item.is-active {
  background: #eaf4ff;
  color: #0f84cf;
  box-shadow: inset 0 0 0 1px #b8dcfa, 0 3px 12px rgba(15, 132, 207, 0.08);
}

.sidebar__item.is-active .sidebar__icon {
  color: #0f84cf;
}

.sidebar__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 4px 2px;
  border-top: 1px solid #eef2f7;
}

.sidebar__presence {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sidebar__presence strong {
  display: block;
  font-size: 0.92rem;
}

.sidebar__presence span {
  color: #76869b;
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 700;
}

.sidebar__gear {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #7f8da3;
  background: #f4f7fb;
}

.dashboard-main {
  margin-left: 250px;
  padding: 20px 18px 26px;
  display: grid;
  gap: 22px;
  align-content: start;
  min-width: 0;
}

.device-management-main {
  margin-left: 250px;
  padding: 26px 22px 32px;
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}

.user-management-main {
  margin-left: 250px;
  padding: 26px 22px 32px;
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}

.user-menu-main {
  margin-left: 250px;
  padding: 26px 22px 32px;
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}

.profile-settings-main {
  margin-left: 250px;
  padding: 26px 22px 32px;
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}

.device-list-main {
  margin-left: 250px;
  padding: 22px 18px 28px;
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(23, 144, 216, 0.85) 0%, rgba(17, 135, 208, 0.75) 30%, rgba(11, 31, 52, 0.88) 100%),
    url("../images/solar-bg.jpg") center center / cover no-repeat;
}

.device-list-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.25), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(255, 200, 100, 0.15), transparent 35%);
  pointer-events: none;
}

.device-list-main > * {
  position: relative;
  z-index: 1;
}

body.device-detail-view {
  background: radial-gradient(circle at 10% 18%, rgba(87, 191, 255, 0.14), transparent 16%),
    radial-gradient(circle at 88% 12%, rgba(78, 165, 255, 0.10), transparent 18%),
    #04111f;
}

body.device-detail-view .dashboard-page {
  display: block;
  position: static;
  min-height: 100vh;
  overflow: visible;
}

body.device-detail-view main {
  padding-top: 0;
}

body.device-detail-view .dashboard-topbar {
  background: linear-gradient(90deg, #2cb3ff 0%, #1aa4ff 18%, #149cff 38%, #0e89d6 72%, #0a6db8 100%);
  box-shadow: 0 16px 34px rgba(0, 71, 142, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.device-detail-main {
  margin-left: 250px;
  padding: 28px 26px 32px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: 22px;
  align-content: start;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 20, 44, 0.92) 0%, rgba(6, 11, 24, 0.96) 100%),
    url("../images/solar-bg.jpg") center center / cover no-repeat;
  background-blend-mode: overlay;
}

.device-detail-main > .detail-header {
  grid-column: 1 / -1;
}

.device-detail-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(106, 192, 255, 0.16), transparent 28%),
    radial-gradient(circle at 22% 72%, rgba(255, 255, 255, 0.14), transparent 35%),
    linear-gradient(180deg, rgba(3, 18, 44, 0.24), transparent 35%);
  pointer-events: none;
}

.device-detail-main > * {
  position: relative;
  z-index: 1;
}


.content-two-col {
  display: grid;
  grid-template-columns: 1.6fr 0.95fr;
  gap: 22px;
  align-items: start;
}



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

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: center;
  padding: 0;
}

.detail-header-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.detail-back,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
  font-size: 1.25rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.detail-back:hover,
.back-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.detail-logo-section {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.detail-logo-section img {
  width: 140px;
  height: auto;
  display: block;
}

.detail-header-text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.detail-device-type {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.detail-device-id {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: clamp(1.9rem, 3.3vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.detail-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: end;
  align-items: center;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.btn-outline,
.detail-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-outline:hover, 
.detail-btn-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-solid,
.detail-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 16px;
  border: 1px solid rgba(108, 182, 254, 0.45);
  background: linear-gradient(180deg, #4eb5ff, #0c75c7);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-solid:hover,
.detail-btn-primary:hover {
  background: linear-gradient(180deg, #6dc2ff, #1990ff);
  border-color: rgba(126, 193, 254, 0.65);
}

.btn-icon,
.detail-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease;
}

.btn-icon:hover,
.detail-icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.content-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.95fr);
  gap: 22px;
  align-items: start;
}

.card {
  padding: 24px;
  border-radius: 28px;
  background: rgba(11, 23, 44, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
  color: #eef7ff;
  backdrop-filter: blur(18px);
}

.card-title {
  margin: 0 0 22px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.twin-visual {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto minmax(220px, auto) auto;
  gap: 18px;
  align-items: stretch;
  justify-items: center;
  min-height: 430px;
}

.solar-box {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

.inverter-box {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  min-height: 100%;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.grid-box {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}

.load-box {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

.battery-box {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
}

.twin-box {
  display: grid;
  gap: 14px;
  align-items: center;
  justify-items: center;
  padding: 26px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #eef7ff;
  text-align: center;
  min-height: 160px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.twin-box:hover {
  transform: translateY(-2px);
}

.twin-box img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.twin-box strong {
  font-size: 1.45rem;
  line-height: 1.1;
  color: #ffffff;
}

.twin-box span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.inverter-box .inverter-label {
  width: min(240px, 100%);
  max-width: 240px;
  padding: 24px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.18em;
}

.twin-arrow-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 62%;
  max-width: 360px;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  pointer-events: none;
}

.metrics-6col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
}

.metric {
  display: grid;
  gap: 8px;
  padding: 24px 20px;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.04);
  color: #eef7ff;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.metric:nth-child(3n) {
  border-right: none;
}

.metric:nth-last-child(-n+3) {
  border-bottom: none;
}

.metric strong {
  font-size: 1.7rem;
  color: #ffffff;
  line-height: 1;
}

.metric span {
  display: block;
  color: #8ccaff;
  font-weight: 700;
  font-size: 0.95rem;
}

.metric small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

.eco-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 20px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #eef7ff;
  min-height: 10px;
}

.eco-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.eco-item strong {
  font-size: 2.2rem;
  color: #ffffff;
}

.eco-item span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.small-label {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.detail-subtitle {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1.55;
}

.status-chip {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(131, 206, 255, 0.3);
  background: rgba(73, 155, 232, 0.18);
  color: #cde9ff;
  font-weight: 700;
}

.detail-link,
.primary-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.detail-link {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(95, 164, 236, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #d9efff;
}

.primary-btn {
  min-height: 42px;
  padding: 0 18px;
  background: linear-gradient(180deg, #0f8ed8, #0b6ab1);
  color: #ffffff;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d9efff;
  font-size: 1rem;
}

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

.twin-layout {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 18px;
  align-items: center;
}

.twin-cell {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 22px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eef7ff;
  text-align: center;
  min-height: 170px;
}

.twin-cell img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.twin-cell strong {
  font-size: 1.15rem;
  color: #ffffff;
}

.twin-cell span {
  color: rgba(255, 255, 255, 0.72);
}

.twin-cell--solar {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

.twin-cell--inverter {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  padding: 24px;
  min-height: 260px;
  display: grid;
  place-items: center;
}

.twin-cell--grid {
  grid-column: 3 / 4;
  grid-row: 1 / 2;
}

.twin-cell--load {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

.twin-cell--battery {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}

.twin-arrow {
  position: absolute;
  width: 140px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  z-index: 1;
}

.twin-node span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

.twin-center {
  position: relative;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 24px;
  background: rgba(11, 24, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.inverter-graphic {
  padding: 24px 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  color: #d9efff;
  font-size: 1rem;
  font-weight: 700;
}

.twin-arrow {
  position: absolute;
  width: 160px;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.95;
}

.detail-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(11, 31, 55, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  color: #eef7ff;
}

.detail-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  color: rgba(226, 240, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  font-weight: 700;
}

.twin-status {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
}

.twin-value {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.twin-icon {
  font-size: 1.8rem;
}

.twin-value strong {
  display: block;
  font-size: 1.6rem;
  color: #ffffff;
}

.twin-value span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
}

.twin-center .inverter-graphic {
  min-height: 160px;
  padding: 18px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #d4e4ff;
}

.twin-flow {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(12, 28, 50, 0.6);
  border: 1px solid rgba(88, 169, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.flow-icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(94, 224, 255, 0.14);
  color: #a7f3ff;
  font-size: 1.05rem;
}

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

.metrics-grid--secondary {
  margin-top: 18px;
}

.metrics-grid > div {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metrics-grid strong {
  display: block;
  font-size: 1.8rem;
  color: #ffffff;
}

.metrics-grid span {
  color: #8ccaff;
  font-weight: 700;
}

.metrics-grid small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.small-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.small-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.35rem;
}

.chart-card {
  padding: 18px;
  /* border-radius: 22px; */
  background: rgba(18, 39, 63, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.22);
}

.chart-head {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr minmax(0, auto);
  align-items: center;
  gap: 14px;
  padding-bottom: 6px;
}

.chart-title-wrap {
  display: flex;
  align-items: center;
}

.chart-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chart-tabs {
  display: flex;
  justify-self: end;
  flex-wrap: wrap;
  gap: 8px;
}

.chart-tab {
  border: none;
  padding: 8px 12px;
  min-width: 64px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #cde9ff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.chart-tab.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.chart-actions {
  margin-top: 0;
  justify-self: center;
  display: flex;
  gap: 10px;
  align-items: center;
}

.icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.95rem;
  cursor: pointer;
}

.chart-date {
  padding: 8px 14px;
  min-width: 150px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d3e9ff;
  font-size: 0.85rem;
  font-weight: 600;
}

.chart-plot {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-grid {
  position: relative;
  min-height: 220px;
}

.chart-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 100% 36px, 36px 100%;
  pointer-events: none;
}

.chart-line {
  position: absolute;
  left: 8%;
  bottom: 16px;
  width: 84%;
  height: 1.5px;
  border-radius: 10px;
  background: rgba(99, 211, 255, 0.65);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.16);
}

.chart-series {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 16px;
  top: 12px;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  pointer-events: none;
}

.chart-point {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 8px;
  background: rgba(96, 165, 250, 0.95);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.24);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
}

.chart-labels {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 8px;
  color: rgba(255, 255, 255, 0.55);
}

.summary-cards {
  margin-top: 18px;
  padding-top: 6px;
}

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

.detail-cards {
  margin-top: 18px;
  padding-top: 4px;
}

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

.detail-card {
  padding: 16px;
  min-height: 240px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 12px;
}

.detail-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.detail-card--info .detail-card__header {
  justify-content: flex-start;
}

.detail-card__header h3 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}
j
.detail-card__badge {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
}

.detail-card__icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.95rem;
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.92);
}

.detail-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.18);
  color: #fb7185;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.detail-info {
  display: grid;
  gap: 10px;
}
 
.detail-info div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.detail-info dt {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.detail-info dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  text-align: right;
}

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

.summary-cards .summary-card {
  padding: 14px 14px 16px;
  min-height: 160px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 8px;
}

.summary-cards .summary-card__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.summary-cards .summary-card dl {
  display: grid;
  gap: 8px;
}

.summary-cards .summary-card dl > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.summary-cards .summary-card dt {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.64);
  text-transform: none;
  letter-spacing: 0.06em;
}

.summary-cards .summary-card dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  text-align: right;
}

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

@media (max-width: 1024px) {
  .summary-cards .summary-card {
    min-height: 150px;
  }
}

@media (max-width: 760px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

.summary-cards .summary-card {
  position: relative;
}

.summary-cards .summary-card::before {
  content: attr(data-timestamp);
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}
  
.chart-date {
  padding: 0 18px;
  min-width: 180px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d3e9ff;
  font-size: 0.95rem;
  font-weight: 700;
}

.chart-series {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  top: 0;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  align-items: flex-end;
  gap: 12px;
  padding: 0 12px;
  pointer-events: none;
}

.chart-point {
  display: block;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.96), rgba(34, 211, 238, 0.95));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.24);
}

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

.stat-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(18, 39, 63, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.24);
  color: #eef7ff;
}

.stat-card h3 {
  margin: 0 0 18px;
  color: #d2e7ff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card dl {
  display: grid;
  gap: 14px;
}

.stat-card dt {
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.stat-card dd {
  margin: 0;
  color: #ffffff;
  font-weight: 700;
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: 18px;
}

.fault-card,
.detail-info-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.2);
}

.fault-card .detail-card__heading {
  margin-bottom: 18px;
}

.fault-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  background: #ff7c7c;
  color: #ffffff;
  font-weight: 700;
  padding: 0 14px;
}

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

.fault-list li {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(14, 26, 43, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.info-card dl {
  display: grid;
  gap: 12px;
}

.info-card dt {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.info-card dd {
  margin: 0;
  color: #ffffff;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .detail-grid,
  .stats-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .chart-labels {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .sidebar {
    width: 220px;
  }

  .dashboard-main,
  .device-management-main,
  .user-management-main,
  .user-menu-main,
  .profile-settings-main,
  .device-list-main,
  .device-detail-main {
    margin-left: 220px;
  }

  .dashboard-title {
    min-width: 0;
    padding: 10px 14px;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
  }

  .dashboard-profile__text {
    display: none;
  }
}

@media (max-width: 720px) {
  .dashboard-topbar__inner {
    grid-template-columns: 1fr auto;
  }

  .dashboard-title,
  .dashboard-user {
    display: none;
  }

  .sidebar {
    display: none;
  }

  .device-detail-main {
    margin-left: 0;
    padding: 16px 14px 20px;
  }

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

  .detail-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .small-metrics,
  .detail-grid,
  .stats-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .chart-labels {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.device-fleet-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0 0;
  color: #eef6ff;
}

.device-fleet-hero h1 {
  margin: 0 0 8px;
  color: #fffffffa;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.device-fleet-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.651);
  font-size: 1.05rem;
  font-weight: 500;
}

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

.fleet-stat {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px;
  border-radius: 16px;
  background: rgba(30, 45, 65, 0.78);
  border: 1px solid rgba(146, 171, 205, 0.2);
  color: #eff5ff;
  box-shadow: 0 12px 24px rgba(5, 14, 28, 0.25);
  backdrop-filter: blur(12px);
}

.fleet-stat strong {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 100;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.fleet-stat b {
  display: block;
  margin-top: 2px;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #ffffff;
}

.fleet-stat__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  flex: 0 0 56px;
}

.fleet-stat__icon--total {
  background: rgba(58, 113, 255, 0.16);
  color: #76b7ff;
  border: 1px solid rgba(87, 146, 255, 0.2);
}

.fleet-stat__icon--online {
  background: rgba(50, 176, 114, 0.16);
  color: #54e085;
  border: 1px solid rgba(54, 194, 123, 0.2);
}

.fleet-stat__icon--offline {
  background: rgba(255, 106, 106, 0.16);
  color: #ff8383;
  border: 1px solid rgba(255, 102, 102, 0.22);
}

.fleet-stat__badge {
  margin-left: auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
}

.fleet-stat__badge--online {
  color: #58e089;
  background: rgba(52, 164, 103, 0.16);
}

.fleet-stat__badge--offline {
  color: #ff8a8a;
  background: rgba(177, 72, 72, 0.16);
}

.fleet-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(40, 55, 75, 0.75);
  border: 1px solid rgba(153, 175, 203, 0.2);
  box-shadow: 0 12px 24px rgba(5, 14, 28, 0.25);
  backdrop-filter: blur(12px);
}

.fleet-search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(157, 176, 204, 0.25);
  background: rgba(53, 66, 89, 0.7);
}

.fleet-search__icon {
  width: 18px;
  height: 18px;
  color: rgba(214, 227, 244, 0.7);
  flex: 0 0 18px;
}

.fleet-search__icon svg {
  width: 18px;
  height: 18px;
}

.fleet-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  color: #ffffff;
  font-size: 0.95rem;
}

.fleet-search input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

.fleet-pills {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.fleet-pill {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(235, 244, 255, 0.85);
  background: rgba(66, 77, 98, 0.75);
  border: 1px solid rgba(160, 177, 204, 0.2);
  font-weight: 700;
  font-size: 0.92rem;
}

.fleet-pill.is-active {
  color: #dceeff;
  background: rgba(55, 116, 245, 0.34);
  border-color: rgba(107, 171, 255, 0.38);
}

.fleet-sort select {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(160, 177, 204, 0.2);
  background: rgba(66, 77, 98, 0.75);
  color: #ebf4ff;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  outline: none;
}

.fleet-refresh {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 10px;
  color: #dff1ff;
  background: rgba(84, 94, 116, 0.75);
  border: 1px solid rgba(160, 177, 204, 0.2);
  font-weight: 700;
  font-size: 0.92rem;
}

.fleet-table-card {
  border-radius: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(24, 39, 61, 0.76);
  border: 1px solid rgba(157, 176, 204, 0.12);
  box-shadow: 0 18px 28px rgba(5, 14, 28, 0.22);
  backdrop-filter: blur(12px);
}

.fleet-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  color: #e8f0fb;
  font-size: 0.95rem;
}

.fleet-table thead th {
  padding: 18px 20px;
  color: rgba(223, 233, 247, 0.65);
  text-align: left;
  font-size: 0.60rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 1px solid rgba(157, 176, 204, 0.18);
}

.fleet-table tbody td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(157, 176, 204, 0.12);
  vertical-align: middle;
}

.fleet-table tbody tr:hover {
  background: rgba(72, 92, 126, 0.16);
}

.fleet-device {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.fleet-device__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 106, 106, 0.08);
  border: 1px solid rgba(255, 118, 118, 0.22);
  color: #ff8080;
  font-size: 1rem;
  flex: 0 0 40px;
}

.fleet-device strong {
  display: block;
  color: #ffffff;
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.fleet-device span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  font-weight: 500;
}

.fleet-imei {
  color: #ffd84a;
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.fleet-status {
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  gap: 7px;
  height: 32px;
  line-height: 1;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 400;
}

.fleet-status__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.fleet-status--offline {
  color: #ff8d8d;
  background: rgba(255, 104, 104, 0.12);
  border: 1px solid rgba(255, 128, 128, 0.18);
}

.fleet-status--online {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.22);
}

.fleet-empty {
  text-align: center;
  padding: 32px 20px !important;
  color: rgba(255, 255, 255, 0.6);
}

.fleet-view-btn {
  min-height: 38px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #9fd0ff;
  border: 1px solid rgba(79, 148, 223, 0.5);
  background: rgba(38, 70, 112, 0.35);
  font-weight: 700;
  font-size: 0.92rem;
}

.fleet-view-btn--icon {
  min-height: 38px;
  min-width: 38px;
  padding: 0;
}

.device-management-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 8px;
}

.device-management-hero h1 {
  margin: 0 0 10px;
  color: #184d89;
  font-size: clamp(2rem, 2.6vw, 3rem);
  line-height: 1.05;
}

.device-management-hero p {
  margin: 0;
  color: #66778d;
  font-size: 1.02rem;
}

.device-management-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dm-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(18, 42, 70, 0.08);
}

.dm-btn--secondary {
  background: #fff;
  color: #546177;
  border: 1px solid #d9dee7;
}

.dm-btn--primary {
  background: linear-gradient(180deg, #3989e4, #3781dc);
  color: #fff;
}

.device-search-card {
  background: #fff;
  border: 1px solid #d7d2c4;
  border-radius: 16px;
  padding: 18px 24px;
  box-shadow: 0 4px 16px rgba(31, 43, 61, 0.08);
}

.user-search-card {
  background: #fff;
  border: 1px solid #d7d2c4;
  border-radius: 16px;
  padding: 18px 24px;
  box-shadow: 0 4px 16px rgba(31, 43, 61, 0.08);
}

.device-search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d9d2c3;
  border-radius: 6px;
  background: #fff;
}

.device-search__icon {
  width: 18px;
  height: 18px;
  color: #9aa5b5;
  flex: 0 0 18px;
}

.device-search__icon svg {
  width: 18px;
  height: 18px;
}

.device-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  color: #21314b;
}

.device-search input::placeholder {
  color: #9aa5b5;
}

.device-table-card {
  background: #fff;
  border: 1px solid #d7dce4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(31, 43, 61, 0.08);
}

.user-table-card {
  background: #fff;
  border: 1px solid #d7dce4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(31, 43, 61, 0.08);
}

.device-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

  .relay-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
  }

  .device-table thead th,
  .relay-table thead th {
    padding: 14px 16px;
    text-align: left;
    color: #7a8798;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    background: #f8fafc;
    border-bottom: 1px solid #e6ebf1;
    white-space: nowrap;
}

.device-table tbody td,
  .relay-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e6ebf1;
    color: #42526a;
    vertical-align: middle;
  }

  .device-table tbody tr:hover,
  .relay-table tbody tr:hover {
  background: #fbfdff;
}

.device-table__check {
  width: 42px;
}

.device-table__actions {
  width: 110px;
}

/* Grid CPU meter data (Areas/Admin/MeterDataGridCPU) */

body.meter-data-view {
  background: #f5f7fb;
}

body.meter-data-view .dashboard-page {
  display: block;
  position: static;
  min-height: 100vh;
  overflow: visible;
}

body.meter-data-view main {
  padding-top: 0;
}

.meter-data-main {
  margin-left: 250px;
  padding: 26px 22px 32px;
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}

.meter-data-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 8px;
}

.meter-data-hero h1 {
  margin: 0 0 10px;
  color: #184d89;
  font-size: clamp(2rem, 2.6vw, 3rem);
  line-height: 1.05;
}

.meter-data-hero p {
  margin: 0;
  color: #66778d;
  font-size: 1.02rem;
}

.meter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
}

.meter-toolbar__field {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.meter-toolbar__field span {
  font-size: 0.85rem;
  font-weight: 700;
  color: #546177;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meter-select,
.meter-input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d9d2c3;
  border-radius: 6px;
  background: #fff;
  color: #21314b;
  font: inherit;
}

.meter-search-btn {
  align-self: flex-end;
}

.meter-toolbar__status {
  display: grid;
  gap: 8px;
}

.meter-toolbar__status span {
  font-size: 0.85rem;
  font-weight: 700;
  color: #546177;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meter-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  width: fit-content;
}

.meter-status--on {
  color: #16996f;
  background: #e6fff4;
}

.meter-status--off {
  color: #c0392b;
  background: #fdecea;
}

.meter-status--unknown {
  color: #7a8798;
  background: #eef1f5;
}

.meter-toolbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.dm-btn--success {
  background: linear-gradient(180deg, #2fb673, #26a065);
  color: #fff;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.dm-btn--danger {
  background: linear-gradient(180deg, #e5605a, #d94a44);
  color: #fff;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.add-device-view .device-form-card {
  margin: 32px auto;
  max-width: 1180px;
  padding: 40px 44px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.add-device-view .device-form-card__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 24px;
}

.add-device-view .device-form-card__eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.add-device-view .device-form-card h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.add-device-view .device-form-card p {
  margin: 0;
  color: var(--muted);
}

.add-device-view .device-form {
  display: grid;
  gap: 20px;
}

.add-device-view .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}

.add-device-view .field {
  display: grid;
  gap: 10px;
}

.add-device-view .field span {
  font-size: 1.05rem;
  font-weight: 600;
  color: #22415f;
}

.add-device-view .field input {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--text);
  background: #fbfdff;
}

.add-device-view .field input:focus {
  outline: 2px solid rgba(11, 135, 209, 0.18);
  border-color: var(--blue);
}

.field-required {
  color: #d0342c;
  font-style: normal;
  margin-left: 2px;
}

.add-device-view .form-actions {
  display: flex;
  justify-content: flex-end;
}

.add-device-view .dm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
}

.add-device-view .dm-btn--primary {
  background: linear-gradient(90deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 10px 20px rgba(11, 135, 209, 0.2);
}

.add-device-view .dm-btn--secondary {
  background: #eef4fb;
  color: var(--text);
}

.add-device-view .field--span2 {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .add-device-view .device-form-card {
    padding: 22px;
  }

  .add-device-view .device-form-card__header {
    flex-direction: column;
  }

  .add-device-view .form-grid {
    grid-template-columns: 1fr;
  }

  .add-device-view .field--span2 {
    grid-column: 1;
  }
}

/* Live user autosearch box (Add/Edit Device "Assigned User" field). Generic/unscoped so it can be reused
   anywhere a type-ahead-into-a-hidden-id pattern is needed. */
.user-search-box {
  position: relative;
}

.user-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
  z-index: 20;
}

.user-search-results[hidden] {
  display: none;
}

.user-search-result-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #eef1f5;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.user-search-result-item:last-child {
  border-bottom: 0;
}

.user-search-result-item:hover,
.user-search-result-item:focus {
  background: #eef4fb;
}

.user-search-result-item strong {
  display: block;
  font-size: 0.95rem;
}

.user-search-result-item span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.user-search-empty {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Add/Edit User forms (Admin/UserManagement) reuse the same card/grid/field layout as add-device-view. */

.user-form-view .device-form-card {
  margin: 32px auto;
  max-width: 1180px;
  padding: 40px 44px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.user-form-view .device-form-card__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 24px;
}

.user-form-view .device-form-card__eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.user-form-view .device-form-card h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.user-form-view .device-form-card p {
  margin: 0;
  color: var(--muted);
}

.user-form-view .device-form {
  display: grid;
  gap: 20px;
}

.user-form-view .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}

.user-form-view .field {
  display: grid;
  gap: 10px;
}

.user-form-view .field span {
  font-size: 1.05rem;
  font-weight: 600;
  color: #22415f;
}

.user-form-view .field input {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--text);
  background: #fbfdff;
}

.user-form-view .field input:focus {
  outline: 2px solid rgba(11, 135, 209, 0.18);
  border-color: var(--blue);
}

.user-form-view .field input:disabled {
  color: var(--muted);
  background: #eef1f5;
  cursor: not-allowed;
}

.user-form-view .form-actions {
  display: flex;
  justify-content: flex-end;
}

.user-form-view .dm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
}

.user-form-view .dm-btn--primary {
  background: linear-gradient(90deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 10px 20px rgba(11, 135, 209, 0.2);
}

.user-form-view .dm-btn--secondary {
  background: #eef4fb;
  color: var(--text);
}

@media (max-width: 760px) {
  .user-form-view .device-form-card {
    padding: 22px;
  }

  .user-form-view .device-form-card__header {
    flex-direction: column;
  }

  .user-form-view .form-grid {
    grid-template-columns: 1fr;
  }
}

.meter-history-card {
  overflow: hidden;
}

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

.relay-table tbody td {
  white-space: nowrap;
}

.meter-empty-state {
  margin: 0;
  padding: 32px 20px;
  text-align: center;
  color: #8b96a8;
  font-size: 0.95rem;
}

.meter-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid #e6ebf1;
}

.meter-pagination__info {
  color: #7a8798;
  font-size: 0.85rem;
  white-space: nowrap;
}

.meter-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #d9dee7;
  background: #fff;
  color: #3781dc;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.meter-page-btn:hover:not(:disabled) {
  background: #eef8ff;
}

.meter-page-btn:disabled {
  color: #b7c0cc;
  border-color: #e6ebf1;
  cursor: not-allowed;
}

/* Shared lightweight confirm modal + toast, used instead of native confirm()/alert() popups. */

.app-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  padding: 16px;
}

.app-modal-overlay[hidden] {
  display: none;
}

.app-modal {
  width: min(380px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 26px 24px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.app-modal h3 {
  margin: 0 0 10px;
  color: #184d89;
  font-size: 1.15rem;
}

.app-modal p {
  margin: 0 0 22px;
  color: #546177;
  font-size: 0.95rem;
  line-height: 1.4;
}

.app-modal__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.app-modal__actions .dm-btn {
  cursor: pointer;
  border: none;
  font: inherit;
}

.app-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  display: grid;
  gap: 10px;
  z-index: 4100;
  max-width: min(340px, calc(100vw - 32px));
}

.app-toast {
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  animation: app-toast-in 0.18s ease-out;
}

.app-toast--success {
  background: #26a065;
}

.app-toast--error {
  background: #d94a44;
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.device-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2f8aec;
}

.device-name {
  color: #0757b8;
  font-weight: 700;
}

.mono {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  color: #42526a;
}

.device-owner-sub {
  font-size: 0.8rem;
  color: #8593a6;
  font-weight: 400;
}

  .relay-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 92px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #f5f7fb;
    color: #556176;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  }

  .relay-switch__track {
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #d7e4f5;
    flex-shrink: 0;
    transition: background 0.2s ease;
  }

  .relay-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .relay-switch__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
  }

  .relay-switch--on {
    border-color: #a8dec7;
    background: #e6fbef;
    color: #0f7b4d;
  }

  .relay-switch--on .relay-switch__track {
    background: #96dfb8;
  }

  .relay-switch--on .relay-switch__thumb {
    transform: translateX(16px);
    background: #fff;
  }

  .relay-switch--off {
    border-color: #f0c8c3;
    background: #fff2f1;
    color: #b24241;
  }

  .relay-switch--off .relay-switch__track {
    background: #f7cdd0;
  }

  .relay-switch--off .relay-switch__thumb {
    transform: translateX(0);
    background: #fff;
  }
}

/* Device Management's relay control - unlike relay-switch (a plain two-state toggle used for
   user active/inactive), this is two fixed action buttons (ON / OFF), not a single toggle: the
   ON icon is always green and OFF always red, and whichever one matches the device's current
   RelayStatus ("ON"/"OFF"/"NA") gets a filled pill background via .relay-toggle--on/off below.
   Clicking a button always requests that exact command (never "the opposite of current state"),
   so the confirm dialog fires the same way regardless of current state. */
.relay-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.relay-toggle__zone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

/* Scoped like .row-actions__group .relay-switch below - .row-actions button (class + type
   selector) otherwise wins the specificity fight and forces border:0/background:transparent,
   flattening the idle pill look whenever a zone isn't the currently-active ON/OFF state. */
.row-actions__group .relay-toggle__zone {
  border: 1px solid var(--border);
  background: #f5f7fb;
  color: #556176;
}

/* The ON/OFF icons stay green/red at rest (not just once engaged) so the two buttons read
   correctly at a glance - background/border only fill in once that side is the active state
   (see .relay-toggle--on/off .relay-toggle__zone--on/off below, which win on specificity). */
.row-actions__group .relay-toggle__zone--on {
  color: #0f7b4d;
}

.row-actions__group .relay-toggle__zone--off {
  color: #b24241;
}

.relay-toggle--on .relay-toggle__zone--on {
  border-color: #a8dec7;
  background: #e6fbef;
  color: #0f7b4d;
}

.relay-toggle--off .relay-toggle__zone--off {
  border-color: #f0c8c3;
  background: #fff2f1;
  color: #b24241;
}

/* Lightweight hover/focus tooltip - the app has no existing tooltip component (relies on
   aria-label alone), so this is opt-in via data-tooltip and doesn't affect anything else.
   Positioned above the element; .table-scroll only clips horizontally (overflow-x: auto), so
   this stays visible for row-action buttons. */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after,
[data-tooltip]::before {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  position: absolute;
  left: 50%;
  z-index: 20;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  bottom: calc(100% + 9px);
  transform: translate(-50%, 4px);
  background: #1f2937;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

[data-tooltip]::before {
  content: '';
  bottom: 100%;
  transform: translate(-50%, 4px);
  border: 5px solid transparent;
  border-top-color: #1f2937;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::after,
[data-tooltip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.row-actions button,
.row-actions a {
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

/* Edit (a) and Delete (button.row-actions__delete) icons specifically - excludes the
   relay-switch toggle button, which already sizes itself. */
.row-actions a,
.row-actions__delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  font-size: 1.3rem;
  line-height: 1;
}

.row-actions__delete {
  color: #e03b3b;
}

.row-actions button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.row-actions {
  white-space: nowrap;
}

.row-actions__group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.row-actions__group .relay-switch {
  min-width: 76px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

/* User Management's activate/deactivate switch uses the app's theme blue instead of the
   green/red used by the device relay switch elsewhere - active/inactive isn't an on/off relay. */
.row-actions__group .relay-switch--on {
  border-color: rgba(11, 135, 209, 0.35);
  background: rgba(11, 135, 209, 0.12);
  color: var(--blue-deep);
}

.row-actions__group .relay-switch--on .relay-switch__track {
  background: var(--blue);
}

.row-actions__group .relay-switch--off {
  border-color: var(--border);
  background: #f5f7fb;
  color: var(--muted);
}

.row-actions__group .relay-switch--off .relay-switch__track {
  background: #d7e4f5;
}

.user-management-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 8px;
}

.user-management-hero h1 {
  margin: 0 0 10px;
  color: #184d89;
  font-size: clamp(2rem, 2.6vw, 3rem);
  line-height: 1.05;
}

.user-management-hero p {
  margin: 0;
  color: #66778d;
  font-size: 1.02rem;
}

.settings-header {
  padding-top: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dfe5ee;
}

.settings-header h1 {
  margin: 0 0 10px;
  color: #184d89;
  font-size: clamp(2rem, 2.6vw, 3rem);
  line-height: 1.05;
}

.settings-header p {
  margin: 0;
  color: #66778d;
  font-size: 1.02rem;
}

.settings-card {
  background: #fff;
  border: 1px solid #d7dce4;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(31, 43, 61, 0.08);
  overflow: hidden;
}

.settings-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #e8edf4;
}

.settings-card__head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.settings-card__head--warn {
  color: #ff6b22;
}

.settings-icon {
  color: #0f84cf;
  font-size: 1.05rem;
}

.settings-icon--warn {
  color: #ff6b22;
}

.settings-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 20px 10px;
}

.settings-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px dashed #87cff9;
  display: grid;
  place-items: center;
  background: #eaf4ff;
  color: #0f84cf;
  font-size: 2.3rem;
  font-weight: 800;
}

.settings-profile__copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.settings-profile__copy p {
  margin: 0;
  color: #66778d;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 14px 20px 0;
}

.settings-field {
  display: grid;
  gap: 8px;
}

.settings-field span {
  color: #2d3d55;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.settings-field input {
  height: 42px;
  padding: 0 14px;
  border: 1px solid #cfd8e4;
  border-radius: 8px;
  font: inherit;
  color: #243246;
  outline: none;
  background: #fff;
}

.settings-field small {
  color: #6c7a8e;
  font-size: 0.82rem;
}

.settings-field--full {
  padding: 14px 20px 0;
}

.settings-field--full input {
  width: 100%;
}

.settings-actions {
  padding: 18px 20px 20px;
  display: flex;
  justify-content: flex-end;
}

.settings-actions--right {
  justify-content: flex-end;
}

.save-btn,
.change-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 8px;
  background: #0f84cf;
  color: #fff;
  font-weight: 700;
}

.settings-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cfd8e4;
  border-radius: 8px;
  background: #fff;
}

.settings-input input {
  flex: 1;
  border: 0;
  padding: 0;
  height: auto;
}

.settings-input span {
  color: #9aa5b5;
}

.settings-input__toggle {
  cursor: pointer;
  user-select: none;
}

.settings-stack {
  display: grid;
}

.settings-stack .settings-field {
  padding-top: 14px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.user-table thead th {
  padding: 14px 16px;
  background: #f3f6fb;
  color: #2d3d55;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid #cfd8e4;
}

.user-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #e6ebf1;
  color: #42526a;
  vertical-align: middle;
}

.user-table tbody tr:hover {
  background: #fbfdff;
}

.user-table__check {
  width: 42px;
}

.user-table__actions {
  width: 190px;
}

.user-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2f8aec;
}

.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.user-initial {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #dbe8fb;
  color: #0f84cf;
  font-weight: 800;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.role-badge--admin {
  background: #fff1f1;
  color: #e03b3b;
  border-color: #f7c1c1;
}

.role-badge--operator {
  background: #eef5ff;
  color: #0f5fc8;
  border-color: #bdd4ff;
}

.password-dots {
  letter-spacing: 0.18em;
  color: #8593a6;
  font-size: 0.8rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-badge--active {
  background: #eafaf1;
  color: #1c8a52;
  border-color: #bfe9d3;
}

.status-badge--inactive {
  background: #f4f5f7;
  color: #6b7686;
  border-color: #dde1e7;
}

.status-badge--unknown {
  background: #eef1f5;
  color: #7a8798;
  border-color: #dde1e7;
}

.user-table-foot {
  padding: 14px 16px 16px;
  color: #96a3b5;
  font-size: 0.9rem;
}

.summary-card,
.metric-card,
.telemetry-panel,
.info-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(20, 42, 72, 0.08);
}

.summary-card {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.summary-card h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
}

.summary-card p {
  margin: 0;
  color: #738199;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e6f4ff;
  color: #0f84cf;
  font-weight: 700;
}

.timestamp {
  color: #9a9fa8;
}

.refresh-btn,
.view-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  background: #eef8ff;
  color: #0f84cf;
  border: 1px solid #cde7fa;
  font-weight: 700;
  white-space: nowrap;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: stretch;
}

.metric-card {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eaf4ff;
  font-size: 1.05rem;
}

.metric-card strong {
  display: block;
  color: #7a8798;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card b {
  display: block;
  margin-top: 4px;
  font-size: 1.6rem;
}

.view-all-btn {
  align-self: center;
}

.telemetry-panel {
  width: min(820px, 100%);
  justify-self: center;
  padding: 0;
  overflow: hidden;
}

.telemetry-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #e8edf4;
}

.telemetry-panel__head h2 {
  margin: 0 0 6px;
  font-size: 1.22rem;
}

.telemetry-panel__head p {
  margin: 0;
  color: #7d8a9a;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.telemetry-badge {
  padding: 8px 12px;
  border-radius: 10px;
  background: #e6fff4;
  color: #16996f;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.telemetry-list {
  max-height: 430px;
  overflow: auto;
  padding: 8px 2px 8px 20px;
}

.telemetry-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 18px 20px 0;
  border-bottom: 1px solid #edf1f6;
}

.telemetry-item:last-child {
  border-bottom: 0;
}

.telemetry-item h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.telemetry-item p {
  margin: 0 0 6px;
  color: #4f5d70;
  font-weight: 600;
}

.telemetry-item small {
  color: #9aa5b5;
}

.telemetry-item time {
  color: #8e97a6;
  font-weight: 700;
  white-space: nowrap;
  margin-top: 10px;
}

.dashboard-footer-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(820px, 100%);
  justify-self: center;
}

.info-card {
  padding: 18px 20px;
}

.info-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.info-card p {
  margin: 0;
  color: #66778d;
}

@media (max-width: 1180px) {
  .topbar__inner {
    grid-template-columns: auto 1fr auto;
  }

  .site-title,
  .nav {
    display: none;
  }

  .hero__badge {
    left: 24px;
  }

  .brand__logo {
    width: 112px;
  }
}

@media (max-width: 980px) {
  .mini-grid,
  .steps,
  .stats,
  .feature-grid,
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    min-height: 720px;
  }

  .hero__callout {
    width: min(500px, 52vw);
  }

  .dashboard-title {
    min-width: min(520px, 52vw);
  }

  .telemetry-panel,
  .dashboard-footer-cards {
    width: min(720px, 100%);
  }

  .device-management-main {
    margin-left: 250px;
  }

  .user-management-main {
    margin-left: 250px;
  }

  .profile-settings-main {
    margin-left: 250px;
  }

  .device-list-main {
    margin-left: 250px;
  }

  .device-management-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-management-hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 720px) {
  main {
    padding-top: 66px;
  }

  .topbar__inner {
    grid-template-columns: 1fr auto;
    gap: 14px;
  }

  .dashboard-topbar__inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .dashboard-brand img {
    width: 110px;
  }

  .dashboard-title {
    display: none;
  }

  .dashboard-user {
    gap: 8px;
  }

  .dashboard-profile__text {
    display: none;
  }

  .dashboard-notifications__panel,
  .dashboard-profile-menu__panel {
    right: -8px;
  }

  .brand__text {
    display: none;
  }

  .login-btn {
    padding: 11px 16px;
  }

  .brand__logo {
    width: 100px;
  }

  .hero {
    padding-top: 18px;
  }

  .hero__badge {
    top: 18px;
    font-size: 0.84rem;
    padding: 10px 14px;
  }

  .hero__heading {
    padding-top: 58px;
  }

  .hero__media {
    margin-top: 18px;
  }

  .hero__callout {
    left: 16px;
    bottom: 96px;
    width: calc(100% - 32px);
  }

  .hero__checks {
    left: 18px;
    bottom: 22px;
  }

  .section {
    padding: 68px 18px 76px;
  }

  .mini-grid,
  .steps,
  .stats,
  .feature-grid,
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .step__icon {
    width: 92px;
    height: 92px;
  }

  .footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .login-page__topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .login-card {
    padding: 30px 22px 32px;
  }

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

  .dashboard-title,
  .dashboard-user {
    display: none;
  }

  .sidebar {
    display: none;
  }

  .dashboard-main {
    margin-left: 0;
    padding: 16px 14px 20px;
  }

  .device-management-main {
    margin-left: 0;
    padding: 16px 14px 20px;
  }

  .add-device-view .device-form-card {
    margin: 8px 0 0;
    padding: 18px;
  }

  .add-device-view .device-form-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .add-device-view .form-grid {
    grid-template-columns: 1fr;
  }

  .add-device-view .form-actions .dm-btn {
    width: 100%;
    justify-content: center;
  }

  .user-management-main {
    margin-left: 0;
    padding: 16px 14px 20px;
  }

  .profile-settings-main {
    margin-left: 0;
    padding: 16px 14px 20px;
  }

  .device-list-main {
    margin-left: 0;
    padding: 16px 14px 20px;
  }

  .summary-card,
  .metric-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .summary-card {
    justify-content: stretch;
  }

  .metric-row {
    gap: 12px;
  }

  .view-all-btn {
    justify-self: start;
  }

  .telemetry-panel,
  .dashboard-footer-cards {
    width: 100%;
  }

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

  .telemetry-item {
    flex-direction: column;
  }

  .device-management-actions {
    width: 100%;
  }

  .device-management-hero {
    gap: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

  .user-management-hero {
    gap: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

  .device-management-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .dm-btn {
    width: 100%;
    justify-content: center;
  }

  .device-table {
    min-width: 920px;
  }

  .device-table-card {
    overflow-x: auto;
  }

  .user-table {
    min-width: 920px;
  }

  .user-table-card {
    overflow-x: auto;
  }

  .settings-profile {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-actions {
    justify-content: stretch;
  }

  .save-btn,
  .change-btn {
    width: 100%;
    justify-content: center;
  }

  .device-fleet-hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .fleet-toolbar {
    grid-template-columns: 1fr;
  }

  .fleet-pills {
    flex-wrap: wrap;
  }

  .fleet-sort select,
  .fleet-refresh {
    width: 100%;
    justify-content: center;
  }

  .fleet-table {
    min-width: 720px;
  }

  .fleet-table-card {
    overflow-x: auto;
  }

  .fleet-view-btn:not(.fleet-view-btn--icon) {
    min-width: 100px;
  }

  .device-search-card,
  .user-search-card {
    padding: 14px 16px;
  }

  .device-search {
    min-height: 44px;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 16px;
  }

  .hero__callout {
    bottom: 92px;
    padding: 14px 14px 12px;
  }

  .hero__checks {
    font-size: 0.9rem;
  }
}
