/* ===============================
   Toggle Switch (Manter conectado)
   =============================== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin-right: 10px;
}

.toggle-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: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #ffcc00;
}

input:checked+.slider:before {
  transform: translateX(26px);
}

#dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #ffcc00;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: color 0.3s, background 0.3s;
}

#dark-mode-toggle:hover {
  color: #e6b800;
  background-color: rgba(0, 0, 0, 0.1);
}

/* ===============================
   Dark Mode
   =============================== */

body.dark-mode {
  background-color: #1e1e1e;
  color: #f1f1f1;
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode header,
body.dark-mode nav {
  background-color: #2a2a2a;
  color: #f1f1f1;
  border-bottom: 1px solid #444;
}

body.dark-mode form {
  background-color: #2a2a2a;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #444;
  color: #f1f1f1;
}

body.dark-mode .form-group label {
  color: #ddd;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: #333;
  color: #f1f1f1;
  border: 1px solid #555;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #bbb;
}

body.dark-mode button,
body.dark-mode .btn {
  background-color: #444;
  color: #f1f1f1;
  border: 1px solid #666;
  cursor: pointer;
  transition: background-color 0.2s;
}

body.dark-mode button:hover,
body.dark-mode .btn:hover {
  background-color: #555;
}

body.dark-mode a {
  color: #ffda55;
  text-decoration: none;
}

body.dark-mode a:hover {
  color: #ffd633;
  text-decoration: underline;
}

body.dark-mode table {
  background-color: #2a2a2a;
  color: #f1f1f1;
  border-collapse: collapse;
}

body.dark-mode table th {
  background-color: #333;
  color: #f1f1f1;
  border: 1px solid #444;
}

body.dark-mode table td {
  background-color: #2a2a2a;
  color: #f1f1f1;
  border: 1px solid #444;
}

body.dark-mode .card,
body.dark-mode .panel,
body.dark-mode .container {
  background-color: #252525;
  color: #f1f1f1;
  border: 1px solid #444;
  box-shadow: none;
}

body.dark-mode #toast {
  background-color: #2d2d2d;
  color: #f1f1f1;
  border: 1px solid #444;
}

body.dark-mode footer {
  background-color: #2a2a2a;
  color: #ccc;
  border-top: 1px solid #444;
}