/* ========================================
   Mary Kay - Lu Rocha - Sistema de Gestão
   Cores: Rosa claro #fce4ec / Rosa escuro #c2185b / Vinho #880e4f
======================================== */

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

:root {
  --pink-light: #fce4ec;
  --pink-mid: #f48fb1;
  --pink-dark: #c2185b;
  --pink-deep: #880e4f;
  --pink-hover: #ad1457;
  --white: #ffffff;
  --gray: #f5f5f5;
  --text-dark: #333;
  --text-mid: #666;
  --shadow: 0 2px 12px rgba(194,24,91,0.15);
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--pink-light);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
#app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--pink-dark);
  padding: 8px 16px;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-default {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.6);
  color: white;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#logo-empresa-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.6);
}

.header-title {
  display: flex;
  flex-direction: column;
  color: white;
}

.header-title span {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.header-title small {
  font-size: 11px;
  opacity: 0.85;
}

.btn-admin {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-admin:hover { background: rgba(255,255,255,0.25); }

/* ===== BANNER ===== */
#banner-section {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--pink-deep);
}

#banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.7;
}

.banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 30px;
  gap: 20px;
}

.banner-logo-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 3px solid rgba(255,255,255,0.7);
  color: white;
  font-size: 28px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#banner-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.banner-text h1 {
  color: white;
  font-size: 26px;
  font-weight: 800;
  text-shadow: 1px 2px 8px rgba(0,0,0,0.5);
  line-height: 1.3;
}

/* ===== CARDS ===== */
#main-cards {
  padding: 24px 16px;
  background: var(--pink-light);
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #f8bbd0;
}

.card:hover, .card:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(194,24,91,0.25);
}

.card-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pink-dark);
  margin-bottom: 4px;
}

.card-desc {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.4;
}

/* ===== FOOTER ===== */
#app-footer {
  background: var(--pink-dark);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  min-height: 44px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  opacity: 0.9;
}

#footer-vsual-text {
  display: flex;
  flex-direction: column;
}

#logo-vsual-img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.btn-seja-footer {
  background: white;
  color: var(--pink-dark);
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-seja-footer:hover { background: var(--pink-light); }

/* ===== MODAIS ===== */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  pointer-events: none;
}

.modal-box {
  background: white;
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  pointer-events: all;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.modal-large { }
.modal-box-large {
  max-width: 680px;
}

.modal-header {
  background: var(--pink-dark);
  color: white;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 14px 14px 0 0;
  font-weight: 700;
  font-size: 15px;
  position: sticky;
  top: 0;
}

.pink-header { background: var(--pink-dark); }

.modal-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover { background: rgba(255,255,255,0.35); }

.modal-body {
  padding: 16px;
}

.modal-intro {
  color: var(--text-mid);
  font-size: 14px;
  margin-bottom: 16px;
  text-align: center;
}

/* ===== ADMIN LOGIN ===== */
.admin-login {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-login h3 {
  text-align: center;
  color: var(--pink-dark);
  font-size: 18px;
}

/* ===== ADMIN GRID ===== */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}

.admin-btn {
  background: var(--pink-light);
  border: 1px solid #f8bbd0;
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--pink-dark);
  transition: background 0.2s, transform 0.1s;
}

.admin-btn:hover {
  background: #f8bbd0;
  transform: translateY(-1px);
}

.admin-btn-icon {
  font-size: 26px;
  margin-bottom: 6px;
}

/* ===== INPUTS ===== */
.inp-pink {
  width: 100%;
  border: 1.5px solid #f48fb1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--text-dark);
  outline: none;
  transition: border 0.2s;
  margin-bottom: 0;
  background: white;
}

.inp-pink:focus {
  border-color: var(--pink-dark);
  box-shadow: 0 0 0 2px rgba(194,24,91,0.12);
}

/* iOS font-size fix */
@media (max-width: 767px) {
  .inp-pink { font-size: 16px; }
}

/* ===== BOTÕES ===== */
.btn-pink {
  background: var(--pink-dark);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-pink:hover { background: var(--pink-hover); }
.btn-large { padding: 14px 28px; font-size: 16px; }

.btn-outline {
  background: transparent;
  color: var(--pink-dark);
  border: 1.5px solid var(--pink-dark);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-outline:hover { background: var(--pink-light); }

.btn-danger {
  background: #e53935;
  color: white;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.btn-danger:hover { background: #c62828; }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn-row .btn-pink,
.btn-row .btn-outline { flex: 1; justify-content: center; }

/* ===== FORMS ADMIN ===== */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--pink-dark);
  margin-bottom: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===== TABELA ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #f8bbd0;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

th {
  background: var(--pink-dark);
  color: white;
  padding: 9px 12px;
  font-size: 13px;
  text-align: left;
}

td {
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid #fce4ec;
}

tr:nth-child(even) td { background: #fff9fb; }
tr:hover td { background: var(--pink-light); }

/* ===== CURSOS CARDS ===== */
.curso-card {
  background: white;
  border: 1px solid #f8bbd0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.curso-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.curso-card-info {
  flex: 1;
}

.curso-card-info h4 {
  color: var(--pink-dark);
  font-size: 15px;
  margin-bottom: 6px;
}

.curso-card-info p {
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: 3px;
}

.curso-card-info .valor {
  font-weight: 700;
  color: var(--pink-dark);
}

/* ===== KIT MÍDIA ===== */
.kitmedia-imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.kitmedia-imgs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #f8bbd0;
}

/* ===== UPLOAD PREVIEW ===== */
.img-preview-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.img-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #f8bbd0;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pink-light);
  color: var(--pink-dark);
  border: 1.5px dashed var(--pink-dark);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.upload-btn:hover { background: #f8bbd0; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pink-deep);
  color: white;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  max-width: 90vw;
  text-align: center;
  animation: fadeIn 0.3s;
}

.toast.success { background: #2e7d32; }
.toast.error { background: #c62828; }
.toast.info { background: var(--pink-dark); }

@keyframes fadeIn {
  from { opacity:0; transform: translateX(-50%) translateY(10px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

/* ===== MISC ===== */
.loading {
  text-align: center;
  padding: 30px;
  color: var(--pink-dark);
  font-size: 15px;
}

.text-center { text-align: center; }

.empty-state {
  text-align: center;
  padding: 30px;
  color: var(--text-mid);
  font-size: 14px;
}

.empty-state .empty-icon { font-size: 40px; margin-bottom: 10px; }

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--pink-dark);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--pink-mid);
}

.whatsapp-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.whatsapp-row .inp-pink {
  flex: 1;
}

.tag-tipo {
  display: inline-block;
  background: var(--pink-light);
  color: var(--pink-dark);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ===== RESPONSIVO MOBILE ===== */
@media (max-width: 480px) {
  .banner-text h1 { font-size: 18px; }
  .banner-logo-circle { width: 60px; height: 60px; font-size: 22px; }
  #banner-logo-img { width: 60px; height: 60px; }
  #banner-section { height: 160px; }

  .cards-grid { gap: 10px; }
  .card { padding: 16px 10px; }
  .card-icon { font-size: 28px; }
  .card-title { font-size: 13px; }
  .card-desc { font-size: 11px; }

  .admin-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .admin-btn { padding: 12px 4px; font-size: 11px; }
  .admin-btn-icon { font-size: 22px; }

  .modal-box-large { max-width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .kitmedia-imgs { grid-template-columns: repeat(2, 1fr); }
  .btn-admin { font-size: 11px; padding: 5px 10px; }
  .header-title span { font-size: 13px; }
  .header-title small { font-size: 10px; }
}

@media (max-width: 360px) {
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== PRODUTOS GRID ===== */
.produtos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.produto-card {
  background: white;
  border: 1px solid #f8bbd0;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}

.produto-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.produto-card-info {
  padding: 10px;
}

.produto-card-info h4 {
  font-size: 13px;
  color: var(--pink-dark);
  margin-bottom: 4px;
}

.produto-card-info .valor {
  font-size: 14px;
  font-weight: 700;
  color: var(--pink-deep);
}

/* Input file hidden */
input[type="file"] { display: none; }

/* Scrollbar personalizado */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--pink-light); }
::-webkit-scrollbar-thumb { background: var(--pink-mid); border-radius: 3px; }
