@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* =============================================================
   GYRO Industrial Command — refined control-room theme
   (variable names kept identical to the original so every
    existing rule cascades to the new palette automatically)
   ============================================================= */
:root {
  --apple-font: "Inter", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ind-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* graphite base */
  --apple-bg-1: #090c0f;
  --apple-bg-2: #0d1116;
  --apple-bg-3: #11161c;

  /* matte panel surfaces — flat, low transparency */
  --apple-surface: #141a20;
  --apple-surface-strong: #182028;
  --apple-surface-soft: rgba(255, 255, 255, 0.035);
  --ind-panel: #141a20;
  --ind-panel-raised: #182028;
  --ind-panel-head: #1a222a;

  /* hairlines */
  --apple-stroke: rgba(200, 214, 226, 0.11);
  --ind-line: rgba(200, 214, 226, 0.11);
  --ind-line-strong: rgba(200, 214, 226, 0.17);

  /* text */
  --apple-text: #e9eef2;
  --apple-muted: #94a0a9;
  --ind-text-2: #b4bec6;
  --ind-muted: #808b94;

  /* accents */
  --apple-blue: #2b7fb0;        /* primary action — industrial blue */
  --ind-blue-2: #3f9ad1;
  --apple-cyan: #34a6ad;        /* data / interactive — steel cyan */
  --ind-cyan-2: #5cccd2;
  --apple-green: #57bd82;
  --apple-yellow: #d7a94f;
  --apple-orange: #cf8038;
  --apple-red: #e1262f;         /* SRM brand / critical */
  --ind-red-2: #ff4d54;
  --apple-purple: #7d8794;

  /* shadows — tight, matte, low */
  --apple-shadow-lg: 0 6px 22px rgba(0, 0, 0, 0.38);
  --apple-shadow-md: 0 2px 10px rgba(0, 0, 0, 0.30);
  --ind-shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.03);

  /* radii — precise, machined */
  --apple-radius-xl: 10px;
  --apple-radius-lg: 8px;
  --apple-radius-md: 6px;
  --apple-radius-sm: 5px;

  --apple-reading-width: 700px;
  --apple-line: 1.5;

  --industrial-rail: #e1262f;
  --industrial-steel: #26313a;
  --industrial-ink: #0a0e11;
}

* {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

body {
  font-family: var(--apple-font) !important;
  font-size: 15.5px;
  line-height: var(--apple-line);
  color: var(--apple-text) !important;
  overflow-x: hidden;
  background:
    linear-gradient(112deg, rgba(225, 38, 47, 0.1), transparent 22%),
    linear-gradient(180deg, var(--apple-bg-3), var(--apple-bg-2) 42%, var(--apple-bg-1)) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent 78%);
  pointer-events: none;
  z-index: -1;
}

.site-logo-shell {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 240;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(148px, 28vw);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0.86;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-logo-shell:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.site-logo-shell img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.24));
}

.site-logo-shell--dashboard {
  right: auto;
  left: 22px;
  top: 18px;
  width: 142px;
  z-index: 998;
}

body:has(.site-logo-shell--dashboard) .sidebar {
  padding-top: 72px !important;
}

@media (max-width: 768px) {
  .site-logo-shell {
    top: 12px;
    right: 14px;
    width: 112px;
  }

  .site-logo-shell--dashboard {
    left: 52px;
    right: auto;
    top: 8px;
    width: 106px;
    z-index: 1001;
  }

  body:has(.site-logo-shell--dashboard) .sidebar {
    padding-top: 64px !important;
  }
}


a {
  color: #8fd4ff !important;
}

a:hover {
  color: #d7f0ff !important;
}

p,
li,
td,
th,
input,
select,
textarea,
button {
  line-height: var(--apple-line);
}

.back-btn,
a.back {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 16px !important;
  border-radius: 999px !important;
  color: var(--apple-text) !important;
  text-decoration: none !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--apple-stroke) !important;
  box-shadow: var(--apple-shadow-md) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

button,
.btn,
.submit-btn,
input[type="submit"],
input[type="button"] {
  background: linear-gradient(180deg, #3b9eff 0%, var(--apple-blue) 100%) !important;
  color: #fff !important;
  border: none !important;
  min-height: 46px;
  padding: 12px 18px !important;
  font-size: 0.96rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.01em;
  border-radius: var(--apple-radius-sm) !important;
  box-shadow: 0 12px 24px rgba(10, 132, 255, 0.32) !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease !important;
}

button:hover,
.btn:hover,
.submit-btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 18px 32px rgba(10, 132, 255, 0.36) !important;
}

.btn.delete {
  background: linear-gradient(180deg, #ff6a61 0%, var(--apple-red) 100%) !important;
  box-shadow: 0 12px 24px rgba(255, 69, 58, 0.28) !important;
}

.btn.save-sync {
  background: linear-gradient(180deg, #57b3ff 0%, var(--apple-blue) 100%) !important;
}

input,
select,
textarea {
  font-family: var(--apple-font) !important;
  font-size: 0.96rem !important;
  line-height: 1.45;
  color: var(--apple-text) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--apple-radius-sm) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: rgba(100, 210, 255, 0.8) !important;
  box-shadow:
    0 0 0 4px rgba(10, 132, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

select option {
  background: #151a26 !important;
  color: var(--apple-text) !important;
}

h1,
h2,
h3,
h4,
.title,
.header h1,
.header h2,
.header h3 {
  color: var(--apple-text) !important;
  text-shadow: none !important;
  letter-spacing: 0;
  line-height: 1.15;
  font-weight: 700;
}

.field label,
.form-row label,
label,
.header p,
.hint,
.message-label,
.section-subtitle,
.card-title,
.spark-label,
.transit-flow,
.toc a,
.assignment-time,
.device-id,
.field label {
  color: var(--apple-muted) !important;
  font-size: 0.9rem !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.card-title,
.spark-label,
.transit-flow,
.section-subtitle {
  font-size: 0.92rem !important;
}

body > form,
body > .card,
body > .box,
body > .login-box,
body > .modal-container,
.detail-card,
.toc,
.section,
.device-section,
.message-box,
.message-content,
.container > .header,
.summary-card,
.spark-card,
.transit-card,
.base-card,
.responsible-devices-module,
.device-card,
.unsynced-box,
.thumb,
.entry,
.pager,
.scroll-hint,
.table-grid .header,
.table-grid .cell,
#preview,
#device-info table {
  background: var(--apple-surface) !important;
  border: 1px solid var(--apple-stroke) !important;
  box-shadow: var(--apple-shadow-md) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

body > form,
body > .card,
body > .box,
body > .login-box,
body > .modal-container,
.detail-card,
.toc,
.section,
.container > .header,
.responsible-devices-module,
.device-section,
#preview {
  border-radius: var(--apple-radius-xl) !important;
}

.table-grid .header,
.table-grid .cell,
.summary-card,
.spark-card,
.transit-card,
.base-card,
.device-card,
.message-box,
.message-content,
.thumb,
.entry,
.pager,
.scroll-hint {
  border-radius: var(--apple-radius-lg) !important;
}

body > form,
body > .card,
body > .box,
body > .modal-container {
  max-width: min(94vw, var(--apple-reading-width)) !important;
  width: min(94vw, var(--apple-reading-width)) !important;
  margin: 24px auto !important;
  padding: 32px !important;
}

body > .login-box {
  max-width: min(92vw, 400px) !important;
  width: min(92vw, 400px) !important;
  margin: 40px auto !important;
  padding: 32px 28px !important;
}

.container {
  max-width: 1240px;
  padding-inline: 18px;
}

body > h1,
body > h2,
body > h3,
body > p,
body > .back,
body > .back-btn,
body > table,
body > .dashboard {
  max-width: min(96vw, 1240px);
  margin-left: auto !important;
  margin-right: auto !important;
}

body > h1,
body > h2,
body > h3 {
  margin-bottom: 18px !important;
}

body > table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--apple-radius-lg);
  border: 1px solid var(--apple-stroke) !important;
  box-shadow: var(--apple-shadow-md) !important;
  background: var(--apple-surface) !important;
}

table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden;
  border-radius: var(--apple-radius-lg);
}

th,
td {
  border-color: rgba(255, 255, 255, 0.08) !important;
  padding: 14px 16px !important;
}

th {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--apple-text) !important;
  font-size: 0.84rem !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  color: var(--apple-text) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.04) !important;
}

.message,
.error,
.success,
.no-data,
.loading {
  color: var(--apple-yellow) !important;
}

.badge.ok {
  background: rgba(48, 209, 88, 0.16) !important;
  color: #8ff0af !important;
}

.badge.miss {
  background: rgba(255, 69, 58, 0.16) !important;
  color: #ff9d96 !important;
}

.status-正常工作 {
  background: linear-gradient(180deg, #52df79 0%, #30d158 100%) !important;
  color: #08120d !important;
  box-shadow: 0 10px 22px rgba(48, 209, 88, 0.28) !important;
  border: 1px solid rgba(120, 255, 160, 0.28) !important;
}

.status-维保中 {
  background: linear-gradient(180deg, #ffe46a 0%, #ffd60a 100%) !important;
  color: #1a1600 !important;
  box-shadow: 0 10px 22px rgba(255, 214, 10, 0.26) !important;
  border: 1px solid rgba(255, 231, 131, 0.3) !important;
}

.status-在途（去） {
  background: linear-gradient(180deg, #58a8ff 0%, #0a84ff 100%) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.28) !important;
  border: 1px solid rgba(143, 205, 255, 0.22) !important;
}

.status-在途（回） {
  background: linear-gradient(180deg, #cf87ff 0%, #bf5af2 100%) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(191, 90, 242, 0.28) !important;
  border: 1px solid rgba(223, 180, 255, 0.22) !important;
}

.status-待出库,
.status-待运输 {
  background: linear-gradient(180deg, #ffb44a 0%, #ff9f0a 100%) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(255, 159, 10, 0.28) !important;
  border: 1px solid rgba(255, 207, 131, 0.24) !important;
}

.status-待库管入库确认,
.status-待库管出库确认 {
  background: #f39c12;
  color: #1e1e2f;
}

.device-status {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

.title-logo,
.header-logo {
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.26));
}

.header-logo,
.title-logo,
.icon,
.icon-small,
.device-icon,
.transit-icon img {
  object-fit: contain;
}

.icon,
.icon-small,
.device-icon {
  border-radius: 12px;
}

.sidebar {
  background: rgba(12, 16, 28, 0.72) !important;
  border-right: 1px solid var(--apple-stroke) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.18);
}

.sidebar h3 {
  color: var(--apple-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem !important;
}

.sidebar ul li {
  color: var(--apple-text) !important;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px !important;
}

.sidebar ul li:hover {
  background: linear-gradient(180deg, rgba(255, 176, 64, 0.94), rgba(255, 143, 10, 0.88));
  border-color: rgba(255, 221, 176, 0.34);
  box-shadow: 0 12px 24px rgba(255, 159, 10, 0.26);
  color: #fff !important;
}

.hamburger {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid var(--apple-stroke) !important;
  box-shadow: var(--apple-shadow-md);
}

.dashboard {
  padding: 28px 24px 40px !important;
}

.dashboard > .header {
  max-width: 1080px;
  margin: 0 auto 26px !important;
  padding: 26px 28px !important;
  border-radius: 32px !important;
  background:
    radial-gradient(circle at top left, rgba(100, 210, 255, 0.18), transparent 28%),
    radial-gradient(circle at right center, rgba(191, 90, 242, 0.12), transparent 24%),
    linear-gradient(145deg, rgba(28, 34, 48, 0.92), rgba(18, 22, 34, 0.72)) !important;
  border: 1px solid var(--apple-stroke) !important;
  box-shadow: var(--apple-shadow-lg) !important;
  position: relative;
  overflow: hidden;
}

.dashboard > .header::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.dashboard > .header h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(2.2rem, 4vw, 3.5rem) !important;
}

.dashboard .title-logo {
  height: 1.26em !important;
  margin-right: 0 !important;
}

.summary-cards {
  max-width: 1080px;
  margin: 0 auto 24px !important;
  gap: 16px !important;
}

.summary-card {
  max-width: none !important;
  min-height: 118px;
  padding: 18px 16px !important;
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -42px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

#cardNormal {
  background: linear-gradient(155deg, rgba(82, 223, 121, 0.42), rgba(20, 24, 36, 0.86)) !important;
  border-color: rgba(82, 223, 121, 0.22) !important;
  box-shadow: 0 20px 34px rgba(48, 209, 88, 0.16) !important;
}

#cardMaint {
  background: linear-gradient(155deg, rgba(255, 214, 10, 0.42), rgba(20, 24, 36, 0.86)) !important;
  border-color: rgba(255, 214, 10, 0.22) !important;
  box-shadow: 0 20px 34px rgba(255, 214, 10, 0.14) !important;
}

#cardAwait {
  background: linear-gradient(155deg, rgba(255, 159, 10, 0.38), rgba(20, 24, 36, 0.86)) !important;
  border-color: rgba(255, 159, 10, 0.22) !important;
  box-shadow: 0 20px 34px rgba(255, 159, 10, 0.16) !important;
}

#cardTransit {
  background: linear-gradient(155deg, rgba(10, 132, 255, 0.42), rgba(20, 24, 36, 0.86)) !important;
  border-color: rgba(10, 132, 255, 0.22) !important;
  box-shadow: 0 20px 34px rgba(10, 132, 255, 0.16) !important;
}

.card-value,
.spark-total,
.transit-count,
.chart-center-text {
  color: var(--apple-cyan) !important;
  font-weight: 740 !important;
  letter-spacing: 0;
}

#totalNormal {
  color: #8cf7a8 !important;
}

#totalMaint {
  color: #fff1a6 !important;
}

#totalAwait {
  color: #ffd0a0 !important;
}

#totalTransit {
  color: #b4e2ff !important;
}

.spark-legend {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 16px !important;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--apple-stroke);
  box-shadow: var(--apple-shadow-md);
}

.legend-box {
  border-radius: 999px !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.legend-box.normal {
  background: #30d158 !important;
}

.legend-box.maint {
  background: #ffd60a !important;
}

.legend-box.await {
  background: #ff9f0a !important;
}

.legend-box.transit {
  background: #0a84ff !important;
}

#spark-container,
#transit-module,
#map-container,
.bases-grid,
.responsible-devices-module,
.transit-detail {
  max-width: 1080px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.responsible-devices-module {
  background:
    radial-gradient(circle at top right, rgba(255, 196, 132, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(120, 20, 20, 0.94), rgba(70, 10, 10, 0.9)) !important;
  border: 1px solid rgba(255, 160, 122, 0.22) !important;
  box-shadow: 0 22px 40px rgba(95, 8, 8, 0.34) !important;
}

.responsible-devices-module h3 {
  color: #fff3df !important;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.responsible-devices-module .no-devices {
  color: #ffd9cf !important;
}

#spark-container {
  padding: 18px 18px 8px;
  border-radius: 30px;
  background: var(--apple-surface) !important;
  border: 1px solid var(--apple-stroke);
  box-shadow: var(--apple-shadow-lg);
}

.bars {
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 999px !important;
}

.spark-card {
  min-height: 60px;
}

.transit-card.go {
  background: linear-gradient(150deg, rgba(10, 132, 255, 0.32), rgba(20, 24, 36, 0.82)) !important;
  border-left: none !important;
  border-color: rgba(143, 205, 255, 0.18) !important;
}

.transit-card.return {
  background: linear-gradient(150deg, rgba(191, 90, 242, 0.28), rgba(20, 24, 36, 0.82)) !important;
  border-left: none !important;
  border-color: rgba(223, 180, 255, 0.18) !important;
}

#map-container {
  border-radius: 30px !important;
  overflow: hidden;
  box-shadow: var(--apple-shadow-lg) !important;
  border: 1px solid var(--apple-stroke) !important;
}

.bases-grid {
  gap: 18px !important;
}

.base-card:hover,
.summary-card.clickable:hover,
.device-card:hover,
.transit-card:hover,
.thumb:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.28) !important;
}

.base-title,
.section h2,
.toc h2 {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  padding-bottom: 14px;
  margin-bottom: 20px !important;
}

.section h2,
.toc h2,
.container > .header h1,
.container > .header h2 {
  font-size: clamp(1.45rem, 2.6vw, 2rem) !important;
}

.table-grid .header {
  color: var(--apple-cyan) !important;
}

.table-grid .cell {
  background: rgba(255, 255, 255, 0.04) !important;
}

.device-type,
.progress-text,
.reason-group-title {
  color: var(--apple-cyan) !important;
}

.message-content,
.message {
  background: rgba(255, 255, 255, 0.04) !important;
  line-height: 1.7;
}

body > form h2,
.card h2,
.box h2,
.detail-card h2,
.container h2,
.modal-container h1,
.modal-container h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem) !important;
  margin-bottom: 18px !important;
  font-weight: 700;
  letter-spacing: 0;
}

.login-box h2 {
  text-align: center;
  font-size: clamp(1.85rem, 3vw, 2.3rem) !important;
}

.field,
.form-row,
.filter-controls,
.steps,
.detail,
.entry-meta {
  margin-bottom: 18px !important;
}

.field input,
.field select,
.field textarea,
.form-row input,
.form-row select,
.form-row textarea,
.filter-controls input,
.filter-controls select,
.message-content {
  min-height: 46px;
  padding: 13px 15px !important;
}

input[type="file"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px !important;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(180deg, #59afff 0%, var(--apple-blue) 100%);
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--apple-blue);
}

.message,
.error,
.success,
.no-data,
.loading,
.scroll-hint {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04) !important;
}

.detail-card,
.card,
.box,
.login-box,
.modal-container,
.toc,
.section,
.container > .header,
.responsible-devices-module,
.device-section {
  overflow: hidden;
}

.device-header,
.message-box,
.entry,
.pager {
  border-radius: 18px !important;
}

.table-grid {
  gap: 16px !important;
}

.table-grid .title {
  margin-bottom: 10px !important;
}

.table-grid .header,
.table-grid .cell {
  padding: 16px !important;
}

.entry,
.pager,
.message-box,
.device-card,
.base-card,
.summary-card,
.spark-card,
.transit-card {
  padding: 18px !important;
}

.summary-card .card-title,
.base-card .base-title,
.device-header .title {
  font-weight: 650 !important;
}

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

.filter-controls label {
  margin-bottom: 0 !important;
}

.table-container,
#device-info,
.entries {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.thumbs {
  gap: 12px !important;
}

.thumb {
  min-height: 120px !important;
}

.entry-meta div,
.hero-pill,
.badge {
  border-radius: 999px !important;
}

.device-header .title,
.title {
  font-weight: 700 !important;
}

.steps,
.note,
.faq,
.contact,
.filter-section,
.instructions,
.success-message {
  border-radius: var(--apple-radius-lg) !important;
  border: 1px solid var(--apple-stroke) !important;
  box-shadow: var(--apple-shadow-md) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.steps,
.filter-section,
.instructions {
  background: rgba(255, 255, 255, 0.05) !important;
}

.note {
  background: rgba(255, 214, 10, 0.1) !important;
  border-color: rgba(255, 214, 10, 0.18) !important;
}

.faq {
  background: rgba(10, 132, 255, 0.08) !important;
  border-color: rgba(10, 132, 255, 0.16) !important;
}

.contact {
  background: rgba(255, 255, 255, 0.05) !important;
}

.success-message {
  background: rgba(48, 209, 88, 0.12) !important;
  border-color: rgba(48, 209, 88, 0.18) !important;
  color: #9af5b0 !important;
}

.steps li,
.note,
.faq,
.instructions p,
.contact li,
.filter-info,
.detail-info,
.entry-meta,
.entry-meta div {
  color: var(--apple-text) !important;
}

.note strong,
.faq strong,
.contact h2,
.filter-section h3,
.instructions h3 {
  color: var(--apple-cyan) !important;
}

.highlight {
  background: rgba(255, 214, 10, 0.16) !important;
  color: #fff0a8 !important;
  border: 1px solid rgba(255, 214, 10, 0.18);
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.filter-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-input,
.filter-form input,
.filter-form select {
  flex: 1 1 240px;
  min-width: 220px;
}

.clear-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px !important;
  border-radius: var(--apple-radius-sm) !important;
  color: #fff !important;
  background: linear-gradient(180deg, #ff6a61 0%, var(--apple-red) 100%) !important;
  box-shadow: 0 12px 24px rgba(255, 69, 58, 0.24) !important;
}

.detail {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px;
  border-radius: var(--apple-radius-lg);
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail img,
#icon {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
  flex: 0 0 auto;
}

.detail-info {
  flex: 1;
  display: grid;
  gap: 8px;
}

.checkbox-group {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--apple-radius-lg);
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.detail-panel {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: var(--apple-shadow-md) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card-header,
.device-card {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: var(--apple-shadow-md) !important;
}

.card-header .product,
.device-type {
  letter-spacing: 0;
}

.card-header .status,
.status-pill,
.pill {
  border-radius: 999px !important;
  font-weight: 650;
}

.pill {
  background: rgba(255, 255, 255, 0.14) !important;
  color: var(--apple-text) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-segments {
  display: flex;
  gap: 4px;
  border-radius: 999px !important;
  overflow: hidden;
}

.progress-segments .segment {
  border-radius: 999px;
}

.back-btn:hover,
a.back:hover {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  body > form,
  body > .card,
  body > .box,
  body > .login-box,
  body > .modal-container,
  .detail-card,
  .toc,
  .section,
  .device-section,
  .container > .header,
  .responsible-devices-module {
    border-radius: 22px !important;
    padding: 18px !important;
  }

  .dashboard {
    padding: 16px 14px 28px !important;
  }

  .dashboard > .header {
    padding: 20px 18px !important;
    border-radius: 24px !important;
  }

  .dashboard > .header h1 {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 2rem !important;
  }

  .dashboard .title-logo {
    width: min(300px, 72vw);
    height: auto !important;
  }

  .summary-card {
    min-height: 104px;
    flex: 1 1 calc(50% - 10px) !important;
  }

  body > form,
  body > .card,
  body > .box,
  body > .login-box,
  .detail-card,
  .modal-container {
    width: calc(100% - 8px) !important;
    padding: 20px 18px !important;
  }

  .field,
  .form-row {
    margin-bottom: 14px !important;
  }

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

  .detail img,
  #icon {
    width: 76px;
    height: 76px;
  }

  .field input,
  .field select,
  .field textarea,
  .form-row input,
  .form-row select,
  .form-row textarea,
  .filter-controls input,
  .filter-controls select {
    min-height: 46px;
    font-size: 16px !important;
  }

  .section h2,
  .toc h2,
  .container > .header h1,
  .container > .header h2 {
    font-size: 1.35rem !important;
  }

  .table-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .table-grid .title,
  .table-grid .header,
  .table-grid .cell {
    grid-column: 1 / -1 !important;
  }

  .table-grid .header,
  .table-grid .cell {
    width: 100%;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }

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

  .filter-controls label {
    margin-bottom: 6px !important;
  }

  .device-header,
  .entry-meta {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .entry-meta div {
    width: 100%;
  }

  .thumbs {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  .thumb {
    width: 100% !important;
  }

  .steps,
  .note,
  .faq,
  .contact,
  .filter-section,
  .instructions,
  .success-message {
    padding: 16px !important;
  }

  .spark-legend {
    width: 100%;
    border-radius: 22px;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 12px 14px;
  }

  #spark-container,
  #map-container {
    border-radius: 22px !important;
  }

  .base-card,
  .summary-card,
  .spark-card,
  .transit-card,
  .device-card,
  .table-grid .header,
  .table-grid .cell {
    border-radius: 18px !important;
  }

  th,
  td {
    padding: 12px 14px !important;
  }
}

/* Industrial enterprise refresh: restrained oilfield software palette */
a {
  color: #58c4c9 !important;
}

a:hover {
  color: #8de1e4 !important;
}

h1,
h2,
h3,
h4,
.title,
.header h1,
.header h2,
.header h3,
body > form h2,
.card h2,
.box h2,
.detail-card h2,
.container h2,
.modal-container h1,
.modal-container h2 {
  letter-spacing: 0 !important;
  font-weight: 680 !important;
}

.site-logo-shell {
  opacity: 0.9;
}

.site-logo-shell img,
.title-logo,
.header-logo {
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.28));
}

.back-btn,
a.back {
  min-height: 38px;
  padding: 8px 13px !important;
  border-radius: 8px !important;
  background: rgba(18, 24, 30, 0.9) !important;
  border: 1px solid rgba(222, 230, 236, 0.14) !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

button,
.btn,
.submit-btn,
input[type="submit"],
input[type="button"],
input[type="file"]::file-selector-button {
  background: linear-gradient(180deg, #238ca8 0%, #126983 100%) !important;
  color: #f8fbfc !important;
  border: 1px solid rgba(124, 224, 229, 0.22) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 20px rgba(8, 58, 72, 0.22) !important;
  letter-spacing: 0 !important;
}

button:hover,
.btn:hover,
.submit-btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 14px 24px rgba(8, 58, 72, 0.28) !important;
}

.btn.delete,
.clear-btn {
  background: linear-gradient(180deg, #ef3b45 0%, #bd1d26 100%) !important;
  border-color: rgba(255, 130, 136, 0.28) !important;
  box-shadow: 0 10px 20px rgba(150, 20, 28, 0.24) !important;
}

input,
select,
textarea {
  background: #0f151a !important;
  border: 1px solid rgba(172, 188, 199, 0.22) !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(88, 196, 201, 0.82) !important;
  box-shadow:
    0 0 0 3px rgba(33, 166, 173, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

select option {
  background: #111820 !important;
}

body > form,
body > .card,
body > .box,
body > .login-box,
body > .modal-container,
.detail-card,
.toc,
.section,
.device-section,
.message-box,
.message-content,
.container > .header,
.summary-card,
.spark-card,
.transit-card,
.base-card,
.responsible-devices-module,
.device-card,
.unsynced-box,
.thumb,
.entry,
.pager,
.scroll-hint,
.table-grid .header,
.table-grid .cell,
#preview,
#device-info table {
  background: linear-gradient(180deg, rgba(22, 28, 34, 0.98), rgba(15, 20, 25, 0.96)) !important;
  border: 1px solid rgba(222, 230, 236, 0.12) !important;
  border-radius: 10px !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body > form,
body > .card,
body > .box,
body > .modal-container {
  border-top: 3px solid rgba(225, 38, 47, 0.84) !important;
}

table,
body > table {
  border-radius: 10px !important;
}

th {
  background: #1c252d !important;
  color: #dfe7ec !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.04em;
}

td {
  background: rgba(12, 17, 21, 0.64) !important;
  color: #edf2f5 !important;
}

tr:nth-child(even) td {
  background: rgba(21, 27, 33, 0.68) !important;
}

tbody tr:hover td,
tbody tr:hover {
  background: rgba(33, 166, 173, 0.09) !important;
}

.sidebar {
  background: linear-gradient(180deg, rgba(12, 16, 20, 0.98), rgba(8, 11, 14, 0.96)) !important;
  border-right: 1px solid rgba(222, 230, 236, 0.12) !important;
  box-shadow: 10px 0 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sidebar h3 {
  color: #b7c2cb !important;
  letter-spacing: 0.1em;
}

.sidebar ul li {
  border-radius: 8px;
  font-size: 0.98rem !important;
  letter-spacing: 0 !important;
}

.sidebar ul li:hover {
  background: rgba(33, 166, 173, 0.16) !important;
  border-color: rgba(88, 196, 201, 0.24) !important;
  box-shadow: inset 3px 0 0 var(--industrial-rail) !important;
  color: #f8fbfc !important;
  font-size: 0.98rem !important;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04) !important;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(88, 196, 201, 0.16) !important;
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(88, 196, 201, 0.34) !important;
}

#notifWrapper {
  top: 18px !important;
  right: 20px !important;
  display: inline-flex !important;
  gap: 8px;
  align-items: center;
}

#helpBtn,
#searchBtn,
#notifBtn {
  width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 9px !important;
  background: rgba(18, 24, 30, 0.92) !important;
  border: 1px solid rgba(222, 230, 236, 0.14) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22) !important;
}

#helpBtn:hover,
#searchBtn:hover,
#notifBtn:hover {
  background: rgba(33, 166, 173, 0.16) !important;
  border-color: rgba(88, 196, 201, 0.28) !important;
  transform: translateY(-1px);
}

#searchBtn .notifIcon,
#notifBtn .notifIcon {
  font-size: 1.28rem !important;
  line-height: 1 !important;
  filter: saturate(0.55) brightness(1.08);
}

#helpBtn .helpIcon {
  width: 1.35rem !important;
  height: 1.35rem !important;
}

#notifBadge {
  top: -5px !important;
  right: -5px !important;
  min-width: 18px;
  height: 18px;
  padding: 0 5px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--industrial-rail) !important;
  font-size: 0.72rem !important;
}

#notifDropdown {
  top: 50px !important;
  background: #111820 !important;
  color: var(--apple-text) !important;
  border: 1px solid rgba(222, 230, 236, 0.14) !important;
  border-radius: 10px !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34) !important;
}

.hamburger {
  background: rgba(18, 24, 30, 0.92) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.dashboard > .header {
  background:
    linear-gradient(90deg, rgba(225, 38, 47, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(24, 31, 38, 0.98), rgba(13, 18, 23, 0.96)) !important;
  border-radius: 12px !important;
  border-top: 3px solid rgba(225, 38, 47, 0.78) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3) !important;
}

.dashboard > .header::after,
.summary-card::before {
  display: none;
}

.dashboard > .header h1 {
  letter-spacing: 0 !important;
}

.summary-card {
  min-height: 104px;
  border-top: 3px solid rgba(88, 196, 201, 0.56) !important;
}

#cardNormal,
#cardMaint,
#cardAwait,
#cardTransit,
.transit-card.go,
.transit-card.return {
  background: linear-gradient(180deg, rgba(22, 28, 34, 0.98), rgba(15, 20, 25, 0.96)) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24) !important;
}

#cardNormal {
  border-top-color: rgba(99, 184, 120, 0.86) !important;
}

#cardMaint {
  border-top-color: rgba(214, 168, 79, 0.86) !important;
}

#cardAwait {
  border-top-color: rgba(200, 121, 58, 0.86) !important;
}

#cardTransit {
  border-top-color: rgba(88, 196, 201, 0.86) !important;
}

.card-value,
.spark-total,
.transit-count,
.chart-center-text {
  color: #65d6dc !important;
  letter-spacing: 0 !important;
}

.status-正常工作,
.status-normal {
  background: rgba(99, 184, 120, 0.14) !important;
  color: #9de1ad !important;
  border: 1px solid rgba(99, 184, 120, 0.28) !important;
  box-shadow: none !important;
}

.status-维保中,
.status-maint {
  background: rgba(214, 168, 79, 0.14) !important;
  color: #f0d18c !important;
  border: 1px solid rgba(214, 168, 79, 0.3) !important;
  box-shadow: none !important;
}

.status-待出库,
.status-待运输,
.status-待库管入库确认,
.status-待库管出库确认,
.status-await {
  background: rgba(200, 121, 58, 0.14) !important;
  color: #efb681 !important;
  border: 1px solid rgba(200, 121, 58, 0.3) !important;
  box-shadow: none !important;
}

.status-在途（去）,
.status-在途（回）,
.status-transit {
  background: rgba(88, 196, 201, 0.14) !important;
  color: #9ce5e8 !important;
  border: 1px solid rgba(88, 196, 201, 0.3) !important;
  box-shadow: none !important;
}

.responsible-devices-module {
  background:
    linear-gradient(90deg, rgba(225, 38, 47, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(32, 24, 25, 0.98), rgba(18, 14, 15, 0.96)) !important;
  border-top: 3px solid rgba(225, 38, 47, 0.8) !important;
  border-color: rgba(225, 38, 47, 0.28) !important;
  box-shadow: 0 18px 36px rgba(60, 0, 4, 0.24) !important;
}

.spark-legend,
#spark-container,
#map-container {
  background: linear-gradient(180deg, rgba(22, 28, 34, 0.98), rgba(15, 20, 25, 0.96)) !important;
  border: 1px solid rgba(222, 230, 236, 0.12) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24) !important;
}

.legend-box.normal { background: #63b878 !important; }
.legend-box.maint { background: #d6a84f !important; }
.legend-box.await { background: #c8793a !important; }
.legend-box.transit { background: #21a6ad !important; }

.page,
.gyro-detail-page {
  color: var(--apple-text);
}

.topbar {
  margin-top: 2px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(222, 230, 236, 0.1);
}

.title-block h1 {
  letter-spacing: 0 !important;
  font-size: clamp(1.55rem, 2.6vw, 2.05rem) !important;
}

.title-block p {
  color: #9da8b2 !important;
}

.summary-item,
.table-wrap,
.chart-card,
.detail-nav,
.metric-card,
.cycle-card,
.timeline-event,
.job-info-panel,
.unassigned-gps-panel,
.gps-selected-detail {
  background: linear-gradient(180deg, rgba(22, 28, 34, 0.98), rgba(15, 20, 25, 0.96)) !important;
  border: 1px solid rgba(222, 230, 236, 0.12) !important;
  border-radius: 10px !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22) !important;
}

.summary-item {
  border-top: 3px solid rgba(88, 196, 201, 0.66) !important;
}

.summary-value {
  color: #f8fbfc !important;
  letter-spacing: 0 !important;
}

.gyro-link {
  color: #64d6dc !important;
}

.detail-nav a:hover,
.detail-nav a:focus-visible,
.detail-nav a.is-active {
  color: #f8fbfc !important;
  background: rgba(33, 166, 173, 0.16) !important;
  border-color: rgba(88, 196, 201, 0.28) !important;
}

.alert-panel,
.alert-card.danger,
.cycle-card.has-alert,
.cycle-alert,
.timeline-item.alert,
.timeline-event.alert {
  border-color: rgba(225, 38, 47, 0.32) !important;
  border-left-color: var(--industrial-rail) !important;
  background: linear-gradient(90deg, rgba(225, 38, 47, 0.18), rgba(18, 23, 28, 0.96) 42%) !important;
  box-shadow: 0 14px 28px rgba(130, 12, 20, 0.18) !important;
}

.alert-panel-title,
.alert-title,
.cycle-alert strong {
  color: #ff9096 !important;
}

.map-reset-button,
.gps-list-item,
.legend-item,
.vibration-stat,
.bar-row {
  border-radius: 8px !important;
}

input[type="range"] {
  accent-color: #21a6ad;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(88, 196, 201, 0.3);
  border-radius: 999px;
  border: 2px solid rgba(10, 14, 17, 0.9);
}

@media (max-width: 768px) {
  body > form,
  body > .card,
  body > .box,
  body > .login-box,
  body > .modal-container,
  .detail-card,
  .toc,
  .section,
  .device-section,
  .container > .header,
  .responsible-devices-module,
  .summary-item,
  .table-wrap,
  .chart-card,
  .detail-nav,
  .cycle-card {
    border-radius: 10px !important;
  }
}


/* =================================================================
   ===============  GYRO INDUSTRIAL COMMAND — v4 layer  ============
   Authoritative redesign layer (loads last → wins the cascade).
   Refines typography, density, panels, tables and every core
   component into an SLB / Baker Hughes control-room aesthetic.
   ================================================================= */

/* ---------- Base surface & background ---------- */
body {
  font-family: var(--apple-font) !important;
  font-size: 14.75px;
  letter-spacing: 0.004em;
  background:
    linear-gradient(180deg, #11161c 0%, #0d1116 48%, #090c0f 100%) !important;
}

/* finer, more technical grid overlay */
body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) !important;
  background-size: 96px 96px !important;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 66%) !important;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 66%) !important;
}

::selection { background: rgba(225, 38, 47, 0.32); color: #fff; }
::-moz-selection { background: rgba(225, 38, 47, 0.32); color: #fff; }

/* tabular figures on every data surface */
table, .card-value, .summary-value, .spark-total, .transit-count,
.chart-center-text, .metric-value, .cycle-value, .metric-card, tbody td {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4,
.title, .header h1, .header h2, .header h3,
body > form h2, .card h2, .box h2, .detail-card h2,
.container h2, .modal-container h1, .modal-container h2 {
  letter-spacing: -0.01em !important;
  font-weight: 640 !important;
  color: var(--apple-text) !important;
}

/* eyebrow micro-caps for small labels above data */
.summary-card .card-title,
.base-card .base-title,
.spark-label,
.section-subtitle,
.card-title {
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  color: var(--ind-muted) !important;
}

/* IDs / serials / telemetry read as machine values */
.device-id, .gyro-link, .assignment-time, code, kbd, samp, .mono {
  font-family: var(--ind-mono) !important;
  letter-spacing: 0 !important;
}

/* ---------- Flat matte panels ---------- */
body > form, body > .card, body > .box, body > .login-box,
body > .modal-container, .detail-card, .toc, .section, .device-section,
.message-box, .message-content, .container > .header, .summary-card,
.spark-card, .transit-card, .base-card, .responsible-devices-module,
.device-card, .unsynced-box, .thumb, .entry, .pager, .scroll-hint,
.table-grid .header, .table-grid .cell, #preview, #device-info table,
.summary-item, .table-wrap, .chart-card, .detail-nav, .metric-card,
.cycle-card, .timeline-event, .job-info-panel, .unassigned-gps-panel,
.gps-selected-detail, .steps, .filter-section, .instructions, .contact {
  background: var(--ind-panel) !important;
  border: 1px solid var(--ind-line) !important;
  border-radius: var(--apple-radius-lg) !important;
  box-shadow: var(--apple-shadow-md) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* thin brand rail on primary framed surfaces */
body > form, body > .card, body > .box, body > .login-box,
body > .modal-container {
  border-top: 2px solid var(--industrial-rail) !important;
}

/* ---------- Header / command bar ---------- */
.dashboard { padding: 24px 22px 40px !important; }

.dashboard > .header {
  max-width: 1180px;
  padding: 20px 24px !important;
  background:
    linear-gradient(90deg, rgba(225, 38, 47, 0.10), transparent 30%),
    linear-gradient(180deg, #171e25, #12171d) !important;
  border: 1px solid var(--ind-line) !important;
  border-top: 2px solid var(--industrial-rail) !important;
  border-radius: var(--apple-radius-lg) !important;
  box-shadow: var(--apple-shadow-md) !important;
}
.dashboard > .header h1 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem) !important;
  letter-spacing: -0.012em !important;
  gap: 12px;
}

/* keep KPI / spark / map / bases aligned to header width */
.summary-cards, #spark-container, #transit-module, #map-container,
.bases-grid, .responsible-devices-module, .transit-detail {
  max-width: 1180px !important;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 208px;
  background: linear-gradient(180deg, #0e1318, #0a0d11) !important;
  border-right: 1px solid var(--ind-line) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.sidebar h3 {
  color: var(--ind-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.14em !important;
  font-size: 0.68rem !important;
  margin: 20px 0 8px !important;
}
.sidebar ul li {
  position: relative;
  color: var(--ind-text-2) !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  letter-spacing: 0 !important;
  padding: 9px 12px !important;
  border: 1px solid transparent !important;
  border-radius: var(--apple-radius-sm) !important;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease !important;
}
.sidebar ul li:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: inset 3px 0 0 var(--industrial-rail) !important;
  font-size: 0.9rem !important;
}

/* Reserve the fixed navigation rail so dashboard charts never paint under it. */
body:has(.site-logo-shell--dashboard) > .sidebar {
  z-index: 320;
  scrollbar-gutter: stable;
  isolation: isolate;
}

body:has(.site-logo-shell--dashboard) > .dashboard {
  flex: 1 1 auto;
  width: calc(100% - 208px);
  min-width: 0;
  max-width: none;
  margin: 0 0 0 208px !important;
  overflow-x: clip;
}

/* ---------- KPI summary tiles ---------- */
.summary-cards { gap: 12px !important; }
.summary-card {
  min-height: 94px;
  padding: 15px 16px !important;
  border-radius: var(--apple-radius-md) !important;
  border-top: 2px solid var(--ind-line-strong) !important;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.card-value {
  font-family: var(--ind-mono) !important;
  font-weight: 600 !important;
  font-size: clamp(1.7rem, 3vw, 2.25rem) !important;
  letter-spacing: -0.01em !important;
}
.summary-card.clickable:hover {
  transform: translateY(-1px) !important;
  box-shadow: var(--apple-shadow-md) !important;
}
#cardNormal  { border-top-color: var(--apple-green)  !important; }
#cardMaint   { border-top-color: var(--apple-yellow) !important; }
#cardAwait   { border-top-color: var(--apple-orange) !important; }
#cardTransit { border-top-color: var(--apple-cyan)   !important; }

/* ---------- Buttons ---------- */
button, .btn, .submit-btn,
input[type="submit"], input[type="button"],
input[type="file"]::file-selector-button {
  background: linear-gradient(180deg, #2f8ab8, #226f95) !important;
  color: #f6fbfd !important;
  border: 1px solid rgba(120, 200, 224, 0.26) !important;
  border-radius: var(--apple-radius-md) !important;
  min-height: 40px;
  padding: 9px 16px !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  letter-spacing: 0.01em !important;
  box-shadow: var(--apple-shadow-md), var(--ind-shadow-inset) !important;
  transition: filter 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease !important;
}
button:hover, .btn:hover, .submit-btn:hover,
input[type="submit"]:hover, input[type="button"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.34), var(--ind-shadow-inset) !important;
}
.btn.delete, .clear-btn {
  background: linear-gradient(180deg, #e23b43, #bf1d26) !important;
  border-color: rgba(255, 130, 136, 0.3) !important;
}
.btn.save-sync { background: linear-gradient(180deg, #3f9ad1, #2b7fb0) !important; }

/* secondary / ghost */
.back-btn, a.back {
  min-height: 36px;
  padding: 7px 14px !important;
  color: var(--ind-text-2) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--ind-line-strong) !important;
  border-radius: var(--apple-radius-md) !important;
  box-shadow: none !important;
  font-weight: 500;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.back-btn:hover, a.back:hover { background: rgba(255, 255, 255, 0.08) !important; }

/* ---------- Inputs ---------- */
input, select, textarea {
  background: #0d1217 !important;
  color: var(--apple-text) !important;
  border: 1px solid var(--ind-line-strong) !important;
  border-radius: var(--apple-radius-md) !important;
  font-size: 0.9rem !important;
  box-shadow: var(--ind-shadow-inset) !important;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(92, 204, 210, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(52, 166, 173, 0.16), var(--ind-shadow-inset) !important;
}
select option { background: #10161c !important; }
.field input, .field select, .field textarea,
.form-row input, .form-row select, .form-row textarea,
.filter-controls input, .filter-controls select {
  min-height: 42px;
  padding: 10px 13px !important;
}

/* ---------- Tables — engineering data grid ---------- */
table, body > table { border-radius: var(--apple-radius-md) !important; }
th {
  background: var(--ind-panel-head) !important;
  color: var(--ind-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  padding: 11px 14px !important;
  border-bottom: 1px solid var(--ind-line-strong) !important;
}
td {
  padding: 10px 14px !important;
  font-size: 0.9rem !important;
  color: var(--apple-text) !important;
  background: transparent !important;
  border-bottom: 1px solid var(--ind-line) !important;
}
tr:nth-child(even) td { background: rgba(255, 255, 255, 0.014) !important; }
tbody tr:hover td, tbody tr:hover { background: rgba(52, 166, 173, 0.08) !important; }
td.num, .num, td .mono { font-family: var(--ind-mono) !important; }

/* ---------- Status chips & badges ---------- */
.status-正常工作, .status-维保中, .status-待出库, .status-待运输,
.status-待库管入库确认, .status-待库管出库确认,
.status-在途（去）, .status-在途（回）,
.status-normal, .status-maint, .status-await, .status-transit,
.status-pill, .pill, .badge, .card-header .status {
  border-radius: 4px !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
}
.device-status { box-shadow: none !important; }

/* ---------- Alert surfaces (critical) ---------- */
.responsible-devices-module {
  background:
    linear-gradient(90deg, rgba(225, 38, 47, 0.14), rgba(20, 26, 32, 0.99) 40%) !important;
  border: 1px solid rgba(225, 38, 47, 0.26) !important;
  border-top: 2px solid var(--industrial-rail) !important;
  border-radius: var(--apple-radius-lg) !important;
  box-shadow: var(--apple-shadow-md) !important;
}
.alert-panel, .alert-card.danger, .cycle-card.has-alert, .cycle-alert,
.timeline-item.alert, .timeline-event.alert {
  border-color: rgba(225, 38, 47, 0.3) !important;
  border-left: 3px solid var(--industrial-rail) !important;
  background: linear-gradient(90deg, rgba(225, 38, 47, 0.15), rgba(18, 23, 28, 0.99) 40%) !important;
  box-shadow: var(--apple-shadow-md) !important;
}

/* ---------- Charts / map / legends ---------- */
#spark-container, #map-container, .spark-legend, .chart-card {
  background: var(--ind-panel) !important;
  border: 1px solid var(--ind-line) !important;
  border-radius: var(--apple-radius-lg) !important;
  box-shadow: var(--apple-shadow-md) !important;
}
.spark-legend { border-radius: var(--apple-radius-md) !important; padding: 10px 16px !important; }
.bars { background: rgba(255, 255, 255, 0.04) !important; border-radius: 3px !important; }
.card-value, .spark-total, .transit-count, .chart-center-text {
  color: var(--ind-cyan-2) !important;
}

/* ---------- Detail page (gyro_data_detail) ---------- */
.topbar { border-bottom: 1px solid var(--ind-line) !important; }
.title-block h1 { font-size: clamp(1.45rem, 2.5vw, 1.95rem) !important; }
.summary-item { border-top: 2px solid var(--apple-cyan) !important; }
.summary-value, .metric-value {
  font-family: var(--ind-mono) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}
.detail-nav a { border-radius: var(--apple-radius-sm) !important; }
.detail-nav a:hover, .detail-nav a:focus-visible, .detail-nav a.is-active {
  color: #fff !important;
  background: rgba(52, 166, 173, 0.14) !important;
  border-color: rgba(92, 204, 210, 0.26) !important;
  box-shadow: inset 0 -2px 0 var(--industrial-rail) !important;
}

/* ---------- Top-bar utility buttons ---------- */
#helpBtn, #searchBtn, #notifBtn {
  border-radius: var(--apple-radius-md) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--ind-line-strong) !important;
  box-shadow: none !important;
}
#helpBtn:hover, #searchBtn:hover, #notifBtn:hover {
  background: rgba(52, 166, 173, 0.14) !important;
  border-color: rgba(92, 204, 210, 0.28) !important;
}
#notifBadge { background: var(--industrial-rail) !important; }
#notifDropdown {
  background: var(--ind-panel-raised) !important;
  border: 1px solid var(--ind-line-strong) !important;
  border-radius: var(--apple-radius-md) !important;
}
.hamburger {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--ind-line-strong) !important;
  border-radius: var(--apple-radius-sm) !important;
  box-shadow: none !important;
}

/* ---------- Hover lifts (trimmed, precise) ---------- */
.base-card:hover, .device-card:hover, .transit-card:hover, .thumb:hover {
  transform: translateY(-1px) !important;
  box-shadow: var(--apple-shadow-md) !important;
  border-color: var(--ind-line-strong) !important;
}

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
::-webkit-scrollbar-thumb {
  background: rgba(120, 140, 152, 0.32) !important;
  border-radius: 6px;
  border: 2px solid #0d1116;
}
::-webkit-scrollbar-thumb:hover { background: rgba(52, 166, 173, 0.5) !important; }

/* ---------- Focus visibility (accessibility) ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible,
.sidebar ul li:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid rgba(92, 204, 210, 0.7) !important;
  outline-offset: 2px;
}

/* ---------- Login (first impression) ---------- */
body > .login-box {
  border-top: 2px solid var(--industrial-rail) !important;
  border-radius: var(--apple-radius-lg) !important;
}
.login-box h2 { letter-spacing: -0.01em !important; }

/* ---------- Responsive polish ---------- */
@media (max-width: 768px) {
  .dashboard > .header { padding: 16px 16px !important; border-radius: var(--apple-radius-md) !important; }
  .summary-card { min-height: 88px; }
  .sidebar { width: 200px; }
  body:has(.site-logo-shell--dashboard) > .dashboard {
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
  }
}
