/* ============================================
   MÉTODO ID — CSS PRINCIPAL
   ============================================ */

:root {
  /* ─── Cores principais ─── */
  --navy:        #0F1C2E;
  --navy-dark:   #080F1A;
  --navy-light:  #172338;
  --navy-mid:    #142035;
  --gold:        #C9A84C;
  --gold-light:  #E2C06A;
  --gold-bright: #F0D080;
  --gold-dark:   #9E7C28;
  --gold-muted:  rgba(201,168,76,0.12);
  --gold-glow:   rgba(201,168,76,0.25);
  --offwhite:    #F0EDE8;
  --white:       #FFFFFF;

  /* ─── Gradientes ─── */
  --grad-gold: linear-gradient(135deg, #C9A84C 0%, #E8C96A 50%, #C9A84C 100%);
  --grad-navy: linear-gradient(180deg, #0F1C2E 0%, #080F1A 100%);
  --grad-surface: linear-gradient(135deg, #172338 0%, #0F1C2E 100%);
  --grad-hero: linear-gradient(135deg, #0F1C2E 0%, #1A2C48 50%, #0F1C2E 100%);

  /* ─── Textos ─── */
  --text-primary:   #EDE8DF;
  --text-secondary: #9AA8BF;
  --text-muted:     #5A6A85;
  --text-gold:      #C9A84C;

  /* ─── Superfícies ─── */
  --surface:   #172338;
  --surface-2: #1A2744;
  --surface-3: #1F2E50;
  --border:         rgba(201,168,76,0.18);
  --border-subtle:  rgba(255,255,255,0.06);
  --border-strong:  rgba(201,168,76,0.35);

  /* ─── Status ─── */
  --success: #3DAA6A;
  --warning: #E09B2D;
  --danger:  #D94040;
  --info:    #3A8ECC;

  /* ─── Sombras ─── */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 48px rgba(0,0,0,0.65);
  --shadow-xl:   0 16px 64px rgba(0,0,0,0.75);
  --shadow-gold: 0 4px 24px rgba(201,168,76,0.25);
  --shadow-gold-lg: 0 8px 40px rgba(201,168,76,0.3);

  /* ─── Bordas ─── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* ─── Transições ─── */
  --transition:      all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* ─── Layout ─── */
  --sidebar-width:     256px;
  --bottom-nav-height: 62px;
  --header-height:     52px;
  --content-max:       780px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--navy-dark);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

/* Mobile: slightly smaller base */
@media (max-width: 480px) {
  body { font-size: 14px; }
}

/* ─── Typography ──────────────────────────── */
h1 { font-size: clamp(1.35rem, 4vw, 2rem);   font-weight: 800; line-height: 1.2; letter-spacing: -0.5px; }
h2 { font-size: clamp(1.15rem, 3vw, 1.6rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: clamp(0.95rem, 2.5vw, 1.25rem); font-weight: 600; }
h4 { font-size: 0.95rem; font-weight: 600; }
p  { line-height: 1.65; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover { color: var(--gold-light); }

img { max-width: 100%; height: auto; }

/* ─── SVG Icon System ────────────────────── */
.icon-svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}

/* ─── Scrollbar ──────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ─── Selection ──────────────────────────── */
::selection { background: var(--gold); color: var(--navy); }

/* ─── Focus ──────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ─── Utils ──────────────────────────────── */
.hidden          { display: none !important; }
.invisible       { visibility: hidden; }
.text-gold       { color: var(--gold); }
.text-muted      { color: var(--text-muted); }
.text-secondary  { color: var(--text-secondary); }
.text-center     { text-align: center; }
.text-sm         { font-size: 0.825rem; }
.text-xs         { font-size: 0.72rem; }
.fw-bold         { font-weight: 700; }
.fw-800          { font-weight: 800; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex  { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-1  { flex: 1; }
.w-full  { width: 100%; }
.grid    { display: grid; }
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Animations ─────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes goldGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(201,168,76,0.3); }
  50%       { box-shadow: 0 0 28px rgba(201,168,76,0.6); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.08); opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.fade-in    { animation: fadeIn 0.35s ease forwards; }
.slide-up   { animation: slideUp 0.35s ease forwards; }

/* ─── Skeleton loader ─────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-sm);
}

/* ─── Gold accent ─────────────────────────── */
.gold-line {
  height: 2px;
  background: var(--grad-gold);
  border-radius: 2px;
}
.gold-dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Loader screen ───────────────────────── */
.loader-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 2rem;
  background: var(--navy-dark);
}
.loader-logo {
  width: 88px; height: 88px;
  border-radius: 22px;
  box-shadow: var(--shadow-gold);
  animation: float 3s ease-in-out infinite;
}
.loader-spinner {
  width: 36px; height: 36px;
  border: 2.5px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.loader-text {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: pulse 2s ease infinite;
}

/* ─── Toast ───────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-3);
  color: var(--text-primary);
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  max-width: 88vw;
  font-size: 0.85rem;
  text-align: center;
  animation: slideUp 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.info    { border-color: var(--info); }

@media (min-width: 768px) {
  .toast { bottom: 2rem; }
}

/* ─── Modal ───────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-xl);
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.modal-close:hover { background: var(--surface-3); color: var(--text-primary); }

/* ─── Page wrapper ────────────────────────── */
.page-wrapper {
  padding: 1.25rem 1rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 2rem);
  animation: fadeIn 0.3s ease;
}

@media (min-width: 480px) {
  .page-wrapper { padding: 1.5rem 1.25rem; }
}

@media (min-width: 768px) {
  .page-wrapper { padding: 2rem 1.75rem; padding-bottom: 2.5rem; }
}

/* ─── Page header ─────────────────────────── */
.page-header {
  margin-bottom: 1.5rem;
}
.page-header h1 { margin-bottom: 0.2rem; }
.page-header .subtitle {
  color: var(--text-muted);
  font-size: 0.825rem;
}

/* ─── Section headers ─────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title .icon-svg { width: 18px; height: 18px; color: var(--gold); }

/* ─── Empty state ─────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state .icon-svg {
  width: 48px; height: 48px;
  margin: 0 auto 1rem;
  color: var(--border);
  display: block;
}
.empty-state h3   { color: var(--text-secondary); margin-bottom: 0.5rem; font-size: 1rem; }
.empty-state p    { font-size: 0.85rem; max-width: 260px; margin: 0 auto; }

/* ─── Gold badge / label ──────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.badge-gold    { background: var(--gold-muted); color: var(--gold); border: 1px solid var(--border); }
.badge-success { background: rgba(61,170,106,0.15); color: var(--success); }
.badge-danger  { background: rgba(217,64,64,0.15);  color: var(--danger); }
.badge-info    { background: rgba(58,142,204,0.15); color: var(--info); }
.badge-premium { background: var(--grad-gold); color: var(--navy); }

/* ─── Divider ─────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 1rem 0;
}

/* ─── Card base ───────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--border);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.card-gold {
  border-color: var(--border);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(201,168,76,0.06) 100%);
}

/* ─── Premium lock overlay ─────────────────── */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--grad-gold);
  color: var(--navy);
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.premium-badge .icon-svg { width: 11px; height: 11px; }

/* ─── Impactful accent elements ─────────────── */
.accent-bar {
  height: 3px;
  background: var(--grad-gold);
  border-radius: 3px;
  margin-bottom: 0.75rem;
  width: 40px;
}
