/* Ajustes do painel sobre o Bootstrap 5.3 */
:root {
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-link-color: #4f46e5;
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color: #3730a3;
  --bs-link-hover-color-rgb: 55, 48, 163;
  --bs-primary-text-emphasis: #312e81;
  --bs-primary-bg-subtle: #e0e7ff;
  --bs-primary-border-subtle: #c7d2fe;
}
.btn-primary {
  --bs-btn-bg: #4f46e5; --bs-btn-border-color: #4f46e5;
  --bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca;
  --bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3;
  --bs-btn-disabled-bg: #4f46e5; --bs-btn-disabled-border-color: #4f46e5;
}
.btn-outline-primary {
  --bs-btn-color: #4f46e5; --bs-btn-border-color: #4f46e5;
  --bs-btn-hover-bg: #4f46e5; --bs-btn-hover-border-color: #4f46e5;
  --bs-btn-active-bg: #4338ca; --bs-btn-active-border-color: #4338ca;
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 .25rem rgba(79, 70, 229, .2);
}
.form-check-input:checked { background-color: #4f46e5; border-color: #4f46e5; }
.nav-pills { --bs-nav-pills-link-active-bg: #4f46e5; }

.app-navbar {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 100%);
  box-shadow: 0 4px 16px rgba(49, 46, 129, .18);
}

.card { border-color: rgba(15, 23, 42, .08); }
.card-shadow { box-shadow: 0 4px 16px rgba(15, 23, 42, .06); }

.page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.5rem; margin: 0; font-weight: 600; }

/* Tela de login */
.auth-card { max-width: 400px; margin: 6vh auto 0; }
.auth-icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2rem; background: #e0e7ff; color: #4f46e5;
}

/* Cartões de estatística */
.stat-card { border: 0; border-radius: .9rem; }
.stat-card .stat-n { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.stat-card .stat-l { font-size: .82rem; opacity: .8; }

/* Convidados */
.guest-item { border-left: 4px solid var(--bs-border-color); }
.guest-item.is-confirmed { border-left-color: #22c55e; }
.guest-item.is-declined  { border-left-color: #ef4444; }
.guest-item.is-pending   { border-left-color: #f59e0b; }
.member-chip {
  display: inline-flex; align-items: center; gap: .25rem;
  background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color);
  border-radius: 999px; padding: .15rem .6rem; font-size: .85rem;
}
.link-box { font-family: var(--bs-font-monospace); font-size: .8rem; }

/* Seletor visual de tema */
.theme-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.theme-option { cursor: pointer; margin: 0; }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option .theme-box {
  border: 2px solid var(--bs-border-color); border-radius: .75rem; padding: .5rem;
  background: #fff; text-align: center; transition: all .15s; height: 100%;
}
.theme-option:hover .theme-box { border-color: #a5b4fc; transform: translateY(-1px); }
.theme-option input:checked + .theme-box {
  border-color: #4f46e5; background: #eef2ff; box-shadow: 0 0 0 3px rgba(79, 70, 229, .18);
}
.theme-option input:focus-visible + .theme-box { outline: 2px solid #4f46e5; outline-offset: 2px; }
.theme-swatch {
  height: 64px; border-radius: .5rem; margin-bottom: .4rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; letter-spacing: 4px;
}
.theme-name { font-weight: 600; font-size: .9rem; }
.theme-desc { font-size: .75rem; color: var(--bs-secondary-color); }

/* Editor de CSS */
.code-area { font-family: var(--bs-font-monospace); font-size: .82rem; line-height: 1.45; tab-size: 2; }

/* Lista de presenças */
.att-group li.yes { color: #15803d; font-weight: 600; }
.att-group li.no  { color: #b91c1c; text-decoration: line-through; opacity: .75; }
.att-group li.pend { color: var(--bs-secondary-color); }

@media print {
  body { background: #fff !important; }
  .card { border: 0 !important; box-shadow: none !important; }
  .att-group { break-inside: avoid; }
}
.mw-900 { max-width: 900px; }
