:root {
  --muted: #765e8e;
  --vermelho: #aa243b;
}

a {
  color: var(--primaria);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--primaria);
  outline-offset: 4px;
}

.marca {
  grid-column: 2;
  font: 400 clamp(1.7rem, 6vw, 4.75rem)/1.15 Georgia, "Times New Roman", serif;
  letter-spacing: -.055em;
}

.marca:hover {
  text-decoration: none;
}

.lateral {
  grid-column: 3;
  justify-self: end;
  margin: 0;
}

.pill {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: .65rem 1rem;
  border: 1px solid var(--borda);
  border-radius: 999px;
  background: var(--branco);
  color: var(--texto);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}

.pill:hover {
  background: var(--fundo-suave);
  border-color: var(--primaria);
  text-decoration: none;
}

main {
  max-width: 1000px;
  margin-inline: auto;
  padding: 1.5rem 1.25rem 4rem;
}

.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: .75rem;
  font-size: .875rem;
  font-weight: 600;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

p {
  margin-top: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 0 0 2rem;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.1rem;
  border: 1px solid var(--borda);
  border-radius: 10px;
  color: var(--texto);
  background: var(--branco);
  text-align: center;
  font-weight: 600;
  cursor: pointer;
}

.button:hover {
  background: var(--fundo-suave);
  border-color: var(--primaria);
  text-decoration: none;
}

.button.primary, .actions .active {
  background: var(--primaria);
  border-color: var(--primaria);
  color: var(--branco);
}

.button.primary:hover {
  background: var(--primaria-escura);
}

.button.danger {
  background: var(--vermelho);
  border-color: var(--vermelho);
  color: var(--branco);
}

.button.danger:hover {
  background: #85192b;
}

.panel {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--borda);
  border-radius: 16px;
}

.form-panel {
  max-width: 720px;
}

.empty {
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--secundaria);
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
}

.empty h2 {
  color: var(--texto);
}

.empty p:last-child {
  margin-bottom: 0;
}

.field {
  margin-bottom: 1.5rem;
}

.field > label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 600;
}

input[type=text] {
  width: 100%;
  min-height: 48px;
  padding: .75rem .9rem;
  border: 1px solid var(--secundaria);
  border-radius: 8px;
  color: var(--texto);
  background: var(--branco);
}

input[type=file] {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 1rem;
  border: 1px dashed var(--secundaria);
  border-radius: 10px;
  background: var(--fundo-suave);
}

input::file-selector-button {
  margin-right: .75rem;
  padding: .5rem .7rem;
  border: 1px solid var(--borda);
  border-radius: 6px;
  background: var(--branco);
  color: var(--primaria);
  font: inherit;
  cursor: pointer;
}

.help {
  margin: .5rem 0 0;
  color: var(--muted);
  font-size: .875rem;
}

.notice {
  padding: 1rem 1.25rem;
  border: 1px solid var(--borda);
  border-radius: 10px;
  overflow-wrap: anywhere;
}

.success {
  background: var(--fundo-suave);
  color: var(--primaria-escura);
}

.error {
  background: #fff0f2;
  border-color: #f1b6c0;
  color: #921d31;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--borda);
  border-radius: 14px;
  overflow: hidden;
}

.rows li + li {
  border-top: 1px solid var(--borda);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 84px;
  padding: 1rem 1.25rem;
  color: var(--texto);
}

.row:hover {
  background: var(--fundo-suave);
  text-decoration: none;
}

.row strong {
  display: block;
  overflow-wrap: anywhere;
}

.row small {
  display: block;
  margin-top: .2rem;
  color: var(--muted);
  font-size: .875rem;
}

.row-action {
  flex-shrink: 0;
  color: var(--primaria);
  font-weight: 600;
}

.row-action.danger-text {
  color: var(--vermelho);
}

.row > span:first-child {
  min-width: 0;
}

.form-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.5rem;
}

.artwork-order-panel {
  margin-top: 1.5rem;
}

.artwork-order-panel > h2,
.artwork-order-panel > p {
  margin-top: 0;
}

.artwork-order-status {
  color: var(--muted);
  font-size: .95rem;
}

.artwork-order-list {
  display: grid;
  gap: .7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.artwork-order-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: .9rem;
  padding: .65rem;
  border: 1px solid var(--borda);
  border-radius: 14px;
  background: var(--fundo-suave);
}

.artwork-order-item img {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: var(--branco);
  object-fit: contain;
}

.artwork-order-name {
  min-width: 0;
}

.artwork-order-name strong,
.artwork-order-name small {
  display: block;
  overflow-wrap: anywhere;
}

.artwork-order-name small {
  margin-top: .15rem;
  color: var(--muted);
}

.artwork-order-actions {
  display: flex;
  gap: .5rem;
}

.order-button {
  min-height: 44px;
  padding: .5rem .8rem;
  border: 1px solid var(--secundaria);
  border-radius: 999px;
  background: var(--branco);
  color: var(--texto);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.order-button:hover:not(:disabled) {
  background: var(--lavanda);
}

.order-button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.artwork-order-empty {
  padding: 1rem;
  border-radius: 12px;
  background: var(--fundo-suave);
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.gallery a {
  display: block;
  border: 1px solid var(--borda);
  border-radius: 12px;
  overflow: hidden;
  background: var(--creme);
}

.gallery img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
}

@media (max-width: 620px) {
  .cabecalho-conteudo {
    padding-block: 0.5rem;
  }

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

  .actions .button {
    justify-content: flex-start;
  }

  .row {
    padding: 1rem;
  }

  .row-action {
    font-size: .875rem;
  }

  .artwork-order-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .artwork-order-item img {
    width: 56px;
    height: 56px;
  }

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

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

}

@media (max-width: 350px) {
  .cabecalho-conteudo {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1rem;
  }

  .marca, .lateral {
    grid-column: 1;
  }

}

.resumo-categorias {
  margin: 0;
}

.panel, .rows, .empty {
  background: var(--branco);
}

h1, h2 {
  font-family: var(--fonte-titulo);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.gallery a {
  border-radius: 20px;
}
