/* ═══════════════════════════════════════════════════════════════
   1000 CONTAS - ORGANIZAÇÃO CONTÁBIL
   Design System & Estilos Globais
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────── 
   RESET & BASE
   ─────────────────────────────────────────────────────────────── */

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

:root {
  /* Paleta de Cores Exclusiva */
  --primary-900: #1e3a5f;
  --primary-700: #2c5aa0;
  --primary-500: #3d7cc9;
  --primary-300: #6ba3e8;
  --primary-100: #e1eaf4;
  
  --neutral-900: #1a2332;
  --neutral-700: #3d4b5f;
  --neutral-500: #5a7a9a;
  --neutral-300: #a8b8cc;
  --neutral-100: #f0f4f8;
  --neutral-50: #f8fafc;
  
  --success: #2d7a5f;
  --warning: #d97706;
  --error: #b91c1c;
  
  /* Tipografia */
  --font-system: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 
                 Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
  
  /* Espaçamento */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(30, 58, 95, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(30, 58, 95, 0.08), 
               0 2px 4px -1px rgba(30, 58, 95, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(30, 58, 95, 0.1), 
               0 4px 6px -2px rgba(30, 58, 95, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(30, 58, 95, 0.12), 
               0 10px 10px -5px rgba(30, 58, 95, 0.04);
  
  /* Transições */
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-system);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--neutral-700);
  background-color: var(--neutral-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─────────────────────────────────────────────────────────────── 
   TIPOGRAFIA
   ─────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--neutral-900);
  margin-bottom: var(--space-sm);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--primary-700);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--primary-500);
}

strong {
  font-weight: 600;
  color: var(--neutral-900);
}

/* ─────────────────────────────────────────────────────────────── 
   LAYOUT COMPONENTS
   ─────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: 900px;
}

.container-wide {
  max-width: 1400px;
}

.section {
  padding: var(--space-2xl) 0;
}

.section-compact {
  padding: var(--space-xl) 0;
}

/* ─────────────────────────────────────────────────────────────── 
   HEADER & NAVIGATION
   ─────────────────────────────────────────────────────────────── */

.header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--neutral-100);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-md);
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  height: 50px;
  width: auto;
}

.nav {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--neutral-700);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-base);
}

.nav-link:hover {
  color: var(--primary-700);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-700);
  transition: width var(--transition-smooth);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--neutral-700);
  transition: all var(--transition-base);
}

/* ─────────────────────────────────────────────────────────────── 
   HERO / OPENING SECTION
   ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-700) 100%);
  color: white;
  overflow: hidden;
  padding: var(--space-2xl) 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/hero.svg');
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero h1 {
  color: white;
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.25rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--space-lg);
}

.hero-highlight {
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--primary-300);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

/* ─────────────────────────────────────────────────────────────── 
   CARDS & BOXES
   ─────────────────────────────────────────────────────────────── */

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  border: 1px solid var(--neutral-100);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-700);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--neutral-900);
  margin: 0;
}

.card-content p:last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ─────────────────────────────────────────────────────────────── 
   INFO BOXES & ALERTS
   ─────────────────────────────────────────────────────────────── */

.info-box {
  background: var(--primary-100);
  border-left: 4px solid var(--primary-700);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

.info-box-title {
  font-weight: 600;
  color: var(--primary-900);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.warning-box {
  background: #fef3c7;
  border-left: 4px solid var(--warning);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

.success-box {
  background: #d1fae5;
  border-left: 4px solid var(--success);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

/* ─────────────────────────────────────────────────────────────── 
   LISTS
   ─────────────────────────────────────────────────────────────── */

.list-styled {
  list-style: none;
  padding: 0;
}

.list-styled li {
  padding-left: var(--space-lg);
  position: relative;
  margin-bottom: var(--space-sm);
}

.list-styled li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-700);
  font-weight: 700;
}

.list-numbered {
  counter-reset: item;
  list-style: none;
  padding: 0;
}

.list-numbered li {
  counter-increment: item;
  padding-left: var(--space-lg);
  position: relative;
  margin-bottom: var(--space-md);
}

.list-numbered li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--primary-700);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────── 
   TABLES
   ─────────────────────────────────────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

thead {
  background: var(--primary-900);
  color: white;
}

th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 600;
  font-size: 0.9375rem;
}

td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--neutral-100);
}

tbody tr:hover {
  background: var(--neutral-50);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ─────────────────────────────────────────────────────────────── 
   BUTTONS & FORMS
   ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-system);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-700);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-500);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--primary-700);
  border: 2px solid var(--primary-700);
}

.btn-secondary:hover {
  background: var(--primary-700);
  color: white;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  color: var(--neutral-900);
  font-size: 0.9375rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-system);
  transition: all var(--transition-base);
  background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-700);
  box-shadow: 0 0 0 3px rgba(61, 124, 201, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: var(--space-xs);
}

/* ─────────────────────────────────────────────────────────────── 
   FAQ / ACCORDION
   ─────────────────────────────────────────────────────────────── */

.faq-item {
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: var(--space-md);
  background: white;
  border: none;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--neutral-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  transition: background var(--transition-base);
}

.faq-question:hover {
  background: var(--neutral-50);
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--primary-700);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth);
}

.faq-answer-content {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--neutral-700);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 1000px;
}

/* ─────────────────────────────────────────────────────────────── 
   STATISTICS / METRICS
   ─────────────────────────────────────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.stat-box {
  text-align: center;
  padding: var(--space-lg);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-700);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.9375rem;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────── 
   FOOTER
   ─────────────────────────────────────────────────────────────── */

.footer {
  background: var(--primary-900);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--space-md);
  font-size: 1.125rem;
}

.footer-section p,
.footer-section li {
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-bottom: var(--space-sm);
}

.footer-links {
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-base);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.8125rem;
  opacity: 0.5;
  line-height: 1.6;
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────────────────── 
   UTILITY CLASSES
   ─────────────────────────────────────────────────────────────── */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-700); }
.text-muted { color: var(--neutral-500); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.bg-neutral { background: var(--neutral-50); }
.bg-white { background: white; }
.bg-primary-light { background: var(--primary-100); }

/* ─────────────────────────────────────────────────────────────── 
   RESPONSIVE
   ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    gap: var(--space-sm);
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: var(--space-xl) 0;
  }
  
  .hero {
    padding: var(--space-xl) 0;
  }
}

@media print {
  .header,
  .nav,
  .btn,
  .footer {
    display: none;
  }
}
