/* ============================================================
   CESILA — Estilos globais
   Importar em todas as páginas:
   <link rel="stylesheet" href="/style.css">
   ============================================================ */

/* VARIÁVEIS */
:root {
  --indigo:      #1B1F4B;
  --indigo-mid:  #2D3278;
  --indigo-soft: #4A50A8;
  --laranja:     #F05C2A;
  --laranja-lt:  #FF7A4A;
  --creme:       #F7F7FB;
  --branco:      #FFFFFF;
  --cinza-bd:    #E2E3F0;
  --cinza-txt:   #6B6E8A;
  --verde:       #1DB86A;
  --vermelho:    #E03B3B;
  --amarelo:     #F0A500;
  --texto:       #16183A;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: var(--creme);
  color: var(--texto);
}

/* ── HEADER ── */
header {
  background: var(--indigo);
  height: 100px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.logo-img {
  height: 100px;
  object-fit: contain;
  display: block;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── BOTÕES DO HEADER ── */
.btn-h {
  background: none;
  border: 1.5px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.8);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all .15s;
}
.btn-h:hover { border-color: white; color: white; }
.btn-h.primary {
  background: var(--laranja);
  border-color: var(--laranja);
  color: white;
  font-weight: 700;
}
.btn-h.primary:hover { background: var(--laranja-lt); }
.btn-h.ghost {
  background: none;
  border-color: rgba(255,255,255,.25);
  color: rgba(255,255,255,.8);
  font-weight: normal;
}

/* ── AVATAR USUÁRIO ── */
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  cursor: pointer;
}
.user-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--laranja);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: white;
  overflow: hidden;
}
.user-av img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 13px; color: white; font-weight: 600; }

/* ── MODAL ── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(22,24,58,.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.overlay.show { display: flex; }
.modal {
  background: white;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
}
.modal-head {
  background: var(--indigo);
  padding: 26px 28px 22px;
  border-radius: 16px 16px 0 0;
  color: white;
  position: relative;
}
.modal-head h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.modal-head p  { font-size: 13px; opacity: .65; }
.modal-close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: none;
  color: white; font-size: 22px; cursor: pointer; opacity: .7;
}
.modal-close:hover { opacity: 1; }
.modal-body {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ── FORMULÁRIOS ── */
.fg { display: flex; flex-direction: column; gap: 6px; }
.fg label {
  font-size: 12px;
  font-weight: 700;
  color: var(--cinza-txt);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.fg input,
.fg select,
.fg textarea {
  padding: 11px 13px;
  border: 1.5px solid var(--cinza-bd);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--texto);
  background: var(--creme);
  transition: border-color .15s;
}
.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  outline: none;
  border-color: var(--indigo-soft);
  background: white;
}
.fg textarea { resize: vertical; min-height: 90px; }
.fg input:disabled { opacity: .6; cursor: not-allowed; }
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── BOTÕES ── */
.btn-primary {
  background: var(--laranja);
  color: white; border: none;
  padding: 13px 24px;
  border-radius: 9px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: background .15s;
  width: 100%;
}
.btn-primary:hover { background: var(--laranja-lt); }

.btn-secondary {
  background: var(--indigo);
  color: white; border: none;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.btn-secondary:hover { background: var(--indigo-mid); }

.btn-outline {
  background: none;
  border: 1.5px solid var(--cinza-bd);
  color: var(--indigo);
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.btn-outline:hover { border-color: var(--indigo-soft); }
.btn-outline.danger:hover { border-color: var(--vermelho); color: var(--vermelho); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--indigo); color: white;
  padding: 14px 24px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  z-index: 9999; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── CARDS ── */
.card {
  background: white;
  border-radius: 12px;
  border: 1.5px solid var(--cinza-bd);
  transition: box-shadow .18s, border-color .18s;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(27,31,75,.08);
  border-color: #C8CBE8;
}
.card-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--cinza-bd);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-head h3 { font-size: 15px; font-weight: 800; color: var(--indigo); }
.card-body { padding: 18px 22px; }

/* ── BADGES ── */
.badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.badge-new { background: var(--laranja); color: white; animation: pulse 2s infinite; }
.badge-ativo { background: rgba(29,184,106,.1); color: var(--verde); border: 1px solid rgba(29,184,106,.25); }
.badge-pausado { background: rgba(240,165,0,.1); color: var(--amarelo); border: 1px solid rgba(240,165,0,.25); }
.badge-cat { background: rgba(74,80,168,.09); color: var(--indigo-soft); }
@keyframes pulse { 0%,100%{opacity:1;}50%{opacity:.6;} }

/* ── FOOTER ── */
footer {
  background: var(--indigo);
  color: rgba(255,255,255,.45);
  text-align: center;
  padding: 28px;
  font-size: 13px;
}

/* ── RESPONSIVO ── */

/* Tablet grande / desktop pequeno */
@media(max-width:1024px) {
  header { padding: 0 20px; }
  .logo-img { height: 44px; }
}

/* Tablet */
@media(max-width:768px) {
  header { padding: 0 16px; height: 56px; }
  .logo-img { height: 36px; }

  /* Header — esconde textos nos botões menores */
  .btn-h { padding: 7px 10px; font-size: 12px; }
  .user-name { display: none; }
  .user-chip { padding: 5px 8px 5px 5px; }

  /* Modais ocupam mais tela */
  .modal { border-radius: 12px; max-width: 100%; }
  .modal-body { padding: 18px 20px; }
  .modal-head { padding: 20px 20px 16px; }

  /* Formulários */
  .fg-row { grid-template-columns: 1fr; }

  /* Cards */
  .card-body { padding: 14px 16px; }
  .card-head { padding: 14px 16px 12px; }
}

/* Mobile */
@media(max-width:480px) {
  header { padding: 0 12px; height: 54px; }
  .logo-img { height: 32px; }

  /* Esconde botão "Sou vendedor" em telas muito pequenas */
  .btn-h.ghost:not(:last-of-type) { display: none; }

  /* Botões menores */
  .btn-h { padding: 6px 10px; font-size: 12px; }
  .btn-primary { padding: 12px; font-size: 14px; }

  /* Toast menor */
  .toast { font-size: 13px; padding: 12px 18px; white-space: normal; max-width: 90vw; text-align: center; }

  /* Overlay ocupa tela toda */
  .overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: 20px 20px 0 0; max-height: 95vh; }
}
