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

:root {
  --primary:      #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light:#eff6ff;
  --purple:       #7c3aed;
  --success:      #16a34a;
  --danger:       #dc2626;
  --warning:      #d97706;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white:    #ffffff;
  --navy:     #0f172a;
  --navy-mid: #1e3a5f;
  --font:     'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius:   10px;
  --radius-lg:16px;
  --shadow:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 24px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
}

body { font-family: var(--font); color: var(--gray-800); background: var(--gray-50); line-height: 1.5; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── BOTÕES ─────────────────────────────────── */
button, .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius);
  border: none; cursor: pointer; font-size: 14px; font-weight: 600;
  font-family: var(--font); transition: all .18s; line-height: 1;
}
button:active, .btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--primary); color: var(--white);
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(37,99,235,.35); text-decoration: none; }

.btn-secondary {
  background: var(--white); color: var(--gray-700);
  border: 1px solid var(--gray-200); box-shadow: var(--shadow);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-300); text-decoration: none; }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #b91c1c; }

.btn-purple { background: var(--purple); color: var(--white); box-shadow: 0 2px 8px rgba(124,58,237,.25); }
.btn-purple:hover { background: #6d28d9; }

.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }

/* ── CARDS ──────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--gray-200); padding: 24px;
}

/* ── BADGES ─────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
}
.badge-pro       { background: #fef3c7; color: #92400e; }
.badge-professor { background: #dbeafe; color: #1e40af; }
.badge-gratuito  { background: var(--gray-100); color: var(--gray-600); }

/* ── FORMS ──────────────────────────────────── */
input, select, textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); font-size: 14px; font-family: var(--font);
  background: var(--white); color: var(--gray-800); transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
textarea { resize: vertical; min-height: 80px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── ALERTS ─────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert-info    { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #bfdbfe; }
.alert-danger  { background: #fee2e2; color: var(--danger); border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: var(--success); border: 1px solid #86efac; }
.alert-warning { background: #fef3c7; color: var(--warning); border: 1px solid #fde68a; }

/* ── LIMITE AVISO ────────────────────────────── */
.limite-banner {
  background: #fef3c7; border: 1px solid #fde68a; border-radius: var(--radius);
  padding: 10px 16px; font-size: 13px; color: #92400e; margin-bottom: 16px;
}
.limite-banner.esgotado { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
