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

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

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

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
}

.login-box {
  background: #fff;
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box h1 {
  font-size: 22px;
  font-weight: 800;
  color: #1e1e2e;
  text-align: center;
  margin-bottom: 28px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.topbar {
  background: #1e1e2e;
  padding: 12px 20px;
  text-align: center;
}

.topbar h1 {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.navbar {
  background: #1e1e2e;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 10px 10px;
  gap: 5px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-item { position: relative; }

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

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

.n1 > a { background: linear-gradient(135deg, #667eea, #764ba2); }
.n2 > a { background: linear-gradient(135deg, #f5576c, #f093fb); }
.n3 > a { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.n4 > a { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.n5 > a { background: linear-gradient(135deg, #fa709a, #fee140); }
.n6 > a { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.n7 > a { background: linear-gradient(135deg, #fccb90, #d57eeb); }
.n8 > a { background: linear-gradient(135deg, #84fab0, #8fd3f4); }

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 10px;
  display: none;
}
.nav-item:hover::after { display: block; }

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

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

.drop a {
  display: block;
  padding: 10px 16px;
  font-size: 12px;
  color: #444;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid #f5f5f5;
  transition: background .15s, padding-left .15s;
}

.drop a:last-child { border-bottom: none; }
.drop a:hover { background: #f8f0ff; color: #764ba2; padding-left: 22px; }

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

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

.card {
  background: #fff;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.card h2 {
  font-size: 18px;
  font-weight: 800;
  color: #1e1e2e;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid #f0f0f0;
}

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

input, select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #eee;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  outline: none;
  margin-bottom: 16px;
  color: #1e1e2e;
  background: #fafafa;
  transition: border .2s, background .2s;
}

input:focus, select:focus { border-color: #667eea; background: #fff; }
input[readonly] { opacity: .65; cursor: default; }

.btn-guardar {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}

.btn-guardar:hover { opacity: .88; transform: translateY(-1px); }

.btn-eliminar {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #f5576c, #f093fb);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}

.btn-eliminar:hover { opacity: .88; transform: translateY(-1px); }

.btn-volver {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 16px;
  background: #f0f0f0;
  color: #555;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}

.btn-volver:hover { background: #e0e0e0; color: #333; }

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

thead tr { background: linear-gradient(135deg, #1e1e2e, #2d2d44); }

thead th {
  padding: 14px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.7);
}

tbody tr { border-bottom: 1px solid #f5f5f5; transition: background .15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: #fafafa; }
tbody tr:hover { background: #f0f0ff; }
tbody td { padding: 12px 18px; color: #333; font-weight: 600; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 6px; }
