*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --tm-primary: rgba(56, 189, 248, 0.18);
  --tm-primary-border: rgba(56, 189, 248, 0.35);
  --tm-primary-hover: rgba(56, 189, 248, 0.24);
  --tm-primary-hover-border: rgba(56, 189, 248, 0.55);

  --tm-secondary: rgba(148, 163, 184, 0.12);
  --tm-secondary-border: rgba(148, 163, 184, 0.30);

  --tm-bg-start: #101828;
  --tm-bg-end: #020617;
  --tm-card-start: #1f2937;
  --tm-card-end: #020617;
  --tm-header-bg-a: rgba(15, 23, 42, 0.9);
  --tm-header-bg-b: rgba(15, 23, 42, 0.5);

  --tm-nav-border: rgba(148, 163, 184, 0.35);
  --tm-nav-bg: rgba(2, 6, 23, 0.35);
  --tm-nav-active-border: rgba(56, 189, 248, 0.5);
  --tm-nav-active-bg: rgba(56, 189, 248, 0.15);
  --tm-nav-active-text: #e0f2fe;

  --tm-text-strong: #f9fafb;
  --tm-text: #e5e7eb;

  --tm-bg-image: none;
  --tm-bg-image-opacity: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, var(--tm-bg-start), var(--tm-bg-end));
  color: var(--tm-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--tm-bg-image);
  background-size: cover;
  background-position: center;
  opacity: var(--tm-bg-image-opacity);
  pointer-events: none;
  z-index: -1;
}

/* =========================
   Auth pages (login/register)
   Scoped to .auth-body so it
   won't affect dashboard UI.
   ========================= */

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.auth-main {
  width: 100%;
  max-width: 980px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  background: radial-gradient(circle at top left, rgba(31, 41, 55, 0.65), rgba(2, 6, 23, 0.95));
}

.auth-panel {
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  position: relative;
  min-height: 520px;
}

.auth-panel--left {
  color: #ecfeff;
  background:
    radial-gradient(900px 520px at 15% 15%, rgba(56, 189, 248, 0.28), transparent 60%),
    linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(34, 211, 238, 0.10)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.25), rgba(2, 6, 23, 0.35));
  border-right: 1px solid rgba(148, 163, 184, 0.22);
}

.auth-panel--left::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 25%, rgba(236, 254, 255, 0.10) 0 2px, transparent 2px 100%),
    radial-gradient(circle at 70% 65%, rgba(236, 254, 255, 0.08) 0 2px, transparent 2px 100%);
  background-size: 220px 220px, 240px 240px;
  opacity: 0.65;
  pointer-events: none;
}

.auth-panel--right {
  background: radial-gradient(circle at top left, #111827, #020617);
}

.auth-kicker {
  font-size: 0.9rem;
  color: rgba(224, 242, 254, 0.85);
}

.auth-hero {
  font-size: 2.1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0;
  position: relative;
  z-index: 1;
}

.auth-hero-sub {
  margin: 0;
  color: rgba(224, 242, 254, 0.85);
  line-height: 1.5;
  max-width: 28rem;
  position: relative;
  z-index: 1;
}

.auth-side-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
}

.auth-ghost-btn {
  background: rgba(2, 6, 23, 0.18);
  color: #ecfeff;
  border: 1px solid rgba(236, 254, 255, 0.45);
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.auth-ghost-btn:hover {
  background: rgba(2, 6, 23, 0.28);
  border-color: rgba(236, 254, 255, 0.62);
}

.auth-ghost-btn:active {
  transform: translateY(1px);
}

.auth-title {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 0;
  color: #9ca3af;
  line-height: 1.45;
}

.auth-form {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.auth-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.auth-input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.55);
  color: #f9fafb;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.auth-input::placeholder {
  color: rgba(148, 163, 184, 0.85);
}

.auth-input:focus {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.auth-error {
  background: rgba(239, 68, 68, 0.13);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fecaca;
  border-radius: 0.9rem;
  padding: 0.75rem 0.85rem;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
  margin-top: 0.25rem;
}

.auth-footer {
  margin-top: 1.15rem;
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.auth-link {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 650;
}

.auth-link:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-panel {
    min-height: unset;
  }
  .auth-panel--left {
    border-right: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }
}

.header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  backdrop-filter: blur(12px);
  background: linear-gradient(to right, var(--tm-header-bg-a), var(--tm-header-bg-b));
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--tm-text-strong);
}

.top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.top-nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #e5e7eb;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--tm-nav-border);
  background: var(--tm-nav-bg);
  font-size: 0.9rem;
  font-weight: 600;
}

.top-nav-tab-active,
.top-nav-tab:hover {
  border-color: var(--tm-nav-active-border);
  background: var(--tm-nav-active-bg);
  color: var(--tm-nav-active-text);
}

.main {
  flex: 1;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Home page: wireframe section should fill the viewport area */
.main--home {
  padding: 0;
  gap: 0;
}

.top-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1.1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.top-row.top-row-detail {
  grid-template-columns: minmax(0, 2.2fr) minmax(340px, 1.4fr);
}

.card {
  background: radial-gradient(circle at top left, var(--tm-card-start), var(--tm-card-end));
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.75);
}

.card-map {
  padding: 0.5rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.card-map .card-title {
  padding: 0 0 0.5rem;
  margin: 0 0 0.25rem;
}

#map {
  width: 100%;
  height: 700px;
  border-radius: 0.75rem;
  overflow: hidden;
}

#detail-map {
  width: 100%;
  height: 440px; /* smaller map for detail page */
  border-radius: 0.75rem;
  overflow: hidden;
}

button,
.btn {
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
}

button {
  font-family: inherit;
}

.btn-pill {
  background: var(--tm-primary);
  color: var(--tm-nav-active-text);
  border: 1px solid var(--tm-primary-border);
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-pill:hover {
  background: var(--tm-primary-hover);
  border-color: var(--tm-primary-hover-border);
}

.btn-pill:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--tm-secondary);
  color: var(--tm-text);
  border: 1px solid var(--tm-secondary-border);
}

/* Default all buttons to pill style unless overridden */
button:not(.btn-secondary) {
  background: var(--tm-primary);
  color: var(--tm-nav-active-text);
  border: 1px solid var(--tm-primary-border);
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
}

button.btn-secondary {
  background: var(--tm-secondary);
  color: var(--tm-text);
  border: 1px solid var(--tm-secondary-border);
}

/* Collapsible cards (used in Admin) */
.card-collapsible {
  padding: 0;
}

.card-collapsible > summary {
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-collapsible > summary::-webkit-details-marker {
  display: none;
}

.card-collapsible > summary .card-title {
  margin: 0;
}

.card-collapsible-body {
  padding: 0 1.5rem 1.25rem;
}

/* Dashboard customization drag/drop list */
.dc-layout-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

/* Use the same item styling inside the canvas */
.dc-canvas-list .dc-layout-item {
  background: rgba(2, 6, 23, 0.35);
}

.dc-layout-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.35);
}

.dc-layout-item.dc-dragging {
  opacity: 0.7;
  border-color: rgba(56, 189, 248, 0.55);
}

.dc-layout-handle {
  font-weight: 900;
  opacity: 0.75;
  cursor: grab;
  user-select: none;
}

.dc-layout-name {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-layout-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Dashboard customization: split view + preview */
.dc-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1020px) {
  .dc-shell {
    grid-template-columns: 1fr;
  }
}

.dc-canvas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 420px;
}

.dc-canvas-list {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.20);
  padding: 0.9rem;
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.dc-editor {
  flex: 1 1 auto;
  min-height: 0;
}

.dc-editor-viewport {
  position: relative;
  width: 100%;
  height: 600px;
  max-height: 72vh;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.35);
}

.dc-editor-frame {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: auto;
  opacity: 0.95;
}

.dc-editor-overlays {
  position: absolute;
  inset: 0;
  pointer-events: none; /* enable per-box pointer events only */
}

.dc-box {
  position: absolute;
  border-radius: 0.85rem;
  border: 2px solid rgba(56, 189, 248, 0.75);
  background: rgba(56, 189, 248, 0.10);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  touch-action: none;
}

.dc-box.is-selected {
  border-color: rgba(34, 197, 94, 0.85);
  background: rgba(34, 197, 94, 0.10);
}

.dc-box .dc-box-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  cursor: move;
  user-select: none;
  color: rgba(226, 232, 240, 0.95);
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(2, 6, 23, 0.55);
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.dc-box .dc-box-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dc-box .dc-rot {
  height: 30px;
  padding: 0 0.4rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.45);
  color: rgba(226, 232, 240, 0.95);
}

.dc-box .dc-box-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  right: 8px;
  bottom: 8px;
  border-radius: 4px;
  background: rgba(226, 232, 240, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  cursor: nwse-resize;
}

/* Layout editor (drop-to-swap) */
.le-editing {
  outline: 2px dashed rgba(56, 189, 248, 0.55);
  outline-offset: 4px;
}

.le-dragging {
  opacity: 0.65;
  filter: saturate(0.9);
}

/* Swapy handle: clickable; customization iframe overrides with !important in layout-edit.js */
[data-swapy-item] [data-swapy-handle] {
  pointer-events: auto;
}

/* Stronger hit-blocking when preview class is present (backup if injected style is stale) */
html[data-layout-edit="1"] body.le-customization-preview main.main [data-dash-section],
html[data-layout-edit="1"] body.le-customization-preview main.main [data-dash-section] * {
  pointer-events: none !important;
}
html[data-layout-edit="1"] body.le-customization-preview main.main [data-swapy-handle] {
  pointer-events: auto !important;
}

/* ---------------- Mine schematic page ---------------- */
.mine-card {
  overflow: hidden;
}

.mine-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-top: 0.75rem;
}

.mine-leg-item {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  color: rgba(226, 232, 240, 0.92);
  font-weight: 650;
  font-size: 0.92rem;
}

.mine-chip {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.mine-chip-above {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
}

.mine-chip-below {
  background: rgba(148, 163, 184, 0.12);
  border-style: dashed;
}

.mine-chip-press {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
}

.mine-viewport {
  margin-top: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.22);
  overflow: hidden;
}

.mine-svg {
  width: 100%;
  height: auto;
  display: block;
}

.mine-ground {
  fill: none;
  stroke: rgba(148, 163, 184, 0.55);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
}

.mine-pipe {
  fill: none;
  stroke: rgba(226, 232, 240, 0.65);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#mineGlow);
}

.mine-tank rect {
  stroke-width: 3;
}

.mine-above rect {
  fill: rgba(56, 189, 248, 0.10);
  stroke: rgba(56, 189, 248, 0.55);
}

.mine-below rect {
  fill: rgba(148, 163, 184, 0.10);
  stroke: rgba(148, 163, 184, 0.52);
  stroke-dasharray: 10 10;
}

.mine-label {
  fill: rgba(226, 232, 240, 0.95);
  font-weight: 800;
  font-size: 18px;
}

.mine-sub {
  fill: rgba(226, 232, 240, 0.78);
  font-weight: 700;
  font-size: 16px;
}

.mine-ps circle {
  fill: rgba(34, 197, 94, 0.14);
  stroke: rgba(34, 197, 94, 0.75);
  stroke-width: 3;
}

.mine-ps-tag {
  fill: rgba(226, 232, 240, 0.95);
  font-weight: 900;
  font-size: 14px;
}

.mine-meta {
  margin-top: 0.85rem;
}

/* Theme modal */
.dc-theme-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.25rem;
}

@media (max-width: 980px) {
  .dc-theme-grid {
    grid-template-columns: 1fr;
  }
}

.dc-theme-wireframe {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: radial-gradient(circle at top, var(--tm-bg-start), var(--tm-bg-end));
  padding: 0.9rem;
  min-height: 360px;
  overflow: hidden;
}

.dc-wf-header {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: radial-gradient(circle at top left, var(--tm-card-start), var(--tm-card-end));
}

.dc-wf-logo {
  width: 42px;
  height: 42px;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.35);
}

.dc-wf-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.dc-wf-pill {
  width: 64px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.22);
}

.dc-wf-btn {
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--tm-primary-border);
  background: var(--tm-primary);
}

.dc-wf-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.dc-wf-card {
  height: 78px;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: radial-gradient(circle at top left, var(--tm-card-start), var(--tm-card-end));
}

/* Make preview modal larger than default .modal */
.modal.dc-preview-modal-dialog {
  width: min(1920px, 99vw);
  max-height: 98vh;
}

.dc-preview-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden; /* prevent internal scrollbars */
}

.dc-preview-modal-iframe-wrap {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.dc-preview-modal-overlay {
  padding: 0.75rem;
}

.dc-preview-modal-viewport {
  position: relative;
  width: 100%;
  height: 82vh; /* explicit height so it can fit-to-screen */
  overflow: hidden; /* no scrollbars */
  background: rgba(2, 6, 23, 0.35);
  --dc-modal-scale: 0.82;
}

.dc-preview-modal-iframe {
  border: none;
  border-radius: 0;
  width: calc(100% / var(--dc-modal-scale));
  height: calc(100% / var(--dc-modal-scale));
  transform: scale(var(--dc-modal-scale));
  transform-origin: 0 0;
  background: transparent;
  pointer-events: none; /* static preview */
}

/* Color picker rows */
.dc-color-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.dc-color-row .dc-color-inputs {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.dc-color {
  width: 52px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.75rem;
  background: rgba(2, 6, 23, 0.55);
  padding: 0.2rem;
}

.dc-color-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.detail-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card-detail-bottom {
  padding-top: 1.35rem;
  padding-bottom: 1.35rem;
}

.tank-card.tank-card-detail .tank-card-body {
  justify-content: flex-start;
  gap: 1.5rem;
}

.tank-card.tank-card-detail .summary-pie {
  width: 180px;
  height: 180px;
}

.tank-card.tank-card-detail .contamination-circle {
  width: 90px;
  height: 90px;
}

.tank-card.tank-card-detail .pie-label {
  font-size: 2.1rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 9999;
}

.modal-overlay.modal-open {
  display: flex;
}

.modal {
  width: min(980px, 96vw);
  max-height: 86vh;
  overflow: hidden;
  background: radial-gradient(circle at top left, #111827, #020617);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-body {
  padding: 1rem 1.25rem 1.25rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.dipchart-details {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.18);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
}

.dipchart-title {
  font-weight: 900;
  color: rgba(224, 242, 254, 0.95);
}

.dipchart-body {
  margin-top: 0.85rem;
}

.dipchart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: start;
}

.dipchart-dims {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

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

.history-table-wrap {
  max-height: 68vh;
  overflow: auto;
  margin-top: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.history-table th,
.history-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  white-space: nowrap;
}

.history-table th {
  position: sticky;
  top: 0;
  background: rgba(2, 6, 23, 0.9);
  z-index: 1;
  font-weight: 700;
}

/* Tank detail: usage histogram */
.usage-histogram-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.usage-histogram-caption {
  font-weight: 800;
  color: rgba(224, 242, 254, 0.95);
}

.usage-timeline-btn {
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
}

.usage-histogram-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.usage-gran-btn {
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
}

.usage-gran-btn-active {
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(56, 189, 248, 0.16);
  color: #e0f2fe;
}

.usage-histogram-meta {
  margin: 0 0 0.75rem;
  color: #cbd5e1;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.usage-histogram {
  width: 100%;
}

.usage-histogram-plot {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 0.5rem;
  align-items: stretch;
}

.usage-histogram-y-axis {
  position: relative;
  height: 360px;
  border-right: 1px solid rgba(148, 163, 184, 0.3);
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.72rem;
}

.usage-y-tick {
  position: absolute;
  right: 0.35rem;
  transform: translateY(50%);
  line-height: 1;
  white-space: nowrap;
}

.usage-histogram-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  padding: 0.25rem 0;
  overflow-x: auto;
  height: 360px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background-image: linear-gradient(
    to top,
    rgba(148, 163, 184, 0.14) 1px,
    transparent 1px
  );
  background-size: 100% 36px;
  background-position: bottom;
  border-radius: 0.6rem;
}

.usage-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 40px;
  height: 100%;
}

.usage-bar-wrap {
  position: relative;
  width: 24px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.usage-bar {
  width: 24px;
  background: rgba(148, 163, 184, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 6px;
  height: 0%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.usage-bar-up {
  background: linear-gradient(to top, rgba(34, 197, 94, 0.95), rgba(34, 197, 94, 0.40));
  border-color: rgba(34, 197, 94, 0.55);
}

.usage-bar-down {
  background: linear-gradient(to top, rgba(239, 68, 68, 0.95), rgba(239, 68, 68, 0.40));
  border-color: rgba(239, 68, 68, 0.55);
}

.usage-bar-flat {
  background: linear-gradient(to top, rgba(245, 158, 11, 0.95), rgba(245, 158, 11, 0.40));
  border-color: rgba(245, 158, 11, 0.55);
}

.usage-bar-empty {
  border: none;
  background: transparent;
  box-shadow: none;
}

.usage-bar-fabricated {
  opacity: 0.55;
  filter: saturate(0.85);
}

.usage-bar-point {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 4px;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #0b1220;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.usage-bar-label {
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.85);
  line-height: 1;
  user-select: none;
}

/* Tank detail bottom layout */
.detail-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.card-detail-left {
  min-width: 0;
}

.card-usage-histogram {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.card-usage-histogram-full {
  margin-top: 1.5rem;
}

.card-detail-empty {
  min-height: 220px;
}

.report-modal-dialog {
  width: min(760px, 96vw);
}

.monthly-fuel-modal-dialog {
  width: min(920px, 96vw);
}

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

.monthly-fuel-card .info-line {
  font-size: 1.05rem;
}

.monthly-fuel-card .info-line strong {
  font-size: 1.25rem;
}

.monthly-day-pie-row {
  margin-top: 0.4rem;
  display: flex;
  justify-content: center;
}

.monthly-day-pie {
  width: 115px;
  height: 115px;
}

.monthly-day-pie .pie-inner {
  width: 68%;
  height: 68%;
}

.monthly-day-pie-inner {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: rgba(226, 232, 240, 0.95);
}

.info-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.info-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.info-line strong {
  font-weight: 600;
}

.info-meta {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.25rem;
}

.tank-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top left, #020617, #020617);
  overflow: visible;
}

.tank-card-header {
  font-size: 0.9rem;
  font-weight: 500;
  color: #e5e7eb;
}

.tank-card-body {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.6rem;
}

/* legend removed from UI: keep rule small for backward compatibility */
.tank-card-legend {
  display: none;
}

.summary-pie {
  width: 115px;
  height: 115px;
  flex: 0 0 auto;
}

.pie-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.tank-liters {
  font-size: 1.4rem; /* similar feel to the % label */
  font-weight: 600;
  color: #e5e7eb;
  line-height: 1;
}

.contamination-circle {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #22c55e; /* default clean */
  box-shadow: 0 0 25px rgba(15, 23, 42, 0.9);
}

.contamination-circle-alert {
  background: #ef4444;
}

.status-indicator {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #020617;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.7);
}

.status-indicator-clean {
  background: #22c55e;
}

.status-indicator-contaminated {
  background: #ef4444;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #e5e7eb;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title-row .card-title {
  margin-bottom: 0;
}

.monthly-overview .info-line {
  font-size: 1.05rem;
}

.monthly-overview .info-line strong {
  font-size: 1.25rem;
}

.tank-visual {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pie-wrapper {
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pie {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(#1f2937 0 0, #1f2937 0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.4s ease-out;
}

.pie-inner {
  width: 68%;
  height: 68%;
  border-radius: 50%;
  background: radial-gradient(circle at top, #020617, #020617 40%, #111827 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 25px rgba(15, 23, 42, 0.9);
}

.pie-label {
  font-size: 1.7rem;
  font-weight: 600;
  color: #f9fafb;
}

/* Monthly fuel day donuts must not inherit .pie 100% sizing */
.monthly-day-pie-row {
  min-height: 180px;
}

.pie.monthly-day-pie {
  width: 180px;
  height: 180px;
  flex: 0 0 auto;
}

/* legacy legend styles (no longer used visually) */

.status {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.status-unknown {
  background: rgba(55, 65, 81, 0.7);
  color: #e5e7eb;
}

.status-unknown::before {
  background: #9ca3af;
}

.status-clean {
  background: rgba(22, 163, 74, 0.15);
  color: #bbf7d0;
}

.status-clean::before {
  background: #22c55e;
}

.status-contaminated {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
}

.status-contaminated::before {
  background: #ef4444;
}

.connection {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.connection::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 0.3rem;
}

.connection-connected {
  color: #bbf7d0;
}

.connection-connected::before {
  background: #22c55e;
}

.connection-disconnected {
  color: #fecaca;
}

.connection-disconnected::before {
  background: #ef4444;
}

.hint {
  font-size: 0.8rem;
  color: #9ca3af;
  max-width: 32rem;
}

/* Home */
.home-logo-placeholder {
  width: 100%;
  height: 260px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
  background: rgba(2, 6, 23, 0.2);
}

.home-logo-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0;
}

.home-logo-img {
  max-width: 320px;
  max-height: 140px;
  width: auto;
  height: auto;
  display: block;
}

/* Home (wireframe) */
.home-home-wireframe-card {
  min-height: 720px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 1.25rem;
}

.home-home-wireframe-inner {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.home-home-wireframe-logo {
  width: clamp(220px, 32vw, 700px);
  height: clamp(220px, 32vw, 700px);
  border: 2px solid rgba(148, 163, 184, 0.55);
  border-radius: 1.05rem;
  background: rgba(2, 6, 23, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.home-home-wireframe-logo-img {
  max-width: 88%;
  max-height: 88%;
  width: auto;
  height: auto;
  display: block;
}

.home-home-wireframe-right {
  flex: 1;
  height: clamp(220px, 32vw, 700px);
  border-radius: 1.05rem;
  border: 2px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.08);
}

/* Home motto wireframe */
.home-motto-card {
  padding: 0;
}

.home-motto-outer {
  width: min(980px, 92vw);
  height: min(520px, 62vw);
  border-radius: 64px;
  border: 2px solid rgba(2, 6, 23, 0.9);
  background: rgba(148, 197, 234, 0.35);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-motto-inner {
  width: 86%;
  height: 72%;
  border-radius: 44px;
  border: 2px solid rgba(2, 6, 23, 0.9);
  background-color: rgba(205, 232, 246, 0.88);
  background-image: url("assets/logo_1.jpeg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 260px 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}

.home-motto-text {
  position: relative;
  z-index: 1;
  color: #0b1220;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 800;
  max-width: 32rem;
}

.home-motto-text::after {
  content: "";
  display: block;
  height: 12px;
}

.home-motto-inner::before {
  /* Keep the logo "opaque" while still letting text stay readable */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (max-width: 780px) {
  .home-motto-outer {
    padding: 18px;
    border-radius: 44px;
  }
  .home-motto-inner {
    border-radius: 34px;
    background-size: 200px 200px;
  }
  .home-motto-text {
    font-size: 1.1rem;
  }
}

/* Home landing page (legacy styles; not used by current home.html) */
.home-landing-body {
  min-height: 100vh;
  background: #f1f5f9;
  color: #0f172a;
}

.home-hero-art {
  position: relative;
  flex: 1;
  min-height: 720px;
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background-color: #0b1b3a; /* fallback if images missing */
  background-image: url("assets/home_bg.png");
  background-size: cover;
  background-position: center;
}

.home-hero-art::after {
  /* Darken/neutralize so the text reads well even if background is bright */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(2, 6, 23, 0.25),
    rgba(2, 6, 23, 0.75)
  );
  pointer-events: none;
  z-index: 0;
}

.home-welcome-card {
  position: relative;
  z-index: 1;
  width: min(920px, 96vw);
  padding: 2.25rem 2rem;
  border-radius: 1rem;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.25);
  backdrop-filter: blur(6px);
}

.home-welcome-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/home_text_bg.png");
  background-size: cover;
  background-position: center;
  opacity: 0.3; /* ~30% visible */
  z-index: 0;
  pointer-events: none;
}

.home-welcome-title,
.home-welcome-subtitle,
.home-welcome-btn {
  position: relative;
  z-index: 1;
}

.home-welcome-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: 0.12em;
  font-weight: 900;
  color: #f8fafc;
}

/* Home brand card (wireframe) */
.home-brand-card {
  flex: 1;
  width: 100%;
  min-height: 100%;
  border-radius: 84px;
  border: 3px solid rgba(2, 6, 23, 0.9);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;

  /* Background image for this section */
  background-image: url("assets/home_backround.webp"), url("assets/home_backround.png"), url("assets/home_backround.jpg");
  background-size: cover;
  background-position: center;
}

.home-brand-card::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Keep wireframe look (mostly white) while showing the image behind */
  background: rgba(255, 255, 255, 0.35);
  z-index: 0;
}

.home-brand-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.home-brand-title {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #0b1220;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.home-brand-slogan {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 600;
  color: rgba(11, 18, 32, 0.92);
  line-height: 1.3;
  max-width: 42rem;
  margin: 0 auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.home-welcome-subtitle {
  margin: 1rem auto 1.5rem;
  max-width: 48rem;
  font-size: 0.95rem;
  color: rgba(229, 231, 235, 0.85);
  line-height: 1.6;
}

.home-landing-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 1.25rem;
}

.home-landing-nav {
  max-width: 1200px;
  margin: 0 auto;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-nav-logo {
  width: 170px;
  height: 44px;
  border: 1px dashed #94a3b8;
  border-radius: 0.45rem;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: grid;
  place-items: center;
  background: #f8fafc;
}

.home-nav-logo-img {
  max-width: 140px;
  max-height: 30px;
  width: auto;
  height: auto;
  display: block;
}

.home-nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.home-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #334155;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-nav-link:hover,
.home-nav-link-active {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #f8fafc;
}

.home-hero {
  flex: 1;
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    linear-gradient(180deg, rgba(14, 116, 216, 0.25), rgba(15, 23, 42, 0.45)),
    linear-gradient(135deg, #60a5fa 0%, #2563eb 45%, #0f172a 100%);
}

.home-hero-content {
  width: min(920px, 94vw);
  text-align: center;
  color: #ffffff;
}

.home-hero-title {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.3rem);
  letter-spacing: 0.18em;
  font-weight: 800;
}

.home-hero-subtitle {
  margin: 1rem auto 2rem;
  max-width: 760px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.home-cta-btn {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 2px;
  min-width: 190px;
  height: 48px;
  padding: 0 1.1rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
}

.home-cta-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 780px) {
  .home-landing-nav {
    height: auto;
    padding: 0.85rem 0;
    flex-direction: column;
  }
  .home-nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .home-hero {
    min-height: calc(100vh - 130px);
  }
}

/* Settings - FAQ accordion */
.faq-card {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.faq-modal-dialog {
  width: min(760px, 96vw);
}

/* Settings - Account Settings sizing */
.account-settings-card {
  max-width: 980px;
  padding: 2rem 2.25rem;
}

.help-card {
  max-width: 980px;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

/* Change Password modal sizing */
.change-password-modal-dialog {
  width: min(720px, 96vw);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.faq-item {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.18);
  border-radius: 0.85rem;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 750;
  color: rgba(224, 242, 254, 0.95);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-weight: 900;
  color: rgba(56, 189, 248, 0.95);
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-answer {
  padding: 0 1rem 1rem 1rem;
  color: rgba(229, 231, 235, 0.92);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Report date/time picker (custom modal) */
.report-dt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
}

.dt-picker-dialog {
  width: min(520px, 96vw);
}

.dt-picker {
  display: grid;
  gap: 0.85rem;
}

.dt-picker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dt-picker-selected {
  font-weight: 800;
  color: rgba(224, 242, 254, 0.95);
  line-height: 1.2;
}

.dt-picker-monthbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
}

.dt-picker-month {
  text-align: center;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.dt-picker-nav {
  padding: 0.7rem 0.95rem;
  min-width: 52px;
}

.dt-picker-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  color: rgba(203, 213, 225, 0.9);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  user-select: none;
}

.dt-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.dt-day {
  height: 44px;
  border-radius: 0.85rem;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e5e7eb;
  font-weight: 800;
  font-size: 0.95rem;
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
}

.dt-day:hover:not(.dt-day-out) {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(56, 189, 248, 0.12);
}

.dt-day-out {
  opacity: 0.25;
}

.dt-day-today {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
}

.dt-day-selected {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.65);
  color: #e0f2fe;
}

.dt-day-range-start,
.dt-day-range-end {
  background: rgba(56, 189, 248, 0.28);
  border-color: rgba(56, 189, 248, 0.85);
  color: #e0f2fe;
}

.dt-day-inrange {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.hist-range-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: start;
}

@media (max-width: 540px) {
  .hist-range-fields {
    grid-template-columns: 1fr;
  }
}

.dt-picker-time {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.25rem;
}

.dt-picker-timeval {
  text-align: center;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}

.dt-picker-timehint {
  color: rgba(203, 213, 225, 0.85);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.timeline-quick {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.25rem;
}

.timeline-quick-btn,
.hist-quick-btn {
  padding: 0.65rem 0.95rem;
  font-size: 0.85rem;
}

/* Histogram x-axis label (time + small date) */
.usage-bar-label {
  display: grid;
  gap: 0.15rem;
  justify-items: center;
}

.usage-bar-label-main {
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1;
  user-select: none;
}

.usage-bar-label-sub {
  font-size: 0.7rem;
  color: rgba(203, 213, 225, 0.75);
  line-height: 1;
  user-select: none;
}



