/* =============================================================================
   Kiti — style.css
   -----------------------------------------------------------------------------
   ÍNDICE
     1. Tokens de design (variáveis CSS) + tema escuro
     2. Reset e base
     3. Barra superior
     4. Hero
     5. Abas
     6. Cartões e campos de formulário
     7. Dropzone (arrastar e soltar)
     8. Lista de arquivos
     9. Botões
    10. Barra de progresso
    11. Prévia antes/depois (xadrez de transparência)
    12. Toasts
    13. Rodapé
    14. Responsividade
    15. Acessibilidade / preferências de movimento
   ============================================================================= */

/* ------------------------------ 1. TOKENS --------------------------------- */
:root {
  color-scheme: light;

  --bg: #f6f6f4;
  --bg-soft: #ededeb;
  --surface: #ffffff;
  --surface-2: #fbfbfa;

  --text: #16171b;
  --text-soft: #43444e;
  --muted: #767783;

  --border: rgba(20, 21, 26, 0.09);
  --border-strong: rgba(20, 21, 26, 0.16);

  --accent: #4f46e5;
  --accent-2: #8b7bf7;
  --accent-soft: rgba(79, 70, 229, 0.09);
  --accent-contrast: #ffffff;

  --ok: #0f9d6e;
  --warn: #b8770f;
  --err: #d0453f;

  --toast-bg: #1a1b21;
  --toast-text: #f5f5f7;

  --checker-a: #e4e6ee;
  --checker-b: #f6f7fa;

  --shadow-sm: 0 1px 2px rgba(17, 18, 24, 0.05);
  --shadow-md:
    0 10px 28px -16px rgba(17, 18, 24, 0.28), 0 2px 6px rgba(17, 18, 24, 0.04);
  --shadow-lg: 0 26px 50px -24px rgba(17, 18, 24, 0.38);

  --radius: 22px;
  --radius-sm: 14px;
  --radius-xs: 10px;

  --ring: 0 0 0 4px var(--accent-soft);

  --font:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --page: 1120px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d0e12;
  --bg-soft: #171922;
  --surface: #14161c;
  --surface-2: #191b23;

  --text: #f1f2f6;
  --text-soft: #c2c4cf;
  --muted: #8e91a0;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);

  --accent: #8b7bf7;
  --accent-2: #b6a9ff;
  --accent-soft: rgba(139, 123, 247, 0.14);
  --accent-contrast: #14121f;

  --checker-a: #2a2d38;
  --checker-b: #343846;

  --toast-bg: #f5f5f7;
  --toast-text: #16171b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md:
    0 12px 30px -18px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 26px 50px -22px rgba(0, 0, 0, 0.85);
}

/* ------------------------------- 2. RESET -------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(60% 45% at 12% -5%, var(--accent-soft), transparent 70%),
    radial-gradient(
      55% 40% at 92% 0%,
      rgba(139, 123, 247, 0.08),
      transparent 65%
    );
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

[hidden] {
  display: none !important;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

svg {
  width: 100%;
  height: 100%;
}

kbd {
  font-family: var(--mono);
  font-size: 0.78em;
  padding: 0.12em 0.38em;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border-strong);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus-visible {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------------------------- 3. TOPBAR --------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.85rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-xs);
}

.brand__mark {
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 18px -10px var(--accent);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.brand__text em {
  font-style: normal;
  font-weight: 450;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.pill svg {
  width: 14px;
  height: 14px;
  color: var(--ok);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}

.icon-btn:hover {
  color: var(--accent);
  transform: translateY(-1px);
}
.icon-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Alterna os ícones conforme o tema */
.icon-moon {
  display: none;
}
[data-theme="dark"] .icon-sun {
  display: none;
}
[data-theme="dark"] .icon-moon {
  display: block;
}

/* ------------------------------ 4. HERO --------------------------------- */
.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) 4rem;
}

.hero {
  text-align: center;
  margin-bottom: clamp(1.6rem, 4vw, 2.6rem);
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(
    100deg,
    var(--accent),
    var(--accent-2) 60%,
    #38bdf8
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0.9rem auto 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  text-wrap: balance;
}

/* ------------------------------ 5. ABAS --------------------------------- */
.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.5rem;
  margin-bottom: 1.4rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.tab {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon label"
    "icon hint";
  align-items: center;
  gap: 0 0.6rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.tab:hover {
  background: var(--surface-2);
  color: var(--text);
}
.tab:active {
  transform: scale(0.995);
}

.tab__icon {
  grid-area: icon;
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 10px;
  color: var(--muted);
  background: var(--bg-soft);
  transition: inherit;
}

.tab__label {
  grid-area: label;
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab__hint {
  grid-area: hint;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab.is-active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
}

.tab.is-active .tab__icon {
  color: var(--accent-contrast);
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
}

.tab.is-active .tab__hint {
  color: color-mix(in srgb, var(--accent) 70%, var(--muted));
}

/* --------------------- 6. CARTÕES E CAMPOS ----------------------------- */
.panel.is-in {
  animation: panel-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.card__head h2 {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.card__head p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 0.2rem;
  border-top: 1px solid var(--border);
  padding-block-start: 0.9rem;
}

.input-suffix {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.35rem 0.15rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.input-suffix:focus-within {
  border-color: var(--accent);
  box-shadow: var(--ring);
  background: var(--surface);
}

.input-suffix input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0;
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
}

.input-suffix input:focus {
  outline: none;
}

.input-suffix > span {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  padding-right: 0.35rem;
}

.input-suffix--action > span {
  padding-right: 0.5rem;
}

/* Controle segmentado (radio estilizado) */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.seg {
  position: relative;
  display: block;
  cursor: pointer;
}

.seg input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.seg span {
  display: block;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 550;
  color: var(--text-soft);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.seg:hover span {
  color: var(--text);
}

.seg input:checked + span {
  background: var(--surface);
  color: var(--text);
  box-shadow:
    var(--shadow-sm),
    inset 0 0 0 1px var(--border);
}

.seg input:focus-visible + span {
  box-shadow: var(--ring);
}

/* ---------------------------- 7. DROPZONE ------------------------------ */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: clamp(1.6rem, 4.5vw, 2.8rem) 1.2rem;
  text-align: center;
  cursor: pointer;
  border: 1.6px dashed var(--border-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(130% 110% at 50% -20%, var(--accent-soft), transparent 62%),
    var(--surface-2);
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.dropzone:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border-strong));
  transform: translateY(-1px);
}

.dropzone.is-drag {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
  box-shadow: var(--ring);
  transform: scale(1.006);
}

.dropzone--compact {
  padding-block: 1.4rem;
}

.dropzone__icon {
  width: 46px;
  height: 46px;
  padding: 11px;
  margin-bottom: 0.35rem;
  border-radius: 14px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.dropzone:hover .dropzone__icon {
  transform: translateY(-2px) scale(1.04);
}
.dropzone.is-drag .dropzone__icon {
  transform: translateY(-4px) scale(1.08);
}

.dropzone__title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.dropzone__sub {
  font-size: 0.84rem;
  color: var(--muted);
}

.dropzone__tag {
  margin-top: 0.55rem;
  padding: 0.22rem 0.6rem;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* -------------------------- 8. LISTA DE ARQUIVOS ----------------------- */
.list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 0.2rem;
}

.list-header__title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.list-summary {
  font-size: 0.8rem;
  color: var(--muted);
}

.file-list {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
  list-style: none;
  max-height: 20rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.55rem 0.5rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  animation: row-in 0.25s ease both;
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.file-row__thumb {
  width: 42px;
  height: 42px;
  flex: none;
  object-fit: cover;
  border-radius: 9px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.file-row__thumb--generic {
  display: grid;
  place-items: center;
  padding: 10px;
  color: var(--muted);
  background: var(--bg-soft);
}

.file-row__info {
  min-width: 0;
  flex: 1;
  display: grid;
}

.file-row__name {
  font-size: 0.88rem;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-row__meta {
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.file-row__remove {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.file-row__remove:hover {
  color: var(--err);
  background: color-mix(in srgb, var(--err) 10%, transparent);
  border-color: color-mix(in srgb, var(--err) 22%, transparent);
}

/* ------------------------------ 9. BOTÕES ------------------------------ */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease,
    color 0.2s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active {
  transform: translateY(0) scale(0.985);
}

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

.btn--primary {
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: var(--accent-contrast);
  box-shadow: 0 10px 22px -14px var(--accent);
}

.btn--primary:hover {
  box-shadow: 0 14px 26px -14px var(--accent);
}

.btn--accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 26%, transparent);
}

.btn--ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border);
}
.btn--ghost:hover {
  color: var(--text);
  background: var(--surface-2);
}
.btn--quiet {
  margin-left: auto;
}

.btn--mini {
  padding: 0.3rem 0.6rem;
  font-size: 0.76rem;
  border-radius: 8px;
  background: var(--surface);
}

.btn.is-busy {
  pointer-events: none;
  opacity: 0.75;
}

/* --------------------------- 10. PROGRESSO ----------------------------- */
.progress {
  display: grid;
  gap: 0.45rem;
  padding: 0.15rem 0;
}

.progress__track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: var(--bg-soft);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #38bdf8);
  background-size: 200% 100%;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  animation: sheen 2.4s linear infinite;
}

@keyframes sheen {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* Modo indeterminado: a barra "pulsa" quando não há total confiável */
.progress.is-indeterminate .progress__fill {
  width: 45% !important;
  animation: indeterminate 1.15s ease-in-out infinite;
}

@keyframes indeterminate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(230%);
  }
}

.progress__label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.progress__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------- 11. PRÉVIA ANTES / DEPOIS ------------------------ */
.previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.preview {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  min-width: 0;
}

.preview__cap {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.preview__frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
}

/* Xadrez de transparência */
.checker {
  background-color: var(--checker-b);
  background-image:
    linear-gradient(
      45deg,
      var(--checker-a) 25%,
      transparent 25%,
      transparent 75%,
      var(--checker-a) 75%
    ),
    linear-gradient(
      45deg,
      var(--checker-a) 25%,
      transparent 25%,
      transparent 75%,
      var(--checker-a) 75%
    );
  background-size: 18px 18px;
  background-position:
    0 0,
    9px 9px;
}

.preview__frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  animation: pop 0.28s ease both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.preview__empty {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  padding: 0 0.5rem;
}

/* ----------------------------- 12. TOASTS ----------------------------- */
.toasts {
  position: fixed;
  inset-inline: 0;
  bottom: 1.1rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding-inline: 1rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: min(92vw, 460px);
  padding: 0.7rem 1rem;
  border-radius: 13px;
  background: var(--toast-bg);
  color: var(--toast-text);
  font-size: 0.86rem;
  line-height: 1.35;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.toast.is-out {
  animation: toast-out 0.26s ease forwards;
}

.toast__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #9aa0b4;
}

.toast--ok .toast__dot {
  background: #34d399;
}
.toast--warn .toast__dot {
  background: #fbbf24;
}
.toast--error .toast__dot {
  background: #f87171;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* ----------------------------- 13. FOOTER ----------------------------- */
.footer {
  padding: 1.6rem 1rem 2.4rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer strong {
  color: var(--text-soft);
  font-weight: 600;
}

/* -------------------------- 14. RESPONSIVO ---------------------------- */
@media (max-width: 760px) {
  .tabs {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .tab {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "icon label hint";
    padding: 0.65rem 0.75rem;
  }

  .tab__hint {
    justify-self: end;
  }

  .previews {
    grid-template-columns: 1fr;
  }
  .previews .preview__frame {
    aspect-ratio: 16 / 10;
  }

  .pill--privacy {
    display: none;
  }
  .btn {
    flex: 1 1 auto;
  }
  .btn--quiet {
    margin-left: 0;
    flex: 1 1 100%;
  }
  .actions {
    gap: 0.45rem;
  }
  .file-list {
    max-height: 15rem;
  }
}

@media (max-width: 420px) {
  .brand__text em {
    display: none;
  }
  .segmented {
    grid-template-columns: 1fr;
  }
}

/* --------------------- 15. ACESSIBILIDADE / MOTION -------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Google AdSense: espaço discreto reservado para o código futuro. */
.ad-slot {
  min-height: 34px;
  margin: 0 auto 1.1rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.68rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xs);
  opacity: 0.7;
}
.page {
  padding-bottom: 4rem;
}
/* Rodapé refinado: hierarquia simples, alinhamento central e acento do tema. */
.footer {
  min-height: 0;
  padding: 0.55rem 1rem;
  background: color-mix(in srgb, var(--accent-2) 15%, var(--surface));
  color: var(--text-soft);
  border-top: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  box-shadow: 0 -2px 10px rgba(24, 20, 55, 0.06);
  font-size: 0.75rem;
}
.footer__inner {
  width: min(100%, var(--page));
  min-height: 54px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer__meta {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}
.footer__credit {
  color: var(--muted);
}
.footer__credit strong {
  color: var(--accent);
  font-weight: 650;
}
.footer__email {
  color: var(--text-soft);
  text-decoration: none;
}
.footer__email:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__email span {
  color: var(--accent);
}
.footer__support {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 390px;
}
.footer__support-copy {
  display: grid;
  gap: 0.12rem;
  line-height: 1.3;
}
.footer__support-copy strong {
  color: var(--text);
  font-size: 0.8rem;
}
.footer__support-copy span {
  color: var(--text-soft);
}
.footer__support > a {
  width: 48px;
  height: 48px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.footer__support > a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.footer__support img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
}

/* Aviso de favoritos com o mesmo acabamento dos cartões do site. */
.bookmark-prompt {
  top: 5.25rem;
  right: 1.25rem;
  width: min(360px, calc(100vw - 2rem));
  padding: 1.15rem 2.7rem 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow:
    var(--shadow-lg),
    0 0 0 5px var(--accent-soft);
  animation: bookmark-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.bookmark-prompt strong {
  display: block;
  color: var(--text);
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}
.bookmark-prompt p {
  margin: 0.35rem 0 0.8rem;
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.45;
}
.bookmark-prompt__close {
  top: 0.5rem;
  right: 0.6rem;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 1.25rem;
}
.bookmark-prompt__close:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.bookmark-prompt__dismiss {
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: var(--accent-soft);
  font-weight: 600;
}
.bookmark-prompt__dismiss:hover {
  color: var(--accent);
}
@keyframes bookmark-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 900px) {
  .page {
    padding-bottom: 4rem;
  }
  .footer {
    padding: 0.45rem 0.65rem max(0.45rem, env(safe-area-inset-bottom));
  }
  .footer__inner {
    min-height: 52px;
    gap: 0.5rem;
  }
  .footer__meta {
    max-width: 100%;
    font-size: 0.68rem;
  }
  .footer__email {
    overflow-wrap: anywhere;
  }
  .bookmark-prompt {
    top: 4.8rem;
    right: 0.75rem;
  }
}
@media (max-width: 420px) {
  .footer__inner {
    min-height: 56px;
  }
  .bookmark-prompt {
    top: 4.5rem;
    right: 0.6rem;
    width: calc(100vw - 1.2rem);
  }
}
/* Rodapé convencional no fluxo da página. */
.footer {
  position: static;
  z-index: auto;
  inset: auto;
}
.bookmark-prompt {
  position: fixed;
  z-index: 40;
}

/* Cartão do aviso: ícone, hierarquia e botões alinhados ao visual Kiti. */
.bookmark-prompt {
  width: min(370px, calc(100vw - 2rem));
  padding: 1.05rem 1.1rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--border));
  border-radius: 18px;
  background: var(--surface);
  box-shadow:
    0 18px 48px rgba(24, 20, 55, 0.17),
    0 0 0 4px var(--accent-soft);
}
.bookmark-prompt__heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  column-gap: 0.75rem;
}
.bookmark-prompt__icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 5px 12px var(--accent-soft);
}
.bookmark-prompt__icon svg {
  width: 22px;
  height: 22px;
}
.bookmark-prompt__eyebrow {
  align-self: end;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.09em;
}
.bookmark-prompt__heading strong {
  align-self: start;
  font-size: 0.98rem;
  line-height: 1.3;
}
.bookmark-prompt p {
  margin: 0.8rem 0 0.9rem;
  padding-left: calc(44px + 0.75rem);
  font-size: 0.82rem;
  line-height: 1.5;
}
.bookmark-prompt__close {
  top: 0.55rem;
  right: 0.55rem;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 1.15rem;
}
.bookmark-prompt__dismiss {
  margin-left: calc(44px + 0.75rem);
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 600;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}
.bookmark-prompt__dismiss:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}
@media (max-width: 420px) {
  .bookmark-prompt {
    padding: 0.9rem;
  }
  .bookmark-prompt p {
    padding-left: 0;
  }
  .bookmark-prompt__dismiss {
    margin-left: 0;
  }
}
.bookmark-prompt__close {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}
.bookmark-prompt__close svg {
  display: block;
  width: 15px;
  height: 15px;
}
.bookmark-prompt__close:hover {
  color: var(--accent);
  background: var(--accent-soft);
  transform: rotate(4deg);
}
.bookmark-prompt__close:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}

/* Rodapé compacto, centralizado e dentro do fluxo do documento. */
.footer__inner {
  min-height: 54px;
  justify-content: center;
  text-align: center;
}
.footer__meta {
  max-width: 100%;
  align-items: center;
}
.footer__support-trigger {
  justify-self: center;
  padding: 0.15rem 0.35rem;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.footer__support-trigger:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-modal[hidden] {
  display: none;
}
.support-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(9, 10, 16, 0.68);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: support-modal-fade 0.18s ease-out both;
}
.support-modal__dialog {
  position: relative;
  width: min(100%, 430px);
  padding: clamp(1.5rem, 5vw, 2.2rem);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  border-radius: 26px;
  background: var(--surface);
  box-shadow:
    var(--shadow-lg),
    0 0 0 6px var(--accent-soft);
  color: var(--text);
  text-align: center;
  animation: support-modal-pop 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.support-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}
.support-modal__close:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.support-modal__eyebrow {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}
.support-modal__dialog h2 {
  margin-top: 0.45rem;
  font-size: clamp(1.55rem, 5vw, 2rem);
  letter-spacing: -0.04em;
}
.support-modal__dialog > p {
  color: var(--text-soft);
}
.support-modal__qr-frame {
  display: grid;
  place-items: center;
  width: min(100%, 250px);
  aspect-ratio: 1;
  margin: 1.2rem auto 0.9rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.support-modal__qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.support-modal__dialog .support-modal__hint {
  max-width: 290px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
}
@keyframes support-modal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes support-modal-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .support-modal,
  .support-modal__dialog {
    animation: none;
  }
}
.about-link {
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 550;
  text-decoration: none;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-xs);
}
.about-link:hover,
.footer__about:hover {
  color: var(--accent);
}
.about-link:focus-visible,
.footer__about:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.footer__about {
  display: inline-block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
}
@media (max-width: 420px) {
  .about-link {
    font-size: 0.8rem;
    padding-inline: 0.25rem;
  }
}

/* ===== Estilos da ferramenta de rescisão ===== */
.severance-card {
  padding: clamp(1rem, 3vw, 2rem);
}
.severance-privacy {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0 1.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--ok) 28%, var(--border));
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  background: color-mix(in srgb, var(--ok) 7%, var(--surface));
  font-size: 0.88rem;
}
.severance-privacy > span:first-child {
  font-size: 1.05rem;
}
.severance-fieldset {
  min-width: 0;
  margin: 1.2rem 0 0;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.severance-fieldset legend {
  padding: 0 0.55rem;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.severance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.severance-field--wide {
  grid-column: 1 / -1;
}
.severance-grid > .field > input,
.severance-grid > .field > select {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
}
.severance-grid input:focus,
.severance-grid select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: var(--ring);
  background: var(--surface);
}
.severance-grid .input-suffix {
  min-height: 44px;
}
.severance-grid .input-suffix input {
  min-height: 40px;
}
.severance-actions {
  margin-top: 1.2rem;
}
.severance-results {
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 6rem;
}
.severance-result-hero {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 1.7rem 1rem;
  border-radius: var(--radius);
  color: var(--accent-contrast);
  background: linear-gradient(125deg, var(--accent), var(--accent-2));
  text-align: center;
}
.severance-result-hero span {
  font-size: 0.9rem;
  opacity: 0.88;
}
.severance-result-hero strong {
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.severance-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.severance-totals article {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.severance-totals article span {
  color: var(--muted);
  font-size: 0.78rem;
}
.severance-totals article strong {
  color: var(--text);
  font-size: clamp(1rem, 2.7vw, 1.35rem);
  overflow-wrap: anywhere;
}
.severance-totals .severance-fgts-total {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  background: var(--accent-soft);
}
.severance-rights {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.severance-rights p {
  color: var(--text-soft);
  font-size: 0.85rem;
}
.severance-rights p::before {
  content: "•";
  margin-right: 0.5rem;
  color: var(--accent);
  font-weight: 800;
}
.severance-details {
  margin-top: 1.4rem;
}
.severance-details h3 {
  margin-bottom: 0.65rem;
  font-size: 1rem;
}
.severance-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.severance-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.severance-table-wrap th,
.severance-table-wrap td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.severance-table-wrap th {
  color: var(--muted);
  background: var(--surface-2);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.severance-table-wrap tr:last-child td {
  border-bottom: 0;
}
.severance-table-wrap td:last-child,
.severance-table-wrap th:last-child {
  text-align: right;
  white-space: nowrap;
}
.severance-negative {
  color: var(--err);
}
.severance-disclaimer {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--warn);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--warn) 7%, var(--surface));
  font-size: 0.82rem;
}
.severance-source {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.74rem;
}
.severance-source a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 600px) {
  .severance-grid {
    grid-template-columns: 1fr;
  }
  .severance-field--wide {
    grid-column: auto;
  }
  .severance-fieldset {
    padding: 0.9rem;
  }
  .severance-totals {
    grid-template-columns: 1fr;
  }
  .severance-table-wrap table {
    min-width: 530px;
  }
}

/* ===== Estilos da página Sobre ===== */
.about-page {
  padding-top: clamp(2.5rem, 7vw, 5.5rem);
  padding-bottom: 4rem;
}
.about-hero {
  max-width: 790px;
  margin: 0 auto clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
}
.about-kicker {
  display: inline-block;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}
.about-hero h1 {
  margin-top: 0.8rem;
  font-size: clamp(2.2rem, 5.3vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}
.about-hero p {
  max-width: 650px;
  margin: 1.15rem auto 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.12rem);
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.about-card {
  padding: clamp(1.2rem, 3vw, 1.7rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.about-number {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.76rem;
  font-weight: 700;
}
.about-card h2 {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}
.about-card p,
.about-copy p {
  margin-top: 0.65rem;
  color: var(--text-soft);
  font-size: 0.94rem;
}
.about-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  margin-top: clamp(2.5rem, 7vw, 5rem);
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.about-section__heading h2 {
  margin-top: 0.55rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}
.about-contact {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.about-contact:hover {
  text-decoration: underline;
}
.about-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(125deg, #4f46e5, #7667ec 58%, #8b7bf7);
  box-shadow: var(--shadow-md);
}
.about-next .about-kicker {
  color: rgba(255, 255, 255, 0.78);
}
.about-next h2 {
  margin-top: 0.4rem;
  font-size: clamp(1.5rem, 3.3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}
.about-next p {
  max-width: 560px;
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.86);
}
.about-next .btn {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--accent);
  background: #fff;
}
@media (max-width: 760px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .about-next {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  .about-page * {
    scroll-behavior: auto;
  }
}
.about-footer .footer__inner {
  justify-content: center;
  text-align: center;
}
.about-footer .footer__meta {
  align-items: center;
}
.about-footer .footer__email span {
  display: inline;
}
