/* Safety Panel Container */
#safetyPanel {
    position: absolute;
    top: 80px;
    left: 1070px;
    width: auto;
    max-width: 720px;
    padding: 20px;
    background: #f2f2f2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 12px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
    z-index: 100;
  }
  #safetyPanel.active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Shared “Card” Styling */
  .security-card,
  .pin-card,
  .status-panel {
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  /* Top Controls Layout */
  .top-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  /* Security & Status Buttons */
  .security-btn,
  .status-btn {
    padding: 12px;
    background-color: #3a6eff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .3s ease;
  }
  .security-btn:hover,
  .status-btn:hover {
    background-color: #2f5cd3;
  }
  /* Active/Alarm state */
  .alarm-active {
    background-color: #ff4d4d !important;
    color: #fff         !important;
  }
  
  /* Alarm Log */
  .alarm-log ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 100px;
    overflow-y: auto;
  }
  .alarm-log li {
    padding: 6px 0;
    border-bottom: 1px solid #e0e0e0;
  }
  
  /* Grid for Status Panels */
  .status-panels {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr;
  }
  @media (min-width: 768px) {
    .status-panels {
      grid-template-columns: 1fr 1fr;
    }
  }
  
  /* Tire Pressures */
  .tire-pressures {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .tire-pressures li {
    font-size: 14px;
    margin-bottom: 4px;
  }
  
  /* Speed Limit Control */
  .speed-limit-control {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  #speedLimitSlider {
    width: 100px;
  }
  #speedLimitValue {
    width: 50px;
    text-align: right;
    font-size: 14px;
  }
  
  /* Dark Mode */
  body.dark-mode #safetyPanel {
    background: #2c2c2c;
    color: #fff;
  }
  body.dark-mode .security-card,
  body.dark-mode .pin-card,
  body.dark-mode .status-panel {
    background: #3a3a3a;
  }
  body.dark-mode .security-btn,
  body.dark-mode .status-btn {
    background: #5a75ff;
  }
  body.dark-mode .security-btn:hover,
  body.dark-mode .status-btn:hover {
    background: #4a63dd;
  }
  body.dark-mode .alarm-log li {
    border-color: #444;
  }
  body.dark-mode .tire-pressures li {
    color: #ccc;
  }
  

  .pin-message {
    margin-top: 10px;
    font-size: 13px;
    color: #ff4d4d;
    display: none;
  }
  
  body.dark-mode .pin-message {
    color: #ff8f8f;
  }
  
  button.security-btn.disabled {
    background-color: #ccc;
    cursor: not-allowed;
  }
  
  body.dark-mode button.security-btn.disabled {
    background-color: #666;
  }
  
  /* buton PIN deja setat */
button.security-btn.pin-set {
  background-color: #28a745 !important;
  color: #fff !important;
}
button.security-btn.pin-set:hover {
  background-color: #218838 !important;
}

#pinModal .login-box h3 {
  margin-bottom: 1rem;
}

#pinModalContent {
  margin-bottom: 1rem;
}
