/* =========================
   RESET & BASE
========================= */
body {
  font-family: Arial, sans-serif; 
  background: #f4f6f8;           
  margin: 0;
  padding: 20px;
}

h1 {
  text-align: center;            
  margin-bottom: 20px;
}

/* =========================
   HEADER
========================= */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 20px;
}

.header h1 {
  text-align: center;
  margin: 0;
}

#darkModeToggle {
  position: absolute;
  right: 0;
}

/* =========================
   FORM CONTROLS
========================= */
.form-container {
  text-align: center;
  margin-bottom: 30px;
}

input,
select,
button {
  padding: 8px;
  margin: 5px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

button {
  background: #007bff;
  color: white;
  cursor: pointer;
  border: none;
}

button:hover {
  background: #0056b3;           
}

.btn-crear {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.btn-crear:hover {
   box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4), 0 4px 10px rgba(0, 0, 0, 0.25);
}

.btn-crear i {
  font-size: 16px;
}

/* =========================
   KANBAN BOARD
========================= */
.kanban {
  display: flex;
  gap: 20px;                     
  justify-content: center;
}

.column {
  background: #fff;
  padding: 15px;
  border-radius: 8px;            
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 250px;
  min-height: 300px;             
  position: relative;
}

.column h2 {
  text-align: center;
  margin-bottom: 15px;
}

/* =========================
   SCROLLBAR
========================= */
.kanban::-webkit-scrollbar {
  display: none;
}

.kanban {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* =========================
   TICKETS
========================= */
.ticket {
  background: #e8eef7;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
  border-left: 5px solid #007bff; 
  cursor: grab;
  position: relative;           
}

.ticket p {
  margin: 5px 0;
}

.ticket .delete-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #d9534f;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight {
  background: #d1ecf1;
  border: 2px dashed #007bff;
}

/* =========================
   PRIORITIES
========================= */
.priority {
  font-size: 12px;
  font-weight: bold;
}

.priority-alta {
  color: #fff;
  background: #d9534f;       
  padding: 2px 6px;
  border-radius: 4px;
}

.priority-media {
  color: #000;
  background: #f0ad4e;          
  padding: 2px 6px;
  border-radius: 4px;
}

.priority-baja {
  color: #fff;
  background: #5cb85c;          
  padding: 2px 6px;
  border-radius: 4px;
}

/* =========================
   ALERTS & STATES
========================= */
.limit-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #f8d7da;
  color: #721c24;
  padding: 10px;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
  display: none;                
}

.mensaje-limite {
  background: #ffc107;
  color: #000;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  padding: 5px;
  border-radius: 5px;
  margin-bottom: 5px;
  z-index: 10;
  position: relative;
}

/* =========================
   DARK MODE
========================= */
body.dark {
  background: #1e1e1e;
  color: #f1f1f1;
}

body.dark .column {
  background: #2b2b2b;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

body.dark .ticket {
  background: #3a3a3a;
  border-left-color: #4dabf7;
}

body.dark input,
body.dark select {
  background: #2b2b2b;
  color: #fff;
  border: 1px solid #555;
}

body.dark button {
  background: #4dabf7;
}

body.dark button:hover {
  background: #339af0;
}

body.dark .limit-message {
  background: #842029;
  color: #fff;
}

body.dark #customConfirm {
  background: #2b2b2b !important;
  color: #ffffff !important;
}

body.dark #customConfirm p {
  color: #ffffff !important;
}

body.dark #customConfirm button {
  color: #ffffff !important;
}

body.dark .btn-crear {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

/* =========================
   FLOATING ACTION BUTTON
========================= */
#clearBoardBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #dc3545;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;                
  pointer-events: none;     
  transition: opacity 0.3s ease;  
  z-index: 1000;
}

#clearBoardBtn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(220, 53, 69, 0.6);
}

/* =========================
   DARK MODE SWITCH
========================= */
.switch {
  position: absolute;
  right: 20px;
  top: 0;
  width: 70px;   
  height: 34px;  
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #2b2b2b;
  border-radius: 50px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
}

.slider::before {
  content: "";
  position: absolute;
  height: 26px;
  width: 26px;
  left: 4px;
  top: 4px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
  z-index: 2;
}

.icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px; 
  color: white;
  opacity: 0.6;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.moon {
  left: 10px;
  opacity: 1;
}

.sun {
  right: 10px;
  opacity: 0;
}

input:checked + .slider {
  background-color: #2b2b2b;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.6);
}

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

body.dark .moon {
  color: #ffffff;
  opacity: 1;
}

body.dark .sun {
  color: #ffffff;
  opacity: 0.3;
}

body:not(.dark) .sun {
  color: #f59e0b; 
  opacity: 1;
}

body:not(.dark) .moon {
  color: #555;
  opacity: 0.3;
}

body:not(.dark) .slider {
  background-color: #ddd;
}

input:checked + .slider .moon {
  opacity: 0;
}

input:checked + .slider .sun {
  opacity: 1;
}

/* =========================
   RESPONSIVE
========================= */
/* MOBILE KANBAN */
@media (max-width: 768px) {
  .kanban {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
  }

  .column {
    min-width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

}

/* MOBILE FAB */
@media (max-width: 768px) {
  #clearBoardBtn {
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
  }
}

/* MOBILE HEADER */
@media (max-width: 600px) {
  .header {
    flex-direction: column;
    gap: 10px;
  }
  #darkModeToggle {
    position: static;
  }
}

/* MOBILE SWITCH */
@media (max-width: 600px){
  .switch {
    position: static;
    margin-top: 0 auto;
    transform: translateY(-14px);
  }
}