:root {
  --green: #39ff14;
  --green-soft: rgba(57, 255, 20, .1);
  --green-line: rgba(57, 255, 20, .24);
  --green-line-strong: rgba(57, 255, 20, .48);
  --bg: #080d0a;
  --bg2: #0d1510;
  --panel: #111a13;
  --panel2: #152019;
  --text: #eef8ec;
  --soft: #b7cdb1;
  --muted: #78916f;
  --dim: #45613e;
  --white: #fff;
  --warn: #ff9f2e;
  --danger: #ff4d4d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(57, 255, 20, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 20, .026) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}
body, input, textarea, select, button { font-family: Inter, system-ui, sans-serif; }

* {
  scrollbar-width: thin;
  scrollbar-color: var(--green-line-strong) transparent;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: var(--green-line-strong);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green);
}

.menu-toggle { display: none; }
.sidebar, .sidebar-overlay { display: none; }

.main {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--green); }
.breadcrumb .sep::before { content: ">"; color: var(--dim); }
.breadcrumb .current { color: var(--soft); }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--green-line);
}
.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.page-header h1 {
  color: var(--white);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 900;
}
.page-header h1 span { color: var(--green); }
.page-header p {
  max-width: 720px;
  margin-top: 10px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.55;
}
.page-header-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn,
.mini-btn,
.preview-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.btn {
  min-height: 40px;
  padding: 10px 16px;
  font-size: 12px;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--green);
  color: #071108;
}
.btn-primary:hover { background: var(--white); transform: translateY(-1px); }
.btn-ghost {
  border: 1px solid var(--green-line);
  background: rgba(13, 21, 16, .76);
  color: var(--soft);
}
.btn-ghost:hover {
  border-color: var(--green-line-strong);
  color: var(--green);
  transform: translateY(-1px);
}

.progress-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.progress-bar {
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: rgba(57, 255, 20, .055);
}
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #b8ff9d);
  transition: width .2s ease;
}
.progress-label {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.upload-zone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 26px 24px;
  overflow: hidden;
  border: 2px dashed var(--green-line);
  border-radius: 8px;
  background: rgba(13, 21, 16, .78);
  text-align: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--green-line-strong);
  background: rgba(57, 255, 20, .09);
}
.upload-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--green);
}
.upload-icon svg { width: 34px; height: 34px; }
.upload-title {
  color: var(--white);
  font-size: 15px;
  font-weight: 900;
}
.upload-sub {
  max-width: 850px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.upload-sub span { color: var(--green); }
.upload-file-name {
  display: none;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.autofill-warning {
  display: none;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 159, 46, .58);
  border-radius: 8px;
  background: rgba(255, 159, 46, .12);
  color: #ffd19a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.autofill-warning.show { display: block; }

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 16px;
  align-items: start;
}
.fields-column,
.preview-column {
  min-width: 0;
}
.preview-column {
  position: sticky;
  top: 84px;
}

.form-section,
.preview-card {
  margin-bottom: 16px;
  border: 1px solid var(--green-line);
  border-radius: 8px;
  background: rgba(17, 26, 19, .94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .22);
}
.form-section { padding: 20px; }
.form-section-title,
.preview-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--green-line);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.form-section-title svg { width: 15px; height: 15px; }
.section-between {
  justify-content: space-between;
}
.section-between span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.mini-btn,
.preview-refresh {
  min-height: 32px;
  padding: 8px 10px;
  border: 1px solid var(--green-line);
  background: rgba(57, 255, 20, .08);
  color: var(--green);
  font-size: 11px;
}
.mini-btn:hover,
.preview-refresh:hover {
  border-color: var(--green-line-strong);
  background: rgba(57, 255, 20, .14);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  align-items: start;
}
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}
.form-group.span-2 { grid-column: span 2; }
.form-group.span-3 { grid-column: span 3; }
label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--green-line);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--white);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--green-line-strong);
  box-shadow: 0 0 0 3px rgba(57, 255, 20, .08);
}
input::placeholder,
textarea::placeholder { color: var(--dim); }
textarea { min-height: 72px; resize: vertical; }

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}
.activity-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
.activity-table th {
  padding: 10px;
  background: rgba(57, 255, 20, .06);
  color: var(--green);
  font-size: 10px;
  text-align: left;
  text-transform: uppercase;
}
.activity-table td {
  padding: 8px;
  border-top: 1px solid rgba(57, 255, 20, .09);
  vertical-align: top;
}
.activity-table td:nth-child(1) { width: 52%; }
.activity-table td:nth-child(2) { width: 18%; }
.activity-table td:nth-child(3) { width: 22%; }
.activity-table input,
.activity-table textarea {
  min-height: 38px;
  padding: 8px 9px;
  font-size: 12px;
}
.activity-table textarea {
  min-height: 44px;
  resize: vertical;
}
.activity-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

/* Preview com aparencia de documento/contrato */
.preview-card {
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(57,255,20,.04), transparent 38%),
    rgba(12, 20, 14, .96);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}

.preview-header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.preview-header span {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.preview-header strong {
  color: var(--white);
  font-size: 16px;
  letter-spacing: 0;
}

.doc-preview-frame {
  display: block;
  width: 100%;
  height: min(74vh, 820px);
  border: 0;
  border-radius: 18px;
  background: #f1f4ee;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 14px 34px rgba(0,0,0,.34);
}

/* Select customizado em JS */
.custom-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--green-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(57,255,20,.045), rgba(57,255,20,0)),
    rgba(6, 17, 10, .96);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(57,255,20,.04);
}

.custom-select-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--green);
  transition: transform .16s ease;
}

.custom-select-button:hover,
.custom-select.is-open .custom-select-button {
  border-color: var(--green-line-strong);
  box-shadow: 0 0 0 3px rgba(57,255,20,.12), inset 0 0 0 1px rgba(57,255,20,.08);
}

.custom-select.is-open .custom-select-button svg {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  z-index: 2100;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  display: none;
  padding: 5px;
  border: 1px solid rgba(57,255,20,.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(57,255,20,.07), transparent 42%),
    rgba(3, 13, 7, .99);
  box-shadow: 0 20px 44px rgba(0,0,0,.44), inset 0 0 0 1px rgba(255,255,255,.035);
}

.custom-select.is-open .custom-select-menu {
  display: grid;
  gap: 3px;
}

.custom-select-option {
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.custom-select-option:hover {
  border-color: rgba(57,255,20,.3);
  background: rgba(57,255,20,.11);
}

.custom-select-option.is-selected {
  border-color: var(--green);
  background: var(--green);
  color: #061209;
}

/* Card customizado de data e hora */
input[data-date],
input[data-time],
.activity-table input[data-date] {
  cursor: pointer;
  caret-color: transparent;
}

.date-time-picker {
  position: fixed;
  z-index: 2000;
  width: min(336px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid rgba(57,255,20,.34);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(57,255,20,.08), rgba(57,255,20,.025) 42%, transparent),
    rgba(8, 18, 11, .98);
  box-shadow: 0 24px 60px rgba(0,0,0,.46), inset 0 0 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(14px);
}

.date-time-picker[hidden] {
  display: none !important;
}

.picker-head,
.picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.picker-title {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.picker-nav,
.picker-close,
.picker-action,
.picker-day,
.picker-time-chip {
  border: 1px solid rgba(57,255,20,.2);
  background: rgba(57,255,20,.07);
  color: var(--white);
}

.picker-nav,
.picker-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
}

.picker-nav:hover,
.picker-close:hover,
.picker-action:hover,
.picker-day:hover,
.picker-time-chip:hover {
  border-color: rgba(57,255,20,.55);
  background: rgba(57,255,20,.16);
}

.picker-selects {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 8px;
  margin: 12px 0 10px;
}

.picker-selects select {
  min-height: 36px;
  border: 1px solid rgba(57,255,20,.26);
  border-radius: 8px;
  background: rgba(4, 14, 8, .98);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.picker-weekdays,
.picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.picker-weekdays {
  margin-bottom: 6px;
}

.picker-weekdays span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.picker-day {
  aspect-ratio: 1;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.picker-day.is-muted {
  opacity: .25;
  pointer-events: none;
}

.picker-day.is-today {
  border-color: rgba(57,255,20,.62);
}

.picker-day.is-selected,
.picker-time-chip.is-selected {
  border-color: var(--green);
  background: var(--green);
  color: #061209;
  box-shadow: 0 0 0 3px rgba(57,255,20,.14);
}

.picker-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.picker-time-column {
  display: grid;
  gap: 6px;
}

.picker-time-column label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.picker-time-list {
  display: grid;
  gap: 4px;
  max-height: 186px;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(57,255,20,.28);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(57,255,20,.055), transparent 34%),
    rgba(2, 13, 7, .98);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
  scrollbar-width: thin;
  scrollbar-color: var(--green) rgba(57,255,20,.08);
}

.picker-time-list::-webkit-scrollbar {
  width: 5px;
}

.picker-time-list::-webkit-scrollbar-track {
  background: rgba(57,255,20,.08);
  border-radius: 99px;
}

.picker-time-list::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: var(--green);
}

.picker-time-option {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
}

.picker-time-option:hover {
  border-color: rgba(57,255,20,.34);
  background: rgba(57,255,20,.12);
}

.picker-time-option.is-selected {
  border-color: var(--green);
  background: var(--green);
  color: #061209;
  box-shadow: 0 0 0 3px rgba(57,255,20,.13);
}

.picker-time-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 10px 0 12px;
}

.picker-time-chip {
  min-height: 32px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.picker-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(57,255,20,.14);
}

.picker-action {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.row-remove {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 77, 77, .35);
  border-radius: 8px;
  background: rgba(255, 77, 77, .08);
  color: var(--danger);
  cursor: pointer;
}
.row-remove::before {
  content: "×";
  font-size: 20px;
  line-height: 1;
}

.preview-card {
  padding: 14px;
}
.preview-header {
  justify-content: space-between;
  margin-bottom: 12px;
}
.preview-header div {
  display: grid;
  gap: 3px;
}
.preview-header span {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}
.preview-header strong {
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.doc-preview-frame {
  width: 100%;
  height: min(76vh, 880px);
  border: 1px solid var(--green-line);
  border-radius: 8px;
  background: #fff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .72);
}
.modal-overlay.show { display: flex; }
.modal-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--green-line-strong);
  border-radius: 8px;
  background: var(--panel);
}
.modal-title {
  color: var(--warn);
  font-size: 16px;
  font-weight: 900;
}
.modal-card p {
  margin: 14px 0 18px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}
.modal-card .btn { width: 100%; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  padding: 13px 15px;
  border: 1px solid var(--green-line);
  border-radius: 8px;
  background: rgba(17, 26, 19, .97);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
}

@media (max-width: 1180px) {
  .builder-layout { grid-template-columns: 1fr; }
  .preview-column { position: static; }
  .doc-preview-frame { height: 720px; }
}

@media (max-width: 820px) {
  .main { width: min(100% - 20px, 760px); padding-top: 20px; }
  .page-header { align-items: flex-start; }
  .page-header-right { width: 100%; justify-content: flex-start; }
  .progress-wrap { grid-template-columns: 1fr; }
  .form-grid,
  .form-grid.cols-3,
  .form-grid.cols-4 { grid-template-columns: 1fr; }
  .form-group.span-2,
  .form-group.span-3 { grid-column: auto; }
  .form-section { padding: 16px; }
  .doc-preview-frame { height: 620px; }
}

/* Compact mode for dense project operation screens */
.main {
  width: min(1400px, calc(100vw - 28px));
  padding: 18px 0 28px;
}

.breadcrumb {
  margin-bottom: 10px;
  font-size: 11px;
}

.page-header {
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.eyebrow {
  margin-bottom: 5px;
  font-size: 10px;
}

.page-header h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.02;
}

.page-header p {
  max-width: 640px;
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.4;
}

.btn {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 11.5px;
}

.btn svg {
  width: 13px;
  height: 13px;
}

.progress-wrap {
  gap: 9px;
  margin-bottom: 12px;
}

.progress-bar {
  height: 6px;
}

.progress-label {
  font-size: 11px;
}

.upload-zone {
  grid-template-columns: 34px minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
  padding: 14px 16px;
  text-align: left;
}

.upload-icon {
  grid-row: span 3;
  width: 34px;
  height: 34px;
}

.upload-icon svg {
  width: 28px;
  height: 28px;
}

.upload-title {
  font-size: 13px;
}

.upload-sub {
  max-width: none;
  font-size: 11px;
  line-height: 1.35;
}

.upload-file-name {
  font-size: 11px;
}

.autofill-warning {
  margin-bottom: 10px;
  padding: 10px 12px;
  font-size: 11px;
}

.builder-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  gap: 12px;
}

.preview-column {
  top: 72px;
}

.form-section,
.preview-card {
  margin-bottom: 10px;
  border-radius: 7px;
}

.form-section {
  padding: 14px;
}

.form-section-title,
.preview-header {
  margin-bottom: 10px;
  padding-bottom: 8px;
  font-size: 10px;
  gap: 7px;
}

.form-section-title svg {
  width: 13px;
  height: 13px;
}

.mini-btn,
.preview-refresh {
  min-height: 28px;
  padding: 6px 9px;
  font-size: 10.5px;
}

.form-grid {
  gap: 9px;
}

.form-group {
  gap: 4px;
}

label {
  font-size: 10px;
}

input,
textarea,
select {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.35;
}

textarea {
  min-height: 52px;
}

#creativeHooks,
#trafficPlan,
#teamRoles {
  min-height: 126px;
}

#invoiceData,
#teamData,
#tools,
#giveaways {
  min-height: 68px;
}

.activity-table {
  min-width: 660px;
}

.activity-table th {
  padding: 7px 8px;
  font-size: 9px;
}

.activity-table td {
  padding: 5px 6px;
}

.activity-table input,
.activity-table textarea {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 11.5px;
}

.row-remove {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.preview-card {
  padding: 10px;
}

.preview-header strong {
  font-size: 12px;
}

.doc-preview-frame {
  height: min(68vh, 720px);
}

@media (max-width: 1180px) {
  .builder-layout { grid-template-columns: 1fr; }
  .preview-column { position: static; }
  .doc-preview-frame { height: 560px; }
}

@media (max-width: 820px) {
  .main {
    width: min(100% - 16px, 760px);
    padding-top: 14px;
  }

  .page-header {
    align-items: flex-start;
    gap: 14px;
  }

  .upload-zone {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 14px 12px;
  }

  .upload-icon {
    grid-row: auto;
  }

  .form-section {
    padding: 12px;
  }

  .doc-preview-frame {
    height: 500px;
  }
}

/* LiveShop page alignment: keep this screen consistent with the other document tools */
:root {
  --green: #39FF14;
  --green-dim: #28c40d;
  --green-glow: rgba(57,255,20,.25);
  --green-glow-soft: rgba(57,255,20,.07);
  --bg: #090d0a;
  --bg2: #0e1510;
  --bg3: #131a14;
  --card: #111811;
  --card2: #162018;
  --border: rgba(57,255,20,.15);
  --border-bright: rgba(57,255,20,.4);
  --text: #e8f5e2;
  --text-dim: #7a9c72;
  --text-muted: #3d5c38;
  --white: #ffffff;
  --warn: #ff8c00;
  --danger: #ff4040;
}

body {
  background: var(--bg);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(57,255,20,.1) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 100%, rgba(57,255,20,.06) 0%, transparent 60%);
  pointer-events: none;
}

body,
input,
select,
textarea,
button,
label,
p,
span,
div,
th,
td,
a,
h1,
h2,
h3 {
  font-family: "Inter", sans-serif;
}

.main {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 30px 36px;
  min-height: 100vh;
}

.breadcrumb {
  gap: 6px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb .current {
  color: var(--text-dim);
}

.page-header {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 0;
  border-bottom: 0;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.page-header h1 {
  color: var(--white);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.page-header h1 span {
  color: var(--green);
}

.page-header p {
  max-width: 720px;
  margin-top: 5px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.6;
}

.page-header-right {
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  min-height: auto;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn-primary {
  background: var(--green);
  color: #000;
}

.btn-primary:hover {
  background: #fff;
  transform: none;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
}

.btn-ghost:hover {
  border-color: var(--border-bright);
  color: var(--green);
  transform: none;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  border: 0;
  border-radius: 2px;
  background: rgba(255,255,255,.06);
}

.progress-fill {
  border-radius: 2px;
  background: linear-gradient(90deg, var(--green), var(--green-dim));
}

.progress-label {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 500;
}

.upload-zone {
  display: block;
  margin-bottom: 22px;
  padding: 24px 26px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  background: var(--green-glow-soft);
  text-align: center;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--border-bright);
  background: rgba(57,255,20,.1);
}

.upload-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  color: var(--green);
}

.upload-icon svg {
  width: 34px;
  height: 34px;
}

.upload-title {
  margin-bottom: 4px;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.upload-sub {
  max-width: none;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.upload-sub span {
  color: var(--green);
}

.upload-file-name {
  margin-top: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.autofill-warning {
  margin: -2px 0 20px;
  padding: 14px 16px;
  border: 1px solid rgba(255,140,0,.55);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,140,0,.18), rgba(20,28,22,.96));
  color: #ffd19a;
  font-size: 12px;
  font-weight: 900;
}

.builder-layout {
  grid-template-columns: minmax(0, 1fr) minmax(390px, .88fr);
  gap: 18px;
}

.preview-column {
  top: 94px;
}

.form-section,
.preview-card {
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: none;
}

.form-section {
  padding: 22px 24px;
}

.form-section-title,
.preview-header {
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
}

.form-section-title svg {
  width: 13px;
  height: 13px;
}

.mini-btn,
.preview-refresh {
  min-height: auto;
  padding: 7px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.mini-btn:hover,
.preview-refresh:hover {
  border-color: var(--border-bright);
  background: var(--green-glow-soft);
}

.form-grid {
  gap: 12px;
}

.form-grid.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-grid.cols-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.form-group {
  gap: 4px;
}

label {
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
}

input,
select,
textarea {
  min-height: auto;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--white);
  font-size: 13px;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-bright);
  box-shadow: 0 0 0 3px rgba(57,255,20,.08);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  min-height: 60px;
  resize: vertical;
}

#creativeHooks,
#trafficPlan,
#teamRoles {
  min-height: 118px;
}

#invoiceData,
#teamData,
#tools,
#giveaways {
  min-height: 70px;
}

.table-wrapper {
  margin-top: 10px;
}

.activity-table {
  min-width: 680px;
  font-size: 12.5px;
}

.activity-table th {
  padding: 10px 12px;
  background: var(--bg2);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
}

.activity-table td {
  padding: 8px 10px;
  border-top: 0;
  border-bottom: 1px solid rgba(57,255,20,.05);
  text-align: center;
}

.activity-table input,
.activity-table textarea {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12.5px;
}

.row-remove {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.preview-card {
  padding: 14px;
}

.preview-header strong {
  color: var(--white);
  font-size: 12px;
}

.doc-preview-frame {
  height: min(72vh, 760px);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.toast {
  border-color: var(--border-bright);
  border-radius: 12px;
  background: rgba(15,24,16,.97);
}

@media (max-width: 1180px) {
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .preview-column {
    position: static;
  }

  .doc-preview-frame {
    height: 620px;
  }
}

@media (max-width: 820px) {
  .main {
    width: auto;
    padding: 22px 16px 28px;
  }

  .page-header {
    align-items: flex-start;
  }

  .page-header-right {
    width: 100%;
    justify-content: flex-start;
  }

  .progress-wrap {
    display: grid;
    grid-template-columns: 1fr;
  }

  .upload-zone {
    padding: 18px 14px;
  }

  .form-grid,
  .form-grid.cols-3,
  .form-grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .form-group.span-2,
  .form-group.span-3 {
    grid-column: auto;
  }

  .form-section {
    padding: 16px;
  }

  .doc-preview-frame {
    height: 560px;
  }
}

/* Activity table correction */
.table-wrapper {
  overflow-x: hidden;
  margin-top: 10px;
}

.activity-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.activity-table th,
.activity-table td {
  box-sizing: border-box;
}

.activity-table th {
  padding: 8px 9px;
  text-align: left;
}

.activity-table td {
  padding: 7px 8px;
  vertical-align: middle;
  text-align: left;
}

.activity-table th:nth-child(1),
.activity-table td:nth-child(1) {
  width: 56%;
}

.activity-table th:nth-child(2),
.activity-table td:nth-child(2) {
  width: 17%;
}

.activity-table th:nth-child(3),
.activity-table td:nth-child(3) {
  width: 21%;
}

.activity-table th:nth-child(4),
.activity-table td:nth-child(4) {
  width: 44px;
  padding-right: 0;
  text-align: center;
}

.activity-table input,
.activity-table textarea {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 8px 9px;
  border-radius: 8px;
  font-size: 12px;
}

.activity-table textarea {
  height: 50px;
  min-height: 50px;
  max-height: 88px;
  resize: vertical;
  overflow-y: auto;
}

.activity-table input::placeholder,
.activity-table textarea::placeholder {
  color: rgba(122, 156, 114, .72);
}

.row-remove {
  width: 30px;
  height: 30px;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .table-wrapper {
    overflow-x: auto;
  }

  .activity-table {
    min-width: 620px;
  }
}

/* Modelo DOCIE */
label[for="teamRoles"],
#teamRoles,
label[for="giveaways"],
#giveaways {
  display: none !important;
}

.model-role-grid {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(0, 1.1fr);
  gap: 8px 10px;
  align-items: center;
}

.model-role-grid label {
  margin: 0;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.25;
}

.model-role-grid input {
  min-height: 34px;
}

.conditional-field {
  display: grid;
  gap: 5px;
}

.conditional-field[hidden] {
  display: none !important;
}

#giveawayStrategy,
#buyerRaffleText,
#generalNotes,
#importantObservation {
  min-height: 54px;
}

@media (max-width: 680px) {
  .model-role-grid {
    grid-template-columns: 1fr;
  }
}

/* Campos autoexpansiveis: mostra todo o texto digitado sem scroll interno */
textarea[data-field],
.activity-table textarea {
  height: auto;
  overflow: hidden;
  resize: none;
}

#creativeHooks,
#trafficPlan {
  min-height: 154px;
}

#tools {
  min-height: 96px;
}

#otherInvestments,
#giveawayStrategy,
#buyerRaffleText,
#generalNotes,
#importantObservation {
  min-height: 62px;
}

.activity-table textarea {
  max-height: none;
  min-height: 46px;
}

/* Preview final no estilo de contrato */
.preview-card {
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(57,255,20,.04), transparent 38%),
    rgba(12, 20, 14, .96);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}

.preview-header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.preview-header span {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.preview-header strong {
  color: var(--white);
  font-size: 16px;
  letter-spacing: 0;
}

.doc-preview-frame {
  display: block;
  width: 100%;
  height: min(74vh, 820px);
  border: 0;
  border-radius: 18px;
  background: #f1f4ee;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 14px 34px rgba(0,0,0,.34);
}
