/* ══════════════════════════════════════════════════════════════
   main.css — Design system dark May
   ══════════════════════════════════════════════════════════════ */

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

:root {
  --bg-primary:    #080B1A;
  --bg-secondary:  rgba(255,255,255,.05);
  --bg-tertiary:   rgba(255,255,255,.03);
  --border:        rgba(255,255,255,.09);
  --border-hover:  rgba(167,139,250,.3);

  --accent:        #7C3AED;
  --accent-light:  #A78BFA;
  --accent-dim:    rgba(124,58,237,.12);
  --accent-border: rgba(124,58,237,.35);
  --brand-glow:    rgba(124,58,237,.4);

  --text-primary:   #E8E4FF;
  --text-secondary: rgba(200,190,255,.65);
  --text-muted:     rgba(200,190,255,.4);
  --text-inverse:   #080B1A;

  --green: #10B981; --gold: #F59E0B; --red: #EF4444; --blue: #60A5FA;

  --radius:    12px;
  --radius-sm:  8px;
  --radius-lg: 16px;
  --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
}

html, body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Syne', sans-serif; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,.3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,.55); }

.text-xs        { font-size: 0.75rem; }
.text-sm        { font-size: 0.875rem; }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mb-8           { margin-bottom: 8px; }
.mb-16          { margin-bottom: 16px; }

/* ── Botões ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm); font-size: 0.875rem;
  font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: all .18s; font-family: 'Inter', sans-serif; text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-full { width: 100%; }
.btn-sm   { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg   { padding: 12px 24px; font-size: 1rem; }

.btn-primary {
  background: linear-gradient(135deg, #7C3AED, #A78BFA); color: #fff;
  box-shadow: 0 4px 14px var(--brand-glow);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 6px 20px var(--brand-glow); }

.btn-secondary {
  background: var(--bg-secondary); color: var(--text-primary); border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,.09); border-color: var(--border-hover); }

.btn-ghost {
  background: none; color: var(--text-secondary); border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-secondary); color: var(--text-primary); }

.btn-danger {
  background: rgba(239,68,68,.12); color: #FCA5A5; border-color: rgba(239,68,68,.25);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.2); }

/* ── Formulários ── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

input, select, textarea {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 0.9rem; color: var(--text-primary); outline: none;
  font-family: 'Inter', sans-serif; transition: border-color .18s; width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus { border-color: rgba(124,58,237,.5); }
select option { background: #12102A; color: var(--text-primary); }
textarea { resize: vertical; min-height: 80px; }

.password-toggle { position: relative; }
.password-toggle input { padding-right: 44px; }
.btn-toggle-pw {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px; color: var(--text-muted); padding: 4px;
}

/* ── Modais ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: #0F0C24; border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg); padding: 24px; width: 100%;
  max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title  { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 800; color: #fff; }
.modal-close  {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.2rem; padding: 4px; line-height: 1; transition: color .15s;
}
.modal-close:hover { color: var(--text-primary); }

/* ── Toast ── */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500;
  backdrop-filter: blur(8px); box-shadow: 0 4px 14px rgba(0,0,0,.4); animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:none; } }
.toast.success { background:rgba(16,185,129,.2);  border:1px solid rgba(16,185,129,.35); color:#6EE7B7; }
.toast.error   { background:rgba(239,68,68,.2);   border:1px solid rgba(239,68,68,.3);  color:#FCA5A5; }
.toast.info    { background:rgba(124,58,237,.2);  border:1px solid var(--accent-border); color:#C4B5FD; }
