/* ═══════════════════════════════════════════════════════════════
   TIENDA CONALEP — "OCEAN BLUES"
   Fuentes: Baloo 2 (títulos) + Varela Round (body) — letras negras
═══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Varela+Round&display=swap');

:root {
  /* Escala de azules */
  --b1: #03045e;
  --b2: #023e8a;
  --b3: #0077b6;
  --b4: #0096c7;
  --b5: #00b4d8;
  --b6: #48cae4;
  --b7: #90e0ef;
  --b8: #caf0f8;
  --b9: #e8f7fd;

  --bg:      #f0f8ff;
  --surface: #ffffff;
  --dark:    #000000;
  --text:    #000000;
  --muted:   #4a90b8;
  --border:  #b8dff7;
  --radius:  18px;
  --s1: 0 6px 28px rgba(0,150,199,0.14);
  --s2: 0 14px 50px rgba(0,119,182,0.22);
}

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

body {
  font-family: 'Varela Round', sans-serif;
  background: var(--bg);
  background-image: radial-gradient(var(--b8) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  color: var(--text);
  min-height: 100vh;
}

/* ══════════════════════════════
   NAVBAR
══════════════════════════════ */
#header {
  background: linear-gradient(135deg, var(--b1) 0%, var(--b2) 100%);
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0 20px;
  box-shadow: 0 6px 24px rgba(3,4,94,0.35);
}

#header::after {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg,
    var(--b5), var(--b6), var(--b7), var(--b6), var(--b5), var(--b4), var(--b5));
}

.nav {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  gap: 0;
}

.nav-brand {
  font-family: 'Baloo 2', cursive;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--b6);
  padding: 12px 22px;
  margin-right: 8px;
  border-right: 2px solid rgba(255,255,255,0.12);
  letter-spacing: 3px;
  text-shadow: 0 0 18px rgba(72,202,228,0.55);
  transition: letter-spacing 0.3s, transform 0.3s;
  cursor: default;
}
.nav-brand:hover { letter-spacing: 5px; transform: scale(1.05); }

.nav > li { position: relative; }

.nav > li > a {
  display: block;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.87rem;
  text-decoration: none;
  padding: 17px 13px;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s;
  position: relative;
}

.nav > li:nth-child(2) > a { color: var(--b6); }
.nav > li:nth-child(3) > a { color: var(--b7); }
.nav > li:nth-child(4) > a { color: var(--b5); }
.nav > li:nth-child(5) > a { color: #74c7ec; }
.nav > li:nth-child(6) > a { color: var(--b8); }
.nav > li:nth-child(7) > a { color: #a8dadc; }
.nav > li:nth-child(8) > a { color: var(--b6); }
.nav > li:nth-child(9) > a { color: var(--b7); }

.nav > li > a:hover { opacity: 0.65; transform: translateY(-3px); }

.nav > li > a::before {
  content: '●';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  font-size: 0.38rem;
  color: currentColor;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.nav > li:hover > a::before { transform: translateX(-50%) scale(1); }

/* Dropdown */
.nav li ul {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border-radius: 14px;
  min-width: 158px;
  list-style: none;
  box-shadow: var(--s2);
  z-index: 300;
  overflow: hidden;
  border: 2.5px solid var(--b8);
  border-top: 4px solid var(--b4);
  animation: popDrop 0.22s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes popDrop {
  from { opacity:0; transform:translateX(-50%) scale(0.88) translateY(-10px); }
  to   { opacity:1; transform:translateX(-50%) scale(1)    translateY(0); }
}

.nav > li:nth-child(2) ul { border-top-color: var(--b6); }
.nav > li:nth-child(3) ul { border-top-color: var(--b7); }
.nav > li:nth-child(4) ul { border-top-color: var(--b5); }
.nav > li:nth-child(5) ul { border-top-color: #74c7ec; }
.nav > li:nth-child(6) ul { border-top-color: var(--b8); }
.nav > li:nth-child(7) ul { border-top-color: #a8dadc; }
.nav > li:nth-child(8) ul { border-top-color: var(--b6); }
.nav > li:nth-child(9) ul { border-top-color: var(--b7); }

.nav li:hover > ul { display: block; }

.nav li ul li { border-bottom: 1px solid var(--b9); }
.nav li ul li:last-child { border-bottom: none; }

.nav li ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--b3);
  text-decoration: none;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.86rem;
  padding: 11px 18px;
  transition: background 0.15s, color 0.15s, padding-left 0.2s;
}
.nav li ul li a::before {
  content: '→';
  font-size: 0.85rem;
  transition: transform 0.2s;
  display: inline-block;
  color: var(--b5);
}
.nav li ul li a:hover {
  background: var(--b9);
  color: var(--b1);
  padding-left: 24px;
}
.nav li ul li a:hover::before { transform: translateX(4px); }

/* ══════════════════════════════
   LOGIN
══════════════════════════════ */
.group {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(ellipse at 10% 15%,  rgba(0,180,216,0.22)  0%, transparent 45%),
    radial-gradient(ellipse at 88% 10%,  rgba(72,202,228,0.18)  0%, transparent 45%),
    radial-gradient(ellipse at 85% 88%,  rgba(0,150,199,0.20)   0%, transparent 45%),
    radial-gradient(ellipse at 12% 85%,  rgba(144,224,239,0.20) 0%, transparent 45%),
    #e8f7fd;
}

.form-container {
  background: var(--surface);
  border-radius: 26px;
  padding: 52px 44px;
  width: 100%;
  max-width: 430px;
  box-shadow: var(--s2), 0 0 0 6px rgba(0,180,216,0.08);
  animation: cardPop 0.55s cubic-bezier(0.34,1.56,0.64,1) both;
  position: relative;
  overflow: hidden;
}

.form-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--b1), var(--b3), var(--b5), var(--b6), var(--b7), var(--b5), var(--b3));
}

.form-container::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(72,202,228,0.10), transparent 70%);
  top: -60px; right: -50px;
  border-radius: 50%;
  pointer-events: none;
}

@keyframes cardPop {
  from { opacity:0; transform:scale(0.80) translateY(28px); }
  to   { opacity:1; transform:scale(1)    translateY(0); }
}

.form-container h1 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.9rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 32px;
  color: var(--b2);
  letter-spacing: 1px;
}

/* Labels */
.form-container label,
.card label {
  display: block;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--b3);
  margin-bottom: 7px;
}

/* Inputs */
.form-input,
.card input,
.card select,
.card textarea {
  width: 100%;
  background: var(--b9);
  border: 2.5px solid var(--border);
  border-radius: 12px;
  color: #000000;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.93rem;
  padding: 12px 16px;
  margin-bottom: 18px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.2s, transform 0.2s;
}
.form-input:focus,
.card input:focus,
.card select:focus,
.card textarea:focus {
  border-color: var(--b4);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0,180,216,0.15);
  transform: translateY(-2px);
}
.form-input::placeholder,
.card input::placeholder { color: #a8d8ea; }

/* Botón login */
.form-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--b2) 0%, var(--b4) 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,119,182,0.38);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.form-btn::after {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 50%; height: 200%;
  background: rgba(255,255,255,0.20);
  transform: skewX(-20deg);
  transition: left 0.4s;
}
.form-btn:hover::after { left: 130%; }
.form-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,119,182,0.50); }
.form-btn:active { transform: scale(0.97); }

/* ══════════════════════════════
   CARD
══════════════════════════════ */
.page-wrapper {
  display: flex;
  justify-content: center;
  padding: 52px 20px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 44px 40px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--s1);
  animation: cardPop 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--b1), var(--b3), var(--b5), var(--b6), var(--b7));
  border-radius: var(--radius) var(--radius) 0 0;
}

.card::after {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(0,180,216,0.07), transparent 70%);
  bottom: -50px; right: -50px;
  border-radius: 50%;
  pointer-events: none;
}

.card h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--b2);
  margin-bottom: 26px;
  padding-bottom: 15px;
  border-bottom: 2.5px dashed var(--border);
}

/* ══════════════════════════════
   BOTONES
══════════════════════════════ */
.btn {
  display: inline-block;
  border: none;
  border-radius: 12px;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.90rem;
  padding: 11px 28px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  color: #ffffff;
}
.btn::after {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 50%; height: 200%;
  background: rgba(255,255,255,0.18);
  transform: skewX(-20deg);
  transition: left 0.35s;
}
.btn:hover::after { left: 130%; }
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: linear-gradient(135deg, var(--b3), var(--b5));
  box-shadow: 0 5px 18px rgba(0,150,199,0.35);
}
.btn-primary:hover { box-shadow: 0 9px 26px rgba(0,150,199,0.50); }

.btn-danger {
  background: linear-gradient(135deg, #1a6fa8, #0096c7);
  box-shadow: 0 5px 18px rgba(0,96,183,0.35);
}
.btn-danger:hover { box-shadow: 0 9px 26px rgba(0,96,183,0.48); }

/* Botón Volver */
.btn-menu {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--b9);
  color: var(--b2);
  border: 2.5px solid var(--border);
  border-radius: 12px;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.86rem;
  padding: 8px 18px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  margin-bottom: 22px;
}
.btn-menu:hover {
  background: linear-gradient(135deg, var(--b2), var(--b4));
  color: #fff;
  border-color: transparent;
  transform: translateX(-6px) scale(1.04);
  box-shadow: 0 7px 20px rgba(0,119,182,0.32);
}

/* ══════════════════════════════
   MENSAJES
══════════════════════════════ */
.msg-success {
  background: linear-gradient(135deg, #d0f0fc, #b3e8f7);
  border-left: 5px solid var(--b5);
  color: var(--b2);
  border-radius: 12px;
  padding: 13px 18px;
  margin-bottom: 18px;
  font-size: 0.90rem;
  animation: msgSlide 0.3s ease both;
}
.msg-error {
  background: linear-gradient(135deg, #d6eef8, #c2e3f5);
  border-left: 5px solid var(--b3);
  color: var(--b1);
  border-radius: 12px;
  padding: 13px 18px;
  margin-bottom: 18px;
  font-size: 0.90rem;
  animation: msgSlide 0.3s ease both;
}
@keyframes msgSlide {
  from { opacity:0; transform:translateX(-14px); }
  to   { opacity:1; transform:translateX(0); }
}

/* ══════════════════════════════
   TABLAS
══════════════════════════════ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.89rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--s1);
}

thead tr {
  background: linear-gradient(135deg, var(--b1) 0%, var(--b3) 100%);
}
thead th {
  padding: 15px 20px;
  text-align: left;
  font-family: 'Baloo 2', cursive;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--b7);
}

tbody tr {
  border-bottom: 2px solid var(--b9);
  transition: all 0.18s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: #f5fbff; }
tbody tr:hover {
  background: linear-gradient(90deg, #e0f4fc, #f0faff);
  transform: scale(1.003);
  box-shadow: 0 4px 16px rgba(0,180,216,0.10);
}
tbody td {
  padding: 13px 20px;
  color: #000000;
  font-family: 'Varela Round', sans-serif;
}

.action-link {
  color: var(--b3);
  text-decoration: none;
  font-weight: 700;
  margin-right: 10px;
  font-size: 0.84rem;
  transition: color 0.2s;
}
.action-link:hover { color: var(--b1); text-decoration: underline; }
.action-link.danger { color: var(--b2); }

/* ══════════════════════════════
   SCROLLBAR
══════════════════════════════ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--b9); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--b3), var(--b5));
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--b2), var(--b4));
}

::selection { background: rgba(0,180,216,0.20); color: #000; }
