/* ==========================================================================
   VOTUS FOTOS - Design System & Stylesheet (fotos.palmasbr.com.br)
   ========================================================================== */

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg: #0f172a;
  --card-bg: #1e293b;
  --card-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --success: #22c55e;
  --error: #ef4444;
  --accent: #f59e0b;
  --neon-cyan: #06b6d4;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* App Header & Navigation */
.app-header {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 2rem;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary), #a855f7);
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.brand-title span {
  color: var(--accent);
}

.subdomain-tag {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.35rem;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Main Container */
.main-content {
  width: 100%;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  box-sizing: border-box;
}

.tab-content {
  width: 100%;
  box-sizing: border-box;
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

/* Studio Canvas Grid Layout */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

.canvas-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.canvas-container {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  border: 2px stroke var(--primary);
  background: #000000;
}

canvas#studioCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
canvas#studioCanvas:active {
  cursor: grabbing;
}

/* Studio Toolbar Controls */
.studio-tools {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  width: 100%;
  max-width: 540px;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.85rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  align-items: center;
}

.tool-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.zoom-slider {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}

.tool-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.tool-icon-btn:hover {
  background: var(--primary);
  color: white;
}

/* Side Config Panel */
.config-panel {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.btn-share-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}
.btn-share-badge:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-1px);
}

.party-filter-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.party-chip {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 0.3rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.party-chip:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}
.party-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.party-chip.psdb.active {
  background: #1d4ed8;
  border-color: #facc15;
  color: #ffffff;
}
.party-chip.rede.active {
  background: #16a34a;
  border-color: #f97316;
  color: #ffffff;
}
.party-chip.pdt.active {
  background: #dc2626;
  border-color: #2563eb;
  color: #ffffff;
}

.frame-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.35rem;
  padding-bottom: 0.5rem;
}

.frame-card {
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid var(--card-border);
  border-radius: 0.85rem;
  padding: 0.65rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-align: center;
  user-select: none;
}
.frame-card:hover {
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}
.frame-card.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.2);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.45);
}

.frame-preview-wrapper {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.6rem;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.frame-avatar-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.18);
  font-size: 2.8rem;
  z-index: 1;
}

.frame-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
}

.frame-title {
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.frame-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Form inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus {
  border-color: var(--primary);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 0.85rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 0.85rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.35);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(22, 30, 49, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

/* App Header & Navigation */
.app-header {
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 2rem;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.3rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.1rem;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* Main Container */
.main-content {
  width: 100%;
  max-width: 1400px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  flex: 1;
  box-sizing: border-box;
}

.tab-content {
  width: 100%;
  box-sizing: border-box;
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

/* Studio Canvas Grid Layout */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(360px, 540px) 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 960px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

.canvas-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  position: relative;
}

.canvas-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  background-color: #1e293b;
  background-image: 
    linear-gradient(45deg, #0f172a 25%, transparent 25%), 
    linear-gradient(-45deg, #0f172a 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #0f172a 75%), 
    linear-gradient(-45deg, transparent 75%, #0f172a 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

canvas#studioCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
canvas#studioCanvas:active {
  cursor: grabbing;
}

/* Studio Toolbar Controls */
.studio-tools {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.25rem;
  width: 100%;
  max-width: 480px;
  background: rgba(11, 15, 25, 0.75);
  padding: 0.75rem 1.25rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
}

.tool-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.zoom-slider {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}

.tool-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.tool-icon-btn:hover {
  background: var(--primary);
  color: white;
}
#rotateBtn:hover {
  transform: rotate(45deg);
}
.tool-icon-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Side Config Panel */
.config-panel {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.step-num {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 900;
}

.step-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

/* Upload Hero Button */
.upload-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.02));
  border: 2px dashed rgba(99, 102, 241, 0.45);
  border-radius: 0.85rem;
  color: #c7d2fe;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.upload-dropzone:hover {
  background: rgba(99, 102, 241, 0.14);
  border-color: var(--primary);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-share-badge {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent);
  padding: 0.3rem 0.7rem;
  border-radius: 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}
.btn-share-badge:hover {
  background: var(--accent);
  color: #000;
}

.party-filter-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.party-chip {
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.party-chip:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}
.party-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}
.party-chip.psdb.active {
  background: #1d4ed8;
  border-color: #facc15;
  color: #ffffff;
}
.party-chip.rede.active {
  background: #16a34a;
  border-color: #f97316;
  color: #ffffff;
}
.party-chip.pdt.active {
  background: #dc2626;
  border-color: #2563eb;
  color: #ffffff;
}

.frame-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 0.35rem;
  padding-bottom: 0.5rem;
}

.frame-card {
  background: rgba(11, 15, 25, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  padding: 0.55rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-align: center;
  user-select: none;
}
.frame-card:hover {
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}
.frame-card.selected {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.frame-preview-wrapper {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.55rem;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-avatar-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.18);
  font-size: 2.2rem;
  z-index: 1;
}

.frame-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
}

.frame-title {
  font-size: 0.76rem;
  font-weight: 700;
  margin-top: 0.45rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.frame-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #f59e0b;
  color: #000;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 0.12rem 0.4rem;
  border-radius: 0.35rem;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* Upload Custom Frame Subtle Button */
.custom-frame-uploader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: rgba(245, 158, 11, 0.05);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: 0.65rem;
  color: #f59e0b;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 0.85rem;
  transition: all 0.2s ease;
}
.custom-frame-uploader:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
}

/* Action CTA Area */
.actions-area {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Actions Buttons Row - Inline Side-by-Side */
.actions-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: 100%;
}
@media (max-width: 520px) {
  .actions-buttons-row {
    grid-template-columns: 1fr;
  }
}
.actions-buttons-row .btn-primary,
.actions-buttons-row .btn-whatsapp {
  width: 100%;
  padding: 0.85rem 0.5rem;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -0.2px;
  justify-content: center;
  gap: 0.45rem;
}

/* Form inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-input {
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: none;
  padding: 0.9rem 1.4rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
  letter-spacing: -0.2px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border: none;
  padding: 0.9rem 1.4rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
  letter-spacing: -0.2px;
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.5);
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.7rem 1.2rem;
  border-radius: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  width: 92%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}

/* Analytics Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat-card {
  padding: 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
}
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 0.85rem;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.stat-number {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.2;
}
.stat-title {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ─── Painel Estratégico Pro (3 Colunas & UX Avançada) ─────────────────── */
.analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.analytics-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.analytics-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.analytics-header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 2rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #22c55e; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.btn-refresh-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.45rem 1rem;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}
.btn-refresh-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Grid Superior de KPIs: 3 Colunas Perfeitas */
.stats-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
}
@media (max-width: 960px) {
  .stats-grid-3 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.stat-card-pro {
  background: linear-gradient(145deg, rgba(26, 35, 58, 0.75), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}
.stat-card-pro:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.18);
}
.stat-card-pro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent-gradient, linear-gradient(90deg, #6366f1, #a855f7));
  opacity: 0.9;
}
.stat-card-pro.card-photos {
  --card-accent-gradient: linear-gradient(90deg, #6366f1, #38bdf8);
}
.stat-card-pro.card-shares {
  --card-accent-gradient: linear-gradient(90deg, #22c55e, #10b981);
}
.stat-card-pro.card-downloads {
  --card-accent-gradient: linear-gradient(90deg, #f59e0b, #d97706);
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.stat-icon-pro {
  width: 52px;
  height: 52px;
  border-radius: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.stat-icon-photos {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #818cf8;
}
.stat-icon-shares {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(16, 185, 129, 0.15));
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
}
.stat-icon-downloads {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.stat-badge-pro {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 2rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}
.badge-green {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}
.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.stat-card-bottom {
  display: flex;
  flex-direction: column;
}
.stat-number-pro {
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  font-feature-settings: "tnum";
}
.stat-title-pro {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.3rem;
}
.stat-subtitle-pro {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Grid Principal de Conteúdo Estratégico: 3 Colunas */
.analytics-3col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  align-items: stretch;
  margin-bottom: 2rem;
}
@media (max-width: 1120px) {
  .analytics-3col-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.analytics-column-card {
  background: rgba(22, 30, 49, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  min-height: 420px;
}

.column-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.column-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  letter-spacing: -0.2px;
}
.column-pill {
  padding: 0.25rem 0.65rem;
  border-radius: 1rem;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* Itens de Ranking com UX Elevada */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.ranking-item-pro {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.85rem;
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: all 0.2s ease;
}
.ranking-item-pro:hover {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.ranking-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.ranking-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.rank-badge-pill {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  flex-shrink: 0;
}
.rank-badge-1 {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #0b0f19;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}
.rank-badge-2 {
  background: linear-gradient(135deg, #cbd5e1, #64748b);
  color: #0b0f19;
}
.rank-badge-3 {
  background: linear-gradient(135deg, #d97706, #78350f);
  color: #ffffff;
}
.rank-badge-other {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.ranking-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ranking-count-badge {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.count-cyan {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.count-purple {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.25);
}

/* Barras de Progresso Proporcionais */
.ranking-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
}
.progress-bar-cyan {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #6366f1);
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-bar-purple {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Coluna 3: Funil de Conversão & Ações Rápidas */
.funnel-container {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}
.funnel-step {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.funnel-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.funnel-step-title {
  font-size: 0.86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.funnel-step-value {
  font-size: 0.88rem;
  font-weight: 800;
  font-feature-settings: "tnum";
}

.funnel-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  overflow: hidden;
}
.funnel-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.viral-insight-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 0.95rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.viral-insight-icon {
  width: 32px;
  height: 32px;
  border-radius: 0.65rem;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.viral-insight-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #86efac;
  margin-bottom: 0.2rem;
}
.viral-insight-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: auto;
}
.btn-dashboard-action {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.btn-dashboard-action:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.btn-dashboard-action i.arrow-icon {
  font-size: 0.75rem;
  opacity: 0.6;
  transition: transform 0.2s;
}
.btn-dashboard-action:hover i.arrow-icon {
  transform: translateX(3px);
  opacity: 1;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.toast {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  padding: 0.85rem 1.35rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideIn 0.3s forwards;
  font-size: 0.9rem;
  font-weight: 600;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ─── Selfie & Camera UI Styles ────────────────────────────────────────── */
.btn-selfie-cta {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0b0f19;
  border: none;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  letter-spacing: -0.2px;
}
.btn-selfie-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}
.btn-selfie-cta:active {
  transform: scale(0.98);
}

.selfie-modal-card {
  max-width: 520px;
  padding: 1.5rem;
  text-align: center;
}

.camera-stream-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: 380px;
  background: #000;
  border-radius: 1rem;
  overflow: hidden;
  margin: 0.75rem 0 1.25rem;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 8px 24px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

#selfieVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Espelho natural de selfie */
}

#selfieVideo.no-mirror {
  transform: none; /* Sem espelho para câmera traseira */
}

.face-guide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.face-oval-guide {
  width: 62%;
  height: 74%;
  border: 2.5px dashed rgba(245, 158, 11, 0.75);
  border-radius: 50% / 45%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  animation: pulseGuide 2s infinite ease-in-out;
}

@keyframes pulseGuide {
  0%, 100% { border-color: rgba(245, 158, 11, 0.6); }
  50% { border-color: rgba(245, 158, 11, 1); }
}

.face-guide-text {
  position: absolute;
  bottom: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #fcd34d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.camera-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
}
.camera-flash.flash-active {
  opacity: 0.9;
}

.camera-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  padding: 0.5rem 0;
}

.btn-camera-util {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 0.6rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s;
  min-width: 68px;
}
.btn-camera-util:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-shutter {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  padding: 0;
}
.btn-shutter:hover {
  transform: scale(1.08);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.6);
}
.btn-shutter:active {
  transform: scale(0.92);
}
.shutter-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0f19;
  font-size: 1.35rem;
}


