/* ============================================================
   DENTALWEB ACAD — Stylesheet Principal
   Paleta: Azul #1E6FBA | Verde #27AE60 | Vermelho #E74C3C
   Fonte: Inter (Google Fonts)
   Mobile First
   ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --azul:         #1E6FBA;
  --azul-escuro:  #154D8A;
  --azul-claro:   #E8F2FB;
  --azul-medio:   #2980B9;
  --verde:        #27AE60;
  --verde-claro:  #E9F7EF;
  --vermelho:     #E74C3C;
  --verm-claro:   #FDEDEC;
  --amarelo:      #F39C12;
  --amarelo-claro:#FEF9E7;
  --texto:        #2C3E50;
  --texto-medio:  #566573;
  --texto-claro:  #95A5A6;
  --fundo:        #F4F6F8;
  --branco:       #FFFFFF;
  --borda:        #D5D8DC;
  --sombra:       0 2px 12px rgba(0,0,0,.08);
  --sombra-forte: 0 4px 24px rgba(0,0,0,.14);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    4px;
  --transicao:    .2s ease;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.hidden { display: none !important; }

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.header {
  background: #043683;
  color: var(--branco);
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--sombra);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 81px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--branco);
}

.logo-icone { font-size: 1.5rem; }
.logo-sub   { font-size: .7rem; font-weight: 400; opacity: .8; display: block; }
.logo-img   { height: 65px; display: block; }

.header-nav a {
  color: var(--branco);
  font-size: .9rem;
  opacity: .85;
  transition: opacity var(--transicao);
}
.header-nav a:hover { opacity: 1; text-decoration: none; }

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
main {
  flex: 1;
  padding: 1.5rem 1rem 6rem; /* espaço para barra sticky */
}

.container {
  max-width: 780px;
  margin: 0 auto;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--branco);
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.card-titulo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--azul-escuro);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--azul-claro);
}

/* ============================================================
   PÁGINA INICIAL — Hero e Seleção
   ============================================================ */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.hero-icone {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--azul-escuro);
  margin-bottom: .5rem;
}

.hero p {
  font-size: 1rem;
  color: var(--texto-medio);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.selecao-card {
  background: var(--branco);
  border-radius: var(--radius);
  box-shadow: var(--sombra-forte);
  padding: 2rem 1.5rem;
  max-width: 480px;
  margin: 0 auto;
}

.selecao-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--texto);
  margin-bottom: 1.25rem;
}

.campo-grupo {
  margin-bottom: 1.25rem;
}

.campo-grupo label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--texto-medio);
  margin-bottom: .4rem;
}

.campo-grupo select,
.campo-grupo input {
  width: 100%;
  padding: .75rem 1rem;
  border: 2px solid var(--borda);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--texto);
  background: var(--branco);
  transition: border-color var(--transicao);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231E6FBA' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.campo-grupo select:focus,
.campo-grupo input:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(30,111,186,.15);
}

.campo-grupo select:disabled {
  background-color: #F0F0F0;
  color: var(--texto-claro);
  cursor: not-allowed;
}

.campo-grupo input[type="text"],
.campo-grupo input[type="email"],
.campo-grupo input[type="tel"],
.campo-grupo input[type="password"] {
  background-image: none;
}

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .875rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transicao);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--azul);
  color: var(--branco);
  width: 100%;
}
.btn-primary:hover:not(:disabled) { background: var(--azul-escuro); transform: translateY(-1px); box-shadow: var(--sombra); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-success {
  background: var(--verde);
  color: var(--branco);
  width: 100%;
}
.btn-success:hover:not(:disabled) { background: #219A52; transform: translateY(-1px); }
.btn-success:disabled { opacity: .55; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--azul);
  color: var(--azul);
}
.btn-outline:hover { background: var(--azul-claro); }

.btn-danger { background: var(--vermelho); color: var(--branco); }
.btn-danger:hover { background: #C0392B; }

.btn-sm {
  padding: .35rem .75rem;
  font-size: .8rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-weight: 500;
}
.btn-editar    { background: var(--azul-claro); color: var(--azul); }
.btn-remover   { background: var(--verm-claro); color: var(--vermelho); }
.btn-ativar    { background: var(--verde-claro); color: var(--verde); }
.btn-desativar { background: var(--verm-claro); color: var(--vermelho); }

/* ============================================================
   TAGS E BADGES
   ============================================================ */
.tag-faculdade,
.tag-semestre {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  margin-right: .4rem;
}
.tag-faculdade { background: var(--azul-claro); color: var(--azul-escuro); }
.tag-semestre  { background: var(--verde-claro); color: var(--verde); }

.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-ativo    { background: var(--verde-claro); color: var(--verde); }
.badge-inativo  { background: #FDFEFE; color: var(--texto-claro); border: 1px solid var(--borda); }
.badge-pendente { background: var(--amarelo-claro); color: var(--amarelo); }

.badge-desconto {
  display: inline-flex;
  align-items: center;
  padding: .15rem .5rem;
  background: var(--verde);
  color: var(--branco);
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 700;
  margin-left: .5rem;
}

/* ============================================================
   PÁGINA DE LISTA DE ITENS
   ============================================================ */
.lista-header {
  margin-bottom: 1rem;
}

.lista-header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--azul-escuro);
  margin-bottom: .4rem;
}

.info-faculdade-tags { margin-bottom: .75rem; }

/* Aviso de desconto de pacote */
.aviso-desconto {
  background: var(--amarelo-claro);
  border: 1px solid #F9E4B2;
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .9rem;
  color: #7D6608;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.aviso-icone { margin-right: .35rem; }

/* Banner de pacote completo */
.banner-pacote {
  background: var(--verde);
  color: var(--branco);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-8px);
  transition: all .3s ease;
  pointer-events: none;
}
.banner-pacote.ativo {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Barra de ações (selecionar tudo) */
.barra-acoes {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}
.barra-acoes button {
  padding: .4rem .9rem;
  font-size: .85rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--borda);
  background: var(--branco);
  color: var(--texto-medio);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transicao);
}
.barra-acoes button:hover { background: var(--azul-claro); border-color: var(--azul); color: var(--azul); }

/* Barra de filtros */
.barra-filtros {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.barra-filtros input[type="search"],
.barra-filtros select {
  padding: .4rem .75rem;
  font-size: .875rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--borda);
  background: var(--branco);
  color: var(--texto-escuro);
  font-family: inherit;
  transition: border-color var(--transicao);
}
.barra-filtros input[type="search"] { flex: 1; min-width: 160px; }
.barra-filtros input[type="search"]:focus,
.barra-filtros select:focus { outline: none; border-color: var(--azul); }

/* ---- Cards de Item ---- */
.item-card {
  display: flex;
  align-items: center;
  gap: .875rem;
  background: var(--branco);
  border: 2px solid var(--borda);
  border-radius: var(--radius);
  padding: .875rem;
  margin-bottom: .75rem;
  cursor: pointer;
  transition: all var(--transicao);
  user-select: none;
}
.item-card:hover { border-color: var(--azul); box-shadow: var(--sombra); }
.item-card.selecionado { border-color: var(--azul); background: var(--azul-claro); }
.item-card.desmarcado  { opacity: .6; }

/* Checkbox customizado */
.item-checkbox-wrap { flex-shrink: 0; }
.item-checkbox { display: none; }
.checkbox-custom {
  width: 28px;
  height: 28px;
  border: 2px solid var(--borda);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--branco);
  transition: all var(--transicao);
  flex-shrink: 0;
}
.item-checkbox:checked + .checkbox-custom {
  background: var(--azul);
  border-color: var(--azul);
}
.item-checkbox:checked + .checkbox-custom::after {
  content: '';
  width: 7px;
  height: 12px;
  border: 2.5px solid var(--branco);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

/* Imagem do item */
.item-imagem { flex-shrink: 0; }
.item-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-xs);
}
.item-img-placeholder {
  width: 56px;
  height: 56px;
  background: var(--fundo);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Info do item */
.item-info { flex: 1; min-width: 0; }
.item-nome-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.item-nome { font-weight: 600; font-size: .95rem; color: var(--texto); }
.item-descricao { font-size: .8rem; color: var(--texto-medio); margin-top: .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variante-wrap { margin-top: .4rem; margin-bottom: .1rem; }
.variante-select {
  width: 100%;
  padding: .35rem .6rem;
  border: 1.5px solid var(--borda);
  border-radius: var(--radius-xs);
  font-size: .82rem;
  font-family: inherit;
  color: var(--texto);
  background: var(--branco);
  cursor: pointer;
  transition: border-color var(--transicao);
}
.variante-select:focus { outline: none; border-color: var(--azul); }
.variante-select:invalid, .variante-select option[value=""] { color: var(--texto-claro); }
.item-qtd-control { display: flex; align-items: center; gap: .4rem; margin-top: .35rem; }
.qtd-btn { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--azul); background: #fff; color: var(--azul); font-size: 1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; }
.qtd-btn:hover { background: var(--azul); color: #fff; }
.qtd-valor { font-weight: 600; font-size: .9rem; min-width: 20px; text-align: center; color: var(--texto); }
.qtd-unidade { font-size: .78rem; color: var(--texto-claro); }

/* Preço do item */
.item-preco-wrap { flex-shrink: 0; text-align: right; }
.item-preco { font-weight: 700; font-size: 1rem; color: var(--azul-escuro); display: block; }
.preco-anterior { font-size: .8rem; color: var(--texto-claro); text-decoration: line-through; display: block; }

/* ============================================================
   BARRA TOTAL STICKY
   ============================================================ */
.barra-total {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--branco);
  border-top: 2px solid var(--borda);
  padding: .75rem 1rem;
  z-index: 50;
  box-shadow: 0 -4px 16px rgba(0,0,0,.1);
}

.barra-total-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.total-info { flex: 1; }
.total-qtd { font-size: .8rem; color: var(--texto-claro); }
.total-valor-site { font-size: .8rem; color: var(--texto-claro); text-decoration: line-through; }
.total-valor-grande { font-size: 1.4rem; font-weight: 700; color: var(--azul-escuro); line-height: 1; }
.economia-linha {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  color: var(--verde);
  font-weight: 600;
  margin-top: .15rem;
}

.promo-linha {
  font-size: .8rem;
  color: var(--amarelo);
  font-weight: 600;
  margin-top: .15rem;
}

.barra-total .btn-primary {
  width: auto;
  padding: .875rem 1.5rem;
  white-space: nowrap;
}

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.entrega-opcoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}

.opcao-entrega {
  position: relative;
}

.opcao-entrega input[type="radio"] { display: none; }

.opcao-entrega-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1rem .75rem;
  border: 2px solid var(--borda);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all var(--transicao);
  font-size: .9rem;
  font-weight: 500;
  color: var(--texto-medio);
}

.opcao-entrega input:checked + .opcao-entrega-label {
  border-color: var(--azul);
  background: var(--azul-claro);
  color: var(--azul);
}

.opcao-entrega-icone { font-size: 1.5rem; }

.info-retirada {
  background: var(--azul-claro);
  border-radius: var(--radius-sm);
  padding: 1rem;
  border-left: 3px solid var(--azul);
}

.info-retirada h3 { font-size: .95rem; margin-bottom: .4rem; color: var(--azul-escuro); }
.info-retirada p  { font-size: .875rem; color: var(--texto-medio); }

.grid-dois { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* Resumo do pedido no checkout */
.resumo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid var(--fundo);
  font-size: .9rem;
}
.resumo-item:last-child { border-bottom: none; }
.resumo-item-nome { color: var(--texto); }
.resumo-item-qtd  { color: var(--texto-claro); font-size: .8rem; margin-left: .3rem; }
.resumo-item-preco { font-weight: 600; color: var(--texto); white-space: nowrap; }

.resumo-total-linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: .75rem;
  margin-top: .5rem;
  border-top: 2px solid var(--borda);
}
.resumo-total-label { font-weight: 700; font-size: 1rem; }
.resumo-total-valor { font-weight: 700; font-size: 1.2rem; color: var(--azul-escuro); }

.resumo-economia-linha {
  display: flex;
  justify-content: space-between;
  padding: .3rem 0;
  font-size: .875rem;
  color: var(--verde);
  font-weight: 600;
}

/* Botão de pagar */
.btn-pagar {
  background: var(--azul-escuro);
  color: var(--branco);
  font-size: 1.05rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: all var(--transicao);
}
.btn-pagar:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.btn-pagar:disabled { opacity: .6; cursor: not-allowed; }

/* ============================================================
   CHECKOUT — SEÇÃO DE PAGAMENTO
   ============================================================ */

.pagamento-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.pag-tab {
  flex: 1;
  padding: .6rem .5rem;
  border: 2px solid var(--borda);
  border-radius: var(--radius-sm);
  background: var(--branco);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  color: var(--texto-medio);
  transition: all var(--transicao);
  font-family: inherit;
}

.pag-tab:hover { border-color: var(--azul); color: var(--azul); }

.pag-tab.ativo {
  border-color: var(--azul);
  background: var(--azul-claro);
  color: var(--azul);
  font-weight: 600;
}

.pag-painel { animation: fadeIn .2s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }


/* ============================================================
   GATE DE AUTENTICAÇÃO (checkout)
   ============================================================ */
.gate-auth {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.gate-auth__card {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.gate-auth__icon { font-size: 2.5rem; margin-bottom: .75rem; }
.gate-auth__titulo { font-size: 1.2rem; font-weight: 700; color: var(--azul-escuro); margin-bottom: .4rem; }
.gate-auth__desc { font-size: .9rem; color: var(--texto-claro); margin-bottom: 1.5rem; }

.gate-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
  background: var(--fundo);
  border-radius: var(--radius-sm);
  padding: .25rem;
}

.gate-tab {
  flex: 1;
  padding: .55rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--texto-claro);
  transition: all var(--transicao);
}

.gate-tab.ativo {
  background: var(--branco);
  color: var(--azul);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.gate-form { text-align: left; }
.gate-form .campo-grupo { margin-bottom: .9rem; }

/* Barra do usuário logado */
.barra-usuario {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--azul-claro);
  border: 1px solid #bdd6f0;
  border-radius: var(--radius-sm);
  padding: .6rem 1rem;
  margin-bottom: 1rem;
  font-size: .875rem;
  color: var(--azul-escuro);
}

.barra-usuario__sair {
  background: none;
  border: 1px solid var(--azul);
  color: var(--azul);
  border-radius: var(--radius-xs);
  padding: .25rem .7rem;
  font-size: .8rem;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transicao);
}
.barra-usuario__sair:hover { background: var(--azul); color: var(--branco); }

/* ============================================================
   PÁGINA OBRIGADO
   ============================================================ */
.obrigado-centro {
  text-align: center;
  padding: 3rem 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.status-aprovado  { background: var(--verde-claro); color: var(--verde); }
.status-pendente  { background: var(--amarelo-claro); color: var(--amarelo); }
.status-rejeitado { background: var(--verm-claro); color: var(--vermelho); }

.obrigado-titulo { font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; }
.obrigado-desc   { color: var(--texto-medio); margin-bottom: 2rem; }

.pedido-id-wrap {
  background: var(--fundo);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: .85rem;
}
.pedido-id-wrap strong { display: block; font-size: 1rem; color: var(--texto); word-break: break-all; }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-login {
  max-width: 400px;
  margin: 4rem auto;
}

.abas {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--borda);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.aba-btn {
  padding: .75rem 1.25rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--texto-medio);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--transicao);
}
.aba-btn:hover { color: var(--azul); }
.aba-btn.ativa { color: var(--azul); border-bottom-color: var(--azul); font-weight: 600; }

/* Tabelas admin */
.tabela-admin {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.tabela-admin th {
  text-align: left;
  padding: .6rem .75rem;
  background: var(--fundo);
  color: var(--texto-medio);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.tabela-admin td {
  padding: .7rem .75rem;
  border-bottom: 1px solid var(--fundo);
  color: var(--texto);
}
.tabela-admin tr:hover td { background: var(--fundo); }
.pedido-row:hover td { background: var(--azul-claro) !important; }
.pedido-row[data-aberto="true"] td { background: var(--azul-claro); }
.pedido-detalhe td { padding: 0 !important; }
.pedido-detalhe.hidden { display: none; }
.linha-inativa td { color: var(--texto-claro); }

/* Modal admin */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: var(--branco);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: var(--sombra-forte);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--texto); }
.modal-fechar {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--texto-claro);
  line-height: 1;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 80px;
  right: 1rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--texto);
  color: var(--branco);
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--sombra-forte);
  max-width: 340px;
  font-size: .875rem;
  transform: translateX(120%);
  transition: transform .3s ease;
}
.toast.visivel { transform: translateX(0); }
.toast-sucesso { background: var(--verde); }
.toast-erro    { background: var(--vermelho); }
.toast-aviso   { background: var(--amarelo); color: var(--texto); }
.toast-info    { background: var(--azul); }
.toast-msg     { flex: 1; }
.toast-fechar  { background: none; border: none; color: inherit; font-size: 1.1rem; cursor: pointer; opacity: .7; padding: 0; }

/* ============================================================
   SPINNER / LOADING
   ============================================================ */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
}

.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: var(--branco);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.spinner-azul {
  border-color: rgba(30,111,186,.2);
  border-top-color: var(--azul);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   STEPS / PROGRESSO
   ============================================================ */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
  padding: 0 .5rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  flex: 1;
  position: relative;
}

.step::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--borda);
}

.step:last-child::after { display: none; }
.step.ativo::after, .step.concluido::after { background: var(--azul); }

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--borda);
  color: var(--branco);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.step.ativo    .step-num { background: var(--azul); }
.step.concluido .step-num { background: var(--verde); }
.step-label { font-size: .7rem; color: var(--texto-claro); text-align: center; }
.step.ativo .step-label { color: var(--azul); font-weight: 600; }

/* ============================================================
   DROP-ZONE DE IMPORTAÇÃO
   ============================================================ */
.drop-zone {
  border: 2.5px dashed var(--borda);
  border-radius: var(--radius);
  background: var(--branco);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all var(--transicao);
  cursor: pointer;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--azul);
  background: var(--azul-claro);
}
.drop-zone__icone   { font-size: 2.5rem; margin-bottom: .5rem; }
.drop-zone__texto   { font-size: 1rem; font-weight: 500; margin-bottom: .25rem; }
.drop-zone__sub     { font-size: .85rem; color: var(--texto-claro); margin: .4rem 0; }
.drop-zone__info    {
  font-size: .8rem; color: var(--verde); font-weight: 600;
  margin-top: .75rem; min-height: 1.2em;
}

/* Badge de status nas linhas do preview */
.linha-ok   td:first-child { border-left: 3px solid var(--verde); }
.linha-erro td:first-child { border-left: 3px solid var(--vermelho); }

/* Célula de status na preview */
.cell-ok   { color: var(--verde); font-weight: 600; font-size: .8rem; }
.cell-erro { color: var(--vermelho); font-size: .8rem; }
.cell-aviso { color: var(--amarelo); font-size: .8rem; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--azul-escuro);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 1.25rem;
  font-size: .8rem;
}

footer a { color: rgba(255,255,255,.9); }

/* Link discreto de representante de turma no header */
.link-representante {
  color: #fff;
  opacity: .75;
  font-size: .82rem;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .2s ease;
}
.link-representante:hover { opacity: 1; }

/* ============================================================
   RESPONSIVO — Tablet e Desktop
   ============================================================ */
@media (min-width: 600px) {
  .hero h1 { font-size: 2.25rem; }
  .checkout-grid { grid-template-columns: 1fr 1.3fr; }
  .checkout-grid .resumo-col { order: 2; }
  .checkout-grid .form-col   { order: 1; }

  #toast-container { bottom: 1.5rem; }
}

@media (min-width: 768px) {
  main { padding: 2rem 1.5rem 6rem; }

  .item-card { padding: 1rem 1.25rem; }
  .item-img  { width: 68px; height: 68px; }
  .item-img-placeholder { width: 68px; height: 68px; }
}


/* ============================================================
   MODAL DE VINCULAÇÃO — dropdown de busca de produto
   ============================================================ */

.vincular-dropdown {
  position: absolute;
  z-index: 300;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--radius-sm);
  box-shadow: var(--sombra-forte);
  max-height: 220px;
  overflow-y: auto;
  width: 100%;
  left: 0;
  top: calc(100% + 2px);
}

.vincular-opcao {
  padding: .45rem .75rem;
  font-size: .82rem;
  cursor: pointer;
  color: var(--texto);
  line-height: 1.35;
}

.vincular-opcao:hover { background: var(--azul-claro); color: var(--azul-escuro); }

.vincular-opcao-ignorar {
  color: var(--texto-claro);
  border-top: 1px solid var(--borda);
  font-style: italic;
}

/* ============================================================
   SLOTS DE MARCA NA EDIÇÃO DE LISTAS (admin)
   ============================================================ */
.btn-modo-lista {
  padding: .35rem .85rem;
  font-size: .82rem;
  font-weight: 500;
  border: 2px solid var(--borda);
  border-radius: var(--radius-sm);
  background: var(--branco);
  cursor: pointer;
  color: var(--texto-medio);
  transition: all .15s;
}
.btn-modo-lista:hover { border-color: var(--azul); color: var(--azul); }
.btn-modo-lista.ativo { border-color: var(--azul); background: var(--azul-claro); color: var(--azul); font-weight: 600; }

.slots-marca-wrap { margin-top: .35rem; }
.slots-marca { display: flex; gap: .35rem; flex-wrap: wrap; }

.slot-marca-btn {
  padding: .28rem .5rem;
  font-size: .7rem;
  border: 1px solid var(--borda);
  border-radius: var(--radius-xs);
  background: var(--fundo);
  cursor: pointer;
  text-align: center;
  min-width: 85px;
  line-height: 1.4;
  transition: border-color .15s, background .15s;
  color: var(--texto-medio);
}
.slot-marca-btn:hover { border-color: var(--azul); background: var(--azul-claro); }
.slot-marca-btn.slot-com-equiv { border-color: #7c3aed; background: #f0e6ff; color: #5b21b6; }
.slot-marca-produto { display: block; font-weight: 400; color: inherit; opacity: .8; }

.slot-resultado-item {
  padding: .5rem .75rem;
  font-size: .85rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--texto);
  transition: background .12s;
}
.slot-resultado-item:hover { background: var(--azul-claro); }

/* ============================================================
   SELETOR GLOBAL E INDIVIDUAL DE MARCAS ALTERNATIVAS
   ============================================================ */

/* ---- Seletor Global (Topo) ---- */
.seletor-marca-global-card {
  border-left: 4px solid var(--azul);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.seletor-marca-global-titulo {
  font-size: .88rem;
  font-weight: 600;
  color: var(--texto-medio);
  margin-bottom: .75rem;
}
.seletor-marca-global-botoes {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.btn-marca-global {
  flex: 1;
  min-width: 140px;
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--borda);
  background: var(--branco);
  color: var(--texto-medio);
  font-family: inherit;
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: all var(--transicao);
}
.btn-marca-global:hover {
  border-color: var(--azul);
  background: var(--azul-claro);
  color: var(--azul);
}
.btn-marca-global.ativo {
  border-color: var(--azul);
  background: var(--azul-claro);
  color: var(--azul-escuro);
  box-shadow: 0 2px 8px rgba(30,111,186,.15);
}

/* ---- Seletor Individual (Cards) ---- */
.seletor-marcas-item {
  display: flex;
  gap: .4rem;
  margin-top: .65rem;
  flex-wrap: wrap;
}
.btn-marca-opcao {
  padding: .35rem .6rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--borda);
  background: var(--fundo);
  color: var(--texto-medio);
  font-family: inherit;
  font-size: .75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all var(--transicao);
  text-align: left;
}
.btn-marca-opcao:hover {
  border-color: var(--azul);
  background: var(--branco);
}
.btn-marca-opcao.ativo {
  background: var(--branco);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.btn-marca-opcao.ativo.class-luxo { border-color: #D4AC0D; background: #FEF9E7; color: #7D6608; }
.btn-marca-opcao.ativo.class-standard { border-color: var(--azul); background: var(--azul-claro); color: var(--azul-escuro); }
.btn-marca-opcao.ativo.class-custo_beneficio { border-color: var(--verde); background: var(--verde-claro); color: #196F3D; }

.btn-marca-categoria {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: .8;
  line-height: 1;
  margin-bottom: 2px;
}
.btn-marca-nome {
  font-weight: 600;
  line-height: 1.1;
}

