/* =========================================
   ROTA DOS REIS — Global Styles
   Legendários · Brasília
   ========================================= */

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

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:        #FF4C00;
  --brand-light:  #FF7040;
  --brand-glow:   rgba(255, 76, 0, 0.35);
  --brand-subtle: rgba(255, 76, 0, 0.10);

  --bg-deep:      #0B0C0F;
  --bg-card:      #13151A;
  --bg-card2:     #191C24;
  --bg-input:     #1E2130;
  --border:       rgba(255,255,255,0.08);
  --border-focus: rgba(255, 76, 0, 0.6);

  --text-primary:   #F1F3F8;
  --text-secondary: #8B93A8;
  --text-muted:     #525972;

  --success: #22C573;
  --error:   #FF4D6A;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 24px 80px rgba(0,0,0,0.6);
  --shadow-btn:  0 4px 24px rgba(255, 76, 0, 0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   AUTH PAGES (login / cadastro)
   ========================================= */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Background canvas */
#particles-canvas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Radial gradient overlay */
.bg-overlay {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(255,76,0,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(255,76,0,0.06) 0%, transparent 55%),
    linear-gradient(135deg, #0B0C0F 0%, #0F1018 100%);
  z-index: 0;
}

/* Container */
.auth-container {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Card */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  animation: cardIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Logo ── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.logo-icon {
  width: 52px; height: 52px;
  background: var(--brand-subtle);
  border: 1px solid rgba(255,76,0,0.2);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 8px;
}

.logo-icon svg { width: 100%; height: 100%; }

.logo-text { display: flex; flex-direction: column; gap: 2px; }
.logo-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.logo-subtitle {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── Headline ── */
.auth-headline { margin-bottom: 1.75rem; }
.auth-headline h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.4rem;
}
.auth-headline p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Google Button ── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
  letter-spacing: 0.1px;
}
.btn-google:hover {
  background: #232635;
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.btn-google:active { transform: translateY(0); }

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.4rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

/* ── Form ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
}

.form-group select option {
  background-color: var(--bg-input);
  color: var(--text-primary);
}

.form-group input::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  background: #222538;
  box-shadow: 0 0 0 3px rgba(255, 76, 0, 0.12);
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: rgba(255,77,106,0.5);
}

.pin-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ── Error / Success messages ── */
.form-error {
  background: rgba(255,77,106,0.1);
  border: 1px solid rgba(255,77,106,0.25);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  color: #FF7090;
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 1rem;
  display: none;
  animation: fadeIn 0.2s ease;
}

.form-success {
  background: rgba(34, 197, 115, 0.1);
  border: 1px solid rgba(34, 197, 115, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  color: #22C573;
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 1rem;
  animation: fadeIn 0.2s ease;
}

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

/* ── Primary Button ── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.25rem;
  background: linear-gradient(135deg, var(--brand) 0%, #FF6020 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.22s ease;
  box-shadow: var(--shadow-btn);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 76, 0, 0.55);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

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

/* ── Outline Button ── */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  background: transparent;
  border: 1.5px solid var(--brand);
  border-radius: var(--radius-md);
  color: var(--brand);
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  letter-spacing: 0.2px;
  margin-top: 0.5rem;
}
.btn-outline:hover {
  background: var(--brand-subtle);
  box-shadow: 0 4px 18px rgba(255,76,0,0.25);
  transform: translateY(-1px);
}

/* ── Back Button ── */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
  margin-bottom: 1.25rem;
}
.btn-back:hover { color: var(--text-primary); }

/* ── Auth Footer ── */
.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
}
.auth-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.link-accent {
  color: var(--brand-light);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.link-accent:hover { color: #fff; }

/* ── Forgot Password ── */
.forgot-password {
  text-align: center;
  margin-top: 0.85rem;
}
.btn-forgot {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
}
.btn-forgot:hover {
  color: var(--brand-light);
  text-decoration-color: var(--brand-light);
}
.btn-forgot:disabled { cursor: default; }

/* =========================================
   DASHBOARD
   ========================================= */

.dashboard-body {
  background: var(--bg-deep);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 68px;
  background: rgba(13, 15, 20, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-icon svg { width: 100%; height: 100%; }

.nav-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.nav-sub {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--brand), #FF6A2A);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(255,76,0,0.4);
}

.user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Logout */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-logout:hover {
  border-color: rgba(255,77,106,0.4);
  color: #FF7090;
  background: rgba(255,77,106,0.08);
}

/* ── Dashboard Main ── */
.dashboard-main {
  flex: 1;
  padding: 2.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ── Welcome Banner ── */
.welcome-banner {
  background: linear-gradient(135deg, rgba(255,76,0,0.12) 0%, rgba(255,76,0,0.04) 60%, transparent 100%);
  border: 1px solid rgba(255,76,0,0.18);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  animation: cardIn 0.5s ease both;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,76,0,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-content { display: flex; align-items: center; justify-content: space-between; }
.welcome-text { flex: 1; }

.welcome-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.welcome-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 500px;
}

.welcome-badge { flex-shrink: 0; }

/* ── Section ── */
.dashboard-section { animation: cardIn 0.5s 0.1s ease both; }

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

/* ── Feature Cards Grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  transition: all 0.25s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,76,0,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(255, 76, 0, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  line-height: 1;
  filter: grayscale(0.2);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.feature-tag {
  display: inline-block;
  background: rgba(255,76,0,0.1);
  border: 1px solid rgba(255,76,0,0.2);
  color: var(--brand-light);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 640px) {
  .auth-card { padding: 2rem 1.5rem; border-radius: var(--radius-lg); }
  .welcome-title { font-size: 1.5rem; }
  .welcome-badge { display: none; }
  .user-name { display: none; }
  .navbar { padding: 0 1rem; }
  .dashboard-main { padding: 1.5rem 1rem; }
}
