@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  --ig-1: #f9ce34;
  --ig-2: #ee2a7b;
  --ig-3: #6228d7;
  --grad: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7);
  --grad-h: linear-gradient(135deg, #fcb045, #fd1d1d, #833ab4);
  --white: #ffffff;
  --bg: #fafafa;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-light: #666;
  --border: #e8e8e8;
  --shadow: 0 4px 20px rgba(238,42,123,0.12);
  --radius: 18px;
  --radius-sm: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
body.chat-page {
  max-width: 100% !important;
  height: 100dvh !important;
  min-height: unset !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
body.chat-page .bar {
  position: sticky !important;
  bottom: 0 !important;
  flex-shrink: 0 !important;
  z-index: 999 !important;
}
body.chat-page .msgs {
  flex: 1 !important;
  overflow-y: auto !important;
  min-height: 0 !important;
}

/* GRADIENTE INSTAGRAM */
.ig-grad { background: var(--grad); }
.ig-grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* BOTÕES */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 16px 24px; border-radius: 50px;
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; border: none; transition: all 0.3s ease;
  text-decoration: none; letter-spacing: 0.5px;
}
.btn-primary {
  background: var(--grad);
  color: white;
  box-shadow: 0 6px 25px rgba(238,42,123,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(238,42,123,0.5); }
.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); }
.btn-outline {
  background: transparent;
  color: #ee2a7b;
  border: 2px solid #ee2a7b;
}

/* INPUTS */
.input-group { margin-bottom: 16px; position: relative; }
.input-group label { display: block; font-size: 13px; font-weight: 700; color: var(--text-light); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.input-field {
  width: 100%; padding: 14px 18px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--white);
  font-family: 'Nunito', sans-serif; font-size: 15px; color: var(--text);
  transition: border-color 0.3s;
  outline: none;
}
.input-field:focus { border-color: #ee2a7b; }

/* CARDS */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

/* HEADER DE PÁGINA */
.page-header {
  background: var(--white);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.page-header .user-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.page-header .avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad); object-fit: cover;
  border: 2px solid #ee2a7b;
}
.page-header .user-name { font-weight: 800; font-size: 15px; }
.page-header .section-name { font-size: 12px; color: var(--text-light); }
.page-header .back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text);
}

/* BOTTOM NAV */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  padding: 8px 16px 20px;
  z-index: 200;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none; color: var(--text-light); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  transition: color 0.2s;
}
.bottom-nav a.active { color: #ee2a7b; }
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav .fab {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(238,42,123,0.5);
  margin-top: -24px;
  border: 4px solid var(--white);
  cursor: pointer; text-decoration: none;
}
.bottom-nav .fab svg { width: 24px; height: 24px; color: white; }

/* SECÇÃO ÍCONE */
.section-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 12px;
  flex-shrink: 0;
}

/* BADGE CONTADOR */
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 50px;
  font-size: 12px; font-weight: 700; border: 1.5px solid;
}
.badge-pink { color: #ee2a7b; border-color: #ee2a7b; background: rgba(238,42,123,0.08); }
.badge-purple { color: #6228d7; border-color: #6228d7; background: rgba(98,40,215,0.08); }
.badge-orange { color: #f9ce34; border-color: #f9ce34; background: rgba(249,206,52,0.08); }

/* ANIMAÇÕES */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.4s ease forwards; }
.fade-in-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-3 { animation-delay: 0.3s; opacity: 0; }

/* TOAST */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: white; padding: 12px 24px;
  border-radius: 50px; font-size: 14px; font-weight: 700;
  z-index: 999; opacity: 0; transition: opacity 0.3s;
  white-space: nowrap;
}
.toast.show { opacity: 1; }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 500; display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--white); width: 100%; max-width: 480px; margin: 0 auto;
  border-radius: 24px 24px 0 0; padding: 24px;
  transform: translateY(100%); transition: transform 0.3s ease;
  max-height: 85vh; overflow-y: auto;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 4px; margin: 0 auto 20px; }

/* PIN INPUT */
.pin-dots { display: flex; gap: 16px; justify-content: center; margin: 24px 0; }
.pin-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #ee2a7b; background: transparent;
  transition: background 0.2s;
}
.pin-dot.filled { background: #ee2a7b; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-key {
  padding: 18px; border-radius: var(--radius-sm); border: none;
  background: var(--bg); font-family: 'Nunito', sans-serif;
  font-size: 22px; font-weight: 700; cursor: pointer;
  transition: all 0.15s;
}
.pin-key:active { transform: scale(0.92); background: #ee2a7b; color: white; }

/* CHAT */
.chat-bubble {
  max-width: 75%; padding: 10px 14px; border-radius: 18px;
  font-size: 15px; line-height: 1.5; margin-bottom: 4px;
  word-wrap: break-word;
}
.chat-bubble.sent {
  background: var(--grad);
  color: white; border-bottom-right-radius: 4px;
  align-self: flex-end; margin-left: auto;
}
.chat-bubble.received {
  background: var(--white); color: var(--text);
  border: 1px solid var(--border); border-bottom-left-radius: 4px;
}
.chat-time { font-size: 11px; color: var(--text-light); margin-bottom: 12px; }

/* LINHA DO TEMPO */
.timeline-dot {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(238,42,123,0.3);
}
.timeline-line { width: 2px; background: linear-gradient(to bottom, #ee2a7b, #6228d7); flex-shrink: 0; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ee2a7b; border-radius: 4px; }

/* UTILITÁRIOS */
.text-center { text-align: center; }
.text-grad { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.fw-800 { font-weight: 800; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.p-20 { padding: 20px; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
