/* ======== RESET ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ======== FONDO ======== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url("fondo.png") no-repeat center center fixed;
  background-size: cover;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* ======== CONTENEDORES ======== */
#login, #sistema {
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 500px;
  text-align: center;
}

h1, h2 {
  color: #2c3e50;
  margin-bottom: 15px;
}

/* ======== TABS ======== */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.tab-button {
  flex: 1;
  padding: 12px;
  border: none;
  cursor: pointer;
  background: #ecf0f1;
  color: #2c3e50;
  font-weight: bold;
  border-radius: 8px 8px 0 0;
  transition: 0.3s;
}

.tab-button:hover {
  background: #dcdde1;
}

.tab-button.active {
  background: #3498db;
  color: #fff;
}

/* ======== CONTENIDO TABS ======== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ======== CARDS ======== */
.card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: left;
}

/* ======== INPUTS ======== */
input[type="text"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 10px;
  margin: 8px 0 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s;
}

input:focus {
  border-color: #3498db;
}

/* ======== SELECT ======== */
select {
  width: 100%;
  padding: 10px;
  margin: 8px 0 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s;
}

select:focus {
  border-color: #3498db;
}

/* ======== BOTONES ======== */
button {
  background: #3498db;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
  margin: 5px;
}

button:hover {
  background: #2980b9;
}

button[type="button"]:nth-child(2) {
  background: #e74c3c;
}

button[type="button"]:nth-child(2):hover {
  background: #c0392b;
}

/* ======== RESULTADOS ======== */
#resultado {
  margin-top: 15px;
  padding: 15px;
  background: #f4f6f9;
  border-radius: 8px;
  min-height: 50px;
}

#resultado img {
  max-width: 150px;
  margin-top: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ======== MENSAJES ======== */
#loginMsg, #msg {
  margin-top: 10px;
  font-size: 14px;
  color: #e74c3c;
}

.alert {
  padding: 12px 18px;
  border-radius: 8px;
  margin-top: 15px;
  font-weight: bold;
  text-align: center;
  animation: fadeIn 0.4s ease-in-out;
}

.alert-success {
  background: #2ecc71;
  color: #fff;
  box-shadow: 0 2px 6px rgba(46, 204, 113, 0.4);
}

.alert-error {
  background: #e74c3c;
  color: #fff;
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}