:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-2: #06b6d4;
  --accent: #7c3aed;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-card: 0 6px 18px rgba(15, 23, 42, .06);
  --radius-xl: 20px;
  --radius-lg: 16px;
}

html, body {
  background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
  min-height: 100%;
}

body {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.navbar {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 45%, #0f766e 100%) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .16);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  min-width: 0;
}

.nav-link {
  color: rgba(255,255,255,.88) !important;
  border-radius: 999px;
  padding-inline: .9rem !important;
  transition: .2s ease;
}

.nav-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff !important;
}

.container {
  max-width: 1240px;
}

.card {
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  background: rgba(255,255,255,.97);
}

.card-body {
  padding: 1.15rem 1.15rem;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -35px -35px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37,99,235,.14), rgba(124,58,237,.12));
}

.stat-label {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.display-6,
.metric-value {
  font-weight: 800;
  font-size: 2rem;
  margin: 0;
  line-height: 1.1;
}

.hero-panel {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #06b6d4 100%);
  color: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: .35rem;
}

.hero-subtitle {
  color: rgba(255,255,255,.86);
  margin: 0;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: .8rem;
}

.soft-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 1rem;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: #f8fafc;
  color: #334155;
  font-size: .84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom-width: 1px;
}

.table td,
.table th {
  vertical-align: middle;
  border-color: #e5edf6;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(248, 250, 252, .9);
}

.btn {
  border-radius: 12px;
  font-weight: 700;
  box-shadow: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
}

.btn-success {
  background: linear-gradient(135deg, #16a34a 0%, #10b981 100%);
  border: none;
}

.btn-outline-light:hover,
.btn-outline-primary:hover {
  transform: translateY(-1px);
}

.alert {
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}

.form-control,
.form-select {
  border-radius: 14px;
  border-color: #dbe5f1;
  min-height: 46px;
}

.form-control:focus,
.form-select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 .2rem rgba(96, 165, 250, .16);
}

.badge-soft {
  background: #eef2ff;
  color: #4338ca;
  border-radius: 999px;
  padding: .45rem .7rem;
  font-weight: 700;
}

.badge-level {
  border-radius: 999px;
  padding: .45rem .7rem;
  font-weight: 800;
}

.level-Bronze { background: #f5e0cf; color: #92400e; }
.level-Prata { background: #e5e7eb; color: #374151; }
.level-Ouro { background: #fef3c7; color: #92400e; }
.level-Platina { background: #dbeafe; color: #1d4ed8; }
.level-Diamante { background: #e0f2fe; color: #0f766e; }

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .75rem;
  border: 1px solid #dbe5f1;
  border-radius: 999px;
  background: #fff;
}

.footer {
  box-shadow: none;
}

.legal-footer {
  width: 100%;
  margin-top: 3.25rem;
  padding: 1.55rem 1.15rem 1.7rem;
  background:
    radial-gradient(circle at 50% -70%, rgba(59, 130, 246, .22), transparent 42%),
    linear-gradient(180deg, #0b2443 0%, #07172d 54%, #050d1d 100%);
  border-top: 1px solid rgba(147, 197, 253, .28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 -16px 38px rgba(15, 23, 42, .22);
  color: #e5e7eb;
  text-align: center;
}

.legal-footer__inner {
  max-width: 1160px;
  margin: 0 auto;
}

.legal-footer__line {
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.legal-footer__line + .legal-footer__line {
  margin-top: .48rem;
}

.legal-footer__line--copyright {
  color: #ffffff;
  font-size: .96rem;
  font-weight: 850;
  letter-spacing: .005em;
  text-shadow: 0 1px 10px rgba(255, 255, 255, .08);
}

.legal-footer__line--registry {
  color: #9ed8ff;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.5;
}

.legal-footer__line--warning {
  color: #d99b4a;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.55;
}

.login-shell .legal-footer {
  margin-top: 2rem;
}

@media (max-width: 575.98px) {
  .legal-footer {
    margin-top: 2rem;
    padding: 1.15rem .9rem 1.25rem;
  }

  .legal-footer__line--copyright {
    font-size: .86rem;
  }

  .legal-footer__line--registry,
  .legal-footer__line--warning {
    font-size: .75rem;
    line-height: 1.45;
  }
}

.login-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(6,182,212,.12), transparent 30%),
    radial-gradient(circle at top left, rgba(124,58,237,.12), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.login-card {
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.login-brand {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 48%, #06b6d4 100%);
  color: #fff;
  padding: 1.4rem;
  border-radius: 24px 24px 0 0;
}

.list-group-item {
  border-color: #edf2f7;
}

.small-muted {
  color: var(--muted);
  font-size: .92rem;
}

@media (max-width: 768px) {
  .hero-title { font-size: 1.35rem; }
  .display-6, .metric-value { font-size: 1.55rem; }
  .container { padding-inline: 1rem; }
}



.login-logo {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
}

.btn {
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 68%, #a855f7 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(79, 70, 229, .24) !important;
}

.btn-outline-light,
.btn-light,
.btn-soft {
  border: 1px solid #dbe4ff !important;
  background: #ffffff !important;
  color: #2437b3 !important;
  box-shadow: 0 6px 16px rgba(31, 41, 110, .10) !important;
}

.btn-soft:hover,
.btn-outline-light:hover,
.btn-light:hover {
  background: #f8fbff !important;
  color: #1d4ed8 !important;
}


.brand-mark {
  width: 160px;
  height: 160px;
  border-radius: 22px;
  object-fit: contain;
  margin-right: 0;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: .72rem;
  line-height: 1.2;
  opacity: .9;
  font-weight: 700;
  color: rgba(255,255,255,.94);
  white-space: nowrap;
}

.navbar-toggler {
  border-color: rgba(255,255,255,.25);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 .2rem rgba(255,255,255,.15);
}

.navbar-collapse {
  align-items: center;
}

.navbar-nav {
  gap: .1rem;
}

.nav-right {
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .brand-mark {
    width: 120px;
    height: 120px;
    border-radius: 18px;
  }
}

@media (max-width: 991.98px) {
  .brand-mark {
    width: 84px;
    height: 84px;
    border-radius: 16px;
  }
  .brand-title {
    font-size: .95rem;
    white-space: normal;
  }
  .brand-subtitle {
    white-space: normal;
  }
  .navbar-collapse {
    padding-top: 1rem;
  }
  .nav-right {
    margin-top: .75rem;
  }
}

@media (max-width: 576px) {
  .brand-mark {
    width: 72px;
    height: 72px;
    border-radius: 14px;
  }
  .brand-title {
    font-size: .88rem;
  }
  .brand-subtitle {
    font-size: .66rem;
  }
}

.level-badge-art {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 20px;
  background: rgba(255,255,255,.65);
  padding: .35rem;
}

.student-badge-inline {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.student-badge-inline img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.attendance-checklist {
  max-height: 420px;
  overflow: auto;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  padding: .8rem;
  background: rgba(248,250,252,.9);
}

.attendance-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .55rem .25rem;
  border-bottom: 1px solid rgba(15,23,42,.06);
}

.attendance-item:last-child {
  border-bottom: 0;
}


.attendance-checklist {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: .5rem;
}

.attendance-item {
  display: flex;
  gap: .65rem;
  align-items: center;
  padding: .6rem .7rem;
  border-radius: 14px;
}

.attendance-item:hover {
  background: #f8fbff;
}

.student-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
}

.student-badge-inline img,
.level-badge-art {
  width: 86px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(37, 99, 235, .18));
}

.level-badge-art-sm {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.mini-badge {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.poster-shell {
  background: radial-gradient(circle at top right, rgba(96,165,250,.18), transparent 24%), linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #fff;
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.poster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.poster-kicker {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  color: rgba(255,255,255,.7);
}

.poster-title {
  font-size: 2.1rem;
  font-weight: 900;
}

.poster-subtitle {
  color: rgba(255,255,255,.82);
}

.poster-hero-badge {
  width: 120px;
  height: 120px;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.poster-card {
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 1rem;
  text-align: center;
}

.poster-rank {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fde68a;
}

.poster-badge {
  width: 90px;
  height: 90px;
  margin: .5rem auto;
}

.poster-name {
  font-weight: 800;
  font-size: 1.1rem;
}

.poster-meta,
.poster-points {
  color: rgba(255,255,255,.8);
}

.poster-tier {
  display: inline-block;
  margin: .45rem 0;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  font-weight: 800;
}

@media print {
  .navbar, .footer, .btn, form, .alert { display: none !important; }
  body { background: #fff; }
  .container { max-width: 100%; }
  .poster-shell { box-shadow: none; }
}

/* ===== RESET FORTE DAS INSIGNIAS ===== */

/* portal do aluno */
img.level-badge-art,
.level-badge-art {
  width: 160px !important;
  height: 90px !important;
  min-width: 160px !important;
  min-height: 90px !important;
  max-width: 160px !important;
  max-height: 90px !important;

  display: block !important;
  flex: 0 0 160px !important;

  object-fit: contain !important;
  object-position: center center !important;

  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;

  transform: none !important;
  scale: none !important;
  rotate: none !important;
  translate: none !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  clip-path: none !important;
  overflow: visible !important;
}

/* variantes pequenas */
img.level-badge-art-sm,
.level-badge-art-sm,
img.mini-badge,
.mini-badge,
table img[src*="badges/"] {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;

  display: inline-block !important;

  object-fit: contain !important;
  object-position: center center !important;

  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;

  transform: none !important;
  scale: none !important;
  rotate: none !important;
  translate: none !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  clip-path: none !important;
  overflow: visible !important;
}

/* wrappers não podem cortar */
.student-badge-inline,
.soft-panel,
.card,
.card-body,
.hero-panel,
.d-flex.align-items-center.gap-3.flex-wrap {
  overflow: visible !important;
}

/* ===== BADGE BOX FIX FINAL ===== */
.badge-portal-row,
.student-badge-inline {
  overflow: visible !important;
}

.badge-portal-box,
.badge-admin-box {
  width: 180px !important;
  height: 96px !important;
  min-width: 180px !important;
  min-height: 96px !important;
  max-width: 180px !important;
  max-height: 96px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

img.level-badge-art-portal,
.level-badge-art-portal {
  width: 180px !important;
  height: 96px !important;
  min-width: 180px !important;
  min-height: 96px !important;
  max-width: 180px !important;
  max-height: 96px !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center center !important;
  position: static !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
  overflow: visible !important;
}

/* ===== FIX CÍRCULOS FANTASMA ===== */
.soft-panel::before,
.soft-panel::after,
.card::before,
.card::after {
    display: none !important;
    content: none !important;
}

.glow,
.glow-effect,
.blur-circle,
.overlay-effect {
    display: none !important;
}

/* ===== GARANTIR LIMPEZA VISUAL ===== */
.soft-panel {
    position: relative;
    overflow: hidden;
}

/* ===== CORREÇÃO BLOCO INCOMPLETO ===== */
.overlay-effect {
    display: none !important;
}

/* GARANTIA FINAL */
.soft-panel::before,
.soft-panel::after,
.card::before,
.card::after {
    display: none !important;
    content: none !important;
}
