/**
 * Área logada — Meus dados / Minhas compras (Roda FG).
 */
body.pagina-perfil {
  background: #f0f4f6;
}

.pagina-perfil .galeria-toolbar-container {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .pagina-perfil .galeria-toolbar-container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.perfil-main {
  padding-top: calc(var(--header-height, 72px) + 24px);
  padding-bottom: 56px;
  min-height: 55vh;
}

.perfil-greeting {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1.25rem;
  text-align: center;
}

.perfil-greeting span {
  color: var(--accent-color, #00a5b5);
}

/* Abas no mesmo estilo do login (segmento único, fundo branco, borda suave) */
.perfil-tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.perfil-tabs-segmented {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  box-sizing: border-box;
}

.perfil-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  text-align: center;
  color: #5e6872;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.perfil-tab:hover {
  color: #374151;
}

.perfil-tab.is-active {
  background: #08a5b6;
  color: #fff;
}

.perfil-tab.is-active:hover {
  color: #fff;
  filter: brightness(1.04);
}

.perfil-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.perfil-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
  margin: 0 0 1rem;
}

.perfil-section-title + .perfil-section-title {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f3f4f6;
}

.perfil-card .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 0.35rem;
}

.perfil-card .form-control {
  border-radius: 10px;
  border-color: #d1d5db;
  font-size: 0.875rem;
}

.perfil-card .form-control:focus {
  border-color: var(--accent-color, #00a5b5);
  box-shadow: 0 0 0 0.15rem rgba(0, 165, 181, 0.15);
}

.perfil-card .form-control:disabled {
  background: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

.perfil-feedback {
  font-size: 0.875rem;
  min-height: 1.25rem;
  margin-bottom: 0.75rem;
}

.perfil-feedback.is-error {
  color: #b91c1c;
}

.perfil-feedback.is-success {
  color: #047857;
}

.btn-perfil-salvar {
  display: block;
  width: 100%;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.5rem;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  background: var(--accent-color, #00a5b5);
  color: #fff;
}

.btn-perfil-salvar:hover:not(:disabled) {
  filter: brightness(1.06);
  color: #fff;
}

.btn-perfil-salvar:disabled {
  opacity: 0.65;
}

/* Minhas compras — lista de pedidos (cards) + modal */
.perfil-pedidos-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1rem;
  text-align: center;
}

.perfil-pedidos-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.perfil-pedido-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  max-width: 720px;
}

.perfil-pedido-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
}

.perfil-pedido-card__id {
  font-weight: 700;
  font-size: 0.95rem;
  color: #374151;
}

.perfil-pedido-card__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.perfil-pedido-card__link:hover {
  color: var(--accent-color, #00a5b5);
  text-decoration: underline;
}

.perfil-pedido-card__thumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.perfil-pedido-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.perfil-pedido-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.perfil-pedido-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #9ca3af;
  text-align: center;
  padding: 4px;
}

/* Modal detalhes */
.modal-pedido-detalhe .modal-content {
  border-radius: 14px;
  border: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.modal-pedido-detalhe .modal-header {
  border-bottom: 1px solid #f3f4f6;
  padding: 1rem 1.25rem;
}

.modal-pedido-detalhe .modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
}

.modal-pedido-detalhe .modal-body {
  padding: 1.25rem;
}

dl.pedido-detalhe-meta {
  margin: 0;
}

.pedido-detalhe-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 1.25rem;
}

@media (max-width: 576px) {
  .pedido-detalhe-meta {
    grid-template-columns: 1fr;
  }
}

.pedido-detalhe-meta__item dt {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.pedido-detalhe-meta__item dd {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.pedido-detalhe-fotos {
  border: 2px solid rgba(0, 165, 181, 0.35);
  border-radius: 12px;
  padding: 14px 14px 16px;
  background: rgba(0, 165, 181, 0.04);
}

.pedido-detalhe-fotos__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f766e;
  margin: 0 0 12px;
}

.pedido-detalhe-fotos__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pedido-detalhe-foto {
  width: 100px;
  text-align: center;
}

.pedido-detalhe-foto__img {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  margin-bottom: 6px;
}

.pedido-detalhe-foto__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pedido-detalhe-foto__code {
  font-size: 0.7rem;
  font-weight: 600;
  color: #4b5563;
  word-break: break-all;
  line-height: 1.25;
}

.modal-pedido-detalhe .modal-footer {
  border-top: 1px solid #f3f4f6;
  padding: 0.75rem 1.25rem;
}

.btn-pedido-fechar {
  border-radius: 10px;
  padding: 8px 20px;
  font-weight: 600;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #6b7280;
}

.btn-pedido-fechar:hover {
  background: #f9fafb;
  color: #374151;
}

.perfil-loading {
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
}

.perfil-orders-empty {
  background: #fff;
  border-radius: 12px;
  border: 1px dashed #d1d5db;
  padding: 2rem 1.5rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}
