/* portal-auth.css — login screen + auth UI states */

[hidden] { display: none !important; }
.auth-user-chip[hidden],
.welcome-banner[hidden],
.admin-badge[hidden],
#nav-admin[hidden] { display: none !important; }

/* Loading state — minimal */
.auth-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: rgba(255,255,255,.4);
  font-size: .9rem;
  letter-spacing: .04em;
}
.auth-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--green-light, #7CBA5F);
  border-radius: 50%;
  margin-right: 10px;
  animation: auth-spin .9s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Login screen */
.auth-login {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  z-index: 5;
}
.auth-login-card {
  max-width: 460px;
  width: 100%;
  text-align: center;
  background: rgba(10,10,11,.55);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 40px 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
}
.auth-login-logo {
  height: 36px;
  margin: 0 auto 24px;
  display: block;
  opacity: .9;
}
.auth-login-eyebrow {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green-light, #7CBA5F);
  margin-bottom: 14px;
}
.auth-login-title {
  font-size: 1.45rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -.005em;
}
.auth-login-sub {
  font-size: .92rem;
  line-height: 1.55;
  color: rgba(255,255,255,.55);
  margin: 0 0 28px;
}
.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .94rem;
  font-weight: 600;
  letter-spacing: .005em;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
  font-family: inherit;
}
.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -10px rgba(88,101,242,.6);
}
.btn-discord:active { transform: translateY(0); }
.btn-discord svg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }

.auth-login-footnote {
  margin-top: 22px;
  font-size: .76rem;
  color: rgba(255,255,255,.35);
  line-height: 1.5;
}
.auth-login-footnote a { color: var(--green-light, #7CBA5F); text-decoration: none; }
.auth-login-footnote a:hover { text-decoration: underline; }

/* Logged-in user chip in sidebar footer */
.auth-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-top: 1px solid rgba(255,255,255,.05);
  background: rgba(255,255,255,.02);
}
.auth-user-chip img {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  flex-shrink: 0;
}
.auth-user-chip .auth-user-name {
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.auth-user-chip .auth-user-role {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0,255,136,.1);
  color: var(--green-light, #7CBA5F);
  border: 1px solid rgba(0,255,136,.18);
}
.auth-user-chip .auth-user-role.client {
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.55);
  border-color: rgba(255,255,255,.08);
}
.auth-signout {
  background: none;
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: .7rem;
  cursor: pointer;
  font-family: inherit;
  transition: color .18s ease, border-color .18s ease;
}
.auth-signout:hover { color: #fff; border-color: rgba(255,255,255,.2); }

@media (max-width: 980px) {
  .auth-user-chip { padding: 8px 8px; flex-direction: column; gap: 4px; }
  .auth-user-chip .auth-user-name,
  .auth-user-chip .auth-user-role { display: none; }
}

/* Collapsed sidebar (desktop) — hide name/role/Salir text, keep only avatar */
@media (min-width: 981px) {
  html.sb-collapsed .auth-user-chip {
    flex-direction: column;
    padding: 10px 8px;
    gap: 8px;
    align-items: center;
    justify-content: center;
  }
  html.sb-collapsed .auth-user-chip .auth-user-name { display: none; }
  html.sb-collapsed .auth-user-chip .auth-user-role { display: none; }
  html.sb-collapsed .auth-user-chip img {
    width: 32px;
    height: 32px;
  }
  html.sb-collapsed .auth-signout {
    font-size: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    position: relative;
  }
  html.sb-collapsed .auth-signout::before {
    content: "\2192"; /* arrow right (logout glyph) */
    font-size: 1rem;
    line-height: 1;
    color: inherit;
  }
}

/* Welcome banner inside dashboard */
.welcome-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(0,255,136,.06), rgba(0,255,136,.02));
  border: 1px solid rgba(0,255,136,.14);
  border-radius: 10px;
  margin-bottom: 28px;
}
.welcome-banner img {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.welcome-banner .welcome-text { flex: 1; }
.welcome-banner .welcome-text strong { color: #fff; font-weight: 600; }
.welcome-banner .welcome-text span { color: rgba(255,255,255,.55); font-size: .85rem; }
.admin-badge {
  font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 5px;
  background: rgba(255,184,0,.12); color: #FFB800;
  border: 1px solid rgba(255,184,0,.25);
}
