:root {
  --preview-card-gap: 14px;
  --device-card-title-size: 16px;
  --device-card-title-weight: 700;
  --device-card-title-line-height: 1.35;
}

:is(.compressor-status-card .compressor-status-heading, .health-analysis .health-heading,
    .management-main .device-management-card-header, .management-main .settings-card-header) {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: space-between;
}
:is(.compressor-status-heading .compressor-state, .health-heading .n-tag,
    .management-main .device-status-badge, .management-main .device-management-badge) {
  align-items: center;
  background: #f1f5f8;
  border: 1px solid #d8e5ee;
  border-radius: 999px;
  box-sizing: border-box;
  color: #496378;
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  gap: 6px;
  line-height: 1.2;
  min-height: 26px;
  padding: 4px 9px;
  white-space: nowrap;
}
.compressor-status-heading .compressor-state strong {
  font-size: inherit;
  font-weight: inherit;
}
:is(.management-main .device-status-badge.online, .compressor-status-heading .compressor-state.is-running) {
  background: #e9f7ef;
  border-color: #cde8d8;
  color: #17634e;
}
.management-main .device-status-badge.offline {
  background: #fff0f2;
  border-color: #f3d6dd;
  color: #9a2640;
}
.compressor-status-card[data-v-02e33782] + .health-analysis[data-v-f742f7d6] {
  margin-top: var(--preview-card-gap);
}

.content-card button.device-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: inherit;
}
.content-card .device-mode-switch:focus-visible {
  outline: 2px solid #145a96;
  outline-offset: 3px;
}
.content-card .device-switch-track {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 42px;
  height: 24px;
  padding: 3px;
  border-radius: 999px;
  background: #647a8d;
}
.content-card .device-switch-track::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}
.content-card .device-mode-switch[aria-checked="true"] .device-switch-track {
  justify-content: flex-end;
  background: #1567a2;
}

.content-card button.device-status-refresh {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

:is(.compressor-status-card .compressor-status-heading h2,
    .content-card.health-analysis .health-heading h2,
    .content-card[aria-label="冰箱長期休眠"] h2,
    .content-card[aria-label="庫內風扇模式"] h2,
    .management-main .device-management-card-title,
    .management-main .settings-card-title,
    .user-device-cards .content-card h2) {
  color: #333639;
  font-size: var(--device-card-title-size);
  font-weight: var(--device-card-title-weight);
  line-height: var(--device-card-title-line-height);
  margin: 0;
  text-align: left;
}

.refrigerator-sleep + .content-card[aria-label="庫內風扇模式"],
.content-card[aria-label="庫內風扇模式"] + .legacy-device-shell {
  margin-top: var(--preview-card-gap);
}

html.device-preview-embedded #adminDeviceView,
html.device-preview-embedded #adminDeviceView :is(
  .device-hub-page:not([hidden]), .device-config-content,
  .settings-list, .device-management-section
) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--preview-card-gap);
  margin: 0;
}
html.device-preview-embedded #adminDeviceView[hidden] { display: none; }

html.device-preview-embedded #adminDeviceView :is(.device-management-card,.settings-card) {
  margin: 0;
}

html.device-preview-embedded #adminDeviceView :is(.settings-card-header,.device-management-card-header) {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px 12px;
  text-align: left;
}

html.device-preview-embedded #adminDeviceView :is(.settings-card-header,.device-management-card-header) > div:first-child {
  min-width: 0;
  flex: 1 1 140px;
  text-align: left;
}

html.device-preview-embedded #adminDeviceView .settings-card-header :is(.device-management-card-note,p) {
  margin: 4px 0 0;
  text-align: left;
}

.device-temperature-shell {
  margin-bottom: var(--preview-card-gap);
}
.legacy-device-frame.device-temperature-frame {
  min-height: 0;
  background: transparent;
}
html.device-temperature-only :is(#hardwareControlPanel,#wifiSettingsPanel),
html.device-operation-rest #controlSettings {
  display: none !important;
}

html.device-preview-embedded #commonFooter {
  display: none;
}

.daily-temperature-record-card + .export-card {
  margin-top: var(--preview-card-gap);
}

:is(.export-card,.daily-temperature-record-card) > .export-card-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}
.export-card-summary::-webkit-details-marker {
  display: none;
}
.export-card-summary h2 {
  margin: 0;
  font-size: var(--device-card-title-size);
  font-weight: var(--device-card-title-weight);
  line-height: var(--device-card-title-line-height);
}
.export-card-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-inline-end: 3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
:is(.export-card,.daily-temperature-record-card)[open] > .export-card-summary::after {
  transform: rotate(225deg);
}
.export-card-instructions {
  margin: 0 0 12px;
}

.daily-temperature-record-card .record-context {
  font-size: 13px;
  color: #526c81;
  margin: 8px 0;
}
.daily-temperature-record-card :is(.record-date-nav,.record-periods) {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.daily-temperature-record-card .record-date-nav {
  grid-template-columns: auto minmax(0,1fr) auto;
}
.daily-temperature-record-card .record-periods {
  grid-template-columns: 1fr 1fr;
}
.daily-temperature-record-card :is(button,input) {
  min-height: 44px;
  min-width: 0;
  padding: 0 6px;
  border: 1px solid #bfd4e3;
  border-radius: 8px;
  color: inherit;
  background: #fff;
}
.daily-temperature-record-card input { width: 100%; }
.daily-temperature-record-card button[aria-pressed="true"] { background: #dceffc; color: #07588c; }
.daily-temperature-record-card button:disabled { opacity: .5; }
.daily-temperature-record-card table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.daily-temperature-record-card :is(th,td) {
  padding: 8px 3px;
  border-bottom: 1px solid #e4edf3;
  text-align: right;
  white-space: nowrap;
}
.daily-temperature-record-card th:first-child { text-align: left; }
.daily-temperature-record-card thead { font-size: 12px; color: #526c81; }
.daily-temperature-record-card tbody { font-size: 14px; }

.user-device-cards {
  gap: var(--preview-card-gap);
}
.user-device-cards .content-card .card-heading {
  text-align: left;
}
main:has(.user-device-cards) .eyebrow:empty {
  display: none;
}

.user-device-cards .detail-list {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 0;
  padding: 0;
  margin: 0;
}
.user-device-cards .detail-list > div {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.35fr);
  align-items: center;
  gap: 8px 12px;
  padding: 6px 0;
  margin: 0;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid #edf2f6;
  border-radius: 0;
  background: transparent;
}
.user-device-cards .detail-list dt {
  color: #526b7f;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.user-device-cards .detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #333639;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-align: right;
}

.user-device-cards .inspection-card {
  border-left-width: 1px;
}
.user-device-cards .inspection-card .detail-list > div {
  padding-block: 8px;
}
.user-device-cards .inspection-card .detail-list dd > span {
  display: block;
}
.user-device-cards .inspection-card-copy {
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.5;
}
