/* ═══════════════════════════════════════
   Avellana — Global Styles
   Importar en TODAS las páginas
   ═══════════════════════════════════════ */

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

:root {
  /* Paleta avellana */
  --bg:        #F5EDE3;
  --surface:   #EDE0D0;
  --border:    #D6C5B0;
  --accent:    #A0714F;
  --accent-dk: #7A5237;
  --txt:       #2E1A0E;
  --muted:     #7A6050;
  --white:     #FDF8F3;

  /* Radios */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-pill: 100px;

  /* Tipografía */
  --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;

  /* Sidebar */
  --nav-w: 240px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utilidades generales ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Avatar */
.avatar {
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--white);
  flex-shrink: 0;
  user-select: none;
}
.avatar.xs  { width: 28px; height: 28px; font-size: 0.7rem;  }
.avatar.sm  { width: 34px; height: 34px; font-size: 0.78rem; }
.avatar.md  { width: 44px; height: 44px; font-size: 0.95rem; }
.avatar.lg  { width: 56px; height: 56px; font-size: 1.15rem; }
.avatar.xl  { width: 80px; height: 80px; font-size: 1.5rem;  }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; font-family: var(--font-sans);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  border: none;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary   { background: var(--accent);  color: var(--white); }
.btn-primary:hover { background: var(--accent-dk); text-decoration: none; color: var(--white); }
.btn-outline   { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--white); text-decoration: none; }
.btn-ghost     { background: transparent; color: var(--muted); border: 0.5px solid var(--border); }
.btn-ghost:hover { background: var(--surface); color: var(--txt); text-decoration: none; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-full { width: 100%; }

/* Cards */
.card {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
}

/* Inputs */
.input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--txt);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(160,113,79,0.14);
}
.input::placeholder { color: #C2AD98; }

/* Toast / Notificación flotante */
#toast {
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--txt);
  color: var(--white);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 9999;
  white-space: nowrap;
}
#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.animate-fade-in { animation: fadeIn 0.3s ease both; }
.animate-shake   { animation: shake 0.4s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
