/*
 * MSE IoT Cloud common style
 *
 * 方針：
 * - 基調色はMSEロゴカラー #113182
 * - 画面固有の見た目は各セクションに記載
 * - 全画面共通の文字サイズ・余白調整は末尾の
 *   Responsive typography/densityに集約する
 * - 既存CSSを上書きする調整は、なるべく末尾に集約する
 */

:root {
  --mse-primary: #113182;
  --mse-primary-dark: #0b235f;
  --mse-primary-light: #eef3ff;
  --mse-primary-soft: #f5f7fc;

  --mse-bg: #f4f7fb;
  --mse-surface: #ffffff;
  --mse-border: #dbe3f0;
  --mse-border-soft: #edf1f7;

  --mse-text: #1f2937;
  --mse-text-muted: #6b7280;

  --mse-success: #198754;
  --mse-success-soft: #eaf7ef;

  --mse-warning: #f0ad00;
  --mse-warning-soft: #fff7df;

  --mse-danger: #dc3545;
  --mse-danger-soft: #fff0f1;

  --mse-secondary: #6c757d;
  --mse-secondary-soft: #f1f3f5;

  --mse-info: #0d6efd;
  --mse-info-soft: #eef5ff;

  --mse-radius-sm: 0.5rem;
  --mse-radius: 0.85rem;
  --mse-radius-lg: 1.1rem;

  --mse-shadow-sm: 0 4px 14px rgba(17, 49, 130, 0.08);
  --mse-shadow: 0 10px 28px rgba(17, 49, 130, 0.12);

  /* Typography / density */
  --mse-font-page-title: 1.65rem;
  --mse-font-card-title: 1.08rem;
  --mse-font-normal: 1rem;
  --mse-font-small: 0.92rem;
  --mse-font-table: 0.95rem;
  --mse-font-badge: 0.9rem;

  --mse-font-info-number: 1.65rem;
  --mse-font-sensor-value: 1.55rem;
  --mse-font-latest-value: 2.1rem;
  --mse-font-daily-value: 2.35rem;

  --mse-density-card-padding: 1rem;
  --mse-density-card-padding-compact: 0.9rem;
}

/* =========================================================
   Base
   ========================================================= */

html,
body {
  min-height: 100%;
}

body {
  font-family: "Yu Gothic", "Meiryo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--mse-text);
  background-color: var(--mse-bg);
}

a {
  color: var(--mse-primary);
}

a:hover {
  color: var(--mse-primary-dark);
}

.bg-body-tertiary {
  background-color: var(--mse-bg) !important;
}

.text-muted {
  color: var(--mse-text-muted) !important;
}

/* =========================================================
   Bootstrap color override
   ========================================================= */

.btn-primary {
  --bs-btn-bg: var(--mse-primary);
  --bs-btn-border-color: var(--mse-primary);
  --bs-btn-hover-bg: var(--mse-primary-dark);
  --bs-btn-hover-border-color: var(--mse-primary-dark);
  --bs-btn-active-bg: var(--mse-primary-dark);
  --bs-btn-active-border-color: var(--mse-primary-dark);
  box-shadow: 0 6px 16px rgba(17, 49, 130, 0.18);
}

.btn-outline-primary {
  --bs-btn-color: var(--mse-primary);
  --bs-btn-border-color: var(--mse-primary);
  --bs-btn-hover-bg: var(--mse-primary);
  --bs-btn-hover-border-color: var(--mse-primary);
  --bs-btn-active-bg: var(--mse-primary-dark);
  --bs-btn-active-border-color: var(--mse-primary-dark);
}

.btn-outline-secondary {
  border-color: #c8d1df;
  color: #475569;
}

.btn-outline-secondary:hover {
  background-color: #eef2f7;
  border-color: #b8c3d4;
  color: #1f2937;
}

.form-control,
.form-select,
.input-group-text {
  border-color: var(--mse-border);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--mse-primary);
  box-shadow: 0 0 0 0.18rem rgba(17, 49, 130, 0.16);
}

.badge {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.text-bg-primary {
  background-color: var(--mse-primary) !important;
}

.text-bg-success {
  background-color: var(--mse-success) !important;
}

.text-bg-warning {
  color: #3b2a00 !important;
  background-color: var(--mse-warning) !important;
}

.text-bg-danger {
  background-color: var(--mse-danger) !important;
}

.text-bg-secondary {
  background-color: var(--mse-secondary) !important;
}

.text-bg-info {
  background-color: var(--mse-info) !important;
}

/* =========================================================
   Header/Sidebar
   ========================================================= */

.navbar-logo-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background-color: #ffffff;
  border: 1px solid var(--mse-border-soft);
  border-radius: 0.45rem;
  padding: 0.2rem;
  box-shadow: 0 2px 8px rgba(17, 49, 130, 0.08);
}

.app-header {
  min-height: 58px;
  background-color: var(--mse-surface) !important;
  border-bottom: 1px solid var(--mse-border-soft);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.navbar-brand {
  color: var(--mse-primary) !important;
  letter-spacing: 0.01em;
}

.app-sidebar {
  background: linear-gradient(180deg, var(--mse-primary) 0%, var(--mse-primary-dark) 100%) !important;
  color: #ffffff;
  border-right: 0;
  box-shadow: 8px 0 24px rgba(17, 49, 130, 0.12) !important;
}

.sidebar-brand {
  min-height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-link {
  color: #ffffff !important;
  text-decoration: none;
}

.brand-link:hover {
  color: #ffffff !important;
}

.brand-text {
  color: #ffffff;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
}

/* 次工程でロゴ画像をHTMLに入れるときに使用する想定 */
.brand-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-right: 0.55rem;
  background-color: #ffffff;
  border-radius: 0.45rem;
  padding: 0.25rem;
}

.sidebar-wrapper .nav-link {
  color: rgba(255, 255, 255, 0.82) !important;
  border-radius: 0.75rem;
  margin: 0.15rem 0.65rem;
  padding: 0.72rem 0.85rem;
}

.sidebar-wrapper .nav-link:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.12) !important;
}

.sidebar-wrapper .nav-link.active {
  color: var(--mse-primary) !important;
  background-color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.sidebar-wrapper .nav-icon {
  margin-right: 0.45rem;
}

/* =========================================================
   Layout
   ========================================================= */

.app-content-header {
  padding-top: 1.25rem;
  padding-bottom: 0.75rem;
}

.app-content-header h3 {
  color: var(--mse-text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.breadcrumb {
  font-size: 0.85rem;
}

.app-content {
  padding-bottom: 1.5rem;
}

.app-footer {
  color: var(--mse-text-muted);
  background-color: var(--mse-surface);
  border-top: 1px solid var(--mse-border-soft);
}

/* =========================================================
   Login
   ========================================================= */

.login-logo-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.login-page {
  background:
    radial-gradient(circle at top left, rgba(17, 49, 130, 0.18), transparent 34rem),
    linear-gradient(135deg, #f6f8fd 0%, #eaf0f9 100%);
}

.login-box {
  width: 390px;
}

.login-logo {
  margin-bottom: 1rem;
}

.login-logo a {
  color: var(--mse-primary);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.login-logo-logo {
  display: block;
  width: 72px;
  max-height: 72px;
  object-fit: contain;
  margin: 0 auto 0.75rem;
}

.login-box .card {
  overflow: hidden;
  border: 1px solid rgba(17, 49, 130, 0.08);
  border-radius: var(--mse-radius-lg);
  box-shadow: var(--mse-shadow);
}

.login-card-body {
  padding: 2rem;
  border-radius: var(--mse-radius-lg);
}

.login-box-msg {
  color: var(--mse-text);
  font-size: 1.15rem;
  font-weight: 700;
}

.login-subtitle {
  color: var(--mse-text-muted);
  font-size: 0.92rem;
}

.login-error-message {
  display: none;
  border: 0;
  border-left: 4px solid var(--mse-danger);
  border-radius: var(--mse-radius-sm);
  background-color: var(--mse-danger-soft);
}

.login-error-message.is-visible {
  display: block;
}

.login-page .input-group-text {
  background-color: var(--mse-primary-soft);
  color: var(--mse-primary);
}

.login-page .btn-primary {
  min-height: 42px;
  font-weight: 700;
}

/* =========================================================
   Card/Box common
   ========================================================= */

.card {
  border: 1px solid var(--mse-border-soft);
  border-radius: var(--mse-radius);
  box-shadow: var(--mse-shadow-sm);
}

.card-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--mse-border-soft);
  border-top-left-radius: var(--mse-radius) !important;
  border-top-right-radius: var(--mse-radius) !important;
}

.card-title {
  color: var(--mse-text);
  font-weight: 700;
}

.card-tools .btn-tool {
  color: var(--mse-text-muted);
}

.card-tools .btn-tool:hover {
  color: var(--mse-primary);
}

.card.card-outline {
  border-top: 0;
}

.card.card-outline::before {
  display: block;
  width: 100%;
  height: 4px;
  content: "";
  border-top-left-radius: var(--mse-radius);
  border-top-right-radius: var(--mse-radius);
  background-color: var(--mse-primary);
}

.card.card-primary::before {
  background-color: var(--mse-primary);
}

.card.card-success::before {
  background-color: var(--mse-success);
}

.card.card-info::before {
  background-color: var(--mse-info);
}

.card.card-warning::before {
  background-color: var(--mse-warning);
}

.card.card-danger::before {
  background-color: var(--mse-danger);
}

.info-box {
  overflow: hidden;
  min-height: 86px;
  border: 1px solid var(--mse-border-soft);
  border-radius: var(--mse-radius);
  background-color: var(--mse-surface);
  box-shadow: var(--mse-shadow-sm);
}

.info-box .info-box-icon {
  width: 62px;
  border-radius: var(--mse-radius-sm);
  margin: 0.75rem 0 0.75rem 0.75rem;
}

.info-box .info-box-content {
  padding: 0.85rem 0.9rem;
}

.info-box .info-box-text {
  color: var(--mse-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.info-box .info-box-number {
  color: var(--mse-text);
  font-size: 1.45rem;
  font-weight: 800;
}

.info-box-date {
  font-size: 0.85rem !important;
  line-height: 1.25;
  word-break: keep-all;
}

/* =========================================================
   Dashboard sensor card
   ========================================================= */

.sensor-card {
  overflow: hidden;
  border: 1px solid var(--mse-border-soft);
  border-top-width: 0;
  border-left-width: 5px;
  border-radius: var(--mse-radius);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.sensor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--mse-shadow);
}

.sensor-card .card-header {
  min-height: 84px;
}

.sensor-card .card-title {
  font-size: 1.02rem;
}

.sensor-card-normal {
  border-left-color: var(--mse-success);
}

.sensor-card-warning {
  border-left-color: var(--mse-warning);
}

.sensor-card-danger {
  border-left-color: var(--mse-danger);
}

.sensor-card-nodata,
.sensor-card-inactive {
  border-left-color: var(--mse-secondary);
}

.sensor-card-normal .card-header {
  background-color: var(--mse-success-soft);
}

.sensor-card-warning .card-header {
  background-color: var(--mse-warning-soft);
}

.sensor-card-danger .card-header {
  background-color: var(--mse-danger-soft);
}

.sensor-card-nodata .card-header,
.sensor-card-inactive .card-header {
  background-color: var(--mse-secondary-soft);
}

.sensor-item-grid {
  display: grid;
  gap: 0.75rem;
}

.sensor-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid var(--mse-border-soft);
  border-radius: var(--mse-radius-sm);
  background-color: #ffffff;
}

.sensor-item-name {
  color: var(--mse-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.sensor-item-value {
  color: var(--mse-text);
  font-size: 1.35rem;
  font-weight: 800;
  white-space: nowrap;
}

.sensor-item-unit {
  margin-left: 0.15rem;
  color: var(--mse-text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

/* =========================================================
   Sensor detail
   ========================================================= */

.small-box {
  overflow: hidden;
  border-radius: var(--mse-radius);
  box-shadow: var(--mse-shadow-sm);
}

.small-box .inner {
  padding: 1rem 1.1rem;
}

.small-box h4 {
  font-weight: 800;
}

.small-box .icon {
  opacity: 0.28;
}

.small-box.text-bg-primary {
  background: linear-gradient(135deg, var(--mse-primary), #2654bd) !important;
}

.small-box.text-bg-info {
  background: linear-gradient(135deg, #0d6efd, #4f8dff) !important;
}

.small-box.text-bg-success {
  background: linear-gradient(135deg, var(--mse-success), #27a467) !important;
}

.detail-table th {
  width: 9rem;
  white-space: nowrap;
  color: var(--mse-text-muted);
  background-color: #f8fafc;
}

.detail-table td {
  color: var(--mse-text);
}

.latest-item-card {
  overflow: hidden;
  border-top: 0;
  border-left: 5px solid var(--mse-success);
}

.latest-item-card .card-body {
  padding: 1rem;
}

.latest-item-value {
  color: var(--mse-text);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.latest-item-value span {
  margin-left: 0.2rem;
  color: var(--mse-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 320px;
}

/* =========================================================
   Receive logs
   ========================================================= */

.receive-log-table-wrapper {
  min-height: 240px;
}

.table {
  --bs-table-striped-bg: #f8fafc;
  --bs-table-hover-bg: #eef3ff;
}

.table thead th {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  background-color: #f1f5f9;
  border-bottom: 1px solid var(--mse-border);
}

.table tbody td {
  vertical-align: middle;
}

.table-sm > :not(caption) > * > * {
  padding: 0.55rem 0.65rem;
}

.request-id-text {
  display: inline-block;
  max-width: 12rem;
  overflow: hidden;
  color: #475569;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.receive-log-message {
  max-width: 24rem;
  white-space: normal;
  word-break: break-word;
}

/* =========================================================
   Alert/Loading
   ========================================================= */

.alert {
  border: 0;
  border-radius: var(--mse-radius);
  box-shadow: var(--mse-shadow-sm);
}

.alert-danger {
  color: #842029;
  background-color: var(--mse-danger-soft);
  border-left: 5px solid var(--mse-danger);
}

.spinner-border.text-primary {
  color: var(--mse-primary) !important;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 991.98px) {
  .app-content-header {
    padding-top: 1rem;
  }

  .info-box {
    min-height: 78px;
  }

  .info-box .info-box-number {
    font-size: 1.25rem;
  }
}

@media (max-width: 767.98px) {
  .app-header .navbar-nav .nav-item.me-3 {
    margin-right: 0.6rem !important;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .app-content-header h3 {
    font-size: 1.25rem;
  }

  .card-body {
    padding: 0.95rem;
  }

  .request-id-text {
    max-width: 8rem;
  }

  .receive-log-message {
    max-width: 16rem;
  }
}

@media (max-width: 575.98px) {
  .login-box {
    width: calc(100% - 2rem);
  }

  .login-card-body {
    padding: 1.5rem;
  }

  .sensor-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .sensor-item-value {
    font-size: 1.15rem;
  }

  .detail-table th {
    width: 7rem;
  }

  .latest-item-value {
    font-size: 1.45rem;
  }

  .chart-container {
    height: 260px;
  }

  .table-sm > :not(caption) > * > * {
    padding: 0.48rem 0.55rem;
  }
}

/* =========================================================
   Sidebar
   - サイドバー通常表示
   - 折りたたみ
   - 折りたたみ時ホバー
   ========================================================= */

/* サイドバー文字色 */
.app-sidebar,
.app-sidebar .nav-link,
.app-sidebar .nav-link p,
.app-sidebar .nav-link i,
.app-sidebar .sidebar-brand .brand-link,
.app-sidebar .sidebar-brand .brand-link:visited,
.app-sidebar .sidebar-brand .brand-link:hover,
.app-sidebar .sidebar-brand .brand-text {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* 通常展開時のメニュー */
body:not(.sidebar-collapse) .app-sidebar .sidebar-wrapper .nav-link {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  width: auto;
  margin: 0.15rem 0.75rem !important;
  padding: 0.72rem 1rem !important;
  border-radius: 0.75rem;
}

body:not(.sidebar-collapse) .app-sidebar .sidebar-wrapper .nav-icon {
  width: 1.25rem;
  margin-left: 0 !important;
  margin-right: 0.65rem !important;
  text-align: center;
}

body:not(.sidebar-collapse) .app-sidebar .sidebar-wrapper .nav-link p {
  margin: 0;
}

/* メニュー hover / active */
.app-sidebar .sidebar-wrapper .nav-link:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.12) !important;
}

.app-sidebar .sidebar-wrapper .nav-link.active {
  color: var(--mse-primary) !important;
  background-color: #ffffff !important;
  border-radius: 0.75rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.app-sidebar .sidebar-wrapper .nav-link.active p,
.app-sidebar .sidebar-wrapper .nav-link.active i {
  color: var(--mse-primary) !important;
}

/* ヘッダのサイドバー開閉ボタン */
.sidebar-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  margin-right: 0.35rem;
  color: var(--mse-primary) !important;
  border-radius: 0.75rem;
  text-decoration: none;
}

.sidebar-toggle-button:hover {
  color: var(--mse-primary-dark) !important;
  background-color: var(--mse-primary-light);
}

.sidebar-toggle-button i {
  font-size: 1.45rem;
  line-height: 1;
}

/* 折りたたみ時：ブランドロゴ中央寄せ */
body.sidebar-collapse .app-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.sidebar-collapse .app-sidebar .brand-link {
  display: flex !important;
  align-items: center;
  justify-content: center !important;
  width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.sidebar-collapse .app-sidebar .brand-text {
  display: none !important;
}

body.sidebar-collapse .app-sidebar .brand-logo-img {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 折りたたみ時：メニューアイコン中央寄せ */
body.sidebar-collapse .app-sidebar:not(:hover) .sidebar-wrapper .nav-link {
  display: flex !important;
  align-items: center;
  justify-content: center !important;
  width: auto;
  margin-left: 0.55rem !important;
  margin-right: 0.55rem !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.sidebar-collapse .app-sidebar:not(:hover) .sidebar-wrapper .nav-link p {
  display: none !important;
}

body.sidebar-collapse .app-sidebar:not(:hover) .sidebar-wrapper .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  margin-left: 0 !important;
  margin-right: 0 !important;
  font-size: 1.15rem;
  text-align: center;
}

/* 折りたたみ状態でホバーした時：通常展開相当に戻す */
body.sidebar-collapse .app-sidebar:hover .brand-text {
  display: inline-block !important;
}

body.sidebar-collapse .app-sidebar:hover .brand-link {
  justify-content: center !important;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

body.sidebar-collapse .app-sidebar:hover .brand-logo-img {
  margin-left: 0 !important;
  margin-right: 0.55rem !important;
}

body.sidebar-collapse .app-sidebar:hover .sidebar-wrapper .nav-link {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  width: auto;
  margin-left: 0.75rem !important;
  margin-right: 0.75rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

body.sidebar-collapse .app-sidebar:hover .sidebar-wrapper .nav-link p {
  display: inline-block !important;
  margin: 0;
}

body.sidebar-collapse .app-sidebar:hover .sidebar-wrapper .nav-icon {
  width: 1.25rem;
  margin-left: 0 !important;
  margin-right: 0.65rem !important;
  font-size: 1rem;
  text-align: center;
}

/* スマホ幅ではAdminLTE標準の開閉挙動を優先 */
@media (max-width: 991.98px) {
  body.sidebar-collapse .app-sidebar .brand-text,
  body.sidebar-collapse .app-sidebar .nav-link p {
    display: inline-block !important;
  }

  body.sidebar-collapse .app-sidebar .nav-link {
    justify-content: flex-start !important;
  }

  body.sidebar-collapse .app-sidebar .nav-icon {
    margin-right: 0.45rem !important;
  }
}

/* =========================================================
   Dashboard sensor card
   - カードタイトル
   - 設置場所
   - 状態バッジ
   ========================================================= */

.sensor-card .card-body {
  padding: 1rem;
}

.sensor-item-name {
  color: #475569;
}

/* カードヘッダ */
.sensor-card .sensor-card-header,
.sensor-card .card-header.sensor-card-header {
  display: block !important;
  padding: 1rem 1rem 0.9rem;
  color: #ffffff;
  background: linear-gradient(135deg, #0d6efd 0%, var(--mse-primary) 100%);
}

.sensor-card-title-area {
  width: 100%;
  min-width: 0;
}

/* 1行目：端末名 + 状態バッジ */
.sensor-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
}

.sensor-card-title,
.sensor-card .card-header .sensor-card-title,
.sensor-card .card-header .card-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #ffffff !important;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 2行目：設置場所 */
.sensor-card-location-row {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.sensor-location-icon,
.sensor-card .card-header .bi-geo-alt,
.sensor-card .card-header .bi-geo-alt-fill {
  flex: 0 0 auto;
  margin-right: 0.4rem;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.95rem;
}

.sensor-card-location,
.sensor-card .card-header small,
.sensor-card .card-header .text-muted {
  display: inline-block;
  min-width: 0;
  color: rgba(255, 255, 255, 0.88) !important;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* カードタイトル部の状態バッジ */
.sensor-status-badge {
  flex: 0 0 auto;
  min-width: 6.2rem;
  padding: 0.72rem 1.1rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.sensor-status-badge.text-bg-success,
.sensor-card .badge.text-bg-success {
  color: #ffffff !important;
  background-color: var(--mse-success) !important;
}

.sensor-status-badge.text-bg-warning,
.sensor-card .badge.text-bg-warning {
  color: #2f2200 !important;
  background-color: var(--mse-warning) !important;
}

.sensor-status-badge.text-bg-danger,
.sensor-card .badge.text-bg-danger {
  color: #ffffff !important;
  background-color: var(--mse-danger) !important;
}

.sensor-status-badge.text-bg-secondary,
.sensor-card .badge.text-bg-secondary {
  color: #ffffff !important;
  background-color: #6c757d !important;
}

.info-box .badge {
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
}

@media (max-width: 575.98px) {
  .sensor-card-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .sensor-status-badge {
    min-width: 5.8rem;
    padding: 0.62rem 0.95rem;
    font-size: 0.98rem;
  }

  .sensor-card-location-row {
    font-size: 0.86rem;
  }
}

/* =========================================================
   Receive logs
   - サマリーコンパクト化
   - 検索条件固定表示
   ========================================================= */

/* 件数カード */
.receive-log-summary-row {
  margin-bottom: 0.35rem;
}

.receive-log-summary-row .info-box {
  min-height: 64px;
  margin-bottom: 0.75rem;
  border-radius: 0.75rem;
}

.receive-log-summary-row .info-box .info-box-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  margin: 0.55rem 0 0.55rem 0.65rem;
  font-size: 1.25rem;
  border-radius: 0.65rem;
}

.receive-log-summary-row .info-box .info-box-content {
  padding: 0.55rem 0.75rem;
}

.receive-log-summary-row .info-box .info-box-text {
  font-size: 0.78rem;
  line-height: 1.2;
}

.receive-log-summary-row .info-box .info-box-number {
  font-size: 1.25rem;
  line-height: 1.25;
}

/* 検索条件カード */
.receive-log-filter-card {
  position: static;
  margin-bottom: 0.85rem;
  border-radius: 0.85rem;
  background-color: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.receive-log-filter-card,
.receive-log-filter-card .card-header,
.receive-log-filter-card .card-body {
  background-color: #ffffff;
}

.receive-log-filter-card .card-header {
  padding: 0.65rem 1rem;
}

.receive-log-filter-card .card-title {
  font-size: 0.98rem;
}

.receive-log-filter-card .card-body {
  padding: 0.85rem 1rem;
}

.receive-log-filter-card .form-label {
  margin-bottom: 0.25rem;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

.receive-log-filter-card .form-control,
.receive-log-filter-card .form-select {
  min-height: 34px;
  padding-top: 0.32rem;
  padding-bottom: 0.32rem;
  font-size: 0.9rem;
}

.receive-log-filter-card .btn {
  min-height: 34px;
}

.receive-log-filter-actions .btn {
  min-height: 30px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* JSで固定状態にしたとき */
.receive-log-filter-card.is-fixed {
  position: fixed;
  top: 64px;
  left: var(--receive-log-filter-left);
  width: var(--receive-log-filter-width);
  z-index: 1040;
  margin-bottom: 0;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
}

.receive-log-filter-card.is-fixed .card-header {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.receive-log-filter-card.is-fixed .card-body {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* 固定中に元の位置の高さを保持するためのダミー */
.receive-log-filter-placeholder {
  display: none;
}

.receive-log-filter-placeholder.is-active {
  display: block;
}

.receive-log-table-wrapper {
  scroll-margin-top: 180px;
}

@media (max-width: 767.98px) {
  .receive-log-filter-card.is-fixed {
    position: static;
    width: auto;
  }

  .receive-log-filter-placeholder.is-active {
    display: none;
  }

  .receive-log-summary-row .info-box {
    min-height: 58px;
  }

  .receive-log-summary-row .info-box .info-box-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }
}

/* =========================================================
   Dashboard summary/Sensor detail small-box adjustment

   Bootstrap/AdminLTE既定スタイルを画面要件に合わせて上書きする領域
   ここでは「なぜ上書きするか」が分かるコメントを残し、
   個別プロパティごとの説明は増やしすぎない
   ========================================================= */

/* ダッシュボード上部サマリーカードの高さを揃える */
.dashboard-summary-row .info-box,
.app-content .info-box {
  min-height: 92px;
}

/* 最新受信カードの日時文字で縦幅が詰まって見えるため、他カードと高さを合わせる */
.info-box .info-box-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 最新受信日時の文字サイズ・行間を調整 */
.info-box-date {
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  color: var(--mse-text) !important;
  font-size: 0.92rem !important;
  font-weight: 700;
  line-height: 1.35;
}

/* センサ詳細画面の日時系カードは白文字で統一 */
.small-box.text-bg-primary,
.small-box.text-bg-info,
.small-box.text-bg-success,
.small-box.text-bg-warning,
.small-box.text-bg-danger,
.small-box.text-bg-secondary {
  color: #ffffff !important;
}

/* small-box内の見出し・本文・補足文字も白系にする */
.small-box.text-bg-primary h3,
.small-box.text-bg-primary h4,
.small-box.text-bg-primary p,
.small-box.text-bg-primary span,
.small-box.text-bg-primary small,
.small-box.text-bg-info h3,
.small-box.text-bg-info h4,
.small-box.text-bg-info p,
.small-box.text-bg-info span,
.small-box.text-bg-info small,
.small-box.text-bg-success h3,
.small-box.text-bg-success h4,
.small-box.text-bg-success p,
.small-box.text-bg-success span,
.small-box.text-bg-success small,
.small-box.text-bg-warning h3,
.small-box.text-bg-warning h4,
.small-box.text-bg-warning p,
.small-box.text-bg-warning span,
.small-box.text-bg-warning small,
.small-box.text-bg-danger h3,
.small-box.text-bg-danger h4,
.small-box.text-bg-danger p,
.small-box.text-bg-danger span,
.small-box.text-bg-danger small,
.small-box.text-bg-secondary h3,
.small-box.text-bg-secondary h4,
.small-box.text-bg-secondary p,
.small-box.text-bg-secondary span,
.small-box.text-bg-secondary small {
  color: #ffffff !important;
}

/* warning背景だけは必要に応じて濃い文字にしたい場合があるが、今回は白で統一 */
.small-box.text-bg-warning {
  color: #ffffff !important;
}

/* =========================================================
   Sensor detail top small-box icon adjustment
   - 上部カードのアイコンを右側に大きく表示
   ========================================================= */

/* small-box全体をアイコン配置しやすい形にする */
.small-box {
  position: relative;
  overflow: hidden;
  min-height: 118px;
}

/* 文字情報がアイコンに隠れないように右側余白を確保 */
.small-box .inner {
  position: relative;
  z-index: 2;
  padding: 1.1rem 5.4rem 1.1rem 1.2rem;
}

/* アイコンを右側に大きく、薄く表示 */
.small-box .icon {
  position: absolute;
  top: 50%;
  right: 1.1rem;
  bottom: auto;
  left: auto;
  z-index: 1;
  width: auto;
  height: auto;
  color: rgba(255, 255, 255, 0.28);
  font-size: 4.4rem;
  line-height: 1;
  transform: translateY(-50%);
  opacity: 1;
  pointer-events: none;
}

/* Bootstrap Icons / Font Awesome どちらでも大きくする */
.small-box .icon > i,
.small-box .icon > svg {
  font-size: 4.4rem;
  line-height: 1;
}

/* カード内の文字を読みやすくする */
.small-box h3,
.small-box h4 {
  margin-bottom: 0.35rem;
  font-weight: 800;
  line-height: 1.25;
}

.small-box p {
  margin-bottom: 0;
  font-weight: 600;
  line-height: 1.35;
}

/* スマホではアイコンを少し小さくする */
@media (max-width: 575.98px) {
  .small-box {
    min-height: 104px;
  }

  .small-box .inner {
    padding-right: 4.5rem;
  }

  .small-box .icon {
    right: 0.9rem;
    font-size: 3.6rem;
  }

  .small-box .icon > i,
  .small-box .icon > svg {
    font-size: 3.6rem;
  }
}

/* =========================================================
   WBGT judgement badge
   - ダッシュボードのWBGT詳細判定表示
   ========================================================= */

.sensor-item-wbgt {
  border-left: 4px solid var(--mse-primary);
}

.wbgt-judgement-badge {
  min-width: 5.2rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 999px;
  text-align: center;
}

.wbgt-badge-safe {
  color: #ffffff !important;
  background-color: #2563eb !important;
}

.wbgt-badge-caution {
  color: #063642 !important;
  background-color: #67e8f9 !important;
}

.wbgt-badge-alert {
  color: #3b2a00 !important;
  background-color: #facc15 !important;
}

.wbgt-badge-severe-alert {
  color: #ffffff !important;
  background-color: #f97316 !important;
}

.wbgt-badge-danger {
  color: #ffffff !important;
  background-color: #dc2626 !important;
}

/* =========================================================
   Dashboard auto refresh
   ========================================================= */

.auto-refresh-status,
#autoRefreshStatus {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background-color: #f8fafc;
  border: 1px solid var(--mse-border-soft);
  color: #64748b !important;
  font-size: 0.78rem;
  font-weight: 600;
  vertical-align: middle;
}

@media (max-width: 575.98px) {
  .auto-refresh-status,
  #autoRefreshStatus {
    display: none;
  }
}

/* =========================================================
   Floor map
   ========================================================= */

.floor-map-card {
  border-radius: 1rem;
  overflow: hidden;
}

.floor-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.floor-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 700;
}

.floor-map-dot {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
}

.floor-map-dot.is-normal {
  background-color: var(--mse-success);
}

.floor-map-dot.is-warning {
  background-color: var(--mse-warning);
}

.floor-map-dot.is-danger {
  background-color: var(--mse-danger);
}

.floor-map-dot.is-nodata {
  background-color: #6c757d;
}

.floor-map-stage {
  position: relative;
  width: 100%;
  min-height: 420px;
  overflow: auto;
  border: 1px solid var(--mse-border-soft);
  border-radius: 1rem;
  background: #f8fafc;
}

.floor-map-image {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
  user-select: none;
}

.floor-map-markers {
  position: absolute;
  inset: 0;
  min-width: 760px;
}

.floor-map-marker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 8.8rem;
  padding: 0.42rem 0.6rem;
  color: #ffffff;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.floor-map-marker:hover {
  color: #ffffff;
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.32);
}

.floor-map-marker.is-normal {
  background-color: var(--mse-success);
}

.floor-map-marker.is-warning {
  color: #2f2200;
  background-color: var(--mse-warning);
}

.floor-map-marker.is-danger {
  background-color: var(--mse-danger);
}

.floor-map-marker.is-nodata {
  background-color: #6c757d;
}

.floor-map-marker-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.18);
}

.floor-map-marker-dot i {
  font-size: 1rem;
  line-height: 1;
}

.floor-map-marker-label {
  display: inline-flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.floor-map-marker-name {
  max-width: 7.5rem;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-map-marker-status {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.92;
}

@media (max-width: 767.98px) {
  .floor-map-stage {
    min-height: 360px;
  }

  .floor-map-marker {
    min-width: 7.5rem;
    padding: 0.36rem 0.5rem;
  }

  .floor-map-marker-name {
    max-width: 6.4rem;
  }
}

.floor-map-stage {
  position: relative;
  width: 100%;
  min-height: 360px;
  max-height: calc(100vh - 260px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mse-border-soft);
  border-radius: 1rem;
  background: #f8fafc;
}

/* 画像とマーカーを同じ座標系にするためのラッパー */
.floor-map-canvas {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: calc(100vh - 290px);
}

/* ページを開いた時に概形が見えるよう、画像全体を収める */
.floor-map-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 290px);
  width: auto;
  height: auto;
  user-select: none;
}

/* マーカーは画像サイズに追従 */
.floor-map-markers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.floor-map-dot.is-wbgt-safe,
.floor-map-marker.is-wbgt-safe {
  background-color: #2563eb;
}

.floor-map-dot.is-wbgt-caution,
.floor-map-marker.is-wbgt-caution {
  background-color: #67e8f9;
}

.floor-map-marker.is-wbgt-caution {
  color: #063642;
}

.floor-map-dot.is-wbgt-alert,
.floor-map-marker.is-wbgt-alert {
  background-color: #facc15;
}

.floor-map-marker.is-wbgt-alert {
  color: #3b2a00;
}

.floor-map-dot.is-wbgt-severe-alert,
.floor-map-marker.is-wbgt-severe-alert {
  background-color: #f97316;
}

.floor-map-dot.is-wbgt-danger,
.floor-map-marker.is-wbgt-danger {
  background-color: #dc2626;
}

/* WBGT判定が取れない場合のフォールバック */
.floor-map-dot.is-nodata,
.floor-map-marker.is-nodata {
  background-color: #6c757d;
}

.floor-map-marker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 7.8rem;
  padding: 0.34rem 0.5rem;
  color: #ffffff;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.floor-map-marker:hover {
  color: #ffffff;
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.32);
}

.floor-map-marker-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.18);
}

.floor-map-marker-dot i {
  font-size: 0.9rem;
  line-height: 1;
}

.floor-map-marker-name {
  max-width: 6.8rem;
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-map-marker-status {
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.92;
}

@media (max-width: 767.98px) {
  .floor-map-stage {
    min-height: 300px;
    max-height: 420px;
    overflow: auto;
    justify-content: flex-start;
  }

  .floor-map-canvas,
  .floor-map-image {
    max-height: none;
    min-width: 640px;
  }

  .floor-map-marker {
    min-width: 7.2rem;
    padding: 0.32rem 0.45rem;
  }

  .floor-map-marker-name {
    max-width: 6.2rem;
  }
}

/* =========================================================
   Floor map heat spots
   ========================================================= */

.floor-map-heat-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floor-map-heat-spot {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  opacity: 0.28;
  filter: blur(10px);
  pointer-events: none;
}

/* WBGT 5段階 */
.floor-map-heat-spot.is-wbgt-safe {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.55) 0%, rgba(37, 99, 235, 0.22) 45%, rgba(37, 99, 235, 0) 75%);
}

.floor-map-heat-spot.is-wbgt-caution {
  background: radial-gradient(circle, rgba(103, 232, 249, 0.60) 0%, rgba(103, 232, 249, 0.24) 45%, rgba(103, 232, 249, 0) 75%);
}

.floor-map-heat-spot.is-wbgt-alert {
  background: radial-gradient(circle, rgba(250, 204, 21, 0.65) 0%, rgba(250, 204, 21, 0.26) 45%, rgba(250, 204, 21, 0) 75%);
}

.floor-map-heat-spot.is-wbgt-severe-alert {
  background: radial-gradient(circle, rgba(249, 115, 22, 0.68) 0%, rgba(249, 115, 22, 0.28) 45%, rgba(249, 115, 22, 0) 75%);
}

.floor-map-heat-spot.is-wbgt-danger {
  background: radial-gradient(circle, rgba(220, 38, 38, 0.72) 0%, rgba(220, 38, 38, 0.32) 45%, rgba(220, 38, 38, 0) 75%);
}

/* 未受信 */
.floor-map-heat-spot.is-nodata {
  background: radial-gradient(circle, rgba(107, 114, 128, 0.50) 0%, rgba(107, 114, 128, 0.18) 45%, rgba(107, 114, 128, 0) 75%);
}

/* マーカーはヒート円より前面 */
.floor-map-markers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.floor-map-marker {
  z-index: 3;
}

/* 少し小さめにもできる */
@media (max-width: 991.98px) {
  .floor-map-heat-spot {
    width: 96px;
    height: 96px;
  }
}

/* =========================================================
   Monitor view
   ========================================================= */

.monitor-body {
  min-height: 100vh;
  margin: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at top left, rgba(17, 49, 130, 0.95), rgba(15, 23, 42, 0.98) 48%),
    linear-gradient(135deg, #113182 0%, #0f172a 100%);
}

.monitor-page {
  min-height: 100vh;
  padding: 1.25rem;
}

.monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.25rem;
  background-color: rgba(15, 23, 42, 0.58);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.monitor-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.monitor-logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  padding: 0.35rem;
  border-radius: 1rem;
  background-color: #ffffff;
}

.monitor-system-name {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.monitor-subtitle {
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.95rem;
  font-weight: 700;
}

.monitor-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.monitor-clock,
.monitor-update {
  min-width: 10rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 1rem;
  background-color: rgba(255, 255, 255, 0.08);
}

.monitor-clock-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.monitor-clock-value {
  margin-top: 0.15rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.monitor-main {
  margin-top: 1.1rem;
}

.monitor-loading {
  padding: 5rem 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  font-weight: 700;
}

.monitor-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.monitor-summary-card {
  min-height: 6rem;
  padding: 0.85rem;
  border-radius: 1.15rem;
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.monitor-summary-card::after {
  content: "";
  position: absolute;
  right: -1.5rem;
  bottom: -1.8rem;
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.14);
}

.monitor-summary-card.is-total {
  background: linear-gradient(135deg, rgba(17, 49, 130, 0.96), rgba(59, 130, 246, 0.72));
}

.monitor-summary-card.is-safe {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.monitor-summary-card.is-caution {
  color: #063642;
  background: linear-gradient(135deg, #67e8f9, #22d3ee);
}

.monitor-summary-card.is-alert {
  color: #3b2a00;
  background: linear-gradient(135deg, #fde047, #facc15);
}

.monitor-summary-card.is-severe-alert {
  background: linear-gradient(135deg, #fb923c, #f97316);
}

.monitor-summary-card.is-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.monitor-summary-card.is-nodata {
  background: linear-gradient(135deg, #64748b, #475569);
}

.monitor-summary-label {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  opacity: 0.95;
}

.monitor-summary-value {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.18rem;
  margin-top: 0.35rem;
  font-size: 2.75rem;
  font-weight: 950;
  line-height: 1;
}

.monitor-summary-value small {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.monitor-sensor-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.monitor-sensor-card {
  display: flex;
  flex-direction: column;
  min-height: 26rem;
  padding: 1rem;
  color: #ffffff;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.35rem;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
  overflow: hidden;
  position: relative;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.monitor-sensor-card:hover {
  color: #ffffff;
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}

.monitor-sensor-card::before {
  content: "";
  position: absolute;
  inset: auto -25% -28% auto;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  opacity: 0.28;
  filter: blur(2px);
}

.monitor-sensor-card.is-safe {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.92), rgba(15, 23, 42, 0.82));
}

.monitor-sensor-card.is-safe::before {
  background-color: #60a5fa;
}

.monitor-sensor-card.is-caution {
  color: #042f3a;
  background: linear-gradient(160deg, rgba(103, 232, 249, 0.98), rgba(165, 243, 252, 0.76));
}

.monitor-sensor-card.is-caution:hover {
  color: #042f3a;
}

.monitor-sensor-card.is-caution::before {
  background-color: #0891b2;
}

.monitor-sensor-card.is-alert {
  color: #352700;
  background: linear-gradient(160deg, rgba(250, 204, 21, 0.98), rgba(254, 240, 138, 0.82));
}

.monitor-sensor-card.is-alert:hover {
  color: #352700;
}

.monitor-sensor-card.is-alert::before {
  background-color: #ca8a04;
}

.monitor-sensor-card.is-severe-alert {
  background: linear-gradient(160deg, rgba(249, 115, 22, 0.98), rgba(124, 45, 18, 0.88));
}

.monitor-sensor-card.is-severe-alert::before {
  background-color: #fdba74;
}

.monitor-sensor-card.is-danger {
  background: linear-gradient(160deg, rgba(220, 38, 38, 0.98), rgba(69, 10, 10, 0.9));
}

.monitor-sensor-card.is-danger::before {
  background-color: #fca5a5;
}

.monitor-sensor-card.is-nodata {
  background: linear-gradient(160deg, rgba(100, 116, 139, 0.95), rgba(30, 41, 59, 0.9));
}

.monitor-sensor-card.is-nodata::before {
  background-color: #cbd5e1;
}

.monitor-sensor-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.monitor-sensor-name {
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1.15;
}

.monitor-sensor-location {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0.78;
}

.monitor-status-badge {
  flex: 0 0 auto;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.monitor-status-badge.is-safe {
  background-color: #1d4ed8;
}

.monitor-status-badge.is-caution {
  color: #042f3a;
  background-color: #67e8f9;
}

.monitor-status-badge.is-alert {
  color: #352700;
  background-color: #facc15;
}

.monitor-status-badge.is-severe-alert {
  background-color: #f97316;
}

.monitor-status-badge.is-danger {
  background-color: #dc2626;
}

.monitor-status-badge.is-nodata {
  background-color: #475569;
}

.monitor-wbgt-area {
  position: relative;
  z-index: 1;
  margin-top: 1.8rem;
  text-align: center;
}

.monitor-wbgt-label {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  opacity: 0.78;
}

.monitor-wbgt-value {
  margin-top: 0.25rem;
  font-size: 4.2rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.06em;
}

.monitor-wbgt-value span {
  margin-left: 0.2rem;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0;
}

.monitor-item-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 1.6rem;
}

.monitor-item {
  padding: 0.65rem 0.45rem;
  text-align: center;
  border-radius: 0.85rem;
  background-color: rgba(255, 255, 255, 0.16);
}

.monitor-sensor-card.is-caution .monitor-item,
.monitor-sensor-card.is-alert .monitor-item {
  background-color: rgba(255, 255, 255, 0.28);
}

.monitor-item-label {
  font-size: 0.74rem;
  font-weight: 900;
  opacity: 0.75;
}

.monitor-item-value {
  margin-top: 0.2rem;
  font-size: 1.3rem;
  font-weight: 950;
  line-height: 1.1;
}

.monitor-item-value span {
  margin-left: 0.1rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.monitor-time-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1rem;
}

.monitor-time-label {
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.68;
}

.monitor-time-value {
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.2;
}

.monitor-no-sensor {
  padding: 4rem 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.2rem;
  font-weight: 800;
}

@media (max-width: 1399.98px) {
  .monitor-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .monitor-sensor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .monitor-summary-label {
    font-size: 1.02rem;
  }

  .monitor-summary-value {
    font-size: 2.35rem;
  }

  .monitor-summary-value small {
    font-size: 0.9rem;
  }
}

@media (max-width: 991.98px) {
  .monitor-page {
    padding: 0.8rem;
  }

  .monitor-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .monitor-header-right {
    justify-content: flex-start;
  }

  .monitor-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monitor-sensor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monitor-wbgt-value {
    font-size: 3.6rem;
  }
}

@media (max-width: 575.98px) {
  .monitor-summary,
  .monitor-sensor-grid {
    grid-template-columns: 1fr;
  }

  .monitor-clock,
  .monitor-update {
    min-width: 100%;
  }

  .monitor-system-name {
    font-size: 1.35rem;
  }
}

/* =========================================================
   Daily summary
   ========================================================= */

.daily-summary-filter-card {
  border-radius: 1rem;
}

.daily-summary-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.daily-summary-card {
  position: relative;
  min-height: 6.5rem;
  padding: 0.95rem;
  overflow: hidden;
  color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.daily-summary-card::after {
  content: "";
  position: absolute;
  right: -1.6rem;
  bottom: -2rem;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.16);
}

.daily-summary-card.is-total {
  background: linear-gradient(135deg, #113182, #2563eb);
}

.daily-summary-card.is-max {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.daily-summary-card.is-avg {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.daily-summary-card.is-min {
  background: linear-gradient(135deg, #334155, #64748b);
}

.daily-summary-card.is-alert {
  background: linear-gradient(135deg, #facc15, #fde047);
}

.daily-summary-card.is-danger {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

.daily-summary-card.is-nodata {
  background: linear-gradient(135deg, #475569, #64748b);
}

.daily-summary-label {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0.9;
}

.daily-summary-value {
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
}

.daily-summary-value small {
  margin-left: 0.12rem;
  font-size: 0.9rem;
  font-weight: 800;
}

.daily-summary-chart-card,
.daily-summary-ranking-card {
  border-radius: 1rem;
  overflow: hidden;
}

.daily-summary-chart-wrap {
  position: relative;
  height: 360px;
}

.daily-summary-ranking-list {
  display: flex;
  flex-direction: column;
}

.daily-summary-ranking-item {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  color: var(--mse-text);
  text-decoration: none;
  border-bottom: 1px solid var(--mse-border-soft);
}

.daily-summary-ranking-item:hover {
  color: var(--mse-text);
  background-color: #f8fafc;
}

.daily-summary-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  color: #ffffff;
  font-weight: 900;
  border-radius: 999px;
  background-color: var(--mse-primary);
}

.daily-summary-ranking-title {
  font-weight: 850;
}

.daily-summary-ranking-location {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.daily-summary-ranking-value {
  text-align: right;
  font-size: 1.1rem;
  font-weight: 900;
}

.daily-summary-ranking-value small {
  margin-left: 0.1rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.daily-summary-table th {
  white-space: nowrap;
}

.daily-summary-table td {
  white-space: nowrap;
}

@media (max-width: 1199.98px) {
  .daily-summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .daily-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-summary-chart-wrap {
    height: 300px;
  }
}

@media (max-width: 575.98px) {
  .daily-summary-cards {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Sensor detail help popover
   - センサ詳細画面の項目ヘルプ表示
   ========================================================= */

.latest-item-title-block {
  min-width: 0;
}

.latest-item-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

.latest-item-title {
  font-weight: 850;
  line-height: 1.25;
}

.sensor-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  color: #64748b;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.sensor-help-button:hover,
.sensor-help-button:focus {
  color: #ffffff;
  background-color: var(--mse-primary);
  border-color: var(--mse-primary);
  box-shadow: 0 6px 14px rgba(17, 49, 130, 0.24);
  outline: none;
}

.sensor-help-button i {
  font-size: 0.95rem;
  line-height: 1;
}

.popover.sensor-help-popover {
  max-width: 390px;
  border: 1px solid #dbe4f0;
  border-radius: 1rem;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.popover.sensor-help-popover .popover-header {
  color: var(--mse-primary);
  font-size: 1rem;
  font-weight: 850;
  background-color: #f8fbff;
  border-bottom: 1px solid #e2e8f0;
}

.popover.sensor-help-popover .popover-body {
  padding: 0.9rem 1rem;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.6;
}

.sensor-help-content p {
  margin-bottom: 0.55rem;
}

.sensor-help-scale {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding: 0.7rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}

.sensor-help-scale-row {
  display: grid;
  grid-template-columns: 1rem 5.5rem 1fr;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.9rem;
}

.sensor-help-dot {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
}

.sensor-help-label {
  font-weight: 850;
}

.sensor-help-range {
  color: #475569;
  font-weight: 650;
}

.sensor-help-note {
  margin-top: 0.6rem;
  color: #64748b;
  font-size: 0.82rem;
}

.help-wbgt-safe {
  background-color: #2563eb;
}

.help-wbgt-caution {
  background-color: #67e8f9;
}

.help-wbgt-alert {
  background-color: #facc15;
}

.help-wbgt-severe {
  background-color: #f97316;
}

.help-wbgt-danger {
  background-color: #dc2626;
}

.sensor-help-pmv-scale .sensor-help-scale-row {
  grid-template-columns: 2.4rem 1fr;
}

/* =========================================================
   Responsive typography / density
   - 全画面共通の文字サイズ・余白調整
   - 既存画面別CSSの後勝ち調整をここに集約する
   ========================================================= */

html {
  font-size: 17px;
}

body {
  font-size: var(--mse-font-normal);
  line-height: 1.6;
}

/* 大きめ外部ディスプレイでは読みやすさ優先 */
@media (min-width: 1400px) {
  :root {
    --mse-font-page-title: 1.65rem;
    --mse-font-info-number: 1.65rem;
    --mse-font-sensor-value: 1.55rem;
    --mse-font-latest-value: 2.1rem;
    --mse-font-daily-value: 2.35rem;

    --mse-density-card-padding: 1rem;
    --mse-density-card-padding-compact: 0.9rem;
  }

  html {
    font-size: 17px;
  }
}

/* ノートPC相当：1366px幅などでは窮屈にならないよう抑える */
@media (max-width: 1399.98px) {
  :root {
    --mse-font-page-title: 1.5rem;
    --mse-font-info-number: 1.45rem;
    --mse-font-sensor-value: 1.4rem;
    --mse-font-latest-value: 1.9rem;
    --mse-font-daily-value: 2.1rem;

    --mse-density-card-padding: 0.9rem;
    --mse-density-card-padding-compact: 0.85rem;
  }

  html {
    font-size: 16px;
  }

  .app-content-header {
    padding-top: 0.75rem;
    padding-bottom: 0.5rem;
  }

  .app-content {
    padding-top: 0.75rem;
  }
}

/* 小さめノートPC・タブレット横向き */
@media (max-width: 1199.98px) {
  html {
    font-size: 15.5px;
  }
}

/* タブレット/スマホでは小さくしすぎない */
@media (max-width: 767.98px) {
  :root {
    --mse-font-page-title: 1.45rem;
    --mse-font-table: 0.92rem;
    --mse-font-sensor-value: 1.35rem;
    --mse-font-daily-value: 2rem;
  }

  html {
    font-size: 16px;
  }
}

/* Header */
.app-header {
  font-size: var(--mse-font-normal);
}

.navbar-brand {
  font-size: 1.12rem;
  font-weight: 700;
}

#loginUserName,
.app-header .text-muted,
.app-header .small {
  font-size: 0.95rem !important;
}

/* Sidebar */
.app-sidebar .nav-link {
  font-size: 1.02rem;
  font-weight: 700;
}

.app-sidebar .nav-icon {
  font-size: 1.05rem;
}

.brand-text {
  font-size: 1.05rem;
}

/* Page title */
.app-content-header h3 {
  font-size: var(--mse-font-page-title);
  font-weight: 850;
}

.app-content-header p,
.breadcrumb,
.auto-refresh-status,
#autoRefreshStatus {
  font-size: var(--mse-font-small);
}

/* Form */
.form-label {
  font-size: 0.95rem;
  font-weight: 700;
}

.form-control,
.form-select,
.btn {
  font-size: var(--mse-font-normal);
}

.form-control,
.form-select {
  min-height: 42px;
}

.btn {
  min-height: 40px;
  font-weight: 700;
}

/* Card */
.card-title {
  font-size: var(--mse-font-card-title);
  font-weight: 800;
}

.card-body {
  padding: var(--mse-density-card-padding);
  font-size: var(--mse-font-normal);
}

/* Badge */
.badge {
  font-size: var(--mse-font-badge);
  font-weight: 800;
}

/* Table */
.table {
  font-size: var(--mse-font-table);
}

.table thead th {
  font-size: calc(var(--mse-font-table) - 0.03rem);
}

.table tbody td {
  font-size: var(--mse-font-table);
}

.table-sm > :not(caption) > * > * {
  padding: 0.65rem 0.75rem;
}

/* InfoBox */
.info-box .info-box-text {
  font-size: var(--mse-font-small);
}

.info-box .info-box-number {
  font-size: var(--mse-font-info-number);
}

.info-box-date {
  font-size: var(--mse-font-normal) !important;
}

/* Dashboard */
.sensor-card .card-body {
  padding: var(--mse-density-card-padding-compact);
}

.sensor-card-title,
.sensor-card .card-header .sensor-card-title,
.sensor-card .card-header .card-title {
  font-size: 1.18rem;
}

.sensor-card-location-row {
  font-size: var(--mse-font-normal);
}

.sensor-item-name {
  font-size: 0.95rem;
}

.sensor-item-value {
  font-size: var(--mse-font-sensor-value);
}

.sensor-item-unit {
  font-size: 0.95rem;
}

.sensor-status-badge {
  font-size: 1.08rem;
}

.wbgt-judgement-badge {
  font-size: 0.92rem;
}

/* Sensor detail */
.detail-table,
.detail-table th,
.detail-table td {
  font-size: var(--mse-font-normal);
}

.latest-item-value {
  font-size: var(--mse-font-latest-value);
}

.latest-item-value span {
  font-size: var(--mse-font-normal);
}

.small-box h3,
.small-box h4 {
  font-size: 1.35rem;
}

.small-box p {
  font-size: var(--mse-font-normal);
}

/* Receive logs */
.receive-log-filter-card .card-title {
  font-size: var(--mse-font-card-title);
}

.receive-log-filter-card .form-label {
  font-size: 0.9rem;
}

.receive-log-filter-card .form-control,
.receive-log-filter-card .form-select {
  min-height: 38px;
  font-size: 0.98rem;
}

.receive-log-summary-row .info-box .info-box-text {
  font-size: 0.88rem;
}

.receive-log-summary-row .info-box .info-box-number {
  font-size: 1.45rem;
}

.request-id-text {
  font-size: 0.9rem;
}

/* Floor map */
.floor-map-legend-item {
  font-size: 0.95rem;
}

.floor-map-marker-name {
  font-size: 0.86rem;
}

.floor-map-marker-status {
  font-size: 0.8rem;
}

/* Daily summary */
.daily-summary-label {
  font-size: 0.95rem;
}

.daily-summary-value {
  font-size: var(--mse-font-daily-value);
}

.daily-summary-value small {
  font-size: var(--mse-font-normal);
}

.daily-summary-ranking-title {
  font-size: var(--mse-font-normal);
}

.daily-summary-ranking-location {
  font-size: 0.9rem;
}

.daily-summary-ranking-value {
  font-size: 1.25rem;
}

.daily-summary-table {
  font-size: var(--mse-font-table);
}

/* Monitor */
.monitor-subtitle {
  font-size: 1.05rem;
}

.monitor-clock-label,
.monitor-summary-label,
.monitor-item-label,
.monitor-time-label {
  font-size: 0.82rem;
}

.monitor-clock-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
}

.monitor-clock-unit {
  font-size: 0.85rem;
  font-weight: 850;
  opacity: 0.9;
}

.monitor-sensor-location {
  font-size: 0.95rem;
}

.monitor-status-badge {
  font-size: 0.98rem;
}

.monitor-item-value {
  font-size: 1.45rem;
}

.monitor-time-value {
  font-size: 0.98rem;
}

/* Small screen fine tuning */
@media (max-width: 767.98px) {
  .navbar-brand {
    font-size: 1rem;
  }

  .table thead th,
  .table tbody td {
    font-size: var(--mse-font-table);
  }

  .popover.sensor-help-popover {
    max-width: 320px;
  }

  .sensor-help-scale-row {
    grid-template-columns: 1rem 4.8rem 1fr;
    font-size: 0.85rem;
  }
}

/* ダッシュボード：センサカード下部 */
.sensor-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.sensor-receive-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  line-height: 1;
}

.sensor-detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 2rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  line-height: 1;
  white-space: nowrap;
}

.sensor-detail-button i {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  margin-left: 0 !important;
}

.monitor-top-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.4rem;
  line-height: 1;
  white-space: nowrap;
}

.monitor-top-button i,
.monitor-top-button span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.skip-links,
.skip-link {
  display: none !important;
}

/* 監視モニタ：上部情報カード */
.monitor-clock,
.monitor-update {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-width: 10rem;
  min-height: 4.2rem;
  padding: 0.55rem 0.85rem;
  text-align: center;

  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 1rem;
  background-color: rgba(255, 255, 255, 0.08);
}

.monitor-clock-label {
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.monitor-clock-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem;

  width: 100%;
  margin-top: 0.2rem;
  text-align: center;

  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.15;
  white-space: nowrap;
}

.monitor-clock-unit {
  font-size: 0.9rem;
  font-weight: 850;
  opacity: 0.9;
}

/* 監視モニタ：凡例カード */
.monitor-summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 6.8rem;
  text-align: center;
}

.monitor-summary-label {
  position: relative;
  z-index: 1;

  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: 0.04em;
  opacity: 0.98;
}

.monitor-summary-value {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.22rem;

  margin-top: 0.45rem;
  font-size: 3rem;
  font-weight: 950;
  line-height: 1;
}

.monitor-summary-value small {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

@media (max-width: 1399.98px) {
  .monitor-clock,
  .monitor-update {
    min-width: 9rem;
    min-height: 3.9rem;
  }

  .monitor-clock-label {
    font-size: 0.8rem;
  }

  .monitor-clock-value {
    font-size: 1.18rem;
  }

  .monitor-clock-unit {
    font-size: 0.82rem;
  }

  .monitor-summary-card {
    min-height: 6.1rem;
  }

  .monitor-summary-label {
    font-size: 1.16rem;
  }

  .monitor-summary-value {
    font-size: 2.55rem;
  }

  .monitor-summary-value small {
    font-size: 0.92rem;
  }
}

