/* === Fondo general con imagen y desenfoque === */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: url('fondo.jpg') no-repeat center center fixed;
  background-size: cover;
  backdrop-filter: blur(4px);
  color: #00BEA4;
}
/* Botón hamburguesa para abrir sidebar */
.btn-sidebar {
  font-size: 24px;
  background: none;
  border: none;
  color: #00BEA4;
  cursor: pointer;
  position: fixed;
  top: 35px;
  left: 35px;
  z-index: 1001;
  transition: color 0.3s ease;
}

.btn-sidebar:hover {
  color: #018776;
}

/* Sidebar */
.sidebar {
  height: 100%;
  width: 250px;
  position: absolute;
  z-index: 1000;
  top: 0;
  left: 0;
  background-color: rgba(255, 255, 255, 0.15);
  overflow-x: hidden;
  transition: 0.3s;
  padding-top: 60px;
  border-bottom-right-radius: 22px;
  border-top-right-radius: 22px;
  margin-top: 20px;
}



/* Botón cerrar sidebar */
.btn-cerrar-sidebar {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 36px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Menú dentro del sidebar */
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  padding: 15px 25px;
}

.sidebar-menu li a {
    color: #E0F6F4;
    text-decoration: none;
    font-size: 1.10em;
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 14px;
    padding: 5px 6px;
    transition: background 0.21s, color 0.13s;
}
.sidebar-menu li a:hover, .sidebar-menu .active a {
    background: #00BEA4;
    color: #fff !important;
}

.sidebar-menu li a i {
  margin-right: 12px;
  font-size: 20px;
}


/* === Contenedor central === */
.container {
  max-width: 1000px;
  margin: 50px auto;
  padding: 20px;
  margin-left: 250px;
}

/* === Encabezado === */
.main-header {
  text-align: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px 20px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.main-header h1 {
  margin: 0;
  font-size: 2.2rem;
}
.main-header h2 {
  margin-top: 5px;
  font-weight: normal;
  font-size: 1.2rem;
}

/* === Tarjeta principal === */
.card {
  background: rgba(255, 255, 255, 0.19);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin-top: 20px;
}

/* === Buscador === */
.search-bar input {
  width: 85%;
  padding: 10px 14px;
  border-radius: 22px;
  border: none;
  font-size: 1rem;
  margin-bottom: 20px;
  background-color: rgba(255, 255, 255, 0.5);
}

/* === Filtros === */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}
.filter {
  flex: 1;
  min-width: 180px;
}
.filter label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}
.filter select {
  width: 100%;
  padding: 8px;
  border-radius: 22px;
  border: none;
  background-color: rgba(255, 255, 255, 0.4);
}

/* === Botones === */
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.actions input[type="file"] {
  background-color: rgba(255, 255, 255, 0.4);
  padding: 6px;
  border-radius: 22px;
  border: none;
}
.actions button, .btn-activity{
  padding: 10px;
  background-color: #00bfa5;
  color: white;
  border: none;
  border-radius: 22px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-delete, .btn-edit{
    padding: 10px;
    border-radius: 22px;
    border: none;
    color: white;
}
.btn-delete{
    background-color: #d63a3a;
}
.btn-delete:hover{
    background-color: #961d1d;
}
.btn-edit {
    background-color: #ccb205;
}
.btn-edit:hover{
    background-color: #b59c00;
}
.actions button:hover,.btn-activity:hover {
  background-color: #009e87;
}

/* === Contenedor dinámico (#contenedor) === */
#contenedor {
  margin-top: 30px;
}

/* === MATERIAS: Estilo para .w3-card dentro de #contenedor === */
#contenedor .w3-card {
  background: rgba(255,255,255,0.05) !important;
  backdrop-filter: blur(14px);
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.13) !important;
  color: #222 !important;
  padding: 25px 18px 18px 18px !important;
  margin-bottom: 22px !important;
  border: none;
  transition: box-shadow .18s;
  position: relative;
}
#contenedor .w3-card:hover {
  box-shadow: 0 8px 32px rgba(0,191,165,0.16), 0 4px 20px rgba(0,0,0,0.19) !important;
  background: rgba(255,255,255,0.28) !important;
}

#contenedor .w3-text-teal {
  color: #02ab94 !important;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 2px;
  margin-top: 0;
}

#contenedor ul {
  margin-top: 15px;
  margin-bottom: 0;
  padding-left: 0;
}

#contenedor p {
  color: #2a2b2e;
  font-size: 1rem;
  margin: 2px 0 7px 0;
}

/* === Actividades === */
#contenedor li.actividad {
  position: relative;
  padding: 10px;
  background: rgba(255, 255, 255, 0.20);
  margin-bottom: 7px;
  border-radius: 22px;
  box-shadow: 0 1px 7px rgba(0,191,165,0.12);
  color: #021;
  transition: background .15s;
}

#contenedor li.actividad-entregada {
  opacity: 0.66;
  text-decoration: line-through;
  background: rgba(0, 191, 165, 0.07) !important;
}

#contenedor li.actividad:hover {
  background: rgba(0,191,165,0.05);
}

/* === Etiqueta de estatus === */
#contenedor .w3-tag {
  border-radius: 8px !important;
  font-size: 0.95em;
  margin-left: 5px;
}

/* === Fechas === */
.fecha-entrega {
  margin-left: 10px;
  font-weight: 500;
  font-size: 0.98em;
  padding: 3px 10px;
  border-radius: 13px;
  background: rgba(0,191,165,0.08);
  color: #137;
}

/* Colores según urgencia */
.fecha-verde {
  background-color: #d1fde8 !important;
  color: #008a62 !important;
}
.fecha-amarillo {
  background-color: #fff6c1 !important;
  color: #b59c00 !important;
}
.fecha-naranja {
  background-color: #ffe4b1 !important;
  color: #cc7500 !important;
}
.fecha-rojo {
  background-color: #ffd0ce !important;
  color: #c94444 !important;
}

/* === Botones de acción pequeña en tareas === */
#contenedor .btn-small, 
#contenedor .w3-button.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.97em;
  padding: 4px 8px 4px 8px !important;
  border-radius: 13px !important;
  margin-left: 2px;
  margin-right: 2px;
  margin-top: 0;
  margin-bottom: 0;
  box-shadow: 0 2px 7px rgba(0,191,165,0.08);
  cursor: pointer;
  transition: background 0.17s, transform 0.11s;
}
#contenedor .btn-small:active {
  transform: scale(0.94);
}

/* Right button (entregar) */
#contenedor .w3-right {
  float: right;
}

/* === Mejorar el look de los modales === */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background: rgba(255, 255, 255, 0.95);
  margin: 100px auto;
  padding: 20px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.modal-content header {
  position: relative;
  padding-bottom: 10px;
  border-bottom: 1px solid #ccc;
}
.modal-content h3 {
  margin: 0;
}
.modal-body {
  margin-top: 15px;
}
.modal-body label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
}
.modal-body input,
.modal-body select {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.modal-actions button {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background-color: #00bfa5;
  color: white;
  cursor: pointer;
}
.modal-actions button:last-child {
  background-color: #e74c3c;
}
.modal-actions button:hover {
  opacity: 0.9;
}
.close {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
}
@media (max-width: 768px) {
  /* Cambia el layout a vertical */
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
    padding-top: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: wrap;
    background-color: rgba(0, 191, 165, 0.15); /* o el color que prefieras */
  }

  .sidebar-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px 0;
  }

  .sidebar-menu li {
    padding: 5px;
  }

  .sidebar-menu li a {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 16px;
  }

  .btn-cerrar-sidebar {
    display: none;
  }

  /* Contenido ya no con margen izquierdo */
  .container {
    margin-left: 0;
    padding: 10px;
  }

  /* Opcional: reduce tamaño de textos */
  .main-header h1 {
    font-size: 1.5rem;
  }

  .main-header h2 {
    font-size: 1rem;
  }
}
