/* ==========================================================================
   NAILSHAIR DESIGN SYSTEM - UI/UX MOBBIN INSPIRATION
   Inspirado em fluxos modernos de agendamento, calendário (Better Stack Flow)
   e estética premium de beleza & bem-estar (Glossier / Beauty Salon).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Tipografia */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Paleta Primária Padrão (Customizável pelo CMS/Tema) */
  --color-primary: #db2777;        /* Rose / Berry Vibrante */
  --color-primary-dark: #be185d;
  --color-primary-light: #fdf2f8;
  --color-primary-gradient: linear-gradient(135deg, #db2777 0%, #ec4899 100%);
  --color-accent: #6366f1;         /* Indigo inspirado no Mobbin */
  
  /* Superfícies e Profundidade */
  --bg-page: #FAF7F5;
  --surface-card: #ffffff;
  --surface-card-subtle: #f8fafc;
  --border-subtle: rgba(226, 232, 240, 0.8);
  --border-focus: rgba(219, 39, 119, 0.5);

  /* Sombras Modernas Mobbin */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px -1px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-glow: 0 8px 24px -4px rgba(219, 39, 119, 0.35);
  --shadow-toast: 0 12px 32px -4px rgba(15, 23, 42, 0.25);
}

/* Modo Base */
html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg-page);
  color: #1e293b;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

/* Tipografia de Cabeçalhos */
.font-serif {
  font-family: var(--font-serif);
}
.font-mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   GLASSMORPHISM & SUPERFÍCIES REFINADAS (MOBBIN STYLE)
   ========================================================================== */
.glass-nav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(241, 245, 249, 0.8);
}

.glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-md);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

/* Mobbin Floating Action Bar / Mobile Dock */
.mobbin-bottom-dock {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   INTERATIVIDADE, BOTÕES & TOQUE TÁTIL (48px mínimo)
   ========================================================================== */
.tap-target {
  min-height: 48px;
  min-width: 48px;
}

.btn-press {
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-press:active {
  transform: scale(0.97);
}

.hover-elevate {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-elevate:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   SEGMENTED CONTROL (Padrão Mobbin / Better Stack)
   ========================================================================== */
.mobbin-segmented {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 9999px;
  padding: 3px;
  border: 1px solid #e2e8f0;
}

.mobbin-segmented-dark {
  display: inline-flex;
  align-items: center;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 9999px;
  padding: 3px;
  border: 1px solid rgba(51, 65, 85, 0.6);
}

.mobbin-segmented-item {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  color: #64748b;
  transition: all 0.18s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  outline: none;
}

.mobbin-segmented-item.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.mobbin-segmented-dark .mobbin-segmented-item.active {
  background: #334155;
  color: #f8fafc;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   CALENDÁRIO & CHIPS DE AGENDAMENTO (Estilo Mobbin Better Stack Flow)
   ========================================================================== */
.mobbin-calendar-cell {
  position: relative;
  border-radius: 12px;
  transition: background-color 0.15s ease;
}

.mobbin-calendar-cell:hover {
  background-color: rgba(241, 245, 249, 0.6);
}

.mobbin-event-chip {
  display: flex;
  flex-direction: column;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  border-left-width: 3px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mobbin-event-chip:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   TOAST FLUTUANTE (Canto Direito Inferior com Temporizador)
   ========================================================================== */
.mobbin-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  transform: none;
  z-index: 999999;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 48px);
}

@media (max-width: 640px) {
  .mobbin-toast-container {
    bottom: 84px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }
}

.mobbin-toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  border-radius: 16px;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: toastSlideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobbin-toast.toast-closing {
  animation: toastSlideOutRight 0.25s ease-in forwards !important;
}

@keyframes toastSlideInRight {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOutRight {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(100%) scale(0.92);
  }
}

.mobbin-toast-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}

.toast-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-icon-box.success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.toast-icon-box.danger,
.toast-icon-box.error {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.toast-icon-box.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.toast-icon-box.info {
  background: rgba(14, 165, 233, 0.2);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.toast-content {
  flex-grow: 1;
  min-width: 0;
}

.toast-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.toast-icon-box.success ~ .toast-content .toast-title { color: #34d399; }
.toast-icon-box.danger ~ .toast-content .toast-title,
.toast-icon-box.error ~ .toast-content .toast-title { color: #fb7185; }
.toast-icon-box.warning ~ .toast-content .toast-title { color: #fbbf24; }
.toast-icon-box.info ~ .toast-content .toast-title { color: #38bdf8; }

.toast-message {
  font-size: 13px;
  line-height: 1.4;
  color: #f1f5f9;
  font-weight: 500;
  word-break: break-word;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background-color 0.15s;
  flex-shrink: 0;
  margin-top: -2px;
  margin-right: -4px;
}

.toast-close-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
}

/* Barra de Temporizador (Countdown Progress Bar) */
.toast-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.toast-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  animation: toastTimerProgress 5s linear forwards;
}

.mobbin-toast:hover .toast-progress-bar {
  animation-play-state: paused;
}

.toast-progress-bar.success {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.toast-progress-bar.danger,
.toast-progress-bar.error {
  background: linear-gradient(90deg, #f43f5e, #fb7185);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.6);
}

.toast-progress-bar.warning {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.toast-progress-bar.info {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.6);
}

@keyframes toastTimerProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* ==========================================================================
   ALERT BANNER (Mobbin Better Stack Top Banner)
   ========================================================================== */
.mobbin-alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.mobbin-alert-banner.dark {
  background: rgba(6, 78, 59, 0.4);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   BOTÕES TEMÁTICOS PRIMÁRIOS (HIGH-CONVERSION)
   ========================================================================== */
.theme-btn-primary {
  background: var(--color-primary-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: var(--shadow-glow) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-radius: 14px;
}

.theme-btn-primary:hover {
  filter: brightness(1.08) !important;
  box-shadow: 0 10px 24px -2px rgba(219, 39, 119, 0.45) !important;
  transform: translateY(-1px);
}

.theme-btn-primary:active {
  transform: scale(0.97) !important;
  filter: brightness(0.96) !important;
}

.theme-btn-primary:disabled,
.theme-btn-primary[disabled] {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.4) !important;
  transform: none !important;
  box-shadow: none !important;
}

.theme-text-primary {
  color: var(--color-primary) !important;
}

.theme-border-primary {
  border-color: var(--color-primary) !important;
}

/* Badges de Status Modernos */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-badge-pendente {
  background-color: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.status-badge-agendado {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.status-badge-confirmado {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-badge-concluido {
  background-color: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.status-badge-cancelado {
  background-color: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

/* Animações e Utilitários de Scroll */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Indicador Pulsante Suave */
.pulse-indicator {
  position: relative;
}
.pulse-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #f43f5e;
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(244, 63, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}
