/* ============================================================
   FICHA DE INSTRUÇÕES FINANCEIRAS E CADASTRAIS - DESIGN SYSTEM
   (harmonizado com landing page e Ficha Cadastral)
   ============================================================ */

:root {
  --bg-primary: #070a13;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);

  --border-color: rgba(255, 255, 255, 0.1);

  --brand-blue: #2563eb;
  --brand-emerald: #059669;
  --brand-gold: #d97706;

  --grad-mercosul: linear-gradient(135deg, #1e3a8a 0%, #0d9488 50%, #059669 100%);
  --grad-accent: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  --grad-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: clip;
}

::selection {
  background: rgba(59, 130, 246, 0.35);
  color: var(--text-main);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.45), rgba(16, 185, 129, 0.45));
  border-radius: 4px;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(7, 10, 19, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  min-width: 0;
}

.nav-logo {
  width: 124px;
  height: 124px;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
  will-change: transform;
}

.nav-logo:hover,
.nav-brand:hover .nav-logo {
  transform: scale(1.12);
  filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.8)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.nav-brand-text strong {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-brand-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-nav-link:hover {
  color: var(--text-main);
  background: var(--bg-card);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-mercosul);
  background-size: 160% 160%;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-cta:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
}

/* ============================================================
   PAGE ACTIONS (imprimir / PDF)
   ============================================================ */

.page-actions {
  padding: 26px 0 0;
}

.page-actions-inner {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-action:hover {
  border-color: var(--text-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-action--primary {
  background: var(--grad-accent);
  background-size: 160% 160%;
  color: #ffffff;
  border: none;
  box-shadow: var(--shadow-glow);
}

.btn-action--primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 0 32px rgba(16, 185, 129, 0.45);
}

/* ============================================================
   DOCUMENTO
   ============================================================ */

.doc-page {
  padding: 36px 0 60px;
}

.doc-card {
  position: relative;
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-lg);
  padding: 44px 52px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.doc-ribbon {
  position: absolute;
  top: 18px;
  right: -52px;
  transform: rotate(45deg);
  background: var(--grad-gold);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 60px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
}

.doc-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 3px solid #1e3a8a;
}

.doc-logo {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  padding: 5px;
  box-shadow: 0 0 0 2px #fbbf24, 0 6px 18px rgba(37, 99, 235, 0.25);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  will-change: transform;
}

.doc-logo:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px #fbbf24, 0 0 26px rgba(251, 191, 36, 0.9), 0 10px 28px rgba(37, 99, 235, 0.35);
}

.doc-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.doc-title {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.doc-title h1 {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.doc-title p {
  font-size: 0.76rem;
  color: #475569;
  margin-top: 6px;
  line-height: 1.5;
}

.doc-stamp {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  padding: 5px;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4), 0 6px 18px rgba(0, 0, 0, 0.12);
  opacity: 0.85;
}

.doc-stamp img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.doc-heading {
  text-align: center;
  margin: 26px 0 30px;
}

.doc-heading h2 {
  display: inline-block;
  background: #1e3a8a;
  color: #ffffff;
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 10px 34px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.doc-meta {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #64748b;
}

.doc-meta strong {
  color: #0f172a;
  font-weight: 700;
}

/* ============================================================
   SEÇÕES DO DOCUMENTO
   ============================================================ */

.doc-section {
  margin-bottom: 26px;
  page-break-inside: avoid;
}

.doc-section h3 {
  background: #f1f5f9;
  border-left: 4px solid #1e3a8a;
  padding: 9px 14px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border-radius: 0 8px 8px 0;
}

.sec-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1e3a8a;
  color: #ffffff;
  font-size: 0.82rem;
  flex-shrink: 0;
}

/* Seção 01 — Operação */
.op-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.op-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  transition: var(--transition);
}

.op-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.op-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #ffffff;
}

.op-card--blue .op-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.op-card--emerald .op-icon { background: linear-gradient(135deg, #10b981, #059669); }
.op-card--gold .op-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }

.op-card h4 {
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  margin-bottom: 6px;
}

.op-card p {
  font-size: 0.83rem;
  color: #475569;
  line-height: 1.6;
}

/* Seção 02 — Dados Bancários */
.bank-table {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.bank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  transition: background 0.2s ease;
}

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

.bank-row:hover {
  background: #f8fafc;
}

.bank-label {
  width: 230px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 9px;
}

.bank-label i {
  color: #1e3a8a;
  width: 18px;
  text-align: center;
}

.bank-value {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

.bank-value.mono {
  font-family: 'Consolas', 'Courier New', monospace;
  letter-spacing: 0.03em;
}

.bank-copy {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bank-copy:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.bank-copy.copied {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.bank-row--pix {
  background: #ecfdf5;
}

.bank-row--pix:hover {
  background: #d1fae5;
}

.bank-row--pix .bank-label i { color: #059669; }

.bank-value--pix {
  color: #047857;
  font-weight: 700;
}

.bank-copy--pix {
  border-color: #059669;
  color: #059669;
}

.bank-note {
  margin-top: 12px;
  font-size: 0.76rem;
  color: #94a3b8;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.bank-note i {
  color: #d97706;
  margin-top: 2px;
}

/* Seção 03 — Declaração */
.declaration {
  position: relative;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #d97706;
  border-radius: 12px;
  padding: 22px 26px 22px 60px;
}

.declaration > i {
  position: absolute;
  left: 20px;
  top: 20px;
  font-size: 1.4rem;
  color: #d97706;
}

.declaration p {
  font-size: 0.93rem;
  color: #0f172a;
  line-height: 1.8;
  font-weight: 500;
}

/* Assinaturas */
.doc-sign {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 40px;
  padding-top: 14px;
  page-break-inside: avoid;
}

.sign-block {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sign-line {
  height: 54px;
  border-bottom: 1.5px solid #0f172a;
  margin-bottom: 8px;
}

.sign-block strong {
  font-size: 0.85rem;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sign-block span {
  font-size: 0.74rem;
  color: #64748b;
}

/* Rodapé do Documento */
.doc-footer {
  margin-top: 34px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.doc-footer p {
  font-size: 0.7rem;
  color: #94a3b8;
}

.doc-footer-cnpjs {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 0.68rem;
  color: #94a3b8;
}

/* ============================================================
   FOOTER DO SITE
   ============================================================ */

.app-footer {
  text-align: center;
  padding: 26px 20px 40px;
  border-top: 1px solid var(--border-color);
}

.app-footer-trust {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding: 0 0 22px;
  margin-bottom: 18px;
}

.app-footer p {
  font-size: 0.76rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.trust-seals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 640px;
}

.trust-seal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 7px 15px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.trust-seal i {
  color: #6ee7b7;
  font-size: 0.92rem;
}

.trust-seal:hover {
  border-color: rgba(110, 231, 183, 0.45);
  color: var(--text-main);
  transform: translateY(-2px);
}

.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.payment-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 34px;
  background: #ffffff;
  border-radius: 8px;
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: default;
}

.payment-method:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: var(--shadow-md);
}

.payment-method--pix { color: #10b981; }
.payment-method--visa { color: #1a1f71; }
.payment-method--mastercard { color: #eb001b; }
.payment-method--amex { color: #2e77bc; }
.payment-method--diners { color: #0079be; }
.payment-method--boleto { color: #d97706; font-size: 1.65rem; }
.payment-method--ted { color: #059669; font-size: 1.35rem; }

/* ============================================================
   TOAST
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 32px);
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid #10b981;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  min-width: 260px;
}

.toast i { color: #10b981; }

@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

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

  .doc-card {
    padding: 34px 28px;
  }

  .bank-label {
    width: 180px;
  }
}

@media (max-width: 640px) {
  .nav-brand-text span { display: none; }
  .btn-nav-link span { display: none; }
  .btn-nav-link { padding: 9px 10px; }

  .doc-page { padding: 24px 0 44px; }

  .doc-card {
    padding: 26px 18px;
    border-radius: var(--radius-md);
  }

  .doc-ribbon { display: none; }

  .doc-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .doc-logo,
  .doc-stamp { width: 106px; height: 106px; }

  .doc-meta {
    flex-direction: column;
    gap: 4px;
  }

  .bank-row {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
  }

  .bank-label {
    width: 100%;
    font-size: 0.74rem;
  }

  .bank-value {
    font-size: 0.9rem;
    word-break: break-all;
  }

  .bank-copy {
    position: absolute;
    right: 10px;
    margin-top: 6px;
  }

  .bank-row {
    position: relative;
    padding-right: 52px;
  }

  .bank-row .bank-copy { margin-top: 0; }

  .doc-sign {
    flex-direction: column;
    gap: 30px;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast { min-width: 0; max-width: 100%; }
}

@media (max-width: 420px) {
  .nav-brand-text { display: none; }
  .nav-logo { width: 112px; height: 112px; }

  .page-actions-inner { flex-direction: column; align-items: stretch; }
  .btn-action { justify-content: center; }
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .navbar,
  .page-actions,
  .app-footer,
  .toast-container {
    display: none !important;
  }

  .doc-page {
    padding: 0 !important;
  }

  .doc-card {
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 20px !important;
    max-width: 100% !important;
  }

  .doc-ribbon {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .doc-heading h2,
  .doc-section h3,
  .sec-num,
  .op-icon,
  .doc-title h1 {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}