/* ══════════════════════════════════════
   ÁREA DO CLIENTE — BellaShop
   Depende de ../assets/css/variables.css
══════════════════════════════════════ */

/* ─── TOPBAR ─── */
.topbar {
  background: var(--admin);
  padding: 0 0;
  height: 56px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.topbar-brand {
  font-family: var(--font);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff !important;
  text-decoration: none;
}
.topbar-brand span { color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-greeting { font-size: .85rem; color: rgba(255,255,255,.65); }
.topbar-link {
  font-size: .82rem; font-weight: 600;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: color .15s;
}
.topbar-link:hover { color: #fff; }
.topbar-logout:hover { color: #ff8080; }

/* ─── LAYOUT PRINCIPAL ─── */
.cliente-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
  min-height: calc(100vh - 56px - 52px);
}
@media (max-width: 768px) {
  .cliente-layout { grid-template-columns: 1fr; }
}

/* ─── SIDEBAR ─── */
.cliente-sidebar {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: calc(56px + 16px);
}
.sidebar-avatar {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #FFF0F6, #fff);
}
.avatar-circle {
  width: 44px; height: 44px; min-width: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-family: var(--font); font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.avatar-name { font-weight: 700; font-size: .88rem; color: var(--text); line-height: 1.3; }
.avatar-email { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

.sidebar-nav { padding: 10px 10px 14px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: .87rem; font-weight: 600;
  color: var(--text); text-decoration: none;
  transition: all .15s; margin-bottom: 2px;
}
.nav-item i { width: 18px; text-align: center; font-size: .9rem; color: var(--muted); transition: color .15s; }
.nav-item:hover { background: rgba(194,0,111,.07); color: var(--brand); }
.nav-item:hover i { color: var(--brand); }
.nav-item.active { background: rgba(194,0,111,.1); color: var(--brand); }
.nav-item.active i { color: var(--brand); }
.nav-item-danger:hover { background: rgba(239,68,68,.07); color: var(--danger); }
.nav-item-danger:hover i { color: var(--danger); }
.sidebar-divider { border-color: var(--border); margin: 8px 4px; }

/* ─── MAIN CONTENT ─── */
.cliente-main { min-width: 0; }

/* ─── PAGE HEADER ─── */
.page-header { margin-bottom: 24px; }
.page-header h1 {
  font-family: var(--font); font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--text); margin-bottom: 4px;
}
.page-header p { color: var(--muted); font-size: .9rem; }
.page-header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ─── CARDS ─── */
.card-bella {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.card-bella + .card-bella { margin-top: 16px; }

/* ─── STAT CARDS (dashboard) ─── */
.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  transition: box-shadow .18s;
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon {
  width: 48px; height: 48px; min-width: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.stat-icon.pink   { background: rgba(194,0,111,.1); color: var(--brand); }
.stat-icon.green  { background: rgba(34,197,94,.1);  color: var(--success); }
.stat-icon.purple { background: rgba(139,26,107,.1); color: var(--reseller); }
.stat-icon.gold   { background: rgba(201,131,58,.12); color: #C9833A; }
.stat-num { font-family: var(--font); font-weight: 800; font-size: 1.6rem; color: var(--text); line-height: 1; }
.stat-lbl { font-size: .78rem; color: var(--muted); margin-top: 3px; }

/* ─── STATUS BADGES ─── */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 20px;
  font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.status-badge.warning  { background: rgba(234,179,8,.12);  color: #a16207; border: 1px solid rgba(234,179,8,.3); }
.status-badge.info     { background: rgba(59,130,246,.1);  color: #1d4ed8; border: 1px solid rgba(59,130,246,.25); }
.status-badge.primary  { background: rgba(194,0,111,.1);   color: var(--brand); border: 1px solid rgba(194,0,111,.2); }
.status-badge.success  { background: rgba(34,197,94,.1);   color: #15803d; border: 1px solid rgba(34,197,94,.25); }
.status-badge.danger   { background: rgba(239,68,68,.1);   color: #dc2626; border: 1px solid rgba(239,68,68,.2); }
.status-badge.secondary{ background: rgba(0,0,0,.06);      color: var(--muted); border: 1px solid var(--border); }

/* ─── PEDIDOS LIST ─── */
.pedido-row {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  transition: all .2s; text-decoration: none; color: inherit;
  margin-bottom: 12px;
}
.pedido-row:hover { border-color: rgba(194,0,111,.3); box-shadow: var(--shadow); transform: translateX(3px); color: inherit; }
.pedido-emojis { display: flex; gap: 4px; flex-shrink: 0; }
.pedido-emoji-item {
  width: 42px; height: 42px;
  background: linear-gradient(135deg,#FFF0F6,#FFE0EF);
  border-radius: 10px; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
}
.pedido-info { flex: 1; min-width: 0; }
.pedido-num { font-family: var(--font); font-weight: 700; font-size: .95rem; margin-bottom: 3px; }
.pedido-meta { font-size: .78rem; color: var(--muted); }
.pedido-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.pedido-total { font-family: var(--font); font-weight: 800; font-size: 1rem; color: var(--text); }

/* ─── PEDIDO DETAIL ─── */
.pedido-item-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.pedido-item-row:last-child { border-bottom: none; }
.item-emoji {
  width: 52px; height: 52px; min-width: 52px;
  background: linear-gradient(135deg,#FFF0F6,#FFE0EF);
  border-radius: 10px; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}
.item-name { font-weight: 600; font-size: .9rem; margin-bottom: 3px; }
.item-qty  { font-size: .8rem; color: var(--muted); }
.item-price { font-family: var(--font); font-weight: 700; font-size: .95rem; margin-left: auto; flex-shrink: 0; }

.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: .88rem; }
.summary-row.total { border-top: 1.5px solid var(--border); padding-top: 12px; margin-top: 4px; }
.summary-row.total span { font-family: var(--font); font-weight: 700; font-size: 1rem; }
.summary-row.total strong { font-family: var(--font); font-weight: 800; font-size: 1.15rem; color: var(--brand); }

.rastreio-box {
  background: rgba(34,197,94,.07);
  border: 1.5px solid rgba(34,197,94,.2);
  border-radius: 10px; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px; font-size: .88rem;
}
.rastreio-box i { color: var(--success); font-size: 1.1rem; }
.rastreio-code { font-family: monospace; font-weight: 700; font-size: .95rem; color: var(--text); }

/* ─── FORMULÁRIOS ─── */
.form-section { margin-bottom: 28px; }
.form-section-title {
  font-family: var(--font); font-weight: 700; font-size: .95rem;
  color: var(--text); margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.form-section-title i { color: var(--brand); }

.form-label { font-size: .82rem; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 10px; height: 44px;
  font-family: var(--font-body); font-size: .9rem;
  padding: 0 14px; transition: border-color .18s; color: var(--text);
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(194,0,111,.1);
  outline: none;
}
textarea.form-control { height: auto; padding: 12px 14px; }

/* ─── BUTTONS ─── */
.btn-brand {
  height: 44px; padding: 0 24px;
  background: var(--brand); color: #fff;
  border: none; border-radius: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: .9rem;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-brand:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(194,0,111,.3); }
.btn-brand:active { transform: none; }

.btn-outline-brand {
  height: 44px; padding: 0 20px;
  background: none; color: var(--brand);
  border: 1.5px solid var(--brand); border-radius: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: .88rem;
  cursor: pointer; transition: all .18s;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-outline-brand:hover { background: rgba(194,0,111,.07); color: var(--brand); }

.btn-ghost {
  height: 38px; padding: 0 16px;
  background: none; color: var(--muted);
  border: 1.5px solid var(--border); border-radius: 9px;
  font-family: var(--font-body); font-size: .84rem;
  cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-danger-ghost {
  height: 38px; padding: 0 16px;
  background: none; color: var(--muted);
  border: 1.5px solid var(--border); border-radius: 9px;
  font-size: .84rem; cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none;
}
.btn-danger-ghost:hover { border-color: var(--danger); color: var(--danger); }

.btn-pagar {
  height: 42px; padding: 0 20px;
  background: #15803d; color: #fff;
  border: none; border-radius: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: .88rem;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-pagar:hover { background: #166534; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(21,128,61,.3); }

/* ─── ALERT FLASH ─── */
.flash {
  padding: 12px 18px; border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
  font-size: .88rem; margin-bottom: 20px;
  animation: fadeSlide .3s ease;
}
@keyframes fadeSlide { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.flash.success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.25); color: #15803d; }
.flash.error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.2);  color: #dc2626; }
.flash.warning { background: rgba(234,179,8,.1);  border: 1px solid rgba(234,179,8,.25); color: #a16207; }
.flash i { font-size: 1rem; }

/* ─── EMPTY STATE ─── */
.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state i { font-size: 3rem; opacity: .2; margin-bottom: 16px; display: block; color: var(--brand); }
.empty-state h5 { font-family: var(--font); font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }
.empty-state p  { font-size: .88rem; max-width: 300px; margin: 0 auto 20px; }

/* ─── ENDEREÇO CARD ─── */
.endereco-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative; transition: all .18s;
}
.endereco-card:hover { border-color: rgba(194,0,111,.25); box-shadow: var(--shadow-sm); }
.endereco-card.principal { border-color: var(--brand); }
.endereco-badge-principal {
  position: absolute; top: 12px; right: 12px;
  background: rgba(194,0,111,.1); border: 1px solid rgba(194,0,111,.2);
  color: var(--brand); border-radius: 20px;
  padding: 2px 10px; font-size: .72rem; font-weight: 700;
}
.endereco-apelido { font-family: var(--font); font-weight: 700; font-size: 1rem; margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.endereco-apelido i { color: var(--brand); font-size: .85rem; }
.endereco-linha { font-size: .87rem; color: var(--muted); line-height: 1.65; }
.endereco-acoes { display: flex; gap: 8px; margin-top: 14px; }

/* ─── MODAL ENDEREÇO ─── */
.modal-content { border: none; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--border); padding: 18px 22px 14px; background: linear-gradient(135deg,#FFF0F6,#fff); }
.modal-title { font-family: var(--font); font-weight: 700; }
.modal-body { padding: 22px; }
.modal-footer { border-top: 1px solid var(--border); padding: 14px 22px; }

/* ─── RODAPÉ ─── */
.cliente-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 0;
  font-size: .82rem; color: var(--muted);
  margin-top: 40px;
}
.cliente-footer a { color: var(--muted); text-decoration: none; transition: color .15s; }
.cliente-footer a:hover { color: var(--brand); }

/* ─── RESPONSIVO ─── */
@media (max-width: 768px) {
  .cliente-sidebar { position: static; }
  .pedido-row { flex-wrap: wrap; }
  .pedido-right { align-items: flex-start; }
}
