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

@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 */
  --tropa-charcoal:    #0F1114;
  --tropa-charcoal-2:  #181B20;
  --tropa-graphite:    #2A2E33;
  --tropa-graphite-2:  #3A3F45;
  --tropa-ice-white:   #F2F4F7;
  --tropa-neon-green:  #B4F42C;
  --tropa-neon-dim:    #8BC21F;

  /* Ambiente (background do universo) */
  --ambient-bg: radial-gradient(ellipse 140% 100% at 20% 0%, rgba(180, 244, 44, 0.08) 0%, transparent 45%),
                radial-gradient(ellipse 120% 100% at 85% 100%, rgba(180, 244, 44, 0.06) 0%, transparent 50%),
                linear-gradient(180deg, #0F1114 0%, #181B20 40%, #0F1114 100%);

  /* Glass surfaces */
  --glass-bg:       rgba(26, 29, 33, 0.55);
  --glass-bg-hover: rgba(42, 46, 51, 0.65);
  --glass-bg-active:rgba(180, 244, 44, 0.10);
  --glass-border:   linear-gradient(135deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.08) 100%);
  --glass-border-strong: rgba(255,255,255,0.18);

  /* Backdrop */
  --blur-strong: blur(32px) saturate(180%);
  --blur-medium: blur(20px) saturate(160%);
  --blur-light:  blur(12px) saturate(140%);

  /* Texto */
  --text:          #F2F4F7;
  --text-muted:    #A0A6AE;
  --text-dim:      #6E747C;
  --text-inverted: #0F1114;

  /* Acento & estados */
  --accent:        #B4F42C;
  --accent-hover:  #C4FF3E;
  --accent-glow:   0 0 24px rgba(180, 244, 44, 0.35);
  --accent-text:   #0F1114;

  --success: #B4F42C;
  --danger:  #FF4E6B;
  --warning: #FFB84E;
  --info:    #4EA8FF;

  /* Sombras spatial (camadas flutuantes) */
  --shadow-float: 0 2px 4px rgba(0,0,0,0.20),
                  0 8px 24px rgba(0,0,0,0.35),
                  0 24px 60px rgba(0,0,0,0.30),
                  inset 0 1px 0 rgba(255,255,255,0.08);
  --shadow-hover: 0 4px 8px rgba(0,0,0,0.25),
                  0 16px 40px rgba(0,0,0,0.40),
                  0 32px 80px rgba(0,0,0,0.35),
                  inset 0 1px 0 rgba(255,255,255,0.12);
  --shadow-press: 0 1px 2px rgba(0,0,0,0.20),
                  0 4px 12px rgba(0,0,0,0.25),
                  inset 0 1px 0 rgba(255,255,255,0.06);

  /* Neon subtle glow no accent */
  --neon-glow: 0 0 20px rgba(180,244,44,0.15), 0 0 40px rgba(180,244,44,0.08);

  color-scheme: dark;
}

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

[data-theme="light"] {
  --tropa-charcoal:   #F8FAFC;
  --tropa-charcoal-2: #EEF1F6;
  --tropa-graphite:   #FFFFFF;
  --tropa-graphite-2: #E5E9F0;
  --tropa-ice-white:  #0F1114;
  --tropa-neon-green: #8BC21F;
  --tropa-neon-dim:   #7AAB16;

  --ambient-bg: radial-gradient(ellipse 140% 100% at 20% 0%, rgba(180, 244, 44, 0.18) 0%, transparent 50%),
                radial-gradient(ellipse 120% 100% at 85% 100%, rgba(120, 220, 200, 0.12) 0%, transparent 55%),
                linear-gradient(180deg, #F2F4F7 0%, #E8ECF2 50%, #F2F4F7 100%);

  --glass-bg:        rgba(255, 255, 255, 0.62);
  --glass-bg-hover:  rgba(255, 255, 255, 0.80);
  --glass-bg-active: rgba(139, 194, 31, 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, 17, 20, 0.12);

  --text:          #0F1114;
  --text-muted:    #4A5260;
  --text-dim:      #8A92A0;
  --text-inverted: #F2F4F7;

  --accent:        #8BC21F;
  --accent-hover:  #7AAB16;
  --accent-glow:   0 0 20px rgba(139, 194, 31, 0.28);
  --accent-text:   #FFFFFF;

  --danger:  #E11D48;
  --warning: #F59E0B;
  --info:    #0284C7;
  --success: #65A30D;

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

  --neon-glow: 0 0 20px rgba(139,194,31,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(180, 244, 44, 0.12), transparent 70%);
}
body::after {
  width: 600px;
  height: 600px;
  bottom: -250px;
  right: -150px;
  background: radial-gradient(circle, rgba(180, 244, 44, 0.08), transparent 70%);
  animation-delay: -9s;
  animation-duration: 22s;
}
[data-theme="light"] body::before {
  background: radial-gradient(circle, rgba(139, 194, 31, 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(180, 244, 44, 0.10) 0%,
    var(--glass-bg) 50%);
  box-shadow: var(--shadow-float), var(--neon-glow);
}
.card--highlight::before {
  background: linear-gradient(135deg, rgba(180,244,44,0.45), rgba(180,244,44,0.10) 50%, rgba(180,244,44,0.30));
}

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

.sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: var(--space-5);
  align-self: flex-start;
  max-height: calc(100vh - var(--space-5) * 2);
  overflow-y: auto;
  padding: var(--space-5) var(--space-4);

  background: var(--glass-bg);
  backdrop-filter: var(--blur-strong);
  -webkit-backdrop-filter: var(--blur-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  position: relative;
}
.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-6);
  padding: var(--space-2) var(--space-3) var(--space-4);
  display: flex;
  justify-content: center;
}
.sidebar .logo img,
.auth-logo {
  max-width: 160px;
  height: auto;
  /* Dark mode: logo em branco puro com glow neon */
  filter: brightness(0) invert(1) drop-shadow(0 0 24px rgba(180, 244, 44, 0.35));
  transition: filter var(--dur-base) var(--ease);
}
.auth-logo { max-width: 180px; }

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

.sidebar nav a {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  font-size: 13.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: 20px;
}
.sidebar nav a.active {
  background: var(--glass-bg-active);
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
  text-shadow: var(--neon-glow);
}

/* =====================================================================
   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);

  background: var(--glass-bg);
  backdrop-filter: var(--blur-strong);
  -webkit-backdrop-filter: var(--blur-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  position: relative;
}
.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,17,20,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(180, 244, 44, 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(180, 244, 44, 0.40), 0 0 30px rgba(180, 244, 44, 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(180, 244, 44, 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(139, 194, 31, 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,17,20,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(180, 244, 44, 0.12);
  color: var(--accent);
  border-color: rgba(180, 244, 44, 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%;
    position: sticky;
    top: 8px;
    max-height: none;
    overflow: visible;
    padding: 10px 12px;
    z-index: 50;
    border-radius: var(--radius-md);
  }
  .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;
  }
  .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;
  }
  .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%;
  }
  .topbar .platform-switch::-webkit-scrollbar { display: none; }
  .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 dentro de wrapper */
  main .table,
  .card > .table,
  .card + .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    width: 100%;
  }
  main .table thead,
  main .table tbody,
  main .table tr { display: table; width: 100%; table-layout: auto; }
  main .table th,
  main .table td {
    padding: 10px 12px;
    font-size: 12.5px;
  }

  /* 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; }
}
