:root {
  --primary-900: #0A1628;
  --primary-800: #0F2240;
  --primary-700: #163361;
  --primary-600: #1E4A8C;
  --primary-500: #2563A9;
  --primary-400: #4A8BC2;
  --primary-300: #7BACCD;
  --primary-200: #A5C8DC;
  --primary-100: #D1E2ED;

  --neutral-900: #111827;
  --neutral-800: #1F2937;
  --neutral-700: #374151;
  --neutral-600: #4B5563;
  --neutral-500: #6B7280;
  --neutral-400: #9CA3AF;
  --neutral-300: #D1D5DB;
  --neutral-200: #E5E7EB;
  --neutral-100: #F3F4F6;
  --neutral-50: #F9FAFB;

  --accent-gold: #D97706;
  --accent-gold-light: #FCD34D;

  --success: #059669;
  --success-light: #D1FAE5;
  --warning: #D97706;
  --warning-bg: #FEF3C7;
  --error: #DC2626;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 100%);
  min-height: 100vh;
  color: var(--neutral-900);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.header {
  background: var(--primary-900);
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.logo-container img {
  height: 48px;
  color: #fff;
  filter: brightness(0) invert(1);
  width: auto;
}

.header-title {
  color: var(--neutral-50);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.main {
  flex: 1;
  padding: 2rem 1rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.calculator-container {
  background: var(--neutral-50);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.alert-banner {
  background: var(--warning-bg);
  border-left: 4px solid var(--warning);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem;
  border-radius: var(--radius-md);
}

.alert-banner h3 {
  color: var(--neutral-800);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-banner p {
  color: var(--neutral-700);
  font-size: 0.875rem;
  line-height: 1.5;
}

.calculator-form {
  padding: 0 1.5rem 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 0.5rem;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background: var(--neutral-50);
  color: var(--neutral-900);
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 169, 0.15);
}

.form-group input:disabled,
.form-group select:disabled {
  background: var(--neutral-200);
  color: var(--neutral-500);
  cursor: not-allowed;
}

.form-group input::placeholder {
  color: var(--neutral-400);
}

.currency-input-wrapper {
  position: relative;
}

.currency-input-wrapper::before {
  content: 'USD';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-500);
  font-weight: 500;
  font-size: 0.9375rem;
}

.currency-input-wrapper input {
  padding-left: 3.5rem;
}

.percentage-input-wrapper {
  position: relative;
}

.percentage-input-wrapper input {
  padding-right: 2.5rem;
}

.percentage-input-wrapper::after {
  content: '%';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-500);
  font-weight: 500;
  font-size: 0.9375rem;
  pointer-events: none;
}

.input-subtext {
  font-size: 0.75rem;
  color: var(--neutral-500);
  margin-top: 0.25rem;
}

.field-dependent {
  display: none;
}

.field-dependent.active {
  display: block;
}

.modalidade-selector {
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.modalidade-selector h2 {
  color: var(--primary-800);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.modalidade-selector select {
  border: 2px solid var(--primary-300);
  background: white;
}

.modalidade-selector select:focus {
  border-color: var(--primary-500);
}

.fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .fields-grid {
    grid-template-columns: 1fr;
  }
}

.result-panel {
  background: var(--primary-900);
  color: var(--neutral-50);
  padding: 2rem 1.5rem;
  margin: 1.5rem;
  border-radius: var(--radius-xl);
}

.result-header {
  text-align: center;
  margin-bottom: 2rem;
}

.result-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-200);
  margin-bottom: 0.5rem;
}

.result-header .subtitle {
  font-size: 0.875rem;
  color: var(--primary-300);
}

.result-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row.highlight {
  background: rgba(255, 255, 255, 0.05);
  margin: 0 -1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border-bottom: none;
}

.result-label {
  font-size: 0.875rem;
  color: var(--primary-200);
}

.result-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--neutral-50);
}

.result-row.highlight .result-value {
  font-size: 1.375rem;
  color: var(--accent-gold-light);
}

.result-total {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%);
  margin: 1.5rem -1rem -1rem;
  padding: 1.5rem;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  text-align: center;
}

.result-total .label {
  font-size: 0.875rem;
  color: var(--primary-200);
  margin-bottom: 0.5rem;
}

.result-total .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--neutral-50);
}

.result-total .taxa-info {
  font-size: 0.75rem;
  color: var(--primary-200);
  margin-top: 0.25rem;
}

.section-divider {
  height: 1px;
  background: var(--neutral-200);
  margin: 1.5rem 0;
}

.form-group.modalidade-active {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-500);
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
}

.info-note svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--primary-600);
}

.info-note p {
  font-size: 0.8125rem;
  color: var(--neutral-600);
  line-height: 1.5;
}

.footer {
  background: var(--primary-900);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 2rem;
  text-align: center;
}

.footer p {
  color: var(--primary-300);
  font-size: 0.8125rem;
}

.footer a {
  color: var(--neutral-50);
  text-decoration: none;
}

@media (max-width: 768px) {
  .header {
    padding: 1rem;
  }

  .header-title {
    font-size: 1.125rem;
  }

  .main {
    padding: 1rem 0.75rem;
  }

  .alert-banner {
    margin: 1rem;
    padding: 1rem;
  }

  .calculator-form {
    padding: 0 1rem 1rem;
  }

  .result-panel {
    margin: 1rem;
    padding: 1.5rem 1rem;
  }
}
