/* ============================================================
   DESIGN TOKENS — AppAlmacen
   Light/Dark mode via [data-theme] on <html>
   ============================================================ */

:root,
[data-theme="light"] {
  /* Backgrounds */
  --bg-app:       #eef1f5;
  --bg-surface:   #ffffff;
  --bg-surface-2: #f4f6f9;
  --bg-surface-3: #e8ecf0;

  /* Text */
  --text-primary:   #1a1a2e;
  --text-secondary: #5a6478;
  --text-muted:     #8b96a8;
  --text-inverse:   #ffffff;

  /* Borders */
  --border:         #d0d7e2;
  --border-strong:  #a0aab8;

  /* Accent / Brand */
  --accent:          #0057b8;
  --accent-hover:    #0046a0;
  --accent-light:    #e8f0fc;
  --accent-gradient: linear-gradient(135deg, #103040 0%, #0057b8 100%);

  /* Sidebar */
  --sidebar-bg:      #0d1e30;
  --sidebar-text:    #a8bdd0;
  --sidebar-text-active: #ffffff;
  --sidebar-item-active-bg: rgba(0, 87, 184, 0.4);
  --sidebar-item-hover-bg:  rgba(255, 255, 255, 0.07);
  --sidebar-border:  rgba(255,255,255,0.08);

  /* Status */
  --success:      #1a7a4a;
  --success-bg:   #e6f4ed;
  --danger:       #c0392b;
  --danger-bg:    #fdf0ee;
  --warning:      #b8860b;
  --warning-bg:   #fdf8e8;
  --info:         #0057b8;
  --info-bg:      #e8f0fc;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg:  0 4px 20px rgba(0,0,0,0.15);

  /* Header */
  --header-bg:     #ffffff;
  --header-border: #d0d7e2;

  /* Overlay */
  --overlay: rgba(0,0,0,0.5);
}

[data-theme="dark"] {
  /* Backgrounds */
  --bg-app:       #0d1117;
  --bg-surface:   #161b22;
  --bg-surface-2: #1e2530;
  --bg-surface-3: #252d38;

  /* Text */
  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #6e7681;
  --text-inverse:   #0d1117;

  /* Borders */
  --border:        #30363d;
  --border-strong: #484f58;

  /* Accent / Brand */
  --accent:          #1f6feb;
  --accent-hover:    #388bfd;
  --accent-light:    #0d2137;
  --accent-gradient: linear-gradient(135deg, #0d2137 0%, #1f6feb 100%);

  /* Sidebar */
  --sidebar-bg:      #010409;
  --sidebar-text:    #768a9e;
  --sidebar-text-active: #e6edf3;
  --sidebar-item-active-bg: rgba(31, 111, 235, 0.35);
  --sidebar-item-hover-bg:  rgba(255,255,255,0.05);
  --sidebar-border:  rgba(255,255,255,0.06);

  /* Status */
  --success:     #238636;
  --success-bg:  #0d1f15;
  --danger:      #da3633;
  --danger-bg:   #1f1015;
  --warning:     #d29922;
  --warning-bg:  #1f1a0d;
  --info:        #1f6feb;
  --info-bg:     #0d1f37;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg:  0 4px 20px rgba(0,0,0,0.5);

  /* Header */
  --header-bg:     #161b22;
  --header-border: #30363d;

  /* Overlay */
  --overlay: rgba(0,0,0,0.7);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
:root {
  --font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   16px;
  --text-lg:   18px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  36px;

  --fw-normal:   400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  --lh-tight:  1.25;
  --lh-normal: 1.5;
  --lh-loose:  1.75;
}

/* ============================================================
   SPACING
   ============================================================ */
:root {
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
:root {
  --sidebar-width:    220px;
  --header-height:    56px;
  --mobile-nav-height: 60px;
  --border-radius:    0px; /* Sharp corners throughout */
  --transition:       0.15s ease;
}
