@import url("./theme.css");

body {
  font-family: "Source Sans 3", "Segoe UI", Tahoma, sans-serif;
  color: var(--color-text);
  background: radial-gradient(circle at top right, #d9e8f3 0%, #eef3f7 42%, #f1f5f9 100%);
  min-height: 100vh;
}

.card-surface {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.card-soft {
  background: #f8fbfd;
  border: 1px solid #d9e4ee;
  border-radius: 0.9rem;
}

.registro-heading {
  border: 1px solid #bed2e2;
  background: linear-gradient(180deg, #f9fcff 0%, #f2f8fd 100%);
}

.input-principal {
  font-size: 1.05rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.input-valid {
  border-color: #1d7a46;
  box-shadow: 0 0 0 3px rgba(29, 122, 70, 0.12);
}

.input-invalid {
  border-color: #ab2f2f;
  box-shadow: 0 0 0 3px rgba(171, 47, 47, 0.12);
}

.lectora-mode {
  border-color: #7db7df;
  box-shadow: 0 0 0 3px rgba(76, 137, 187, 0.15);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  color: #cbd5e1;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  text-align: left;
  width: 100%;
}

.nav-link:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #e0f2fe;
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateX(4px);
}

.nav-link.active {
  background: rgba(59, 130, 246, 0.2);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.5);
  font-weight: 500;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.app-sidebar {
  width: 100%;
  overflow-x: visible;
}

.btn-sidebar-toggle {
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
}

.sidebar-collapsed {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.sidebar-collapsed #sidebar-nav {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.sidebar-collapsed .sidebar-category,
.sidebar-collapsed .sidebar-description,
.sidebar-collapsed .nav-label {
  display: none;
}

.sidebar-collapsed .sidebar-top-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  min-height: auto;
}

.sidebar-collapsed .sidebar-brand-card {
  flex: 0 0 auto;
  width: 100%;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.sidebar-collapsed .sidebar-brand-card > .sidebar-brand-card-inner {
  justify-content: center;
  gap: 0;
}

.sidebar-collapsed .sidebar-brand-icon {
  margin-right: 0;
}

.sidebar-brand-card {
  background:
    radial-gradient(circle at 10% 20%, rgba(96, 165, 250, 0.22), transparent 55%),
    linear-gradient(150deg, rgba(29, 78, 216, 0.22), rgba(15, 23, 42, 0.45));
  border: 1px solid rgba(96, 165, 250, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 14px 24px rgba(2, 6, 23, 0.35);
  transition: padding 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sidebar-brand-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 26px rgba(2, 6, 23, 0.42);
}

.sidebar-brand-card-inner {
  position: relative;
  z-index: 1;
}

.sidebar-brand-image {
  filter: drop-shadow(0 2px 6px rgba(59, 130, 246, 0.25));
}

.sidebar-brand-kicker {
  line-height: 1;
}

.sidebar-brand-title {
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.sidebar-collapsed .sidebar-brand-title {
  display: none;
}

.sidebar-collapsed .sidebar-brand-kicker {
  display: none;
}

.sidebar-collapsed .sidebar-brand-card .min-w-0 {
  display: none;
}

.sidebar-collapsed .btn-sidebar-toggle {
  position: static;
  transform: none;
  margin: 0;
}

.sidebar-top-row {
  min-height: 3rem;
}

.sidebar-collapsed .nav-link {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.sidebar-collapsed .nav-link-inner {
  justify-content: center;
  gap: 0;
}

.sidebar-collapsed .nav-link:hover {
  transform: none;
}

@media (min-width: 1024px) {
  .app-sidebar {
    width: 18rem;
    min-width: 18rem;
  }

  .sidebar-collapsed {
    width: 6rem;
    min-width: 6rem;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.input-base,
.select-base,
.textarea-base {
  width: 100%;
  border: 1px solid #c8d3dd;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-base:focus,
.select-base:focus,
.textarea-base:focus {
  outline: none;
  border-color: var(--color-brand-2);
  box-shadow: 0 0 0 3px rgba(29, 95, 139, 0.14);
}

.btn {
  border-radius: 0.75rem;
  padding: 0.6rem 0.95rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(145deg, var(--color-brand), var(--color-brand-2));
  box-shadow: 0 10px 20px rgba(15, 53, 87, 0.22);
}

.btn-secondary {
  color: var(--color-brand);
  background: #e8f1f7;
}

.btn-danger {
  color: #fff;
  background: var(--color-danger);
}

.fade-in {
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.toast-enter {
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ======================== PAGINACIÓN ======================== */
.btn-pagina {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.625rem;
  background: #fff;
  color: #475569;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pagina:hover:not(:disabled) {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.btn-pagina.activo {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  font-weight: 700;
}

.btn-pagina:disabled {
  opacity: 0.5;
  color: #94a3b8;
  background: #f8fafc;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

.btn-nav-paginacion {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.625rem;
  background: #fff;
  color: #475569;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-nav-paginacion:hover:not(:disabled) {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1e40af;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-nav-paginacion:disabled {
  opacity: 0.4;
  color: #94a3b8;
  background: #f8fafc;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

.btn-nav-paginacion:active:not(:disabled) {
  transform: translateY(0);
}

