/* ======================= */
/* Variables               */
/* ======================= */
:root {
  /* Colors */
  --color-bg: #f8f9fa;
  --color-text: #212529;
  --color-primary: #2b2c3b;
  --color-primary-hover: #555;
  --color-container-bg: rgba(255,255,255,0.85);
  --color-shadow: rgba(0,0,0,0.3);
  --color-error: #dc3545;

  /* Spacing */
  --space-xs: 5px;
  --space-s: 10px;
  --space-m: 15px;
  --space-l: 20px;

  /* Border & Radius */
  --radius: 10px;
  --shadow: 0 4px 10px var(--color-shadow);

  /* Fonts */
  --font-base: Arial, sans-serif;
}

/* ======================= */
/* Base & Reset           */
/* ======================= */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
}

input, select, button {
  font-family: var(--font-base);
}

/* ======================= */
/* Layout Containers      */
/* ======================= */
.login-page,
.main-page,
.gallery-page,
.audio-gallery-page {
  width: 100%;
  min-height: 100vh;
  background: url('/static/images/background.jpg') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-l);
}

.login-page {
  align-items: center;
}

.main-container,
.audio-gallery-container,
.settings-container {
  width: 90%;
  max-width: 900px;
  background: var(--color-container-bg);
  border-radius: var(--radius);
  padding: var(--space-l);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  overflow: visible;
  margin-top: 45px;
}

/* ======================= */
/* Headers & Buttons       */
/* ======================= */
.header,
.audio-gallery-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: var(--space-s);
}

button,
a .pagination-button,
.logout-button,
.back-button {
  display: inline-block;
  padding: var(--space-s);
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s, transform 0.2s;
}

button:hover,
a .pagination-button:hover,
.logout-button:hover,
.back-button:hover {
  background-color: var(--color-primary-hover);
  transform: scale(1.05);
}

/* ======================= */
/* Forms & Inputs          */
/* ======================= */
input,
select {
  width: 100%;
  margin: var(--space-s) 0;
  padding: var(--space-s);
  border: 1px solid #dadce0;
  border-radius: 5px;
  font-size: 16px;
  background-color: rgb(232, 240, 254);
  color: #202124;
  appearance: none;
}

input::placeholder {
  color: #5f6368;
}

.select-container {
  position: relative;
}
.select-container::after {
  content: '\25BC';
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  pointer-events: none;
  color: #555;
  font-size: 12px;
}

/* ======================= */
/* Components              */
/* ======================= */
.tile {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 120px;
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, background-color 0.2s;
}
.tile:hover {
  background-color: var(--color-primary-hover);
  transform: scale(1.05);
}

.tile.sparrow-metrics {
  background-color: SeaGreen;
  width: 180px;
  padding: var(--space-s);
  flex-direction: column;
  text-align: left;
  overflow: auto;
  height: auto;
}

.sparrow-metrics-container {
  display: flex;
  justify-content: center; /* center the inner box */
}

.sparrow-metrics {
  width: 100%;
  max-width: 600px;
  background: rgba(255,255,255,0.9);
  padding: var(--space-s);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
}
.sparrow-metrics h3 {
  margin-bottom: var(--space-s);
  font-size: 20px;
  color: #343a40;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 5px;
}
.sparrow-metrics p {
  margin: var(--space-xs) 0;
  font-size: 16px;
  color: #495057;
  display: flex;
  justify-content: space-between;
}
.sparrow-metrics strong {
  flex: 1;
}
.sparrow-metrics span {
  flex: 1;
  text-align: right;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  height: 10px;
  margin: var(--space-xs) 0;
}
.progress {
  height: 100%;
  background-color: #4caf50;
  transition: width 0.5s ease-in-out;
}

/* ======================= */
/* Page Specific Styles    */
/* ======================= */
/* Main Dashboard Grid */
.schedule-map-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-m);
}
.map-container,
.power-container,
.schedule-container {
  background: rgba(255,255,255,0.9);
  padding: var(--space-m);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.map-container { grid-column: 2; grid-row: 1 / 3; overflow: hidden; }
.schedule-container { grid-column: 1; grid-row: 1; text-align: center; }
.power-container { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; align-items: center; }

/* Gallery */
.gallery-title h2,
.audio-gallery-title h2 {
  font-size: 24px;
  color: #343a40;
}
/* Gallery grids: ensure consistent card layout */
.folders-grid,
.audio-folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  justify-items: center;
}

/* Folder card styling */
.folder-item,
.audio-folder-item {
  width: 100%;
  max-width: 200px;
  background: var(--color-container-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-m);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.folder-item:hover,
.audio-folder-item:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0,0,0,0.2);
}

/* Enlarge the folder icon */
.folder-icon {
  font-size: 48px;
  margin-bottom: var(--space-s);
  color: #f1c40f; /* optional: tint */
}

/* folder link / name styling */
.folder-link,
.folder-name {
  display: block;
  margin-top: var(--space-xs);
  font-size: 16px;
  color: var(--color-primary);
  text-decoration: none;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}
.modal-content {
  background-color: white;
  padding: var(--space-l);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: auto;
  max-width: 500px;
  animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.close-button {
  position: absolute;
  top: 30px;
  right: 35px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}
.close-button:hover { color: #bbb; }
.modal-ok-button {
  margin-top: var(--space-m);
}

/* Tiles Wrapper (desktop) */
.tiles-wrapper {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* Flash Messages */
.flash-messages {
  position: fixed;
  top: 70px; /* Below the 50px navbar + 20px spacing */
  right: var(--space-l);
  z-index: 1001;
  max-width: 400px;
}
.flash-message {
  padding: var(--space-s) var(--space-m);
  padding-right: 35px; /* Make room for close button */
  margin-bottom: var(--space-s);
  font-size: 14px;
  color: white; /* White text for all categories */
  opacity: 0.95;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s, transform 0.3s;
  animation: slideIn 0.3s ease-out;
  position: relative;
  overflow: hidden;
  white-space: pre-line; /* Preserve line breaks */
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.flash-message-text {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
}
.flash-message-close {
  position: relative;
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s;
  border-radius: 3px;
  margin-top: -4px;
  margin-right: -4px;
}
.flash-message-close:hover {
  color: white;
  background-color: rgba(0, 0, 0, 0.2);
}
.flash-message.warning .flash-message-close {
  color: rgba(0, 0, 0, 0.5);
}
.flash-message.warning .flash-message-close:hover {
  color: rgba(0, 0, 0, 0.8);
  background-color: rgba(0, 0, 0, 0.1);
}
.flash-message::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  animation: progressBar 5s linear forwards;
}
/* Don't show progress bar for manual-dismiss messages */
.flash-message.manual-dismiss::after {
  display: none;
}
.flash-message.info    { background-color: #17a2b8; color: white; }
.flash-message.success { background-color: #28a745; color: white; }
.flash-message.warning { background-color: #ffc107; color: #333; } /* Dark text for yellow */
.flash-message.warning::after { background-color: rgba(0, 0, 0, 0.3); }
.flash-message.error   { background-color: #dc3545; color: white; }
.flash-message:hover   { opacity: 1; transform: translateX(-2px); }

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 0.95;
    transform: translateX(0);
  }
}

@keyframes progressBar {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

/* Settings */
.current-schedule {
  background: var(--color-container-bg);
  padding: var(--space-m);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* Center all section headers on Settings page */
.settings-container h1,
.settings-container h2,
.settings-container h3,
.settings-container h4,
.settings-container h5,
.settings-container h6 {
  text-align: center;
}
.settings-container .form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.settings-container input[type="time"] {
  padding: var(--space-s);
}

/* ======================= */
/* Pagination Buttons      */
/* ======================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-s);
  margin: var(--space-m) 0;
}

.pagination-button,
.pagination a {
  display: inline-block;
  padding: var(--space-s) var(--space-m);
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background-color 0.2s, transform 0.2s;
}

.pagination-button:hover,
.pagination a:hover {
  background-color: var(--color-primary-hover);
  transform: scale(1.05);
}

/* Style for the "current page" text */
.pagination .current-page {
  font-weight: bold;
  color: var(--color-text);
  padding: 0 var(--space-s);
  pointer-events: none;
}

/* Disabled state (if you have it) */
.pagination a.disabled {
  background-color: #ccc;
  color: #666;
  cursor: default;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

/* ======================= */
/* Responsive (Mobile)     */
/* ======================= */
@media (max-width: 768px) {
  /* Stack the three cards vertically */
  .schedule-map-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: var(--space-m);
  }

  .schedule-container {
    grid-column: 1;
    grid-row: 1;
  }

  .map-container {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 250px;
    background: var(--color-container-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
  }
  .map-container > .leaflet-container {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
  }

  .power-container {
    grid-column: 1;
    grid-row: 3;
    min-height: 250px;
    background: var(--color-container-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Bottom tiles in 2×2 grid */
  .tiles-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-m);
    justify-items: center;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
  }
  .tiles-wrapper .tile {
    width: 120px;
    height: 120px;
  }
}


/* SPARROW-specific tile styling */
.tile.sparrow-tile {
  flex-direction: column;
  padding: var(--space-m);
  background-color: #2b2c3b;
  color: white;
  position: relative;
  overflow: hidden;
}
.tile.sparrow-tile:hover {
  background-color: var(--color-primary-hover);
  transform: scale(1.05);
}

/* Logo at the top */
.sparrow-logo {
  max-width: 100px;
  margin-bottom: var(--space-s);
}

/* Icon below the logo */
.sparrow-icon {
  width: 60px;
  margin-bottom: var(--space-s);
}

/* Tile label */
.tile-label {
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
}

/* ======================= */
/* Toggle‐Switch Styles    */
/* ======================= */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .2s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #027f2b;
}
input:checked + .slider:before {
  transform: translateX(26px);
}

/* ======================= */
/* Manage User‐Units Page  */
/* ======================= */
.main-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: url('/static/images/background.jpg') no-repeat center center fixed;
  background-size: cover;
}

.settings-container {
  position: relative;
  background: rgba(255,255,255,0.9);
  padding: 60px 20px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  width: 95%;
  max-width: 850px;
}

.back-link {
  position: absolute;
  top: 16px;
  right: 20px;
  background: #2b2c3b;
  color: white;
  padding: 6px 12px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9em;
}
.back-link:hover {
  background: #555;
}

h2 {
  text-align: center;
  margin: 0;
  font-size: 1.6em;
}

form {
  margin-top: 24px;
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 10px;
  margin-bottom: 24px;
}

.unit-item {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}
.unit-item:hover {
  background: rgba(0,0,0,0.03);
}

.unit-item input[type="checkbox"] {
  margin-top: 4px;
  margin-right: 10px;
  transform: scale(1.2);
}

.unit-label {
  line-height: 1.2;
}
.unit-label .friendly {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.unit-label .id {
  display: block;
  font-size: 0.85em;
  color: #666;
}

.actions {
  text-align: center;
}
.update-button {
  background-color: #2b2c3b;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  width: 100%;
  max-width: 400px;
}
.update-button:hover {
  background-color: #555;
}


/* Remove all rounded corners */
*,
*::before,
*::after {
  border-radius: 0 !important;
}

.profile-img {
  border-radius: 50% !important;
}

/* Leaflet marker icons and shadows */
.leaflet-marker-icon,
.leaflet-marker-shadow {
  border-radius: 50% !important;
}

/* Restore a circular crop for the profile card image */
.profile-card img {
  border-radius: 50% !important;
  width: 120px;        /* adjust size as needed */
  height: 120px;       /* keep square for a perfect circle */
  object-fit: cover;   /* fill the circle without distortion */
  display: block;
  margin: 0 auto var(--space-m);
}

/* ======================= */
/* Force real checkboxes   */
/* ======================= */
input[type="checkbox"] {
  /* Put back the browser's default checkbox appearance */
  appearance: auto;
  -webkit-appearance: checkbox;
  -moz-appearance: checkbox;

  /* Dont let the width: 100% or padding from the global rule apply */
  width: auto;
  height: auto;
  padding: 0;
  margin: 4px; /* or whatever spacing you prefer */

  /* Revert border/background so the native checkbox style shows */
  border: none;
  background-color: transparent;
}

/* =============================== */
/* Audio Settings form overrides  */
/* =============================== */
form[action="/settings/audio"] input[type="radio"] {
  /* restore native size for radios */
  width: auto;
  margin-right: var(--space-s);
}

form[action="/settings/audio"] .form-group {
  /* add a bit of breathing room */
  margin-bottom: var(--space-m);
}

form[action="/settings/audio"] #schedule_settings {
  /* separate the schedule block visually */
  margin-top: var(--space-m);
}

/* =============================== */
/* Restore native radio buttons    */
/* =============================== */
form[action="/settings/audio"] input[type="radio"] {
  /* revert any global sizing */
  width: auto;
  height: auto;
  margin-right: var(--space-s);
  /* tell the browser to draw real radios */
  appearance: auto;
  -webkit-appearance: radio;
  -moz-appearance: radio;
  display: inline-block;
}

/* ============================= */
/* Slider Variables              */
/* ============================= */
:root {
  --slider-track: #ddd;
  --slider-thumb: #027f2b; /* match your toggle “on” green */
}

/* ===== Override Default form-group for MD Threshold ===== */
.settings-container .form-group.threshold-slider-group {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: var(--space-s) !important;
  margin-bottom: var(--space-m) !important;
}

/* ===== MD Threshold Slider Group ===== */
.threshold-slider-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ===== Remove input’s own bg & border so track shows always ===== */
.settings-container .threshold-slider-group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 200px;
  height: 8px;
  margin: 0;
  padding: 0;                  /* override global padding */
  border: none;                /* override global border */
  background: transparent;     /* no bg here, track is drawn separately */
  outline: none;
  cursor: pointer;
}

/* ===== WebKit track (always on) ===== */
.settings-container .threshold-slider-group input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: var(--slider-track) !important;  /* always visible */
  border-radius: 4px;
}

/* ===== WebKit thumb ===== */
.settings-container .threshold-slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--slider-thumb);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
  margin-top: -4px;       /* center thumb on track */
  transition: transform 0.2s;
}
.settings-container .threshold-slider-group input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.1);
}

/* ===== Firefox track ===== */
.settings-container .threshold-slider-group input[type="range"]::-moz-range-track {
  height: 8px;
  background: var(--slider-track) !important;
  border-radius: 4px;
}
/* ===== Firefox thumb ===== */
.settings-container .threshold-slider-group input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--slider-thumb);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.settings-container .threshold-slider-group input[type="range"]:hover::-moz-range-thumb {
  transform: scale(1.1);
}

/* ===== IE/Edge track & fill ===== */
.settings-container .threshold-slider-group input[type="range"]::-ms-track {
  width: 100%;
  height: 8px;
  background: transparent;
  border-color: transparent;
  color: transparent;
}
.settings-container .threshold-slider-group input[type="range"]::-ms-fill-lower,
.settings-container .threshold-slider-group input[type="range"]::-ms-fill-upper {
  background: var(--slider-track) !important;
  border-radius: 4px;
}
/* ===== IE/Edge thumb ===== */
.settings-container .threshold-slider-group input[type="range"]::-ms-thumb {
  width: 16px;
  height: 16px;
  background: var(--slider-thumb);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.settings-container .threshold-slider-group input[type="range"]:hover::-ms-thumb {
  transform: scale(1.1);
}

/* =======================
   Environmental Readings
======================= */
.environmental-readings {
  background-color: #f9f9f9;
  padding: 20px;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.environmental-readings h2 {
  margin-bottom: 15px;
  text-align: center;
}
.readings-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}
.reading {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.reading-info {
  display: flex;
  flex-direction: column;
}
.reading-title {
  font-weight: bold;
  font-size: 1.1em;
}
.reading-value {
  font-size: 1.2em;
  color: #333;
}
.reading-timestamp {
  margin-top: 15px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  color: #555;
}

/* =======================
   Sensor Readings
======================= */
.sensor-readings {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
}
.sensor-readings .schedule-container {
  flex: 1 1 45%;
  cursor: pointer;
}
.sensor-readings .schedule-container i {
  font-size: 2.5em;
}

/* =======================
   Historical Chart Modal
======================= */
#historicalChart {
  width: 100%;
  height: 400px;
  overflow: hidden;
}

/* Weather widget */
.weather-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  padding: var(--space-m);
  margin: var(--space-m) 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.weather-container h2 {
  margin-bottom: var(--space-s);
  text-align: center;
}

.weather-cards {
  display: flex;
  gap: var(--space-s);
  justify-content: center;
  width: 100%;
  max-width: 400px;
}

.weather-card {
  background-color: #fff;
  padding: var(--space-s) var(--space-m);
  border-radius: 6px;
  max-width: 160px;
  text-align: center;
  line-height: 1.2;
  box-shadow: var(--shadow);
  /* kill the drop-shadow */
  box-shadow: none !important;
  /* remove any default border */
  border: none !important;
}

.weather-card:focus {
  outline: none;
}

.weather-card h4 {
  margin-bottom: var(--space-xs);
  font-size: 1em;
  font-weight: 600;
}

.weather-card i {
  font-size: 2em;
  margin-bottom: var(--space-xs);
}

.weather-card h3 {
  margin: 2px 0 6px;
  font-size: 1em;
  font-weight: 600;
}

.weather-card p {
  margin: 2px 0;
  font-size: 0.9em;
  color: #444;
}

.weather-card p strong {
  font-weight: 500;
}

/* Solar Dashboard Tiles */
.solar-container {
  display: flex;
  justify-content: center;
  gap: var(--space-m);
  flex-wrap: wrap;
  margin: var(--space-m) 0;
}

.solar-card {
  background: var(--color-container-bg);
  padding: var(--space-m);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex: 1 1 45%;
  text-align: center;
}

/* bar‐chart sizing */
.solar-bar-chart {
  width: 100%;
  max-width: 400px;
  height: 200px;
  margin: auto;
}

/* gauge sizing */
.solar-gauge {
  width: 200px;
  height: 200px;
  margin: auto;
}

/* reuse your existing reading-timestamp style */
.solar-card .reading-timestamp {
  margin-top: 15px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  color: #555;
}
