/* ====================================================================
   IMEDLOG CONECTA — DESIGN SYSTEM
   Tokens, variáveis, reset, grid e utilitários responsivos
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── COLOR TOKENS ── */
:root {
  /* Brand Colors */
  --brand-navy:        #0A2240;
  --brand-slate:       #14355E;
  --brand-blue:        #1A4A82;
  --brand-blue-mid:    #2563A8;
  --brand-accent:      #F98E2B;
  --brand-accent-dark: #D97318;
  --brand-accent-glow: rgba(249, 142, 43, 0.35);

  /* Semantic Status Colors */
  --status-green:      #22C55E;
  --status-green-dark: #16A34A;
  --status-green-bg:   rgba(34, 197, 94, 0.12);
  --status-yellow:     #F59E0B;
  --status-yellow-bg:  rgba(245, 158, 11, 0.12);
  --status-red:        #EF4444;
  --status-red-dark:   #DC2626;
  --status-red-bg:     rgba(239, 68, 68, 0.12);
  --status-blue:       #3B82F6;
  --status-blue-bg:    rgba(59, 130, 246, 0.12);
  --status-purple:     #8B5CF6;
  --status-purple-bg:  rgba(139, 92, 246, 0.12);
  --status-gray:       #6B7280;
  --status-gray-bg:    rgba(107, 114, 128, 0.12);

  /* Neutral Scale */
  --neutral-50:   #F8FAFC;
  --neutral-100:  #F1F5F9;
  --neutral-200:  #E2E8F0;
  --neutral-300:  #CBD5E1;
  --neutral-400:  #94A3B8;
  --neutral-500:  #64748B;
  --neutral-600:  #475569;
  --neutral-700:  #334155;
  --neutral-800:  #1E293B;
  --neutral-900:  #0F172A;
  --neutral-950:  #080E1A;

  /* Surface Colors */
  --surface-base:   #0D1B2E;
  --surface-raised: #112236;
  --surface-card:   #152944;
  --surface-hover:  #1A3355;
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-divider:rgba(255, 255, 255, 0.05);

  /* Glass Morphism */
  --glass-bg:     rgba(20, 53, 94, 0.45);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover:  rgba(26, 74, 130, 0.55);

  /* Text Colors */
  --text-primary:   #F0F6FF;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;
  --text-accent:    #F98E2B;
  --text-inverse:   #0A2240;

  /* Gradients */
  --gradient-brand:   linear-gradient(135deg, #0A2240 0%, #1A4A82 50%, #14355E 100%);
  --gradient-accent:  linear-gradient(135deg, #F98E2B 0%, #D97318 100%);
  --gradient-hero:    linear-gradient(160deg, #0A2240 0%, #0D2B4D 30%, #1A4A82 70%, #0A2240 100%);
  --gradient-card:    linear-gradient(135deg, rgba(26,74,130,0.3) 0%, rgba(10,34,64,0.6) 100%);
  --gradient-sidebar: linear-gradient(180deg, #0A2240 0%, #112236 100%);
  --gradient-success: linear-gradient(135deg, #22C55E, #16A34A);
  --gradient-warn:    linear-gradient(135deg, #F59E0B, #D97706);
  --gradient-danger:  linear-gradient(135deg, #EF4444, #DC2626);

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.3);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.4);
  --shadow-xl:     0 20px 60px rgba(0,0,0,0.65), 0 8px 24px rgba(0,0,0,0.45);
  --shadow-glow:   0 0 24px rgba(249,142,43,0.3), 0 0 48px rgba(249,142,43,0.15);
  --shadow-blue:   0 0 24px rgba(37,99,168,0.4), 0 0 48px rgba(37,99,168,0.2);
  --shadow-card:   0 4px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);

  /* ── TYPOGRAPHY TOKENS ── */
  --font-primary:  'Inter', -apple-system, sans-serif;
  --font-display:  'Outfit', -apple-system, sans-serif;

  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.5rem;    /* 24px */
  --text-3xl:  1.875rem;  /* 30px */
  --text-4xl:  2.25rem;   /* 36px */
  --text-5xl:  3rem;      /* 48px */
  --text-6xl:  3.75rem;   /* 60px */

  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.5;
  --leading-relaxed:1.625;

  --font-thin:       100;
  --font-light:      300;
  --font-regular:    400;
  --font-medium:     500;
  --font-semibold:   600;
  --font-bold:       700;
  --font-extrabold:  800;
  --font-black:      900;

  /* ── SPACING TOKENS ── */
  --space-1:  0.25rem;  /* 4px */
  --space-2:  0.5rem;   /* 8px */
  --space-3:  0.75rem;  /* 12px */
  --space-4:  1rem;     /* 16px */
  --space-5:  1.25rem;  /* 20px */
  --space-6:  1.5rem;   /* 24px */
  --space-8:  2rem;     /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* ── BORDER & RADIUS ── */
  --radius-sm:   0.375rem;   /* 6px */
  --radius-md:   0.5rem;     /* 8px */
  --radius-lg:   0.75rem;    /* 12px */
  --radius-xl:   1rem;       /* 16px */
  --radius-2xl:  1.5rem;     /* 24px */
  --radius-3xl:  2rem;       /* 32px */
  --radius-full: 9999px;

  /* ── TRANSITIONS ── */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── LAYOUT ── */
  --sidebar-width:     280px;
  --sidebar-collapsed: 72px;
  --header-height:     68px;
  --content-max:       1400px;
  --z-base:     1;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    1000;
  --z-toast:    1100;
  --z-tooltip:  1200;
}

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

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

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-base);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

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

ul, ol {
  list-style: none;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ── SELECTION ── */
::selection {
  background: var(--brand-accent);
  color: var(--text-inverse);
}

/* ── TYPOGRAPHY UTILITIES ── */
.font-display { font-family: var(--font-display); }
.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }
.text-4xl   { font-size: var(--text-4xl); }
.text-5xl   { font-size: var(--text-5xl); }
.font-light    { font-weight: var(--font-light); }
.font-medium   { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold     { font-weight: var(--font-bold); }
.font-extrabold{ font-weight: var(--font-extrabold); }
.font-black    { font-weight: var(--font-black); }
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--text-accent); }
.text-success   { color: var(--status-green); }
.text-warning   { color: var(--status-yellow); }
.text-danger    { color: var(--status-red); }
.text-info      { color: var(--status-blue); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.uppercase    { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }

/* ── LAYOUT GRID ── */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.grid { display: grid; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── SPACING UTILITIES ── */
.p-1  { padding: var(--space-1); }
.p-2  { padding: var(--space-2); }
.p-3  { padding: var(--space-3); }
.p-4  { padding: var(--space-4); }
.p-5  { padding: var(--space-5); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

/* ── SURFACE UTILITIES ── */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.glass:hover {
  background: var(--glass-hover);
  border-color: rgba(255,255,255,0.18);
}

.surface { background: var(--surface-card); }
.surface-raised { background: var(--surface-raised); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded    { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl{ border-radius: var(--radius-2xl); }
.rounded-full{ border-radius: var(--radius-full); }

.shadow     { box-shadow: var(--shadow-md); }
.shadow-lg  { box-shadow: var(--shadow-lg); }
.shadow-xl  { box-shadow: var(--shadow-xl); }
.shadow-card{ box-shadow: var(--shadow-card); }
.shadow-glow{ box-shadow: var(--shadow-glow); }

/* ── VISIBILITY ── */
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top:0; left:0; right:0; bottom:0; }
.z-10  { z-index: 10; }
.z-50  { z-index: 50; }
.z-100 { z-index: 100; }
.z-modal { z-index: var(--z-modal); }
.z-toast { z-index: var(--z-toast); }

/* ── ANIMATIONS (Base) ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(249,142,43,0.3); }
  50%       { box-shadow: 0 0 30px rgba(249,142,43,0.6); }
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}
@keyframes countUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes roadAnim {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 0; }
}
@keyframes trafficBlink {
  0%, 45%, 55%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes progressFill {
  from { width: 0%; }
}
@keyframes borderRotate {
  to { transform: rotate(360deg); }
}
@keyframes backgroundShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-fadeIn    { animation: fadeIn 0.4s ease both; }
.animate-slideUp   { animation: slideUp 0.5s ease both; }
.animate-scaleIn   { animation: scaleIn 0.3s ease both; }
.animate-float     { animation: float 3s ease-in-out infinite; }
.animate-pulse     { animation: pulse 2s ease-in-out infinite; }
.animate-spin      { animation: spin 1s linear infinite; }
.animate-glow      { animation: glow 2s ease-in-out infinite; }

/* ── RESPONSIVE BREAKPOINTS ── */
@media (max-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 var(--space-5); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-4); }
  .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
  :root { --header-height: 60px; }
  .hide-sm { display: none !important; }
}
