html, body {
  width: 100%;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}


body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  min-height: 100vh;
}

/* Solo para login */
body.login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; /* Aquí sí puede mantenerse fijo */
}


/* Login */
.login-container {
  background: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

h2 {
  margin-bottom: 25px;
  color: #333;
}

label {
  float: left;
  margin-top: 15px;
  font-weight: 600;
  color: #333;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  transition: border 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #007bff;
  outline: none;
}

button {
  margin-top: 20px;
  width: 100%;
  padding: 10px;
  background: #007bff;
  border: none;
  color: white;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #0056b3;
}

.error {
  color: red;
  margin-top: 10px;
  font-size: 14px;
}

/* Dashboard */
.dashboard {
  background: #fff;
  max-width: 960px;
  margin: 6rem auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.dashboard h1 {
  color: #333;
  margin-bottom: 20px;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.boton {
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.boton:hover {
  background-color: #0056b3;
}

.logout {
  background-color: #e53935;
}

.logout:hover {
  background-color: #b71c1c;
}

.exito {
  color: green;
  margin-top: 10px;
  font-size: 14px;
}

.boton.volver {
  display: inline-block;
  margin: 15px 0 25px 0;
  padding: 8px 15px;
  background-color: #6c757d;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.3s;
}

.boton.volver:hover {
  background-color: #495057;
}


@media (max-width: 768px) {
  body {
    padding: 0 10px;
  }

  .dashboard {
    margin-top: 14rem;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .acciones {
    flex-direction: column;
    align-items: stretch;
  }

  .boton,
  .boton.volver {
    text-align: center;
  }
