/* ===== ANTI SCROLL HORIZONTAL ===== */
html, body { overflow-x: hidden !important; max-width: 100%; width: 100%; }
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, canvas, svg { max-width: 100%; height: auto; }
.container, .container-sm, .container-md { max-width: 100%; }
@media (max-width: 720px) {
  .container, .container-sm, .container-md { padding-left: 14px; padding-right: 14px; }
}

:root {
  --bg-dark: #050510;
  --bg-card: #0f0f1a;
  --bg-card-hover: #15152a;
  --border: #1f1f2e;
  --border-strong: #2a2a44;
  --text: #e4e4ea;
  --text-dim: #8a8aa0;
  --text-2: #c4c4ce;
  --neon-blue: #06b6d4;
  --neon-blue-2: #22d3ee;
  --neon-purple: #a855f7;
  --neon-purple-2: #c084fc;
  --neon-pink: #ec4899;
  --neon-green: #22c55e;
  --neon-red: #ef4444;
  --neon-gold: #fbbf24;
  --gradient: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  --gradient-soft: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(168,85,247,0.15));
  --glow-blue: 0 0 20px rgba(6, 182, 212, 0.45);
  --glow-purple: 0 0 20px rgba(168, 85, 247, 0.45);
  --glow-mix: 0 0 24px rgba(124, 58, 237, 0.4);
  --shadow-1: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

[data-theme="light"] {
  --bg-dark: #f5f5fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f5;
  --border: #e2e2ee;
  --border-strong: #c8c8d8;
  --text: #1a1a2e;
  --text-dim: #6b6b80;
  --text-2: #2a2a40;
}

* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at top, rgba(168, 85, 247, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    linear-gradient(rgba(168, 85, 247, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-attachment: fixed;
}
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }

/* Logo gradient */
.logo-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5); }
.btn-secondary {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--neon-blue); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: rgba(239, 68, 68, 0.15); color: var(--neon-red); border: 1px solid var(--neon-red); }
.btn-danger:hover { background: var(--neon-red); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* Card base */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-1);
}
.card-glow {
  border: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow: var(--glow-mix);
}

/* Inputs */
.input, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
}
[data-theme="light"] .input,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="tel"],
[data-theme="light"] input[type="number"],
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #fff;
}
.input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 12px 0 6px; }

/* Header global */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
[data-theme="light"] .app-header { background: rgba(255, 255, 255, 0.85); }

.app-header .brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 800;
}
.app-header .brand img { width: 32px; height: 32px; border-radius: 8px; }
.app-header nav { display: flex; gap: 8px; align-items: center; }
.app-header .icon-btn {
  background: transparent; border: 1px solid var(--border);
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); cursor: pointer; transition: all 0.2s;
  position: relative;
}
.app-header .icon-btn:hover { border-color: var(--neon-blue); color: var(--neon-blue); }
.app-header .icon-btn .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--neon-pink); color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px;
  padding: 0 5px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
}

/* Footer global */
.app-footer {
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.6;
}
.app-footer .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 20px; }
.container-md { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 30px 20px;
}
.auth-card {
  width: 100%; max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(168, 85, 247, 0.1);
}
.auth-logo {
  text-align: center; margin-bottom: 24px;
  font-size: 26px; font-weight: 800;
}
.auth-card h1 { font-size: 24px; margin-bottom: 8px; text-align: center; }
.auth-card .sub { color: var(--text-dim); font-size: 14px; text-align: center; margin-bottom: 24px; }
.auth-card .btn { margin-top: 16px; }
.auth-links {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 18px;
  font-size: 14px;
}
.auth-links a { color: var(--neon-blue); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.alert {
  padding: 12px 14px; border-radius: var(--radius-md);
  font-size: 13px; margin: 12px 0;
  border: 1px solid;
}
.alert-error { background: rgba(239,68,68,0.1); border-color: var(--neon-red); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.1); border-color: var(--neon-green); color: #86efac; }
.alert-info { background: rgba(6,182,212,0.1); border-color: var(--neon-blue); color: #67e8f9; }

/* Loading */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  max-width: 500px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal h2 { font-size: 20px; margin-bottom: 14px; }

/* Responsive */
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .auth-card { padding: 28px 20px; }
}
