:root {
  --black: #111111;
  --yellow: #ffc400;
  --yellow-dark: #e4ae00;
  --white: #ffffff;
  --bg: #edf0f2;
  --card: #ffffff;
  --text: #171717;
  --muted: #5e646b;
  --border: #d8dde2;
  --soft: #f5f6f7;
  --danger: #9d1c1c;
  --success: #176b39;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, select { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
.page-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: relative;
  background: linear-gradient(115deg, #101010 0%, #171717 62%, #232323 100%);
  color: var(--white);
  border-bottom: 4px solid var(--yellow);
  overflow: hidden;
}
.topbar::after {
  content: "";
  position: absolute;
  right: -95px;
  top: -130px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255,196,0,.10);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255,196,0,.025), 0 0 0 104px rgba(255,196,0,.02);
  pointer-events: none;
}
.topbar-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 18px 0;
}
.conversion-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 18px;
}
.brand-logo-box {
  flex: 0 0 auto;
  width: 112px;
  height: 62px;
  border-radius: 10px;
  background: #fff;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 7px 20px rgba(0,0,0,.20);
}
.brand-logo { width: 100%; height: 100%; object-fit: contain; }
.header-divider {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.34), transparent);
  flex: 0 0 auto;
}
.conversion-copy { min-width: 0; }
.header-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--yellow);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 1.7px;
}
.topbar h1 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 33px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -.3px;
}
.topbar p {
  margin: 7px 0 0;
  color: #d7d7d7;
  font-size: 14px;
  line-height: 1.35;
}
.conversion-status {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}
.format-flow {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid #505050;
  background: rgba(0,0,0,.26);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.format-flow span {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .4px;
}
.format-flow b { color: #fff; font-size: 16px; font-weight: 500; }
.conversion-status small { color: #a9a9a9; font-size: 11px; white-space: nowrap; }
.main-content { flex: 1; width: 100%; padding: 28px 20px 44px; }
.card { width: min(980px, 100%); margin: 0 auto; background: var(--card); border-radius: 18px; padding: 28px; box-shadow: 0 16px 40px rgba(0,0,0,.08); }
.drop-zone { border: 2px dashed #98a2ad; border-radius: 15px; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 7px; padding: 24px; cursor: pointer; transition: .18s ease; outline: none; background: #fbfbfc; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-dragging { border-color: var(--yellow-dark); background: #fffbed; box-shadow: 0 0 0 4px rgba(255,196,0,.13); }
.upload-icon { color: #6d747c; margin-bottom: 2px; }
.drop-zone strong { font-size: 21px; }
.drop-zone span { color: var(--muted); font-size: 14px; }
.toolbar-row { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-pill { border: 1px solid var(--border); background: var(--soft); border-radius: 999px; padding: 9px 13px; font-size: 13px; white-space: nowrap; }
.stat-pill b { font-size: 14px; }
.privacy-pill { border-color: #d7e5da; background: #f2f8f3; color: #305d3c; }
.btn { border: 0; border-radius: 10px; font-weight: 800; cursor: pointer; transition: .18s ease; min-height: 44px; }
.btn:disabled { cursor: not-allowed; opacity: .48; }
.btn-primary { width: 100%; margin-top: 18px; min-height: 56px; background: var(--yellow); color: var(--black); letter-spacing: .3px; font-size: 17px; }
.btn-primary:not(:disabled):hover { background: #ffd02b; transform: translateY(-1px); }
.btn-ghost { background: #f1f2f3; color: #34383d; padding: 0 15px; border: 1px solid var(--border); }
.btn-ghost:not(:disabled):hover { background: #e8eaec; }
.file-list-wrap { margin-top: 16px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.file-list-head { padding: 12px 14px; background: var(--soft); display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.file-list-head span { color: var(--muted); }
.file-list { margin: 0; padding: 0; list-style: none; max-height: 190px; overflow: auto; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid #eceff1; font-size: 13px; }
.file-meta { min-width: 0; }
.file-name { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { display: block; color: var(--muted); margin-top: 2px; font-size: 12px; }
.remove-file { border: 0; background: transparent; color: #646a70; cursor: pointer; padding: 6px 7px; border-radius: 7px; }
.remove-file:hover { background: #f1f2f3; color: var(--danger); }
.options-grid { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 700; }
.field select { width: 100%; min-height: 44px; border: 1px solid #cdd3d9; border-radius: 9px; padding: 0 12px; background: #fff; color: #111; }
.field select:focus { outline: 3px solid rgba(255,196,0,.22); border-color: var(--yellow-dark); }
.progress-wrap { margin-top: 18px; }
.progress-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #51575e; margin-bottom: 7px; }
.progress-track { height: 9px; background: #e8ebee; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: var(--yellow); transition: width .15s linear; }
.message { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.4; }
.message.success { background: #edf8f0; color: var(--success); border: 1px solid #cfe9d5; }
.message.error { background: #fff0f0; color: var(--danger); border: 1px solid #f0caca; }
.message.info { background: #f3f5f7; color: #3d444b; border: 1px solid #dde1e5; }
.preview-section { margin-top: 22px; border-top: 1px solid #e5e8eb; padding-top: 20px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.preview-head div { display: flex; flex-direction: column; gap: 3px; }
.preview-head span { color: var(--muted); font-size: 12px; }
.preview-stage { background: #e5e8ea; border-radius: 12px; padding: 18px; display: flex; justify-content: center; overflow: auto; }
.preview-stage canvas { width: min(425px, 100%); height: auto; aspect-ratio: 850 / 1200; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.15); image-rendering: auto; }
.site-footer { background: var(--black); color: var(--white); border-top: 4px solid var(--yellow); }
.footer-inner { min-height: 56px; width: min(1180px, calc(100% - 32px)); margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; font-size: 13px; font-weight: 700; }
.footer-inner strong { color: var(--yellow); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .topbar-inner { width: calc(100% - 28px); }
  .brand-logo-box { width: 110px; height: 58px; }
  .topbar h1 { font-size: 22px; }
  .topbar p { font-size: 14px; }
}
@media (max-width: 720px) {
  .topbar-inner { width: calc(100% - 24px); min-height: auto; padding: 14px 0; gap: 14px; align-items: flex-start; flex-direction: column; }
  .brand-wrap { width: 100%; align-items: center; }
  .brand-logo-box { width: 96px; height: 56px; padding: 6px 10px; border-radius: 10px; }
  .brand-copy { flex: 1; }
  .topbar h1 { font-size: 18px; }
  .topbar p { font-size: 12px; margin-top: 5px; }
  .version-badge { align-self: flex-end; font-size: 11px; padding: 8px 12px; }
  .main-content { padding: 20px 12px 26px; }
  .card { border-radius: 14px; padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.07); }
  .drop-zone { min-height: 160px; padding: 20px 14px; }
  .drop-zone strong { font-size: 18px; }
  .drop-zone span { font-size: 12px; max-width: 300px; }
  .toolbar-row { align-items: stretch; flex-direction: column; }
  .stats { display: grid; grid-template-columns: 1fr 1fr; }
  .privacy-pill { grid-column: 1 / -1; text-align: center; }
  .toolbar-row > .btn { width: 100%; }
  .options-grid { grid-template-columns: 1fr; gap: 13px; }
  .btn-primary { min-height: 54px; font-size: 15px; }
  .file-list-head { flex-direction: column; gap: 3px; }
  .preview-head { align-items: flex-end; }
  .preview-stage { padding: 10px; }
  .footer-inner { min-height: 74px; flex-direction: column; gap: 4px; padding: 12px 0; font-size: 12px; }
}
@media (max-width: 390px) {
  .stats { grid-template-columns: 1fr; }
  .privacy-pill { grid-column: auto; }
  .stat-pill { text-align: center; }
  .topbar h1 { font-size: 17px; }
  .topbar p { font-size: 11px; }
  .brand-logo-box { width: 88px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* v4.2 - cabeçalho exclusivo do conversor */
@media (max-width: 900px) {
  .topbar-inner { width: calc(100% - 28px); min-height: 110px; gap: 18px; }
  .brand-logo-box { width: 102px; height: 58px; }
  .conversion-brand { gap: 14px; }
  .topbar h1 { font-size: 23px; }
  .topbar p { max-width: 470px; }
}
@media (max-width: 720px) {
  .topbar-inner {
    width: calc(100% - 24px);
    min-height: auto;
    padding: 14px 0 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .conversion-brand { width: 100%; gap: 11px; align-items: center; }
  .brand-logo-box { width: 86px; height: 52px; padding: 5px 8px; }
  .header-divider { height: 44px; }
  .header-kicker { font-size: 9px; letter-spacing: 1.35px; margin-bottom: 4px; }
  .topbar h1 { font-size: 19px; }
  .topbar p { font-size: 11.5px; margin-top: 4px; }
  .conversion-status {
    align-self: flex-start;
    align-items: flex-start;
    flex-direction: row;
    gap: 9px;
    margin-left: 98px;
  }
  .format-flow { padding: 6px 9px; gap: 7px; border-radius: 8px; }
  .format-flow span { font-size: 11px; }
  .format-flow b { font-size: 13px; }
  .conversion-status small { align-self: center; font-size: 10px; }
}
@media (max-width: 470px) {
  .conversion-status { margin-left: 0; width: 100%; justify-content: space-between; }
  .conversion-status small { white-space: normal; text-align: right; }
  .topbar::after { right: -190px; }
}
@media (max-width: 390px) {
  .brand-logo-box { width: 78px; height: 48px; }
  .conversion-brand { gap: 9px; }
  .header-divider { display: none; }
  .topbar h1 { font-size: 17px; }
  .topbar p { font-size: 10.5px; }
}
