@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

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

body {
  font-family: 'Poppins', sans-serif;
  background: #f5f6fa;
  min-height: 100vh;
}

/* LOGIN */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6fa;
}

.login-box {
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.login-box h1 {
  font-size: 20px;
  font-weight: 700;
  color: #2d3436;
  text-align: center;
  margin-bottom: 26px;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 8px 12px;
  gap: 4px;
}

.nav-item { position: relative; }

.nav-item > a {
  display: block;
  padding: 9px 18px;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-radius: 6px;
  transition: opacity .2s;
}

.nav-item:hover > a { opacity: .82; }

.n1 > a { background: #6c5ce7; }
.n2 > a { background: #00b894; }
.n3 > a { background: #e17055; }
.n4 > a { background: #0984e3; }
.n5 > a { background: #fdcb6e; color: #2d3436; }
.n6 > a { background: #d63031; }
.n7 > a { background: #00cec9; }
.n8 > a { background: #636e72; }
.n9 > a { background: #a29bfe; }

.drop {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 8px;
  min-width: 140px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  overflow: hidden;
  z-index: 500;
  margin-top: 4px;
}

.nav-item.active .drop { display: block; }

.drop a {
  display: block;
  padding: 10px 16px;
  font-size: 12px;
  color: #2d3436;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  transition: background .15s;
}

.drop a:last-child { border-bottom: none; }
.drop a:hover { background: #f5f6fa; }

/* CONTENIDO */
.contenido {
  max-width: 500px;
  margin: 50px auto;
  padding: 0 20px;
}

.contenido-tabla {
  max-width: 960px;
  margin: 50px auto;
  padding: 0 20px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.card h2 {
  font-size: 17px;
  font-weight: 700;
  color: #2d3436;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #b2bec3;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

input, select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #dfe6e9;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  margin-bottom: 14px;
  color: #2d3436;
  background: #fff;
  transition: border .2s;
}

input:focus, select:focus { border-color: #6c5ce7; }
input[readonly] { background: #f5f6fa; cursor: default; }

.btn-guardar {
  width: 100%;
  padding: 11px;
  background: #6c5ce7;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background .2s;
}

.btn-guardar:hover { background: #5a4bd1; }

.btn-eliminar {
  width: 100%;
  padding: 11px;
  background: #d63031;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background .2s;
}

.btn-eliminar:hover { background: #b71c1c; }

.btn-volver {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 14px;
  background: #f0f0f0;
  color: #636e72;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}

.btn-volver:hover { background: #dfe6e9; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

thead tr { background: #6c5ce7; }

thead th {
  padding: 13px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
}

tbody tr { border-bottom: 1px solid #f0f0f0; transition: background .12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: #f9f9f9; }
tbody tr:hover { background: #f0eeff; }
tbody td { padding: 11px 16px; color: #2d3436; font-weight: 500; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: #dfe6e9; border-radius: 5px; }
