/* ============================================================
   DELPHOS ACADEMY — Campus (zona privada)
   Coherente con enhance.css: verde esmeralda + dorado ámbar
   ============================================================ */

/* ===== BASE ===== */
.campus-body {
  min-height: 100vh;
  background: var(--bg-section, #F0FDF5);
}

/* ===== NAVBAR BADGE ===== */
.campus-nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: var(--grad-primary, linear-gradient(135deg, #166534, #16A34A));
  color: #fff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-left: 1rem;
}

.campus-nav-user {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue, #16A34A);
}

/* ===== AUTH WRAP (login) ===== */
.campus-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1rem 2rem;
  background: var(--bg-section, #F0FDF5);
}

.campus-auth-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(22,163,74,0.12);
  border: 1px solid rgba(22,163,74,0.1);
  text-align: center;
}

.campus-auth-logo img {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

.campus-auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--blue-dark, #166534);
  margin-bottom: 0.4rem;
}

.campus-auth-sub {
  font-size: 0.92rem;
  color: #64748b;
  margin-bottom: 1.75rem;
}

.campus-auth-footer {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: #64748b;
}

.campus-auth-footer a {
  color: var(--blue, #16A34A);
  font-weight: 600;
  text-decoration: none;
}

/* ===== FORM ===== */
.campus-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.campus-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.campus-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.campus-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.campus-input-wrap > i {
  position: absolute;
  left: 0.9rem;
  color: var(--blue, #16A34A);
  font-size: 0.85rem;
  pointer-events: none;
}

.campus-input-wrap input,
.campus-input-wrap textarea {
  width: 100%;
  padding: 0.7rem 0.9rem 0.7rem 2.4rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: #f9fafb;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.campus-input-wrap input:focus {
  border-color: var(--blue, #16A34A);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
  background: #fff;
}

.campus-toggle-pass {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 0.85rem;
  padding: 0;
}

.campus-btn-submit {
  width: 100%;
  padding: 0.8rem;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* ===== ALERTS ===== */
.campus-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.campus-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.campus-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

/* ===== CAMPUS MAIN ===== */
.campus-main {
  padding: 7rem 0 4rem;
  min-height: 100vh;
}

.campus-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.campus-header h1 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--blue-dark, #166534);
  margin-bottom: 0.25rem;
}

.campus-header-sub {
  color: #64748b;
  font-size: 0.95rem;
}

/* Plan badge */
.campus-plan-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-sin-plan { background: #f3f4f6; color: #6b7280; }
.badge-basico   { background: #dbeafe; color: #1d4ed8; }
.badge-completo { background: #fef3c7; color: #92400e; }

/* ===== EMPTY STATE ===== */
.campus-empty-state {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 4px 20px rgba(22,163,74,0.08);
  gap: 1rem;
}

.campus-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--blue-light, #DCFCE7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--blue, #16A34A);
}

.campus-empty-state h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1f2937;
}

.campus-empty-state p {
  color: #64748b;
  max-width: 400px;
}

/* ===== CURSOS GRID ===== */
.campus-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 1.25rem;
}

.campus-cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.campus-curso-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(22,163,74,0.08);
  border: 1px solid rgba(22,163,74,0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.campus-curso-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(22,163,74,0.15);
}

.campus-curso-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: var(--grad-primary, linear-gradient(135deg, #166534, #16A34A));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

.campus-curso-nivel {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue, #16A34A);
}

.campus-curso-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0.2rem 0 0.3rem;
}

.campus-curso-info p {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
}

.campus-curso-asig {
  font-size: 0.8rem;
  color: #9ca3af;
}

.campus-btn-curso {
  margin-top: auto;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

/* ===== BACK BUTTON ===== */
.campus-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue, #16A34A);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  margin-bottom: 1.5rem;
  font-family: inherit;
  transition: gap 0.2s;
}

.campus-back-btn:hover { gap: 0.6rem; }

/* ===== PLAYER LAYOUT ===== */
.campus-player-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .campus-player-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar lista de vídeos */
.campus-video-list {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(22,163,74,0.08);
  max-height: 70vh;
  overflow-y: auto;
}

.campus-video-list-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.campus-video-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: none;
  background: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  color: #374151;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.campus-video-item i { color: #9ca3af; font-size: 0.9rem; flex-shrink: 0; }
.campus-video-item span { flex: 1; }
.campus-video-item small { color: #9ca3af; font-size: 0.75rem; }

.campus-video-item:hover { background: var(--blue-light, #DCFCE7); color: var(--blue-dark, #166534); }
.campus-video-item.active { background: var(--blue-light, #DCFCE7); color: var(--blue-dark, #166534); font-weight: 600; }
.campus-video-item.active i { color: var(--blue, #16A34A); }

.campus-no-videos { font-size: 0.85rem; color: #9ca3af; padding: 0.5rem 0; }

/* Player principal */
.campus-player-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.campus-video-container {
  border-radius: 1rem;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}

.campus-video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.campus-video-info {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 20px rgba(22,163,74,0.08);
}

.campus-video-info h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.4rem;
}

.campus-video-info p {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.55;
}

/* ===== MODO OSCURO — Campus, Login, Admin ===== */
html.dark .campus-body          { background: #080d1c; }
html.dark .campus-auth-wrap     { background: #080d1c; }
html.dark .campus-auth-card     { background: #111827; border-color: rgba(255,255,255,0.08); }
html.dark .campus-auth-title    { color: rgba(255,255,255,0.92); }
html.dark .campus-auth-sub      { color: rgba(255,255,255,0.55); }
html.dark .campus-auth-footer   { color: rgba(255,255,255,0.45); }

html.dark .campus-field label   { color: rgba(255,255,255,0.75); }
html.dark .campus-input-wrap input,
html.dark .campus-input-wrap textarea {
  background: #1f2937;
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
}
html.dark .campus-input-wrap input:focus { border-color: #16A34A; background: #1f2937; }
html.dark .campus-input-wrap input::placeholder { color: rgba(255,255,255,0.35); }
html.dark .campus-toggle-pass   { color: rgba(255,255,255,0.45); }

html.dark .campus-main          { background: #080d1c; }
html.dark .campus-header h1     { color: rgba(255,255,255,0.92); }
html.dark .campus-header-sub    { color: rgba(255,255,255,0.55); }
html.dark .campus-section-title { color: rgba(255,255,255,0.85); }

html.dark .campus-curso-card    { background: #111827; border-color: rgba(255,255,255,0.07); }
html.dark .campus-curso-info h3 { color: rgba(255,255,255,0.92); }
html.dark .campus-curso-info p  { color: rgba(255,255,255,0.55); }
html.dark .campus-curso-asig    { color: rgba(255,255,255,0.4); }

html.dark .campus-empty-state   { background: #111827; }
html.dark .campus-empty-state h2 { color: rgba(255,255,255,0.9); }
html.dark .campus-empty-state p  { color: rgba(255,255,255,0.55); }

html.dark .campus-video-list    { background: #111827; }
html.dark .campus-video-list-title { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.1); }
html.dark .campus-video-item    { color: rgba(255,255,255,0.75); }
html.dark .campus-video-item:hover,
html.dark .campus-video-item.active { background: rgba(22,163,74,0.15); color: #4ade80; }

html.dark .campus-video-info    { background: #111827; }
html.dark .campus-video-info h2 { color: rgba(255,255,255,0.92); }
html.dark .campus-video-info p  { color: rgba(255,255,255,0.55); }

/* Admin dark */
html.dark .admin-body           { background: #080d1c; }
html.dark .admin-main           { background: #080d1c; }
html.dark .admin-table-wrap     { background: #111827; border-color: rgba(255,255,255,0.08); }
html.dark .admin-table thead    { background: linear-gradient(135deg, #052e16, #14532d); }
html.dark .admin-table th       { color: #4ade80; border-color: rgba(255,255,255,0.08); }
html.dark .admin-table td       { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.05); }
html.dark .admin-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
html.dark .admin-section-header h2 { color: rgba(255,255,255,0.9); }
html.dark .admin-tabs           { border-color: rgba(255,255,255,0.1); }
html.dark .admin-tab            { color: rgba(255,255,255,0.5); }
html.dark .admin-tab:hover,
html.dark .admin-tab.active     { color: #4ade80; }
html.dark .admin-modal-card     { background: #111827; }
html.dark .admin-modal-header h3 { color: rgba(255,255,255,0.92); }
html.dark .admin-modal-close    { background: #1f2937; color: rgba(255,255,255,0.6); }
html.dark .admin-modal-close:hover { background: #374151; }
html.dark .admin-select,
html.dark .admin-textarea       { background: #1f2937; border-color: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85); }
html.dark .admin-toggle-label   { color: rgba(255,255,255,0.75); }
html.dark .admin-filter-bar     { color: rgba(255,255,255,0.7); }

/* Botones outline en navbar modo oscuro */
html.dark .navbar .btn-outline  {
  color: rgba(255,255,255,0.85) !important;
  border-color: rgba(255,255,255,0.35) !important;
}
html.dark .navbar .btn-outline:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.7) !important;
}

