/* ============================================================
   SALDOAMIGO — Global Styles
   Tokens, resets, typography, shared utilities
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── Design Tokens ── */
:root {
  /* Brand */
  --primary:        #003366;
  --primary-dark:   #001F3F;
  --primary-light:  #EBF0FA;
  --green:          #2ECC71;
  --green-dark:     #1aab5a;
  --green-light:    #E8FAF1;
  --cyan:           #00E5FF;
  --cyan-dim:       rgba(0, 229, 255, 0.15);
  --red:            #E53E3E;
  --red-light:      #FEF2F2;
  --amber:          #F6AD55;
  --amber-light:    #FFFBEB;

  /* Neutral */
  --bg:             #F0F4F8;
  --surface:        #FFFFFF;
  --border:         #E2E8F0;
  --border-dark:    #CBD5E0;
  --text:           #1A202C;
  --text-secondary: #4A5568;
  --muted:          #718096;
  --muted-light:    #A0AEC0;

  /* Sidebar */
  --sidebar-bg:     #0D1F35;
  --sidebar-w:      260px;

  /* Layout */
  --radius-sm:      8px;
  --radius:         16px;
  --radius-lg:      24px;
  --radius-xl:      32px;
  --radius-full:    9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.16);

  /* Gradients */
  --grad-brand:   linear-gradient(135deg, var(--primary) 0%, var(--green) 100%);
  --grad-dark:    linear-gradient(135deg, #0D1F35 0%, #003366 60%, #0a4f8a 100%);
  --grad-green:   linear-gradient(135deg, var(--cyan), var(--green));

  /* Transitions */
  --ease: 0.18s ease;
  --ease-slow: 0.3s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: 'DM Sans', sans-serif; color: var(--text); background: #fff; overflow-x: hidden; line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }

/* ── Typography Helpers ── */
.font-serif  { font-family: 'DM Serif Display', serif; }
/*.font-sans   { font-family: 'DM Sans', sans-serif; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ── Colour Utilities ── 
.text-primary  { color: var(--primary); }
.text-green    { color: var(--green); }
.text-red      { color: var(--red); }
.text-muted    { color: var(--muted); }
.text-white    { color: #fff; }*/

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(0,0,0,.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.spinner--white { border-color: rgba(255,255,255,.2); border-top-color: #fff; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--sidebar-bg);
  color: #fff;
  padding: 13px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--cyan);
  animation: toastIn .25s ease;
  max-width: 320px;
  pointer-events: all;
}
@keyframes toastIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Focus ring ── */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
