:root {
  --xj-shell: 520px;
  --xj-primary: #206bc4;
  --xj-primary-dark: #1556a6;
  --xj-bg: #eef4fb;
  --xj-hero: linear-gradient(135deg, var(--xj-primary), var(--xj-primary-dark));
  --xj-soft: rgba(32, 107, 196, 0.09);
}

* {
  box-sizing: border-box;
}

body.xj-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 90% 0%, rgba(32, 107, 196, 0.22), transparent 32%),
    linear-gradient(180deg, #f8fbfb 0%, var(--xj-bg) 100%);
  color: var(--tblr-body-color);
}

a {
  text-decoration: none;
}

body.xj-body a,
body.xj-body a:hover,
body.xj-body a:focus,
body.xj-body a:active,
body.xj-body a:visited {
  text-decoration: none !important;
}

.xj-shell {
  max-width: var(--xj-shell);
  min-height: 100vh;
  margin: 0 auto;
  background: transparent;
}

.xj-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 56px;
  backdrop-filter: blur(14px);
  background: rgba(248, 251, 251, 0.86);
  border-bottom: 1px solid rgba(98, 105, 118, 0.12);
}

.xj-main {
  padding: 14px 14px 92px;
}

.xj-main--full {
  padding-bottom: 24px;
}

.xj-main--no-topbar {
  padding-top: 15px;
}

.xj-title-shell {
  background: #eef4fb;
}

.xj-titlebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 48px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  color: #fff;
  background: linear-gradient(90deg, #69a7ff 0%, #1683f7 100%);
}

.xj-titlebar--plain {
  grid-template-columns: 1fr;
}

.xj-titlebar-back {
  width: 52px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 24px;
}

.xj-titlebar-title {
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
}

.xj-titlebar-spacer {
  display: flex;
  justify-content: center;
}

.xj-titlebar-action {
  width: 52px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
}

.xj-title-main {
  padding: 15px 15px 10px;
}

.xj-tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  width: min(100%, var(--xj-shell));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(98, 105, 118, 0.16);
  box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.xj-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  border-radius: 16px;
  color: var(--tblr-secondary);
  font-size: 12px;
}

.xj-tab-item i {
  font-size: 22px;
}

.xj-tab-item.active {
  color: #fff;
  background: var(--xj-hero);
  box-shadow: 0 10px 22px rgba(32, 107, 196, 0.24);
}

.xj-hero,
.xj-login,
.xj-profile-card,
.xj-site-card,
.xj-device-card,
.xj-empty-card,
.xj-placeholder,
.xj-stat-card,
.xj-list-item,
.xj-link-card,
.xj-alarm-card,
.xj-maintenance-card,
.xj-status-panel {
  border: 1px solid rgba(98, 105, 118, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.xj-hero {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  color: #fff;
  background: var(--xj-hero);
}

.xj-hero--compact {
  padding: 18px;
}

.xj-hero h1,
.xj-login h1,
.xj-profile-card h1,
.xj-placeholder h1 {
  margin: 4px 0 8px;
  font-size: 1.35rem;
}

.xj-hero p,
.xj-login p,
.xj-placeholder p {
  margin: 0;
  line-height: 1.55;
}

.xj-hero p,
.xj-hero .xj-eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.xj-eyebrow,
.xj-caption,
.xj-muted {
  color: var(--tblr-secondary);
  font-size: 0.875rem;
}

.xj-section {
  margin-top: 14px;
}

.xj-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.xj-section-head h2 {
  margin: 0;
  font-size: 1rem;
}

.xj-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.xj-stat-card {
  padding: 14px;
}

.xj-stat-card--success {
  background: linear-gradient(160deg, #ecfdf5, #fff);
}

.xj-stat-card--danger {
  background: linear-gradient(160deg, #fff1f2, #fff);
}

.xj-stat-card--warning {
  background: linear-gradient(160deg, #fffbeb, #fff);
}

.xj-stat-label {
  color: var(--tblr-secondary);
  font-size: 0.82rem;
}

.xj-stat-value {
  margin-top: 6px;
  font-size: 1.55rem;
  font-weight: 800;
}

.xj-info-strip,
.xj-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.xj-info-strip span,
.xj-filter-row a {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--xj-soft);
  color: var(--xj-primary);
  font-size: 0.84rem;
}

.xj-filter-row a.active {
  color: #fff;
  background: var(--xj-hero);
}

.xj-list,
.xj-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xj-list-item,
.xj-link-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.xj-list-item strong,
.xj-link-card strong,
.xj-site-card strong,
.xj-device-card strong {
  display: block;
  margin-bottom: 4px;
}

.xj-list-meta {
  color: var(--tblr-secondary);
  white-space: nowrap;
  font-size: 0.8rem;
}

.xj-home-board {
  padding: 0;
  color: #111827;
  background: transparent;
}

.xj-my-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: -15px -15px 0;
}

.xj-my-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 54px;
  background: #fff;
}

.xj-my-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #94a3b8, #334155);
  font-size: 27px;
  overflow: hidden;
}

.xj-my-profile h1 {
  margin: 0 0 4px;
  color: #111827;
  font-size: 18px;
}

.xj-my-profile p {
  margin: 0;
  color: #8a94a6;
}

.xj-my-card {
  padding-top: 16px;
  background: #fff;
}

.xj-my-card h2 {
  margin: 0;
  padding: 0 20px 14px;
  color: #111827;
  font-size: 14px;
}

.xj-my-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-bottom: 1px solid #edf1f6;
  color: #334155;
}

.xj-my-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #3f5172;
  font-size: 22px;
  text-shadow: 4px 4px 0 rgba(32, 107, 196, 0.12);
}

.xj-my-icon--wechat {
  color: #16a34a;
}

.xj-my-row em {
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: #0877ef;
  font-style: normal;
  font-size: 11px;
}

.xj-my-row > .ti-chevron-right {
  color: #c0c7d2;
  font-size: 22px;
}

.xj-my-action {
  min-height: 48px;
  display: grid;
  place-items: center;
  color: #526070;
  background: #fff;
}

.xj-home-board h1 {
  margin: 0 0 8px;
  color: var(--xj-primary);
  text-align: center;
  font-size: 14px;
  font-weight: 400;
}

.xj-home-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 8px;
  padding: 22px 12px 18px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.xj-home-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #111827;
  text-align: center;
}

.xj-home-action-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  font-size: 23px;
  box-shadow: 0 7px 14px rgba(15, 23, 42, 0.14);
}

.xj-home-action-icon--blue {
  background: linear-gradient(135deg, #78c3ff, #2688e8);
}

.xj-home-action-icon--indigo {
  background: linear-gradient(135deg, #9fb5ff, #526fe8);
}

.xj-home-action-icon--yellow {
  background: linear-gradient(135deg, #ffd56d, #ff9d25);
}

.xj-home-action-icon--red {
  background: linear-gradient(135deg, #ff9b9b, #f43f5e);
}

.xj-home-warning {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #9a3412;
  background: #fff7ed;
}

.xj-home-card {
  margin-top: 12px;
  padding: 14px 14px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.xj-home-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.xj-home-section-title h2 {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 400;
}

.xj-home-section-title i {
  color: #9aa8bd;
  font-size: 16px;
}

.xj-home-search {
  display: grid;
  grid-template-columns: 1fr 65px;
  margin-bottom: 12px;
}

.xj-home-search-box {
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid #d6dde9;
  border-right: 0;
  border-radius: 5px 0 0 5px;
  background: #fff;
}

.xj-home-search-box i {
  color: #4f8df7;
  font-size: 20px;
}

.xj-home-search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #111827;
  background: transparent;
}

.xj-home-search-box input::placeholder {
  color: #7b8794;
}

.xj-home-search button {
  border: 0;
  border-radius: 0 5px 5px 0;
  color: #fff;
  background: #0877ef;
}

.xj-home-site-card {
  position: relative;
  margin-top: 9px;
  padding: 14px 14px 12px;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.xj-home-site-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 3px;
  height: 20px;
  border-radius: 0 999px 999px 0;
}

.xj-home-site-card--blue::before {
  background: #1683f7;
}

.xj-home-site-card--green::before {
  background: #22c55e;
}

.xj-home-site-card h3 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 14px;
  font-weight: 400;
}

.xj-home-site-card p {
  margin: 0;
  color: #7b8794;
}

.xj-home-status-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-top: 14px;
  border: 1px solid #e5eaf2;
  border-right: 0;
}

.xj-home-status-grid div {
  display: grid;
  gap: 7px;
  padding: 8px 0 7px;
  border-right: 1px solid #e5eaf2;
  text-align: center;
}

.xj-home-status-grid span {
  color: #7b8794;
}

.xj-home-status-grid strong {
  color: #111827;
  font-size: 16px;
  font-weight: 400;
}

.xj-home-site-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.xj-home-site-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.xj-home-site-actions a {
  min-width: 44px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: #f4f6f9;
}

.xj-home-site-actions .xj-home-primary-link {
  color: #fff;
  background: #1683f7;
}

.xj-platform-search {
  display: grid;
  grid-template-columns: 1fr 69px;
  gap: 0;
  margin-bottom: 16px;
}

.xj-platform-search-box {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid rgba(98, 105, 118, 0.28);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: #fff;
}

.xj-platform-search-box i {
  color: #9aa8bd;
  font-size: 22px;
}

.xj-platform-search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #1f2937;
  background: transparent;
  font-size: 0.95rem;
}

.xj-platform-search-box input::placeholder {
  color: #667085;
}

.xj-platform-search button {
  min-height: 40px;
  border: 0;
  border-radius: 0 4px 4px 0;
  color: #fff;
  background: #0877ef;
  font-weight: 800;
}

.xj-platform-alert {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #ae3a3a;
  background: #fff1f2;
  font-size: 0.9rem;
}

.xj-platform-list {
  border-top: 1px solid rgba(98, 105, 118, 0.18);
  background: #fff;
}

.xj-platform-row {
  margin: 0;
}

.xj-platform-row button {
  width: 100%;
  min-height: 43px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 0;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid rgba(98, 105, 118, 0.18);
  color: #05070b;
  background: #fff;
  text-align: left;
}

.xj-platform-letter {
  font-size: 0.85rem;
  font-weight: 500;
}

.xj-platform-name {
  overflow: hidden;
  padding-right: 10px;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xj-platform-count {
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: #0877ef;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.xj-platform-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 46px 24px;
  border-radius: 8px;
  background: #fff;
  color: #667085;
  text-align: center;
}

.xj-platform-empty i {
  color: #9aa8bd;
  font-size: 42px;
}

.xj-platform-empty strong {
  color: #1f2937;
}

.xj-lock-page {
  margin: -15px -15px -10px;
  background: #f7fbff;
}

.xj-lock-search {
  display: grid;
  grid-template-columns: 1fr 70px;
  padding: 16px 12px 10px;
  background: #fff;
}

.xj-lock-search-box {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid #ccd5e1;
  border-right: 0;
  border-radius: 5px 0 0 5px;
  background: #fff;
}

.xj-lock-search-box i {
  color: #3b82f6;
  font-size: 22px;
}

.xj-lock-search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #111827;
  background: transparent;
}

.xj-lock-search button {
  border: 1px solid #ccd5e1;
  border-radius: 0 5px 5px 0;
  color: #111827;
  background: #fff;
}

.xj-lock-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 7px 8px 0;
  background: #fff;
  white-space: nowrap;
  scrollbar-width: none;
}

.xj-lock-filter::-webkit-scrollbar {
  display: none;
}

.xj-lock-filter span {
  color: #111827;
}

.xj-lock-filter i {
  margin-left: -7px;
  color: #6b7280;
  font-size: 14px;
}

.xj-lock-filter a {
  position: relative;
  padding: 0 0 8px;
  color: #8a94a6;
}

.xj-lock-filter a.active {
  color: #111827;
}

.xj-lock-filter a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--xj-primary);
}

.xj-lock-warning,
.xj-lock-empty {
  display: flex;
  gap: 7px;
  margin: 10px 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #9a3412;
  background: #fff7ed;
}

.xj-lock-warning--success {
  color: #166534;
  background: #ecfdf5;
}

.xj-lock-empty {
  justify-content: center;
  color: #667085;
  background: #fff;
}

.xj-lock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 0 4px 18px;
  background: #f7fbff;
}

.xj-lock-cell {
  position: relative;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 4px 6px;
  background: #fff;
  overflow: hidden;
  color: inherit;
}

.xj-lock-cell:hover,
.xj-lock-cell:focus {
  color: inherit;
  text-decoration: none;
}

.xj-lock-no {
  color: #000;
  font-size: 14px;
  font-weight: 400;
}

.xj-lock-state {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1;
}

.xj-lock-state--normal {
  color: #fff;
  background: #0877ef;
}

.xj-lock-state--offline {
  color: #475569;
  background: #e5e7eb;
}

.xj-lock-state--sleep {
  color: #fff;
  background: #7c3aed;
}

.xj-lock-car {
  margin-top: 25px;
  color: #d8e1ed;
  font-size: 42px;
}

.xj-lock-car.is-busy {
  color: #1677e8;
}

.xj-lock-device,
.xj-lock-plate {
  min-height: 16px;
  margin-top: 6px;
  color: #6b7280;
  text-align: center;
}

.xj-lock-plate {
  color: #ef4444;
  font-size: 14px;
}

.xj-lock-foot {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.xj-lock-chip {
  min-width: 20px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 2px;
  background: #eef2f7;
}

.xj-lock-chip.is-up {
  color: #22c55e;
  background: #dcfce7;
}

.xj-lock-chip.is-down {
  color: #94a3b8;
  background: #f1f5f9;
}

.xj-lock-chip.is-free {
  color: #ef4444;
  background: #fee2e2;
}

.xj-lock-battery {
  color: #10b981;
  font-size: 18px;
}

.xj-berth-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xj-berth-hero,
.xj-berth-card {
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.xj-berth-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, #1683f7, #69a7ff);
}

.xj-berth-hero span {
  opacity: 0.82;
}

.xj-berth-hero h1 {
  margin: 5px 0;
  color: #fff;
  font-size: 20px;
}

.xj-berth-hero p {
  margin: 0;
  opacity: 0.86;
}

.xj-berth-hero i {
  font-size: 48px;
  opacity: 0.36;
}

.xj-berth-card {
  padding: 14px;
}

.xj-berth-card h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 14px;
}

.xj-berth-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.xj-berth-info-grid div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f7fbff;
}

.xj-berth-info-grid span {
  display: block;
  margin-bottom: 5px;
  color: #8a94a6;
}

.xj-berth-info-grid strong {
  display: block;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xj-berth-empty {
  padding: 13px;
  border-radius: 8px;
  color: #667085;
  background: #f7fbff;
  text-align: center;
}

.xj-device-op-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: -10px -9px 0;
}

.xj-device-summary,
.xj-device-tabs {
  position: relative;
  border-radius: 8px;
  background: #fff;
}

.xj-device-summary {
  padding: 14px 20px 16px;
}

.xj-device-summary--inside {
  padding: 10px 4px 0;
  border-radius: 0;
  box-shadow: none;
}

.xj-device-qr {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #111827;
  font-size: 30px;
}

.xj-device-site {
  margin-bottom: 4px;
  color: #8a94a6;
}

.xj-device-no-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.xj-device-no-row h1 {
  margin: 0;
  color: #111827;
  font-size: 20px;
}

.xj-device-no-row i {
  color: #8a94a6;
  font-size: 14px;
}

.xj-device-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.xj-device-tags span {
  padding: 2px 5px;
  border-radius: 2px;
}

.xj-device-tags .is-green {
  color: #13a35c;
  background: #d7f8e6;
}

.xj-device-tags .is-orange {
  color: #f97316;
  background: #ffedd5;
}

.xj-device-meta,
.xj-device-car-card dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px 10px;
  margin: 12px 0 0;
}

.xj-device-meta dt,
.xj-device-car-card dt {
  color: #7b8794;
  font-weight: 400;
}

.xj-device-meta dd,
.xj-device-car-card dd {
  margin: 0;
  color: #667085;
}

.xj-device-history {
  display: inline-flex;
  min-width: 72px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border-radius: 4px;
  color: #fff;
  background: #0877ef;
}

.xj-device-car-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 12px;
  border-radius: 8px;
  background: #f3f7fe;
}

.xj-device-car-card > i {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #d3dce9;
  border: 1px solid #e3e9f2;
  background: #fff;
  font-size: 42px;
}

.xj-device-tabs {
  padding: 10px 16px 16px;
}

.xj-device-tab-head {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #e5eaf2;
}

.xj-device-tab-head--four {
  grid-template-columns: repeat(4, 1fr);
}

.xj-device-tab-head button {
  position: relative;
  min-height: 34px;
  border: 0;
  color: #8a94a6;
  background: transparent;
  font-size: 14px;
}

.xj-device-tab-head button.active {
  color: #111827;
}

.xj-device-tab-head button.active::after {
  content: "";
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: #0877ef;
}

.xj-device-tab-panel {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px 10px;
  padding-top: 15px;
}

.xj-device-tab-panel.active {
  display: grid;
}

.xj-device-info-panel {
  grid-template-columns: 1fr;
  gap: 0;
}

.xj-device-op {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #111827;
  text-align: center;
}

.xj-device-op:hover,
.xj-device-op:focus {
  color: #111827;
  text-decoration: none;
}

.xj-device-op i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #435373;
  font-size: 31px;
  text-shadow: 6px 6px 0 rgba(32, 107, 196, 0.14);
}

.xj-device-op span {
  line-height: 1.25;
}

.xj-login-screen {
  min-height: 100vh;
  margin: -14px -14px -24px;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 88% 0%, rgba(32, 107, 196, 0.14), transparent 34%),
    linear-gradient(180deg, #eef4fb, #f8fbff);
}

.xj-login-page {
  width: min(100%, 360px);
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #4f86e8;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.xj-login-banner {
  position: relative;
  height: 238px;
  display: grid;
  place-items: center;
  color: #fff;
  background: transparent;
}

.xj-login-banner::before {
  content: "";
  position: absolute;
  inset: 72px 0 0;
  opacity: 0.18;
  background:
    linear-gradient(90deg, transparent 0 7%, #fff 7% 16%, transparent 16% 21%, #fff 21% 34%, transparent 34% 41%, #fff 41% 52%, transparent 52% 59%, #fff 59% 72%, transparent 72% 79%, #fff 79% 92%, transparent 92%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 2px, transparent 2px 12px);
  clip-path: polygon(0 55%, 10% 40%, 18% 48%, 18% 28%, 29% 24%, 29% 64%, 38% 58%, 38% 34%, 48% 22%, 55% 28%, 55% 62%, 66% 55%, 66% 38%, 78% 43%, 78% 60%, 91% 37%, 100% 50%, 100% 100%, 0 100%);
}

.xj-login-brand {
  position: relative;
  z-index: 1;
  text-align: center;
}

.xj-login-logo {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.08em;
  transform: skewX(-12deg);
}

.xj-login-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.xj-login-panel {
  position: relative;
  z-index: 2;
  margin-top: -20px;
  padding: 28px 28px 32px;
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -12px 26px rgba(15, 23, 42, 0.08);
}

.xj-login-panel h1 {
  margin: 0 0 22px;
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 800;
}

.xj-login-field {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0 9px;
  border-bottom: 1px solid #d7dfeb;
}

.xj-login-field i {
  color: #c2d7fb;
  font-size: 21px;
}

.xj-login-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2937;
  font-size: 0.95rem;
}

.xj-login-field input::placeholder {
  color: #7b8794;
}

.xj-login-error {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #ae3a3a;
  background: #fff1f2;
  font-size: 0.9rem;
}

.xj-login-remember {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  color: #526070;
  font-size: 0.82rem;
}

.xj-login-remember input {
  width: 13px;
  height: 13px;
  margin: 0;
}

.xj-login-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #0d7df2;
  box-shadow: 0 10px 22px rgba(13, 125, 242, 0.22);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.xj-form,
.xj-inline-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xj-inline-form {
  flex-direction: row;
}

.xj-inline-form input {
  flex: 1;
}

.xj-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.xj-field span {
  color: var(--tblr-secondary);
  font-size: 0.86rem;
}

.xj-field input,
.xj-inline-form input,
.xj-select,
.xj-textarea,
.xj-field textarea,
.xj-field select {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid rgba(98, 105, 118, 0.22);
  border-radius: 12px;
  background: #fff;
}

.xj-field textarea,
.xj-textarea {
  min-height: 112px;
  resize: vertical;
}

.xj-primary-button,
.xj-secondary-button,
.xj-ghost-button,
.xj-outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
}

.xj-primary-button {
  color: #fff;
  background: var(--xj-hero);
}

.xj-secondary-button {
  color: var(--xj-primary);
  background: var(--xj-soft);
}

.xj-ghost-button,
.xj-outline-button {
  color: var(--xj-primary);
  border: 1px solid rgba(32, 107, 196, 0.28);
  background: #fff;
}

.xj-hero .xj-outline-button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
}

.xj-error,
.xj-success {
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.xj-error {
  color: #ae3a3a;
  background: #fff1f2;
}

.xj-success {
  color: var(--xj-primary);
  background: #ecfdf5;
}

.xj-site-card,
.xj-device-card,
.xj-alarm-card,
.xj-maintenance-card,
.xj-empty-card,
.xj-placeholder {
  padding: 15px;
}

.xj-site-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xj-site-card-head,
.xj-site-card-body,
.xj-alarm-card,
.xj-maintenance-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xj-alarm-card-head,
.xj-maintenance-card-head,
.xj-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.xj-alarm-actions,
.xj-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.xj-alarm-actions form {
  min-width: 0;
}

.xj-profile-card {
  justify-content: flex-start;
  padding: 16px;
}

.xj-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--xj-hero);
  font-size: 1.25rem;
  font-weight: 800;
}

.xj-priority-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--xj-primary);
  background: var(--xj-soft);
  font-size: 0.8rem;
}

/* XJ mobile typography baseline: compact, light, and app-like. */
body.xj-body,
body.xj-body button,
body.xj-body input,
body.xj-body select,
body.xj-body textarea {
  font-size: 12px;
  font-weight: 400;
}

body.xj-body h1,
body.xj-body h2,
body.xj-body h3,
body.xj-body h4,
body.xj-body h5,
body.xj-body h6,
.xj-titlebar-title,
.xj-section-head h2,
.xj-login-panel h1,
.xj-hero h1,
.xj-profile-card h1,
.xj-placeholder h1 {
  font-size: 14px;
  font-weight: 400;
}

body.xj-body strong,
body.xj-body .fw-bold,
.xj-stat-value,
.xj-platform-name,
.xj-platform-count,
.xj-platform-search button,
.xj-login-submit,
.xj-login-title,
.xj-login-logo {
  font-weight: 400;
}

.xj-tab-item {
  color: #8a94a6 !important;
  background: transparent;
  font-size: 12px;
  font-weight: 400;
}

.xj-tab-item span,
.xj-tab-item i {
  color: inherit;
}

.xj-tab-item i {
  font-size: 20px;
}

.xj-tab-item.active {
  color: var(--xj-primary) !important;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 380px) {
  .xj-card-grid,
  .xj-action-grid,
  .xj-alarm-actions {
    grid-template-columns: 1fr;
  }
}
