@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap");

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

/* ===========================
   PALETA DE COLORES PRINCIPAL
   =========================== */
:root {
  --color-primary: #007A78;
  --color-primary-dark: #c62828;
  --color-secondary: #005B59;
  --color-gray-dark: #212121;
  --color-gray-medium: #757575;
  --color-gray-light: #e0e0e0;
  --color-gray-light: #dddddd;
  --color-white: #ffffff;
  --color-medium-dark: #3939393d;
  --color-medium-light: #f5f5f5;
  --background: #ffffff;
  --foreground: #212121;
  --primary: #007A78;
  --primary-foreground: #ffffff;
  --secondary: #005B59;
  --secondary-foreground: #212121;
  --accent: #f1f5f9;
  --accent-foreground: #212121;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #007A78;
  --destructive: #007A78;
  --destructive-foreground: #ffffff;
  --popover: #ffffff;
  --popover-foreground: #212121;
}

/* ===========================
   ESTILOS GENERALES
   =========================== */
body {
  font-family: "Space Grotesk", sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-weight: 700;
  color: var(--foreground);
  font-family: "Space Grotesk", sans-serif;
}

p {
  color: var(--muted-foreground);
}

/* ===========================
   TEXTOS
   =========================== */

.text-primary {
  color: var(--primary);
}

/* ===========================
   ENCABEZADO PRINCIPAL
   =========================== */
.hero {
  text-align: center;
  padding: 4rem 2rem;
}

.hero span {
  color: var(--color-primary);
}

.hero p {
  max-width: 700px;
  margin: 1rem auto 3rem auto !important;
  font-weight: 400;
  color: var(--color-gray-medium);
  line-height: 1.4;
}

.bg-white {
  background-color: var(--background);
}

.bg-gradient-primary {
  background: linear-gradient(
    322deg,
    var(--color-secondary) 10%,
    var(--color-white) 52%,
    var(--color-secondary) 100%
  ) !important;
}

.bg-primary-10 {
  background-color: #007A78;
}

.bg-secondary-10 {
  background-color: #fdf3f3;
}

.border-secondary-10 {
  border: 1px solid #fadddd;
}

.bg-gray-light {
  background-color: #f3f4f6;
}

.border-gray-light {
  border: #e5e7eb 1px solid;
}

.border-primary {
  border: 1px solid var(--primary);
}

.bg-foreground {
  background-color: var(--foreground);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-gray-superlight {
  background-color: #f9f9f9;
}

.bg-accent {
  background-color: var(--accent);
}

.bg-secondary {
  background-color: var(--secondary);
}

.bg-muted {
  background-color: var(--muted);
}

.bg-transparent {
  background-color: transparent;
}

.bg-border {
  background-color: var(--border);
}

.bg-input {
  background-color: var(--input);
}

.bg-ring {
  background-color: var(--ring);
}

.bg-destructive {
  background-color: var(--destructive);
}

.bg-popover {
  background-color: var(--popover);
}

.text-foreground {
  color: var(--foreground);
}

.text-muted-foreground {
  color: var(--muted-foreground);
}

.text-accent-foreground {
  color: var(--accent-foreground);
}

.text-secondary-foreground {
  color: var(--secondary-foreground);
}

.text-primary-foreground {
  color: var(--primary-foreground);
}

.text-destructive {
  color: var(--destructive);
}

.text-destructive-foreground {
  color: var(--destructive-foreground);
}

.text-popover-foreground {
  color: var(--popover-foreground);
}

.border-border {
  border-color: var(--border);
}

.border-input {
  border-color: var(--input);
}

.ring-ring {
  --tw-ring-color: var(--ring);
}

.ring-offset-background {
  --tw-ring-offset-color: var(--background);
}

.hover\:bg-accent:hover {
  background-color: var(--accent);
}

.hover\:bg-primary\/90:hover {
  background-color: color-mix(in srgb, var(--primary) 90%, transparent);
}

.hover\:bg-primary\/10:hover {
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
}

.hover\:bg-secondary:hover,
.hover\:bg-secondary\/40:hover {
  background-color: var(--secondary);
}

.hover\:bg-muted:hover,
.hover\:bg-muted\/30:hover,
.hover\:bg-muted\/50:hover {
  background-color: var(--muted);
}

.hover\:bg-destructive:hover {
  background-color: var(--destructive);
}

.hover\:text-foreground:hover {
  color: var(--foreground);
}

.hover\:text-accent-foreground:hover {
  color: var(--accent-foreground);
}

.hover\:text-destructive:hover {
  color: var(--destructive);
}

.hover\:border-primary:hover {
  border-color: var(--primary);
}

.focus\:bg-accent:focus {
  background-color: var(--accent);
}

.focus\:ring-ring:focus {
  --tw-ring-color: var(--ring);
}

.focus-visible\:ring-ring:focus-visible {
  --tw-ring-color: var(--ring);
}

.focus-visible\:outline-none:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus-visible\:ring-1:focus-visible {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0
    var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0
    calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow:
    var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
    var(--tw-shadow, 0 0 #0000);
}

[data-state="checked"] {
  background-color: var(--primary);
}

[data-state="checked"].text-primary-foreground {
  color: var(--primary-foreground);
}

.transition-colors {
  transition-property:
    color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.placeholder\:text-muted-foreground::placeholder {
  color: var(--muted-foreground);
}

.data-\[placeholder\]\:text-muted-foreground[data-placeholder] {
  color: var(--muted-foreground);
}

.divide-border > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--border);
}

.shadow {
  box-shadow:
    0 1px 3px 0 rgb(0 0 0 / 0.1),
    0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
/* ===========================
   BOTONES PERSONALIZADOS
   =========================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-secondary {
  background-color: transparent;
  color: var(--muted-foreground);
  border: 2px solid var(--border);
}

.btn-light-dark {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

/* ===========================
   TARJETAS DE INFORMACIÓN
   =========================== */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 3rem 2rem;
}

.card {
  width: 300px;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card-red {
  background-color: var(--color-secondary);
  border-left: 5px solid var(--color-primary);
}

.card-gray {
  background-color: var(--color-gray-light);
  border-left: 5px solid var(--color-gray-medium);
}

.card h3 {
  margin-top: 0;
  color: var(--color-gray-dark);
}

.card p {
  font-size: 0.95rem;
}

/* ===========================
   ANIMACIONES
   =========================== */

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

.position-relative {
  position: relative;
}

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

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .cards {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
  }
}

/* ===========================
   SIDEBAR COLLAPSE UTILITIES
   =========================== */
@media (min-width: 768px) {
  #adminSidebar {
    transition: width 0.3s ease-in-out, transform 0.3s ease-in-out;
  }

  #adminSidebar.is-collapsed {
    width: 5rem !important; /* 80px */
  }

  #adminSidebar.is-collapsed .sidebar-text {
    display: none !important;
  }

  #adminSidebar.is-collapsed .sidebar-header-row {
    justify-content: center !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  #adminSidebar.is-collapsed .sidebar-logo-link {
    justify-content: center !important;
    width: auto !important;
  }

  #adminSidebar.is-collapsed .sidebar-nav-item {
    justify-content: center !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  #adminSidebar.is-collapsed .sidebar-user-card {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  header.is-collapsed-layout,
  main.is-collapsed-layout,
  footer.is-collapsed-layout,
  .is-collapsed-layout {
    margin-left: 5rem !important; /* 80px */
  }
}

/* ===================================
   SIDEBAR CUSTOM STYLIZED SCROLLBAR
   =================================== */
#adminSidebar .overflow-y-auto,
#adminSidebar [class*="overflow-y-auto"] {
  scrollbar-width: thin;
  scrollbar-color: rgba(203, 213, 225, 0.6) transparent;
}

#adminSidebar .overflow-y-auto::-webkit-scrollbar,
#adminSidebar [class*="overflow-y-auto"]::-webkit-scrollbar {
  width: 4px;
}

#adminSidebar .overflow-y-auto::-webkit-scrollbar-track,
#adminSidebar [class*="overflow-y-auto"]::-webkit-scrollbar-track {
  background: transparent;
}

#adminSidebar .overflow-y-auto::-webkit-scrollbar-thumb,
#adminSidebar [class*="overflow-y-auto"]::-webkit-scrollbar-thumb {
  background-color: rgba(203, 213, 225, 0.6);
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}

#adminSidebar .overflow-y-auto::-webkit-scrollbar-thumb:hover,
#adminSidebar [class*="overflow-y-auto"]::-webkit-scrollbar-thumb:hover {
  background-color: rgba(148, 163, 184, 0.9);
}

/* En modo colapsado, ocultar completamente la barra para mantener los íconos perfectamente centrados */
#adminSidebar.is-collapsed .overflow-y-auto,
#adminSidebar.is-collapsed [class*="overflow-y-auto"] {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#adminSidebar.is-collapsed .overflow-y-auto::-webkit-scrollbar,
#adminSidebar.is-collapsed [class*="overflow-y-auto"]::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}
