/* =========================================================
   Rasta Pets â€“ base.css
   Diseño Veterinario Minimalista / Soft UI
   Paleta: Verde menta + Azul profesional + Blanco
   ========================================================= */

/* ------------------ Fuentes -------------------- */

/* ------------------ Variables de tema -------------------- */
/* ------------------ Reset base -------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Evitar scroll de fondo cuando haya un modal o drawer abierto */
body:has(dialog[open]), 
body:has(.drawer:not([hidden])) {
  overflow: hidden;
}

.app-root {
  min-height: 100vh;
}

/* Indicador de navegación: components/loading.css */

@layer base {
  button,
  input,
  select,
  textarea {
    font: inherit;
  }
}

img,
svg {
  max-width: 100%;
}

/* ------------------ Selección -------------------- */
::selection {
  background: rgba(34, 199, 169, 0.22);
  color: var(--color-text);
}

/* ------------------ Enlaces ------------------------------- */
@layer base {
  a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
  }

  a:hover {
    color: var(--color-primary-hover);
  }
}

a:focus-visible {
  outline: 3px solid var(--focus-primary);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Tipografía básica del documento */
@layer base {
  body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
  }

  h1 {
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
    font-weight: 800;
  }

  h2 {
    font-size: 1.4rem;
    font-weight: 800;
  }

  h3 {
    font-size: 1.15rem;
    font-weight: 700;
  }

  p {
    margin-top: 0;
    color: var(--color-muted);
  }
}

/* ------------------ Títulos y Encabezados ------------------- */
/* Métricas compartidas: conservan la prioridad normal existente.
   Fuente importante compartida: components/typography.css. */
h1,
h2,
h3,
h4,
h5,
h6,
.title,
.block-title,
.modal-card-title,
.modal-confirm-title,
.card-title,
.sidebar-brand-name,
.topbar .title,
.caja-title,
.section-title,
.page__header h1,
.page__head-left h1,
legend,
.kpi-num,
.kpi-value,
.kpi-title,
.stat-value,
.stat-num {
  
  color: var(--color-text);
  margin-top: 0;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

/* Botones compartidos: components/buttons.css */

/* Formularios compartidos: components/forms.css */

/* Insignias y tarjetas: components/badges.css y components/cards.css */

/* ------------------ KPI Dashboard -------------------- */
.kpi {
  display: grid;
  gap: 10px;

  padding: 22px;
  min-height: 140px;

  background: linear-gradient(180deg, #ffffff, #fbfefd);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.kpi .label {
  color: var(--color-muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.kpi .value {
  color: var(--color-text);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.kpi .hint {
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* Tablas compartidas: components/tables.css */

/* Menú lateral: sidebar.css */

/* Alertas y avisos de Caja: components/alerts.css y components/caja-notices.css */

/* ------------------ Scrollbar moderno ------------------- */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(123, 139, 168, 0.35);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(123, 139, 168, 0.58);
}

/* ------------------ Utilidades ---------------------------- */


.text-muted {
  color: var(--color-muted);
}

.text-primary {
  color: var(--color-primary);
}

.text-success {
  color: var(--color-success);
}

.text-danger {
  color: var(--color-danger);
}

.bg-soft {
  background: var(--color-bg-soft);
}

.bg-primary-soft {
  background: var(--color-primary-soft);
}

.rounded {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}



.mb-1 {
  margin-bottom: 4px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.mb-4 {
  margin-bottom: 16px;
}

.p-1 {
  padding: 4px;
}

.p-2 {
  padding: 8px;
}

.p-3 {
  padding: 12px;
}

.p-4 {
  padding: 16px;
}


/* =========================================================
   Rasta Pets â€“ Fondo decorativo de patitas
   Patrón real de huellas para todas las páginas
   ========================================================= */

/* Estructura y fondos globales: layout.css */

/* ------------------ Responsive base -------------------- */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .kpi {
    border-radius: var(--radius-lg);
    padding: 1.15rem;
  }

}

.cs-option.disabled {
    color: var(--text-placeholder, #a0aec0);
    background-color: var(--bg-body, #f8fafc);
    cursor: not-allowed;
    pointer-events: none;
}
.list-toolbar .custom-select-wrapper {
    flex: 0 0 200px;
}
.list-toolbar .custom-select {
    flex: 0 0 200px;
    width: 200px;
}


/* =========================================================
   Utilidades Compartidas (Extraidas de refactorizacion)
   ========================================================= */
.mt-4 { margin-top: 4px; }
.mr-4 { margin-right: 4px; }
.mr-8 { margin-right: 8px; }
.fw-700 { font-weight: 700; }

/* Menús y estados de carga: components/menus.css y components/loading.css */
