:root {
  --green: #58ff1d;
  --lime: #cbf467;
  --pink: #eb1f74;
  --danger: #d93025;
  --danger-dark: #b3261e;
  --navy: #000729;
  --text: #182032;
  --muted: #667080;
  --line: #e2e8e3;
  --font-heading: "DM Sans", Arial, sans-serif;
  --font-body: "Nunito", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: #f4f7f2;
}

.admin-login-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(88, 255, 29, 0.32), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(235, 31, 116, 0.14), transparent 30%),
    linear-gradient(120deg, rgba(0, 7, 41, 0.88), rgba(0, 7, 41, 0.58)),
    url("assets/hero-bicho-grilo.webp") center / cover no-repeat;
}

.admin-login-page::before,
.admin-login-page::after {
  content: "";
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
}

.admin-login-page::before {
  display: none;
}

.admin-login-page::after {
  display: none;
}

h1,
h2,
h3,
h4,
.navigation,
.restricted-badge,
.admin-button,
.logout,
.account-button,
.button--ghost-admin,
.button--outline-admin,
.admin-button-inline,
.tool-button,
.simulation-tab__select,
.table-delete,
.budget-action,
.danger-button {
  font-family: var(--font-heading);
}

.admin-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(330px, 510px) minmax(320px, 406px);
  align-items: center;
  justify-content: center;
  gap: clamp(44px, 7vw, 110px);
  padding: clamp(30px, 6vw, 72px);
}

.admin-brand {
  max-width: 510px;
}

.admin-login-logo {
  width: 156px;
  min-height: 86px;
  margin-bottom: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.admin-login-logo img {
  width: 126px;
  height: 64px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.restricted-badge {
  width: max-content;
  margin: 0 0 24px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
}

.restricted-badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.admin-brand h1 {
  margin: 0 0 19px;
  color: #fff;
  font-size: clamp(2.45rem, 3.4vw, 3.35rem);
  line-height: 1.07;
  letter-spacing: -0.065em;
  max-width: 560px;
}

.admin-brand h1 span {
  display: block;
  white-space: nowrap;
}

.admin-brand > p {
  max-width: 520px;
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.7;
}

.login-highlights {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-highlights span {
  min-height: 38px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.subtitle {
  color: var(--muted);
  line-height: 1.65;
}

.auth-card {
  width: min(100%, 406px);
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 30px 90px rgba(0, 7, 41, 0.26);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 2.1rem;
  letter-spacing: -0.05em;
}

.subtitle {
  margin: 10px 0 29px;
  max-width: none;
  line-height: 1.5;
  text-wrap: auto;
}

.auth-card label {
  display: block;
  margin-bottom: 18px;
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-button {
  width: 100%;
  min-height: 48px;
  margin-top: 11px;
  border: 0;
  border-radius: 999px;
  color: var(--navy);
  background: var(--green);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 750;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.admin-button:hover,
.admin-button:focus-visible {
  background: var(--lime);
}

.login-message {
  margin: 17px 0 0;
  color: var(--pink);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.login-message:empty {
  display: none;
}

.logout {
  padding: 9px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.logout:hover,
.logout:focus-visible {
  color: var(--navy);
  border-color: var(--lime);
  background: var(--lime);
}

.panel-page {
  background: #f7f9f6;
}

.panel-page .navigation > a.is-active::after {
  transform: scaleX(1);
}

.panel-page .navigation .button {
  border: 0;
}

.panel-page .navigation {
  margin-left: auto;
}

.account-menu {
  position: relative;
  flex-shrink: 0;
}

.account-button {
  min-height: 48px;
  padding: 5px 12px 5px 6px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.account-avatar {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
}

.account-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.account-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 170px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(0, 7, 41, 0.13);
}

.button--ghost-admin,
.button--outline-admin {
  width: max-content;
  min-height: 44px;
  border: 1px solid var(--line);
  color: var(--navy);
  background: #fff;
  font-size: 0.88rem;
}

.button--ghost-admin {
  width: 100%;
}

.logout-action {
  justify-content: flex-start;
  gap: 9px;
  border-color: transparent;
  color: var(--danger);
}

.logout-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logout-action:hover,
.logout-action:focus-visible {
  border-color: rgba(217, 48, 37, 0.12);
  color: #fff;
  background: var(--danger);
}

.button--ghost-admin:hover,
.button--outline-admin:hover,
.button--ghost-admin:focus-visible,
.button--outline-admin:focus-visible {
  border-color: var(--lime);
  background: var(--lime);
}

.logout-action,
.logout-action.button--ghost-admin {
  min-height: 44px;
  padding: 0 14px;
  justify-content: flex-start;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  color: var(--danger);
  background: transparent;
  font-weight: 600;
}

.logout-action:hover,
.logout-action:focus-visible,
.logout-action.button--ghost-admin:hover,
.logout-action.button--ghost-admin:focus-visible {
  color: var(--danger);
  background: rgba(217, 48, 37, 0.08);
}

.admin-button-inline {
  width: max-content;
  min-height: 44px;
  font-size: 0.88rem;
}

.button:disabled,
.admin-button:disabled,
.admin-button-inline:disabled {
  color: rgba(0, 7, 41, 0.42);
  background: #dfe5df;
  cursor: not-allowed;
}

.button:disabled:hover,
.button:disabled:focus-visible,
.admin-button-inline:disabled:hover,
.admin-button-inline:disabled:focus-visible {
  color: rgba(0, 7, 41, 0.42);
  background: #dfe5df;
}

.workspace-container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.workspace-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 78px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.workspace-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 58px);
}

.workspace-header img {
  width: 122px;
  height: 65px;
  object-fit: contain;
}

.workspace-header nav {
  flex: 1;
  display: flex;
  gap: clamp(18px, 3vw, 36px);
}

.workspace-header nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.workspace-header nav a.is-active,
.workspace-header nav a:hover {
  color: var(--navy);
}

.workspace-header nav a.is-active::after {
  content: "";
  position: absolute;
  height: 2px;
  inset: auto 0 -29px;
  background: var(--green-dark, #218a3f);
}

.workspace-user {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--green-dark, #218a3f);
  font-weight: 700;
}

.simulator {
  padding: 140px 0 72px;
}

.admin-view {
  display: none;
}

.admin-view.is-active {
  display: block;
}

.page-heading,
.simulator__heading {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.simulator-drawer .simulator__heading {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0 -10px 24px 0;
  padding: 0 0 14px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.page-heading > div {
  min-width: 0;
}

.page-heading h1,
.page-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.page-heading p:not(.tag) {
  max-width: none;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.drawer-stepper {
  margin: -4px 0 24px;
  display: grid;
  gap: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.drawer-stepper__meta {
  min-height: 1px;
  font-family: var(--font-heading);
}

.drawer-stepper__meta strong {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
}

.drawer-stepper__meta span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.drawer-stepper__bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce3df;
}

.drawer-stepper__bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--pink);
  transition: width 180ms ease;
}

.price-sheet {
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.simulator-actions {
  margin: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 16px;
}

.price-sheet__toolbar {
  padding: 0 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.price-sheet h2,
.price-sheet h3 {
  margin: 0;
  color: var(--navy);
}

.price-sheet h2 {
  font-size: 1.05rem;
}

.price-sheet__hint {
  max-width: none;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.price-sheet__toolbar > div {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tool-button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--navy);
  background: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.tool-button:hover,
.tool-button:focus-visible {
  border-color: var(--lime);
  background: var(--lime);
}

.tool-button--accent {
  border-color: #228d48;
  color: #fff;
  background: #228d48;
}

.tool-button--solid {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

.route-tabs {
  min-width: 0;
  max-width: 100%;
  padding: 0 4px 0 0;
  display: flex;
  flex: 1;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #cbd5d1 transparent;
  scroll-snap-type: x proximity;
  mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
}

.route-tabs::-webkit-scrollbar {
  height: 6px;
}

.route-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.route-tabs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5d1;
}

.simulation-tab {
  flex: 0 0 clamp(210px, 24vw, 252px);
  min-width: 0;
  display: flex;
  align-items: stretch;
  border: 0;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  background: #f2f5f2;
  scroll-snap-align: start;
}

.simulation-tab.is-active {
  background: var(--navy);
}

.route-tabs .simulation-tab__select {
  min-width: 0;
  flex: 1;
  padding: 14px 16px;
  border: 0;
  border-radius: 14px 0 0 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.simulation-tab.is-active .simulation-tab__select {
  color: #fff;
}

.route-tabs .simulation-tab__select:hover,
.route-tabs .simulation-tab__select:focus-visible {
  color: var(--navy);
  background: #f2f4f8;
}

.simulation-tab.is-active .simulation-tab__select:hover,
.simulation-tab.is-active .simulation-tab__select:focus-visible {
  color: #fff;
  background: var(--navy);
}

.simulation-tab__delete {
  flex: 0 0 40px;
  width: 40px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.simulation-tab.is-active .simulation-tab__delete {
  color: #fff;
}

.simulation-tab__delete::before {
  content: "×";
  font-size: 1.45rem;
  line-height: 1;
}

.simulation-tab__delete:hover,
.simulation-tab__delete:focus-visible {
  color: #fff;
  background: var(--danger);
}

.simulation-tab__delete svg {
  display: none;
}

.route-tabs small {
  display: block;
  margin-top: 5px;
  font-size: 0.74rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.simulation-tab.is-active small {
  color: rgba(255, 255, 255, 0.82);
}

.sheet-grid {
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 14px;
  background: transparent;
  border-radius: 0;
}

.setup-card,
.budget-detail-card,
.cost-panel,
.results-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.setup-card {
  grid-column: 1 / -1;
  padding: 0;
  overflow: visible;
}

.setup-card h3,
.cost-panel h3,
.results-card h3 {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.setup-fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.setup-fields label {
  grid-column: span 1;
}

.setup-fields .setup-field--wide {
  grid-column: 1 / -1;
}

.setup-fields label:nth-child(3),
.setup-fields label:nth-child(4),
.setup-fields label:nth-child(5) {
  grid-column: span 2;
}

.setup-fields label:nth-child(6) {
  grid-column: span 1;
}

.setup-fields .setup-field--validity,
.setup-fields .setup-field--expiration {
  grid-column: span 3;
}

.setup-fields .setup-field--passengers {
  grid-column: span 2;
}

.checkbox-field {
  min-height: 48px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--pink);
}

.checkbox-field span {
  font-size: 0.82rem;
  font-weight: 600;
}

.budget-detail-card {
  grid-column: 1 / -1;
  padding: 0;
}

.budget-detail-card[hidden] {
  display: none;
}

.budget-detail-card h3 {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.budget-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.budget-detail-grid__full {
  grid-column: 1 / -1;
}

.itinerary-builder {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf8;
}

.itinerary-builder__header {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.itinerary-builder h4 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 0.96rem;
}

.itinerary-builder p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.itinerary-rows {
  display: grid;
  gap: 10px;
}

.itinerary-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 38px;
  align-items: end;
  gap: 10px;
}

.itinerary-builder__header .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.itinerary-row .budget-action {
  height: 48px;
  min-height: 48px;
  align-self: end;
}

.label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.info-tooltip {
  position: relative;
  width: 18px;
  height: 18px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #eef1f3;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: help;
}

.info-tooltip span {
  position: absolute;
  z-index: 1200;
  left: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 280px;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: #313131;
  box-shadow: none;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: normal;
}

.info-tooltip:hover span,
.info-tooltip:focus span,
.info-tooltip.is-open span {
  opacity: 1;
  transform: translate(-50%, 0);
}

.budget-value-label .info-tooltip span {
  left: 0;
  right: auto;
  bottom: calc(100% + 8px);
  top: auto;
  width: 280px;
  max-width: min(248px, calc(100vw - 48px));
  transform: translateY(4px);
}

.budget-value-label .info-tooltip:hover span,
.budget-value-label .info-tooltip:focus span,
.budget-value-label .info-tooltip.is-open span {
  opacity: 1;
  transform: translateY(0);
}

.panel-page label {
  color: #394150;
  font-size: 0.78rem;
  font-weight: 650;
}

.cost-panel {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  min-width: 0;
  overflow: visible;
}

.cost-panel__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cost-panel__title h3 {
  margin-bottom: 0;
}

.cost-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.cost-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
  min-width: 0;
}

.cost-item__header {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cost-item__header strong {
  color: var(--navy);
  font-size: 0.92rem;
}

.cost-item__fields {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.cost-item__fields label {
  min-width: 0;
}

.cost-item__description {
  grid-column: 1 / -1;
}

.cost-item__fields label:first-child {
  grid-column: 1 / -1;
}

.cost-item__fields label:nth-child(3) {
  grid-column: span 3;
}

.cost-item__fields label:nth-child(4) {
  grid-column: span 1;
}

.cost-item__fields label:nth-child(5) {
  grid-column: span 2;
}

.cost-item__fields label:nth-child(6) {
  grid-column: span 4;
}

.panel-page select.field-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23667080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 20px 20px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.cost-item__fields input[disabled] {
  height: 48px;
  border: 1px solid #737a87;
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  text-align: left;
  opacity: 1;
}

.cost-item__header button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--danger);
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.cost-item__header button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.cost-item__header button:hover {
  color: var(--danger-dark);
  background: rgba(217, 48, 37, 0.09);
}

.add-button--bottom {
  display: block;
  margin: 16px 0 0 auto;
}

.add-item-button {
  width: 100%;
  margin-top: 12px;
}

.results-card {
  position: sticky;
  top: 96px;
  padding: 0;
  background: transparent;
}

.results-card[hidden] {
  display: none !important;
}

.simulator-drawer[data-flow] .sheet-grid > [data-budget-step="2"]:not(.results-card),
.simulator-drawer[data-flow] .sheet-grid > [data-budget-step="3"]:not(.results-card),
.simulator-drawer[data-flow] .results-card {
  grid-column: 1 / -1;
}

.simulator-drawer[data-flow] .results-card {
  position: static;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid rgba(0, 7, 41, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(0, 7, 41, 0.07);
}

.simulator-drawer[data-flow] .results-card h3 {
  grid-column: 1 / -1;
  margin-bottom: 0;
  font-size: 1.2rem;
}

.results-card__intro {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.results-card div {
  margin-bottom: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.result-metric {
  min-height: 98px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.result-metric svg {
  width: 22px;
  height: 22px;
  color: var(--navy);
  fill: currentColor;
}

.results-card__highlight {
  grid-column: 1 / -1;
  padding: 18px 20px !important;
  color: #fff;
  border-color: rgba(0, 7, 41, 0.12) !important;
  background: linear-gradient(135deg, #f4f7ff, #e7eeff) !important;
  box-shadow: none;
}

.results-card__highlight span,
.results-card__highlight strong {
  color: var(--navy);
}

.results-card__highlight strong {
  margin-top: 8px;
  display: block;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.results-card__highlight span {
  color: #394150;
  font-size: 0.82rem;
  font-weight: 700;
}

.results-card__highlight svg,
.results-card__profit svg {
  color: currentColor;
}

.results-card__profit {
  border-color: rgba(2, 103, 75, 0.18) !important;
  color: #fff;
  background: linear-gradient(135deg, #005f49, #008467) !important;
}

.results-card__profit span,
.results-card__profit strong {
  color: #fff !important;
}

.results-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.72rem;
}

.results-card strong {
  color: var(--navy);
  font-size: 0.95rem;
}

.results-card strong.positive {
  color: var(--navy);
}

.simulation-history {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.simulation-history h3 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1rem;
}

.simulation-history p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.simulation-history__list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.simulation-history__item {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  border-radius: 12px;
  background: #f8faf8;
}

.simulation-history__item strong {
  color: var(--navy);
  font-size: 0.92rem;
}

.simulation-history__item span {
  grid-column: 1 / 2;
  color: var(--muted);
  font-size: 0.78rem;
}

.simulation-history__item b {
  grid-row: 1 / 3;
  grid-column: 2 / 3;
  align-self: center;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 0.95rem;
}

.management-section {
  margin-top: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.reservation-admin-modal {
  width: min(1080px, calc(100vw - 32px));
}

.reservation-summary-grid {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reservation-summary-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf8;
}

.reservation-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.reservation-summary-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 1rem;
}

.reservation-admin-actions {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reservation-share-toggle {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.reservation-share-toggle input {
  accent-color: var(--pink);
}

.reservation-table-wrap {
  max-height: 420px;
  overflow: auto;
}

.reservation-row-actions {
  justify-content: flex-end;
}

@media (max-width: 780px) {
  .reservation-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.table-toolbar {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: nowrap;
}

.table-toolbar--outside {
  margin: -8px 0 16px;
}

.table-toolbar label {
  width: min(100%, 260px);
}

.select-wrap-admin {
  display: block;
  position: relative;
  width: min(100%, 220px);
}

.table-search {
  width: min(100%, 360px);
  flex: 0 1 360px;
}

.table-toolbar--outside .field-control {
  margin-top: 0;
}

.table-toolbar--outside .select-wrap-admin::before {
  content: attr(data-filter-label);
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  pointer-events: none;
}

.table-toolbar--outside select.field-control {
  padding-top: 14px;
}

.management-heading .tag {
  margin-bottom: 7px;
}

.record-form {
  margin-bottom: 25px;
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 14px;
  border-radius: 13px;
  background: #f7f9f6;
}

.record-form[hidden] {
  display: none;
}

.section-tabs {
  width: max-content;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 5px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.section-tab {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 170ms ease, color 170ms ease;
}

.section-tab:hover,
.section-tab:focus-visible {
  color: #fff;
  background: var(--pink);
}

.section-tab.is-active {
  color: #fff;
  background: var(--navy);
}

.route-tab-panel {
  display: none;
}

.route-tab-panel.is-active {
  display: block;
}

.content-editor {
  display: grid;
  gap: 18px;
}

.content-tabs {
  width: max-content;
  max-width: 100%;
  padding: 5px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.content-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 170ms ease, color 170ms ease;
}

.content-tab:hover,
.content-tab:focus-visible {
  color: #fff;
  background: var(--pink);
}

.content-tab.is-active {
  color: #fff;
  background: var(--navy);
}

.editor-card {
  padding: 22px;
  display: none;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.editor-card.is-active {
  display: grid;
}

.editor-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.editor-card__header,
.content-item__top,
.content-editor__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.content-list {
  display: grid;
  gap: 14px;
}

.content-item {
  padding: 16px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf8;
}

.content-item__top strong {
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 650;
}

.content-editor textarea.field-control {
  min-height: 96px;
  padding: 13px;
  resize: vertical;
  line-height: 1.45;
}

.record-form__address {
  grid-column: span 2;
}

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

.data-table table {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
  text-align: left;
}

.budgets-table__client {
  width: 26%;
}

.budgets-table__route {
  width: 20%;
}

.budgets-table__people {
  width: 10%;
}

.budgets-table__value,
.budgets-table__date,
.budgets-table__status {
  width: 11%;
}

.budgets-table__actions {
  width: 1%;
}

.data-table th {
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.data-table td {
  padding: 16px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  max-width: 260px;
}

.data-table th:last-child,
.data-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: -10px 0 18px rgba(0, 7, 41, 0.04);
  width: 1%;
  white-space: nowrap;
}

.truncate-cell {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-row td {
  color: var(--muted);
  text-align: center;
}

.empty-state {
  min-height: 190px;
  padding: 34px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.empty-state img {
  width: 96px;
  height: 96px;
  display: block;
  object-fit: contain;
}

.table-delete {
  border: 0;
  color: var(--danger);
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.table-delete:hover,
.table-delete:focus-visible {
  color: var(--danger-dark);
}

.status-select {
  min-width: 172px;
}

.status-tag {
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-tag--aguardando-retorno {
  color: #7a4d00;
  background: #fff2cc;
}

.status-tag--aprovado {
  color: #137333;
  background: #dff7e7;
}

.status-tag--cancelado {
  color: var(--danger);
  background: rgba(217, 48, 37, 0.1);
}

.budget-action {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.budget-action--icon {
  width: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 50%;
}

.budget-actions {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.budget-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.budget-action svg.icon-dots {
  fill: currentColor;
  stroke: none;
}

.budget-action:hover,
.budget-action:focus-visible,
.budget-action--export:hover,
.budget-action--export:focus-visible {
  color: var(--navy);
  border-color: var(--lime);
  background: var(--lime);
}

.budget-action--danger {
  color: var(--danger);
}

.budget-action--danger:hover,
.budget-action--danger:focus-visible {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger);
}

.budget-action--disabled,
.budget-action--disabled:hover,
.budget-action--disabled:focus-visible {
  color: #667085;
  border-color: var(--line);
  background: #f5f7f6;
  cursor: not-allowed;
  opacity: 0.72;
}

.budget-link {
  min-height: 36px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--navy);
  background: rgba(88, 255, 29, 0.18);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 170ms ease, color 170ms ease;
}

.budget-link:hover,
.budget-link:focus-visible {
  color: #fff;
  background: var(--pink);
}

.budget-menu {
  position: relative;
}

.budget-menu__popover {
  position: fixed;
  z-index: 2147483000;
  width: max-content;
  min-width: 190px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 7, 41, 0.14);
}

.budget-menu__popover button {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  color: var(--navy);
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}

.budget-menu__popover button span {
  min-width: 0;
}

.budget-menu__popover button:hover,
.budget-menu__popover button:focus-visible {
  background: #f3f6f3;
}

.budget-menu__popover svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.budget-menu__popover .budget-menu__danger {
  color: var(--danger);
}

.budget-menu__popover .budget-menu__danger:hover,
.budget-menu__popover .budget-menu__danger:focus-visible {
  color: #fff;
  background: var(--danger);
}

.budget-action--danger,
.cost-item__header [data-remove],
.simulation-tab__delete,
[data-remove-itinerary-row],
[data-remove-content-route],
[data-remove-photo],
[data-remove-simulation-photo] {
  color: var(--danger);
}

.cost-item__header [data-remove],
[data-remove-itinerary-row],
[data-remove-content-route],
[data-remove-photo],
[data-remove-simulation-photo] {
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 48, 37, 0.22);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cost-item__header [data-remove] svg,
[data-remove-itinerary-row] svg,
[data-remove-content-route] svg,
[data-remove-photo] svg,
[data-remove-simulation-photo] svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.cost-item__header [data-remove]:hover,
.cost-item__header [data-remove]:focus-visible,
[data-remove-itinerary-row]:hover,
[data-remove-itinerary-row]:focus-visible,
[data-remove-content-route]:hover,
[data-remove-content-route]:focus-visible,
[data-remove-photo]:hover,
[data-remove-photo]:focus-visible,
[data-remove-simulation-photo]:hover,
[data-remove-simulation-photo]:focus-visible {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger);
}

.expired-budget {
  position: relative;
  margin-left: 8px;
  display: inline-flex;
  vertical-align: middle;
  color: var(--danger);
  cursor: help;
}

.expired-budget svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.expired-budget span {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 160;
  width: 260px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #fff;
  background: #313131;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: normal;
}

.expired-budget:hover span,
.expired-budget:focus span {
  opacity: 1;
  transform: translateY(0);
}

.simulator-drawer__footer {
  flex-shrink: 0;
  margin: 0 -32px -32px;
  padding: 18px 32px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.simulator-drawer__footer .button {
  min-width: 0;
}

.simulator-drawer__footer[hidden] {
  display: none;
}

.simulator-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: block;
  pointer-events: none;
}

.simulator-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 7, 41, 0.34);
  opacity: 0;
  transition: opacity 180ms ease;
}

.simulator-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(680px, calc(100% - 28px));
  height: 100%;
  padding: 28px 40px 28px 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scrollbar-gutter: stable;
  background: #fff;
  border-left: 1px solid rgba(0, 7, 41, 0.08);
  box-shadow: -18px 0 44px rgba(0, 7, 41, 0.16);
  transform: translateX(100%);
  transition: transform 230ms ease;
}

.simulator-drawer__scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 10px 18px 0;
  scrollbar-gutter: stable;
  scrollbar-width: none;
}

.simulator-drawer__scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.simulator-drawer.is-open {
  pointer-events: auto;
}

.simulator-drawer.is-open .simulator-drawer__backdrop {
  opacity: 1;
}

.simulator-drawer.is-open .simulator-drawer__panel {
  transform: translateX(0);
}

.simulator-heading__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding-right: 2px;
}

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

.budget-flow__option {
  min-height: 108px;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease;
}

.budget-flow__option strong {
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 650;
}

.budget-flow__option span {
  max-width: 360px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.45;
}

.budget-flow__option:hover,
.budget-flow__option:focus-visible {
  border-color: var(--lime);
  background: rgba(203, 244, 103, 0.16);
}

.budget-flow__option.is-active {
  border-color: rgba(0, 7, 41, 0.28);
  color: var(--navy);
  background: rgba(203, 244, 103, 0.2);
  box-shadow: inset 0 0 0 1px rgba(0, 7, 41, 0.18);
}

.field-hint {
  margin-top: 7px;
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.file-control {
  height: auto;
  min-height: 56px;
  padding: 9px 12px;
  color: var(--muted);
  background: #fff;
}

.file-control::file-selector-button {
  min-height: 36px;
  margin-right: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--navy);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 170ms ease, color 170ms ease;
}

.file-control::file-selector-button:hover {
  background: var(--pink);
}

.material-upload {
  min-height: 72px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #737a87;
  border-radius: 12px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  transition: border-color 170ms ease, background-color 170ms ease;
}

.material-upload.has-preview {
  align-items: center;
  background: rgba(203, 244, 103, 0.16);
}

.material-upload:hover,
.material-upload:focus-within {
  border-color: var(--navy);
  background: #f8faf8;
}

.material-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.material-upload__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: var(--navy);
  background: rgba(203, 244, 103, 0.3);
}

.material-upload__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.material-upload strong,
.material-upload small {
  display: block;
}

.material-upload strong {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 650;
}

.material-upload small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.material-upload__preview {
  margin-left: auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.material-upload__preview img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.material-upload__preview > span {
  max-width: 140px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.photo-preview:empty {
  display: none;
}

.photo-preview figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf8;
}

.photo-preview img {
  width: 100%;
  height: 120px;
  display: block;
  object-fit: cover;
}

.photo-preview figcaption {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.photo-preview figcaption span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-open {
  overflow: hidden;
}

.budget-drawer,
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.budget-drawer__backdrop,
.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 7, 41, 0.36);
  opacity: 0;
  transition: opacity 180ms ease;
}

.budget-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100%);
  height: 100%;
  padding: 28px 40px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-gutter: stable;
  scrollbar-width: none;
  background: #fff;
  border-left: 1px solid rgba(0, 7, 41, 0.08);
  box-shadow: -16px 0 42px rgba(0, 7, 41, 0.14);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.budget-drawer__panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.budget-drawer.is-open,
.confirm-modal.is-open {
  pointer-events: auto;
}

.budget-drawer.is-open .budget-drawer__backdrop,
.confirm-modal.is-open .confirm-modal__backdrop {
  opacity: 1;
}

.budget-drawer.is-open .budget-drawer__panel {
  transform: translateX(0);
}

.budget-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: -28px;
  z-index: 3;
  margin: -28px -40px 0 -28px;
  padding: 28px 40px 14px 28px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.budget-drawer__row--address {
  grid-template-columns: minmax(0, 1fr) 120px;
}

.budget-drawer__row--city {
  grid-template-columns: minmax(0, 1fr) 96px;
}

.budget-drawer__stack {
  display: grid;
  gap: 14px;
}

.address-field {
  position: relative;
}

.address-field--zip {
  max-width: 220px;
}

.is-loading-cep .address-field--zip .field-control,
.is-loading-cep [data-cep-field] {
  background-image: linear-gradient(90deg, transparent, rgba(88, 255, 29, 0.18), transparent);
  background-size: 220% 100%;
  animation: cepLoading 950ms linear infinite;
}

[data-cep-message] {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
}

[data-cep-message][data-state="error"] {
  color: var(--danger);
}

[data-cep-message][data-state="success"] {
  color: var(--green-dark);
}

@keyframes cepLoading {
  to {
    background-position: -220% 0;
  }
}

.budget-drawer__header h2,
.confirm-modal__card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.budget-drawer__header p {
  max-width: 420px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.confirm-modal__card h2 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.budget-drawer__close {
  width: 43px;
  height: 43px;
  min-width: 43px;
  flex: 0 0 43px;
  margin-left: auto;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 7, 41, 0.1);
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.budget-drawer__close svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.budget-drawer__close:hover,
.budget-drawer__close:focus-visible {
  color: var(--navy);
  background: #f1f3f2;
  box-shadow: none;
}

.budget-drawer textarea.field-control,
.budget-itinerary-field {
  min-height: 112px;
  padding: 13px;
  resize: vertical;
  line-height: 1.45;
}

.budget-drawer textarea.budget-itinerary-field {
  min-height: 228px;
}

.budget-note-field {
  min-height: 128px;
}

.budget-drawer__actions,
.confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.budget-details-drawer .budget-drawer__panel {
  width: min(780px, 100%);
}

.budget-details-drawer__body {
  display: grid;
  gap: 16px;
}

.budget-details-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.budget-details-section h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 1rem;
}

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

.budget-details-grid div {
  padding: 12px;
  border-radius: 14px;
  background: #f7f9f6;
}

.budget-details-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.budget-details-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.budget-drawer__actions--sticky {
  position: sticky;
  right: 0;
  bottom: 0;
  z-index: 2;
  flex-shrink: 0;
  margin: auto -40px -28px -28px;
  padding: 18px 40px 18px 28px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.budget-drawer__actions .button--outline-admin:hover,
.budget-drawer__actions .button--outline-admin:focus-visible,
.confirm-modal__actions .button--outline-admin:hover,
.confirm-modal__actions .button--outline-admin:focus-visible {
  border-color: #d8dde5;
  color: var(--navy);
  background: #f4f6f5;
}

.budget-value-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.confirm-modal__actions .button {
  min-height: 42px;
  padding-inline: 18px;
  font-size: 0.88rem;
  font-weight: 650;
}

.confirm-modal {
  z-index: 90;
  display: grid;
  place-items: center;
}

.confirm-modal__card {
  width: min(430px, calc(100% - 32px));
  padding: 26px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 7, 41, 0.22);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.confirm-modal__card--wide {
  width: min(560px, calc(100% - 32px));
}

.confirm-modal.is-open .confirm-modal__card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.confirm-modal__warning {
  width: 54px;
  height: 54px;
  margin: 18px auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--danger);
  background: rgba(217, 48, 37, 0.1);
}

.confirm-modal__warning svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.confirm-modal__success {
  width: 54px;
  height: 54px;
  margin: 18px auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: rgba(88, 255, 29, 0.14);
}

.confirm-modal__success svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.confirm-modal__card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.status-modal__field {
  display: block;
  margin-bottom: 22px;
}

.status-modal__field .select-wrap-admin {
  width: 100%;
  margin-top: 8px;
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.danger-button:hover,
.danger-button:focus-visible {
  color: #fff;
  background: var(--danger-dark);
}

.snackbar {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 120;
  min-width: 288px;
  max-width: min(520px, calc(100vw - 48px));
  min-height: 48px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  color: #fff;
  background: #000;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.snackbar.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.simulator-drawer .budget-drawer__close,
.budget-drawer .budget-drawer__close {
  margin-left: auto;
  transform: none;
}

.simulator-drawer__panel,
.budget-drawer__panel {
  padding-right: 48px;
}

.simulator-drawer__scroll {
  padding-right: 0;
}

.budget-drawer__header {
  margin-right: -48px;
  padding-right: 48px;
}

.budget-description-field {
  min-height: 180px !important;
}

.budget-list-field {
  min-height: 170px !important;
}

.budget-note-field {
  min-height: 150px !important;
  padding: 16px !important;
  line-height: 1.6 !important;
}

.budget-detail-grid label:has(#budget-payment-url) {
  grid-column: 1 / -1;
}

.itinerary-builder__header .button {
  width: max-content;
  min-width: max-content;
  white-space: nowrap;
}

.itinerary-row .budget-action {
  height: 48px;
  min-height: 48px;
}

@media (max-width: 850px) {
  .setup-fields .setup-field--validity,
  .setup-fields .setup-field--expiration,
  .setup-fields .setup-field--passengers {
    grid-column: 1 / -1;
  }

  .budget-details-grid,
  .budget-drawer__row--city {
    grid-template-columns: 1fr;
  }

  .address-field--zip {
    max-width: none;
  }
}

/* Final drawer polish overrides */
.setup-fields .setup-field--expiration {
  grid-column: span 2 !important;
  min-width: 180px;
}

.setup-fields .setup-field--validity {
  grid-column: span 4 !important;
  align-self: end;
}

.setup-fields .setup-field--expiration .field-control {
  width: 100%;
  min-width: 180px;
}

.checkbox-field {
  min-height: 48px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.checkbox-field span {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
}

.cost-item__fields label:nth-child(4) {
  width: 98px;
  grid-column: auto !important;
}

.cost-item__fields label:nth-child(4) .field-control {
  width: 98px;
}

.cost-item__fields {
  grid-template-columns: minmax(150px, 0.95fr) 98px minmax(132px, 1fr) minmax(170px, 1.2fr) !important;
}

.cost-item__fields label:first-child,
.cost-item__description {
  grid-column: 1 / -1 !important;
}

.cost-item__fields label:nth-child(3),
.cost-item__fields label:nth-child(5),
.cost-item__fields label:nth-child(6) {
  grid-column: auto !important;
}

.budget-drawer__close {
  position: relative;
  right: auto;
  transform: none !important;
  overflow: visible;
}

.simulator-drawer__panel,
.budget-drawer__panel {
  padding-right: 56px !important;
}

.simulator-drawer .simulator__heading {
  margin-right: -28px !important;
  padding-right: 28px !important;
}

.budget-drawer__header {
  margin-right: 0 !important;
  padding-right: 0 !important;
  overflow: visible !important;
}

.budget-drawer__close {
  flex: 0 0 43px !important;
  margin-right: 0 !important;
}

.simulator-drawer__panel .budget-drawer__close {
  margin-right: 0 !important;
}

.simulator-drawer .simulator__heading,
.budget-drawer__header {
  padding-right: 6px !important;
}

@media (max-width: 850px) {
  .setup-fields .setup-field--expiration,
  .setup-fields .setup-field--validity,
  .setup-fields .setup-field--passengers {
    grid-column: 1 / -1 !important;
  }

  .cost-item__fields,
  .cost-item__fields label:nth-child(4) {
    width: 100%;
    grid-template-columns: 1fr !important;
  }

  .cost-item__fields label:nth-child(4) .field-control {
    width: 100%;
  }
}

@media (max-width: 850px) {
  .panel-page .site-header {
    height: 82px;
  }

  .panel-page .navigation {
    position: fixed;
    inset: 82px 0 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 30px max(20px, calc((100vw - 680px) / 2));
    color: var(--navy);
    background: #fff;
    box-shadow: none;
  }

  .panel-page .navigation.is-open {
    display: flex;
  }

  .panel-page .navigation a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 1.1rem;
  }

  .panel-page .navigation a.is-active {
    background: transparent;
  }

  .panel-page .navigation > a.is-active::after {
    display: none;
  }

  .panel-page .menu-toggle {
    display: block;
    order: 3;
    margin-left: 0;
  }

  .panel-page .account-menu {
    margin-left: auto;
  }

  .admin-shell {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 30px;
    padding: 34px 17px;
  }

  .admin-brand {
    width: min(100%, 510px);
    text-align: left;
  }

  .admin-brand h1 {
    font-size: 2.25rem;
  }

  .admin-brand h1 span {
    white-space: normal;
  }

  .admin-login-logo {
    margin-bottom: 24px;
  }

  .auth-card {
    width: min(100%, 406px);
    padding: 24px;
  }

  .simulator {
    padding-top: 122px;
  }

  .simulator-drawer__panel {
    width: 100%;
    padding: 24px 18px;
  }

  .budget-flow,
  .photo-preview,
  .budget-detail-grid {
    grid-template-columns: 1fr;
  }

  .sheet-grid {
    grid-template-columns: 1fr;
  }

  .results-card {
    position: static;
  }

  .cost-item__fields,
  .setup-fields,
  .record-form {
    grid-template-columns: repeat(2, 1fr);
  }

  .setup-fields .setup-field--wide,
  .budget-detail-grid__full {
    grid-column: 1 / -1;
  }

  .itinerary-row {
    grid-template-columns: 1fr;
  }

  .simulator-drawer__footer {
    margin: 0 -18px -24px;
    padding: 16px 18px;
  }

  .budget-drawer__row {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 480px) {
  .cost-item__fields,
  .setup-fields,
  .record-form {
    grid-template-columns: 1fr;
  }

  .price-sheet__toolbar,
  .cost-panel__title,
  .itinerary-builder__header,
  .simulator-drawer__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .record-form__address {
    grid-column: auto;
  }

  .table-toolbar {
    flex-wrap: wrap;
  }

  .table-search,
  .select-wrap-admin {
    width: 100%;
    flex-basis: 100%;
  }

  .cost-item__fields label,
  .cost-item__fields label:first-child,
  .cost-item__description,
  .cost-item__fields label:nth-child(3),
  .cost-item__fields label:nth-child(4),
  .cost-item__fields label:nth-child(5),
  .cost-item__fields label:nth-child(6) {
    grid-column: 1 / -1;
  }
}

/* Drawer stabilization: keep controls readable and prevent the close button from clipping. */
.simulator-drawer__panel {
  width: min(860px, calc(100% - 24px)) !important;
  padding: 28px 32px !important;
  overflow: hidden !important;
}

.budget-drawer__panel {
  padding: 28px 32px !important;
  overflow: hidden !important;
}

.simulator-drawer__scroll,
.budget-drawer__body {
  padding-right: 0 !important;
  scrollbar-width: none;
}

.simulator-drawer__scroll::-webkit-scrollbar,
.budget-drawer__body::-webkit-scrollbar {
  display: none;
}

.simulator-drawer .simulator__heading {
  margin-right: 0 !important;
  padding-right: 0 !important;
  overflow: visible !important;
}

.budget-drawer__header {
  margin: -28px -32px 0 -28px !important;
  padding: 28px 32px 14px 28px !important;
  overflow: visible !important;
}

.budget-drawer__close {
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  flex: 0 0 42px !important;
  margin: 0 0 0 auto !important;
  transform: none !important;
  overflow: visible !important;
}

.cost-item__fields {
  grid-template-columns: minmax(170px, 1fr) minmax(118px, 0.7fr) minmax(150px, 0.9fr) minmax(190px, 1.1fr) !important;
}

.cost-item__fields label:first-child,
.cost-item__description {
  grid-column: 1 / -1 !important;
}

.cost-item__fields label:nth-child(3),
.cost-item__fields label:nth-child(4),
.cost-item__fields label:nth-child(5),
.cost-item__fields label:nth-child(6) {
  width: auto !important;
  min-width: 0 !important;
  grid-column: auto !important;
}

.cost-item__fields label:nth-child(4) .field-control {
  width: 100% !important;
}

.setup-field--validity {
  align-items: center;
  grid-column: span 2;
  width: 100%;
}

.field-control:disabled,
.field-control[aria-disabled="true"] {
  border-color: #cfd6d2 !important;
  color: #475467 !important;
  background: #eef1ef !important;
  opacity: 1 !important;
  cursor: not-allowed;
}

.setup-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.setup-fields .setup-field--wide {
  grid-column: 1 / -1 !important;
}

.setup-fields .setup-field--passengers,
.setup-fields label:nth-child(4),
.setup-fields label:nth-child(5),
.setup-fields .setup-field--expiration {
  grid-column: span 1 !important;
}

.setup-fields .setup-field--validity {
  grid-column: 1 / -1 !important;
}

.simulator-drawer[data-flow] .results-card {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch;
}

.simulator-drawer[data-flow] .results-card h3,
.simulator-drawer[data-flow] .results-card .results-card__intro,
.simulator-drawer[data-flow] .results-card .results-card__highlight {
  grid-column: 1 / -1;
}

.results-card__highlight {
  border-color: rgba(0, 7, 41, 0.08) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #000729, #111b4f) !important;
}

.results-card__highlight span,
.results-card__highlight strong {
  color: #fff !important;
}

.results-card__highlight span {
  opacity: 0.82;
}

@media (max-width: 900px) {
  .simulator-drawer__panel,
  .budget-drawer__panel {
    width: min(100%, calc(100% - 16px)) !important;
    padding: 24px 20px !important;
  }

  .budget-drawer__header {
    margin: -24px -20px 0 -20px !important;
    padding: 24px 20px 14px !important;
  }

  .cost-item__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .setup-fields,
  .simulator-drawer[data-flow] .results-card {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .cost-item__fields label:first-child,
  .cost-item__description {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 620px) {
  .simulator-drawer__panel,
  .budget-drawer__panel {
    width: 100% !important;
    padding: 22px 16px !important;
  }

  .budget-drawer__header {
    margin: -22px -16px 0 -16px !important;
    padding: 22px 16px 14px !important;
  }

  .cost-item__fields {
    grid-template-columns: 1fr !important;
  }

  .setup-fields,
  .simulator-drawer[data-flow] .results-card {
    grid-template-columns: 1fr !important;
  }

  .cost-item__fields label,
  .cost-item__fields label:first-child,
  .cost-item__description,
  .cost-item__fields label:nth-child(3),
  .cost-item__fields label:nth-child(4),
  .cost-item__fields label:nth-child(5),
  .cost-item__fields label:nth-child(6) {
    grid-column: 1 / -1 !important;
  }
}

/* Admin tables and drawers polish */
.data-table {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.clients-table {
  min-width: 1680px !important;
}

.suppliers-table {
  min-width: 1900px !important;
}

.profiles-table {
  min-width: 760px !important;
}

.budgets-table {
  min-width: 1780px !important;
}

.data-table th,
.data-table td {
  padding: 16px !important;
  vertical-align: middle;
}

.data-table th:last-child,
.data-table td:last-child {
  z-index: 3;
}

.budget-action--danger svg,
.table-row-actions .budget-action--danger svg,
.budget-menu__danger svg {
  fill: currentColor !important;
  stroke: none !important;
}

.budget-menu__popover {
  width: max-content !important;
  min-width: 190px;
  max-width: min(360px, calc(100vw - 24px));
  white-space: nowrap;
}

.budget-menu__popover button {
  width: max-content;
  min-width: 100%;
  padding-inline: 12px 14px;
}

.budget-details-drawer .budget-drawer__panel,
.reservation-admin-modal {
  width: min(1040px, calc(100vw - 28px)) !important;
  max-width: none;
}

.budget-details-drawer__body {
  overflow-x: hidden !important;
}

.reservation-table-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: auto;
}

.reservation-table-wrap table {
  min-width: 1040px;
}

.reservation-admin-actions {
  justify-content: flex-end !important;
}

.profile-drawer .budget-drawer__panel {
  width: min(520px, calc(100% - 24px)) !important;
}

@media (max-width: 620px) {
  .budget-details-drawer .budget-drawer__panel,
  .reservation-admin-modal {
    width: 100% !important;
  }

  .table-toolbar {
    flex-wrap: wrap;
  }
}

/* Shared drawer shell: fixed header/footer with an independently scrollable body. */
.budget-drawer__panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  overflow: hidden !important;
}

.budget-drawer__header {
  position: relative !important;
  top: auto !important;
  flex: 0 0 auto !important;
  margin: -28px -32px 0 -28px !important;
  padding: 28px 32px 14px 28px !important;
}

.budget-drawer__body {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  display: grid !important;
  align-content: start !important;
  gap: 16px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 16px 0 22px !important;
  scrollbar-width: none;
}

.budget-drawer__body::-webkit-scrollbar {
  display: none;
}

.budget-drawer__actions--sticky {
  position: relative !important;
  flex: 0 0 auto !important;
  margin: 0 -32px -28px -28px !important;
  padding: 16px 32px 18px 28px !important;
}

.simulator-drawer__panel {
  display: flex !important;
  flex-direction: column !important;
}

.simulator-drawer__scroll {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  padding-bottom: 22px !important;
}

.simulator-drawer__footer {
  flex: 0 0 auto !important;
}

.simulator-drawer__footer button[hidden],
.simulator-drawer__footer button:disabled[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .budget-drawer__header {
    margin: -24px -20px 0 -20px !important;
    padding: 24px 20px 14px !important;
  }

  .budget-drawer__actions--sticky {
    margin: 0 -20px -24px -20px !important;
    padding: 16px 20px !important;
  }
}

@media (max-width: 620px) {
  .budget-drawer__header {
    margin: -22px -16px 0 -16px !important;
    padding: 22px 16px 14px !important;
  }

  .budget-drawer__actions--sticky {
    margin: 0 -16px -22px -16px !important;
    padding: 14px 16px !important;
  }
}
