/* Membership badge + panel alerts (global dashboard) */

.sidebar-user .memb-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: -6px auto 0;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(40, 203, 105, 0.35);
  background: rgba(40, 203, 105, 0.12);
  color: #34d399 !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.sidebar-user .memb-badge:hover,
.sidebar-user .memb-badge:focus {
  background: rgba(40, 203, 105, 0.2);
  border-color: rgba(40, 203, 105, 0.55);
  color: #6ee7b7 !important;
  transform: translateY(-1px);
}

.memb-badge i {
  font-size: 10px;
}

.sidebar-user .memb-badge--warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24 !important;
}

.sidebar-user .memb-badge--warn:hover,
.sidebar-user .memb-badge--warn:focus {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.65);
  color: #fcd34d !important;
}

.memb-alerts {
  position: relative;
  z-index: 30;
  margin: 12px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.memb-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #18181a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.memb-alert--warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(24, 24, 26, 0.96));
}

.memb-alert--success {
  border-color: rgba(40, 203, 105, 0.35);
  background: linear-gradient(135deg, rgba(40, 203, 105, 0.12), rgba(24, 24, 26, 0.96));
}

.memb-alert__ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #fbbf24;
}

.memb-alert--success .memb-alert__ic {
  color: #28cb69;
}

.memb-alert__body {
  flex: 1;
  min-width: 0;
}

.memb-alert__title {
  display: block;
  color: #fafafa;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.memb-alert__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  line-height: 1.45;
}

.memb-alert__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  flex-shrink: 0;
}

.memb-alert__cta,
.memb-alert__dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

.memb-alert__cta {
  background: #28cb69;
  color: #04140a !important;
}

.memb-alert--warn .memb-alert__cta {
  background: #f59e0b;
  color: #1a1200 !important;
}

.memb-alert__dismiss {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65) !important;
}

.memb-alert__dismiss:hover {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 767px) {
  .memb-alerts {
    margin: 10px 10px 0;
  }

  .memb-alert {
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .memb-alert__title {
    font-size: 13px;
  }

  .memb-alert__text {
    font-size: 12px;
  }

  .memb-alert__actions {
    width: 100%;
    flex-direction: row;
  }

  .memb-alert__cta,
  .memb-alert__dismiss {
    flex: 1;
    min-height: 38px;
  }
}

/* ── Sidebar responsive ─────────────────────────────────
   Bajo 1200px el sidebar se colapsa a 80px (solo iconos) y
   se expande a 240px al abrirlo con .sidebar-action.       */
@media (max-width: 1199.98px) {
  .app-container .app-sidebar .sidebar-user .memb-badge {
    width: 34px;
    height: 34px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    margin: 8px auto 0;
  }

  .app-container .app-sidebar .sidebar-user .memb-badge span {
    display: none;
  }

  .app-container .app-sidebar .sidebar-user .memb-badge i {
    font-size: 13px;
  }

  .sidebar-action .app-sidebar .sidebar-user .memb-badge {
    width: fit-content;
    max-width: 100%;
    height: auto;
    padding: 5px 12px;
    gap: 6px;
    border-radius: 999px;
    margin: 10px auto 0;
  }

  .sidebar-action .app-sidebar .sidebar-user .memb-badge span {
    display: inline;
  }

  .sidebar-action .app-sidebar .sidebar-user .memb-badge i {
    font-size: 11px;
  }
}

@media (max-width: 767.98px) {
  .app-container .app-sidebar .sidebar-user .memb-badge {
    width: 36px;
    height: 36px;
  }

  .sidebar-action .app-sidebar .sidebar-user .memb-badge {
    width: auto;
    min-height: 32px;
    padding: 6px 14px;
    font-size: 12px;
  }

  .sidebar-action .app-sidebar .sidebar-user .memb-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
