* {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
}
body {
  margin: 0;
  padding: 0;
  font-size: 14px;
}
#map {
  height: 100vh;
  width: 100%;
  position: relative;
}
/* .leaflet-interactive {
  cursor: inherit !important;
} */
.info_card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  padding: 28px 32px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  width: 320px;
  font-family: "Inter", sans-serif;
  flex-direction: column;
  transition: all 0.3s ease;
  border-top: 4px solid #216c3c;
}
#sensorCard {
  display: none;
}

#motorCard {
  display: none;
}

/* Card header */
.info_card h3 {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  color: #216c3c;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Labels and inputs */
.info_card label {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  display: block;
  margin-bottom: 5px;
}

.info_card input[type="text"],
.info_card input[type="date"],
.info_card select {
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
  font-size: 14px;
  color: #1f2937;
  background-color: #f9fafb;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
}

.info_card input[type="text"]:focus,
.info_card input[type="date"]:focus,
.info_card select:focus {
  border-color: #216c3c;
  box-shadow: 0 0 0 3px rgba(33, 108, 60, 0.12);
  background-color: #ffffff;
}

.info_card input[readonly] {
  background-color: #f0f0f0;
  color: #9ca3af;
  cursor: not-allowed;
}

.info_card input[type="checkbox"] {
  accent-color: #216c3c;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  cursor: pointer;
}

.info_card label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: #374151;
  margin-bottom: 14px;
  cursor: pointer;
}

.info_card button[type="button"] {
  width: 100%;
  padding: 11px;
  background-color: #216c3c;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s ease;
  margin-top: 4px;
}

.info_card button[type="button"]:hover {
  background-color: #1b5a2e;
}

.info_card button[type="button"]:disabled {
  background-color: #6b9e7a;
  cursor: not-allowed;
}

.info_card .close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  cursor: pointer;
  font-weight: bold;
  font-size: 20px;
  color: #9ca3af;
  line-height: 1;
  transition: color 0.2s;
}

.info_card .close-btn:hover {
  color: #216c3c;
}
/* Removed blanket margin:0 on .leaflet-control — it broke control spacing */
.leaflet-top.leaflet-right .leaflet-control {
  margin: 0 !important;
}
.map-message {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  z-index: 1000;
}
.hidden {
  display: none;
}
/**/
.sensor-popup {
  font-family: "Segoe UI", sans-serif;
  width: 280px;
  padding: 14px 16px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  color: #333;
}

/* Header */
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.popup-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f3a93;
}

.popup-actions {
  display: flex;
  gap: 6px;
}

.action-btn {
  border: none;
  background: none;
  cursor: pointer;
  padding: 2px;
}

.action-btn img {
  width: 18px;
  height: 18px;
  filter: brightness(0.4);
  transition: filter 0.2s;
}

.action-btn:hover img {
  filter: brightness(1);
}

/* Sections */
.sensor-section {
  margin-bottom: 12px;
  border-top: 1px solid #e2e6eb;
  padding-top: 10px;
}

/* Detail Rows */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid #f3f4f6;
}
.detail-row span:first-child {
  color: #6b7280;
  font-weight: 500;
}
.status {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 12px;
}

.status.active {
  background-color: #d4f4dd;
  color: #1f8a4c;
}

.status.inactive {
  background-color: #f8d7da;
  color: #a71d2a;
}

/* Switch */
.switch-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 18px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 18px;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/* Sensor Readings */
.sensor-readings h5 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #216c3c;
}

.reading-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.reading-item {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
}
.reading-label {
  color: #9ca3af;
  font-size: 11px;
  margin-bottom: 3px;
}
.reading-item strong {
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
}
/* .reading-item span{
  margin-left: 20px;
} */
/* Extra Info */
.sensor-extra .detail-row {
  font-size: 12px;
  margin-bottom: 4px;
}
.detail-value {
  color: #1f2937;
  font-weight: 600;
  font-family: "Inter", sans-serif;
}
.modal {
  font-family: "Segoe UI", sans-serif;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  width: 360px;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.modal-content p {
  font-size: 14px;
  color: #555;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn.cancel {
  background: #eee;
}

.btn.danger {
  background: #e53935;
  color: white;
}
.action-message {
  position: absolute;
  font-family: "Segoe UI", sans-serif;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4caf50;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  z-index: 1000;
}
.hidden {
  display: none;
}
/* Modern color picker container */
#colorPickerWrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 15px;
  border: 2px solid #444;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  background-color: #fff;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Optional: style the input inside the wrapper */
#colorPickerWrapper input[type="color"] {
  width: 60px;
  height: 60px;
  border: none;
  cursor: pointer;
  padding: 0;
  background: none;
}
#errorMessage {
  background-color: #e53935;
}
.map-nav {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 9999;
  display: flex;
  gap: 6px;
  align-items: center;
}
.map-nav-btn {
  background: #ffffff;
  color: #333;
  border: 1px solid #ccc;
  padding: 8px 13px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: "Inter", sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s;
}
.map-nav-btn:hover {
  background: #f0f0f0;
  border-color: #aaa;
}
.map-nav-logout {
  color: #c0392b;
  border-color: #f5c6c6;
}
.map-nav-logout:hover {
  background: #fff5f5;
  border-color: #e57373;
}

/* ── Left sidebars ───────────────────────────────────────────────────────── */
.left-panels {
  position: fixed;
  top: 80px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
  width: 200px;
}

/* ── Alerts panel ─────────────────────────────────────────────────────────── */
.alerts-panel {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.16);
  z-index: 900;
  overflow: hidden;
  font-family: "Inter", sans-serif;
}

.alerts-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 10px 14px;
  background: #b91c1c;
  transition: background 0.3s;
}

.alerts-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.alerts-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  flex-shrink: 0;
}

.alerts-toggle {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  font-size: 15px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  transition: background 0.15s;
}
.alerts-toggle:hover { background: rgba(255,255,255,0.32); }

.alerts-panel.collapsed .alerts-list { display: none; }

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
}
.alerts-list::-webkit-scrollbar { width: 3px; }
.alerts-list::-webkit-scrollbar-thumb { background: #fca5a5; border-radius: 4px; }

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
}

.alert-critical {
  background: #fef2f2;
  border-left: 3px solid #dc2626;
}

.alert-warning {
  background: #fff7ed;
  border-left: 3px solid #ea580c;
}

.alert-info {
  background: #fefce8;
  border-left: 3px solid #ca8a04;
}

.alert-icon { font-size: 14px; line-height: 1.4; flex-shrink: 0; }

.alert-body { flex: 1; min-width: 0; }

.alert-title {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-detail {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.3;
}

.alerts-empty {
  padding: 14px 10px;
  text-align: center;
  color: #6b7280;
  font-size: 12px;
}

/* ── Sidebar cards ─────────────────────────────────────────────────────────── */
.sidebar-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  overflow: hidden;
  font-family: "Inter", sans-serif;
  transition: width 0.22s ease;
}

.sidebar-card.collapsed .sidebar-list {
  display: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 10px 14px;
  background: #216c3c;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.sidebar-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  flex-shrink: 0;
}

.sidebar-toggle {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  font-size: 15px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  transition: background 0.15s;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.32); }

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  max-height: 200px;
  overflow-y: auto;
}
.sidebar-list::-webkit-scrollbar { width: 3px; }
.sidebar-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

.sensor-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  background: #f9fafb;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.sensor-item:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.sensor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.sensor-dot.active   { background: #22c55e; }
.sensor-dot.inactive { background: #e53935; }

.sensor-dot.active::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.25);
  animation: dot-pulse 1.8s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.7); opacity: 0; }
}

.sensor-info { flex: 1; min-width: 0; }

.sensor-code {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sensor-type {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 1px;
}

.motor-scheduled-badge {
  font-size: 9px;
  font-weight: 700;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 5px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.sensor-battery {
  font-size: 10px;
  color: #6b7280;
  flex-shrink: 0;
}
.sensor-battery.low { color: #ef4444; font-weight: 700; }

/* ── Schedule sidebar ────────────────────────────────────────────────────── */
.schedule-sidebar {
  position: fixed;
  top: 14px;
  right: 56px;
  width: 215px;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  z-index: 999;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  overflow: hidden;
  font-family: "Inter", sans-serif;
}

.schedule-sidebar.collapsed .schedule-list {
  display: none;
}

.schedule-sidebar-header {
  background: #1a5c99;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 10px 10px 14px;
  letter-spacing: 0.2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-sidebar-title {
  flex: 1;
  white-space: nowrap;
}

.schedule-sidebar-toggle {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  font-size: 15px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  transition: background 0.15s;
}
.schedule-sidebar-toggle:hover { background: rgba(255,255,255,0.32); }

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  overflow-y: auto;
}
.schedule-list::-webkit-scrollbar { width: 3px; }
.schedule-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

.schedule-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 12px;
}

.schedule-item .schedule-motor {
  font-weight: 700;
  font-size: 12px;
  color: #111827;
  margin-bottom: 3px;
}

.schedule-item .schedule-info {
  color: #6b7280;
  font-size: 11px;
  margin-bottom: 7px;
  line-height: 1.5;
}

.schedule-item .schedule-actions {
  display: flex;
  gap: 4px;
}

.schedule-btn {
  flex: 1;
  padding: 5px 6px;
  font-size: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.schedule-btn.toggle    { background: #dcfce7; color: #166534; }
.schedule-btn.toggle.disabled { background: #fee2e2; color: #991b1b; }
.schedule-btn.delete    { background: #f3f4f6; color: #374151; }
.schedule-btn.delete:hover { background: #fee2e2; color: #991b1b; }

.schedule-form {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}

.schedule-form input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 6px;
  box-sizing: border-box;
}

.schedule-form button {
  width: 100%;
  padding: 7px;
  background: #216c3c;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.schedule-popup-btn {
  width: 100%;
  padding: 9px;
  background: #f0fdf4;
  color: #216c3c;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.schedule-popup-btn:hover {
  background: #dcfce7;
}
.mode-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.mode-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.mode-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn.active {
  background: #216c3c;
  color: white;
  border-color: #216c3c;
}

.mode-btn.auto {
  opacity: 1;
  cursor: pointer;
}

/* ── Auto config panel ──────────────────────────────────────────────────────── */
.auto-config {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auto-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auto-sensor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.auto-no-sensors {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

.auto-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
}

.auto-chip em {
  font-style: normal;
  color: #374151;
  font-weight: 400;
  font-size: 11px;
}

.auto-chip-remove {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 1px;
}

.auto-chip-remove:hover { color: #ef4444; }

.auto-pick-btn {
  width: 100%;
  padding: 7px;
  font-size: 13px;
  color: #216c3c;
  background: none;
  border: 1px dashed #216c3c;
  border-radius: 8px;
  cursor: pointer;
}

.auto-pick-btn:hover {
  background: #f0fdf4;
}

.auto-thresholds {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px;
}

.threshold-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #374151;
}

.threshold-row span:first-child {
  flex: 1;
  font-weight: 500;
}

.threshold-input {
  width: 58px;
  padding: 5px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  text-align: center;
}

.threshold-input:focus {
  border-color: #216c3c;
}

.auto-save-btn {
  width: 100%;
  padding: 9px;
  background: #216c3c;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.auto-save-btn:hover { background: #1b5a2e; }
.auto-save-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Sensor marker highlighted for auto-linking */
.sensor-selectable {
  filter: drop-shadow(0 0 6px #3b82f6) drop-shadow(0 0 12px #3b82f6);
  animation: pulse-select 1s ease-in-out infinite alternate;
}

@keyframes pulse-select {
  from { filter: drop-shadow(0 0 4px #3b82f6); }
  to   { filter: drop-shadow(0 0 10px #3b82f6) drop-shadow(0 0 18px #60a5fa); }
}

/* Already-linked sensor during selection mode */
.sensor-already-linked {
  filter: drop-shadow(0 0 6px #16a34a) !important;
  animation: none !important;
}

/* Auto badge in motor sidebar */
.motor-scheduled-badge.auto {
  background: #fef3c7;
  color: #b45309;
}

/* ── Auto section in schedule sidebar ───────────────────────────────────────── */
.auto-sidebar-divider {
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  letter-spacing: 0.8px;
  padding: 8px 2px 4px;
  border-top: 1px solid #e5e7eb;
  margin-top: 4px;
}

.auto-schedule-item {
  border-left: 2px solid #f59e0b;
}

.auto-sensor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.auto-sensor-tag {
  background: #fef9c3;
  color: #78350f;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
}

.auto-sensor-tag b {
  color: #15803d;
}

.auto-status {
  color: #6b7280;
}

.auto-status.active {
  color: #16a34a;
  font-weight: 600;
}
.schedule-popup-btn.schedule-set {
  background: #216c3c;
  color: white;
  border-color: #216c3c;
}

.schedule-popup-btn.schedule-set:hover {
  background: #1b5a2e;
}

/* ── 24h time spinner ────────────────────────────────────────────────────── */
.time-spinner-24h {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.time-spinner-24h input[type="number"] {
  width: 46px;
  padding: 7px 4px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  text-align: center;
  -moz-appearance: textfield;
  font-family: "Inter", sans-serif;
}

.time-spinner-24h input[type="number"]:focus {
  border-color: #216c3c;
  box-shadow: 0 0 0 3px rgba(33,108,60,0.1);
}

.time-spinner-24h input[type="number"]::-webkit-inner-spin-button,
.time-spinner-24h input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 28px;
}

.time-colon {
  font-size: 16px;
  font-weight: 700;
  color: #374151;
  line-height: 1;
  padding: 0 1px;
}

/* ── Weekday selector buttons ────────────────────────────────────────────── */
.day-btn {
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
  font-family: "Inter", sans-serif;
}
.day-btn.active {
  background: #216c3c;
  color: #fff;
  border-color: #216c3c;
}
.day-btn.all-days.active {
  background: #1a5c99;
  border-color: #1a5c99;
}

/* ── System status bar (top-center) ─────────────────────────────────────── */
.system-status-bar.hidden {
  display: none;
}

.system-status-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 1100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 4px 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  border: 1px solid rgba(0,0,0,0.07);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  pointer-events: none;
}

.status-icon {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.status-icon svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.status-icon.rain { color: #1d4ed8; }
.status-icon.tank-low { color: #b45309; }
.status-icon.blocked { color: #dc2626; }

.status-icon + .status-icon::before {
  content: "";
  display: block;
  width: 1px;
  height: 12px;
  background: #d1d5db;
  margin-right: 2px;
}
