:root {
  --ink: #111820;
  --nav: #12191f;
  --blue: #0b8fc6;
  --blue-dark: #07698f;
  --blue-pale: #d6eaf5;
  --paper: #ffffff;
  --canvas: #eef1f3;
  --line: #c7d0d6;
  --muted: #687681;
  --danger: #b83c32;
  --success: #257653;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #aebbc3;
  border-radius: 1px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: inset 3px 0 var(--blue);
}

label {
  display: grid;
  gap: 6px;
  color: #44515a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.button {
  min-height: 44px;
  border: 1px solid var(--blue);
  border-radius: 1px;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

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

.button.primary:hover {
  background: var(--blue-dark);
}

.button.secondary {
  color: var(--ink);
  border-color: #b8c3ca;
  background: #fff;
}

.button.compact {
  min-height: 38px;
}

.section-kicker {
  display: block;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.app-loading,
.app-error {
  display: grid;
  min-height: 100vh;
  place-content: center;
  gap: 8px;
  text-align: center;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 244px;
  flex-direction: column;
  padding: 24px 17px 18px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(11, 143, 198, 0.16), transparent 35%),
    var(--nav);
  border-right: 3px solid #1e2a32;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 7px 28px;
}

.brand img {
  width: 64px;
  height: 42px;
  object-fit: contain;
}

.brand div {
  display: grid;
  gap: 3px;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.13em;
}

.brand span {
  color: #8fa1ad;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.sidebar nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  padding: 0 12px;
  color: #aab6be;
  background: transparent;
  text-align: left;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.nav-item span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #52606a;
  color: #bbdce9;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  border-left-color: var(--blue);
  background: #1b252c;
}

.sidebar-info {
  display: grid;
  gap: 5px;
  margin-top: auto;
  border-top: 1px solid #34414a;
  padding: 16px 8px 0;
}

.sidebar-info strong {
  font-size: 11px;
}

.sidebar-info span {
  color: #84949f;
  font-size: 9px;
  text-transform: uppercase;
}

.sidebar-info a {
  width: max-content;
  margin-top: 8px;
  color: #9bd8ed;
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
}

.main {
  min-height: 100vh;
  margin-left: 244px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.topbar > div {
  display: grid;
  gap: 2px;
  text-align: right;
}

.topbar span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.topbar strong {
  font-size: 12px;
}

.topbar > b {
  border-left: 3px solid var(--blue);
  padding: 8px 10px;
  color: var(--blue-dark);
  background: var(--blue-pale);
  font-size: 9px;
  text-transform: uppercase;
}

.mobile-menu {
  display: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  width: min(1580px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.catalog {
  min-width: 0;
}

.page,
.catalog {
  padding-bottom: 70px;
}

.page {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: 28px;
}

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

.page-heading h1 {
  margin: 5px 0 0;
  font-size: clamp(27px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.page-heading p {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.source-box {
  display: grid;
  min-width: 215px;
  gap: 5px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  padding: 11px 13px;
  background: #fff;
}

.source-box span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
}

.source-box strong {
  max-width: 260px;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel,
.data-panel {
  border: 1px solid var(--line);
  border-radius: 1px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 38, 49, 0.06);
}

.customer-panel {
  padding: 17px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.panel-title span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.panel-title h2 {
  margin: 0;
  font-size: 15px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-grid.compact input,
.field-grid.compact select {
  min-height: 37px;
}

.mode-tabs,
.category-row,
.table-tabs {
  display: flex;
  gap: 5px;
  margin-top: 13px;
  overflow-x: auto;
}

.mode-tabs button,
.category-row button,
.table-tabs button {
  flex: 0 0 auto;
  min-height: 35px;
  border: 1px solid #b9c4cb;
  border-radius: 1px;
  padding: 0 12px;
  color: #47545d;
  background: #f8f9fa;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.mode-tabs button.active,
.category-row button.active,
.table-tabs button.active {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.products {
  margin-top: 24px;
}

.products-heading {
  justify-content: space-between;
}

.products-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.products-heading b {
  color: var(--muted);
  font-size: 9px;
}

.search-row input {
  min-height: 44px;
  border-left: 4px solid var(--blue);
}

.category-row {
  margin: 8px 0 10px;
}

.product-list {
  display: grid;
  gap: 7px;
}

.product-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 120px 106px;
  min-height: 118px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  background: #fff;
}

.product-row.selected {
  border-left-color: var(--blue);
  background: #fbfdfe;
}

.product-image {
  display: grid;
  height: 100%;
  place-items: center;
  border-right: 1px solid #e1e6e9;
  background: #fafbfb;
}

.product-image img {
  width: 94px;
  height: 92px;
  object-fit: contain;
}

.product-image span {
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 900;
}

.product-main {
  min-width: 0;
  padding: 14px 16px;
}

.product-main small {
  color: var(--blue-dark);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-main h3 {
  margin: 5px 0;
  font-size: 15px;
}

.product-main p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-price {
  display: grid;
  gap: 5px;
  padding: 12px;
  text-align: right;
}

.product-price strong {
  font-size: 12px;
}

.product-price span {
  color: var(--muted);
  font-size: 9px;
}

.quantity {
  display: grid;
  grid-template-columns: 33px 35px 33px;
  margin-right: 12px;
  border: 1px solid #aebbc3;
}

.quantity button {
  width: 33px;
  height: 38px;
  border: 0;
  border-radius: 0;
  color: var(--blue-dark);
  background: #edf5f8;
  font-size: 17px;
  font-weight: 900;
}

.quantity input {
  width: 35px;
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  border-right: 1px solid #d4dde2;
  border-left: 1px solid #d4dde2;
  border-radius: 0;
  background: #fff;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  appearance: textfield;
}

.quantity input::-webkit-inner-spin-button,
.quantity input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.quote-meta {
  display: grid;
  gap: 3px;
  text-align: right;
}

.quote-meta span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.quote {
  position: sticky;
  top: 83px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  border: 1px solid #aeb9c0;
  border-top: 4px solid var(--ink);
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 32, 42, 0.1);
}

.quote-title,
.quote-client,
.quote-lines,
.extra-grid,
.totals,
.payment-box,
.notes,
.actions {
  margin-inline: 16px;
}

.quote-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0 12px;
  border-bottom: 2px solid var(--ink);
}

.quote-title h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.quote-title > b {
  padding: 6px 8px;
  color: #fff;
  background: var(--ink);
  font-size: 8px;
  text-transform: uppercase;
}

.quote-client {
  display: grid;
  gap: 3px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.quote-client strong {
  font-size: 11px;
}

.quote-client span {
  color: var(--muted);
  font-size: 9px;
}

.quote-lines {
  max-height: 210px;
  overflow-y: auto;
}

.quote-lines > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #e6ebee;
}

.quote-lines span {
  display: grid;
  gap: 3px;
}

.quote-lines strong,
.quote-lines b {
  font-size: 9px;
}

.quote-lines small {
  color: var(--muted);
  font-size: 8px;
}

.quote-lines .empty {
  display: grid;
  justify-content: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.extra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.extra-grid input {
  min-height: 36px;
}

.totals {
  display: grid;
  gap: 7px;
  padding: 11px 0;
}

.totals > div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.totals b {
  color: var(--ink);
}

.totals .grand {
  align-items: center;
  margin-top: 2px;
  padding: 11px;
  color: #fff;
  background: var(--ink);
}

.grand b {
  color: #fff;
  font-size: 17px;
}

.payment-box {
  border: 1px solid #b7c6cf;
  padding: 11px;
  background: #f2f7f9;
}

.payment-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 9px;
}

.payment-title span {
  color: var(--muted);
  font-size: 7px;
}

.payment-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

.payment-values span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 7px;
}

.payment-values b {
  color: var(--ink);
  font-size: 10px;
}

.payment-values > strong {
  grid-column: 1 / -1;
  border-top: 1px solid #cad7de;
  padding-top: 8px;
  color: var(--blue-dark);
  font-size: 16px;
}

.notes {
  display: grid;
  gap: 3px;
  padding: 9px 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.35;
}

.actions {
  display: grid;
  gap: 6px;
  padding-bottom: 16px;
}

.actions > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.inline-error,
.form-message {
  margin: 0;
  color: var(--danger);
  font-size: 9px;
  text-align: center;
}

.mobile-summary {
  display: none;
}

.data-panel {
  overflow: hidden;
}

.table-tabs {
  margin-bottom: 9px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

th {
  padding: 11px 13px;
  color: #fff;
  background: var(--ink);
  text-align: left;
  font-size: 8px;
  letter-spacing: 0.04em;
}

td {
  padding: 11px 13px;
  border-bottom: 1px solid #dfe5e8;
  vertical-align: top;
}

td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.history-row {
  cursor: pointer;
}

.history-row:hover,
.history-row:focus {
  outline: 0;
  background: #edf5f8;
}

.empty-page {
  padding: 48px;
  color: var(--muted);
  text-align: center;
}

.two-columns {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
}

.user-create {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.user-create h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.user-list {
  align-self: start;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 160px auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #dfe5e8;
}

.user-row > div {
  display: grid;
  gap: 3px;
}

.user-row span {
  color: var(--muted);
  font-size: 9px;
}

.user-row select {
  min-height: 36px;
}

.text-button {
  min-height: 32px;
  border: 0;
  border-bottom: 2px solid var(--blue);
  color: var(--blue-dark);
  background: transparent;
  font-size: 8px;
  font-weight: 900;
}

.text-button.danger {
  color: var(--danger);
  border-color: var(--danger);
}

/* Aplicação comercial — linguagem visual alinhada à entrada Taigar */
.main {
  background:
    radial-gradient(circle at 100% 0, rgba(11, 143, 198, 0.1), transparent 28rem),
    #f2f5f7;
}

.topbar {
  min-height: 76px;
  border-bottom: 0;
  box-shadow: 0 8px 30px rgba(17, 24, 32, 0.06);
}

.workspace {
  grid-template-columns: minmax(600px, 1fr) 430px;
  gap: 24px;
  padding: 30px;
}

.builder-hero {
  position: relative;
  min-height: 205px;
  align-items: center;
  overflow: hidden;
  border-radius: 20px;
  padding: 34px 38px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 12%, rgba(48, 198, 255, 0.3), transparent 16rem),
    linear-gradient(130deg, #111920 0%, #17303d 67%, #087faa 140%);
  box-shadow: 0 22px 50px rgba(15, 32, 42, 0.2);
}

.builder-hero::after {
  position: absolute;
  right: -90px;
  bottom: -125px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  content: "";
}

.builder-hero > div {
  position: relative;
  z-index: 1;
}

.builder-hero .section-kicker {
  color: #61d2ff;
}

.builder-hero h1 {
  max-width: 670px;
  margin-top: 12px;
  font-size: clamp(32px, 3.2vw, 52px);
}

.builder-hero p {
  max-width: 620px;
  color: #b9c8d0;
  font-size: 15px;
}

.hero-details {
  display: grid;
  min-width: 220px;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.hero-details span,
.hero-details small {
  color: #a8bbc5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-details strong {
  color: #fff;
  font-size: 17px;
}

.panel,
.data-panel,
.product-row,
.quote {
  border-radius: 14px;
}

.customer-panel {
  padding: 24px;
  box-shadow: 0 14px 38px rgba(20, 38, 49, 0.08);
}

.panel-title span {
  border-radius: 9px;
  background: linear-gradient(145deg, var(--blue), #075d7e);
}

.panel-title h2 {
  font-size: 18px;
}

input,
select,
textarea {
  border-radius: 8px;
}

textarea {
  width: 100%;
  border: 1px solid #aebbc3;
  padding: 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  resize: vertical;
}

.mode-tabs {
  gap: 8px;
  margin-top: 18px;
}

.mode-tabs button,
.category-row button,
.table-tabs button {
  min-height: 39px;
  border-radius: 9px;
  padding-inline: 15px;
}

.mode-tabs button.active,
.category-row button.active,
.table-tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 7px 18px rgba(11, 143, 198, 0.22);
}

.search-row input {
  min-height: 50px;
  border-radius: 10px;
  padding-inline: 16px;
  font-size: 13px;
}

.product-list {
  gap: 11px;
}

.product-row {
  min-height: 132px;
  grid-template-columns: 126px minmax(0, 1fr) 132px 112px;
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.product-row:hover {
  border-color: #a8c4d1;
  box-shadow: 0 14px 34px rgba(18, 41, 53, 0.09);
  transform: translateY(-2px);
}

.product-row.selected {
  border-color: var(--blue);
  background: #f7fcfe;
}

.product-main h3 {
  font-size: 17px;
}

.product-main p {
  font-size: 11px;
}

.product-price {
  position: relative;
}

.product-price strong {
  color: #0b6d94;
  font-size: 15px;
}

.product-price .price-was {
  color: #89969d;
  font-size: 9px;
  text-decoration: line-through;
}

.product-discount,
.discount-badge {
  width: max-content;
  border-radius: 999px;
  padding: 4px 7px;
  color: #fff;
  background: #257653;
  font-size: 8px;
}

.product-discount {
  justify-self: end;
}

.quantity {
  overflow: hidden;
  border-radius: 9px;
}

.quote {
  top: 94px;
  border: 0;
  border-top: 5px solid var(--blue);
  box-shadow: 0 24px 60px rgba(17, 32, 42, 0.17);
}

.totals .grand {
  border-radius: 10px;
  background: linear-gradient(120deg, #111820, #163746);
}

.payment-box {
  border-radius: 10px;
  background: linear-gradient(145deg, #edf8fc, #f8fbfc);
}

.button {
  border-radius: 9px;
}

.button.primary {
  background: linear-gradient(120deg, var(--blue), #0879a5);
  box-shadow: 0 8px 18px rgba(11, 143, 198, 0.2);
}

.catalog-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-bottom: 26px;
}

.import-card,
.version-card {
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 15px 40px rgba(18, 41, 53, 0.08);
}

.import-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
}

.admin-card-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), #075d7e);
  font-size: 28px;
  font-weight: 900;
}

.import-card h2,
.version-card strong {
  margin: 7px 0 5px;
  font-size: 20px;
}

.import-card p,
.version-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.import-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 9px;
  margin-top: 16px;
}

.catalog-message {
  margin: 10px 0 0 !important;
  color: var(--success) !important;
  font-weight: 800;
}

.catalog-message.error {
  color: var(--danger) !important;
}

.version-card {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(44, 192, 249, 0.25), transparent 13rem),
    #121b21;
}

.version-card .section-kicker {
  color: #55cfff;
}

.version-card p,
.version-card small {
  color: #9eafb8;
}

.codex-link {
  width: max-content;
  margin-top: 17px;
  color: #63d4ff;
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 14px 0 9px;
}

.table-toolbar div {
  display: grid;
  gap: 3px;
}

.table-toolbar strong {
  font-size: 18px;
}

.table-toolbar span,
.table-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.product-admin-table td {
  vertical-align: middle;
}

.product-admin-table td:first-child strong {
  display: block;
  margin-top: 3px;
}

.description-cell {
  max-width: 370px;
  color: #4f5e66;
  line-height: 1.4;
}

.no-discount {
  white-space: nowrap;
}

.edit-button {
  min-height: 32px;
  border: 1px solid #9dc4d5;
  border-radius: 8px;
  padding: 0 10px;
  color: #07698f;
  background: #edf8fc;
  font-size: 8px;
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 13, 17, 0.7);
  backdrop-filter: blur(5px);
}

.product-editor {
  width: min(720px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  border-radius: 18px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.editor-heading,
.editor-actions,
.discount-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-heading h2 {
  margin: 6px 0 0;
  font-size: 25px;
}

.editor-heading > button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #52616a;
  background: #eef2f4;
  font-size: 24px;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 22px;
}

.editor-grid .wide {
  grid-column: 1 / -1;
}

.discount-preview {
  margin-top: 17px;
  border-radius: 11px;
  padding: 15px;
  background: #edf8f2;
}

.discount-preview span {
  color: #466557;
  font-size: 10px;
  font-weight: 800;
}

.discount-preview strong {
  color: var(--success);
  font-size: 20px;
}

.editor-actions {
  justify-content: flex-end;
  margin-top: 20px;
}

@media (max-width: 1500px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 360px;
    padding: 20px;
  }

  .builder-hero {
    padding: 28px;
  }

  .product-row {
    grid-template-columns: 105px minmax(0, 1fr) 115px 106px;
  }
}

@media (max-width: 800px) {
  .catalog-admin-grid,
  .import-form {
    grid-template-columns: 1fr;
  }

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

  .editor-grid .wide {
    grid-column: auto;
  }
}

.auth-body {
  min-height: 100svh;
  overflow-x: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 20% 18%, rgba(30, 148, 216, 0.2), transparent 28%),
    #05080a;
}

.auth-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(1600px, 100%);
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 14px clamp(24px, 4vw, 68px);
  background: #05080a;
}

.auth-header::after {
  position: absolute;
  right: clamp(24px, 4vw, 68px);
  bottom: 0;
  left: clamp(24px, 4vw, 68px);
  height: 1px;
  background: linear-gradient(90deg, #159ddd 0 18%, rgba(255, 255, 255, 0.12) 18% 100%);
  content: "";
}

.auth-brand {
  display: inline-flex;
  align-items: center;
}

.auth-brand img {
  width: clamp(156px, 15vw, 218px);
  height: 60px;
  object-fit: contain;
}

.auth-header-copy {
  display: grid;
  gap: 4px;
  border-right: 3px solid var(--blue);
  padding-right: 14px;
  text-align: right;
}

.auth-header-copy span {
  color: #62c7ee;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.auth-header-copy strong {
  color: #d8e1e7;
  font-size: 14px;
}

.login-shell {
  display: grid;
  width: min(1600px, 100%);
  min-height: calc(100svh - 86px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.45fr) minmax(480px, 0.9fr);
  background: #fff;
}

.login-intro {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 620px;
  grid-template-rows: 1fr;
  overflow: hidden;
  padding: clamp(48px, 6vw, 94px) clamp(34px, 6vw, 96px) 34px;
  color: #fff;
  background:
    linear-gradient(118deg, #091118 0%, #0a1e2b 48%, #0b71a1 100%);
}

.login-intro::before {
  position: absolute;
  z-index: -1;
  top: -22%;
  right: -9%;
  width: 58%;
  height: 134%;
  transform: skewX(-13deg);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.18), transparent 38%),
    #0d92ce;
  content: "";
}

.login-intro::after {
  position: absolute;
  z-index: -1;
  right: 4%;
  bottom: 15%;
  width: min(42vw, 590px);
  height: min(42vw, 590px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 72px rgba(255, 255, 255, 0.025),
    0 0 0 144px rgba(255, 255, 255, 0.018);
  content: "";
}

.login-copy {
  position: relative;
  z-index: 2;
  max-width: 610px;
}

.login-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a9e6fb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.19em;
}

.login-eyebrow i {
  display: block;
  width: 42px;
  height: 3px;
  background: #67d3fb;
}

.login-copy h1 {
  max-width: 580px;
  margin: 20px 0 22px;
  font-size: clamp(52px, 5.6vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.login-copy > p {
  max-width: 540px;
  margin: 0;
  color: #c6d5de;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.55;
}

.brand-proof {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 15px;
  margin-top: 34px;
  border-left: 4px solid #65d4fb;
  padding: 8px 0 8px 16px;
}

.brand-proof strong {
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.04em;
}

.brand-proof span {
  color: #a7d6e7;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.12em;
}

.login-product {
  position: absolute;
  z-index: 1;
  right: clamp(-70px, -3vw, -28px);
  bottom: 26px;
  width: min(45vw, 650px);
}

.login-product img {
  display: block;
  width: 100%;
  filter: contrast(1.08) saturate(0.92) drop-shadow(0 34px 34px rgba(0, 0, 0, 0.4));
}

.login-product > span {
  position: absolute;
  right: 0;
  bottom: -26px;
  color: rgba(255, 255, 255, 0.16);
  font-size: clamp(30px, 4.4vw, 72px);
  font-weight: 900;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.login-panel {
  display: grid;
  min-width: 0;
  grid-template-rows: 1fr auto;
  color: var(--ink);
  background: #fff;
}

.login-form {
  display: grid;
  align-content: center;
  gap: 18px;
  width: min(100%, 600px);
  margin: 0 auto;
  padding: clamp(42px, 4vw, 68px);
}

.login-form .section-kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
}

.login-form h2 {
  margin: 0;
  font-size: clamp(34px, 2.8vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.login-form-copy {
  max-width: 390px;
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.login-fields {
  display: grid;
  gap: 18px;
}

.login-form label {
  gap: 9px;
  color: #28343c;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.login-form input {
  min-height: 58px;
  border: 1px solid #bac7cf;
  border-radius: 0;
  padding: 0 17px;
  font-size: 15px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-form input::placeholder {
  color: #94a0a8;
}

.login-form input:focus {
  border-color: var(--blue);
  box-shadow: inset 4px 0 var(--blue);
}

.login-submit {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 20px 0 22px;
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: background 150ms ease, transform 150ms ease;
}

.login-submit:hover {
  transform: translateY(-2px);
}

.login-submit b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 19px;
}

.login-form small {
  max-width: 330px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.auth-error,
.auth-success {
  border-left: 4px solid var(--danger);
  padding: 13px 14px;
  color: #732a24;
  background: #f9e7e5;
  font-size: 12px;
  line-height: 1.4;
}

.auth-success {
  color: #1d6344;
  border-color: var(--success);
  background: #e7f4ed;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #dbe2e6;
  padding: 18px clamp(32px, 5vw, 60px);
  color: #71808a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.login-footer a {
  color: var(--blue-dark);
  text-decoration: none;
}

.setup-shell {
  display: grid;
  width: min(1420px, calc(100% - 48px));
  min-height: calc(100svh - 118px);
  margin: 22px auto 32px;
  grid-template-columns: minmax(390px, 0.82fr) minmax(620px, 1.18fr);
  overflow: hidden;
  border: 1px solid #263943;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

.setup-brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(42px, 5vw, 76px);
  color: #fff;
  background:
    radial-gradient(circle at 100% 100%, rgba(47, 189, 245, 0.3), transparent 23rem),
    linear-gradient(145deg, #101920, #0c2a39 60%, #087eaa 145%);
}

.setup-brand::before,
.setup-brand::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
}

.setup-brand::before {
  right: -150px;
  bottom: -120px;
  width: 480px;
  height: 480px;
}

.setup-brand::after {
  right: -75px;
  bottom: -45px;
  width: 330px;
  height: 330px;
}

.setup-copy {
  position: relative;
  z-index: 2;
}

.setup-copy > span {
  color: #63d4ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.setup-copy h1 {
  max-width: 510px;
  margin: 18px 0 20px;
  font-size: clamp(43px, 4vw, 65px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.setup-copy > p {
  max-width: 510px;
  margin: 0;
  color: #b8c8d0;
  font-size: 15px;
  line-height: 1.65;
}

.setup-assurance {
  display: grid;
  width: min(100%, 470px);
  gap: 5px;
  margin-top: 34px;
  border-left: 4px solid #62d2fa;
  padding: 12px 0 12px 17px;
}

.setup-assurance strong {
  font-size: 11px;
  letter-spacing: 0.08em;
}

.setup-assurance span {
  color: #9eb3be;
  font-size: 11px;
}

.setup-product {
  position: absolute;
  right: -68px;
  bottom: 38px;
  z-index: 1;
  width: min(37vw, 590px);
  filter: drop-shadow(0 32px 34px rgba(0, 0, 0, 0.42));
  opacity: 0.82;
}

.setup-form {
  display: grid;
  align-content: center;
  gap: 15px;
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(32px, 4vw, 58px);
}

.setup-form-heading {
  margin-bottom: 3px;
}

.setup-form-heading h2 {
  margin: 7px 0 5px;
  font-size: clamp(27px, 2.4vw, 38px);
  letter-spacing: -0.045em;
}

.setup-form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.setup-step {
  border: 1px solid #d5dfe4;
  border-radius: 13px;
  padding: 17px;
  background: #fbfcfd;
}

.setup-step-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.setup-step-title b {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), #07698f);
  font-size: 10px;
}

.setup-step-title > div,
.setup-step-title > span {
  display: grid;
  gap: 2px;
}

.setup-step-title strong {
  font-size: 10px;
  letter-spacing: 0.08em;
}

.setup-step-title span,
.setup-step-title small {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.setup-form input {
  min-height: 46px;
  border-radius: 8px;
  background: #fff;
}

.span-2 {
  grid-column: 1 / -1;
}

.optional-manager {
  padding: 0;
}

.optional-manager summary {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  cursor: pointer;
  list-style: none;
}

.optional-manager summary::-webkit-details-marker {
  display: none;
}

.optional-manager summary .setup-step-title {
  margin: 0;
}

.optional-manager summary em {
  color: var(--blue-dark);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.optional-manager[open] summary {
  border-bottom: 1px solid #d5dfe4;
}

.optional-manager[open] summary em {
  font-size: 0;
}

.optional-manager[open] summary em::after {
  font-size: 9px;
  content: "FECHAR";
}

.optional-manager > p {
  margin: 15px 17px 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.optional-manager > .form-grid {
  padding: 0 17px 17px;
}

.setup-submit {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px 0 21px;
}

.setup-submit b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 7px;
  font-size: 18px;
}

.setup-help {
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

@media (max-width: 1120px) {
  .login-shell {
    grid-template-columns: minmax(0, 1.2fr) minmax(400px, 0.8fr);
  }

  .login-product {
    width: 52vw;
    opacity: 0.72;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 350px;
    padding: 18px;
  }

  .product-row {
    grid-template-columns: 96px minmax(0, 1fr) 105px;
  }

  .quantity {
    grid-column: 2 / 4;
    justify-self: end;
    margin: 0 12px 10px;
  }
}

@media (max-width: 880px) {
  .auth-header {
    min-height: 84px;
  }

  .login-shell {
    min-height: auto;
    grid-template-columns: 1fr;
    margin: 0 auto;
  }

  .login-intro {
    min-height: 610px;
    padding: 54px 42px 34px;
  }

  .login-copy h1 {
    max-width: 540px;
    font-size: 66px;
  }

  .login-product {
    right: -70px;
    bottom: 86px;
    width: 560px;
    opacity: 0.64;
  }

  .login-panel {
    min-height: 590px;
  }

  .sidebar {
    inset: 65px auto 0 0;
    transform: translateX(-100%);
    transition: transform 160ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    justify-content: space-between;
    padding: 0 14px;
  }

  .topbar > div {
    margin-left: auto;
  }

  .mobile-menu {
    display: block;
    min-height: 34px;
    border: 1px solid var(--ink);
    border-radius: 0;
    color: var(--ink);
    background: #fff;
    font-size: 9px;
    font-weight: 900;
  }

  .workspace {
    display: block;
    padding: 14px;
  }

  .quote {
    position: static;
    max-height: none;
    margin-top: 20px;
  }

  .mobile-summary {
    position: sticky;
    bottom: 0;
    z-index: 18;
    display: grid;
    width: 100%;
    min-height: 58px;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    border: 0;
    border-top: 3px solid var(--blue);
    border-radius: 0;
    padding: 0 14px;
    color: #fff;
    background: var(--ink);
    text-align: left;
  }

  .mobile-summary span,
  .mobile-summary em {
    font-size: 8px;
    font-style: normal;
    font-weight: 900;
  }

  .mobile-summary b {
    font-size: 14px;
  }

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

  .user-row {
    grid-template-columns: 1fr 160px;
  }

  .setup-shell {
    grid-template-columns: 1fr;
    margin: 16px auto;
  }

  .setup-brand {
    min-height: 490px;
    padding: 34px;
  }

  .setup-product {
    width: 560px;
    opacity: 0.62;
  }

  .setup-form {
    padding: 34px;
  }
}

@media (max-width: 620px) {
  .auth-header {
    min-height: 78px;
    padding: 10px 20px;
  }

  .auth-header::after {
    right: 20px;
    left: 20px;
  }

  .auth-brand img {
    width: 148px;
    height: 56px;
  }

  .auth-header-copy {
    display: none;
  }

  .login-intro {
    min-height: auto;
    padding: 42px 24px 24px;
  }

  .login-intro::before {
    top: -32%;
    right: -44%;
    width: 92%;
  }

  .login-intro::after,
  .login-product {
    display: none;
  }

  .login-copy h1 {
    margin-top: 16px;
    font-size: 47px;
  }

  .login-copy > p {
    font-size: 15px;
  }

  .brand-proof {
    margin-top: 26px;
  }

  .login-panel {
    min-height: auto;
  }

  .login-form {
    gap: 16px;
    padding: 48px 24px 42px;
  }

  .login-form h2 {
    font-size: 36px;
  }

  .login-footer {
    padding: 20px 24px;
  }

  .page {
    width: calc(100% - 28px);
    padding-top: 18px;
  }

  .page-heading {
    display: grid;
  }

  .source-box {
    min-width: 0;
  }

  .field-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .product-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .product-price {
    grid-column: 1;
    padding: 8px;
    text-align: center;
  }

  .quantity {
    grid-column: 2;
  }

  .topbar > b {
    display: none;
  }

  .actions > div {
    grid-template-columns: 1fr;
  }

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

  .setup-brand,
  .setup-form {
    padding: 26px;
  }

  .setup-brand {
    min-height: auto;
  }

  .setup-copy h1 {
    font-size: 33px;
  }

  .setup-product {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-submit {
    transition: none;
  }
}
