/* === admin-dashboard.html === */

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

html {
  min-height: 100%;
}

:root {
  --pink: #f43f5e;
  --pink-light: #fda4af;
  --pink-pale: #fff0f5;
  --pink-border: #fecdd3;
  --text: #1a0a12;
  --text-muted: #9f6070;
  --white: #ffffff;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
}

body.admin-page {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse at 30% 20%,
      rgba(255, 255, 255, 0.55) 0%,
      transparent 55%),
    radial-gradient(ellipse at 80% 80%,
      rgba(255, 255, 255, 0.3) 0%,
      transparent 50%),
    linear-gradient(145deg, #f9a8d4 0%, #fda4af 30%, #fecdd3 60%, #ffe4e6 100%);
  background-attachment: fixed;
}

/* ── LOGIN ── */
#login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 10;
}

.login-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border-radius: 36px;
  padding: 56px 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: 
    0 24px 64px rgba(159, 18, 57, 0.1),
    0 8px 24px rgba(244, 63, 94, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.7);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(251, 113, 133, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.auth-logo-img {
  max-width: 240px;
  max-height: 110px;
  object-fit: contain;
  margin: 0 auto 16px auto;
  display: block;
}

.auth-header {
  text-align: center;
  margin-bottom: 36px;
}

.auth-title {
  font-family: "Outfit", "Inter", sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #be123c, #f43f5e, #fb7185);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.8;
}

.badge-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  border: 1px solid rgba(253, 164, 175, 0.6);
  border-radius: 24px;
  padding: 6px 16px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #be123c;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 14px;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.08);
}

.form-group {
  margin-bottom: 22px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b4050;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 10px;
  margin-left: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .fi {
  position: absolute;
  left: 20px;
  color: #a8a29e;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.input-field {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border: 2px solid rgba(253, 164, 175, 0.35);
  border-radius: 20px;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.85);
  outline: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.input-field::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.input-field:focus {
  border-color: var(--pink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
  transform: translateY(-2px);
}

.input-field:focus + .fi,
.input-wrapper:focus-within .fi {
  color: var(--pink);
  transform: scale(1.1);
}

.btn-login {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-family: "Outfit", "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.btn-login::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: all 0.5s ease;
}

.btn-login:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(225, 29, 72, 0.4);
}

.btn-login:hover::after {
  left: 100%;
}

.btn-login:active {
  transform: translateY(1px);
}

.error-msg, .success-msg {
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 20px;
  display: none;
  text-align: center;
  animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.08);
}

.success-msg {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.08);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-links-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(253, 164, 175, 0.25);
}

.auth-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pink);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
}

.auth-link:hover {
  color: #be123c;
  background: rgba(253, 164, 175, 0.1);
}

.auth-link-secondary {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
}

.auth-link-secondary:hover {
  color: var(--pink);
  background: rgba(253, 164, 175, 0.1);
}

@media (max-width: 480px) {
  .login-card {
    padding: 40px 24px;
    border-radius: 28px;
  }
  .auth-logo-img {
    max-width: 190px;
    max-height: 85px;
    margin-bottom: 20px;
  }
  .auth-link {
    font-size: 0.82rem;
    text-align: center;
    line-height: 1.4;
    white-space: normal;
  }
  .auth-link-secondary {
    font-size: 0.8rem;
  }
  .auth-links-container {
    padding-top: 16px;
    margin-top: 20px;
  }
  .btn-login {
    font-size: 0.95rem;
    padding: 16px;
  }
  .input-field {
    font-size: 0.95rem;
    padding: 14px 16px 14px 46px;
  }
}

/* ── DASHBOARD ── */
#dashboard {
  display: none;
  min-height: 100vh;
}

.topbar {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(253, 164, 175, 0.25);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 4px 24px rgba(244, 63, 94, 0.08);
}

.topbar-brand {
  font-family: "Inter", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg,
      #9f1239 0%,
      #e11d48 40%,
      #f43f5e 70%,
      #fb7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.topbar-sub {
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.admin-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.admin-role {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

.admin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pink-border);
  padding: 2px;
}

.avatar-wrap {
  position: relative;
  cursor: pointer;
  display: flex;
  transition: transform 0.2s;
}

.avatar-wrap:hover {
  transform: scale(1.05);
}

.avatar-edit-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.55rem;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(244, 63, 94, 0.3);
}

.btn-logout,
.btn-chat {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(253, 164, 175, 0.5);
  color: #e11d48;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.1);
  text-decoration: none;
  padding: 0;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.btn-logout:hover {
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  color: #fff;
}

.btn-chat {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(253, 164, 175, 0.3);
  color: #f43f5e;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.05);
}

.btn-chat:hover {
  background: #fff0f5;
  border-color: #fda4af;
  color: #e11d48;
}

.btn-chat:hover {
  background: #fff0f5;
  border-color: #fda4af;
  color: #e11d48;
}

.main {
  padding: 28px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.2px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(253, 164, 175, 0.4), transparent);
  border-radius: 1px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 20px 16px 16px;
  border: 1px solid rgba(253, 164, 175, 0.3);
  box-shadow:
    0 4px 20px rgba(244, 63, 94, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
}

.stat-card:nth-child(1)::before {
  background: linear-gradient(90deg, #f43f5e, #fb7185);
}

.stat-card:nth-child(2)::before {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.stat-card:nth-child(3)::before {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.stat-card:nth-child(4)::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(244, 63, 94, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.stat-card.clickable {
  cursor: pointer;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 12px;
  font-size: 1.25rem;
}

.stat-icon.pink {
  background: linear-gradient(135deg, #fff0f5, #fecdd3);
  color: var(--pink);
}

.stat-icon.green {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  color: var(--green);
}

.stat-icon.yellow {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: var(--yellow);
}

.stat-icon.blue {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--blue);
}

.stat-value {
  font-family: "Inter", sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Date tabs */
.date-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.date-tab {
  padding: 8px 18px;
  border-radius: 30px;
  border: 1.5px solid rgba(253, 164, 175, 0.4);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow:
    0 2px 8px rgba(244, 63, 94, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.date-tab.active {
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.35);
}

/* Appointment cards */
.appointments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.appt-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(253, 164, 175, 0.2);
  border-left: 3px solid var(--pink-light);
  box-shadow: 0 2px 12px rgba(244, 63, 94, 0.06);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.appt-card:hover {
  box-shadow: 0 8px 28px rgba(244, 63, 94, 0.13);
  transform: translateY(-2px) scale(1.005);
  border-left-color: var(--pink);
}

.appt-time {
  min-width: 52px;
  text-align: center;
  background: var(--pink-pale);
  border-radius: 10px;
  padding: 8px 4px;
}

.appt-time .hour {
  font-family: "Inter", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--pink);
  line-height: 1;
}

.appt-time .period {
  font-size: 0.55rem;
  color: var(--pink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

.appt-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.appt-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.appt-service {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.appt-phone {
  font-size: 0.75rem;
  color: var(--pink);
  font-weight: 600;
}

.appt-price {
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  min-width: 62px;
  text-align: right;
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  align-self: flex-start;
  width: fit-content;
}

.status-badge.confirmado {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-badge.pendente {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-badge.cancelado {
  background: #fff0f0;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.appt-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.btn-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.btn-action.confirm {
  background: #f0fdf4;
  color: var(--green);
}

.btn-action.confirm:hover {
  background: var(--green);
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.btn-action.cancel {
  background: #fff0f0;
  color: var(--red);
}

.btn-action.cancel:hover {
  background: var(--red);
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-action.whatsapp {
  background: #f0fff4;
  color: #25d366;
}

.btn-action.whatsapp:hover {
  background: #25d366;
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

/* Horários livres */
.slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slot-pill {
  padding: 8px 18px;
  border-radius: 20px;
  background: #fff;
  border: 1.5px solid var(--pink-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: default;
  transition: transform 0.2s;
}

.slot-pill.livre {
  color: var(--green);
  border-color: #86efac;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.12);
  animation: fadeSlotIn 0.3s ease both;
}

.slot-pill.livre:hover {
  transform: scale(1.06);
}

@keyframes fadeSlotIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
}

.empty-state .fi {
  font-size: 2.5rem;
  color: var(--pink-border);
  display: block;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 0.88rem;
}

/* Loading */
.loading {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--pink-border);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── TOASTS & MODALS ─────────────────────────────── */
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(32px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.swal2-popup.glass-toast {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(220, 220, 230, 0.6) !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
  border-radius: 16px !important;
  padding: 12px 20px 12px 14px !important;
  justify-content: flex-start !important;
}

.swal2-popup.glass-toast.swal2-show {
  animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

.swal2-popup.glass-toast.swal2-hide {
  animation: toastFadeOut 0.2s ease-out forwards !important;
}

@keyframes toastFadeOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(32px) scale(0.95); }
}

.swal2-popup.glass-toast.swal2-icon-success {
  border: 1px solid rgba(34, 197, 94, 0.25) !important;
  box-shadow: 0 12px 40px -12px rgba(34, 197, 94, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.swal2-popup.glass-toast.swal2-icon-error {
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  box-shadow: 0 12px 40px -12px rgba(239, 68, 68, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.swal2-popup.glass-toast.swal2-icon-warning {
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  box-shadow: 0 12px 40px -12px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.swal2-popup.glass-toast.swal2-icon-info {
  border: 1px solid rgba(59, 130, 246, 0.25) !important;
  box-shadow: 0 12px 40px -12px rgba(59, 130, 246, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.swal2-title.glass-toast-title {
  color: #1f2937 !important;
  font-family: "Inter", sans-serif !important;
  font-weight: 500 !important;
  font-size: 0.92rem !important;
  margin: 0 0 0 12px !important;
  text-align: left !important;
  letter-spacing: -0.2px !important;
  line-height: 1.4 !important;
}

.swal2-popup.glass-toast .swal2-icon {
  transform: scale(0.65) !important;
  margin: 0 !important;
  border-width: 2px !important;
  flex-shrink: 0 !important;
}

.swal2-popup.glass-toast .swal2-timer-progress-bar {
  background: rgba(0, 0, 0, 0.08) !important;
  height: 3px !important;
  border-radius: 0 0 16px 16px !important;
}

/* Modal semanal */
.swal2-popup.glass-modal {
  background: linear-gradient(145deg, #ffffff 0%, #fff5f8 60%, #fff0f5 100%) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(253, 164, 175, 0.35) !important;
  box-shadow:
    0 24px 64px rgba(244, 63, 94, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
  border-radius: 28px !important;
  overflow: hidden !important;
}

/* Ícone question — roxo vibrante */
.swal2-popup.glass-modal .swal2-icon.swal2-question {
  border-color: #818cf8 !important;
  color: #6366f1 !important;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff) !important;
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.12) !important;
}

/* Ícone warning — laranja/âmbar vibrante */
.swal2-popup.glass-modal .swal2-icon.swal2-warning {
  border-color: #fbbf24 !important;
  color: #d97706 !important;
  background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12) !important;
}

/* Ícone error — vermelho vibrante */
.swal2-popup.glass-modal .swal2-icon.swal2-error {
  border-color: #f87171 !important;
  color: #dc2626 !important;
  background: linear-gradient(135deg, #fff1f2, #fee2e2) !important;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.12) !important;
}

/* Título */
.swal2-popup.glass-modal .swal2-title {
  font-family: "Inter", sans-serif !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #1a0a12 !important;
  letter-spacing: -0.4px !important;
}

/* Texto */
.swal2-popup.glass-modal .swal2-html-container {
  font-family: "Inter", sans-serif !important;
  font-size: 0.92rem !important;
  color: #6b7280 !important;
  line-height: 1.6 !important;
}

/* Botão Confirmar — gradiente roxo vibrante */
.swal2-popup.glass-modal .swal2-confirm {
  font-family: "Inter", sans-serif !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  padding: 11px 28px !important;
  font-size: 0.9rem !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.swal2-popup.glass-modal .swal2-confirm:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.45) !important;
}

/* ── Painéis de Gerência (Serviços / Horários) ── */
.panel-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  background: #fff0f5;
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed #fda4af;
  align-items: flex-end;
}

.panel-form-group {
  flex: 1;
  min-width: 180px;
}

.panel-form-action {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .panel-form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .panel-form-group {
    width: 100% !important;
  }
  .panel-form-action {
    width: 100%;
    margin-top: 8px;
  }
  .panel-form-action button {
    flex: 1;
    justify-content: center;
  }
}

.panel-action-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.panel-action-btns button {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.panel-action-btns button.btn-upd {
  background: #e0e7ff;
  color: #3730a3;
}

.panel-action-btns button.btn-upd:hover {
  background: #c7d2fe;
  transform: scale(1.05);
}

.panel-action-btns button.btn-del {
  background: #fee2e2;
  color: #991b1b;
}

.panel-action-btns button.btn-del:hover {
  background: #fecaca;
  transform: scale(1.05);
}

/* Botão Confirmar de perigo — gradiente vermelho */
.swal2-popup.glass-modal .swal2-confirm[style*="ef4444"],
.swal2-popup.glass-modal .swal2-confirm[style*="dc2626"] {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35) !important;
}

/* Botão Cancelar — cinza-rosado suave */
.swal2-popup.glass-modal .swal2-cancel {
  font-family: "Inter", sans-serif !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  padding: 11px 28px !important;
  font-size: 0.9rem !important;
  background: #f3e8ec !important;
  color: #9f1239 !important;
  transition: background 0.2s !important;
}

.swal2-popup.glass-modal .swal2-cancel:hover {
  background: #fde4ea !important;
}

/* Área dos botões */
.swal2-popup.glass-modal .swal2-actions {
  gap: 10px !important;
  margin-top: 6px !important;
}

/* ── Modal de Confirmação Glassmorphism ─────────────────── */
.swal2-popup.glass-modal-confirm {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(32px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(244, 63, 94, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
  border-radius: 28px !important;
  padding: 36px 32px 28px !important;
}

.glass-modal-title {
  font-family: "Inter", sans-serif !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.3px !important;
}

/* Botão Sucesso (Confirmar) */
.swal-btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 12px 24px !important;
  font-family: "Inter", sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35) !important;
}

.swal-btn-success:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.45) !important;
}

/* Botão Perigo (Cancelar agendamento) */
.swal-btn-danger {
  background: linear-gradient(135deg, #f87171, #dc2626) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 12px 24px !important;
  font-family: "Inter", sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35) !important;
}

.swal-btn-danger:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.45) !important;
}

/* Botão Neutro (Voltar) */
.swal-btn-neutral {
  background: rgba(255, 255, 255, 0.8) !important;
  color: #6b4050 !important;
  border: 1.5px solid rgba(253, 164, 175, 0.5) !important;
  border-radius: 14px !important;
  padding: 12px 24px !important;
  font-family: "Inter", sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  backdrop-filter: blur(8px) !important;
}

.swal-btn-neutral:hover {
  background: #fff0f5 !important;
  border-color: #fda4af !important;
  color: #f43f5e !important;
}

@media (max-width: 600px) {
  .main {
    padding: 16px;
  }

  .topbar {
    padding: 10px 12px;
    gap: 4px;
  }

  .topbar-brand {
    font-size: 1.05rem;
  }

  .topbar-sub {
    font-size: 0.55rem;
    letter-spacing: 1px;
  }

  .topbar-right {
    gap: 8px;
  }

  .admin-name {
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .admin-role {
    font-size: 0.5rem;
    letter-spacing: 1px;
    margin-top: 0;
  }

  .admin-avatar {
    width: 36px;
    height: 36px;
  }

  .hide-mobile {
    display: none;
  }

  .btn-logout,
  .btn-chat {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .btn-logout svg {
    width: 16px;
    height: 16px;
  }

  .avatar-wrap {
    flex-shrink: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
  }

  .stat-card {
    padding: 14px 10px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  /* Card Mobile Premium */
  .appt-card {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 12px 14px;
    padding: 16px 14px;
  }

  .appt-time {
    grid-column: 1;
    grid-row: 1;
    text-align: center;
    min-width: unset;
    padding: 6px 2px;
  }

  .appt-time .hour {
    font-size: 1.15rem;
  }

  .appt-time .period {
    font-size: 0.5rem;
  }

  .appt-info {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    gap: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .appt-name {
    font-size: 0.95rem;
    white-space: normal;
    word-break: break-word;
    font-weight: 800;
  }

  .appt-service {
    font-size: 0.75rem;
    white-space: normal;
  }

  .appt-phone {
    font-size: 0.75rem;
  }

  .status-badge {
    font-size: 0.6rem;
    padding: 3px 10px;
    margin-top: 4px;
  }

  .appt-price {
    grid-column: 3;
    grid-row: 1;
    font-size: 1.05rem;
    min-width: unset;
    text-align: right;
  }

  .appt-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    width: 100%;
    margin-top: 2px;
    padding-top: 14px;
    border-top: 1px dashed rgba(253, 164, 175, 0.4);
  }

  .btn-action {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .swal2-popup.glass-toast {
    width: auto !important;
    min-width: 300px !important;
    max-width: 92vw !important;
    margin: 0 auto !important;
  }

  .modal-avatar {
    display: none !important;
  }

  .swal2-popup.glass-modal {
    width: 98vw !important;
    max-width: 500px !important;
    padding: 0 !important;
    margin: auto !important;
    box-sizing: border-box !important;
  }
}

/* === index.html (chat) === */

body.chat-page {
  font-family: "Inter", sans-serif;
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center; /* Centraliza base */
  overflow: hidden;
  box-sizing: border-box;
  /* Fundo exterior: rosa profundo com brilho perlado */
  background-color: #fda4af;
  background-image:
    radial-gradient(ellipse at 30% 20%,
      rgba(255, 255, 255, 0.55) 0%,
      transparent 55%),
    radial-gradient(ellipse at 80% 80%,
      rgba(255, 255, 255, 0.3) 0%,
      transparent 50%),
    linear-gradient(145deg, #f9a8d4 0%, #fda4af 30%, #fecdd3 60%, #fda4af 100%);
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════
           PHONE FRAME — borda vidro fosco premium
        ═══════════════════════════════════════ */
.phone {
  width: 100%;
  max-width: 393px;
  height: 100dvh;
  max-height: 852px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Interior: branco puro com véu rosado no topo */
  background: linear-gradient(180deg, #fff5f8 0%, #ffffff 20%, #ffffff 100%);
  position: relative;
  /* Garante a centralização horizontal que quebrou antes */
  margin: 0 auto;
}

@media (min-width: 500px) {
  .phone {
    border-radius: 40px;
    height: 96vh;
    max-height: 900px;
    transform: translateY(2vh);
    margin: 0 auto;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.9),
      0 0 0 1.5px rgba(255, 182, 202, 0.5),
      0 30px 80px rgba(190, 60, 100, 0.22),
      0 8px 20px rgba(0, 0, 0, 0.08);
  }
}

/* Em telas muito largas: limita a largura para o phone não crescer além do esperado */
@media (min-width: 900px) {
  body.chat-page {
    padding: 0;
  }

  .phone {
    max-width: 393px;
    height: 90vh;
    max-height: 852px;
    margin: 0 auto;
    transform: translateY(5vh); /* Utilizando Translate como solicitado para deitar o chat */
  }
}

/* ═══════════════════════════════════════
           HEADER PREMIUM
        ═══════════════════════════════════════ */
header {
  padding: 30px 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  /* Fundo: arco pink gradiente no topo, branco embaixo */
  background: linear-gradient(180deg,
      #fda4af 0%,
      #fecdd3 35%,
      #fff5f8 65%,
      #ffffff 100%);
}

/* Orbe de luz decorativa no canto */
header::before {
  content: "";
  position: absolute;
  top: -30px;
  left: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle,
      rgba(255, 255, 255, 0.4) 0%,
      transparent 70%);
  pointer-events: none;
}

header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(253, 164, 175, 0.4),
      transparent);
}

/* Avatar com DUPLO anel gradiente */
.avatar-ring {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg,
      #ffffff 0%,
      #fda4af 30%,
      #f43f5e 60%,
      #fda4af 80%,
      #ffffff 100%);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.6),
    0 12px 30px rgba(244, 63, 94, 0.25);
  position: relative;
  animation: ringRotate 6s linear infinite;
}

@keyframes ringRotate {
  from {
    background: linear-gradient(135deg,
        #ffffff 0%,
        #fda4af 30%,
        #f43f5e 60%,
        #fda4af 80%,
        #ffffff 100%);
  }

  to {
    background: linear-gradient(495deg,
        #ffffff 0%,
        #fda4af 30%,
        #f43f5e 60%,
        #fda4af 80%,
        #ffffff 100%);
  }
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  display: block;
}

.brand-name {
  font-family: "Inter", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  /* Nome com gradiente de texto pink */
  background: linear-gradient(135deg,
      #9f1239 0%,
      #e11d48 40%,
      #f43f5e 70%,
      #fb7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
  line-height: 1;
}

.brand-tagline {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #1a1a1a;
}

/* Linha decorativa entre tagline e badge */
.header-divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fda4af, transparent);
  margin: 2px 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #14532d;
  border: 1.5px solid #16a34a;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow:
    0 3px 10px rgba(22, 163, 74, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: badgePulse 2.2s ease-in-out infinite;
}

@keyframes badgePulse {

  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(74, 222, 128, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: #86efac;
  }

  50% {
    box-shadow:
      0 0 0 6px rgba(74, 222, 128, 0),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: #4ade80;
  }
}

.status-pill .fi {
  font-size: 0.5rem;
  color: #86efac;
}

.status-hours-badge {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-top: 4px;
  text-align: center;
}

#status-hours {
  white-space: normal;
  text-align: center;
  line-height: 1.4;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #b91c1c;
  margin-top: 4px;
}

/* ═══════════════════════════════════════
           SAIR / MODAL / DESPEDIDA
        ═══════════════════════════════════════ */
.exit-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(253, 164, 175, 0.4);
  background: rgba(255, 255, 255, 0.7);
  color: #e11d48;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.05);
  font-size: 1.1rem;
  z-index: 10;
}

.exit-btn:hover {
  background: #fff0f5;
  border-color: #fda4af;
  color: #be123c;
  transform: scale(1.05);
}

.exit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 10, 18, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.exit-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.exit-modal {
  background: linear-gradient(160deg, #fff5f8 0%, #ffffff 40%);
  border-radius: 28px;
  padding: 30px 24px;
  width: 85%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(244, 63, 94, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(253, 164, 175, 0.4);
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.exit-overlay.active .exit-modal {
  transform: translateY(0) scale(1);
}

.exit-modal-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  line-height: 1;
}

.exit-modal h3 {
  font-family: "Inter", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a0a12;
  margin-bottom: 8px;
}

.exit-modal p {
  font-size: 0.85rem;
  color: #9f6070;
  margin-bottom: 24px;
  line-height: 1.5;
}

.exit-modal-actions {
  display: flex;
  gap: 12px;
}

.exit-modal-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.exit-cancel-btn {
  background: #fff;
  border: 1.5px solid rgba(253, 164, 175, 0.4);
  color: #9f6070;
}

.exit-cancel-btn:hover {
  background: #fff0f5;
  color: #1a0a12;
}

.exit-confirm-btn {
  background: linear-gradient(145deg, #fb7185, #f43f5e, #e11d48);
  border: none;
  color: #fff;
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.25);
}

.exit-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.35);
}

.goodbye-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
  text-align: center;
  background: linear-gradient(180deg, #fff5f8 0%, #ffffff 50%, #fff5f8 100%);
  height: 100%;
}

.goodbye-avatar {
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #ffffff 0%, #fda4af 30%, #f43f5e 60%, #fda4af 80%, #ffffff 100%);
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.2);
}

.goodbye-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  display: block;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.goodbye-screen h2 {
  font-family: "Inter", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #9f1239, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.goodbye-screen p {
  font-size: 0.95rem;
  color: #9f6070;
  line-height: 1.6;
  margin-bottom: 32px;
}

.restart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: #fff;
  border: 1.5px solid rgba(253, 164, 175, 0.6);
  border-radius: 30px;
  color: #f43f5e;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.08);
}

.restart-btn:hover {
  background: #fff0f5;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.15);
}

/* ═══════════════════════════════════════
           CHAT BODY
        ═══════════════════════════════════════ */
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scroll-behavior: smooth;
  background: transparent;
}

.chat-body::-webkit-scrollbar {
  display: none;
}

.date-sep {
  text-align: center;
  margin: 4px 0 20px;
}

.date-sep span {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #e9a0b8;
  background: rgba(255, 240, 248, 0.8);
  padding: 4px 14px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* ═══════════════════════════════════════
           MENSAGENS
        ═══════════════════════════════════════ */
.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(10px);
  animation: msgIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes msgIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg-row.bot {
  flex-direction: row;
}

.msg-row.user {
  flex-direction: row-reverse;
}

.msg-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(253, 164, 175, 0.25);
}

.msg-row.user .msg-av {
  display: none;
}

.bubble-col {
  display: flex;
  flex-direction: column;
  max-width: 73%;
}

.msg-row.bot .bubble-col {
  align-items: flex-start;
}

.msg-row.user .bubble-col {
  align-items: flex-end;
}

/* BOT: branco clean com borda sutil + sombra perlada */
.bubble {
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.55;
  word-break: break-word;
}

.msg-row.bot .bubble {
  background: #ffffff;
  color: #2a0d1e;
  border-radius: 4px 20px 20px 20px;
  border: 1px solid rgba(253, 164, 175, 0.18);
  box-shadow:
    0 2px 12px rgba(253, 164, 175, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.04);
}

/* USER: gradiente rosa perlado — sofisticado, não vibrante */
.msg-row.user .bubble {
  background: linear-gradient(135deg, #fda4af 0%, #fecdd3 45%, #fff0f5 100%);
  color: #5c1535;
  border-radius: 20px 4px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 4px 18px rgba(253, 164, 175, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.bubble strong {
  font-weight: 600;
}

.msg-time {
  font-size: 0.56rem;
  font-weight: 500;
  margin-top: 5px;
  padding: 0 4px;
  color: #c4899e;
  letter-spacing: 0.3px;
}

/* ═══════════════════════════════════════
           TYPING
        ═══════════════════════════════════════ */
.typing-row {
  display: none;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0;
}

.typing-bubble {
  background: #fff;
  border-radius: 4px 20px 20px 20px;
  padding: 14px 18px;
  display: flex;
  gap: 5px;
  align-items: center;
  border: 1px solid rgba(253, 164, 175, 0.18);
  box-shadow: 0 2px 12px rgba(253, 164, 175, 0.1);
}

.t-dot {
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #fda4af, #f9a8d4);
  border-radius: 50%;
  animation: tdot 1.3s ease-in-out infinite;
}

.t-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.t-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes tdot {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* ═══════════════════════════════════════
           QUICK REPLIES
        ═══════════════════════════════════════ */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 10px;
  justify-content: center;
  /* Gradiente rosa→branco de baixo para cima */
  background: linear-gradient(0deg,
      rgba(255, 240, 248, 0.9) 0%,
      rgba(255, 255, 255, 0) 100%);
}

.qr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* Cada chip: gradiente pink→branco lateral */
  background: linear-gradient(135deg, #fda4af 0%, #fecdd3 50%, #fff5f8 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: #8b1a40;
  font-family: "Inter", sans-serif;
  font-size: 0.77rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow:
    0 3px 10px rgba(253, 164, 175, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.qr-btn .fi {
  font-size: 0.82rem;
}

.qr-btn:hover {
  background: linear-gradient(135deg, #fb7185 0%, #fda4af 50%, #fecdd3 100%);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(251, 113, 133, 0.35);
}

/* ═══════════════════════════════════════
           INPUT AREA
        ═══════════════════════════════════════ */
.input-area {
  padding: 12px 18px 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  /* Painel inferior com gradiente rosa forte→branco */
  background: linear-gradient(180deg,
      rgba(255, 240, 248, 0) 0%,
      rgba(255, 228, 240, 0.7) 20%,
      rgba(255, 210, 230, 0.85) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.input-area::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(253, 164, 175, 0.5),
      rgba(251, 113, 133, 0.3),
      rgba(253, 164, 175, 0.5),
      transparent);
}

.input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  /* Input: branco com leve toque rosado */
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(253, 164, 175, 0.3);
  border-radius: 30px;
  padding: 12px 18px;
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
  box-shadow:
    0 2px 12px rgba(253, 164, 175, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.input-wrap:focus-within {
  border-color: rgba(251, 113, 133, 0.5);
  box-shadow:
    0 4px 20px rgba(253, 164, 175, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background: #ffffff;
}

.input-wrap .fi {
  font-size: 0.95rem;
  color: #fda4af;
  flex-shrink: 0;
}

.input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: #2a0d1e;
}

.input-wrap input::placeholder {
  color: #f0b8cc;
}

/* Botão enviar: pill com texto branco */
.send-btn {
  flex-shrink: 0;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(145deg, #fb7185 0%, #f43f5e 50%, #e11d48 100%);
  box-shadow:
    0 4px 16px rgba(244, 63, 94, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.4px;
}



.send-btn:hover:not(:disabled) {
  transform: scale(1.08) translateY(-2px);
  box-shadow:
    0 10px 28px rgba(244, 63, 94, 0.5),
    0 3px 8px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.send-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.send-btn:disabled {
  background: #fecdd3;
  box-shadow: none;
  color: #fda4af;
  cursor: not-allowed;
}

/* === tutorial_detalhado.html === */

:root {
  --primary: #6366f1;
  /* Indigo */
  --secondary: #4f46e5;
  --dark: #0f172a;
  --text-main: #334155;
  --tut-text-muted: #64748b;
  --bg-light: #f8fafc;
  --border: #e2e8f0;
  --accent: #10b981;
  /* Emerald */
}

body.tutorial-page {
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  line-height: 1.6;
  margin: 0;
  padding: 40px;
  background-color: white;
  font-size: 11pt;
}

.tutorial-page h1,
.tutorial-page h2,
.tutorial-page h3,
.tutorial-page h4 {
  color: var(--dark);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  page-break-after: avoid;
}

.tutorial-page h1 {
  font-size: 24pt;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
  margin-top: 0;
}

.tutorial-page h2 {
  font-size: 18pt;
  margin-top: 2em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}

.tutorial-page h3 {
  font-size: 14pt;
  color: var(--secondary);
}

.cover {
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  page-break-after: always;
}

.cover .tutorial-page h1 {
  border: none;
  font-size: 32pt;
  margin-bottom: 20px;
}

.cover p {
  font-size: 14pt;
  color: var(--tut-text-muted);
  max-width: 600px;
}

.architecture-box {
  background-color: var(--dark);
  color: white;
  padding: 20px;
  border-radius: 8px;
  font-family: "Fira Code", monospace;
  font-size: 10pt;
  white-space: pre;
  margin: 20px 0;
  page-break-inside: avoid;
}

.callout {
  background-color: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
  page-break-inside: avoid;
}

.callout.warning {
  border-left-color: #f59e0b;
  background-color: #fffbeb;
}

.callout.success {
  border-left-color: var(--accent);
  background-color: #ecfdf5;
}

.callout strong {
  display: block;
  margin-bottom: 5px;
  color: var(--dark);
}

.tutorial-page pre {
  background-color: var(--bg-light);
  border: 1px solid var(--border);
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: "Fira Code", monospace;
  font-size: 9pt;
  page-break-inside: avoid;
}

.tutorial-page code {
  font-family: "Fira Code", monospace;
  background-color: var(--bg-light);
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #be185d;
}

pre .tutorial-page code {
  background-color: transparent;
  padding: 0;
  color: var(--text-main);
}

.tutorial-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  page-break-inside: avoid;
}

.tutorial-page th,
.tutorial-page td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
}

.tutorial-page th {
  background-color: var(--bg-light);
  font-weight: 600;
  color: var(--dark);
}

.tutorial-page ul,
.tutorial-page ol {
  margin-bottom: 20px;
}

.tutorial-page li {
  margin-bottom: 8px;
}

.step-number {
  display: inline-block;
  width: 28px;
  height: 28px;
  background-color: var(--primary);
  color: white;
  text-align: center;
  line-height: 28px;
  border-radius: 50%;
  margin-right: 10px;
  font-weight: bold;
  font-size: 10pt;
}