/* ============================================================
   BASE.CSS — CSS Variables, Reset, Typography
   Think LAB — Laboratório Dinâmico de Empresas
   ============================================================ */

:root {
  /* Brand */
  --primary: #1a237e;
  --primary-light: #3949ab;
  --primary-dark: #0d1652;
  --accent: #f57c00;
  --accent-light: #ffb74d;
  --accent-dark: #e65100;

  /* Semantic */
  --success: #2e7d32;
  --success-light: #e8f5e9;
  --danger: #c62828;
  --danger-light: #ffebee;
  --warning: #f57c00;
  --warning-light: #fff3e0;
  --info: #0277bd;
  --info-light: #e1f5fe;

  /* Surfaces */
  --bg: #f0f2f8;
  --bg-alt: #e8eaf2;
  --card: #ffffff;
  --card-hover: #f9faff;
  --overlay: rgba(0, 0, 0, 0.45);

  /* Text */
  --text: #1c1c2e;
  --text-secondary: #374151;
  --muted: #6b7280;
  --muted-light: #9ca3af;

  /* Borders */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: var(--primary-light);

  /* Decorative */
  --gold: #c9a227;
  --gold-light: #e6c84a;
  --silver: #9e9e9e;

  /* Layout */
  --sidebar-width: 240px;
  --topbar-height: 60px;
  --footer-height: 38px;
  --content-max: 1400px;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px rgba(0,0,0,0.1), 0 8px 10px rgba(0,0,0,0.06);

  /* Radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  /* Z-index layers */
  --z-sidebar: 100;
  --z-footer: 150;
  --z-topbar: 200;
  --z-modal: 1000;
  --z-toast: 2000;

  /* Font */
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent); }

img, svg { display: block; max-width: 100%; }

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

/* ── TYPOGRAPHY SCALE ── */
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 1.875rem; }

.font-normal  { font-weight: 400; }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 900; }

.text-muted   { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-gold    { color: var(--gold); }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.uppercase   { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider{ letter-spacing: 0.1em; }

/* ── SPACING UTILITIES ── */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.p-4  { padding: 1rem; }
.p-6  { padding: 1.5rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ── FLEX UTILITIES ── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }
.shrink-0     { flex-shrink: 0; }

/* ── GRID UTILITIES ── */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── DISPLAY UTILS ── */
.hidden  { display: none !important; }
.visible { display: block !important; }
.w-full  { width: 100%; }

/* ── SCROLLBAR STYLING ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-light); }

/* ── SELECTION ── */
::selection { background: rgba(57, 73, 171, 0.2); color: var(--text); }
