/* ============================================================
   auth.css — لاگین + تغییر رمز + باکس کاربر
   ============================================================ */

/* ---------- باکس کاربر در سایدبار ---------- */
.auth-user-box {
  background: #fffdf7;
  border: 1px solid #eee4c9;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auth-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.auth-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #e9b423, #d69a0e);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.auth-username {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-role {
  font-size: 11px;
  color: #b8941e;
  font-weight: 700;
}

/* اکشن‌های کاربر */
.auth-user-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.auth-btn-icon {
  width: 30px;
  height: 30px;
  border: 1px solid #e0ddd2;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: all 0.15s;
}

.auth-btn-icon:hover {
  background: #fff5d6;
  border-color: #e0a719;
}

.auth-btn-logout-icon:hover {
  background: #ffebee;
  border-color: #e53935;
}

/* دکمه ورود */
.auth-btn-login {
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, #e9b423, #d69a0e);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s;
}

.auth-btn-login:hover {
  filter: brightness(0.95);
}

/* ---------- مودال ---------- */
.auth-message {
  margin: 0 0 14px;
  padding: 9px 12px;
  background: #fff8e6;
  border: 1px solid #f0d68a;
  border-radius: 8px;
  font-size: 12px;
  color: #7a5c00;
  line-height: 1.7;
}

.auth-message:empty { display: none; }

.auth-error {
  margin-top: 8px;
  color: #c62828;
  font-size: 13px;
  font-weight: 700;
  min-height: 18px;
}

/* ---------- مخفی کردن دکمه‌های ادمین ---------- */
body:not(.is-admin) .admin-only {
  display: none !important;
}

/* ---------- Admin notice ---------- */
.admin-notice {
  display: none;
  background: #fff8e6;
  border: 1px solid #f0d68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #7a5c00;
  text-align: center;
  margin-bottom: 12px;
}

body.is-logged-in:not(.is-admin) .admin-notice { display: block; }
body:not(.is-logged-in) .admin-notice { display: block; }

/* ---------- Toast کوچک ---------- */
.auth-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #2e7d32;
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.auth-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}