/* ==========================================================================
   DATA CLARA CRM — BASE & LAYOUT
   ========================================================================== */

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

html, body {
  height: 100%;
  font-family: var(--font-family-sans);
  color: var(--text-main);
  background-color: var(--bg-app);
  background-image: radial-gradient(rgba(55, 59, 15, 0.03) 1px, transparent 0);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.5;
}

/* Tabular nums en números para finanzas, balances y tablas */
.tabular-nums, table, .kpi-value, .money-display {
  font-variant-numeric: tabular-nums;
}

/* App Shell */
#app-root {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.app-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: var(--bg-app);
  position: relative;
  overflow: hidden;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 48px;
  scroll-behavior: smooth;
}

/* Encabezados y jerarquía tipográfica */
h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 22px;
  line-height: 1.25;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
}

h3 {
  font-size: 15px;
  line-height: 1.35;
}

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

/* Scrollbars estilizados y limpios */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #D8D2C4;
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: #C4BDAE;
}

/* Reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
