/* =====================================================================
   Tech 42 — Gerador de Contratos | identidade visual institucional
   HTML/CSS/JS puro. Mulish via Google Fonts.
   ===================================================================== */

:root {
  /* Paleta */
  --navy: #1b2344;
  --navy-2: #2a3668;
  --indigo: #31407b;
  --royal: #3f519a;
  --royal-2: #4154a2;
  --lavender: #d3d9f0;
  --lavender-soft: #eef1fa;
  --white: #ffffff;

  /* Texto */
  --ink: #1b2344;
  --ink-2: #43507e;
  --ink-muted: #7d87ac;
  --on-dark: #ffffff;
  --on-dark-muted: #b9c2e4;

  /* Semânticos */
  --danger: #d23b53;
  --danger-soft: #fbe9ec;
  --success: #1f9d6b;
  --success-soft: #e6f6ef;

  /* Superfícies */
  --bg: #f4f6fc;
  --card: #ffffff;
  --border: #e4e8f5;
  --border-strong: #cdd5ef;

  /* Gradientes azuis */
  --grad-hero: linear-gradient(135deg, #1b2344 0%, #2a3668 45%, #3f519a 100%);
  --grad-btn: linear-gradient(135deg, #3f519a 0%, #4154a2 60%, #31407b 100%);
  --grad-btn-hover: linear-gradient(135deg, #4459ad 0%, #4a5fb5 60%, #38478a 100%);

  /* Raios e sombras
     Bordas arredondadas porem mais suaves / mais quadradas (leve curva).
     FONTE UNICA: --raio (cards/botoes/inputs) e --raio-sm (elementos menores).
     Os aliases --r / --r-sm / --r-lg apontam para essas variaveis, de modo que
     100% do portal usa o mesmo raio sem precisar tocar cada border-radius. */
  --raio: 8px;       /* cards, botoes, inputs, tabelas, badges grandes */
  --raio-sm: 6px;    /* chips, icones, badges menores, toasts */
  --r-sm: var(--raio-sm);
  --r: var(--raio);
  --r-lg: var(--raio);
  --r-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(27, 35, 68, 0.06);
  --shadow: 0 12px 30px rgba(27, 35, 68, 0.1);
  --shadow-lg: 0 24px 60px rgba(27, 35, 68, 0.16);
  --ring: 0 0 0 4px rgba(63, 81, 154, 0.16);

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }

a { color: inherit; text-decoration: none; }
code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  background: var(--lavender-soft);
  color: var(--royal);
  padding: 1px 6px;
  border-radius: var(--raio-sm);
  font-size: 0.86em;
}

/* ============ ÍCONES (CSS puro, sem imagem externa) ============ */
.ico {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.16em;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.ico-gear  { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); }
.ico-doc   { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cline x1='10' y1='9' x2='8' y2='9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cline x1='10' y1='9' x2='8' y2='9'/%3E%3C/svg%3E"); }
.ico-pdf   { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cpath d='M8 17h2M8 13h1.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cpath d='M8 17h2M8 13h1.5'/%3E%3C/svg%3E"); }
.ico-stack { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 2 7 12 12 22 7 12 2'/%3E%3Cpolyline points='2 17 12 22 22 17'/%3E%3Cpolyline points='2 12 12 17 22 12'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 2 7 12 12 22 7 12 2'/%3E%3Cpolyline points='2 17 12 22 22 17'/%3E%3Cpolyline points='2 12 12 17 22 12'/%3E%3C/svg%3E"); }
.ico-folder{ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.ico-upload{ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E"); }
.ico-plus  { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E"); }
.ico-trash { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E"); }
.ico-edit  { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4z'/%3E%3C/svg%3E"); }
.ico-check { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }
.ico-bolt  { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E"); }
.ico-arrow-left  { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'/%3E%3Cpolyline points='12 19 5 12 12 5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'/%3E%3Cpolyline points='12 19 5 12 12 5'/%3E%3C/svg%3E"); }
.ico-arrow-right { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E"); }
.ico-users { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.ico-money { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M6 12h.01M18 12h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M6 12h.01M18 12h.01'/%3E%3C/svg%3E"); }
.ico-calendar { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); }
.ico-list { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E"); }
.ico-wallet { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12V7H5a2 2 0 0 1 0-4h14v4'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h16v-5'/%3E%3Cpath d='M18 12a2 2 0 0 0 0 4h4v-4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12V7H5a2 2 0 0 1 0-4h14v4'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h16v-5'/%3E%3Cpath d='M18 12a2 2 0 0 0 0 4h4v-4z'/%3E%3C/svg%3E"); }
.ico-archive { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='5' rx='1'/%3E%3Cpath d='M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8'/%3E%3Cline x1='10' y1='12' x2='14' y2='12'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='5' rx='1'/%3E%3Cpath d='M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8'/%3E%3Cline x1='10' y1='12' x2='14' y2='12'/%3E%3C/svg%3E"); }
.ico-search { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"); }
.ico-refresh { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpolyline points='1 20 1 14 7 14'/%3E%3Cpath d='M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpolyline points='1 20 1 14 7 14'/%3E%3Cpath d='M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15'/%3E%3C/svg%3E"); }
.ico-mail { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 5L2 7'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 5L2 7'/%3E%3C/svg%3E"); }

/* ============ TOPBAR ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--raio-sm);
  background: var(--grad-btn);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.5px;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-weight: 800; font-size: 16px; color: var(--ink); letter-spacing: -0.2px; }
.brand-text em { font-style: normal; font-size: 12px; color: var(--ink-muted); font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; }

/* ============ BOTÕES ============ */
.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--r-pill);
  padding: 11px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-lg { padding: 15px 28px; font-size: 16px; }

.btn-primary { background: var(--grad-btn); color: var(--white); box-shadow: 0 8px 22px rgba(63, 81, 154, 0.32); }
.btn-primary:hover { background: var(--grad-btn-hover); box-shadow: 0 12px 28px rgba(63, 81, 154, 0.4); transform: translateY(-1px); }

.btn-outline { background: var(--white); color: var(--royal); border: 1.5px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--royal); background: var(--lavender-soft); }

.btn-outline-light { background: rgba(255, 255, 255, 0.08); color: var(--white); border: 1.5px solid rgba(255, 255, 255, 0.4); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.7); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--lavender-soft); color: var(--royal); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #bd3147; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ============ APP / SCREENS ============ */
.app { flex: 1; width: 100%; }
.screen { animation: fade 0.32s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 64px;
}
.page-narrow { max-width: 660px; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -0.6px; margin: 6px 0 4px; }
.page-sub { color: var(--ink-muted); font-size: 16px; margin: 0 0 28px; }

.back-link {
  background: none;
  border: none;
  font-family: inherit;
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  margin-bottom: 14px;
}
.back-link:hover { color: var(--royal); }

/* ============ HERO ============ */
.hero {
  position: relative;
  margin: 28px auto;
  max-width: calc(var(--maxw) - 8px);
  background: var(--grad-hero);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-glow {
  position: absolute;
  inset: -40% -10% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(65, 84, 162, 0.55), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-content { position: relative; padding: 76px 56px 64px; max-width: 720px; }
.hero-kicker {
  color: var(--lavender);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.hero-title { color: var(--white); font-size: 50px; line-height: 1.06; font-weight: 800; letter-spacing: -1.4px; margin: 0 0 18px; }
.hero-sub { color: var(--on-dark-muted); font-size: 18px; line-height: 1.6; max-width: 540px; margin: 0 0 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 22px; padding: 0; margin: 0; }
.hero-feats li { color: var(--on-dark-muted); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.hero-feats .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lavender); box-shadow: 0 0 0 4px rgba(211, 217, 240, 0.16); }

/* ============ CARDS DE MODELO ============ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.model-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 24px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.model-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--grad-btn);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.model-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.model-card:hover::before { opacity: 1; }
.model-card:focus-visible { outline: none; box-shadow: var(--ring); }
.model-card-ico {
  width: 48px;
  height: 48px;
  border-radius: var(--raio-sm);
  background: var(--lavender-soft);
  color: var(--royal);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.model-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.model-card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  letter-spacing: 0.2px;
}
.tag-type { background: var(--lavender-soft); color: var(--royal); }
.tag-multi { background: #e9f3ff; color: #1d5fa5; display: inline-flex; align-items: center; gap: 5px; }

.empty-state {
  text-align: center;
  padding: 70px 20px;
  background: var(--card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r);
}
.empty-icon { width: 64px; height: 64px; border-radius: var(--raio); background: var(--lavender-soft); color: var(--royal); display: grid; place-items: center; font-size: 28px; margin: 0 auto 18px; }
.empty-state p { color: var(--ink-muted); font-size: 17px; margin: 0 0 22px; }

/* ============ PREENCHER (campo a campo) ============ */
.fill-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.fill-modelo { font-weight: 800; font-size: 18px; letter-spacing: -0.3px; }
.fill-artista-tag {
  background: var(--lavender-soft);
  color: var(--royal);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 13px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.progress { height: 8px; background: var(--lavender-soft); border-radius: var(--r-pill); overflow: hidden; }
.progress-bar { height: 100%; background: var(--grad-btn); border-radius: var(--r-pill); transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.progress-label { font-size: 13px; color: var(--ink-muted); font-weight: 700; margin: 10px 0 24px; }

.field-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 34px 32px;
  box-shadow: var(--shadow-sm);
}
.field-label { display: block; font-size: 21px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 4px; }
.field-hint { color: var(--ink-muted); font-size: 14px; margin: 0 0 20px; }
.field-input, input[type="text"], input[type="email"], input[type="number"],
input[type="password"], input[type="search"] {
  width: 100%;
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  padding: 16px 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field-input::placeholder, input::placeholder { color: #aab2cf; font-weight: 500; }
.field-input:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus,
input[type="password"]:focus, input[type="search"]:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: var(--ring);
}
.field-input.input-error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(210, 59, 83, 0.14); }
.field-error { color: var(--danger); font-size: 14px; font-weight: 600; margin: 12px 0 0; }

.fill-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }

/* ============ MULTI-ARTISTA ============ */
.artist-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.artist-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.artist-num {
  width: 38px; height: 38px;
  border-radius: var(--raio-sm);
  background: var(--grad-btn);
  color: var(--white);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
  flex-shrink: 0;
}
.artist-info { flex: 1; min-width: 0; }
.artist-info strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist-info span { font-size: 13px; color: var(--ink-muted); }
.artist-acts { display: flex; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--raio-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink-2);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 16px;
  transition: all 0.15s ease;
}
.icon-btn:hover { border-color: var(--royal); color: var(--royal); background: var(--lavender-soft); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.add-artist-btn { width: 100%; margin-bottom: 28px; border-style: dashed; }

/* ============ REVISÃO ============ */
.review-block { display: flex; flex-direction: column; gap: 18px; margin-bottom: 32px; }
.review-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.review-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: var(--lavender-soft);
  border-bottom: 1px solid var(--border);
}
.review-group-head h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--indigo); letter-spacing: 0.2px; }
.review-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 22px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.14s ease;
}
.review-row:last-child { border-bottom: none; }
.review-row:hover { background: #fafbff; }
.review-row .rk { color: var(--ink-muted); font-size: 14px; font-weight: 600; }
.review-row .rv {
  font-weight: 700; font-size: 15px; color: var(--ink);
  text-align: right; word-break: break-word; display: flex; align-items: center; gap: 8px;
}
.review-row .rv .ico-edit { font-size: 13px; color: var(--ink-muted); opacity: 0; transition: opacity 0.14s ease; }
.review-row:hover .rv .ico-edit { opacity: 1; }
.rv-empty { color: #b3bbd6; font-style: italic; font-weight: 500; }

/* Formato */
.format-pick { margin-bottom: 12px; }
.format-title { font-size: 16px; font-weight: 800; margin: 0 0 14px; }
.format-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.format-opt { cursor: pointer; }
.format-opt input { position: absolute; opacity: 0; pointer-events: none; }
.format-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  transition: all 0.16s ease;
}
.format-card-ico {
  width: 40px; height: 40px; border-radius: var(--raio-sm);
  background: var(--lavender-soft); color: var(--royal);
  display: grid; place-items: center; font-size: 19px; margin-bottom: 8px;
}
.format-card strong { font-size: 16px; font-weight: 800; }
.format-card em { font-style: normal; font-size: 13px; color: var(--ink-muted); }
.format-opt input:checked + .format-card {
  border-color: var(--royal);
  background: var(--lavender-soft);
  box-shadow: 0 8px 20px rgba(63, 81, 154, 0.16);
}
.format-opt input:checked + .format-card .format-card-ico { background: var(--grad-btn); color: var(--white); }
.format-opt input:focus-visible + .format-card { box-shadow: var(--ring); }

/* ============ RESULTADO ============ */
.result-head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.result-check {
  width: 60px; height: 60px; border-radius: var(--raio);
  background: var(--success-soft); color: var(--success);
  display: grid; place-items: center; font-size: 28px;
  flex-shrink: 0;
}
.result-files { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.file-chip {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  min-width: 230px;
}
.file-chip-ico { width: 40px; height: 40px; border-radius: var(--raio-sm); display: grid; place-items: center; font-size: 19px; flex-shrink: 0; }
.file-chip-ico.word { background: #e6effb; color: #1d5fa5; }
.file-chip-ico.pdf { background: #fdecec; color: #c8384e; }
.file-chip-info { min-width: 0; }
.file-chip-info strong { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.file-chip-info a { font-size: 13px; color: var(--royal); font-weight: 700; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }

.preview-wrap { margin-top: 8px; }
.preview-title { font-size: 16px; font-weight: 800; margin: 0 0 14px; }
.preview-frame {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  background: #525659;
  box-shadow: var(--shadow);
}
.preview-frame iframe { width: 100%; height: 640px; border: none; display: block; }

/* ============ CONFIG ============ */
.config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 22px; margin-bottom: 22px; }
.config-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 26px;
  box-shadow: var(--shadow-sm);
}
.config-card-full { margin-top: 0; }
.config-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.config-card-title { font-size: 17px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.2px; }
.config-card-sub { color: var(--ink-muted); font-size: 14px; margin: 0 0 18px; }
.count-badge { background: var(--lavender-soft); color: var(--royal); font-weight: 800; font-size: 13px; padding: 5px 13px; border-radius: var(--r-pill); }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }

.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 6px 0 22px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 46px; height: 26px; border-radius: var(--r-pill); background: var(--border-strong); position: relative; transition: background 0.2s ease; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: transform 0.2s ease; }
.switch-row input:checked + .switch { background: var(--royal); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }

/* Upload */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r);
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  color: var(--ink-muted);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--royal); background: var(--lavender-soft); color: var(--royal); }
.upload-zone .ico { font-size: 30px; margin-bottom: 12px; }
.upload-zone p { margin: 0; font-size: 15px; }
.upload-zone strong { color: var(--royal); }
.upload-filename { display: block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--success); }

.detected { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.detected-title { font-size: 13px; font-weight: 800; color: var(--ink-2); margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.4px; }
.detected-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.detected-chip { background: var(--lavender-soft); color: var(--royal); font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: var(--r-pill); }

/* Tabela de modelos */
.model-table { display: flex; flex-direction: column; }
.model-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--border);
}
.model-row:last-child { border-bottom: none; }
.model-row-ico { width: 40px; height: 40px; border-radius: var(--raio-sm); background: var(--lavender-soft); color: var(--royal); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.model-row-info { flex: 1; min-width: 0; }
.model-row-info strong { display: block; font-size: 15px; font-weight: 800; }
.model-row-info span { font-size: 13px; color: var(--ink-muted); }
.model-empty { padding: 30px; text-align: center; color: var(--ink-muted); font-size: 15px; }

/* ============ LOADER ============ */
.loader {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(27, 35, 68, 0.5);
  backdrop-filter: blur(4px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.loader p { color: var(--white); font-weight: 700; font-size: 16px; }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.25); border-top-color: var(--white); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ TOAST ============ */
.toast-wrap { position: fixed; top: 80px; right: 24px; z-index: 70; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.toast {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--royal);
  border-radius: var(--r-sm);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600; color: var(--ink);
  animation: toastIn 0.3s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
.toast strong { display: block; font-weight: 800; margin-bottom: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(27, 35, 68, 0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--white);
  border-radius: var(--r);
  padding: 30px 30px 24px;
  max-width: 420px; width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fade 0.25s ease;
}
.modal-title { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.modal-body { color: var(--ink-2); font-size: 15px; margin: 0 0 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.footer-sep { opacity: 0.5; }

/* =====================================================================
   CONTADOR (stepper) — usado em "Quantos artistas?" e "Qtd. de parcelas"
   ===================================================================== */
.stepper {
  display: flex; align-items: stretch; gap: 0;
  width: 100%; max-width: 240px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--raio);
  overflow: hidden;
  background: var(--white);
}
.stepper button {
  width: 56px; flex-shrink: 0;
  border: none; background: var(--lavender-soft); color: var(--royal);
  font-size: 24px; font-weight: 800; cursor: pointer; line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}
.stepper button:hover { background: var(--grad-btn); color: var(--white); }
.stepper button:disabled { opacity: 0.4; cursor: not-allowed; background: var(--lavender-soft); color: var(--royal); }
.stepper input {
  flex: 1; min-width: 0; text-align: center;
  border: none; border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  font-family: inherit; font-size: 22px; font-weight: 800; color: var(--ink);
  padding: 14px 4px; -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }

/* =====================================================================
   PAGAMENTO — escolhas (A vista / Parcelado · Mensal / Personalizado)
   ===================================================================== */
.pay-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.pay-choice {
  display: flex; align-items: flex-start; gap: 14px;
  text-align: left; cursor: pointer;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--raio);
  padding: 20px 20px;
  font-family: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.14s ease;
}
.pay-choice:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pay-choice:focus-visible { outline: none; box-shadow: var(--ring); }
.pay-choice.selected {
  border-color: var(--royal);
  background: var(--lavender-soft);
  box-shadow: 0 8px 20px rgba(63, 81, 154, 0.16);
}
.pay-choice-ico {
  width: 44px; height: 44px; border-radius: var(--raio-sm);
  background: var(--lavender-soft); color: var(--royal);
  display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
  transition: background 0.16s ease, color 0.16s ease;
}
.pay-choice.selected .pay-choice-ico { background: var(--grad-btn); color: var(--white); }
.pay-choice-txt { min-width: 0; }
.pay-choice-txt strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: -0.2px; margin-bottom: 2px; }
.pay-choice-txt span { font-size: 13px; color: var(--ink-muted); font-weight: 600; line-height: 1.4; }

/* Bloco de formulario do pagamento (campos lado a lado) */
.pay-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--raio);
  padding: 24px 24px 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.pay-field label { display: block; font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 7px; letter-spacing: 0.2px; }
.pay-field input { font-size: 17px; padding: 13px 15px; }
.pay-section-title { font-size: 16px; font-weight: 800; margin: 4px 0 16px; display: flex; align-items: center; gap: 9px; }
.pay-section-title .ico { color: var(--royal); }

/* Parcelas personalizadas (lista editavel) */
.parc-edit-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.parc-edit-row {
  display: grid;
  grid-template-columns: 44px 1fr 1fr 44px;
  align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--raio);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.parc-edit-row .parc-num {
  width: 44px; height: 44px; border-radius: var(--raio-sm);
  background: var(--grad-btn); color: var(--white);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.parc-edit-row input { font-size: 16px; padding: 11px 13px; }
.parc-edit-row .icon-btn { width: 44px; height: 44px; }
.add-parc-btn { width: 100%; border-style: dashed; margin-bottom: 8px; }

/* =====================================================================
   TABELA DE VERIFICACAO — [Parcela | Data | Valor] + TOTAL
   ===================================================================== */
.pay-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--raio);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}
.pay-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pay-table thead th {
  text-align: left;
  background: var(--lavender-soft);
  color: var(--indigo);
  font-weight: 800; font-size: 13px;
  letter-spacing: 0.3px; text-transform: uppercase;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
}
.pay-table thead th.num { width: 90px; }
.pay-table thead th.val, .pay-table tbody td.val, .pay-table tfoot td.val { text-align: right; }
.pay-table tbody td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--ink); font-weight: 600;
}
.pay-table tbody tr:last-child td { border-bottom: none; }
.pay-table tbody td.num { color: var(--ink-muted); font-weight: 800; }
.pay-table tbody td.val { font-weight: 800; }
.pay-table tfoot td {
  padding: 16px 20px;
  background: var(--lavender-soft);
  border-top: 2px solid var(--border-strong);
  font-weight: 800; font-size: 16px; color: var(--navy);
}
.pay-table tfoot td.val { font-size: 18px; color: var(--royal); }
.pay-table-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; color: var(--success);
  background: var(--success-soft);
  padding: 4px 11px; border-radius: var(--r-pill);
  margin-left: 10px; vertical-align: middle;
}

/* Resumo de pagamento na tela de REVISAO (so leitura) */
.review-pay { padding: 6px 22px 14px; }
.review-pay .pay-table-wrap { margin: 8px 0 0; box-shadow: none; }

/* =====================================================================
   CONTRATOS GERADOS — lista, busca, selecao e barra de acao
   ===================================================================== */
.contratos-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.search-box {
  flex: 1; min-width: 220px;
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--raio);
  padding: 0 16px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.search-box:focus-within { border-color: var(--royal); box-shadow: var(--ring); }
.search-box .ico { color: var(--ink-muted); flex-shrink: 0; font-size: 18px; }
.search-box input {
  flex: 1; min-width: 0;
  border: none; background: transparent; padding: 13px 0;
  font-size: 16px; font-weight: 600; color: var(--ink);
}
.search-box input:focus { outline: none; box-shadow: none; }

.contratos-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.contrato-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left; width: 100%;
  font-family: inherit;
  transition: border-color 0.16s ease, box-shadow 0.18s ease, background 0.16s ease;
}
.contrato-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.contrato-item:focus-visible { outline: none; box-shadow: var(--ring); }
.contrato-item.selected { border-color: var(--royal); background: var(--lavender-soft); box-shadow: 0 8px 20px rgba(63, 81, 154, 0.16); }
.contrato-item-ico {
  width: 46px; height: 46px; border-radius: var(--raio-sm);
  background: var(--lavender-soft); color: var(--royal);
  display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
}
.contrato-item.selected .contrato-item-ico { background: var(--grad-btn); color: var(--white); }
.contrato-item-info { flex: 1; min-width: 0; }
.contrato-item-info strong { display: block; font-size: 15px; font-weight: 800; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contrato-item-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 5px; }
.contrato-item-meta .tag { font-size: 11px; padding: 3px 9px; }
.contrato-item-meta .meta-data { font-size: 13px; color: var(--ink-muted); font-weight: 600; }
.contrato-item-check {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: grid; place-items: center; flex-shrink: 0;
  color: var(--white); font-size: 13px;
  transition: all 0.16s ease;
}
.contrato-item.selected .contrato-item-check { background: var(--royal); border-color: var(--royal); }
.contrato-item:not(.selected) .contrato-item-check .ico { opacity: 0; }

/* Barra de acao do contrato selecionado (sticky no rodape) */
.contratos-actionbar {
  position: sticky; bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  margin-top: 8px;
}
.contratos-selinfo { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; color: var(--ink); }
.contratos-selinfo .ico { color: var(--success); flex-shrink: 0; }
.contratos-selinfo span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.contratos-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Status de senha (config e-mail) */
.field-status { display: block; margin-top: 7px; font-size: 13px; font-weight: 700; color: var(--ink-muted); }
.field-status.ok { color: var(--success); }

/* Textarea (modal de e-mail) */
textarea {
  width: 100%; font-family: inherit; font-size: 16px; font-weight: 500;
  padding: 13px 15px; border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm); background: var(--white); color: var(--ink);
  resize: vertical; min-height: 90px; line-height: 1.5;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
textarea:focus { outline: none; border-color: var(--royal); box-shadow: var(--ring); }
textarea::placeholder { color: #aab2cf; font-weight: 500; }

/* Modal de e-mail */
.modal-wide { max-width: 520px; }
.email-doc {
  display: flex; align-items: center; gap: 10px;
  background: var(--lavender-soft); color: var(--royal);
  border-radius: var(--raio-sm); padding: 11px 14px;
  font-weight: 700; font-size: 14px; margin-bottom: 18px;
}
.email-doc .ico { flex-shrink: 0; font-size: 18px; }
.email-doc span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req { color: var(--danger); font-weight: 800; }
.opt { color: var(--ink-muted); font-weight: 600; font-size: 0.9em; }

/* ============ RESPONSIVO ============ */
@media (max-width: 760px) {
  .hero-content { padding: 52px 28px 44px; }
  .hero-title { font-size: 34px; letter-spacing: -0.8px; }
  .hero-sub { font-size: 16px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .page { padding: 28px 18px 52px; }
  .page-title { font-size: 24px; }
  .field-card { padding: 26px 20px; }
  .field-label { font-size: 18px; }
  .topbar-inner { padding: 12px 18px; }
  .brand-text em { display: none; }
  .toast-wrap { right: 12px; left: 12px; max-width: none; }
  .fill-nav { flex-direction: column-reverse; }
  .fill-nav .btn { width: 100%; }
  .result-actions .btn { flex: 1; }
  .preview-frame iframe { height: 460px; }
  .parc-edit-row { grid-template-columns: 38px 1fr 38px; row-gap: 10px; }
  .parc-edit-row .parc-num { width: 38px; height: 38px; }
  .parc-edit-row .parc-data { grid-column: 2 / 3; }
  .parc-edit-row .parc-valor { grid-column: 1 / 3; }
  .parc-edit-row .icon-btn { grid-column: 3 / 4; grid-row: 1 / 2; align-self: start; }
  .pay-table thead th, .pay-table tbody td, .pay-table tfoot td { padding-left: 14px; padding-right: 14px; }
  .contratos-actionbar { flex-direction: column; align-items: stretch; }
  .contratos-actions { width: 100%; }
  .contratos-actions .btn { flex: 1; }
  .contratos-selinfo span:last-child { max-width: none; }
}
@media (max-width: 460px) {
  .nav-config-text { display: none; }
}
