/* =====================================================
   DBV SISTEMA — Design System & Admin Panel Styles
   Clube de Desbravadores / v1.0.0
   ===================================================== */

/* ── Custom Properties ────────────────────────────── */
:root {
  /* Brand Colors */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #1a56db;
  --blue-700: #1e40af;
  --blue-900: #1e3a5f;

  --green-50: #ecfdf5;
  --green-500: #10b981;
  --green-600: #057a55;
  --green-700: #065f46;

  --amber-50: #fffbeb;
  --amber-500: #f59e0b;
  --amber-600: #d97706;

  --red-50: #fef2f2;
  --red-500: #ef4444;
  --red-600: #dc2626;

  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;

  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Layout */
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .15);

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Transitions */
  --tr: 0.2s ease;
}

/* ── Reset ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Garante que o atributo HTML 'hidden' sempre esconda o elemento */
[hidden] {
  display: none !important;
}


html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Login Screen ──────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 50%, var(--green-700) 100%);
  padding: 1rem;
}

.login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-icon {
  font-size: 3rem;
  margin-bottom: .5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
}

.logo-icon img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.login-logo h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
}

.login-logo h1 span {
  color: var(--blue-600);
}

.login-logo p {
  color: var(--gray-500);
  font-size: .875rem;
  margin-top: .25rem;
}

.login-hint {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm);
  padding: .625rem .75rem;
  margin-bottom: 1rem;
  font-size: .8125rem;
  color: var(--blue-700);
}

.login-error {
  text-align: center;
  color: var(--red-600);
  font-size: .875rem;
  margin-top: .75rem;
}

/* ── App Shell ─────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--blue-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--tr);
  box-shadow: 4px 0 20px rgba(0, 0, 0, .2);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 99;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-logo {
  font-size: 1.2rem;
  letter-spacing: .5px;
}

.sidebar-logo strong {
  font-weight: 800;
}

.sidebar-logo span {
  font-weight: 300;
  opacity: .7;
  font-size: 1rem;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .6);
  font-size: 1.25rem;
  cursor: pointer;
  padding: .25rem;
  border-radius: var(--radius-sm);
  transition: color var(--tr);
}

.sidebar-close:hover {
  color: #fff;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: rgba(255, 255, 255, .7);
  font-size: .9375rem;
  font-weight: 500;
  transition: background var(--tr), color var(--tr);
}

.nav-link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.nav-link.active {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 86, 219, .4);
}

.nav-icon {
  font-size: 1.125rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
  min-width: 0;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .875rem;
  flex-shrink: 0;
}

.user-name {
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: .75rem;
  opacity: .6;
}

.btn-logout {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .7);
  border-radius: var(--radius-sm);
  padding: .5rem .625rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--tr);
  flex-shrink: 0;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, .2);
  border-color: rgba(239, 68, 68, .4);
  color: #fca5a5;
}

/* ── Topbar ────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-600);
  padding: .25rem;
  border-radius: var(--radius-sm);
}

.topbar-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  flex: 1;
}

.topbar-badge {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: .25rem .75rem;
}

/* ── Main Content ──────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.view-container {
  flex: 1;
  padding: 1.75rem 1.5rem;
  max-width: 1280px;
  width: 100%;
}

/* ── Page Headers ──────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.page-header h1 {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--gray-900);
}

.page-header p {
  font-size: .9rem;
  color: var(--gray-500);
  margin-top: .2rem;
}

/* ── Stat Cards ────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform var(--tr), box-shadow var(--tr);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon--blue {
  background: var(--blue-50);
}

.stat-icon--green {
  background: var(--green-50);
}

.stat-icon--amber {
  background: var(--amber-50);
}

.stat-icon--purple {
  background: #f5f3ff;
}

.stat-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-top: .25rem;
}

.stat-sub {
  font-size: .75rem;
  color: var(--gray-400);
  margin-top: .25rem;
}

/* ── Cards ─────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.card-body {
  padding: 1.5rem;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tr);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-700);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-success {
  background: var(--green-600);
  color: #fff;
}

.btn-success:hover {
  background: var(--green-700);
}

.btn-danger {
  background: var(--red-600);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  padding: .375rem .75rem;
}

.btn-ghost:hover {
  background: var(--gray-100);
}

.btn-sm {
  padding: .4rem .875rem;
  font-size: .8125rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: .375rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: background var(--tr);
  color: var(--gray-500);
}

.btn-icon:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

/* ── Tables ────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

thead th {
  background: var(--gray-50);
  padding: .875rem 1.125rem;
  text-align: left;
  font-size: .8rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--tr);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--gray-50);
}

tbody td {
  padding: 1rem 1.125rem;
  color: var(--gray-700);
  vertical-align: middle;
}

.td-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
}

@media (max-width: 768px) {
  .table-wrapper {
    border: none;
    box-shadow: none;
    background: transparent;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tbody tr {
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    background: #fff;
    padding: .5rem;
    box-shadow: var(--shadow-sm);
  }

  tbody td {
    border: none !important;
    border-bottom: 1px solid var(--gray-100) !important;
    padding: .75rem .5rem !important;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }

  tbody td:last-child {
    border-bottom: none !important;
  }

  tbody td::before {
    content: attr(data-label);
    text-align: left;
    font-weight: 600;
    color: var(--gray-500);
    font-size: .8rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    white-space: nowrap;
  }

  .td-actions {
    justify-content: flex-end;
    width: auto;
  }

  .rank-bar-wrap {
    width: 120px !important;
    margin-left: auto;
  }

  .rank-pos {
    margin-left: auto;
  }
}


/* ── Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-blue {
  background: var(--blue-50);
  color: var(--blue-700);
}

.badge-green {
  background: var(--green-50);
  color: var(--green-700);
}

.badge-amber {
  background: var(--amber-50);
  color: var(--amber-600);
}

.badge-red {
  background: var(--red-50);
  color: var(--red-600);
}

.badge-gray {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge-purple {
  background: #f5f3ff;
  color: var(--purple-600);
}

/* ── Forms ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: .375rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: .625rem .875rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9375rem;
  color: var(--gray-800);
  background: #fff;
  transition: border-color var(--tr), box-shadow var(--tr);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: .8rem;
  color: var(--gray-400);
  margin-top: .3rem;
}

/* ── Scoring Section ───────────────────────────────── */
.scoring-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.score-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}

.score-label {
  font-weight: 700;
  font-size: .9375rem;
  color: var(--gray-800);
}

.score-max {
  font-size: .8rem;
  color: var(--gray-400);
  font-weight: 400;
}

.score-controls {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.score-btn-group {
  display: flex;
  gap: .375rem;
}

.score-opt {
  border: 1.5px solid var(--gray-300);
  background: #fff;
  border-radius: 8px;
  padding: .35rem .7rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tr);
  color: var(--gray-600);
}

.score-opt.selected {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
}

.score-opt:hover:not(.selected) {
  background: var(--blue-50);
  border-color: var(--blue-500);
  color: var(--blue-600);
}

.score-input-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
}

input[type="number"].score-input {
  width: 80px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}

.score-total-bar {
  background: linear-gradient(135deg, var(--blue-50), var(--green-50));
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.score-total-label {
  font-weight: 700;
  color: var(--gray-700);
}

.score-total-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blue-700);
}

.score-total-value span {
  font-size: .9rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* ── Meeting Member Row in Detail ──────────────────── */
.member-score-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: box-shadow var(--tr);
}

.member-score-card:hover {
  box-shadow: var(--shadow-md);
}

.member-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  user-select: none;
}

.member-score-header-left {
  display: flex;
  align-items: center;
  gap: .875rem;
}

.member-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .875rem;
  flex-shrink: 0;
}

.member-name-group {
  display: flex;
  flex-direction: column;
}

.member-name-sm {
  font-weight: 600;
  font-size: .9375rem;
  color: var(--gray-800);
}

.member-class {
  font-size: .8rem;
  color: var(--gray-400);
}

.member-score-header-right {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.member-total-pts {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--blue-700);
}

.member-score-body {
  padding: 1.25rem;
  display: none;
}

.member-score-body.open {
  display: block;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .875rem;
}

.criteria-item {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: .875rem 1rem;
}

.criteria-name {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: .625rem;
}

.criteria-opts {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
}

.criteria-opt {
  border: 1.5px solid var(--gray-300);
  background: #fff;
  border-radius: 6px;
  padding: .3rem .6rem;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tr);
  color: var(--gray-600);
}

.criteria-opt.selected {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
}

.criteria-opt:hover:not(.selected) {
  background: var(--blue-50);
  border-color: var(--blue-500);
  color: var(--blue-600);
}

/* ── Progress Bar (Ranking) ────────────────────────── */
.rank-bar-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.rank-bar {
  flex: 1;
  height: 8px;
  background: var(--gray-200);
  border-radius: 20px;
  overflow: hidden;
}

.rank-bar-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--blue-600), var(--green-500));
  transition: width .6s ease;
}

.rank-pts {
  font-size: .875rem;
  font-weight: 700;
  color: var(--gray-700);
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}

/* ── Modal ─────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}

.modal--sm {
  max-width: 400px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(.95) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.375rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.modal-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--gray-400);
  padding: .25rem;
  border-radius: var(--radius-sm);
  transition: color var(--tr);
}

.modal-close:hover {
  color: var(--gray-700);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
}

/* ── Toast ─────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--gray-900);
  color: #fff;
  padding: .875rem 1.25rem;
  border-radius: var(--radius-md);
  min-width: 260px;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
  pointer-events: all;
  font-size: .9rem;
  font-weight: 500;
}

.toast-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.toast--success {
  background: var(--green-700);
}

.toast--error {
  background: var(--red-600);
}

.toast--warning {
  background: var(--amber-600);
  color: var(--gray-900);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Empty State ───────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
  color: var(--gray-400);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: .5rem;
}

.empty-state p {
  font-size: .9rem;
}

/* ── Search & Filter Bar ───────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: .875rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-wrap::before {
  content: '🔍';
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .9rem;
  pointer-events: none;
}

.search-input {
  padding-left: 2.2rem !important;
  border-radius: 20px !important;
}

/* ── Meeting Detail Header ─────────────────────────── */
.meeting-detail-info {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.meeting-detail-title {
  font-size: 1.4rem;
  font-weight: 800;
}

.meeting-detail-meta {
  display: flex;
  gap: 1.5rem;
  font-size: .9rem;
  opacity: .8;
  margin-top: .375rem;
  flex-wrap: wrap;
}

.meeting-detail-stat {
  text-align: right;
}

.meeting-detail-stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.meeting-detail-stat-label {
  font-size: .8rem;
  opacity: .7;
  margin-top: .2rem;
}

/* ── Presence toggle ───────────────────────────────── */
.presence-toggle {
  display: flex;
  gap: .5rem;
}

.presence-btn {
  border: 1.5px solid var(--gray-300);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: .35rem .75rem;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tr);
  color: var(--gray-500);
}

.presence-btn.active-true {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}

.presence-btn.active-false {
  background: var(--red-600);
  border-color: var(--red-600);
  color: #fff;
}

/* ── Dashboard Quick Stats ─────────────────────────── */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rank-pos {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
  color: var(--gray-600);
  flex-shrink: 0;
}

.rank-pos.gold {
  background: #fde68a;
  color: #92400e;
}

.rank-pos.silver {
  background: #e5e7eb;
  color: #374151;
}

.rank-pos.bronze {
  background: #fcd9b6;
  color: #92400e;
}

.rank-name {
  flex: 1;
  font-weight: 600;
  color: var(--gray-800);
  font-size: .9375rem;
}

/* ── Utilities ─────────────────────────────────────── */
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-gap-sm {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.text-muted {
  color: var(--gray-400);
}

.font-bold {
  font-weight: 700;
}

.font-sm {
  font-size: .875rem;
}

.mt-1 {
  margin-top: .5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.w-full {
  width: 100%;
}

/* ── Separator ─────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--gray-100);
  margin: 1.25rem 0;
}

/* ── Responsive Grids (replaces inline styles in views) ── */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

.four-col-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .two-col-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: block;
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .view-container {
    padding: 1.25rem 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header .btn {
    width: 100%;
    justify-content: center;
  }

  .meeting-detail-info {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem 1rem;
  }

  .meeting-detail-stat {
    text-align: center;
  }

  .meeting-detail-meta {
    gap: .75rem;
    justify-content: center;
  }

  .member-score-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }

  .member-score-header-right {
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
  }

  .presence-toggle .presence-btn {
    font-size: .75rem;
    padding: .3rem .6rem;
  }

  .criteria-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-direction: column;
  }

  .toolbar select {
    width: 100%;
  }

  /* Tabelas: esconde colunas menos prioritárias */
  .table-hide-mobile {
    display: none;
  }

  .td-actions {
    flex-wrap: wrap;
  }

  /* Modal responsivo */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 95vh;
    animation: modalInBottom .25s ease;
  }

  @keyframes modalInBottom {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  .modal--sm {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0 .875rem;
    gap: .5rem;
  }

  .topbar-badge {
    display: none;
  }

  .view-container {
    padding: 1rem .875rem;
  }

  table {
    font-size: .85rem;
  }

  thead th {
    padding: .625rem .75rem;
  }

  tbody td {
    padding: .75rem .75rem;
  }

  .toast {
    min-width: auto;
    max-width: calc(100vw - 2rem);
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .meeting-detail-title {
    font-size: 1.15rem;
  }

  .member-avatar-sm {
    width: 30px;
    height: 30px;
    font-size: .75rem;
  }

  .member-name-sm {
    font-size: .875rem;
  }

  .criteria-opt {
    font-size: .75rem;
    padding: .25rem .5rem;
  }

  .rank-bar-wrap {
    width: 100% !important;
  }
}

/* ── Photo Upload ───────────────────────────────────── */
.photo-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--gray-50);
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-md);
}

.photo-preview-wrap {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.photo-preview-placeholder {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gray-400);
}

.file-input {
  width: 100%;
  font-size: .875rem;
  color: var(--gray-600);
  padding: .5rem 0;
  cursor: pointer;
}

.file-input::file-selector-button {
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .375rem .875rem;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: .75rem;
  transition: background var(--tr);
}

.file-input::file-selector-button:hover {
  background: var(--blue-700);
}

/* ── Member photo small (table rows) ───────────────── */
.member-photo-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Nav separator (admin section divider) ─────────── */
.nav-sep {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin: .5rem .75rem;
}

/* ── User club subtitle in sidebar ─────────────────── */
.user-club {
  display: block;
  font-size: .75rem;
  font-weight: 400;
  opacity: .65;
  margin-top: .1rem;
}

/* ── Criteria options editor rows ─────────────────── */
.opts-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}

.opts-row input[type="number"] {
  width: 80px;
  flex-shrink: 0;
}

.opts-row input[type="text"] {
  flex: 1;
}

/* ── Password Eye Toggle ───────────────────────────── */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input {
  flex: 1;
  padding-right: 3rem !important;
}

.eye-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.45;
  transition: opacity .2s;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  user-select: none;
}

.eye-btn:hover {
  opacity: 1;
}

/* ── Esqueci minha senha ────────────────────────────── */
.login-forgot {
  text-align: center;
  margin-top: 0.875rem;
}

.login-forgot a {
  color: var(--blue-600);
  font-size: 0.875rem;
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s;
}

.login-forgot a:hover {
  opacity: .75;
  text-decoration: underline;
}

/* ── Credentials Box ────────────────────────────────── */
.credentials-box {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.credentials-box p {
  margin: 0.3rem 0;
  color: var(--gray-700);
}

/* ── Emoji Picker ───────────────────────────────────── */
.emoji-picker-wrap {
  position: relative;
}

.emoji-picker-btn {
  font-size: 1.5rem;
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background .15s, border-color .15s;
}

.emoji-picker-btn:hover {
  background: var(--gray-200);
  border-color: var(--blue-400);
}

.emoji-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 500;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: none;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  min-width: 288px;
}

.emoji-picker-dropdown.open {
  display: grid;
}

.emoji-picker-dropdown button {
  font-size: 1.3rem;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 0.35rem;
  transition: background .12s;
  line-height: 1;
}

.emoji-picker-dropdown button:hover {
  background: var(--blue-50);
}

/* ── Settings Page ──────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.settings-preview-bg {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-md);
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
}

.settings-preview-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}