/* =====================================================================
   TROPA PARTNERS — APPLE GLASS 2026
   Spatial UI · Frosted glass · Dark + Light · Inter typography
   Paleta base: charcoal / graphite / ice-white / neon-purple
   ===================================================================== */

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

/* =====================================================================
   TOKENS — DARK THEME (default)
   ===================================================================== */

:root,
[data-theme="dark"] {
  /* Paleta base — DARK = preto puro com glow violeta */
  --nm-black:    #000000;
  --nm-black-2:  #0A0014;
  --nm-graphite: #15001F;
  --nm-graphite-2: #2A0D45;
  --nm-white:    #FFFFFF;
  --nm-purple:   #7835FE;
  --nm-violet:   #BDABFF;

  --ambient-bg:
    radial-gradient(ellipse 100% 80% at 30% 10%, rgba(120,53,254,0.18) 0%, transparent 50%),
    radial-gradient(ellipse 80% 70% at 80% 90%, rgba(189,171,255,0.08) 0%, transparent 55%),
    #000000;

  --glass-bg:        rgba(15, 0, 30, 0.55);
  --glass-bg-hover:  rgba(30, 10, 50, 0.65);
  --glass-bg-active: rgba(120, 53, 254, 0.14);
  --glass-border:    linear-gradient(135deg, rgba(189,171,255,0.20) 0%, rgba(120,53,254,0.06) 50%, rgba(189,171,255,0.14) 100%);
  --glass-border-strong: rgba(189,171,255,0.22);

  --blur-strong: blur(40px) saturate(220%);
  --blur-medium: blur(28px) saturate(180%);
  --blur-light:  blur(16px) saturate(150%);

  --text:          #FFFFFF;
  --text-muted:    #B5A8D4;
  --text-dim:      #6E5F94;
  --text-inverted: #000000;

  --accent:        #BDABFF;
  --accent-hover:  #D6C6FF;
  --accent-glow:   0 0 32px rgba(189, 171, 255, 0.55);
  --accent-text:   #000000;

  --success: #BDABFF;
  --danger:  #FF4E6B;
  --warning: #FFB84E;
  --info:    #7835FE;

  --shadow-float:
    0 2px 4px rgba(0,0,0,0.50),
    0 8px 24px rgba(0,0,0,0.65),
    0 24px 60px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(189,171,255,0.10);
  --shadow-hover:
    0 4px 8px rgba(0,0,0,0.55),
    0 16px 40px rgba(0,0,0,0.70),
    0 32px 80px rgba(0,0,0,0.60),
    inset 0 1px 0 rgba(189,171,255,0.18);
  --shadow-press: 0 1px 2px rgba(0,0,0,0.30),
                  0 4px 12px rgba(0,0,0,0.45),
                  inset 0 1px 0 rgba(189,171,255,0.08);

  --neon-glow: 0 0 20px rgba(189,171,255,0.20), 0 0 40px rgba(120,53,254,0.10);

  color-scheme: dark;
}

/* =====================================================================
   TOKENS — LIGHT THEME
   ===================================================================== */

[data-theme="light"] {
  --nm-black:   #F8FAFC;
  --nm-black-2: #EEF1F6;
  --nm-graphite:   #FFFFFF;
  --nm-graphite-2: #E5E9F0;
  --nm-white:  #0F0F0F;
  --nm-purple: #BDABFF;
  --nm-violet:   #9466FF;

  --ambient-bg: radial-gradient(ellipse 140% 100% at 20% 0%, rgba(120, 53, 254, 0.18) 0%, transparent 50%),
                radial-gradient(ellipse 120% 100% at 85% 100%, rgba(189, 171, 255, 0.12) 0%, transparent 55%),
                linear-gradient(180deg, #FFFFFF 0%, #E8ECF2 50%, #FFFFFF 100%);

  --glass-bg:        rgba(255, 255, 255, 0.62);
  --glass-bg-hover:  rgba(255, 255, 255, 0.80);
  --glass-bg-active: rgba(120, 53, 254, 0.12);
  --glass-border:    linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.50) 50%, rgba(255,255,255,0.80) 100%);
  --glass-border-strong: rgba(15, 15, 15, 0.12);

  --text:          #0F0F0F;
  --text-muted:    #4A5260;
  --text-dim:      #8A92A0;
  --text-inverted: #FFFFFF;

  --accent:        #BDABFF;
  --accent-hover:  #9466FF;
  --accent-glow:   0 0 20px rgba(120, 53, 254, 0.28);
  --accent-text:   #FFFFFF;

  --danger:  #E11D48;
  --warning: #F59E0B;
  --info:    #0284C7;
  --success: #7835FE;

  --shadow-float: 0 1px 3px rgba(15,15,15,0.05),
                  0 8px 24px rgba(15,15,15,0.08),
                  0 24px 60px rgba(15,15,15,0.10),
                  inset 0 1px 0 rgba(255,255,255,0.80);
  --shadow-hover: 0 2px 6px rgba(15,15,15,0.06),
                  0 16px 40px rgba(15,15,15,0.12),
                  0 32px 80px rgba(15,15,15,0.14),
                  inset 0 1px 0 rgba(255,255,255,0.95);
  --shadow-press: 0 1px 2px rgba(15,15,15,0.05),
                  0 4px 12px rgba(15,15,15,0.08),
                  inset 0 1px 0 rgba(255,255,255,0.60);

  --neon-glow: 0 0 20px rgba(120,53,254,0.18);

  color-scheme: light;
}

/* =====================================================================
   RESET + BASE
   ===================================================================== */

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  color: var(--text);
  background: var(--ambient-bg);
  background-attachment: fixed;
  min-height: 100vh;

  transition: background 600ms cubic-bezier(0.16, 1, 0.3, 1),
              color 300ms ease;
}

/* Ambient orbs flutuando (efeito spatial sutil) */
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  z-index: -1;
  animation: float 18s ease-in-out infinite;
}
body::before {
  width: 500px;
  height: 500px;
  top: -200px;
  left: -100px;
  background: radial-gradient(circle, rgba(120, 53, 254, 0.12), transparent 70%);
}
body::after {
  width: 600px;
  height: 600px;
  bottom: -250px;
  right: -150px;
  background: radial-gradient(circle, rgba(120, 53, 254, 0.08), transparent 70%);
  animation-delay: -9s;
  animation-duration: 22s;
}
[data-theme="light"] body::before {
  background: radial-gradient(circle, rgba(120, 53, 254, 0.20), transparent 70%);
}
[data-theme="light"] body::after {
  background: radial-gradient(circle, rgba(100, 180, 220, 0.18), transparent 70%);
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -40px) scale(1.08); }
  66%      { transform: translate(-20px, 30px) scale(0.95); }
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  margin: 0 0 var(--space-3, 12px);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
}
h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.028em; }
h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.024em; }
h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.018em; }
h4 { font-size: 15px; font-weight: 600; }

p { margin: 0 0 var(--space-3, 12px); }

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 180ms cubic-bezier(0.16, 1, 0.3, 1),
              text-shadow 180ms ease;
}
a:hover {
  color: var(--accent-hover);
  text-shadow: var(--neon-glow);
}

hr {
  border: 0;
  border-top: 1px solid var(--glass-border-strong);
  margin: var(--space-5, 24px) 0;
  opacity: 0.5;
}

code {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 2px 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-strong);
  border-radius: 6px;
  font-feature-settings: 'calt' 0;
}

/* =====================================================================
   SPACING TOKENS
   ===================================================================== */

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --dur-fast: 180ms;
  --dur-base: 280ms;
  --dur-slow: 480ms;
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* =====================================================================
   LAYOUT
   ===================================================================== */

.layout {
  display: flex;
  min-height: 100vh;
  gap: var(--space-5);
  padding: var(--space-5);
  max-width: 1600px;
  margin: 0 auto;
}

.content {
  flex: 1;
  min-width: 0;
  max-width: 1280px;
  padding: 0;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

/* =====================================================================
   GLASS SURFACES (card, sidebar, topbar)
   ===================================================================== */

.card,
.glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--blur-strong);
  -webkit-backdrop-filter: var(--blur-strong);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              background var(--dur-base) var(--ease);
}

/* Borda translúcida com gradient (refração de luz) */
.card::before,
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--glass-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* Highlight (sheen) sutil no topo */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
  pointer-events: none;
  border-radius: inherit;
}
[data-theme="light"] .card::after {
  background: linear-gradient(180deg, rgba(255,255,255,0.60) 0%, transparent 100%);
}

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

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.card--highlight {
  background: linear-gradient(135deg,
    rgba(120, 53, 254, 0.10) 0%,
    var(--glass-bg) 50%);
  box-shadow: var(--shadow-float), var(--neon-glow);
}
.card--highlight::before {
  background: linear-gradient(135deg, rgba(120,53,254,0.45), rgba(120,53,254,0.10) 50%, rgba(120,53,254,0.30));
}

/* =====================================================================
   SIDEBAR (flutuante, com glass)
   ===================================================================== */

.sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: var(--space-3);
  align-self: flex-start;
  max-height: calc(100vh - var(--space-3) * 2);
  overflow-y: auto;
  z-index: 50;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-lg);
  /* background, blur, shadow estão na regra .sidebar/.topbar mais abaixo (line ~1192) */
}
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--glass-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }

.sidebar .logo {
  margin-bottom: var(--space-3);
  padding: var(--space-1) var(--space-2) var(--space-2);
  display: flex;
  justify-content: center;
}
.sidebar .logo img {
  max-width: 150px;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(189, 171, 255, 0.40));
  transition: filter var(--dur-base) var(--ease);
}
.auth-logo {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(189, 171, 255, 0.40));
  transition: filter var(--dur-base) var(--ease);
}

[data-theme="light"] .sidebar .logo img,
[data-theme="light"] .auth-logo {
  /* Light mode: logo preta com sombra sutil */
  filter: drop-shadow(0 4px 16px rgba(15, 15, 15, 0.14));
}

.sidebar nav a {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  margin-bottom: 3px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  position: relative;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              padding-left var(--dur-base) var(--ease),
              text-shadow var(--dur-fast) var(--ease);
}
.sidebar nav a:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
  text-shadow: none;
  padding-left: 22px;
}
.sidebar nav a.active {
  background:
    linear-gradient(90deg, rgba(120,53,254,0.18), rgba(189,171,255,0.04)),
    var(--lg-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: var(--accent);
  font-weight: 600;
  border: 0.5px solid rgba(189,171,255,0.18);
  box-shadow:
    inset 3px 0 0 var(--accent),
    0 0 0 0.5px rgba(255,255,255,0.04) inset,
    0 4px 12px rgba(0,0,0,0.20);
  text-shadow: none;
}

/* =====================================================================
   TOPBAR
   ===================================================================== */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  margin-bottom: var(--space-5);
  border-radius: var(--radius-md);
  position: sticky;
  top: var(--space-5);
  z-index: 40;
  /* background, blur, shadow estão na regra .sidebar/.topbar mais abaixo */
}
.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--glass-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.topbar > * { position: relative; z-index: 1; }

/* Platform switcher (segmented control) */
.platform-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--glass-border-strong);
  border-radius: 999px;
  backdrop-filter: var(--blur-light);
  -webkit-backdrop-filter: var(--blur-light);
}
[data-theme="light"] .platform-switch { background: rgba(15,15,15,0.04); }

.platform-switch a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: all var(--dur-fast) var(--ease);
}
.platform-switch a:hover:not(.active) {
  color: var(--text);
  background: var(--glass-bg-hover);
  text-shadow: none;
}
.platform-switch a.active {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--neon-glow);
  text-shadow: none;
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Theme toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-strong);
  color: var(--text);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease);
  backdrop-filter: var(--blur-light);
  font-size: 16px;
}
.theme-toggle:hover {
  background: var(--glass-bg-hover);
  transform: rotate(20deg) scale(1.05);
}

/* =====================================================================
   BUTTONS
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              color var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); transition-duration: 80ms; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 4px 16px rgba(120, 53, 254, 0.25), var(--neon-glow);
  text-shadow: none;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-text);
  box-shadow: 0 6px 24px rgba(120, 53, 254, 0.40), 0 0 30px rgba(120, 53, 254, 0.30);
  text-shadow: none;
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text);
  border-color: var(--glass-border-strong);
  backdrop-filter: var(--blur-medium);
  -webkit-backdrop-filter: var(--blur-medium);
}
.btn-secondary:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--glass-bg);
  text-shadow: none;
}

.btn-danger {
  background: rgba(255, 78, 107, 0.15);
  color: var(--danger);
  border-color: rgba(255, 78, 107, 0.30);
}
.btn-danger:hover {
  background: rgba(255, 78, 107, 0.25);
  color: var(--danger);
}

/* =====================================================================
   FORMS
   ===================================================================== */

.form-group { margin-bottom: var(--space-4); }
.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.form-control,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="date"],
input[type="search"], input[type="file"], select, textarea {
  width: 100%;
  padding: 11px 16px;
  color: var(--text);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: var(--blur-light);
  -webkit-backdrop-filter: var(--blur-light);
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
.form-control:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--glass-bg-hover);
  box-shadow: 0 0 0 4px rgba(120, 53, 254, 0.12), var(--neon-glow);
}
[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  box-shadow: 0 0 0 4px rgba(120, 53, 254, 0.15);
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A0A6AE' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

input[type="color"] {
  padding: 4px;
  height: 42px;
  cursor: pointer;
}

/* =====================================================================
   TABLES
   ===================================================================== */

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--blur-strong);
  -webkit-backdrop-filter: var(--blur-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-float);
  position: relative;
}
.table::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--glass-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.table th,
.table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border-strong);
  position: relative;
}
.table th {
  background: rgba(0,0,0,0.15);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
[data-theme="light"] .table th { background: rgba(15,15,15,0.03); }

.table tbody tr { transition: background var(--dur-fast) var(--ease); }
.table tbody tr:hover {
  background: var(--glass-bg-hover);
}
.table tbody tr:last-child td { border-bottom: 0; }

.table td code { background: transparent; border: 0; padding: 0; color: var(--accent); }

/* =====================================================================
   BADGES
   ===================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--glass-bg);
  color: var(--text-muted);
  border: 1px solid var(--glass-border-strong);
  backdrop-filter: var(--blur-light);
}
.badge-success {
  background: rgba(120, 53, 254, 0.12);
  color: var(--accent);
  border-color: rgba(120, 53, 254, 0.28);
}
.badge-danger {
  background: rgba(255, 78, 107, 0.12);
  color: var(--danger);
  border-color: rgba(255, 78, 107, 0.28);
}
.badge-warning {
  background: rgba(255, 184, 78, 0.12);
  color: var(--warning);
  border-color: rgba(255, 184, 78, 0.28);
}

/* =====================================================================
   UTILS
   ===================================================================== */

.text-muted { color: var(--text-muted); }
.text-dim   { color: var(--text-dim); }
.text-accent{ color: var(--accent); text-shadow: var(--neon-glow); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 24px; }

.flex            { display: flex; }
.flex-col        { flex-direction: column; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }

.w-full { width: 100%; }

/* =====================================================================
   SCROLLBAR (custom)
   ===================================================================== */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--glass-border-strong);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: content-box; }

/* =====================================================================
   PAGE ENTER ANIMATION
   ===================================================================== */

main > *, .card, .table, .topbar {
  animation: fade-up 500ms var(--ease) backwards;
}
main > *:nth-child(1) { animation-delay: 0ms; }
main > *:nth-child(2) { animation-delay: 60ms; }
main > *:nth-child(3) { animation-delay: 120ms; }
main > *:nth-child(4) { animation-delay: 180ms; }
main > *:nth-child(5) { animation-delay: 240ms; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =====================================================================
   RESPONSIVE — Mobile first (quebras em 1024 / 768 / 480)
   ===================================================================== */

/* Tablets / laptops pequenos */
@media (max-width: 1024px) {
  .layout { padding: var(--space-4); gap: var(--space-4); }
  .sidebar { width: 220px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
}

/* Mobile — reestrutura sidebar como barra horizontal */
@media (max-width: 900px) {
  body { overflow-x: hidden; }

  .layout {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }

  /* Sidebar vira barra horizontal de pills (scrollable) */
  .sidebar {
    width: 100%;
    max-width: 100%;           /* sem isso o filho flex pode estourar */
    position: sticky;
    top: 8px;
    max-height: none;
    overflow: hidden;          /* mantém o scroll dentro do <nav> filho */
    padding: 10px 12px;
    z-index: 50;
    border-radius: var(--radius-md);
    /* Indicador visual que tem mais conteúdo à direita (fade neon) */
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
            mask-image: linear-gradient(to right, #000 92%, transparent);
  }
  .sidebar .logo { display: none; }
  .sidebar nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    width: 100%;
    min-width: 0;              /* libera o flex pra rolar ao invés de estourar */
    scroll-snap-type: x proximity;
    touch-action: pan-x;       /* iOS: permite arrasto horizontal suave */
  }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav hr { display: none; }
  .sidebar nav a {
    white-space: nowrap;
    padding: 8px 14px;
    margin: 0;
    font-size: 12.5px;
    flex-shrink: 0;
    border-radius: 999px;
    scroll-snap-align: start;
  }
  .sidebar nav a:hover { padding-left: 14px; }
  .sidebar nav a.active {
    background: var(--accent);
    color: var(--accent-text);
    box-shadow: none;
    text-shadow: none;
  }

  /* Topbar empilha e platform switcher fica scrollable */
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  .topbar .platform-switch {
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
    flex-wrap: nowrap;
    max-width: 100%;
    align-items: center;         /* centraliza em vez de esticar */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    -webkit-mask-image: linear-gradient(to right, #000 94%, transparent);
            mask-image: linear-gradient(to right, #000 94%, transparent);
  }
  .topbar .platform-switch::-webkit-scrollbar { display: none; }
  /* Todos os items com altura fixa uniforme — sem isso o ativo vira pill oval gigante */
  .topbar .platform-switch a {
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 26px;                /* altura fixa uniforme pra todos */
    box-sizing: border-box;
  }
  .topbar .platform-switch a.active {
    box-shadow: 0 0 0 1px rgba(120,53,254,0.3);  /* glow sutil sem vazar */
  }
  .topbar .user-info {
    justify-content: space-between;
    width: 100%;
  }

  /* Cards: menos padding */
  .card { padding: 18px; border-radius: var(--radius-md); }

  /* Tipografia mobile */
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }

  /* Todos os inline grids colapsam para 1 coluna */
  main [style*="grid-template-columns"],
  .card [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Botões mais compactos */
  .btn { padding: 10px 16px; font-size: 13px; }

  /* Tabelas: scroll horizontal funcional em mobile (Instagram-style) */
  main .table,
  .card > .table,
  .card + .table {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    max-width: 100%;
    width: 100%;
    /* sombras de gradiente nas bordas indicam que rola horizontal */
    background-image:
      radial-gradient(farthest-side at 0 50%, rgba(120,53,254,0.20), rgba(0,0,0,0)),
      radial-gradient(farthest-side at 100% 50%, rgba(120,53,254,0.20), rgba(0,0,0,0));
    background-position: 0 0, 100% 0;
    background-repeat: no-repeat;
    background-size: 14px 100%, 14px 100%;
    background-attachment: scroll, scroll;
  }
  /* tbody/thead VOLTAM a ser table com largura natural — permite estourar e o block scrolla */
  main .table > thead,
  main .table > tbody,
  main .table > tfoot {
    display: table;
    width: max-content;
    min-width: 100%;
    table-layout: auto;
  }
  main .table tr { display: table-row; }
  main .table th,
  main .table td {
    padding: 10px 12px;
    font-size: 12.5px;
  }
  /* Botões dentro de células ficam compactos no mobile */
  main .table td .btn,
  main .table td button,
  main .table td a.btn {
    padding: 4px 8px !important;
    font-size: 11.5px !important;
  }

  /* Filtros e forms em flex vertical */
  .card form.flex,
  .card .flex.gap-3 {
    flex-direction: column;
    align-items: stretch !important;
  }
  .card form.flex > *,
  .card .flex.gap-3 > * {
    width: 100%;
  }

  /* Ambient orbs menores (performance mobile) */
  body::before { width: 300px; height: 300px; }
  body::after  { width: 360px; height: 360px; }
}

/* Smartphones pequenos */
@media (max-width: 480px) {
  .layout { padding: 8px; gap: 10px; }
  .card { padding: 14px; border-radius: 14px; }
  .topbar { padding: 10px 12px; }
  .sidebar { padding: 8px 10px; }

  h1 { font-size: 22px; }
  h2 { font-size: 18px; }

  .sidebar nav a { padding: 7px 12px; font-size: 12px; }
  .platform-switch a { padding: 5px 11px; font-size: 10.5px; }
  .btn { padding: 9px 14px; font-size: 12.5px; }

  main .table th,
  main .table td { padding: 8px 10px; font-size: 11.5px; }

  .user-info > div { font-size: 12px !important; }
  .theme-toggle { width: 34px; height: 34px; }

  /* Auth pages (login/cadastro) com menos margem */
  .auth-logo { max-width: 140px; }
}

/* Desktops muito largos — sobe o limite total */
@media (min-width: 1800px) {
  .layout { max-width: 1760px; }
  .content { max-width: 1400px; }
}

/* =====================================================================
   LOGO RESPONSIVO AO TEMA — branco no dark, preto no light
   ===================================================================== */
[data-theme="dark"]  .logo-light { display: none !important; }
[data-theme="light"] .logo-dark  { display: none !important; }
/* =====================================================================
   APPLE LIQUID GLASS 2026 — Vision Pro / macOS Sequoia tier
   Camada extra: specular highlights, edge refraction, inner glow
   ===================================================================== */

:root, [data-theme="dark"] {
  /* Liquid Glass — DARK = preto puro */
  --lg-blur:        blur(48px) saturate(220%) brightness(105%);
  --lg-blur-strong: blur(64px) saturate(240%) brightness(108%);
  --lg-bg:          rgba(15, 0, 30, 0.50);
  --lg-bg-hover:    rgba(30, 10, 50, 0.60);
  --lg-sheen:       linear-gradient(180deg, rgba(189,171,255,0.14) 0%, rgba(189,171,255,0.04) 30%, transparent 60%);
  --lg-border-side: rgba(189,171,255,0.14);

  --lg-shadow:
    0 0 0 0.5px rgba(189,171,255,0.08) inset,
    0 1px 0 rgba(189,171,255,0.14) inset,
    0 -1px 0 rgba(0,0,0,0.40) inset,
    0 2px 6px rgba(0,0,0,0.40),
    0 12px 32px rgba(0,0,0,0.55),
    0 32px 80px rgba(0,0,0,0.50);

  --lg-shadow-hover:
    0 0 0 0.5px rgba(189,171,255,0.14) inset,
    0 1px 0 rgba(189,171,255,0.22) inset,
    0 -1px 0 rgba(0,0,0,0.40) inset,
    0 0 0 1px rgba(189,171,255,0.24),
    0 4px 12px rgba(0,0,0,0.45),
    0 24px 60px rgba(0,0,0,0.65),
    0 0 32px rgba(189,171,255,0.28);
}

[data-theme="light"] {
  --lg-blur:        blur(40px) saturate(180%) brightness(102%);
  --lg-blur-strong: blur(60px) saturate(220%) brightness(105%);
  --lg-bg:          rgba(255, 255, 255, 0.55);
  --lg-bg-hover:    rgba(255, 255, 255, 0.78);

  --lg-sheen:       linear-gradient(180deg,
                      rgba(255,255,255,0.85) 0%,
                      rgba(255,255,255,0.30) 30%,
                      transparent 60%);

  --lg-border-side: rgba(15,15,15,0.10);

  --lg-shadow:
    0 0 0 0.5px rgba(15,15,15,0.04) inset,
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 -1px 0 rgba(15,15,15,0.04) inset,
    0 1px 3px rgba(15,15,15,0.04),
    0 8px 24px rgba(15,15,15,0.08),
    0 24px 60px rgba(15,15,15,0.10);

  --lg-shadow-hover:
    0 0 0 0.5px rgba(15,15,15,0.06) inset,
    0 1px 0 rgba(255,255,255,1) inset,
    0 -1px 0 rgba(15,15,15,0.04) inset,
    0 0 0 1px rgba(120,53,254,0.22),
    0 4px 12px rgba(15,15,15,0.06),
    0 24px 60px rgba(15,15,15,0.14),
    0 0 32px rgba(120,53,254,0.18);
}

/* CARDS — liquid glass core */
.card,
.glass {
  background: var(--lg-bg) !important;
  backdrop-filter: var(--lg-blur) !important;
  -webkit-backdrop-filter: var(--lg-blur) !important;
  box-shadow: var(--lg-shadow) !important;
  border: 0.5px solid var(--lg-border-side);
  isolation: isolate;
}

.card::after,
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--lg-sheen);
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  transition: opacity var(--dur-base) var(--ease);
}

.card::before,
.glass::before {
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.22) 0%,
      rgba(255,255,255,0.06) 30%,
      rgba(120,53,254,0.10) 70%,
      rgba(120,53,254,0.22) 100%) !important;
}

.card:hover {
  box-shadow: var(--lg-shadow-hover) !important;
  background: var(--lg-bg-hover) !important;
  transform: translateY(-2px);
}

.card--highlight {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(120,53,254,0.18), transparent 70%),
    var(--lg-bg) !important;
  box-shadow:
    var(--lg-shadow),
    0 0 48px rgba(120,53,254,0.28),
    0 0 96px rgba(120,53,254,0.14) !important;
}
.card--highlight::before {
  background:
    linear-gradient(135deg,
      rgba(120,53,254,0.55) 0%,
      rgba(189,171,255,0.20) 50%,
      rgba(120,53,254,0.45) 100%) !important;
}

/* SIDEBAR & TOPBAR — liquid glass dark profundo, borda visível */
.sidebar,
.topbar {
  background: rgba(12, 6, 24, 0.55) !important;
  backdrop-filter: blur(50px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(50px) saturate(180%) !important;
  box-shadow:
    0 0 0 1px rgba(189,171,255,0.12) inset,
    0 1px 0 rgba(189,171,255,0.18) inset,
    0 -1px 0 rgba(0,0,0,0.50) inset,
    0 8px 32px rgba(0,0,0,0.50) !important;
  border: 1px solid rgba(189,171,255,0.14) !important;
}
[data-theme="light"] .sidebar,
[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.40) !important;
  box-shadow:
    0 0 0 0.5px rgba(15,15,15,0.05) inset,
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 -1px 0 rgba(15,15,15,0.04) inset,
    0 8px 32px rgba(15,15,15,0.10) !important;
}

/* BOTÕES */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary {
  background: linear-gradient(180deg, #8B5CFF 0%, #7835FE 50%, #5A1FCC 100%) !important;
  color: #FFFFFF !important;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.18) inset,
    0 1px 0 rgba(255,255,255,0.30) inset,
    0 -1px 0 rgba(0,0,0,0.20) inset,
    0 2px 6px rgba(120,53,254,0.30),
    0 8px 24px rgba(120,53,254,0.20) !important;
  border: 0.5px solid rgba(120,53,254,0.40);
  text-shadow: 0 1px 0 rgba(0,0,0,0.18);
  transition: all var(--dur-base) var(--ease);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.20) 0%, transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #9B6CFF 0%, #8845FF 50%, #6A2FDC 100%) !important;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.22) inset,
    0 1px 0 rgba(255,255,255,0.36) inset,
    0 -1px 0 rgba(0,0,0,0.22) inset,
    0 4px 12px rgba(120,53,254,0.40),
    0 12px 32px rgba(120,53,254,0.32),
    0 0 24px rgba(120,53,254,0.24) !important;
  transform: translateY(-1px);
}

.btn-ghost,
.btn-secondary {
  background: var(--lg-bg) !important;
  backdrop-filter: var(--lg-blur);
  -webkit-backdrop-filter: var(--lg-blur);
  border: 0.5px solid var(--lg-border-side);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06) inset,
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 2px 6px rgba(0,0,0,0.12) !important;
}
.btn-ghost:hover,
.btn-secondary:hover {
  background: var(--lg-bg-hover) !important;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.10) inset,
    0 1px 0 rgba(255,255,255,0.16) inset,
    0 4px 12px rgba(0,0,0,0.18),
    0 0 16px rgba(120,53,254,0.18) !important;
}

/* INPUTS */
.form-group input,
.form-group select,
.form-group textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  background: var(--lg-bg) !important;
  backdrop-filter: var(--lg-blur);
  -webkit-backdrop-filter: var(--lg-blur);
  border: 0.5px solid var(--lg-border-side) !important;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.04) inset,
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 1px 3px rgba(0,0,0,0.10) !important;
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
input:focus, select:focus, textarea:focus {
  border-color: rgba(120,53,254,0.55) !important;
  box-shadow:
    0 0 0 3px rgba(120,53,254,0.18),
    0 0 0 0.5px rgba(120,53,254,0.40) inset,
    0 1px 0 rgba(255,255,255,0.10) inset !important;
  outline: none;
}

/* BADGES */
.badge {
  background: var(--lg-bg) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 0.5px solid var(--lg-border-side);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06) inset,
    0 1px 0 rgba(255,255,255,0.10) inset;
}
.badge-success {
  background: linear-gradient(180deg, rgba(120,53,254,0.30), rgba(90,31,204,0.20)) !important;
  border-color: rgba(120,53,254,0.40);
  color: #FFFFFF;
}
.badge-danger {
  background: linear-gradient(180deg, rgba(255,78,107,0.28), rgba(220,38,68,0.18)) !important;
  border-color: rgba(255,78,107,0.40);
  color: #FFB8C2;
}
.badge-warning {
  background: linear-gradient(180deg, rgba(255,184,78,0.26), rgba(220,140,40,0.16)) !important;
  border-color: rgba(255,184,78,0.40);
  color: #FFE0B0;
}

/* TABELAS */
table.glass-table,
.card table { background: transparent; }
.card table thead tr,
table.glass-table thead tr {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), transparent),
    rgba(120,53,254,0.04);
  backdrop-filter: blur(8px);
}
.card table tbody tr:hover,
table.glass-table tbody tr:hover {
  background: rgba(120,53,254,0.06);
}

/* THEME TOGGLE BUTTON — Apple style */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lg-bg) !important;
  backdrop-filter: var(--lg-blur);
  -webkit-backdrop-filter: var(--lg-blur);
  border: 0.5px solid var(--lg-border-side) !important;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06) inset,
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 2px 6px rgba(0,0,0,0.14);
  transition: all var(--dur-base) var(--ease);
}
.theme-toggle:hover {
  background: var(--lg-bg-hover) !important;
  transform: rotate(15deg) scale(1.05);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.10) inset,
    0 1px 0 rgba(255,255,255,0.16) inset,
    0 4px 12px rgba(0,0,0,0.18),
    0 0 20px rgba(120,53,254,0.24);
}

/* ACENTOS */
.text-accent {
  color: #BDABFF;
  text-shadow: 0 0 24px rgba(120,53,254,0.45);
}
[data-theme="light"] .text-accent {
  color: #5A1FCC;
  text-shadow: 0 1px 12px rgba(120,53,254,0.20);
}

/* SHIMMER no card highlight */
@keyframes lg-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.card--highlight::after {
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(255,255,255,0.10) 50%,
    transparent 70%);
  background-size: 250% 100%;
  animation: lg-shimmer 8s ease-in-out infinite;
  z-index: 0;
}

/* DARK = preto profundo — só 2 toques sutis de violeta nos cantos opostos */
[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 40% 35% at 10% 5%, rgba(120,53,254,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 35% 30% at 95% 95%, rgba(189,171,255,0.06) 0%, transparent 70%),
    #000000 !important;
  background-attachment: fixed;
}

/* Logo: 2 variantes — .logo-dark mostra no dark, .logo-light no light */
.logo-black { display: none !important; } /* legado, não usar */

[data-theme="dark"] .auth-logo,
[data-theme="dark"] .sidebar .logo img,
[data-theme="dark"] .fb-corner-logo {
  filter: drop-shadow(0 0 32px rgba(189, 171, 255, 0.55));
}

/* =====================================================================
   TELA DE LOGIN ESTILO FACEBOOK
   ===================================================================== */

.fb-login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(440px, 640px);
  align-items: stretch;
  gap: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.fb-login-wrap > .fb-hero { padding: 80px 64px 40px 64px; }

@media (max-width: 980px) {
  .fb-login-wrap {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }
}

/* Logo no canto superior esquerdo (estilo Facebook) */
.fb-corner-logo {
  position: absolute;
  top: 32px;
  left: 64px;
  z-index: 10;
  width: 180px;
  height: auto;
}
@media (max-width: 980px) {
  .fb-corner-logo { left: 24px; top: 20px; width: 140px; }
}

/* Hero esquerdo */
.fb-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 40px 40px;
  min-height: 0;
  overflow: hidden;
}

.fb-hero-headline {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 20px;
  max-width: 600px;
}
.fb-hero-headline .accent-word {
  background: linear-gradient(135deg, #7835FE 0%, #BDABFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fb-hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 40px;
  max-width: 500px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .fb-hero { display: none; }
}

/* Modais decorativos flutuantes (composição visual com a marca) */
.fb-deco {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 460px;
  margin: 24px 0;
}
@media (max-width: 1200px) {
  .fb-deco { height: 380px; max-width: 500px; }
}

.fb-deco-card {
  position: absolute;
  background: var(--lg-bg);
  backdrop-filter: var(--lg-blur);
  -webkit-backdrop-filter: var(--lg-blur);
  border: 0.5px solid var(--lg-border-side);
  border-radius: 22px;
  box-shadow: var(--lg-shadow);
  overflow: hidden;
  isolation: isolate;
}
.fb-deco-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--glass-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.fb-deco-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--lg-sheen);
  pointer-events: none;
}

/* Card 1: vertical, com logo grande centro */
.fb-deco-card-1 {
  width: 240px;
  height: 320px;
  top: 40px;
  left: 60px;
  transform: rotate(-6deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(120,53,254,0.18), transparent 70%),
    var(--lg-bg);
  animation: float-slow 6s ease-in-out infinite;
}
.fb-deco-card-1 img {
  max-width: 70%;
  height: auto;
  filter: drop-shadow(0 8px 32px rgba(120, 53, 254, 0.40));
  position: relative;
  z-index: 2;
}

/* Card 2: horizontal, com simbolo */
.fb-deco-card-2 {
  width: 260px;
  height: 200px;
  top: 200px;
  left: 280px;
  transform: rotate(4deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(120,53,254,0.20), rgba(189,171,255,0.08)),
    var(--lg-bg);
  animation: float-slow 7s ease-in-out infinite reverse;
}
.fb-deco-card-2 img {
  max-width: 70%;
  height: auto;
  filter: drop-shadow(0 6px 24px rgba(189, 171, 255, 0.45));
  position: relative;
  z-index: 2;
}

/* Card 3: pequeno simbolo stand-alone */
.fb-deco-card-3 {
  width: 120px;
  height: 120px;
  top: 60px;
  left: 360px;
  transform: rotate(8deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background:
    radial-gradient(circle, rgba(189,171,255,0.20), transparent 80%),
    var(--lg-bg);
  animation: float-slow 5s ease-in-out infinite;
}
.fb-deco-card-3 img {
  max-width: 60%;
  filter: drop-shadow(0 4px 16px rgba(120, 53, 254, 0.45));
  position: relative;
  z-index: 2;
}

@keyframes float-slow {
  0%, 100% { transform: rotate(var(--rot, 0deg)) translateY(0); }
  50%      { transform: rotate(var(--rot, 0deg)) translateY(-8px); }
}
.fb-deco-card-1 { --rot: -6deg; }
.fb-deco-card-2 { --rot: 4deg; }
.fb-deco-card-3 { --rot: 8deg; }

/* PAINEL DIREITO — ocupa toda altura da viewport (Facebook style) */
.fb-login-side {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  /* Glass mais denso, separa visualmente do hero */
  background:
    linear-gradient(180deg, rgba(120,53,254,0.04) 0%, transparent 30%, rgba(120,53,254,0.04) 100%),
    var(--lg-bg);
  backdrop-filter: var(--lg-blur-strong);
  -webkit-backdrop-filter: var(--lg-blur-strong);
  border-left: 0.5px solid var(--lg-border-side);
  box-shadow: -1px 0 32px rgba(0,0,0,0.20);
}
[data-theme="dark"] .fb-login-side {
  background:
    linear-gradient(180deg, rgba(120,53,254,0.06) 0%, transparent 30%, rgba(120,53,254,0.06) 100%),
    rgba(8, 0, 16, 0.55);
}
[data-theme="light"] .fb-login-side {
  background:
    linear-gradient(180deg, rgba(120,53,254,0.04) 0%, transparent 30%, rgba(120,53,254,0.04) 100%),
    rgba(255, 255, 255, 0.65);
}
@media (max-width: 980px) {
  .fb-login-side {
    height: auto;
    min-height: auto;
    border-left: 0;
    border-top: 0.5px solid var(--lg-border-side);
    padding: 32px 24px;
  }
}

/* Form de login centralizado dentro do painel — sem card visível (segue o painel) */
.fb-login-card {
  width: 100%;
  max-width: 480px;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}
.fb-login-card::before,
.fb-login-card::after { display: none !important; }
.fb-login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--glass-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.fb-login-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--lg-sheen);
  pointer-events: none;
  border-radius: inherit;
}
.fb-login-card > * { position: relative; z-index: 1; }

.fb-login-card h2 {
  margin: 0 0 6px;
  text-align: left;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.fb-login-card .fb-sub {
  text-align: left;
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 32px;
}

.fb-login-card .form-group { margin-bottom: 16px; }
.fb-login-card .form-group input {
  width: 100%;
  padding: 18px 20px;
  font-size: 16px;
  border-radius: 12px;
  height: 58px;
}
.fb-login-card .btn-primary {
  width: 100%;
  padding: 18px 20px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 12px;
  margin-top: 12px;
  height: 58px;
}
.fb-login-card .fb-forgot {
  text-align: center;
  margin: 22px 0 0;
  font-size: 14px;
}
.fb-login-card .fb-forgot a {
  color: var(--text-muted);
  text-decoration: none;
}
.fb-login-card .fb-forgot a:hover {
  color: var(--accent);
}
.fb-login-card .fb-divider {
  height: 1px;
  background: var(--lg-border-side);
  margin: 28px 0;
}
.fb-login-card .fb-create-btn {
  display: block;
  width: 60%;
  margin: 0 auto;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(120,53,254,0.30);
  color: var(--accent);
  transition: all 0.2s var(--ease);
}
.fb-login-card .fb-create-btn:hover {
  background: rgba(120,53,254,0.10);
  border-color: rgba(120,53,254,0.55);
  transform: translateY(-1px);
}

/* Theme switcher (3-state pill) */
.fb-theme-switcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--lg-bg);
  backdrop-filter: var(--lg-blur);
  -webkit-backdrop-filter: var(--lg-blur);
  border: 0.5px solid var(--lg-border-side);
  border-radius: 999px;
  box-shadow: var(--lg-shadow);
}
.fb-theme-switcher button {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
}
.fb-theme-switcher button.active {
  background: linear-gradient(180deg, #8B5CFF, #7835FE);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(120,53,254,0.40);
}
.fb-theme-switcher button:hover:not(.active) {
  background: rgba(120,53,254,0.10);
  color: var(--text);
}

/* Footer hero accent (chip de versão) */
.fb-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--lg-bg);
  backdrop-filter: var(--lg-blur);
  -webkit-backdrop-filter: var(--lg-blur);
  border: 0.5px solid var(--lg-border-side);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  width: fit-content;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.fb-hero-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}
/* =====================================================================
   LOGIN COMPOSITION RICH — estilo Facebook
   Phone mockup + cards notification + avatares + ícones flutuantes
   ===================================================================== */

.fb-deco {
  position: relative;
  width: 100%;
  max-width: 620px;
  height: 540px;
  margin: 24px 0;
}
@media (max-width: 1200px) {
  .fb-deco { height: 460px; max-width: 520px; }
}

/* ==== PHONE MOCKUP CENTRAL ==== */
.fb-phone {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 240px;
  height: 460px;
  border-radius: 38px;
  background: linear-gradient(135deg, #1a0d3d 0%, #0F0F0F 50%, #1a0d3d 100%);
  border: 8px solid #0a0014;
  box-shadow:
    0 0 0 1px rgba(189,171,255,0.20),
    0 30px 60px rgba(0,0,0,0.55),
    0 12px 24px rgba(120,53,254,0.20);
  overflow: hidden;
  isolation: isolate;
  animation: phone-bob 8s ease-in-out infinite;
}
.fb-phone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #0a0014;
  border-radius: 0 0 14px 14px;
  z-index: 5;
}
.fb-phone-content {
  position: absolute;
  inset: 0;
  padding: 36px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fb-phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 12px;
  border-bottom: 1px solid rgba(189,171,255,0.10);
}
.fb-phone-header .logo-mini {
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(90deg, #FFFFFF, #BDABFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.fb-phone-header .dot-indicator {
  width: 6px; height: 6px; border-radius: 50%;
  background: #BDABFF;
  box-shadow: 0 0 8px #BDABFF;
}
.fb-phone-stat {
  background: rgba(120, 53, 254, 0.10);
  border: 0.5px solid rgba(189,171,255,0.14);
  border-radius: 12px;
  padding: 10px 12px;
  backdrop-filter: blur(8px);
}
.fb-phone-stat .label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #B5A8D4;
  margin: 0;
}
.fb-phone-stat .value {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 2px 0 0;
  letter-spacing: -0.02em;
}
.fb-phone-stat .value.accent {
  background: linear-gradient(90deg, #BDABFF, #7835FE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fb-phone-stat .delta {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #7835FE;
  margin-top: 2px;
}

.fb-phone-chart {
  flex: 1;
  background: linear-gradient(180deg, rgba(120,53,254,0.06), transparent);
  border: 0.5px solid rgba(189,171,255,0.10);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}
.fb-phone-chart-title {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #B5A8D4;
  margin: 0 0 6px;
}
.fb-phone-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
}
.fb-phone-bars .bar {
  flex: 1;
  background: linear-gradient(180deg, #BDABFF, #7835FE);
  border-radius: 3px;
  min-height: 12px;
  box-shadow: 0 0 12px rgba(120, 53, 254, 0.40);
  animation: bar-grow 2s ease-out;
}

@keyframes bar-grow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); }
}
@keyframes phone-bob {
  0%, 100% { transform: translateX(-50%) rotate(-3deg) translateY(0); }
  50%      { transform: translateX(-50%) rotate(-3deg) translateY(-12px); }
}

/* ==== CARDS DE NOTIFICATION FLUTUANTES ==== */
.fb-notif {
  position: absolute;
  background: var(--lg-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 0.5px solid var(--lg-border-side);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06) inset,
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 8px 28px rgba(0,0,0,0.40);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  animation: notif-float 6s ease-in-out infinite;
}

/* Notif 1: comissão recebida (top-left) */
.fb-notif-1 {
  top: 70px;
  left: 0;
  transform: rotate(-4deg);
  --rot: -4deg;
  animation-delay: 0s;
}
/* Notif 2: novo CPA (right top) */
.fb-notif-2 {
  top: 130px;
  right: -10px;
  transform: rotate(5deg);
  --rot: 5deg;
  animation-delay: 1s;
}
/* Notif 3: meta atingida (bottom left) */
.fb-notif-3 {
  bottom: 30px;
  left: 20px;
  transform: rotate(-3deg);
  --rot: -3deg;
  animation-delay: 2s;
}

@keyframes notif-float {
  0%, 100% { transform: rotate(var(--rot, 0deg)) translateY(0); }
  50%      { transform: rotate(var(--rot, 0deg)) translateY(-6px); }
}

.fb-notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fb-notif-icon.purple {
  background: linear-gradient(135deg, #7835FE, #5A1FCC);
  box-shadow: 0 4px 12px rgba(120,53,254,0.40);
}
.fb-notif-icon.violet {
  background: linear-gradient(135deg, #BDABFF, #7835FE);
  box-shadow: 0 4px 12px rgba(189,171,255,0.40);
}
.fb-notif-icon.gold {
  background: linear-gradient(135deg, #FFD24E, #E89A1E);
  box-shadow: 0 4px 12px rgba(255,210,78,0.35);
}
.fb-notif-icon svg { color: #FFFFFF; }

.fb-notif-content { min-width: 0; }
.fb-notif-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}
.fb-notif-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0;
  white-space: nowrap;
}
.fb-notif-amount {
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(90deg, #BDABFF, #7835FE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==== AVATAR CIRCLE COM SÍMBOLO ==== */
.fb-avatar {
  position: absolute;
  bottom: 80px;
  right: 30px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a0d3d, #2a1245);
  border: 4px solid rgba(120,53,254,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(189,171,255,0.30),
    0 12px 32px rgba(120,53,254,0.30),
    0 0 24px rgba(120,53,254,0.40);
  animation: avatar-pulse 4s ease-in-out infinite;
}
.fb-avatar img {
  width: 60%;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(189, 171, 255, 0.55));
}
@keyframes avatar-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(189,171,255,0.30), 0 12px 32px rgba(120,53,254,0.30), 0 0 24px rgba(120,53,254,0.40); }
  50%      { box-shadow: 0 0 0 1px rgba(189,171,255,0.50), 0 12px 32px rgba(120,53,254,0.50), 0 0 40px rgba(120,53,254,0.60); }
}

/* ==== ÍCONES FLUTUANTES (decorativos) ==== */
.fb-emoji {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.40);
  animation: emoji-float 5s ease-in-out infinite;
}
.fb-emoji-1 {
  top: 0;
  left: 30px;
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #BDABFF, #7835FE);
  font-size: 28px;
  animation-delay: 0s;
}
.fb-emoji-2 {
  top: 40px;
  right: 60px;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #FFD24E, #E89A1E);
  font-size: 24px;
  animation-delay: 1.5s;
}
.fb-emoji-3 {
  bottom: 90px;
  left: 60px;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, #FF4E6B, #C2304A);
  font-size: 26px;
  animation-delay: 2.5s;
}
@keyframes emoji-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%      { transform: translateY(-10px) rotate(-5deg); }
  66%      { transform: translateY(5px) rotate(5deg); }
}

/* Light theme tweaks */
[data-theme="light"] .fb-phone {
  background: linear-gradient(135deg, #FFFFFF 0%, #F2F0FF 50%, #FFFFFF 100%);
  border-color: #E5DFFF;
}
[data-theme="light"] .fb-phone-stat .value { color: #1a0d3d; }
[data-theme="light"] .fb-phone-stat .label { color: #5A1FCC; }
[data-theme="light"] .fb-phone-chart-title { color: #5A1FCC; }
[data-theme="light"] .fb-phone-header .logo-mini {
  background: linear-gradient(90deg, #1a0d3d, #7835FE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .fb-avatar {
  background: linear-gradient(135deg, #FFFFFF, #F0EBFF);
}

/* =====================================================================
   GALAXY BUTTON — by zaby_4213 (uiverse.io)
   ===================================================================== */
.galaxy-btn {
  /* Cores da paleta Nemeziz: roxo + violeta + roxo escuro (sem azul/rosa) */
  --btn-bg: linear-gradient(180deg, #2A1860 0%, #1A0D3D 100%);
  --btn-bg-solid: #1A0D3D;
  --btn-text: #ffffff;
  --btn-primary: #7835FE;
  --btn-secondary: #BDABFF;
  --btn-accent: #5A1FCC;
  --btn-font-size: 16px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: var(--btn-font-size);
  padding: 0.9em 2em;
  border-radius: 0.75em;
  border: none;
  background: var(--btn-bg);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow:
    0 0 0 0.5px rgba(189, 171, 255, 0.30) inset,
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 0.5em 1.5em -0.3em rgba(120, 53, 254, 0.55);
}

/* Light theme: BG mais claro, glow mais forte */
[data-theme="light"] .galaxy-btn {
  --btn-bg: linear-gradient(180deg, #1F0F45 0%, #0A0420 100%);
  --btn-bg-solid: #0A0420;
}

/* Black theme: BG preto puro com inner glow violeta */
[data-theme="dark"] .galaxy-btn {
  --btn-bg: linear-gradient(180deg, #1A0D3D 0%, #050008 100%);
  --btn-bg-solid: #050008;
  box-shadow:
    0 0 0 0.5px rgba(189, 171, 255, 0.40) inset,
    0 1px 0 rgba(189, 171, 255, 0.28) inset,
    0 0.5em 2em -0.3em rgba(120, 53, 254, 0.70),
    0 0 32px rgba(189, 171, 255, 0.20);
}
.galaxy-btn:focus-visible {
  outline: 2px solid var(--btn-primary);
  outline-offset: 4px;
}
.galaxy-btn:active { transform: scale(0.96); }
.galaxy-btn__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  position: relative;
  z-index: 2;
  color: var(--btn-text);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.galaxy-btn__icon {
  width: 1.25em;
  height: 1.25em;
  transition: transform 0.3s ease;
  fill: var(--btn-text);
}
.galaxy-btn:hover .galaxy-btn__icon {
  transform: translateX(0.25em) rotate(-10deg);
}
.galaxy-btn::before {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: 0;
  background: conic-gradient(
    from 0deg,
    var(--btn-bg-solid) 0deg,
    var(--btn-primary) 50deg,
    var(--btn-secondary) 110deg,
    var(--btn-accent) 170deg,
    var(--btn-bg-solid) 200deg,
    var(--btn-primary) 260deg,
    var(--btn-secondary) 320deg,
    var(--btn-bg-solid) 360deg
  );
  border-radius: 0.85em;
  animation: rotate-nebula 4s linear infinite;
  filter: blur(10px);
  opacity: 0.95;
  transition: opacity 0.3s ease;
}
.galaxy-btn:hover::before {
  opacity: 1;
  animation-duration: 2s;
  filter: blur(14px);
}
[data-theme="dark"] .galaxy-btn::before { opacity: 1; }
.galaxy-btn::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--btn-bg);
  border-radius: 0.6em;
  z-index: 1;
}
.galaxy-btn__stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, white 1px, transparent 1.5px),
    radial-gradient(circle at 80% 70%, white 1px, transparent 1.5px),
    radial-gradient(circle at 40% 80%, white 0.5px, transparent 1px);
  background-size: 120% 120%;
  opacity: 0.3;
  transition: opacity 0.3s ease, background-position 0.3s ease;
}
.galaxy-btn:hover .galaxy-btn__stars {
  opacity: 0.8;
  animation: star-drift 5s linear infinite alternate;
}
@keyframes rotate-nebula {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes star-drift {
  0%   { transform: scale(1); }
  100% { transform: scale(1.1) translate(-2%, -2%); }
}

/* Tamanho full-width pra usar como Submit do login */
.fb-login-card .galaxy-btn {
  width: 100%;
  font-size: 16px;
  padding: 1.1em 2em;
  margin-top: 12px;
}
.fb-login-card .galaxy-btn__content { justify-content: center; }

/* =====================================================================
   PARTÍCULAS TRIANGULARES SUBINDO — Nemeziz palette completa
   Roxo #7835FE + Violeta #BDABFF + Azul escuro #022234
   ===================================================================== */
.nm-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.nm-particle {
  position: absolute;
  bottom: -20px;
  width: 0;
  height: 0;
  opacity: 0;
  animation: particle-rise linear infinite;
  filter: drop-shadow(0 0 4px currentColor);
}
.nm-particle--purple {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid #7835FE;
  color: #7835FE;
}
.nm-particle--violet {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid #BDABFF;
  color: #BDABFF;
}
.nm-particle--blue {
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid #022234;
  color: #4D7FA5;
}
@keyframes particle-rise {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  20%  { opacity: 0.9; }
  100% { transform: translateY(-25vh) rotate(180deg); opacity: 0; }
}

/* Modo light: partículas com opacidade reduzida */
[data-theme="light"] .nm-particle { opacity: 0.6 !important; }

/* =====================================================================
   RESIZABLE TOPBAR — estilo Aceternity Resizable Navbar
   Encolhe ao scrollar, vira pill flutuante centralizado
   ===================================================================== */
.topbar {
  transition:
    width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s ease,
    box-shadow 0.3s ease !important;
}

/* Estado scrolled — pill flutuante centralizado, mais compacto */
.topbar.scrolled {
  max-width: 920px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 8px 18px !important;
  border-radius: 999px !important;
  background: rgba(8, 4, 20, 0.85) !important;
  backdrop-filter: blur(48px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(48px) saturate(180%) !important;
  box-shadow:
    0 0 0 0.5px rgba(189,171,255,0.14) inset,
    0 1px 0 rgba(189,171,255,0.20) inset,
    0 -1px 0 rgba(0,0,0,0.50) inset,
    0 12px 40px rgba(0,0,0,0.55),
    0 0 24px rgba(120,53,254,0.18) !important;
}
[data-theme="light"] .topbar.scrolled {
  background: rgba(255, 255, 255, 0.78) !important;
  box-shadow:
    0 0 0 0.5px rgba(15,15,15,0.08) inset,
    0 1px 0 rgba(255,255,255,1) inset,
    0 -1px 0 rgba(15,15,15,0.06) inset,
    0 12px 40px rgba(15,15,15,0.14),
    0 0 24px rgba(120,53,254,0.18) !important;
}

/* Quando scrolled, plataformas ficam em pills compactas */
.topbar.scrolled .plat-tabs a,
.topbar.scrolled .plat-pills a {
  padding: 6px 12px;
  font-size: 12px;
}

/* Hover effect "pill que segue" nos itens da topbar */
.topbar a {
  position: relative;
  transition: color 0.2s ease;
}
.topbar a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(120, 53, 254, 0.12);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: -1;
}
.topbar a:hover::before {
  opacity: 1;
  transform: scale(1);
}

/* Subtle scale-down do conteúdo quando topbar pill */
.topbar.scrolled > * {
  font-size: 13px;
}
/* =====================================================================
   FONTE GILROY — identidade visual oficial Nemeziz
   ===================================================================== */
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-Heavy.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

html, body, .form, .input, button, input, textarea, select {
  font-family: 'Gilroy', 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* =====================================================================
   FORM LOGIN (uiverse JohnnyCSilva) — adaptado pra Nemeziz
   ===================================================================== */
.nm-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  padding: 0;
  width: 100%;
  font-family: 'Gilroy', system-ui, sans-serif;
}

.nm-form .flex-column > label {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.nm-form .inputForm {
  border: 1.5px solid var(--lg-border-side);
  background: var(--lg-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: 12px;
  height: 56px;
  display: flex;
  align-items: center;
  padding-left: 14px;
  transition: all 0.2s ease-in-out;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.04) inset,
    0 1px 0 rgba(255,255,255,0.08) inset;
}
.nm-form .inputForm svg {
  fill: var(--text-muted);
  flex-shrink: 0;
}

.nm-form .input {
  margin-left: 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  width: 100%;
  height: 100%;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
}
.nm-form .input::placeholder {
  color: var(--text-dim);
  font-family: inherit;
}
.nm-form .input:focus { outline: none; }

.nm-form .inputForm:focus-within {
  border-color: rgba(120, 53, 254, 0.65);
  box-shadow:
    0 0 0 3px rgba(120, 53, 254, 0.18),
    0 1px 0 rgba(255,255,255,0.10) inset;
}
.nm-form .inputForm:focus-within svg {
  fill: var(--accent);
}

.nm-form .flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-top: 4px;
}
.nm-form .flex-row > div {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nm-form .flex-row > div > label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
}
.nm-form .flex-row input[type="checkbox"],
.nm-form .flex-row input[type="radio"] {
  width: 14px;
  height: 14px;
  accent-color: #7835FE;
  cursor: pointer;
}

.nm-form .span {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}
.nm-form .span:hover { opacity: 0.75; }

/* Botão Entrar — roxo simples (Gilroy) */
.nm-form .button-submit {
  margin: 18px 0 4px 0;
  background: #7835FE;
  border: none;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  height: 56px;
  width: 100%;
  cursor: pointer;
  font-family: 'Gilroy', system-ui, sans-serif !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background 0.18s ease, transform 0.15s ease;
}
.nm-form .button-submit:hover  { background: #8845FF; }
.nm-form .button-submit:active { transform: scale(0.98); background: #5A1FCC; }

/* Modo light: botão preto */
[data-theme="light"] .nm-form .button-submit {
  background: #151717;
  color: #FFFFFF;
}
[data-theme="light"] .nm-form .button-submit:hover  { background: #2A2A2D; }
[data-theme="light"] .nm-form .button-submit:active { background: #050506; }

.nm-form .p {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin: 6px 0;
}

/* =====================================================================
   MOBILE REDESIGN — header limpo + platforms no bottom-nav fixo
   ===================================================================== */
@media (max-width: 767px) {
  /* Layout root no mobile */
  body {
    padding-bottom: calc(140px + env(safe-area-inset-bottom, 8px)) !important; /* espaço pro bottom-nav fixo + folga pra forms longos */
  }
  /* Garante que o main também tenha folga inferior pra forms longos não grudarem na bottom-nav */
  main.content,
  main {
    padding-bottom: 40px !important;
  }

  /* Topbar: simplifica — só admin info + theme toggle (sem plataformas aqui) */
  .topbar {
    padding: 10px 14px !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 12px !important;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: sticky !important;
    top: 8px !important;
  }

  /* Wrapper mobile-platforms criado via JS no body */
  .nm-mobile-platforms {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    display: block !important;
    background: rgba(12, 6, 24, 0.95);
    backdrop-filter: blur(48px) saturate(180%);
    -webkit-backdrop-filter: blur(48px) saturate(180%);
    border: 0;
    border-top: 1px solid rgba(189,171,255,0.18);
    border-radius: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 32px rgba(0,0,0,0.45), 0 0 24px rgba(120,53,254,0.10);
    overflow: hidden;
  }
  [data-theme="light"] .nm-mobile-platforms {
    background: rgba(255,255,255,0.92);
    border-top-color: rgba(15,15,15,0.10);
  }
  /* Container do scroll horizontal — abriga as plataformas */
  .nm-mobile-platforms .platform-switch,
  .nm-mobile-platforms > .platform-switch {
    display: flex !important;
    gap: 6px;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    width: 100%;
  }
  .nm-mobile-platforms .platform-switch::-webkit-scrollbar { display: none; }

  /* Distribuição igual entre abas (Instagram-style). Se exceder a tela, vira scroll horizontal. */
  .nm-mobile-platforms .platform-switch > a {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }
  /* Sem mask gradient — full-width grudada na borda */
  .nm-mobile-platforms { -webkit-mask-image: none; mask-image: none; }

  .nm-mobile-platforms a {
    text-align: center;
    padding: 12px 18px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted) !important;
    border-radius: 999px !important;
    transition: all 0.2s ease;
    height: auto !important;
    background: transparent !important;
    white-space: nowrap;
    scroll-snap-align: center;
  }
  .nm-mobile-platforms a.active {
    background: linear-gradient(180deg, #8B5CFF, #7835FE) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(120,53,254,0.40) !important;
  }
  .nm-mobile-platforms a::before { display: none !important; }

  /* User info no mobile: theme à esquerda + admin nome à direita (espalhado) */
  .topbar .user-info {
    display: flex !important;
    align-items: center;
    gap: 12px;
    flex: 1;
    width: 100%;
    justify-content: space-between !important;
  }
  .topbar .user-info > div[style*="text-align:right"] {
    line-height: 1.2;
    text-align: right;
  }
  .topbar .user-info > div[style*="text-align:right"] > div:first-child {
    font-size: 13px !important;
  }
  .topbar .user-info > div[style*="text-align:right"] > div:last-child {
    font-size: 10px !important;
  }

  /* Topbar SCROLLED no mobile: NÃO encolhe (mantém comportamento normal) */
  .topbar.scrolled {
    max-width: none !important;
    margin: 0 0 12px 0 !important;
    padding: 10px 14px !important;
    border-radius: var(--radius-md) !important;
  }

  /* Sidebar (menu horizontal scroll) — mais compact em mobile */
  .sidebar {
    margin-bottom: 12px !important;
  }

  /* Cards: 1 por linha em mobile, mais compactos */
  .stats-grid,
  div[style*="grid-template-columns:repeat(auto-fit"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* iOS safe-area pro bottom-nav */
  @supports (padding: env(safe-area-inset-bottom)) {
    body { padding-bottom: calc(140px + env(safe-area-inset-bottom)) !important; }
    .topbar .platform-switch {
      bottom: calc(12px + env(safe-area-inset-bottom));
    }
  }

  /* Hide partículas no mobile (perform) */
  .nm-particles { opacity: 0.5; }
  .nm-particles .nm-particle:nth-child(n+10) { display: none; }
}

/* Tablet (768-1023): comportamento intermediário */
@media (min-width: 768px) and (max-width: 1023px) {
  .sidebar { width: 200px; }
  .sidebar nav a { font-size: 12px; padding: 7px 12px; }
}

/* Desktop: wrapper bottom-nav some — JS já moveu o .platform-switch pra topbar */
@media (min-width: 768px) {
  .nm-mobile-platforms { display: none !important; }
}

/* =====================================================================
   LOGIN MOBILE — refinado pra telas pequenas
   ===================================================================== */
@media (max-width: 767px) {
  /* Container do login: sem grid, vertical empilhado */
  .fb-login-wrap {
    display: block !important;
    grid-template-columns: 1fr !important;
    padding: 0 !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow-y: auto;
  }

  /* Logo no topo CENTRALIZADO (não no canto) */
  .fb-corner-logo {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 140px !important;
    margin: 28px auto 0 !important;
    display: block !important;
  }

  /* Esconde o hero (texto promocional + phone mockup) no mobile */
  .fb-hero { display: none !important; }

  /* Painel direito vira o conteúdo principal full-width */
  .fb-login-side {
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    padding: 24px 20px 100px !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Card de login sem moldura, ocupa o espaço */
  .fb-login-card {
    width: 100% !important;
    max-width: 420px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }
  .fb-login-card::before,
  .fb-login-card::after { display: none !important; }

  .fb-login-card h2 {
    font-size: 24px !important;
    margin-top: 8px !important;
  }
  .fb-login-card .fb-sub {
    margin-bottom: 20px !important;
  }

  /* Form: inputs maiores pra touch */
  .nm-form .inputForm {
    height: 54px !important;
    border-radius: 14px !important;
  }
  .nm-form .input {
    font-size: 16px !important;          /* iOS não dá zoom em focus se >= 16px */
  }
  .nm-form .button-submit {
    height: 54px !important;
    font-size: 15px !important;
    border-radius: 14px !important;
    margin-top: 16px !important;
  }

  /* Theme switcher: canto inferior direito SEM colidir com botão Entrar */
  .fb-theme-switcher {
    bottom: 20px !important;
    right: 20px !important;
    padding: 3px !important;
  }
  .fb-theme-switcher button {
    width: 32px !important;
    height: 32px !important;
  }

  /* Partículas no login mobile: bem reduzidas, decorativas */
  body > .nm-particles { opacity: 0.35; }
  body > .nm-particles .nm-particle:nth-child(n+8) { display: none; }
}

/* Telas muito pequenas (até 380px) — apertando ainda mais */
@media (max-width: 380px) {
  .fb-login-card h2 { font-size: 22px !important; }
  .fb-corner-logo { width: 120px !important; margin-top: 20px !important; }
  .fb-login-side { padding: 16px 16px 100px !important; }
}

/* =====================================================================
   PERFORMANCE TWEAKS — reduz overdraw/blur em listas grandes e mobile
   ===================================================================== */
/* Tabelas grandes: desliga backdrop-filter dentro delas (cada row puxava blur) */
.card table {
  contain: layout paint;
}

/* Em mobile, simplifica muito os blurs (são caros em GPU/CPU) */
@media (max-width: 767px) {
  .card,
  .glass {
    backdrop-filter: blur(20px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
  }
  .sidebar,
  .topbar {
    backdrop-filter: blur(28px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(140%) !important;
  }
  /* remove animações que consomem GPU em mobile */
  .nm-particle { animation-duration: 12s !important; }
}

/* Reduz partículas pra metade em telas <1024 */
@media (max-width: 1023px) {
  .nm-particles .nm-particle:nth-child(2n) { display: none; }
}

/* prefers-reduced-motion: respeita usuários com sensibilidade */
@media (prefers-reduced-motion: reduce) {
  .nm-particle { display: none; }
  .card { transition: none; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* GPU hint pra cards animados */
.card, .topbar, .sidebar, .galaxy-btn, .button-submit {
  will-change: transform;
  transform: translateZ(0);
}
