.panel-body {
  min-height: 100vh;
  background: #FAF4F1;
}

[hidden] {
  display: none !important;
}

.login-wrap {
  display: flex;
  justify-content: center;
  padding: 40px 24px 80px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 6px 24px rgba(76, 54, 60, 0.12);
  display: flex;
  flex-direction: column;
}

.login-card h1 {
  font-size: 20px;
  text-align: center;
  margin-bottom: 8px;
}

.login-sub {
  font-size: 13px;
  color: #84686E;
  text-align: center;
  margin-bottom: 24px;
}

.login-card label {
  font-size: 12px;
  letter-spacing: 1px;
  color: #84686E;
  margin-bottom: 6px;
}

.login-card input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #E7C7CC;
  border-radius: 10px;
  background: #FFF8F6;
  color: #4C363C;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 18px;
  outline: none;
  transition: border 0.2s;
}

.login-card input:focus {
  border-color: #C89AA0;
}

.login-card button {
  background: #4C363C;
  color: #FAF4F1;
  border: none;
  border-radius: 30px;
  padding: 13px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.login-card button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-error {
  margin-top: 14px;
  font-size: 13px;
  color: #b3413f;
  text-align: center;
}

.panel-estado {
  text-align: center;
  padding: 60px 24px;
  color: #84686E;
}

.auth-split {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
}

.auth-brand {
  flex: 1 1 420px;
  min-width: 320px;
  min-height: 320px;
  background: #4C363C;
  color: #FAF4F1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 56px);
}

.auth-brand-adorno {
  position: absolute;
  width: 240px;
  opacity: 0.16;
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
}

.auth-brand-adorno-der { top: -30px; right: -40px; }
.auth-brand-adorno-izq { bottom: -40px; left: -40px; animation-delay: -3s; }

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.auth-brand-logo img { height: 20px; width: auto; }

.auth-brand-logo span {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 22px;
  color: #FAF4F1;
}

.auth-brand-quote { position: relative; z-index: 1; max-width: 440px; }

.auth-brand-quote .eyebrow { color: #C89AA0; }

.auth-brand-quote h1 {
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.25;
  color: #FAF4F1;
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(250, 244, 241, 0.45);
}

.auth-form-wrap {
  flex: 1 1 420px;
  min-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 6vw, 56px) 32px;
}

.auth-form { width: 100%; max-width: 380px; }

.auth-form .eyebrow { margin-bottom: 14px; }

.auth-form h2 {
  margin: 0 0 10px;
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: 36px;
  color: #4C363C;
}

.auth-form h2 em { font-style: italic; color: #C89AA0; }

.auth-form-sub {
  margin: 0 0 36px;
  font-size: 14px;
  line-height: 1.7;
  color: #84686E;
}

.auth-form label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #84686E;
  font-weight: 600;
  margin-bottom: 10px;
}

.auth-form input {
  width: 100%;
  padding: 12px 2px;
  border: none;
  border-bottom: 1.5px solid #E7C7CC;
  background: transparent;
  color: #4C363C;
  font-family: inherit;
  font-size: 15px;
  margin-bottom: 26px;
  outline: none;
  transition: border-color 0.2s;
}

.auth-form input:focus { border-color: #C89AA0; }

.auth-form button {
  width: 100%;
  padding: 17px;
  background: #4C363C;
  color: #FAF4F1;
  border: none;
  border-radius: 40px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}

.auth-form button:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-back {
  display: inline-block;
  margin-top: 30px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #84686E;
  text-decoration: none;
}

.auth-back:hover { color: #C89AA0; }

.panel-shell {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
}

.panel-sidebar {
  width: 220px;
  flex: 0 0 220px;
  min-height: 100vh;
  background: #4C363C;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 24px;
  box-sizing: border-box;
}

.panel-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.panel-brand img { height: 18px; width: auto; }

.panel-brand span {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: #FAF4F1;
}

.panel-sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; margin-top: 8px; }

.panel-sidebar-link {
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(250, 244, 241, 0.7);
  font-size: 14px;
  font-weight: 600;
}

.panel-sidebar-link.active {
  background: rgba(250, 244, 241, 0.1);
  color: #FAF4F1;
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(250, 244, 241, 0.3);
  color: rgba(250, 244, 241, 0.75);
  border-radius: 30px;
  padding: 9px 20px;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.btn-logout:hover { background: rgba(250, 244, 241, 0.12); color: #FAF4F1; }

.panel-main {
  flex: 1;
  min-width: 320px;
  padding: 48px clamp(24px, 4vw, 56px);
  box-sizing: border-box;
}

.panel-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.panel-top h1 {
  margin: 0;
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: 34px;
  color: #4C363C;
}

.panel-fecha { margin: 6px 0 0; font-size: 13px; color: #84686E; }

.panel-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px clamp(20px, 3vw, 36px);
  box-shadow: 0 6px 24px rgba(76, 54, 60, 0.08);
  margin-bottom: 28px;
}

.resumen-grid { display: flex; flex-wrap: wrap; gap: 28px; }

.resumen-stat { flex: 1; min-width: 130px; }

.resumen-etiqueta {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #B8969B;
  margin-bottom: 8px;
}

.resumen-valor {
  font-size: 28px;
  font-weight: 700;
  font-family: 'EB Garamond', serif;
  color: #4C363C;
}

.resumen-sub { margin-top: 4px; font-size: 12px; color: #84686E; }

.progreso { margin-top: 26px; }

.progreso-barra {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #F3E6E2;
}

.progreso-seg { height: 100%; transition: width 0.4s ease; }
.progreso-si { background: #4C363C; }
.progreso-no { background: #D9A9A6; }
.progreso-pendiente { background: #B8969B; }

.progreso-leyenda {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #84686E;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.dot-si { background: #4C363C; }
.dot-no { background: #D9A9A6; }
.dot-pendiente { background: #B8969B; }

/* ── Tarjeta de invitados ── */
.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.panel-card-header h2 {
  margin: 0;
  font-family: 'EB Garamond', serif;
  font-weight: 500;
  font-size: 21px;
  color: #4C363C;
}

.panel-card-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-outline,
.btn-dark,
.btn-danger {
  border-radius: 30px;
  padding: 12px 22px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.btn-outline {
  background: transparent;
  border: 1px solid #E7C7CC;
  color: #84686E;
}

.btn-outline:hover { border-color: #C89AA0; color: #4C363C; }

.btn-dark {
  background: #4C363C;
  color: #FAF4F1;
  border: none;
}

.btn-dark:hover { opacity: 0.88; }

.btn-danger {
  background: #b3413f;
  color: #fff;
  border: none;
}

.btn-danger:hover { opacity: 0.88; }

.panel-filtros {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 22px;
}

.input-buscar {
  flex: 1;
  min-width: 180px;
  padding: 11px 18px;
  border: 1px solid #F0D8DC;
  border-radius: 30px;
  background: #FFF8F6;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  color: #4C363C;
  transition: border-color 0.2s;
}

.input-buscar:focus { border-color: #C89AA0; }

.filtro-pills { display: flex; gap: 8px; flex-wrap: wrap; }

.pill-filtro {
  background: transparent;
  color: #84686E;
  border: 1px solid #E7C7CC;
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pill-filtro.active {
  background: #4C363C;
  color: #FAF4F1;
  border-color: #4C363C;
}

.tabla-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid #F8ECEA;
}

.tabla-invitados {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.tabla-invitados th,
.tabla-invitados td {
  padding: 13px 16px;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
  border-bottom: 1px solid #F8ECEA;
  background: #fff;
}

.tabla-invitados th {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #B8969B;
  background: #FFFBFA;
}

.th-acciones { text-align: right; position: sticky; right: 0; }

.tabla-invitados td.td-acciones {
  text-align: right;
  position: sticky;
  right: 0;
  box-shadow: -6px 0 10px -6px rgba(76, 54, 60, 0.15);
}

.invitado-celda { display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #4C363C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.codigo-badge {
  font-family: monospace;
  font-size: 12px;
  background: #FFF8F6;
  border: 1px solid #F0D8DC;
  border-radius: 6px;
  padding: 3px 8px;
  color: #84686E;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
}

.badge-si { background: #4C363C; color: #FAF4F1; }
.badge-no { background: #FBEAE9; color: #b3413f; }
.badge-pendiente { background: #F3E6E2; color: #84686E; }

.btn-icon {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid #E7C7CC;
  color: #84686E;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  margin-left: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-icon svg { width: 14px; height: 14px; }

.btn-icon-copiar { border-color: #C89AA0; color: #C89AA0; }
.btn-icon-copiar.copiado { background: #C89AA0; color: #fff; }

.btn-icon-eliminar { color: #b3413f; }
.btn-icon-eliminar:hover { background: #b3413f; color: #fff; border-color: #b3413f; }

.btn-icon-editar:hover { border-color: #C89AA0; color: #4C363C; }

.tabla-vacia { text-align: center; padding: 60px 24px; color: #84686E; font-size: 14px; }

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(76, 54, 60, 0.35);
  z-index: 40;
}

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: #fff;
  z-index: 41;
  padding: 40px 32px;
  box-sizing: border-box;
  box-shadow: -12px 0 40px rgba(76, 54, 60, 0.18);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.drawer h2 {
  margin: 0 0 28px;
  font-family: 'EB Garamond', serif;
  font-weight: 500;
  font-size: 24px;
  color: #4C363C;
}

.drawer label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #84686E;
  font-weight: 600;
  margin-bottom: 8px;
}

.drawer input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E7C7CC;
  border-radius: 10px;
  background: #FFF8F6;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 18px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.drawer input:focus { border-color: #C89AA0; }

.form-invitado-error { color: #b3413f; font-size: 13px; margin-bottom: 12px; }

.drawer-acciones { display: flex; gap: 12px; margin-top: auto; }
.drawer-acciones .btn-outline,
.drawer-acciones .btn-dark { flex: 1; padding: 13px; text-align: center; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(76, 54, 60, 0.4);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(76, 54, 60, 0.25);
}

.modal-card h3 {
  margin: 0 0 10px;
  font-family: 'EB Garamond', serif;
  font-weight: 500;
  font-size: 20px;
  color: #4C363C;
}

.modal-card p { margin: 0 0 26px; font-size: 13.5px; line-height: 1.6; color: #84686E; }

.modal-acciones { display: flex; gap: 12px; }
.modal-acciones .btn-outline,
.modal-acciones .btn-danger { flex: 1; text-align: center; }

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #4C363C;
  color: #FAF4F1;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(76, 54, 60, 0.3);
  z-index: 60;
}

@media (max-width: 860px) {
  .panel-sidebar {
    width: 100%;
    flex: 1 0 100%;
    min-height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
  }

  .panel-sidebar-nav { display: none; }
}

@media (max-width: 600px) {
  .panel-card-actions { width: 100%; }
  .panel-card-actions .btn-outline,
  .panel-card-actions .btn-dark { flex: 1; text-align: center; }

  .resumen-stat { flex-basis: 100%; }

  .toast { left: 16px; right: 16px; bottom: 16px; text-align: center; }
}

@media print {
  .panel-sidebar,
  .panel-top,
  .panel-resumen,
  .panel-card-actions,
  .panel-filtros,
  .no-imprimir {
    display: none !important;
  }

  body { background: #fff; }

  .panel-card {
    box-shadow: none;
    padding: 0;
  }

  .tabla-scroll {
    overflow: visible;
    border: none;
  }
}
