:root {
  --bg: hsl(215, 20%, 97%);
  --panel: #ffffff;
  --ink: hsl(215, 35%, 12%);
  --muted: hsl(215, 12%, 46%);
  --line: hsl(215, 15%, 88%);
  --green: hsl(164, 75%, 22%);
  --green-dark: hsl(164, 80%, 14%);
  --yellow: hsl(38, 92%, 50%);
  --blue: hsl(215, 60%, 32%);
  --red: hsl(5, 75%, 52%);
  --shadow: 0 12px 40px rgba(19, 27, 38, 0.05), 0 2px 8px rgba(19, 27, 38, 0.02);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(32, 80, 133, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(15, 98, 68, 0.02) 0px, transparent 50%),
    url("segundo plano.png");
  background-size: 100% 100%, 100% 100%, cover;
  background-attachment: scroll, scroll, fixed;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center;
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-mark, strong {
  font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, sans-serif;
  letter-spacing: -0.02em;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(8, 34, 26, 0.02);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(21, 111, 79, 0.07);
  border: 1px solid rgba(21, 111, 79, 0.12);
  border-radius: 99px;
  padding: 4px 12px 4px 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 99px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 270px;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand:active {
  transform: translateY(1px);
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: 10px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(21, 111, 79, 0.2);
}

.brand-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  transition: all 0.2s ease-in-out;
}

.brand-logo-small {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: all 0.2s ease-in-out;
}

.brand:hover .brand-logo {
  transform: scale(1.05);
}

.footer-brand:hover .brand-logo-small {
  transform: scale(1.05);
  opacity: 1;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
small {
  color: var(--muted);
  font-size: 12px;
}

.profile-tabs,
.steps {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.profile-tab,
.step,
.secondary {
  min-height: 38px;
  white-space: nowrap;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-tab:hover,
.step:hover,
.secondary:hover {
  background: hsl(156, 12%, 98%);
  border-color: hsl(156, 15%, 75%);
  color: var(--ink);
  transform: translateY(-1px);
}

.profile-tab.is-active,
.step.is-active {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
  box-shadow: 0 4px 12px rgba(11, 79, 57, 0.15);
}

.logout-btn {
  border-color: rgba(185, 87, 63, 0.25);
  color: var(--red);
}

.logout-btn:hover {
  background: hsl(5, 70%, 97%);
  border-color: var(--red);
  color: var(--red);
}

.primary {
  min-height: 44px;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(21, 111, 79, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary:hover:not(:disabled) {
  background: var(--green-dark);
  box-shadow: 0 6px 16px rgba(11, 79, 57, 0.25);
  transform: translateY(-1px);
}

.primary:active:not(:disabled) {
  transform: translateY(0);
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  box-shadow: none;
}

main {
  padding: 28px;
}

.view,
.screen {
  display: none;
}

.view.is-visible,
.screen.is-visible {
  display: block;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 48px;
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 580px;
}

.hero-copy h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  margin: 12px 0 18px;
  color: var(--ink);
}

.hero-copy p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.visual-mockup {
  width: 100%;
  max-width: 320px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(8, 34, 26, 0.08);
  overflow: hidden;
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: hsl(156, 12%, 96%);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
}

.mockup-dot.r { background: var(--red); }
.mockup-dot.y { background: var(--yellow); }
.mockup-dot.g { background: var(--green); }

.mockup-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: auto;
  letter-spacing: 0.05em;
}

.mockup-body {
  padding: 24px;
}

.mockup-stat {
  margin-bottom: 20px;
  text-align: center;
}

.mockup-stat small {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.02em;
  font-weight: 700;
}

.mockup-stat strong {
  font-size: 32px;
  color: var(--green-dark);
  font-weight: 850;
  display: block;
  margin-top: 4px;
}

.chart-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 140px;
  padding-top: 10px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 8px;
}

.chart-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
}

.chart-bar {
  width: 36px;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.1);
  transition: all 1s ease-out;
}

.old-bar {
  background: var(--muted);
  height: 110px;
  box-shadow: none;
}

.new-bar {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
  height: 72px;
  box-shadow: 0 4px 12px rgba(21, 111, 79, 0.25);
}

.bar-value {
  margin-top: 4px;
}

.bar-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 8px;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.intro-grid article,
.quote-access,
.login-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-grid article {
  min-height: 270px;
  padding: 24px;
}

.intro-number {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--green-dark);
  background: #e8f4ec;
  border: 1px solid #cde3d4;
  border-radius: 999px;
  padding: 0 12px;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 900;
}

.intro-grid p,
.quote-access p,
.login-info p,
.login-card p {
  color: var(--muted);
  line-height: 1.55;
}

.quote-access {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 26px;
}

.quote-access h2 {
  margin-bottom: 8px;
}

.access-button {
  min-width: 210px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
}

.login-info h1 {
  color: var(--ink);
  font-size: clamp(38px, 6vw, 68px);
}

.login-role-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.role-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: auto;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(8, 34, 26, 0.02);
}

.role-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-icon {
  width: 24px;
  height: 24px;
  color: var(--green);
  transition: all 0.2s ease;
}

.role-icon.icon-lightning {
  color: var(--yellow);
}

.role-icon.icon-admin {
  color: var(--blue);
}

.role-card strong {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 0;
}

.role-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-left: 36px;
}

.role-card:hover {
  transform: translateY(-2px);
  border-color: rgba(21, 111, 79, 0.3);
  box-shadow: 0 8px 20px rgba(8, 34, 26, 0.06);
}

.role-card.is-selected {
  border-color: var(--green);
  background: rgba(21, 111, 79, 0.03);
  box-shadow: 0 8px 24px rgba(21, 111, 79, 0.06), inset 3px 0 0 var(--green);
}

.login-card {
  display: grid;
  gap: 16px;
  align-self: start;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(44px, 8vw, 80px);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  font-size: 30px;
}

h3 {
  margin: 0 0 14px;
  font-size: 19px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.process-band,
.trust-grid,
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.process-band article,
.trust-grid article,
.admin-metrics article,
.summary-panel,
.flow-panel,
.dashboard,
.extraction-card,
.proposal-box,
.competing-bids-box,
.comparison-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.process-band article,
.trust-grid article,
.admin-metrics article {
  min-height: 118px;
  padding: 20px;
}

.process-band strong,
.trust-grid strong,
.admin-metrics strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

.process-band span,
.trust-grid span,
.admin-metrics span {
  color: var(--muted);
  line-height: 1.4;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  max-width: 1420px;
  margin: 0 auto;
}

.summary-panel {
  align-self: start;
  overflow: hidden;
}

.summary-content {
  padding: 24px;
}

.summary-content p {
  color: var(--muted);
  line-height: 1.55;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}

.metric-grid div {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.metric-grid div:last-child {
  border-bottom: 0;
}

.metric-grid span {
  display: block;
  font-size: 20px;
  font-weight: 900;
}

.flow-panel {
  min-height: 720px;
}

.flow-panel > .steps {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.screen,
.dashboard {
  padding: 28px;
}

.screen-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.screen-header.compact {
  align-items: center;
  margin-bottom: 18px;
}

.status-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  color: var(--blue);
  background: #edf5fc;
  border: 1px solid #cdddeb;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.form-grid,
.extracted-form,
.proposal-form,
.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  position: relative;
}
input,
select {
  width: 100%;
  min-height: 46px;
  color: var(--ink);
  background: #fbfcfa;
  border: 1px solid hsl(156, 15%, 80%);
  border-radius: 8px;
  padding: 0 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input:hover,
select:hover {
  border-color: hsl(156, 20%, 65%);
  background: #fff;
}

input:focus,
select:focus {
  background: #fff;
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 4px rgba(21, 111, 79, 0.15);
}
.field-error {
  position: absolute;
  bottom: -18px;
  left: 0;
  color: var(--red);
  font-size: 11px;
}

.form-actions {
  justify-content: flex-end;
  grid-column: 1 / -1;
}

.upload-zone {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 10px;
  margin-bottom: 22px;
  border: 2px dashed #aebcb1;
  border-radius: 8px;
  background: #fbfcfa;
  text-align: center;
}

.upload-zone input {
  display: none;
}

.upload-zone span {
  color: var(--muted);
}

.upload-zone.is-loaded {
  border-color: var(--green);
  background: #f1faf4;
}

.ai-panel,
.financial-panel,
.dashboard-panel {
  margin-bottom: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.ai-grid,
.financial-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.financial-grid,
.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ai-card,
.financial-grid article,
.dashboard-grid article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 12px rgba(8, 34, 26, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-card:hover,
.financial-grid article:hover,
.dashboard-grid article:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(8, 34, 26, 0.05);
  border-color: rgba(21, 111, 79, 0.2);
}

.ai-card strong {
  display: block;
  margin-bottom: 8px;
}

.ai-card p,
.financial-grid small,
.dashboard-grid small {
  color: var(--muted);
}

.financial-grid strong,
.dashboard-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.upload-icon {
  display: grid;
  width: 60px;
  height: 74px;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
}

.extraction-card,
.proposal-box,
.competing-bids-box,
.comparison-panel {
  padding: 20px;
}

.diagnosis-panel,
.comparison-panel {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.viability {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.viability div,
.diagnosis-item,
.opportunity-row,
.seller-list article,
.admin-list article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 12px rgba(8, 34, 26, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.viability div:hover,
.diagnosis-item:hover,
.opportunity-row:hover,
.seller-list article:hover,
.admin-list article:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(8, 34, 26, 0.05);
  border-color: rgba(21, 111, 79, 0.2);
}

.viability strong {
  display: block;
  margin-top: 6px;
  font-size: 23px;
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.diagnosis-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  min-height: 112px;
}

.diagnosis-item strong {
  display: block;
  margin-bottom: 6px;
}

.diagnosis-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.signal {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  background: #a8b3ad;
  border-radius: 999px;
}

.signal.good {
  background: var(--green);
}

.signal.warn {
  background: var(--yellow);
}

.signal.neutral {
  background: #a8b3ad;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 54px 1.3fr repeat(4, minmax(105px, 1fr)) 150px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(8, 34, 26, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ranking-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(8, 34, 26, 0.06);
  border-color: rgba(21, 111, 79, 0.2);
}

/* First place (Gold Highlight) */
.ranking-item:first-child {
  border: 2px solid var(--yellow);
  background: linear-gradient(90deg, hsl(38, 92%, 98%) 0%, #ffffff 100%);
}
.ranking-item:first-child .rank-number {
  background: linear-gradient(135deg, var(--yellow) 0%, hsl(38, 80%, 40%) 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(243, 179, 61, 0.35);
}

/* Second place (Silver Highlight) */
.ranking-item:nth-child(2) {
  border: 1px solid hsl(156, 10%, 70%);
  background: linear-gradient(90deg, hsl(156, 5%, 97%) 0%, #ffffff 100%);
}
.ranking-item:nth-child(2) .rank-number {
  background: linear-gradient(135deg, hsl(156, 10%, 75%) 0%, hsl(156, 10%, 50%) 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(176, 187, 181, 0.35);
}

.rank-number {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ink);
  background: hsl(156, 12%, 92%);
  border-radius: 8px;
  font-weight: 900;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.05);
}

.select-offer {
  min-height: 38px;
  color: var(--green-dark);
  background: rgba(21, 111, 79, 0.08);
  border: 1px solid rgba(21, 111, 79, 0.15);
  border-radius: 8px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.select-offer:hover {
  background: rgba(21, 111, 79, 0.15);
  border-color: var(--green);
  transform: translateY(-1px);
}

.select-offer.is-selected {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
  box-shadow: 0 4px 12px rgba(11, 79, 57, 0.2);
}

.comparison-table {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.dashboard {
  max-width: 1420px;
  margin: 0 auto;
}

.filter-row {
  margin-bottom: 16px;
}

.opportunity-table,
.seller-list,
.admin-list {
  display: grid;
  gap: 10px;
}

.opportunity-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(90px, 1fr)) 120px;
  gap: 12px;
  align-items: center;
}

.opportunity-row.is-selected {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green);
}

.opportunity-row strong,
.opportunity-row small,
.seller-list strong,
.seller-list span,
.admin-list strong,
.admin-list span {
  display: block;
}

.proposal-box {
  margin-top: 22px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 22px;
}

@media (max-width: 1120px) {
  .workspace,
  .login-shell,
  .admin-grid,
  .proposal-grid,
  .hero-split {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .extracted-form,
  .proposal-form,
  .filter-row,
  .ai-grid,
  .financial-grid,
  .dashboard-grid,
  .intro-grid,
  .login-role-grid,
  .process-band,
  .trust-grid,
  .admin-metrics,
  .viability,
  .diagnosis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-item,
  .opportunity-row {
    grid-template-columns: 1fr 1fr;
  }

  .opportunity-table-header {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .topbar,
  .screen-header {
    display: grid;
  }

  .topbar,
  main {
    padding: 14px;
  }

  .brand-logo {
    height: 44px;
  }

  .brand-logo-small {
    height: 36px;
  }

  .hero-split {
    padding: 24px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 24px;
  }

  .screen,
  .dashboard {
    padding: 18px;
  }

  .form-grid,
  .extracted-form,
  .proposal-form,
  .filter-row,
  .ai-grid,
  .financial-grid,
  .dashboard-grid,
  .intro-grid,
  .login-role-grid,
  .process-band,
  .trust-grid,
  .admin-metrics,
  .viability,
  .diagnosis-grid,
  .ranking-item,
  .opportunity-row {
    grid-template-columns: 1fr;
  }

  .quote-access {
    display: grid;
  }

  .access-button {
    width: 100%;
  }
}

.login-toggle-link {
  text-align: center;
  margin-top: 8px;
}

.login-toggle-link a {
  color: var(--green);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.login-toggle-link a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.login-disclaimer {
  font-size: 11px !important;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
}

.login-toggle-link {
  text-align: center;
  margin-top: 8px;
}

.login-toggle-link a {
  color: var(--green);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.login-toggle-link a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.login-disclaimer {
  font-size: 11px !important;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
}

/* --- TRUST & FAQ STYLING --- */

.partners-section {
  margin-top: 10px;
  margin-bottom: 28px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.partners-title {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  margin-top: 0;
}

.partners-logos {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.partner-logo {
  font-size: 15px;
  font-weight: 900;
  color: hsl(215, 10%, 75%);
  letter-spacing: 0.08em;
  opacity: 0.6;
  transition: all 0.22s ease;
  user-select: none;
}

.partner-logo:hover {
  opacity: 0.95;
  color: var(--blue);
  transform: scale(1.04);
}

.faq-section {
  margin-top: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  box-shadow: var(--shadow);
}

.faq-header {
  margin-bottom: 24px;
  text-align: center;
}

.faq-header h2 {
  font-size: 26px;
  color: var(--ink);
  margin-top: 8px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: hsl(215, 20%, 99%);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item[open] {
  background: #ffffff;
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(32, 80, 133, 0.04);
}

.faq-question {
  padding: 16px 20px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.faq-question:hover {
  color: var(--blue);
  background: hsl(215, 20%, 97%);
}

.faq-answer {
  padding: 0 20px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid transparent;
}

.faq-item[open] .faq-answer {
  border-top-color: var(--line);
  padding-top: 14px;
}

.security-guarantee-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(32, 80, 133, 0.04);
  border: 1px solid rgba(32, 80, 133, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 22px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}

.security-icon {
  width: 20px;
  height: 20px;
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 1px;
}

/* --- CORPORATE FOOTER --- */

.footer-corp {
  background: hsl(215, 28%, 14%);
  color: hsl(215, 12%, 78%);
  border-top: 1px solid hsl(215, 15%, 20%);
  padding: 44px 28px 24px;
  margin-top: 48px;
}

.footer-container {
  max-width: 1420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark-small {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 4px 10px rgba(21, 111, 79, 0.25);
}

.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 16px;
}

.footer-brand small {
  color: hsl(215, 10%, 55%);
}

.footer-security {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: hsl(215, 10%, 75%);
}

.badge-icon {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.badge-icon.icon-lgpd {
  color: var(--blue);
}

.badge-icon.icon-ccee {
  color: var(--yellow);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.footer-links a {
  color: hsl(215, 10%, 72%);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-copyright {
  max-width: 1420px;
  margin: 20px auto 0;
  font-size: 11px;
  color: hsl(215, 10%, 55%);
  line-height: 1.5;
}

.footer-copyright p {
  margin: 4px 0 0;
}

@media (max-width: 720px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .footer-links {
    align-items: flex-start;
  }
  
  .partners-logos {
    justify-content: center;
    gap: 14px;
  }
  
  .faq-section {
    padding: 24px 18px;
  }
}

/* --- PROPOSAL GRID & COMPETING BIDS --- */
.proposal-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.terms-grid-container {
  grid-column: 1 / -1;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  overflow-x: auto;
}

.terms-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.terms-table th,
.terms-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.terms-table tr:last-child td {
  border-bottom: none;
}

.terms-table tbody tr {
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.terms-table tbody tr:hover {
  background-color: hsl(215, 20%, 99%);
}

.terms-table tbody tr.row-active {
  background-color: rgba(21, 111, 79, 0.03);
}

.term-toggle {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--green);
}

.term-price-input,
.term-savings-input {
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid hsl(156, 15%, 80%);
  padding: 0 10px;
  width: 100%;
}

.term-price-input:disabled,
.term-savings-input:disabled {
  background-color: #f3f4f6;
  border-color: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
}

.competing-bids-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.empty-bids {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 32px 16px;
  background: hsl(215, 20%, 98%);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.competing-bid-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(8, 34, 26, 0.01);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.competing-bid-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(8, 34, 26, 0.04);
  border-color: rgba(32, 80, 133, 0.2);
}

.bid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.competitor-badge {
  font-size: 11px;
  font-weight: 700;
  background: hsl(215, 20%, 92%);
  color: var(--ink);
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bid-term {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.bid-details {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.bid-price {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--blue);
}

.bid-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.bid-savings {
  font-weight: 700;
  color: var(--green);
}

/* --- AUCTION TIMER BANNER & TOAST NOTIFICATIONS --- */
.auction-timer-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(243, 179, 61, 0.08);
  border: 1px solid rgba(243, 179, 61, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 22px;
  color: var(--ink);
}

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
}

.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.98);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(8, 34, 26, 0.1), 0 1px 3px rgba(8, 34, 26, 0.04);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: slideIn 0.3s ease-out;
}

.toast-success {
  border-left-color: var(--green);
}

.toast-info {
  border-left-color: var(--blue);
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.toast-content strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.toast-content span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.toast-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: var(--ink);
}

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

.login-prompt-banner {
  background: rgba(32, 80, 133, 0.05);
  border: 1px solid rgba(32, 80, 133, 0.12);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--blue);
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-prompt-banner a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  margin-left: 4px;
}

.login-prompt-banner a:hover {
  color: var(--green);
}

/* Modais Premium */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: rgba(8, 34, 26, 0.45);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 520px;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 24px 64px rgba(8, 34, 26, 0.15);
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: 0;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: var(--ink);
}

/* Escâner OCR */
.ocr-scanner-content {
  overflow: hidden;
  background: hsl(215, 25%, 11%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scanner-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(21, 111, 79, 0) 0%, var(--green) 50%, rgba(21, 111, 79, 0) 100%);
  box-shadow: 0 0 12px var(--green);
  z-index: 2;
  animation: laser-sweep 3s infinite linear;
}

.scanner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.scanner-header h2 {
  margin: 0;
  font-size: 20px;
  color: #fff;
}

.pulse-indicator {
  font-size: 11px;
  font-weight: 900;
  color: var(--green);
  letter-spacing: 0.1em;
  animation: pulse-green 1.5s infinite;
}

.scanner-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.file-icon-scan {
  display: grid;
  place-items: center;
  width: 68px;
  height: 84px;
  background: #e8583c;
  color: #fff;
  font-weight: 800;
  border-radius: 6px;
  font-size: 14px;
  position: relative;
  box-shadow: 0 10px 25px rgba(232, 88, 60, 0.3);
}

.scan-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.scan-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  transition: width 0.1s linear;
}

.scanner-console {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 16px;
  font-family: monospace;
  font-size: 12px;
  color: #a5b4fc;
  height: 150px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.console-log {
  margin: 0 0 6px;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* Certificado ESG */
.certificate-content {
  max-width: 680px;
  background: #fbfbfc;
}

.certificate-border {
  border: 4px solid var(--green-dark);
  padding: 6px;
  background: #fff;
  border-radius: 8px;
  box-shadow: inset 0 0 40px rgba(11, 79, 57, 0.03);
}

.certificate-inner {
  border: 1px solid rgba(11, 79, 57, 0.15);
  padding: 40px;
  text-align: center;
  position: relative;
}

.cert-header {
  margin-bottom: 32px;
}

.cert-mark {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(21, 111, 79, 0.2);
}

.cert-header h1 {
  font-size: 24px;
  color: var(--green-dark);
  margin: 0 0 4px;
}

.cert-header h2 {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.cert-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 24px;
}

.cert-subbody {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 40px;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px dashed var(--line);
  padding-top: 24px;
}

.cert-signature-line {
  text-align: left;
}

.cert-signature-line strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.cert-signature-line small {
  font-size: 11px;
  color: var(--muted);
}

.cert-seal {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px dashed var(--green);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  color: var(--green);
  text-transform: uppercase;
  transform: rotate(-15deg);
  background: rgba(21, 111, 79, 0.04);
}

/* DocuSign */
.docusign-content {
  max-width: 580px;
}

.docusign-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.docusign-logo {
  font-size: 22px;
  font-weight: 900;
  color: #1e3a8a;
  letter-spacing: -0.04em;
}

.docusign-terms {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 16px;
  font-size: 12px;
  color: var(--muted);
  max-height: 120px;
  overflow-y: auto;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  line-height: 1.5;
}

.docusign-terms h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink);
}

.signature-canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#signature-canvas {
  border: 2px dashed #9ca3af;
  background: #fafafa;
  border-radius: 8px;
  cursor: crosshair;
}

/* ESG Painel na área da Fatura */
.esg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.esg-card {
  background: #f7faf8;
  border: 1px solid rgba(21, 111, 79, 0.08);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
}

.esg-card strong {
  font-size: 13px;
  color: var(--green-dark);
}

.esg-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.esg-card.cert-card {
  background: rgba(21, 111, 79, 0.03);
  border-color: rgba(21, 111, 79, 0.15);
}

/* Badges de Upload Múltiplo */
.uploaded-file-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(21, 111, 79, 0.07);
  border: 1px solid rgba(21, 111, 79, 0.15);
  color: var(--green-dark);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}

.uploaded-file-badge button {
  background: none;
  border: 0;
  color: var(--red);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes laser-sweep {
  0% { top: 0%; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes pulse-green {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Tour Onboarding Tooltip */
.onboarding-tooltip {
  position: absolute;
  z-index: 1000;
  background: var(--green-dark);
  color: #fff;
  border-radius: 8px;
  padding: 16px;
  width: 250px;
  box-shadow: 0 10px 25px rgba(8, 34, 26, 0.25);
  animation: fadeIn 0.2s ease;
  font-size: 13px;
  line-height: 1.5;
}

.onboarding-tooltip::after {
  content: '';
  position: absolute;
  border: 8px solid transparent;
}

.onboarding-tooltip.tooltip-bottom::after {
  top: -16px;
  left: 20px;
  border-bottom-color: var(--green-dark);
}

.onboarding-tooltip.tooltip-top::after {
  bottom: -16px;
  left: 20px;
  border-top-color: var(--green-dark);
}

.onboarding-tooltip-header {
  font-weight: 800;
  margin-bottom: 6px;
  font-size: 14px;
}

.onboarding-tooltip-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 8px;
}

.onboarding-tooltip-actions button {
  background: none;
  border: 0;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
}

.onboarding-tooltip-actions button.next-tour-btn {
  background: #fff;
  color: var(--green-dark);
  padding: 4px 8px;
  border-radius: 4px;
}
